From cf1bb78907938ce2e1d343c1c9110c8b8f087aea Mon Sep 17 00:00:00 2001 From: Jonas Spanoghe Date: Sat, 18 Feb 2023 10:04:22 +0100 Subject: [PATCH 1/5] Update riscv, riscv-rt and vcell dependencies + add optional `critical-section` dependency --- Cargo.toml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e6cbacb..bc68cd3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,13 +14,17 @@ categories = ["embedded", "hardware-support", "no-std"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -riscv = "0.7.0" +riscv = "0.10.1" bare-metal = "1.0.0" -vcell = "0.1.2" +vcell = "0.1.3" + +[dependencies.critical-section] +optional = true +version = "1.1" [dependencies.riscv-rt] optional = true -version = "0.8.1" +version = "0.11.0" [features] rt = ["riscv-rt"] From 4e4e6f567d0929db550a23c68198a8e99862452e Mon Sep 17 00:00:00 2001 From: Jonas Spanoghe Date: Sat, 18 Feb 2023 11:57:14 +0100 Subject: [PATCH 2/5] ci.yml: update MSRV to 1.59 --- .github/workflows/ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ca2bc66..9d59362 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: include: # Run check with MSRV as well - - rust: 1.42.0 + - rust: 1.59.0 steps: - uses: actions/checkout@v2 @@ -32,7 +32,7 @@ jobs: toolchain: ${{ matrix.rust }} override: true components: rustfmt - + - name: Install xmllint run: sudo apt-get install libxml2-utils - name: Install Python dependencies @@ -47,13 +47,13 @@ jobs: id: cache-cargo with: path: ~/cargo-bin - key: ${{ runner.os }}-svd2rust-0.17.0 + key: ${{ runner.os }}-svd2rust-0.28.0 - name: Install svd2rust if: steps.cache-cargo.outputs.cache-hit != 'true' uses: actions-rs/install@v0.1 with: crate: svd2rust - version: 0.17.0 + version: 0.28.0 - name: Copy svd2rust to cache directory if: steps.cache-cargo.outputs.cache-hit != 'true' run: | @@ -64,13 +64,13 @@ jobs: uses: actions-rs/install@v0.1 with: crate: form - version: 0.7.0 + version: 0.10.0 - name: Copy form to cache directory if: steps.cache-cargo.outputs.cache-hit != 'true' run: | mkdir -p ~/cargo-bin cp ~/.cargo/bin/form ~/cargo-bin - + - name: Put new cargo binary directory into path run: echo "~/cargo-bin" >> $GITHUB_PATH @@ -79,7 +79,7 @@ jobs: pushd ~/.local/bin wget https://github.com/ARM-software/CMSIS_5/raw/develop/CMSIS/Utilities/Linux64/SVDConv chmod 0770 SVDConv - popd + popd - name: Build PAC run: ./scripts/regenerate-rust-code.sh soc602_reg.svd src From 8a353771676f0034fba444e728ed8cf085992c1b Mon Sep 17 00:00:00 2001 From: Jonas Spanoghe Date: Sat, 18 Feb 2023 10:04:12 +0100 Subject: [PATCH 3/5] Rebuild from SVD using svd2rust 0.28.0 --- src/aon.rs | 118 +- src/aon/acomp0_ctrl.rs | 376 ++--- src/aon/acomp1_ctrl.rs | 376 ++--- src/aon/acomp_ctrl.rs | 392 ++--- src/aon/aon.rs | 259 +--- src/aon/aon_common.rs | 740 ++-------- src/aon/aon_misc.rs | 114 +- src/aon/bg_sys_top.rs | 154 +- src/aon/dcdc18_top_0.rs | 464 ++---- src/aon/dcdc18_top_1.rs | 428 ++---- src/aon/gpadc_reg_cmd.rs | 879 +++-------- src/aon/gpadc_reg_config1.rs | 496 ++----- src/aon/gpadc_reg_config2.rs | 852 +++-------- src/aon/gpadc_reg_define.rs | 46 +- src/aon/gpadc_reg_isr.rs | 268 +--- src/aon/gpadc_reg_raw_result.rs | 51 +- src/aon/gpadc_reg_result.rs | 53 +- src/aon/gpadc_reg_scn_neg1.rs | 270 +--- src/aon/gpadc_reg_scn_neg2.rs | 270 +--- src/aon/gpadc_reg_scn_pos1.rs | 270 +--- src/aon/gpadc_reg_scn_pos2.rs | 270 +--- src/aon/gpadc_reg_status.rs | 70 +- src/aon/hbncore_resv0.rs | 48 +- src/aon/hbncore_resv1.rs | 48 +- src/aon/ldo11soc_and_dctest.rs | 504 ++----- src/aon/psw_irrcv.rs | 57 +- src/aon/rf_top_aon.rs | 621 ++------ src/aon/tsen.rs | 213 +-- src/aon/xtal_cfg.rs | 571 ++----- src/cci.rs | 20 +- src/cci/cci_addr.rs | 48 +- src/cci/cci_cfg.rs | 472 ++---- src/cci/cci_ctl.rs | 85 +- src/cci/cci_rdata.rs | 53 +- src/cci/cci_wdata.rs | 48 +- src/cks.rs | 12 +- src/cks/cks_config.rs | 144 +- src/cks/cks_out.rs | 51 +- src/cks/data_in.rs | 49 +- src/dma.rs | 185 +-- src/dma/dma_c0config.rs | 447 ++---- src/dma/dma_c0control.rs | 479 ++---- src/dma/dma_c0dst_addr.rs | 72 +- src/dma/dma_c0lli.rs | 47 +- src/dma/dma_c0src_addr.rs | 72 +- src/dma/dma_c1config.rs | 425 ++---- src/dma/dma_c1control.rs | 422 ++---- src/dma/dma_c1dst_addr.rs | 72 +- src/dma/dma_c1lli.rs | 47 +- src/dma/dma_c1src_addr.rs | 72 +- src/dma/dma_c2config.rs | 425 ++---- src/dma/dma_c2control.rs | 422 ++---- src/dma/dma_c2dst_addr.rs | 72 +- src/dma/dma_c2lli.rs | 47 +- src/dma/dma_c2src_addr.rs | 72 +- src/dma/dma_c3config.rs | 425 ++---- src/dma/dma_c3control.rs | 422 ++---- src/dma/dma_c3dst_addr.rs | 72 +- src/dma/dma_c3lli.rs | 47 +- src/dma/dma_c3src_addr.rs | 72 +- src/dma/dma_enbld_chns.rs | 69 +- src/dma/dma_int_err_clr.rs | 64 +- src/dma/dma_int_error_status.rs | 69 +- src/dma/dma_int_status.rs | 69 +- src/dma/dma_int_tcclear.rs | 64 +- src/dma/dma_int_tcstatus.rs | 69 +- src/dma/dma_raw_int_error_status.rs | 69 +- src/dma/dma_raw_int_tcstatus.rs | 69 +- src/dma/dma_soft_breq.rs | 72 +- src/dma/dma_soft_lbreq.rs | 72 +- src/dma/dma_soft_lsreq.rs | 72 +- src/dma/dma_soft_sreq.rs | 72 +- src/dma/dma_sync.rs | 47 +- src/dma/dma_top_config.rs | 114 +- src/ef_ctrl.rs | 66 +- src/ef_ctrl/ef_crc_ctrl_0.rs | 596 ++------ src/ef_ctrl/ef_crc_ctrl_1.rs | 48 +- src/ef_ctrl/ef_crc_ctrl_2.rs | 48 +- src/ef_ctrl/ef_crc_ctrl_3.rs | 48 +- src/ef_ctrl/ef_crc_ctrl_4.rs | 48 +- src/ef_ctrl/ef_crc_ctrl_5.rs | 53 +- src/ef_ctrl/ef_if_0_manual.rs | 434 ++---- src/ef_ctrl/ef_if_0_status.rs | 53 +- src/ef_ctrl/ef_if_ana_trim_0.rs | 53 +- src/ef_ctrl/ef_if_cfg_0.rs | 442 ++---- src/ef_ctrl/ef_if_ctrl_0.rs | 767 +++------- src/ef_ctrl/ef_if_cyc_0.rs | 222 +-- src/ef_ctrl/ef_if_cyc_1.rs | 222 +-- src/ef_ctrl/ef_if_sw_usage_0.rs | 53 +- src/ef_ctrl/ef_reserved.rs | 48 +- src/ef_ctrl/ef_sw_cfg_0.rs | 953 +++--------- src/ef_data_0.rs | 128 +- src/ef_data_0/ef_ana_trim_0.rs | 48 +- src/ef_data_0/ef_cfg_0.rs | 991 +++---------- src/ef_data_0/ef_data_0_lock.rs | 1078 +++----------- src/ef_data_0/ef_dbg_pwd_high.rs | 48 +- src/ef_data_0/ef_dbg_pwd_low.rs | 48 +- src/ef_data_0/ef_key_slot_0_w0.rs | 48 +- src/ef_data_0/ef_key_slot_0_w1.rs | 48 +- src/ef_data_0/ef_key_slot_0_w2.rs | 48 +- src/ef_data_0/ef_key_slot_0_w3.rs | 48 +- src/ef_data_0/ef_key_slot_1_w0.rs | 48 +- src/ef_data_0/ef_key_slot_1_w1.rs | 48 +- src/ef_data_0/ef_key_slot_1_w2.rs | 48 +- src/ef_data_0/ef_key_slot_1_w3.rs | 48 +- src/ef_data_0/ef_key_slot_2_w0.rs | 48 +- src/ef_data_0/ef_key_slot_2_w1.rs | 48 +- src/ef_data_0/ef_key_slot_2_w2.rs | 48 +- src/ef_data_0/ef_key_slot_2_w3.rs | 48 +- src/ef_data_0/ef_key_slot_3_w0.rs | 48 +- src/ef_data_0/ef_key_slot_3_w1.rs | 48 +- src/ef_data_0/ef_key_slot_3_w2.rs | 48 +- src/ef_data_0/ef_key_slot_3_w3.rs | 48 +- src/ef_data_0/ef_key_slot_4_w0.rs | 48 +- src/ef_data_0/ef_key_slot_4_w1.rs | 48 +- src/ef_data_0/ef_key_slot_4_w2.rs | 48 +- src/ef_data_0/ef_key_slot_4_w3.rs | 48 +- src/ef_data_0/ef_key_slot_5_w0.rs | 48 +- src/ef_data_0/ef_key_slot_5_w1.rs | 48 +- src/ef_data_0/ef_key_slot_5_w2.rs | 48 +- src/ef_data_0/ef_key_slot_5_w3.rs | 48 +- src/ef_data_0/ef_sw_usage_0.rs | 48 +- src/ef_data_0/ef_wifi_mac_high.rs | 48 +- src/ef_data_0/ef_wifi_mac_low.rs | 48 +- src/ef_data_1.rs | 100 +- src/ef_data_1/reg_data_1_lock.rs | 526 ++----- src/ef_data_1/reg_key_slot_10_w0.rs | 14 +- src/ef_data_1/reg_key_slot_10_w1.rs | 14 +- src/ef_data_1/reg_key_slot_10_w2.rs | 14 +- src/ef_data_1/reg_key_slot_10_w3.rs | 14 +- src/ef_data_1/reg_key_slot_11_w0.rs | 14 +- src/ef_data_1/reg_key_slot_11_w1.rs | 14 +- src/ef_data_1/reg_key_slot_11_w2.rs | 14 +- src/ef_data_1/reg_key_slot_11_w3.rs | 14 +- src/ef_data_1/reg_key_slot_6_w0.rs | 48 +- src/ef_data_1/reg_key_slot_6_w1.rs | 48 +- src/ef_data_1/reg_key_slot_6_w2.rs | 48 +- src/ef_data_1/reg_key_slot_6_w3.rs | 48 +- src/ef_data_1/reg_key_slot_7_w0.rs | 48 +- src/ef_data_1/reg_key_slot_7_w1.rs | 48 +- src/ef_data_1/reg_key_slot_7_w2.rs | 48 +- src/ef_data_1/reg_key_slot_7_w3.rs | 48 +- src/ef_data_1/reg_key_slot_8_w0.rs | 48 +- src/ef_data_1/reg_key_slot_8_w1.rs | 48 +- src/ef_data_1/reg_key_slot_8_w2.rs | 48 +- src/ef_data_1/reg_key_slot_8_w3.rs | 48 +- src/ef_data_1/reg_key_slot_9_w0.rs | 48 +- src/ef_data_1/reg_key_slot_9_w1.rs | 48 +- src/ef_data_1/reg_key_slot_9_w2.rs | 48 +- src/ef_data_1/reg_key_slot_9_w3.rs | 48 +- src/generic.rs | 426 +++++- src/glb.rs | 320 ++-- src/glb/bmx_cfg1.rs | 381 ++--- src/glb/bmx_cfg2.rs | 146 +- src/glb/bmx_dbg_out.rs | 24 +- src/glb/bmx_err_addr.rs | 24 +- src/glb/cgen_cfg0.rs | 45 +- src/glb/cgen_cfg1.rs | 92 +- src/glb/cgen_cfg2.rs | 114 +- src/glb/cgen_cfg3.rs | 14 +- src/glb/clk_cfg0.rs | 433 ++---- src/glb/clk_cfg1.rs | 190 +-- src/glb/clk_cfg2.rs | 443 ++---- src/glb/clk_cfg3.rs | 198 +-- src/glb/cpu_clk_cfg.rs | 212 +-- src/glb/dbg_sel_hh.rs | 48 +- src/glb/dbg_sel_hl.rs | 48 +- src/glb/dbg_sel_lh.rs | 48 +- src/glb/dbg_sel_ll.rs | 48 +- src/glb/debug.rs | 81 +- src/glb/dig32k_wakeup_ctrl.rs | 420 ++---- src/glb/glb_parm.rs | 895 +++-------- src/glb/gpadc_32m_src_ctrl.rs | 156 +- src/glb/gpdac_actrl.rs | 202 +-- src/glb/gpdac_bctrl.rs | 202 +-- src/glb/gpdac_ctrl.rs | 306 +--- src/glb/gpdac_data.rs | 94 +- src/glb/gpio_cfgctl0.rs | 1594 ++++++++------------ src/glb/gpio_cfgctl1.rs | 1568 ++++++++------------ src/glb/gpio_cfgctl10.rs | 1226 ++++++--------- src/glb/gpio_cfgctl11.rs | 941 ++++-------- src/glb/gpio_cfgctl12.rs | 844 ++++------- src/glb/gpio_cfgctl13.rs | 844 ++++------- src/glb/gpio_cfgctl14.rs | 417 ++---- src/glb/gpio_cfgctl2.rs | 1562 ++++++++------------ src/glb/gpio_cfgctl3.rs | 1200 ++++++--------- src/glb/gpio_cfgctl30.rs | 994 +++++-------- src/glb/gpio_cfgctl31.rs | 14 +- src/glb/gpio_cfgctl32.rs | 1957 ++++++++---------------- src/glb/gpio_cfgctl33.rs | 14 +- src/glb/gpio_cfgctl34.rs | 1957 ++++++++---------------- src/glb/gpio_cfgctl35.rs | 14 +- src/glb/gpio_cfgctl4.rs | 1220 ++++++--------- src/glb/gpio_cfgctl5.rs | 1226 ++++++--------- src/glb/gpio_cfgctl6.rs | 1226 ++++++--------- src/glb/gpio_cfgctl7.rs | 1226 ++++++--------- src/glb/gpio_cfgctl8.rs | 1250 ++++++---------- src/glb/gpio_cfgctl9.rs | 1226 ++++++--------- src/glb/gpio_int_clr1.rs | 2131 ++++++++------------------- src/glb/gpio_int_mask1.rs | 2131 ++++++++------------------- src/glb/gpio_int_mode_set1.rs | 1534 ++++++------------- src/glb/gpio_int_mode_set2.rs | 1574 +++++++------------- src/glb/gpio_int_mode_set3.rs | 1574 +++++++------------- src/glb/gpio_int_stat1.rs | 1052 +++++-------- src/glb/led_driver.rs | 307 +--- src/glb/mbist_ctl.rs | 326 +--- src/glb/mbist_stat.rs | 224 +-- src/glb/rsv0.rs | 47 +- src/glb/rsv1.rs | 47 +- src/glb/rsv2.rs | 47 +- src/glb/rsv3.rs | 47 +- src/glb/seam_misc.rs | 45 +- src/glb/sram_parm.rs | 48 +- src/glb/sram_ret.rs | 48 +- src/glb/sram_slp.rs | 48 +- src/glb/swrst_cfg0.rs | 220 +-- src/glb/swrst_cfg1.rs | 1298 ++++------------ src/glb/swrst_cfg2.rs | 263 +--- src/glb/swrst_cfg3.rs | 14 +- src/glb/tzc_glb_ctrl_0.rs | 312 +--- src/glb/tzc_glb_ctrl_1.rs | 708 ++------- src/glb/tzc_glb_ctrl_2.rs | 640 ++------ src/glb/tzc_glb_ctrl_3.rs | 14 +- src/glb/uart_sig_sel_0.rs | 358 ++--- src/glb/wifi_bt_coex_ctrl.rs | 203 +-- src/gpip.rs | 26 +- src/gpip/gpadc_config.rs | 654 ++------ src/gpip/gpadc_dma_rdata.rs | 46 +- src/gpip/gpdac_config.rs | 329 ++--- src/gpip/gpdac_dma_config.rs | 106 +- src/gpip/gpdac_dma_wdata.rs | 29 +- src/gpip/gpdac_tx_fifo_status.rs | 112 +- src/hbn.rs | 84 +- src/hbn/hbn_bor_cfg.rs | 187 +-- src/hbn/hbn_ctl.rs | 709 ++------- src/hbn/hbn_glb.rs | 329 ++--- src/hbn/hbn_irq_clr.rs | 29 +- src/hbn/hbn_irq_mode.rs | 437 ++---- src/hbn/hbn_irq_stat.rs | 24 +- src/hbn/hbn_pir_cfg.rs | 307 +--- src/hbn/hbn_pir_interval.rs | 46 +- src/hbn/hbn_pir_vth.rs | 46 +- src/hbn/hbn_rsv0.rs | 47 +- src/hbn/hbn_rsv1.rs | 47 +- src/hbn/hbn_rsv2.rs | 47 +- src/hbn/hbn_rsv3.rs | 47 +- src/hbn/hbn_sram.rs | 114 +- src/hbn/hbn_time_h.rs | 45 +- src/hbn/hbn_time_l.rs | 48 +- src/hbn/rc32k_ctrl0.rs | 406 ++--- src/hbn/rtc_time_h.rs | 57 +- src/hbn/rtc_time_l.rs | 24 +- src/hbn/xtal32k.rs | 499 ++----- src/i2c.rs | 46 +- src/i2c/i2c_bus_busy.rs | 82 +- src/i2c/i2c_config.rs | 447 ++---- src/i2c/i2c_fifo_config_0.rs | 312 +--- src/i2c/i2c_fifo_config_1.rs | 158 +- src/i2c/i2c_fifo_rdata.rs | 24 +- src/i2c/i2c_fifo_wdata.rs | 29 +- src/i2c/i2c_int_sts.rs | 1114 +++----------- src/i2c/i2c_prd_data.rs | 182 +-- src/i2c/i2c_prd_start.rs | 182 +-- src/i2c/i2c_prd_stop.rs | 182 +-- src/i2c/i2c_sub_addr.rs | 182 +-- src/ir.rs | 96 +- src/ir/irrx_config.rs | 251 +--- src/ir/irrx_data_count.rs | 51 +- src/ir/irrx_data_word0.rs | 53 +- src/ir/irrx_data_word1.rs | 53 +- src/ir/irrx_int_sts.rs | 188 +-- src/ir/irrx_pw_config.rs | 94 +- src/ir/irrx_swm_fifo_config_0.rs | 124 +- src/ir/irrx_swm_fifo_rdata.rs | 22 +- src/ir/irtx_config.rs | 637 ++------ src/ir/irtx_data_word0.rs | 48 +- src/ir/irtx_data_word1.rs | 48 +- src/ir/irtx_int_sts.rs | 188 +-- src/ir/irtx_pulse_width.rs | 134 +- src/ir/irtx_pw.rs | 358 ++--- src/ir/irtx_swm_pw_0.rs | 48 +- src/ir/irtx_swm_pw_1.rs | 48 +- src/ir/irtx_swm_pw_2.rs | 48 +- src/ir/irtx_swm_pw_3.rs | 48 +- src/ir/irtx_swm_pw_4.rs | 48 +- src/ir/irtx_swm_pw_5.rs | 48 +- src/ir/irtx_swm_pw_6.rs | 48 +- src/ir/irtx_swm_pw_7.rs | 48 +- src/l1c.rs | 42 +- src/l1c/cpu_clk_gate.rs | 166 +-- src/l1c/hit_cnt_lsb.rs | 24 +- src/l1c/hit_cnt_msb.rs | 24 +- src/l1c/irom1_misr_dataout_0.rs | 24 +- src/l1c/irom1_misr_dataout_1.rs | 14 +- src/l1c/l1c_bmx_err_addr.rs | 24 +- src/l1c/l1c_bmx_err_addr_en.rs | 148 +- src/l1c/l1c_config.rs | 638 ++------ src/l1c/l1c_range.rs | 14 +- src/l1c/miss_cnt.rs | 24 +- src/lib.rs | 34 +- src/pds.rs | 78 +- src/pds/clkpll_cp.rs | 309 +--- src/pds/clkpll_fbdv.rs | 96 +- src/pds/clkpll_output_en.rs | 548 ++----- src/pds/clkpll_rz.rs | 286 +--- src/pds/clkpll_sdm.rs | 202 +-- src/pds/clkpll_top_ctrl.rs | 292 +--- src/pds/clkpll_vco.rs | 105 +- src/pds/pds_ctl.rs | 1092 +++----------- src/pds/pds_ctl2.rs | 548 ++----- src/pds/pds_ctl3.rs | 437 ++---- src/pds/pds_ctl4.rs | 646 ++------ src/pds/pds_int.rs | 359 +---- src/pds/pds_ram1.rs | 46 +- src/pds/pds_stat.rs | 66 +- src/pds/pds_time1.rs | 48 +- src/pds/pu_rst_clkpll.rs | 594 ++------ src/pds/rc32m_ctrl0.rs | 469 ++---- src/pds/rc32m_ctrl1.rs | 317 +--- src/pwm.rs | 134 +- src/pwm/pwm0_clkdiv.rs | 46 +- src/pwm/pwm0_config.rs | 337 +---- src/pwm/pwm0_interrupt.rs | 106 +- src/pwm/pwm0_period.rs | 46 +- src/pwm/pwm0_thre1.rs | 46 +- src/pwm/pwm0_thre2.rs | 46 +- src/pwm/pwm1_clkdiv.rs | 46 +- src/pwm/pwm1_config.rs | 337 +---- src/pwm/pwm1_interrupt.rs | 106 +- src/pwm/pwm1_period.rs | 46 +- src/pwm/pwm1_thre1.rs | 46 +- src/pwm/pwm1_thre2.rs | 46 +- src/pwm/pwm2_clkdiv.rs | 46 +- src/pwm/pwm2_config.rs | 337 +---- src/pwm/pwm2_interrupt.rs | 106 +- src/pwm/pwm2_period.rs | 46 +- src/pwm/pwm2_thre1.rs | 46 +- src/pwm/pwm2_thre2.rs | 46 +- src/pwm/pwm3_clkdiv.rs | 46 +- src/pwm/pwm3_config.rs | 337 +---- src/pwm/pwm3_interrupt.rs | 106 +- src/pwm/pwm3_period.rs | 46 +- src/pwm/pwm3_thre1.rs | 46 +- src/pwm/pwm3_thre2.rs | 46 +- src/pwm/pwm4_clkdiv.rs | 46 +- src/pwm/pwm4_config.rs | 337 +---- src/pwm/pwm4_interrupt.rs | 106 +- src/pwm/pwm4_period.rs | 46 +- src/pwm/pwm4_thre1.rs | 46 +- src/pwm/pwm4_thre2.rs | 46 +- src/pwm/pwm_int_config.rs | 48 +- src/rf.rs | 612 ++++---- src/rf/adda1.rs | 384 ++--- src/rf/adda2.rs | 402 ++--- src/rf/adda_reg_ctrl_hw.rs | 96 +- src/rf/cip.rs | 94 +- src/rf/dfe_ctrl_0.rs | 298 +--- src/rf/dfe_ctrl_1.rs | 202 +-- src/rf/dfe_ctrl_10.rs | 94 +- src/rf/dfe_ctrl_11.rs | 94 +- src/rf/dfe_ctrl_12.rs | 182 +-- src/rf/dfe_ctrl_13.rs | 182 +-- src/rf/dfe_ctrl_14.rs | 182 +-- src/rf/dfe_ctrl_15.rs | 182 +-- src/rf/dfe_ctrl_16.rs | 360 ++--- src/rf/dfe_ctrl_17.rs | 360 ++--- src/rf/dfe_ctrl_18.rs | 134 +- src/rf/dfe_ctrl_2.rs | 308 +--- src/rf/dfe_ctrl_3.rs | 200 +-- src/rf/dfe_ctrl_4.rs | 202 +-- src/rf/dfe_ctrl_5.rs | 200 +-- src/rf/dfe_ctrl_6.rs | 252 +--- src/rf/dfe_ctrl_7.rs | 94 +- src/rf/dfe_ctrl_8.rs | 48 +- src/rf/dfe_ctrl_9.rs | 48 +- src/rf/fbdv.rs | 308 +--- src/rf/lna.rs | 303 +--- src/rf/lna_ctrl_hw_mux.rs | 182 +-- src/rf/lo.rs | 421 ++---- src/rf/lo_cal_ctrl_hw1.rs | 182 +-- src/rf/lo_cal_ctrl_hw10.rs | 182 +-- src/rf/lo_cal_ctrl_hw11.rs | 94 +- src/rf/lo_cal_ctrl_hw2.rs | 182 +-- src/rf/lo_cal_ctrl_hw3.rs | 182 +-- src/rf/lo_cal_ctrl_hw4.rs | 182 +-- src/rf/lo_cal_ctrl_hw5.rs | 182 +-- src/rf/lo_cal_ctrl_hw6.rs | 182 +-- src/rf/lo_cal_ctrl_hw7.rs | 182 +-- src/rf/lo_cal_ctrl_hw8.rs | 182 +-- src/rf/lo_cal_ctrl_hw9.rs | 182 +-- src/rf/lo_reg_ctrl_hw1.rs | 486 ++---- src/rf/lo_sdm_ctrl_hw1.rs | 624 +++----- src/rf/lo_sdm_ctrl_hw2.rs | 712 +++------ src/rf/lo_sdm_ctrl_hw3.rs | 712 +++------ src/rf/lo_sdm_ctrl_hw4.rs | 400 ++--- src/rf/lo_sdm_ctrl_hw5.rs | 94 +- src/rf/lo_sdm_ctrl_hw6.rs | 48 +- src/rf/lo_sdm_ctrl_hw7.rs | 48 +- src/rf/lo_sdm_ctrl_hw8.rs | 48 +- src/rf/lodist.rs | 411 ++---- src/rf/pa1.rs | 572 ++----- src/rf/pa2.rs | 296 +--- src/rf/pa_reg_ctrl_hw1.rs | 134 +- src/rf/pa_reg_ctrl_hw2.rs | 270 +--- src/rf/pa_reg_wifi_ctrl_hw.rs | 166 +-- src/rf/pfdcp.rs | 481 ++---- src/rf/pmip_mv2aon.rs | 14 +- src/rf/ppu_ctrl_hw.rs | 481 ++---- src/rf/pucr1.rs | 1298 ++++------------ src/rf/pucr1_hw.rs | 1192 ++++----------- src/rf/pucr2.rs | 14 +- src/rf/pucr2_hw.rs | 14 +- src/rf/pud_ctrl_hw.rs | 57 +- src/rf/rbb1.rs | 227 +-- src/rf/rbb2.rs | 178 +-- src/rf/rbb3.rs | 537 ++----- src/rf/rbb4.rs | 365 +---- src/rf/rbb_bw_ctrl_hw.rs | 58 +- src/rf/rbb_gain_index1.rs | 360 ++--- src/rf/rbb_gain_index2.rs | 360 ++--- src/rf/rbb_gain_index3.rs | 360 ++--- src/rf/rbb_gain_index4.rs | 360 ++--- src/rf/rbb_gain_index5.rs | 96 +- src/rf/rf_base_ctrl1.rs | 312 ++-- src/rf/rf_base_ctrl2.rs | 14 +- src/rf/rf_data_temp_0.rs | 48 +- src/rf/rf_data_temp_1.rs | 48 +- src/rf/rf_data_temp_2.rs | 48 +- src/rf/rf_data_temp_3.rs | 48 +- src/rf/rf_fsm_ctrl0.rs | 46 +- src/rf/rf_fsm_ctrl1.rs | 309 +--- src/rf/rf_fsm_ctrl2.rs | 352 ++--- src/rf/rf_fsm_ctrl_hw.rs | 497 ++----- src/rf/rf_fsm_ctrl_sw.rs | 262 +--- src/rf/rf_ical_ctrl0.rs | 242 +-- src/rf/rf_ical_ctrl1.rs | 134 +- src/rf/rf_ical_ctrl2.rs | 46 +- src/rf/rf_pkdet_ctrl0.rs | 156 +- src/rf/rf_resv_reg_0.rs | 48 +- src/rf/rf_resv_reg_1.rs | 48 +- src/rf/rf_resv_reg_2.rs | 48 +- src/rf/rf_rev.rs | 131 +- src/rf/rf_sram_ctrl0.rs | 203 +-- src/rf/rf_sram_ctrl1.rs | 263 +--- src/rf/rf_sram_ctrl2.rs | 94 +- src/rf/rf_sram_ctrl3.rs | 48 +- src/rf/rf_sram_ctrl4.rs | 263 +--- src/rf/rf_sram_ctrl5.rs | 94 +- src/rf/rf_sram_ctrl6.rs | 48 +- src/rf/rfcal_ctrlen.rs | 963 +++--------- src/rf/rfcal_stateen.rs | 957 +++--------- src/rf/rfcal_status.rs | 712 +++------ src/rf/rfcal_status2.rs | 48 +- src/rf/rfctrl_hw_en.rs | 697 ++------- src/rf/rfif_dfe_ctrl0.rs | 1032 +++---------- src/rf/rfif_dig_ctrl.rs | 362 ++--- src/rf/rfif_test_read.rs | 48 +- src/rf/rmxgm.rs | 143 +- src/rf/rosdac_ctrl_hw1.rs | 182 +-- src/rf/rosdac_ctrl_hw2.rs | 182 +-- src/rf/rrf_gain_index1.rs | 536 ++----- src/rf/rrf_gain_index2.rs | 272 +--- src/rf/rxiq_ctrl_hw1.rs | 94 +- src/rf/rxiq_ctrl_hw2.rs | 94 +- src/rf/rxiq_ctrl_hw3.rs | 94 +- src/rf/rxiq_ctrl_hw4.rs | 94 +- src/rf/saradc_resv.rs | 14 +- src/rf/sdm1.rs | 357 ++--- src/rf/sdm2.rs | 47 +- src/rf/sdm3.rs | 47 +- src/rf/singen_ctrl0.rs | 243 +-- src/rf/singen_ctrl1.rs | 182 +-- src/rf/singen_ctrl2.rs | 134 +- src/rf/singen_ctrl3.rs | 134 +- src/rf/singen_ctrl4.rs | 200 +-- src/rf/tbb.rs | 370 ++--- src/rf/tbb_gain_index1.rs | 358 ++--- src/rf/tbb_gain_index2.rs | 358 ++--- src/rf/tbb_gain_index3.rs | 358 ++--- src/rf/tbb_gain_index4.rs | 358 ++--- src/rf/temp_comp.rs | 141 +- src/rf/ten_ac.rs | 633 ++------ src/rf/ten_dc.rs | 1058 +++---------- src/rf/ten_dig.rs | 539 ++----- src/rf/tmx.rs | 229 +-- src/rf/tosdac_ctrl_hw1.rs | 182 +-- src/rf/tosdac_ctrl_hw2.rs | 182 +-- src/rf/tosdac_ctrl_hw3.rs | 182 +-- src/rf/tosdac_ctrl_hw4.rs | 182 +-- src/rf/trx_gain1.rs | 306 +--- src/rf/trx_gain_hw.rs | 309 ++-- src/rf/tx_iq_gain_hw0.rs | 94 +- src/rf/tx_iq_gain_hw1.rs | 94 +- src/rf/tx_iq_gain_hw2.rs | 94 +- src/rf/tx_iq_gain_hw3.rs | 94 +- src/rf/tx_iq_gain_hw4.rs | 94 +- src/rf/tx_iq_gain_hw5.rs | 94 +- src/rf/tx_iq_gain_hw6.rs | 94 +- src/rf/tx_iq_gain_hw7.rs | 94 +- src/rf/vco1.rs | 180 +-- src/rf/vco2.rs | 357 ++--- src/rf/vco3.rs | 92 +- src/rf/vco4.rs | 260 +--- src/sec_dbg.rs | 32 +- src/sec_dbg/sd_chip_id_high.rs | 24 +- src/sec_dbg/sd_chip_id_low.rs | 24 +- src/sec_dbg/sd_dbg_pwd_high.rs | 48 +- src/sec_dbg/sd_dbg_pwd_low.rs | 48 +- src/sec_dbg/sd_dbg_reserved.rs | 48 +- src/sec_dbg/sd_status.rs | 251 +--- src/sec_dbg/sd_wifi_mac_high.rs | 24 +- src/sec_dbg/sd_wifi_mac_low.rs | 24 +- src/sec_eng.rs | 342 ++--- src/sec_eng/se_aes_0_ctrl.rs | 719 +++------ src/sec_eng/se_aes_0_ctrl_prot.rs | 166 +-- src/sec_eng/se_aes_0_endian.rs | 264 +--- src/sec_eng/se_aes_0_iv_0.rs | 48 +- src/sec_eng/se_aes_0_iv_1.rs | 48 +- src/sec_eng/se_aes_0_iv_2.rs | 48 +- src/sec_eng/se_aes_0_iv_3.rs | 48 +- src/sec_eng/se_aes_0_key_0.rs | 48 +- src/sec_eng/se_aes_0_key_1.rs | 48 +- src/sec_eng/se_aes_0_key_2.rs | 48 +- src/sec_eng/se_aes_0_key_3.rs | 48 +- src/sec_eng/se_aes_0_key_4.rs | 48 +- src/sec_eng/se_aes_0_key_5.rs | 48 +- src/sec_eng/se_aes_0_key_6.rs | 48 +- src/sec_eng/se_aes_0_key_7.rs | 48 +- src/sec_eng/se_aes_0_key_sel_0.rs | 48 +- src/sec_eng/se_aes_0_key_sel_1.rs | 48 +- src/sec_eng/se_aes_0_link.rs | 48 +- src/sec_eng/se_aes_0_mda.rs | 48 +- src/sec_eng/se_aes_0_msa.rs | 48 +- src/sec_eng/se_aes_0_sboot.rs | 58 +- src/sec_eng/se_aes_0_status.rs | 24 +- src/sec_eng/se_cdet_0_ctrl_0.rs | 188 +-- src/sec_eng/se_cdet_0_ctrl_1.rs | 134 +- src/sec_eng/se_cdet_0_ctrl_prot.rs | 166 +-- src/sec_eng/se_ctrl_prot_rd.rs | 420 ++---- src/sec_eng/se_ctrl_reserved_0.rs | 48 +- src/sec_eng/se_ctrl_reserved_1.rs | 48 +- src/sec_eng/se_ctrl_reserved_2.rs | 48 +- src/sec_eng/se_gmac_0_ctrl_0.rs | 484 ++---- src/sec_eng/se_gmac_0_ctrl_prot.rs | 166 +-- src/sec_eng/se_gmac_0_lca.rs | 48 +- src/sec_eng/se_gmac_0_status.rs | 24 +- src/sec_eng/se_pka_0_ctrl_0.rs | 567 ++----- src/sec_eng/se_pka_0_ctrl_1.rs | 106 +- src/sec_eng/se_pka_0_ctrl_prot.rs | 166 +-- src/sec_eng/se_pka_0_rw.rs | 14 +- src/sec_eng/se_pka_0_rw_burst.rs | 14 +- src/sec_eng/se_pka_0_seed.rs | 48 +- src/sec_eng/se_sha_0_ctrl.rs | 513 ++----- src/sec_eng/se_sha_0_ctrl_prot.rs | 166 +-- src/sec_eng/se_sha_0_endian.rs | 58 +- src/sec_eng/se_sha_0_hash_h_0.rs | 24 +- src/sec_eng/se_sha_0_hash_h_1.rs | 24 +- src/sec_eng/se_sha_0_hash_h_2.rs | 24 +- src/sec_eng/se_sha_0_hash_h_3.rs | 24 +- src/sec_eng/se_sha_0_hash_h_4.rs | 24 +- src/sec_eng/se_sha_0_hash_h_5.rs | 24 +- src/sec_eng/se_sha_0_hash_h_6.rs | 24 +- src/sec_eng/se_sha_0_hash_h_7.rs | 24 +- src/sec_eng/se_sha_0_hash_l_0.rs | 24 +- src/sec_eng/se_sha_0_hash_l_1.rs | 24 +- src/sec_eng/se_sha_0_hash_l_2.rs | 24 +- src/sec_eng/se_sha_0_hash_l_3.rs | 24 +- src/sec_eng/se_sha_0_hash_l_4.rs | 24 +- src/sec_eng/se_sha_0_hash_l_5.rs | 24 +- src/sec_eng/se_sha_0_hash_l_6.rs | 24 +- src/sec_eng/se_sha_0_hash_l_7.rs | 24 +- src/sec_eng/se_sha_0_link.rs | 48 +- src/sec_eng/se_sha_0_msa.rs | 48 +- src/sec_eng/se_sha_0_status.rs | 24 +- src/sec_eng/se_trng_0_ctrl_0.rs | 558 ++----- src/sec_eng/se_trng_0_ctrl_1.rs | 48 +- src/sec_eng/se_trng_0_ctrl_2.rs | 46 +- src/sec_eng/se_trng_0_ctrl_3.rs | 242 +-- src/sec_eng/se_trng_0_ctrl_prot.rs | 166 +-- src/sec_eng/se_trng_0_dout_0.rs | 24 +- src/sec_eng/se_trng_0_dout_1.rs | 24 +- src/sec_eng/se_trng_0_dout_2.rs | 24 +- src/sec_eng/se_trng_0_dout_3.rs | 24 +- src/sec_eng/se_trng_0_dout_4.rs | 24 +- src/sec_eng/se_trng_0_dout_5.rs | 24 +- src/sec_eng/se_trng_0_dout_6.rs | 24 +- src/sec_eng/se_trng_0_dout_7.rs | 24 +- src/sec_eng/se_trng_0_status.rs | 24 +- src/sec_eng/se_trng_0_test.rs | 264 +--- src/sec_eng/se_trng_0_test_out_0.rs | 24 +- src/sec_eng/se_trng_0_test_out_1.rs | 24 +- src/sec_eng/se_trng_0_test_out_2.rs | 24 +- src/sec_eng/se_trng_0_test_out_3.rs | 24 +- src/sf_ctrl.rs | 320 ++-- src/sf_ctrl/sf2_if_io_dly_0.rs | 224 +-- src/sf_ctrl/sf2_if_io_dly_1.rs | 136 +- src/sf_ctrl/sf2_if_io_dly_2.rs | 136 +- src/sf_ctrl/sf2_if_io_dly_3.rs | 136 +- src/sf_ctrl/sf2_if_io_dly_4.rs | 136 +- src/sf_ctrl/sf3_if_io_dly_0.rs | 224 +-- src/sf_ctrl/sf3_if_io_dly_1.rs | 136 +- src/sf_ctrl/sf3_if_io_dly_2.rs | 136 +- src/sf_ctrl/sf3_if_io_dly_3.rs | 136 +- src/sf_ctrl/sf3_if_io_dly_4.rs | 136 +- src/sf_ctrl/sf_aes.rs | 197 +-- src/sf_ctrl/sf_aes_cfg_r0.rs | 254 +--- src/sf_ctrl/sf_aes_iv_r0_w0.rs | 48 +- src/sf_ctrl/sf_aes_iv_r0_w1.rs | 48 +- src/sf_ctrl/sf_aes_iv_r0_w2.rs | 48 +- src/sf_ctrl/sf_aes_iv_r0_w3.rs | 48 +- src/sf_ctrl/sf_aes_iv_r1_w0.rs | 48 +- src/sf_ctrl/sf_aes_iv_r1_w1.rs | 48 +- src/sf_ctrl/sf_aes_iv_r1_w2.rs | 48 +- src/sf_ctrl/sf_aes_iv_r1_w3.rs | 48 +- src/sf_ctrl/sf_aes_iv_r2_w0.rs | 48 +- src/sf_ctrl/sf_aes_iv_r2_w1.rs | 48 +- src/sf_ctrl/sf_aes_iv_r2_w2.rs | 48 +- src/sf_ctrl/sf_aes_iv_r2_w3.rs | 48 +- src/sf_ctrl/sf_aes_key_r0_0.rs | 48 +- src/sf_ctrl/sf_aes_key_r0_1.rs | 48 +- src/sf_ctrl/sf_aes_key_r0_2.rs | 48 +- src/sf_ctrl/sf_aes_key_r0_3.rs | 48 +- src/sf_ctrl/sf_aes_key_r0_4.rs | 48 +- src/sf_ctrl/sf_aes_key_r0_5.rs | 48 +- src/sf_ctrl/sf_aes_key_r0_6.rs | 48 +- src/sf_ctrl/sf_aes_key_r0_7.rs | 48 +- src/sf_ctrl/sf_aes_key_r1_0.rs | 48 +- src/sf_ctrl/sf_aes_key_r1_1.rs | 48 +- src/sf_ctrl/sf_aes_key_r1_2.rs | 48 +- src/sf_ctrl/sf_aes_key_r1_3.rs | 48 +- src/sf_ctrl/sf_aes_key_r1_4.rs | 48 +- src/sf_ctrl/sf_aes_key_r1_5.rs | 48 +- src/sf_ctrl/sf_aes_key_r1_6.rs | 48 +- src/sf_ctrl/sf_aes_key_r1_7.rs | 48 +- src/sf_ctrl/sf_aes_key_r2_0.rs | 48 +- src/sf_ctrl/sf_aes_key_r2_1.rs | 48 +- src/sf_ctrl/sf_aes_key_r2_2.rs | 48 +- src/sf_ctrl/sf_aes_key_r2_3.rs | 48 +- src/sf_ctrl/sf_aes_key_r2_4.rs | 48 +- src/sf_ctrl/sf_aes_key_r2_5.rs | 48 +- src/sf_ctrl/sf_aes_key_r2_6.rs | 48 +- src/sf_ctrl/sf_aes_key_r2_7.rs | 48 +- src/sf_ctrl/sf_aes_r1.rs | 252 +--- src/sf_ctrl/sf_aes_r2.rs | 252 +--- src/sf_ctrl/sf_ahb2sif_status.rs | 24 +- src/sf_ctrl/sf_ctrl_0.rs | 753 +++------- src/sf_ctrl/sf_ctrl_1.rs | 661 ++------- src/sf_ctrl/sf_ctrl_2.rs | 211 +-- src/sf_ctrl/sf_ctrl_3.rs | 348 ++--- src/sf_ctrl/sf_ctrl_prot_en.rs | 166 +-- src/sf_ctrl/sf_ctrl_prot_en_rd.rs | 112 +- src/sf_ctrl/sf_id0_offset.rs | 48 +- src/sf_ctrl/sf_id1_offset.rs | 48 +- src/sf_ctrl/sf_if_iahb_0.rs | 503 ++----- src/sf_ctrl/sf_if_iahb_1.rs | 48 +- src/sf_ctrl/sf_if_iahb_2.rs | 48 +- src/sf_ctrl/sf_if_iahb_3.rs | 503 ++----- src/sf_ctrl/sf_if_iahb_4.rs | 48 +- src/sf_ctrl/sf_if_iahb_5.rs | 48 +- src/sf_ctrl/sf_if_iahb_6.rs | 146 +- src/sf_ctrl/sf_if_iahb_7.rs | 48 +- src/sf_ctrl/sf_if_io_dly_0.rs | 224 +-- src/sf_ctrl/sf_if_io_dly_1.rs | 136 +- src/sf_ctrl/sf_if_io_dly_2.rs | 136 +- src/sf_ctrl/sf_if_io_dly_3.rs | 136 +- src/sf_ctrl/sf_if_io_dly_4.rs | 136 +- src/sf_ctrl/sf_if_sahb_0.rs | 620 ++------ src/sf_ctrl/sf_if_sahb_1.rs | 48 +- src/sf_ctrl/sf_if_sahb_2.rs | 48 +- src/sf_ctrl/sf_if_status_0.rs | 24 +- src/sf_ctrl/sf_if_status_1.rs | 24 +- src/sf_ctrl/sf_reserved.rs | 48 +- src/spi.rs | 48 +- src/spi/spi_bus_busy.rs | 24 +- src/spi/spi_config.rs | 570 ++----- src/spi/spi_fifo_config_0.rs | 312 +--- src/spi/spi_fifo_config_1.rs | 140 +- src/spi/spi_fifo_rdata.rs | 24 +- src/spi/spi_fifo_wdata.rs | 29 +- src/spi/spi_int_sts.rs | 1114 +++----------- src/spi/spi_prd_0.rs | 182 +-- src/spi/spi_prd_1.rs | 46 +- src/spi/spi_rxd_ignr.rs | 94 +- src/spi/spi_sto_value.rs | 46 +- src/timer.rs | 164 +-- src/timer/tccr.rs | 239 +-- src/timer/tcdr.rs | 131 +- src/timer/tcer.rs | 114 +- src/timer/tcmr.rs | 114 +- src/timer/tcr2.rs | 24 +- src/timer/tcr3.rs | 24 +- src/timer/tcvsyn2.rs | 24 +- src/timer/tcvsyn3.rs | 24 +- src/timer/tcvwr2.rs | 24 +- src/timer/tcvwr3.rs | 24 +- src/timer/ticr2.rs | 100 +- src/timer/ticr3.rs | 100 +- src/timer/tier2.rs | 163 +- src/timer/tier3.rs | 163 +- src/timer/tilr2.rs | 163 +- src/timer/tilr3.rs | 163 +- src/timer/tmr2_0.rs | 47 +- src/timer/tmr2_1.rs | 47 +- src/timer/tmr2_2.rs | 47 +- src/timer/tmr3_0.rs | 47 +- src/timer/tmr3_1.rs | 47 +- src/timer/tmr3_2.rs | 47 +- src/timer/tmsr2.rs | 68 +- src/timer/tmsr3.rs | 68 +- src/timer/tplcr2.rs | 47 +- src/timer/tplcr3.rs | 47 +- src/timer/tplvr2.rs | 47 +- src/timer/tplvr3.rs | 47 +- src/timer/wcr.rs | 38 +- src/timer/wfar.rs | 28 +- src/timer/wicr.rs | 38 +- src/timer/wmer.rs | 114 +- src/timer/wmr.rs | 45 +- src/timer/wsar.rs | 28 +- src/timer/wsr.rs | 57 +- src/timer/wvr.rs | 22 +- src/tzc_nsec.rs | 22 +- src/tzc_nsec/tzc_rom0_r0.rs | 46 +- src/tzc_nsec/tzc_rom0_r1.rs | 46 +- src/tzc_nsec/tzc_rom1_r0.rs | 46 +- src/tzc_nsec/tzc_rom1_r1.rs | 46 +- src/tzc_nsec/tzc_rom_ctrl.rs | 376 ++--- src/tzc_sec.rs | 22 +- src/tzc_sec/tzc_rom0_r0.rs | 94 +- src/tzc_sec/tzc_rom0_r1.rs | 94 +- src/tzc_sec/tzc_rom1_r0.rs | 94 +- src/tzc_sec/tzc_rom1_r1.rs | 94 +- src/tzc_sec/tzc_rom_ctrl.rs | 908 +++--------- src/uart.rs | 72 +- src/uart/data_config.rs | 57 +- src/uart/sts_urx_abr_prd.rs | 46 +- src/uart/uart_bit_prd.rs | 94 +- src/uart/uart_fifo_config_0.rs | 312 +--- src/uart/uart_fifo_config_1.rs | 138 +- src/uart/uart_fifo_rdata.rs | 22 +- src/uart/uart_fifo_wdata.rs | 29 +- src/uart/uart_int_clear.rs | 436 ++---- src/uart/uart_int_en.rs | 432 ++---- src/uart/uart_int_mask.rs | 440 ++---- src/uart/uart_int_sts.rs | 180 +-- src/uart/uart_status.rs | 48 +- src/uart/urx_config.rs | 616 ++------ src/uart/urx_ir_position.rs | 46 +- src/uart/urx_rto_timer.rs | 46 +- src/uart/utx_config.rs | 509 ++----- src/uart/utx_ir_position.rs | 94 +- 751 files changed, 44321 insertions(+), 113757 deletions(-) diff --git a/src/aon.rs b/src/aon.rs index 60b48f1..272e634 100644 --- a/src/aon.rs +++ b/src/aon.rs @@ -2,174 +2,174 @@ #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - aon."] - pub aon: crate::Reg, + pub aon: AON, #[doc = "0x04 - aon_common."] - pub aon_common: crate::Reg, + pub aon_common: AON_COMMON, #[doc = "0x08 - aon_misc."] - pub aon_misc: crate::Reg, - _reserved3: [u8; 4usize], + pub aon_misc: AON_MISC, + _reserved3: [u8; 0x04], #[doc = "0x10 - bg_sys_top."] - pub bg_sys_top: crate::Reg, + pub bg_sys_top: BG_SYS_TOP, #[doc = "0x14 - dcdc18_top_0."] - pub dcdc18_top_0: crate::Reg, + pub dcdc18_top_0: DCDC18_TOP_0, #[doc = "0x18 - dcdc18_top_1."] - pub dcdc18_top_1: crate::Reg, + pub dcdc18_top_1: DCDC18_TOP_1, #[doc = "0x1c - ldo11soc_and_dctest."] - pub ldo11soc_and_dctest: crate::Reg, + pub ldo11soc_and_dctest: LDO11SOC_AND_DCTEST, #[doc = "0x20 - psw_irrcv."] - pub psw_irrcv: crate::Reg, - _reserved8: [u8; 92usize], + pub psw_irrcv: PSW_IRRCV, + _reserved8: [u8; 0x5c], #[doc = "0x80 - rf_top_aon."] - pub rf_top_aon: crate::Reg, + pub rf_top_aon: RF_TOP_AON, #[doc = "0x84 - xtal_cfg."] - pub xtal_cfg: crate::Reg, + pub xtal_cfg: XTAL_CFG, #[doc = "0x88 - tsen."] - pub tsen: crate::Reg, - _reserved11: [u8; 116usize], + pub tsen: TSEN, + _reserved11: [u8; 0x74], #[doc = "0x100 - acomp0_ctrl."] - pub acomp0_ctrl: crate::Reg, + pub acomp0_ctrl: ACOMP0_CTRL, #[doc = "0x104 - acomp1_ctrl."] - pub acomp1_ctrl: crate::Reg, + pub acomp1_ctrl: ACOMP1_CTRL, #[doc = "0x108 - acomp_ctrl."] - pub acomp_ctrl: crate::Reg, + pub acomp_ctrl: ACOMP_CTRL, #[doc = "0x10c - gpadc_reg_cmd."] - pub gpadc_reg_cmd: crate::Reg, + pub gpadc_reg_cmd: GPADC_REG_CMD, #[doc = "0x110 - gpadc_reg_config1."] - pub gpadc_reg_config1: crate::Reg, + pub gpadc_reg_config1: GPADC_REG_CONFIG1, #[doc = "0x114 - gpadc_reg_config2."] - pub gpadc_reg_config2: crate::Reg, + pub gpadc_reg_config2: GPADC_REG_CONFIG2, #[doc = "0x118 - adc converation sequence 1"] - pub gpadc_reg_scn_pos1: crate::Reg, + pub gpadc_reg_scn_pos1: GPADC_REG_SCN_POS1, #[doc = "0x11c - adc converation sequence 2"] - pub gpadc_reg_scn_pos2: crate::Reg, + pub gpadc_reg_scn_pos2: GPADC_REG_SCN_POS2, #[doc = "0x120 - adc converation sequence 3"] - pub gpadc_reg_scn_neg1: crate::Reg, + pub gpadc_reg_scn_neg1: GPADC_REG_SCN_NEG1, #[doc = "0x124 - adc converation sequence 4"] - pub gpadc_reg_scn_neg2: crate::Reg, + pub gpadc_reg_scn_neg2: GPADC_REG_SCN_NEG2, #[doc = "0x128 - gpadc_reg_status."] - pub gpadc_reg_status: crate::Reg, + pub gpadc_reg_status: GPADC_REG_STATUS, #[doc = "0x12c - gpadc_reg_isr."] - pub gpadc_reg_isr: crate::Reg, + pub gpadc_reg_isr: GPADC_REG_ISR, #[doc = "0x130 - gpadc_reg_result."] - pub gpadc_reg_result: crate::Reg, + pub gpadc_reg_result: GPADC_REG_RESULT, #[doc = "0x134 - gpadc_reg_raw_result."] - pub gpadc_reg_raw_result: crate::Reg, + pub gpadc_reg_raw_result: GPADC_REG_RAW_RESULT, #[doc = "0x138 - gpadc_reg_define."] - pub gpadc_reg_define: crate::Reg, + pub gpadc_reg_define: GPADC_REG_DEFINE, #[doc = "0x13c - hbncore_resv0."] - pub hbncore_resv0: crate::Reg, + pub hbncore_resv0: HBNCORE_RESV0, #[doc = "0x140 - hbncore_resv1."] - pub hbncore_resv1: crate::Reg, + pub hbncore_resv1: HBNCORE_RESV1, } -#[doc = "aon register accessor: an alias for `Reg`"] +#[doc = "aon (rw) register accessor: an alias for `Reg`"] pub type AON = crate::Reg; #[doc = "aon."] pub mod aon; -#[doc = "aon_common register accessor: an alias for `Reg`"] +#[doc = "aon_common (rw) register accessor: an alias for `Reg`"] pub type AON_COMMON = crate::Reg; #[doc = "aon_common."] pub mod aon_common; -#[doc = "aon_misc register accessor: an alias for `Reg`"] +#[doc = "aon_misc (rw) register accessor: an alias for `Reg`"] pub type AON_MISC = crate::Reg; #[doc = "aon_misc."] pub mod aon_misc; -#[doc = "bg_sys_top register accessor: an alias for `Reg`"] +#[doc = "bg_sys_top (rw) register accessor: an alias for `Reg`"] pub type BG_SYS_TOP = crate::Reg; #[doc = "bg_sys_top."] pub mod bg_sys_top; -#[doc = "dcdc18_top_0 register accessor: an alias for `Reg`"] +#[doc = "dcdc18_top_0 (rw) register accessor: an alias for `Reg`"] pub type DCDC18_TOP_0 = crate::Reg; #[doc = "dcdc18_top_0."] pub mod dcdc18_top_0; -#[doc = "dcdc18_top_1 register accessor: an alias for `Reg`"] +#[doc = "dcdc18_top_1 (rw) register accessor: an alias for `Reg`"] pub type DCDC18_TOP_1 = crate::Reg; #[doc = "dcdc18_top_1."] pub mod dcdc18_top_1; -#[doc = "ldo11soc_and_dctest register accessor: an alias for `Reg`"] +#[doc = "ldo11soc_and_dctest (rw) register accessor: an alias for `Reg`"] pub type LDO11SOC_AND_DCTEST = crate::Reg; #[doc = "ldo11soc_and_dctest."] pub mod ldo11soc_and_dctest; -#[doc = "psw_irrcv register accessor: an alias for `Reg`"] +#[doc = "psw_irrcv (rw) register accessor: an alias for `Reg`"] pub type PSW_IRRCV = crate::Reg; #[doc = "psw_irrcv."] pub mod psw_irrcv; -#[doc = "rf_top_aon register accessor: an alias for `Reg`"] +#[doc = "rf_top_aon (rw) register accessor: an alias for `Reg`"] pub type RF_TOP_AON = crate::Reg; #[doc = "rf_top_aon."] pub mod rf_top_aon; -#[doc = "xtal_cfg register accessor: an alias for `Reg`"] +#[doc = "xtal_cfg (rw) register accessor: an alias for `Reg`"] pub type XTAL_CFG = crate::Reg; #[doc = "xtal_cfg."] pub mod xtal_cfg; -#[doc = "tsen register accessor: an alias for `Reg`"] +#[doc = "tsen (rw) register accessor: an alias for `Reg`"] pub type TSEN = crate::Reg; #[doc = "tsen."] pub mod tsen; -#[doc = "acomp0_ctrl register accessor: an alias for `Reg`"] +#[doc = "acomp0_ctrl (rw) register accessor: an alias for `Reg`"] pub type ACOMP0_CTRL = crate::Reg; #[doc = "acomp0_ctrl."] pub mod acomp0_ctrl; -#[doc = "acomp1_ctrl register accessor: an alias for `Reg`"] +#[doc = "acomp1_ctrl (rw) register accessor: an alias for `Reg`"] pub type ACOMP1_CTRL = crate::Reg; #[doc = "acomp1_ctrl."] pub mod acomp1_ctrl; -#[doc = "acomp_ctrl register accessor: an alias for `Reg`"] +#[doc = "acomp_ctrl (rw) register accessor: an alias for `Reg`"] pub type ACOMP_CTRL = crate::Reg; #[doc = "acomp_ctrl."] pub mod acomp_ctrl; -#[doc = "gpadc_reg_cmd register accessor: an alias for `Reg`"] +#[doc = "gpadc_reg_cmd (rw) register accessor: an alias for `Reg`"] pub type GPADC_REG_CMD = crate::Reg; #[doc = "gpadc_reg_cmd."] pub mod gpadc_reg_cmd; -#[doc = "gpadc_reg_config1 register accessor: an alias for `Reg`"] +#[doc = "gpadc_reg_config1 (rw) register accessor: an alias for `Reg`"] pub type GPADC_REG_CONFIG1 = crate::Reg; #[doc = "gpadc_reg_config1."] pub mod gpadc_reg_config1; -#[doc = "gpadc_reg_config2 register accessor: an alias for `Reg`"] +#[doc = "gpadc_reg_config2 (rw) register accessor: an alias for `Reg`"] pub type GPADC_REG_CONFIG2 = crate::Reg; #[doc = "gpadc_reg_config2."] pub mod gpadc_reg_config2; -#[doc = "gpadc_reg_scn_pos1 register accessor: an alias for `Reg`"] +#[doc = "gpadc_reg_scn_pos1 (rw) register accessor: an alias for `Reg`"] pub type GPADC_REG_SCN_POS1 = crate::Reg; #[doc = "adc converation sequence 1"] pub mod gpadc_reg_scn_pos1; -#[doc = "gpadc_reg_scn_pos2 register accessor: an alias for `Reg`"] +#[doc = "gpadc_reg_scn_pos2 (rw) register accessor: an alias for `Reg`"] pub type GPADC_REG_SCN_POS2 = crate::Reg; #[doc = "adc converation sequence 2"] pub mod gpadc_reg_scn_pos2; -#[doc = "gpadc_reg_scn_neg1 register accessor: an alias for `Reg`"] +#[doc = "gpadc_reg_scn_neg1 (rw) register accessor: an alias for `Reg`"] pub type GPADC_REG_SCN_NEG1 = crate::Reg; #[doc = "adc converation sequence 3"] pub mod gpadc_reg_scn_neg1; -#[doc = "gpadc_reg_scn_neg2 register accessor: an alias for `Reg`"] +#[doc = "gpadc_reg_scn_neg2 (rw) register accessor: an alias for `Reg`"] pub type GPADC_REG_SCN_NEG2 = crate::Reg; #[doc = "adc converation sequence 4"] pub mod gpadc_reg_scn_neg2; -#[doc = "gpadc_reg_status register accessor: an alias for `Reg`"] +#[doc = "gpadc_reg_status (rw) register accessor: an alias for `Reg`"] pub type GPADC_REG_STATUS = crate::Reg; #[doc = "gpadc_reg_status."] pub mod gpadc_reg_status; -#[doc = "gpadc_reg_isr register accessor: an alias for `Reg`"] +#[doc = "gpadc_reg_isr (rw) register accessor: an alias for `Reg`"] pub type GPADC_REG_ISR = crate::Reg; #[doc = "gpadc_reg_isr."] pub mod gpadc_reg_isr; -#[doc = "gpadc_reg_result register accessor: an alias for `Reg`"] +#[doc = "gpadc_reg_result (rw) register accessor: an alias for `Reg`"] pub type GPADC_REG_RESULT = crate::Reg; #[doc = "gpadc_reg_result."] pub mod gpadc_reg_result; -#[doc = "gpadc_reg_raw_result register accessor: an alias for `Reg`"] +#[doc = "gpadc_reg_raw_result (rw) register accessor: an alias for `Reg`"] pub type GPADC_REG_RAW_RESULT = crate::Reg; #[doc = "gpadc_reg_raw_result."] pub mod gpadc_reg_raw_result; -#[doc = "gpadc_reg_define register accessor: an alias for `Reg`"] +#[doc = "gpadc_reg_define (rw) register accessor: an alias for `Reg`"] pub type GPADC_REG_DEFINE = crate::Reg; #[doc = "gpadc_reg_define."] pub mod gpadc_reg_define; -#[doc = "hbncore_resv0 register accessor: an alias for `Reg`"] +#[doc = "hbncore_resv0 (rw) register accessor: an alias for `Reg`"] pub type HBNCORE_RESV0 = crate::Reg; #[doc = "hbncore_resv0."] pub mod hbncore_resv0; -#[doc = "hbncore_resv1 register accessor: an alias for `Reg`"] +#[doc = "hbncore_resv1 (rw) register accessor: an alias for `Reg`"] pub type HBNCORE_RESV1 = crate::Reg; #[doc = "hbncore_resv1."] pub mod hbncore_resv1; diff --git a/src/aon/acomp0_ctrl.rs b/src/aon/acomp0_ctrl.rs index 1390fb8..6292050 100644 --- a/src/aon/acomp0_ctrl.rs +++ b/src/aon/acomp0_ctrl.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,323 +28,143 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `acomp0_muxen` reader - "] -pub struct ACOMP0_MUXEN_R(crate::FieldReader); -impl ACOMP0_MUXEN_R { - pub(crate) fn new(bits: bool) -> Self { - ACOMP0_MUXEN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ACOMP0_MUXEN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `acomp0_muxen` writer - "] -pub struct ACOMP0_MUXEN_W<'a> { - w: &'a mut W, -} -impl<'a> ACOMP0_MUXEN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 26)) | ((value as u32 & 0x01) << 26); - self.w - } -} -#[doc = "Field `acomp0_pos_sel` reader - "] -pub struct ACOMP0_POS_SEL_R(crate::FieldReader); -impl ACOMP0_POS_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - ACOMP0_POS_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ACOMP0_POS_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `acomp0_pos_sel` writer - "] -pub struct ACOMP0_POS_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> ACOMP0_POS_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 22)) | ((value as u32 & 0x0f) << 22); - self.w - } -} -#[doc = "Field `acomp0_neg_sel` reader - "] -pub struct ACOMP0_NEG_SEL_R(crate::FieldReader); -impl ACOMP0_NEG_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - ACOMP0_NEG_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ACOMP0_NEG_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `acomp0_neg_sel` writer - "] -pub struct ACOMP0_NEG_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> ACOMP0_NEG_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 18)) | ((value as u32 & 0x0f) << 18); - self.w - } -} -#[doc = "Field `acomp0_level_sel` reader - "] -pub struct ACOMP0_LEVEL_SEL_R(crate::FieldReader); -impl ACOMP0_LEVEL_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - ACOMP0_LEVEL_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ACOMP0_LEVEL_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `acomp0_level_sel` writer - "] -pub struct ACOMP0_LEVEL_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> ACOMP0_LEVEL_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 12)) | ((value as u32 & 0x3f) << 12); - self.w - } -} -#[doc = "Field `acomp0_bias_prog` reader - "] -pub struct ACOMP0_BIAS_PROG_R(crate::FieldReader); -impl ACOMP0_BIAS_PROG_R { - pub(crate) fn new(bits: u8) -> Self { - ACOMP0_BIAS_PROG_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ACOMP0_BIAS_PROG_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `acomp0_bias_prog` writer - "] -pub struct ACOMP0_BIAS_PROG_W<'a> { - w: &'a mut W, -} -impl<'a> ACOMP0_BIAS_PROG_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 10)) | ((value as u32 & 0x03) << 10); - self.w - } -} -#[doc = "Field `acomp0_hyst_selp` reader - "] -pub struct ACOMP0_HYST_SELP_R(crate::FieldReader); -impl ACOMP0_HYST_SELP_R { - pub(crate) fn new(bits: u8) -> Self { - ACOMP0_HYST_SELP_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ACOMP0_HYST_SELP_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `acomp0_hyst_selp` writer - "] -pub struct ACOMP0_HYST_SELP_W<'a> { - w: &'a mut W, -} -impl<'a> ACOMP0_HYST_SELP_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 7)) | ((value as u32 & 0x07) << 7); - self.w - } -} -#[doc = "Field `acomp0_hyst_seln` reader - "] -pub struct ACOMP0_HYST_SELN_R(crate::FieldReader); -impl ACOMP0_HYST_SELN_R { - pub(crate) fn new(bits: u8) -> Self { - ACOMP0_HYST_SELN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ACOMP0_HYST_SELN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `acomp0_hyst_seln` writer - "] -pub struct ACOMP0_HYST_SELN_W<'a> { - w: &'a mut W, -} -impl<'a> ACOMP0_HYST_SELN_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 4)) | ((value as u32 & 0x07) << 4); - self.w - } -} #[doc = "Field `acomp0_en` reader - "] -pub struct ACOMP0_EN_R(crate::FieldReader); -impl ACOMP0_EN_R { - pub(crate) fn new(bits: bool) -> Self { - ACOMP0_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ACOMP0_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type ACOMP0_EN_R = crate::BitReader; #[doc = "Field `acomp0_en` writer - "] -pub struct ACOMP0_EN_W<'a> { - w: &'a mut W, -} -impl<'a> ACOMP0_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type ACOMP0_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, ACOMP0_CTRL_SPEC, bool, O>; +#[doc = "Field `acomp0_hyst_seln` reader - "] +pub type ACOMP0_HYST_SELN_R = crate::FieldReader; +#[doc = "Field `acomp0_hyst_seln` writer - "] +pub type ACOMP0_HYST_SELN_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, ACOMP0_CTRL_SPEC, u8, u8, 3, O>; +#[doc = "Field `acomp0_hyst_selp` reader - "] +pub type ACOMP0_HYST_SELP_R = crate::FieldReader; +#[doc = "Field `acomp0_hyst_selp` writer - "] +pub type ACOMP0_HYST_SELP_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, ACOMP0_CTRL_SPEC, u8, u8, 3, O>; +#[doc = "Field `acomp0_bias_prog` reader - "] +pub type ACOMP0_BIAS_PROG_R = crate::FieldReader; +#[doc = "Field `acomp0_bias_prog` writer - "] +pub type ACOMP0_BIAS_PROG_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, ACOMP0_CTRL_SPEC, u8, u8, 2, O>; +#[doc = "Field `acomp0_level_sel` reader - "] +pub type ACOMP0_LEVEL_SEL_R = crate::FieldReader; +#[doc = "Field `acomp0_level_sel` writer - "] +pub type ACOMP0_LEVEL_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, ACOMP0_CTRL_SPEC, u8, u8, 6, O>; +#[doc = "Field `acomp0_neg_sel` reader - "] +pub type ACOMP0_NEG_SEL_R = crate::FieldReader; +#[doc = "Field `acomp0_neg_sel` writer - "] +pub type ACOMP0_NEG_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, ACOMP0_CTRL_SPEC, u8, u8, 4, O>; +#[doc = "Field `acomp0_pos_sel` reader - "] +pub type ACOMP0_POS_SEL_R = crate::FieldReader; +#[doc = "Field `acomp0_pos_sel` writer - "] +pub type ACOMP0_POS_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, ACOMP0_CTRL_SPEC, u8, u8, 4, O>; +#[doc = "Field `acomp0_muxen` reader - "] +pub type ACOMP0_MUXEN_R = crate::BitReader; +#[doc = "Field `acomp0_muxen` writer - "] +pub type ACOMP0_MUXEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, ACOMP0_CTRL_SPEC, bool, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn acomp0_en(&self) -> ACOMP0_EN_R { + ACOMP0_EN_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bit 26"] + #[doc = "Bits 4:6"] #[inline(always)] - pub fn acomp0_muxen(&self) -> ACOMP0_MUXEN_R { - ACOMP0_MUXEN_R::new(((self.bits >> 26) & 0x01) != 0) + pub fn acomp0_hyst_seln(&self) -> ACOMP0_HYST_SELN_R { + ACOMP0_HYST_SELN_R::new(((self.bits >> 4) & 7) as u8) } - #[doc = "Bits 22:25"] + #[doc = "Bits 7:9"] #[inline(always)] - pub fn acomp0_pos_sel(&self) -> ACOMP0_POS_SEL_R { - ACOMP0_POS_SEL_R::new(((self.bits >> 22) & 0x0f) as u8) + pub fn acomp0_hyst_selp(&self) -> ACOMP0_HYST_SELP_R { + ACOMP0_HYST_SELP_R::new(((self.bits >> 7) & 7) as u8) } - #[doc = "Bits 18:21"] + #[doc = "Bits 10:11"] #[inline(always)] - pub fn acomp0_neg_sel(&self) -> ACOMP0_NEG_SEL_R { - ACOMP0_NEG_SEL_R::new(((self.bits >> 18) & 0x0f) as u8) + pub fn acomp0_bias_prog(&self) -> ACOMP0_BIAS_PROG_R { + ACOMP0_BIAS_PROG_R::new(((self.bits >> 10) & 3) as u8) } #[doc = "Bits 12:17"] #[inline(always)] pub fn acomp0_level_sel(&self) -> ACOMP0_LEVEL_SEL_R { ACOMP0_LEVEL_SEL_R::new(((self.bits >> 12) & 0x3f) as u8) } - #[doc = "Bits 10:11"] - #[inline(always)] - pub fn acomp0_bias_prog(&self) -> ACOMP0_BIAS_PROG_R { - ACOMP0_BIAS_PROG_R::new(((self.bits >> 10) & 0x03) as u8) - } - #[doc = "Bits 7:9"] + #[doc = "Bits 18:21"] #[inline(always)] - pub fn acomp0_hyst_selp(&self) -> ACOMP0_HYST_SELP_R { - ACOMP0_HYST_SELP_R::new(((self.bits >> 7) & 0x07) as u8) + pub fn acomp0_neg_sel(&self) -> ACOMP0_NEG_SEL_R { + ACOMP0_NEG_SEL_R::new(((self.bits >> 18) & 0x0f) as u8) } - #[doc = "Bits 4:6"] + #[doc = "Bits 22:25"] #[inline(always)] - pub fn acomp0_hyst_seln(&self) -> ACOMP0_HYST_SELN_R { - ACOMP0_HYST_SELN_R::new(((self.bits >> 4) & 0x07) as u8) + pub fn acomp0_pos_sel(&self) -> ACOMP0_POS_SEL_R { + ACOMP0_POS_SEL_R::new(((self.bits >> 22) & 0x0f) as u8) } - #[doc = "Bit 0"] + #[doc = "Bit 26"] #[inline(always)] - pub fn acomp0_en(&self) -> ACOMP0_EN_R { - ACOMP0_EN_R::new((self.bits & 0x01) != 0) + pub fn acomp0_muxen(&self) -> ACOMP0_MUXEN_R { + ACOMP0_MUXEN_R::new(((self.bits >> 26) & 1) != 0) } } impl W { - #[doc = "Bit 26"] + #[doc = "Bit 0"] #[inline(always)] - pub fn acomp0_muxen(&mut self) -> ACOMP0_MUXEN_W { - ACOMP0_MUXEN_W { w: self } + #[must_use] + pub fn acomp0_en(&mut self) -> ACOMP0_EN_W<0> { + ACOMP0_EN_W::new(self) } - #[doc = "Bits 22:25"] + #[doc = "Bits 4:6"] #[inline(always)] - pub fn acomp0_pos_sel(&mut self) -> ACOMP0_POS_SEL_W { - ACOMP0_POS_SEL_W { w: self } + #[must_use] + pub fn acomp0_hyst_seln(&mut self) -> ACOMP0_HYST_SELN_W<4> { + ACOMP0_HYST_SELN_W::new(self) } - #[doc = "Bits 18:21"] + #[doc = "Bits 7:9"] #[inline(always)] - pub fn acomp0_neg_sel(&mut self) -> ACOMP0_NEG_SEL_W { - ACOMP0_NEG_SEL_W { w: self } + #[must_use] + pub fn acomp0_hyst_selp(&mut self) -> ACOMP0_HYST_SELP_W<7> { + ACOMP0_HYST_SELP_W::new(self) } - #[doc = "Bits 12:17"] + #[doc = "Bits 10:11"] #[inline(always)] - pub fn acomp0_level_sel(&mut self) -> ACOMP0_LEVEL_SEL_W { - ACOMP0_LEVEL_SEL_W { w: self } + #[must_use] + pub fn acomp0_bias_prog(&mut self) -> ACOMP0_BIAS_PROG_W<10> { + ACOMP0_BIAS_PROG_W::new(self) } - #[doc = "Bits 10:11"] + #[doc = "Bits 12:17"] #[inline(always)] - pub fn acomp0_bias_prog(&mut self) -> ACOMP0_BIAS_PROG_W { - ACOMP0_BIAS_PROG_W { w: self } + #[must_use] + pub fn acomp0_level_sel(&mut self) -> ACOMP0_LEVEL_SEL_W<12> { + ACOMP0_LEVEL_SEL_W::new(self) } - #[doc = "Bits 7:9"] + #[doc = "Bits 18:21"] #[inline(always)] - pub fn acomp0_hyst_selp(&mut self) -> ACOMP0_HYST_SELP_W { - ACOMP0_HYST_SELP_W { w: self } + #[must_use] + pub fn acomp0_neg_sel(&mut self) -> ACOMP0_NEG_SEL_W<18> { + ACOMP0_NEG_SEL_W::new(self) } - #[doc = "Bits 4:6"] + #[doc = "Bits 22:25"] #[inline(always)] - pub fn acomp0_hyst_seln(&mut self) -> ACOMP0_HYST_SELN_W { - ACOMP0_HYST_SELN_W { w: self } + #[must_use] + pub fn acomp0_pos_sel(&mut self) -> ACOMP0_POS_SEL_W<22> { + ACOMP0_POS_SEL_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 26"] #[inline(always)] - pub fn acomp0_en(&mut self) -> ACOMP0_EN_W { - ACOMP0_EN_W { w: self } + #[must_use] + pub fn acomp0_muxen(&mut self) -> ACOMP0_MUXEN_W<26> { + ACOMP0_MUXEN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -361,11 +182,10 @@ impl crate::Readable for ACOMP0_CTRL_SPEC { #[doc = "`write(|w| ..)` method takes [acomp0_ctrl::W](W) writer structure"] impl crate::Writable for ACOMP0_CTRL_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets acomp0_ctrl to value 0"] impl crate::Resettable for ACOMP0_CTRL_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/aon/acomp1_ctrl.rs b/src/aon/acomp1_ctrl.rs index 169f7ff..345b242 100644 --- a/src/aon/acomp1_ctrl.rs +++ b/src/aon/acomp1_ctrl.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,323 +28,143 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `acomp1_muxen` reader - "] -pub struct ACOMP1_MUXEN_R(crate::FieldReader); -impl ACOMP1_MUXEN_R { - pub(crate) fn new(bits: bool) -> Self { - ACOMP1_MUXEN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ACOMP1_MUXEN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `acomp1_muxen` writer - "] -pub struct ACOMP1_MUXEN_W<'a> { - w: &'a mut W, -} -impl<'a> ACOMP1_MUXEN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 26)) | ((value as u32 & 0x01) << 26); - self.w - } -} -#[doc = "Field `acomp1_pos_sel` reader - "] -pub struct ACOMP1_POS_SEL_R(crate::FieldReader); -impl ACOMP1_POS_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - ACOMP1_POS_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ACOMP1_POS_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `acomp1_pos_sel` writer - "] -pub struct ACOMP1_POS_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> ACOMP1_POS_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 22)) | ((value as u32 & 0x0f) << 22); - self.w - } -} -#[doc = "Field `acomp1_neg_sel` reader - "] -pub struct ACOMP1_NEG_SEL_R(crate::FieldReader); -impl ACOMP1_NEG_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - ACOMP1_NEG_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ACOMP1_NEG_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `acomp1_neg_sel` writer - "] -pub struct ACOMP1_NEG_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> ACOMP1_NEG_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 18)) | ((value as u32 & 0x0f) << 18); - self.w - } -} -#[doc = "Field `acomp1_level_sel` reader - "] -pub struct ACOMP1_LEVEL_SEL_R(crate::FieldReader); -impl ACOMP1_LEVEL_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - ACOMP1_LEVEL_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ACOMP1_LEVEL_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `acomp1_level_sel` writer - "] -pub struct ACOMP1_LEVEL_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> ACOMP1_LEVEL_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 12)) | ((value as u32 & 0x3f) << 12); - self.w - } -} -#[doc = "Field `acomp1_bias_prog` reader - "] -pub struct ACOMP1_BIAS_PROG_R(crate::FieldReader); -impl ACOMP1_BIAS_PROG_R { - pub(crate) fn new(bits: u8) -> Self { - ACOMP1_BIAS_PROG_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ACOMP1_BIAS_PROG_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `acomp1_bias_prog` writer - "] -pub struct ACOMP1_BIAS_PROG_W<'a> { - w: &'a mut W, -} -impl<'a> ACOMP1_BIAS_PROG_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 10)) | ((value as u32 & 0x03) << 10); - self.w - } -} -#[doc = "Field `acomp1_hyst_selp` reader - "] -pub struct ACOMP1_HYST_SELP_R(crate::FieldReader); -impl ACOMP1_HYST_SELP_R { - pub(crate) fn new(bits: u8) -> Self { - ACOMP1_HYST_SELP_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ACOMP1_HYST_SELP_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `acomp1_hyst_selp` writer - "] -pub struct ACOMP1_HYST_SELP_W<'a> { - w: &'a mut W, -} -impl<'a> ACOMP1_HYST_SELP_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 7)) | ((value as u32 & 0x07) << 7); - self.w - } -} -#[doc = "Field `acomp1_hyst_seln` reader - "] -pub struct ACOMP1_HYST_SELN_R(crate::FieldReader); -impl ACOMP1_HYST_SELN_R { - pub(crate) fn new(bits: u8) -> Self { - ACOMP1_HYST_SELN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ACOMP1_HYST_SELN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `acomp1_hyst_seln` writer - "] -pub struct ACOMP1_HYST_SELN_W<'a> { - w: &'a mut W, -} -impl<'a> ACOMP1_HYST_SELN_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 4)) | ((value as u32 & 0x07) << 4); - self.w - } -} #[doc = "Field `acomp1_en` reader - "] -pub struct ACOMP1_EN_R(crate::FieldReader); -impl ACOMP1_EN_R { - pub(crate) fn new(bits: bool) -> Self { - ACOMP1_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ACOMP1_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type ACOMP1_EN_R = crate::BitReader; #[doc = "Field `acomp1_en` writer - "] -pub struct ACOMP1_EN_W<'a> { - w: &'a mut W, -} -impl<'a> ACOMP1_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type ACOMP1_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, ACOMP1_CTRL_SPEC, bool, O>; +#[doc = "Field `acomp1_hyst_seln` reader - "] +pub type ACOMP1_HYST_SELN_R = crate::FieldReader; +#[doc = "Field `acomp1_hyst_seln` writer - "] +pub type ACOMP1_HYST_SELN_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, ACOMP1_CTRL_SPEC, u8, u8, 3, O>; +#[doc = "Field `acomp1_hyst_selp` reader - "] +pub type ACOMP1_HYST_SELP_R = crate::FieldReader; +#[doc = "Field `acomp1_hyst_selp` writer - "] +pub type ACOMP1_HYST_SELP_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, ACOMP1_CTRL_SPEC, u8, u8, 3, O>; +#[doc = "Field `acomp1_bias_prog` reader - "] +pub type ACOMP1_BIAS_PROG_R = crate::FieldReader; +#[doc = "Field `acomp1_bias_prog` writer - "] +pub type ACOMP1_BIAS_PROG_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, ACOMP1_CTRL_SPEC, u8, u8, 2, O>; +#[doc = "Field `acomp1_level_sel` reader - "] +pub type ACOMP1_LEVEL_SEL_R = crate::FieldReader; +#[doc = "Field `acomp1_level_sel` writer - "] +pub type ACOMP1_LEVEL_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, ACOMP1_CTRL_SPEC, u8, u8, 6, O>; +#[doc = "Field `acomp1_neg_sel` reader - "] +pub type ACOMP1_NEG_SEL_R = crate::FieldReader; +#[doc = "Field `acomp1_neg_sel` writer - "] +pub type ACOMP1_NEG_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, ACOMP1_CTRL_SPEC, u8, u8, 4, O>; +#[doc = "Field `acomp1_pos_sel` reader - "] +pub type ACOMP1_POS_SEL_R = crate::FieldReader; +#[doc = "Field `acomp1_pos_sel` writer - "] +pub type ACOMP1_POS_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, ACOMP1_CTRL_SPEC, u8, u8, 4, O>; +#[doc = "Field `acomp1_muxen` reader - "] +pub type ACOMP1_MUXEN_R = crate::BitReader; +#[doc = "Field `acomp1_muxen` writer - "] +pub type ACOMP1_MUXEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, ACOMP1_CTRL_SPEC, bool, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn acomp1_en(&self) -> ACOMP1_EN_R { + ACOMP1_EN_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bit 26"] + #[doc = "Bits 4:6"] #[inline(always)] - pub fn acomp1_muxen(&self) -> ACOMP1_MUXEN_R { - ACOMP1_MUXEN_R::new(((self.bits >> 26) & 0x01) != 0) + pub fn acomp1_hyst_seln(&self) -> ACOMP1_HYST_SELN_R { + ACOMP1_HYST_SELN_R::new(((self.bits >> 4) & 7) as u8) } - #[doc = "Bits 22:25"] + #[doc = "Bits 7:9"] #[inline(always)] - pub fn acomp1_pos_sel(&self) -> ACOMP1_POS_SEL_R { - ACOMP1_POS_SEL_R::new(((self.bits >> 22) & 0x0f) as u8) + pub fn acomp1_hyst_selp(&self) -> ACOMP1_HYST_SELP_R { + ACOMP1_HYST_SELP_R::new(((self.bits >> 7) & 7) as u8) } - #[doc = "Bits 18:21"] + #[doc = "Bits 10:11"] #[inline(always)] - pub fn acomp1_neg_sel(&self) -> ACOMP1_NEG_SEL_R { - ACOMP1_NEG_SEL_R::new(((self.bits >> 18) & 0x0f) as u8) + pub fn acomp1_bias_prog(&self) -> ACOMP1_BIAS_PROG_R { + ACOMP1_BIAS_PROG_R::new(((self.bits >> 10) & 3) as u8) } #[doc = "Bits 12:17"] #[inline(always)] pub fn acomp1_level_sel(&self) -> ACOMP1_LEVEL_SEL_R { ACOMP1_LEVEL_SEL_R::new(((self.bits >> 12) & 0x3f) as u8) } - #[doc = "Bits 10:11"] - #[inline(always)] - pub fn acomp1_bias_prog(&self) -> ACOMP1_BIAS_PROG_R { - ACOMP1_BIAS_PROG_R::new(((self.bits >> 10) & 0x03) as u8) - } - #[doc = "Bits 7:9"] + #[doc = "Bits 18:21"] #[inline(always)] - pub fn acomp1_hyst_selp(&self) -> ACOMP1_HYST_SELP_R { - ACOMP1_HYST_SELP_R::new(((self.bits >> 7) & 0x07) as u8) + pub fn acomp1_neg_sel(&self) -> ACOMP1_NEG_SEL_R { + ACOMP1_NEG_SEL_R::new(((self.bits >> 18) & 0x0f) as u8) } - #[doc = "Bits 4:6"] + #[doc = "Bits 22:25"] #[inline(always)] - pub fn acomp1_hyst_seln(&self) -> ACOMP1_HYST_SELN_R { - ACOMP1_HYST_SELN_R::new(((self.bits >> 4) & 0x07) as u8) + pub fn acomp1_pos_sel(&self) -> ACOMP1_POS_SEL_R { + ACOMP1_POS_SEL_R::new(((self.bits >> 22) & 0x0f) as u8) } - #[doc = "Bit 0"] + #[doc = "Bit 26"] #[inline(always)] - pub fn acomp1_en(&self) -> ACOMP1_EN_R { - ACOMP1_EN_R::new((self.bits & 0x01) != 0) + pub fn acomp1_muxen(&self) -> ACOMP1_MUXEN_R { + ACOMP1_MUXEN_R::new(((self.bits >> 26) & 1) != 0) } } impl W { - #[doc = "Bit 26"] + #[doc = "Bit 0"] #[inline(always)] - pub fn acomp1_muxen(&mut self) -> ACOMP1_MUXEN_W { - ACOMP1_MUXEN_W { w: self } + #[must_use] + pub fn acomp1_en(&mut self) -> ACOMP1_EN_W<0> { + ACOMP1_EN_W::new(self) } - #[doc = "Bits 22:25"] + #[doc = "Bits 4:6"] #[inline(always)] - pub fn acomp1_pos_sel(&mut self) -> ACOMP1_POS_SEL_W { - ACOMP1_POS_SEL_W { w: self } + #[must_use] + pub fn acomp1_hyst_seln(&mut self) -> ACOMP1_HYST_SELN_W<4> { + ACOMP1_HYST_SELN_W::new(self) } - #[doc = "Bits 18:21"] + #[doc = "Bits 7:9"] #[inline(always)] - pub fn acomp1_neg_sel(&mut self) -> ACOMP1_NEG_SEL_W { - ACOMP1_NEG_SEL_W { w: self } + #[must_use] + pub fn acomp1_hyst_selp(&mut self) -> ACOMP1_HYST_SELP_W<7> { + ACOMP1_HYST_SELP_W::new(self) } - #[doc = "Bits 12:17"] + #[doc = "Bits 10:11"] #[inline(always)] - pub fn acomp1_level_sel(&mut self) -> ACOMP1_LEVEL_SEL_W { - ACOMP1_LEVEL_SEL_W { w: self } + #[must_use] + pub fn acomp1_bias_prog(&mut self) -> ACOMP1_BIAS_PROG_W<10> { + ACOMP1_BIAS_PROG_W::new(self) } - #[doc = "Bits 10:11"] + #[doc = "Bits 12:17"] #[inline(always)] - pub fn acomp1_bias_prog(&mut self) -> ACOMP1_BIAS_PROG_W { - ACOMP1_BIAS_PROG_W { w: self } + #[must_use] + pub fn acomp1_level_sel(&mut self) -> ACOMP1_LEVEL_SEL_W<12> { + ACOMP1_LEVEL_SEL_W::new(self) } - #[doc = "Bits 7:9"] + #[doc = "Bits 18:21"] #[inline(always)] - pub fn acomp1_hyst_selp(&mut self) -> ACOMP1_HYST_SELP_W { - ACOMP1_HYST_SELP_W { w: self } + #[must_use] + pub fn acomp1_neg_sel(&mut self) -> ACOMP1_NEG_SEL_W<18> { + ACOMP1_NEG_SEL_W::new(self) } - #[doc = "Bits 4:6"] + #[doc = "Bits 22:25"] #[inline(always)] - pub fn acomp1_hyst_seln(&mut self) -> ACOMP1_HYST_SELN_W { - ACOMP1_HYST_SELN_W { w: self } + #[must_use] + pub fn acomp1_pos_sel(&mut self) -> ACOMP1_POS_SEL_W<22> { + ACOMP1_POS_SEL_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 26"] #[inline(always)] - pub fn acomp1_en(&mut self) -> ACOMP1_EN_W { - ACOMP1_EN_W { w: self } + #[must_use] + pub fn acomp1_muxen(&mut self) -> ACOMP1_MUXEN_W<26> { + ACOMP1_MUXEN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -361,11 +182,10 @@ impl crate::Readable for ACOMP1_CTRL_SPEC { #[doc = "`write(|w| ..)` method takes [acomp1_ctrl::W](W) writer structure"] impl crate::Writable for ACOMP1_CTRL_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets acomp1_ctrl to value 0"] impl crate::Resettable for ACOMP1_CTRL_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/aon/acomp_ctrl.rs b/src/aon/acomp_ctrl.rs index 802f50d..9be2c14 100644 --- a/src/aon/acomp_ctrl.rs +++ b/src/aon/acomp_ctrl.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,345 +28,139 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `acomp_reserved` reader - "] -pub struct ACOMP_RESERVED_R(crate::FieldReader); -impl ACOMP_RESERVED_R { - pub(crate) fn new(bits: u8) -> Self { - ACOMP_RESERVED_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ACOMP_RESERVED_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `acomp_reserved` writer - "] -pub struct ACOMP_RESERVED_W<'a> { - w: &'a mut W, -} -impl<'a> ACOMP_RESERVED_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 24)) | ((value as u32 & 0xff) << 24); - self.w - } -} -#[doc = "Field `acomp0_out_raw` reader - "] -pub struct ACOMP0_OUT_RAW_R(crate::FieldReader); -impl ACOMP0_OUT_RAW_R { - pub(crate) fn new(bits: bool) -> Self { - ACOMP0_OUT_RAW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ACOMP0_OUT_RAW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `acomp1_out_raw` reader - "] -pub struct ACOMP1_OUT_RAW_R(crate::FieldReader); -impl ACOMP1_OUT_RAW_R { - pub(crate) fn new(bits: bool) -> Self { - ACOMP1_OUT_RAW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ACOMP1_OUT_RAW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `acomp0_test_sel` reader - "] -pub struct ACOMP0_TEST_SEL_R(crate::FieldReader); -impl ACOMP0_TEST_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - ACOMP0_TEST_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ACOMP0_TEST_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `acomp0_test_sel` writer - "] -pub struct ACOMP0_TEST_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> ACOMP0_TEST_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 12)) | ((value as u32 & 0x03) << 12); - self.w - } -} -#[doc = "Field `acomp1_test_sel` reader - "] -pub struct ACOMP1_TEST_SEL_R(crate::FieldReader); -impl ACOMP1_TEST_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - ACOMP1_TEST_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ACOMP1_TEST_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `acomp1_test_sel` writer - "] -pub struct ACOMP1_TEST_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> ACOMP1_TEST_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 10)) | ((value as u32 & 0x03) << 10); - self.w - } -} -#[doc = "Field `acomp0_test_en` reader - "] -pub struct ACOMP0_TEST_EN_R(crate::FieldReader); -impl ACOMP0_TEST_EN_R { - pub(crate) fn new(bits: bool) -> Self { - ACOMP0_TEST_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ACOMP0_TEST_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `acomp0_test_en` writer - "] -pub struct ACOMP0_TEST_EN_W<'a> { - w: &'a mut W, -} -impl<'a> ACOMP0_TEST_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w - } -} -#[doc = "Field `acomp1_test_en` reader - "] -pub struct ACOMP1_TEST_EN_R(crate::FieldReader); -impl ACOMP1_TEST_EN_R { - pub(crate) fn new(bits: bool) -> Self { - ACOMP1_TEST_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ACOMP1_TEST_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `acomp1_test_en` writer - "] -pub struct ACOMP1_TEST_EN_W<'a> { - w: &'a mut W, -} -impl<'a> ACOMP1_TEST_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `acomp0_rstn_ana` reader - "] -pub struct ACOMP0_RSTN_ANA_R(crate::FieldReader); -impl ACOMP0_RSTN_ANA_R { - pub(crate) fn new(bits: bool) -> Self { - ACOMP0_RSTN_ANA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ACOMP0_RSTN_ANA_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `acomp0_rstn_ana` writer - "] -pub struct ACOMP0_RSTN_ANA_W<'a> { - w: &'a mut W, -} -impl<'a> ACOMP0_RSTN_ANA_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `acomp1_rstn_ana` reader - "] -pub struct ACOMP1_RSTN_ANA_R(crate::FieldReader); -impl ACOMP1_RSTN_ANA_R { - pub(crate) fn new(bits: bool) -> Self { - ACOMP1_RSTN_ANA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ACOMP1_RSTN_ANA_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type ACOMP1_RSTN_ANA_R = crate::BitReader; #[doc = "Field `acomp1_rstn_ana` writer - "] -pub struct ACOMP1_RSTN_ANA_W<'a> { - w: &'a mut W, -} -impl<'a> ACOMP1_RSTN_ANA_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type ACOMP1_RSTN_ANA_W<'a, const O: u8> = crate::BitWriter<'a, u32, ACOMP_CTRL_SPEC, bool, O>; +#[doc = "Field `acomp0_rstn_ana` reader - "] +pub type ACOMP0_RSTN_ANA_R = crate::BitReader; +#[doc = "Field `acomp0_rstn_ana` writer - "] +pub type ACOMP0_RSTN_ANA_W<'a, const O: u8> = crate::BitWriter<'a, u32, ACOMP_CTRL_SPEC, bool, O>; +#[doc = "Field `acomp1_test_en` reader - "] +pub type ACOMP1_TEST_EN_R = crate::BitReader; +#[doc = "Field `acomp1_test_en` writer - "] +pub type ACOMP1_TEST_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, ACOMP_CTRL_SPEC, bool, O>; +#[doc = "Field `acomp0_test_en` reader - "] +pub type ACOMP0_TEST_EN_R = crate::BitReader; +#[doc = "Field `acomp0_test_en` writer - "] +pub type ACOMP0_TEST_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, ACOMP_CTRL_SPEC, bool, O>; +#[doc = "Field `acomp1_test_sel` reader - "] +pub type ACOMP1_TEST_SEL_R = crate::FieldReader; +#[doc = "Field `acomp1_test_sel` writer - "] +pub type ACOMP1_TEST_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, ACOMP_CTRL_SPEC, u8, u8, 2, O>; +#[doc = "Field `acomp0_test_sel` reader - "] +pub type ACOMP0_TEST_SEL_R = crate::FieldReader; +#[doc = "Field `acomp0_test_sel` writer - "] +pub type ACOMP0_TEST_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, ACOMP_CTRL_SPEC, u8, u8, 2, O>; +#[doc = "Field `acomp1_out_raw` reader - "] +pub type ACOMP1_OUT_RAW_R = crate::BitReader; +#[doc = "Field `acomp0_out_raw` reader - "] +pub type ACOMP0_OUT_RAW_R = crate::BitReader; +#[doc = "Field `acomp_reserved` reader - "] +pub type ACOMP_RESERVED_R = crate::FieldReader; +#[doc = "Field `acomp_reserved` writer - "] +pub type ACOMP_RESERVED_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, ACOMP_CTRL_SPEC, u8, u8, 8, O>; impl R { - #[doc = "Bits 24:31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn acomp_reserved(&self) -> ACOMP_RESERVED_R { - ACOMP_RESERVED_R::new(((self.bits >> 24) & 0xff) as u8) + pub fn acomp1_rstn_ana(&self) -> ACOMP1_RSTN_ANA_R { + ACOMP1_RSTN_ANA_R::new((self.bits & 1) != 0) } - #[doc = "Bit 19"] + #[doc = "Bit 1"] #[inline(always)] - pub fn acomp0_out_raw(&self) -> ACOMP0_OUT_RAW_R { - ACOMP0_OUT_RAW_R::new(((self.bits >> 19) & 0x01) != 0) + pub fn acomp0_rstn_ana(&self) -> ACOMP0_RSTN_ANA_R { + ACOMP0_RSTN_ANA_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 17"] + #[doc = "Bit 8"] #[inline(always)] - pub fn acomp1_out_raw(&self) -> ACOMP1_OUT_RAW_R { - ACOMP1_OUT_RAW_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn acomp1_test_en(&self) -> ACOMP1_TEST_EN_R { + ACOMP1_TEST_EN_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bits 12:13"] + #[doc = "Bit 9"] #[inline(always)] - pub fn acomp0_test_sel(&self) -> ACOMP0_TEST_SEL_R { - ACOMP0_TEST_SEL_R::new(((self.bits >> 12) & 0x03) as u8) + pub fn acomp0_test_en(&self) -> ACOMP0_TEST_EN_R { + ACOMP0_TEST_EN_R::new(((self.bits >> 9) & 1) != 0) } #[doc = "Bits 10:11"] #[inline(always)] pub fn acomp1_test_sel(&self) -> ACOMP1_TEST_SEL_R { - ACOMP1_TEST_SEL_R::new(((self.bits >> 10) & 0x03) as u8) + ACOMP1_TEST_SEL_R::new(((self.bits >> 10) & 3) as u8) } - #[doc = "Bit 9"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn acomp0_test_en(&self) -> ACOMP0_TEST_EN_R { - ACOMP0_TEST_EN_R::new(((self.bits >> 9) & 0x01) != 0) + pub fn acomp0_test_sel(&self) -> ACOMP0_TEST_SEL_R { + ACOMP0_TEST_SEL_R::new(((self.bits >> 12) & 3) as u8) } - #[doc = "Bit 8"] + #[doc = "Bit 17"] #[inline(always)] - pub fn acomp1_test_en(&self) -> ACOMP1_TEST_EN_R { - ACOMP1_TEST_EN_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn acomp1_out_raw(&self) -> ACOMP1_OUT_RAW_R { + ACOMP1_OUT_RAW_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 19"] #[inline(always)] - pub fn acomp0_rstn_ana(&self) -> ACOMP0_RSTN_ANA_R { - ACOMP0_RSTN_ANA_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn acomp0_out_raw(&self) -> ACOMP0_OUT_RAW_R { + ACOMP0_OUT_RAW_R::new(((self.bits >> 19) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn acomp1_rstn_ana(&self) -> ACOMP1_RSTN_ANA_R { - ACOMP1_RSTN_ANA_R::new((self.bits & 0x01) != 0) + pub fn acomp_reserved(&self) -> ACOMP_RESERVED_R { + ACOMP_RESERVED_R::new(((self.bits >> 24) & 0xff) as u8) } } impl W { - #[doc = "Bits 24:31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn acomp_reserved(&mut self) -> ACOMP_RESERVED_W { - ACOMP_RESERVED_W { w: self } + #[must_use] + pub fn acomp1_rstn_ana(&mut self) -> ACOMP1_RSTN_ANA_W<0> { + ACOMP1_RSTN_ANA_W::new(self) } - #[doc = "Bits 12:13"] + #[doc = "Bit 1"] #[inline(always)] - pub fn acomp0_test_sel(&mut self) -> ACOMP0_TEST_SEL_W { - ACOMP0_TEST_SEL_W { w: self } + #[must_use] + pub fn acomp0_rstn_ana(&mut self) -> ACOMP0_RSTN_ANA_W<1> { + ACOMP0_RSTN_ANA_W::new(self) } - #[doc = "Bits 10:11"] + #[doc = "Bit 8"] #[inline(always)] - pub fn acomp1_test_sel(&mut self) -> ACOMP1_TEST_SEL_W { - ACOMP1_TEST_SEL_W { w: self } + #[must_use] + pub fn acomp1_test_en(&mut self) -> ACOMP1_TEST_EN_W<8> { + ACOMP1_TEST_EN_W::new(self) } #[doc = "Bit 9"] #[inline(always)] - pub fn acomp0_test_en(&mut self) -> ACOMP0_TEST_EN_W { - ACOMP0_TEST_EN_W { w: self } + #[must_use] + pub fn acomp0_test_en(&mut self) -> ACOMP0_TEST_EN_W<9> { + ACOMP0_TEST_EN_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bits 10:11"] #[inline(always)] - pub fn acomp1_test_en(&mut self) -> ACOMP1_TEST_EN_W { - ACOMP1_TEST_EN_W { w: self } + #[must_use] + pub fn acomp1_test_sel(&mut self) -> ACOMP1_TEST_SEL_W<10> { + ACOMP1_TEST_SEL_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn acomp0_rstn_ana(&mut self) -> ACOMP0_RSTN_ANA_W { - ACOMP0_RSTN_ANA_W { w: self } + #[must_use] + pub fn acomp0_test_sel(&mut self) -> ACOMP0_TEST_SEL_W<12> { + ACOMP0_TEST_SEL_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn acomp1_rstn_ana(&mut self) -> ACOMP1_RSTN_ANA_W { - ACOMP1_RSTN_ANA_W { w: self } + #[must_use] + pub fn acomp_reserved(&mut self) -> ACOMP_RESERVED_W<24> { + ACOMP_RESERVED_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -383,11 +178,10 @@ impl crate::Readable for ACOMP_CTRL_SPEC { #[doc = "`write(|w| ..)` method takes [acomp_ctrl::W](W) writer structure"] impl crate::Writable for ACOMP_CTRL_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets acomp_ctrl to value 0x03"] impl crate::Resettable for ACOMP_CTRL_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x03 - } + const RESET_VALUE: Self::Ux = 0x03; } diff --git a/src/aon/aon.rs b/src/aon/aon.rs index 5ab0050..2baa49f 100644 --- a/src/aon/aon.rs +++ b/src/aon/aon.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,235 +28,92 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `sw_pu_ldo11_rt` reader - "] -pub struct SW_PU_LDO11_RT_R(crate::FieldReader); -impl SW_PU_LDO11_RT_R { - pub(crate) fn new(bits: bool) -> Self { - SW_PU_LDO11_RT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SW_PU_LDO11_RT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sw_pu_ldo11_rt` writer - "] -pub struct SW_PU_LDO11_RT_W<'a> { - w: &'a mut W, -} -impl<'a> SW_PU_LDO11_RT_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 22)) | ((value as u32 & 0x01) << 22); - self.w - } -} -#[doc = "Field `ldo11_rt_pulldown_sel` reader - "] -pub struct LDO11_RT_PULLDOWN_SEL_R(crate::FieldReader); -impl LDO11_RT_PULLDOWN_SEL_R { - pub(crate) fn new(bits: bool) -> Self { - LDO11_RT_PULLDOWN_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LDO11_RT_PULLDOWN_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ldo11_rt_pulldown_sel` writer - "] -pub struct LDO11_RT_PULLDOWN_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> LDO11_RT_PULLDOWN_SEL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); - self.w - } -} -#[doc = "Field `ldo11_rt_pulldown` reader - "] -pub struct LDO11_RT_PULLDOWN_R(crate::FieldReader); -impl LDO11_RT_PULLDOWN_R { - pub(crate) fn new(bits: bool) -> Self { - LDO11_RT_PULLDOWN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LDO11_RT_PULLDOWN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ldo11_rt_pulldown` writer - "] -pub struct LDO11_RT_PULLDOWN_W<'a> { - w: &'a mut W, -} -impl<'a> LDO11_RT_PULLDOWN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w - } -} -#[doc = "Field `pu_aon_dc_tbuf` reader - "] -pub struct PU_AON_DC_TBUF_R(crate::FieldReader); -impl PU_AON_DC_TBUF_R { - pub(crate) fn new(bits: bool) -> Self { - PU_AON_DC_TBUF_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_AON_DC_TBUF_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_aon_dc_tbuf` writer - "] -pub struct PU_AON_DC_TBUF_W<'a> { - w: &'a mut W, -} -impl<'a> PU_AON_DC_TBUF_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} #[doc = "Field `aon_resv` reader - "] -pub struct AON_RESV_R(crate::FieldReader); -impl AON_RESV_R { - pub(crate) fn new(bits: u8) -> Self { - AON_RESV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for AON_RESV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type AON_RESV_R = crate::FieldReader; #[doc = "Field `aon_resv` writer - "] -pub struct AON_RESV_W<'a> { - w: &'a mut W, -} -impl<'a> AON_RESV_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff); - self.w - } -} +pub type AON_RESV_W<'a, const O: u8> = crate::FieldWriter<'a, u32, AON_SPEC, u8, u8, 8, O>; +#[doc = "Field `pu_aon_dc_tbuf` reader - "] +pub type PU_AON_DC_TBUF_R = crate::BitReader; +#[doc = "Field `pu_aon_dc_tbuf` writer - "] +pub type PU_AON_DC_TBUF_W<'a, const O: u8> = crate::BitWriter<'a, u32, AON_SPEC, bool, O>; +#[doc = "Field `ldo11_rt_pulldown` reader - "] +pub type LDO11_RT_PULLDOWN_R = crate::BitReader; +#[doc = "Field `ldo11_rt_pulldown` writer - "] +pub type LDO11_RT_PULLDOWN_W<'a, const O: u8> = crate::BitWriter<'a, u32, AON_SPEC, bool, O>; +#[doc = "Field `ldo11_rt_pulldown_sel` reader - "] +pub type LDO11_RT_PULLDOWN_SEL_R = crate::BitReader; +#[doc = "Field `ldo11_rt_pulldown_sel` writer - "] +pub type LDO11_RT_PULLDOWN_SEL_W<'a, const O: u8> = crate::BitWriter<'a, u32, AON_SPEC, bool, O>; +#[doc = "Field `sw_pu_ldo11_rt` reader - "] +pub type SW_PU_LDO11_RT_R = crate::BitReader; +#[doc = "Field `sw_pu_ldo11_rt` writer - "] +pub type SW_PU_LDO11_RT_W<'a, const O: u8> = crate::BitWriter<'a, u32, AON_SPEC, bool, O>; impl R { - #[doc = "Bit 22"] + #[doc = "Bits 0:7"] #[inline(always)] - pub fn sw_pu_ldo11_rt(&self) -> SW_PU_LDO11_RT_R { - SW_PU_LDO11_RT_R::new(((self.bits >> 22) & 0x01) != 0) + pub fn aon_resv(&self) -> AON_RESV_R { + AON_RESV_R::new((self.bits & 0xff) as u8) } - #[doc = "Bit 21"] + #[doc = "Bit 12"] #[inline(always)] - pub fn ldo11_rt_pulldown_sel(&self) -> LDO11_RT_PULLDOWN_SEL_R { - LDO11_RT_PULLDOWN_SEL_R::new(((self.bits >> 21) & 0x01) != 0) + pub fn pu_aon_dc_tbuf(&self) -> PU_AON_DC_TBUF_R { + PU_AON_DC_TBUF_R::new(((self.bits >> 12) & 1) != 0) } #[doc = "Bit 20"] #[inline(always)] pub fn ldo11_rt_pulldown(&self) -> LDO11_RT_PULLDOWN_R { - LDO11_RT_PULLDOWN_R::new(((self.bits >> 20) & 0x01) != 0) + LDO11_RT_PULLDOWN_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bit 12"] + #[doc = "Bit 21"] #[inline(always)] - pub fn pu_aon_dc_tbuf(&self) -> PU_AON_DC_TBUF_R { - PU_AON_DC_TBUF_R::new(((self.bits >> 12) & 0x01) != 0) + pub fn ldo11_rt_pulldown_sel(&self) -> LDO11_RT_PULLDOWN_SEL_R { + LDO11_RT_PULLDOWN_SEL_R::new(((self.bits >> 21) & 1) != 0) } - #[doc = "Bits 0:7"] + #[doc = "Bit 22"] #[inline(always)] - pub fn aon_resv(&self) -> AON_RESV_R { - AON_RESV_R::new((self.bits & 0xff) as u8) + pub fn sw_pu_ldo11_rt(&self) -> SW_PU_LDO11_RT_R { + SW_PU_LDO11_RT_R::new(((self.bits >> 22) & 1) != 0) } } impl W { - #[doc = "Bit 22"] + #[doc = "Bits 0:7"] #[inline(always)] - pub fn sw_pu_ldo11_rt(&mut self) -> SW_PU_LDO11_RT_W { - SW_PU_LDO11_RT_W { w: self } + #[must_use] + pub fn aon_resv(&mut self) -> AON_RESV_W<0> { + AON_RESV_W::new(self) } - #[doc = "Bit 21"] + #[doc = "Bit 12"] #[inline(always)] - pub fn ldo11_rt_pulldown_sel(&mut self) -> LDO11_RT_PULLDOWN_SEL_W { - LDO11_RT_PULLDOWN_SEL_W { w: self } + #[must_use] + pub fn pu_aon_dc_tbuf(&mut self) -> PU_AON_DC_TBUF_W<12> { + PU_AON_DC_TBUF_W::new(self) } #[doc = "Bit 20"] #[inline(always)] - pub fn ldo11_rt_pulldown(&mut self) -> LDO11_RT_PULLDOWN_W { - LDO11_RT_PULLDOWN_W { w: self } + #[must_use] + pub fn ldo11_rt_pulldown(&mut self) -> LDO11_RT_PULLDOWN_W<20> { + LDO11_RT_PULLDOWN_W::new(self) } - #[doc = "Bit 12"] + #[doc = "Bit 21"] #[inline(always)] - pub fn pu_aon_dc_tbuf(&mut self) -> PU_AON_DC_TBUF_W { - PU_AON_DC_TBUF_W { w: self } + #[must_use] + pub fn ldo11_rt_pulldown_sel(&mut self) -> LDO11_RT_PULLDOWN_SEL_W<21> { + LDO11_RT_PULLDOWN_SEL_W::new(self) } - #[doc = "Bits 0:7"] + #[doc = "Bit 22"] #[inline(always)] - pub fn aon_resv(&mut self) -> AON_RESV_W { - AON_RESV_W { w: self } + #[must_use] + pub fn sw_pu_ldo11_rt(&mut self) -> SW_PU_LDO11_RT_W<22> { + SW_PU_LDO11_RT_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -273,11 +131,10 @@ impl crate::Readable for AON_SPEC { #[doc = "`write(|w| ..)` method takes [aon::W](W) writer structure"] impl crate::Writable for AON_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets aon to value 0x0040_0000"] impl crate::Resettable for AON_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0040_0000 - } + const RESET_VALUE: Self::Ux = 0x0040_0000; } diff --git a/src/aon/aon_common.rs b/src/aon/aon_common.rs index 29ef9f7..425bad9 100644 --- a/src/aon/aon_common.rs +++ b/src/aon/aon_common.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,649 +28,227 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `ten_cip_misc_aon` reader - "] -pub struct TEN_CIP_MISC_AON_R(crate::FieldReader); -impl TEN_CIP_MISC_AON_R { - pub(crate) fn new(bits: bool) -> Self { - TEN_CIP_MISC_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TEN_CIP_MISC_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ten_cip_misc_aon` writer - "] -pub struct TEN_CIP_MISC_AON_W<'a> { - w: &'a mut W, -} -impl<'a> TEN_CIP_MISC_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w - } -} -#[doc = "Field `ten_mbg_aon` reader - "] -pub struct TEN_MBG_AON_R(crate::FieldReader); -impl TEN_MBG_AON_R { - pub(crate) fn new(bits: bool) -> Self { - TEN_MBG_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TEN_MBG_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ten_mbg_aon` writer - "] -pub struct TEN_MBG_AON_W<'a> { - w: &'a mut W, -} -impl<'a> TEN_MBG_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 19)) | ((value as u32 & 0x01) << 19); - self.w - } -} -#[doc = "Field `dten_xtal_aon` reader - "] -pub struct DTEN_XTAL_AON_R(crate::FieldReader); -impl DTEN_XTAL_AON_R { - pub(crate) fn new(bits: bool) -> Self { - DTEN_XTAL_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DTEN_XTAL_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dten_xtal_aon` writer - "] -pub struct DTEN_XTAL_AON_W<'a> { - w: &'a mut W, -} -impl<'a> DTEN_XTAL_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18); - self.w - } -} -#[doc = "Field `ten_xtal_aon` reader - "] -pub struct TEN_XTAL_AON_R(crate::FieldReader); -impl TEN_XTAL_AON_R { - pub(crate) fn new(bits: bool) -> Self { - TEN_XTAL_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TEN_XTAL_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ten_xtal_aon` writer - "] -pub struct TEN_XTAL_AON_W<'a> { - w: &'a mut W, -} -impl<'a> TEN_XTAL_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w - } -} -#[doc = "Field `ten_ldo15rf_aon` reader - "] -pub struct TEN_LDO15RF_AON_R(crate::FieldReader); -impl TEN_LDO15RF_AON_R { - pub(crate) fn new(bits: bool) -> Self { - TEN_LDO15RF_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TEN_LDO15RF_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ten_ldo15rf_aon` writer - "] -pub struct TEN_LDO15RF_AON_W<'a> { - w: &'a mut W, -} -impl<'a> TEN_LDO15RF_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `ten_bg_sys_aon` reader - "] -pub struct TEN_BG_SYS_AON_R(crate::FieldReader); -impl TEN_BG_SYS_AON_R { - pub(crate) fn new(bits: bool) -> Self { - TEN_BG_SYS_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TEN_BG_SYS_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ten_bg_sys_aon` writer - "] -pub struct TEN_BG_SYS_AON_W<'a> { - w: &'a mut W, -} -impl<'a> TEN_BG_SYS_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} -#[doc = "Field `ten_dcdc18_1_aon` reader - "] -pub struct TEN_DCDC18_1_AON_R(crate::FieldReader); -impl TEN_DCDC18_1_AON_R { - pub(crate) fn new(bits: bool) -> Self { - TEN_DCDC18_1_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TEN_DCDC18_1_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ten_dcdc18_1_aon` writer - "] -pub struct TEN_DCDC18_1_AON_W<'a> { - w: &'a mut W, -} -impl<'a> TEN_DCDC18_1_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w - } -} -#[doc = "Field `ten_dcdc18_0_aon` reader - "] -pub struct TEN_DCDC18_0_AON_R(crate::FieldReader); -impl TEN_DCDC18_0_AON_R { - pub(crate) fn new(bits: bool) -> Self { - TEN_DCDC18_0_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TEN_DCDC18_0_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ten_dcdc18_0_aon` writer - "] -pub struct TEN_DCDC18_0_AON_W<'a> { - w: &'a mut W, -} -impl<'a> TEN_DCDC18_0_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); - self.w - } -} -#[doc = "Field `ten_ldo11soc_aon` reader - "] -pub struct TEN_LDO11SOC_AON_R(crate::FieldReader); -impl TEN_LDO11SOC_AON_R { - pub(crate) fn new(bits: bool) -> Self { - TEN_LDO11SOC_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TEN_LDO11SOC_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ten_ldo11soc_aon` writer - "] -pub struct TEN_LDO11SOC_AON_W<'a> { - w: &'a mut W, -} -impl<'a> TEN_LDO11SOC_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w - } -} -#[doc = "Field `ten_vddcore_aon` reader - "] -pub struct TEN_VDDCORE_AON_R(crate::FieldReader); -impl TEN_VDDCORE_AON_R { - pub(crate) fn new(bits: bool) -> Self { - TEN_VDDCORE_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TEN_VDDCORE_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ten_vddcore_aon` writer - "] -pub struct TEN_VDDCORE_AON_W<'a> { - w: &'a mut W, -} -impl<'a> TEN_VDDCORE_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `ten_xtal32k` reader - "] -pub struct TEN_XTAL32K_R(crate::FieldReader); -impl TEN_XTAL32K_R { - pub(crate) fn new(bits: bool) -> Self { - TEN_XTAL32K_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TEN_XTAL32K_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ten_xtal32k` writer - "] -pub struct TEN_XTAL32K_W<'a> { - w: &'a mut W, -} -impl<'a> TEN_XTAL32K_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w - } -} -#[doc = "Field `dten_xtal32k` reader - "] -pub struct DTEN_XTAL32K_R(crate::FieldReader); -impl DTEN_XTAL32K_R { - pub(crate) fn new(bits: bool) -> Self { - DTEN_XTAL32K_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DTEN_XTAL32K_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dten_xtal32k` writer - "] -pub struct DTEN_XTAL32K_W<'a> { - w: &'a mut W, -} -impl<'a> DTEN_XTAL32K_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w - } -} -#[doc = "Field `ten_aon` reader - "] -pub struct TEN_AON_R(crate::FieldReader); -impl TEN_AON_R { - pub(crate) fn new(bits: bool) -> Self { - TEN_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TEN_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ten_aon` writer - "] -pub struct TEN_AON_W<'a> { - w: &'a mut W, -} -impl<'a> TEN_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} #[doc = "Field `tmux_aon` reader - "] -pub struct TMUX_AON_R(crate::FieldReader); -impl TMUX_AON_R { - pub(crate) fn new(bits: u8) -> Self { - TMUX_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TMUX_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TMUX_AON_R = crate::FieldReader; #[doc = "Field `tmux_aon` writer - "] -pub struct TMUX_AON_W<'a> { - w: &'a mut W, -} -impl<'a> TMUX_AON_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type TMUX_AON_W<'a, const O: u8> = crate::FieldWriter<'a, u32, AON_COMMON_SPEC, u8, u8, 3, O>; +#[doc = "Field `ten_aon` reader - "] +pub type TEN_AON_R = crate::BitReader; +#[doc = "Field `ten_aon` writer - "] +pub type TEN_AON_W<'a, const O: u8> = crate::BitWriter<'a, u32, AON_COMMON_SPEC, bool, O>; +#[doc = "Field `dten_xtal32k` reader - "] +pub type DTEN_XTAL32K_R = crate::BitReader; +#[doc = "Field `dten_xtal32k` writer - "] +pub type DTEN_XTAL32K_W<'a, const O: u8> = crate::BitWriter<'a, u32, AON_COMMON_SPEC, bool, O>; +#[doc = "Field `ten_xtal32k` reader - "] +pub type TEN_XTAL32K_R = crate::BitReader; +#[doc = "Field `ten_xtal32k` writer - "] +pub type TEN_XTAL32K_W<'a, const O: u8> = crate::BitWriter<'a, u32, AON_COMMON_SPEC, bool, O>; +#[doc = "Field `ten_vddcore_aon` reader - "] +pub type TEN_VDDCORE_AON_R = crate::BitReader; +#[doc = "Field `ten_vddcore_aon` writer - "] +pub type TEN_VDDCORE_AON_W<'a, const O: u8> = crate::BitWriter<'a, u32, AON_COMMON_SPEC, bool, O>; +#[doc = "Field `ten_ldo11soc_aon` reader - "] +pub type TEN_LDO11SOC_AON_R = crate::BitReader; +#[doc = "Field `ten_ldo11soc_aon` writer - "] +pub type TEN_LDO11SOC_AON_W<'a, const O: u8> = crate::BitWriter<'a, u32, AON_COMMON_SPEC, bool, O>; +#[doc = "Field `ten_dcdc18_0_aon` reader - "] +pub type TEN_DCDC18_0_AON_R = crate::BitReader; +#[doc = "Field `ten_dcdc18_0_aon` writer - "] +pub type TEN_DCDC18_0_AON_W<'a, const O: u8> = crate::BitWriter<'a, u32, AON_COMMON_SPEC, bool, O>; +#[doc = "Field `ten_dcdc18_1_aon` reader - "] +pub type TEN_DCDC18_1_AON_R = crate::BitReader; +#[doc = "Field `ten_dcdc18_1_aon` writer - "] +pub type TEN_DCDC18_1_AON_W<'a, const O: u8> = crate::BitWriter<'a, u32, AON_COMMON_SPEC, bool, O>; +#[doc = "Field `ten_bg_sys_aon` reader - "] +pub type TEN_BG_SYS_AON_R = crate::BitReader; +#[doc = "Field `ten_bg_sys_aon` writer - "] +pub type TEN_BG_SYS_AON_W<'a, const O: u8> = crate::BitWriter<'a, u32, AON_COMMON_SPEC, bool, O>; +#[doc = "Field `ten_ldo15rf_aon` reader - "] +pub type TEN_LDO15RF_AON_R = crate::BitReader; +#[doc = "Field `ten_ldo15rf_aon` writer - "] +pub type TEN_LDO15RF_AON_W<'a, const O: u8> = crate::BitWriter<'a, u32, AON_COMMON_SPEC, bool, O>; +#[doc = "Field `ten_xtal_aon` reader - "] +pub type TEN_XTAL_AON_R = crate::BitReader; +#[doc = "Field `ten_xtal_aon` writer - "] +pub type TEN_XTAL_AON_W<'a, const O: u8> = crate::BitWriter<'a, u32, AON_COMMON_SPEC, bool, O>; +#[doc = "Field `dten_xtal_aon` reader - "] +pub type DTEN_XTAL_AON_R = crate::BitReader; +#[doc = "Field `dten_xtal_aon` writer - "] +pub type DTEN_XTAL_AON_W<'a, const O: u8> = crate::BitWriter<'a, u32, AON_COMMON_SPEC, bool, O>; +#[doc = "Field `ten_mbg_aon` reader - "] +pub type TEN_MBG_AON_R = crate::BitReader; +#[doc = "Field `ten_mbg_aon` writer - "] +pub type TEN_MBG_AON_W<'a, const O: u8> = crate::BitWriter<'a, u32, AON_COMMON_SPEC, bool, O>; +#[doc = "Field `ten_cip_misc_aon` reader - "] +pub type TEN_CIP_MISC_AON_R = crate::BitReader; +#[doc = "Field `ten_cip_misc_aon` writer - "] +pub type TEN_CIP_MISC_AON_W<'a, const O: u8> = crate::BitWriter<'a, u32, AON_COMMON_SPEC, bool, O>; +impl R { + #[doc = "Bits 0:2"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x07) | (value as u32 & 0x07); - self.w + pub fn tmux_aon(&self) -> TMUX_AON_R { + TMUX_AON_R::new((self.bits & 7) as u8) } -} -impl R { - #[doc = "Bit 20"] + #[doc = "Bit 4"] #[inline(always)] - pub fn ten_cip_misc_aon(&self) -> TEN_CIP_MISC_AON_R { - TEN_CIP_MISC_AON_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn ten_aon(&self) -> TEN_AON_R { + TEN_AON_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 19"] + #[doc = "Bit 5"] #[inline(always)] - pub fn ten_mbg_aon(&self) -> TEN_MBG_AON_R { - TEN_MBG_AON_R::new(((self.bits >> 19) & 0x01) != 0) + pub fn dten_xtal32k(&self) -> DTEN_XTAL32K_R { + DTEN_XTAL32K_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 18"] + #[doc = "Bit 6"] #[inline(always)] - pub fn dten_xtal_aon(&self) -> DTEN_XTAL_AON_R { - DTEN_XTAL_AON_R::new(((self.bits >> 18) & 0x01) != 0) + pub fn ten_xtal32k(&self) -> TEN_XTAL32K_R { + TEN_XTAL32K_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = "Bit 17"] + #[doc = "Bit 8"] #[inline(always)] - pub fn ten_xtal_aon(&self) -> TEN_XTAL_AON_R { - TEN_XTAL_AON_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn ten_vddcore_aon(&self) -> TEN_VDDCORE_AON_R { + TEN_VDDCORE_AON_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bit 16"] + #[doc = "Bit 9"] #[inline(always)] - pub fn ten_ldo15rf_aon(&self) -> TEN_LDO15RF_AON_R { - TEN_LDO15RF_AON_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn ten_ldo11soc_aon(&self) -> TEN_LDO11SOC_AON_R { + TEN_LDO11SOC_AON_R::new(((self.bits >> 9) & 1) != 0) } - #[doc = "Bit 12"] + #[doc = "Bit 10"] #[inline(always)] - pub fn ten_bg_sys_aon(&self) -> TEN_BG_SYS_AON_R { - TEN_BG_SYS_AON_R::new(((self.bits >> 12) & 0x01) != 0) + pub fn ten_dcdc18_0_aon(&self) -> TEN_DCDC18_0_AON_R { + TEN_DCDC18_0_AON_R::new(((self.bits >> 10) & 1) != 0) } #[doc = "Bit 11"] #[inline(always)] pub fn ten_dcdc18_1_aon(&self) -> TEN_DCDC18_1_AON_R { - TEN_DCDC18_1_AON_R::new(((self.bits >> 11) & 0x01) != 0) + TEN_DCDC18_1_AON_R::new(((self.bits >> 11) & 1) != 0) } - #[doc = "Bit 10"] - #[inline(always)] - pub fn ten_dcdc18_0_aon(&self) -> TEN_DCDC18_0_AON_R { - TEN_DCDC18_0_AON_R::new(((self.bits >> 10) & 0x01) != 0) - } - #[doc = "Bit 9"] + #[doc = "Bit 12"] #[inline(always)] - pub fn ten_ldo11soc_aon(&self) -> TEN_LDO11SOC_AON_R { - TEN_LDO11SOC_AON_R::new(((self.bits >> 9) & 0x01) != 0) + pub fn ten_bg_sys_aon(&self) -> TEN_BG_SYS_AON_R { + TEN_BG_SYS_AON_R::new(((self.bits >> 12) & 1) != 0) } - #[doc = "Bit 8"] + #[doc = "Bit 16"] #[inline(always)] - pub fn ten_vddcore_aon(&self) -> TEN_VDDCORE_AON_R { - TEN_VDDCORE_AON_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn ten_ldo15rf_aon(&self) -> TEN_LDO15RF_AON_R { + TEN_LDO15RF_AON_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 6"] + #[doc = "Bit 17"] #[inline(always)] - pub fn ten_xtal32k(&self) -> TEN_XTAL32K_R { - TEN_XTAL32K_R::new(((self.bits >> 6) & 0x01) != 0) + pub fn ten_xtal_aon(&self) -> TEN_XTAL_AON_R { + TEN_XTAL_AON_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bit 5"] + #[doc = "Bit 18"] #[inline(always)] - pub fn dten_xtal32k(&self) -> DTEN_XTAL32K_R { - DTEN_XTAL32K_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn dten_xtal_aon(&self) -> DTEN_XTAL_AON_R { + DTEN_XTAL_AON_R::new(((self.bits >> 18) & 1) != 0) } - #[doc = "Bit 4"] + #[doc = "Bit 19"] #[inline(always)] - pub fn ten_aon(&self) -> TEN_AON_R { - TEN_AON_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn ten_mbg_aon(&self) -> TEN_MBG_AON_R { + TEN_MBG_AON_R::new(((self.bits >> 19) & 1) != 0) } - #[doc = "Bits 0:2"] + #[doc = "Bit 20"] #[inline(always)] - pub fn tmux_aon(&self) -> TMUX_AON_R { - TMUX_AON_R::new((self.bits & 0x07) as u8) + pub fn ten_cip_misc_aon(&self) -> TEN_CIP_MISC_AON_R { + TEN_CIP_MISC_AON_R::new(((self.bits >> 20) & 1) != 0) } } impl W { - #[doc = "Bit 20"] + #[doc = "Bits 0:2"] #[inline(always)] - pub fn ten_cip_misc_aon(&mut self) -> TEN_CIP_MISC_AON_W { - TEN_CIP_MISC_AON_W { w: self } + #[must_use] + pub fn tmux_aon(&mut self) -> TMUX_AON_W<0> { + TMUX_AON_W::new(self) } - #[doc = "Bit 19"] + #[doc = "Bit 4"] #[inline(always)] - pub fn ten_mbg_aon(&mut self) -> TEN_MBG_AON_W { - TEN_MBG_AON_W { w: self } + #[must_use] + pub fn ten_aon(&mut self) -> TEN_AON_W<4> { + TEN_AON_W::new(self) } - #[doc = "Bit 18"] + #[doc = "Bit 5"] #[inline(always)] - pub fn dten_xtal_aon(&mut self) -> DTEN_XTAL_AON_W { - DTEN_XTAL_AON_W { w: self } + #[must_use] + pub fn dten_xtal32k(&mut self) -> DTEN_XTAL32K_W<5> { + DTEN_XTAL32K_W::new(self) } - #[doc = "Bit 17"] + #[doc = "Bit 6"] #[inline(always)] - pub fn ten_xtal_aon(&mut self) -> TEN_XTAL_AON_W { - TEN_XTAL_AON_W { w: self } + #[must_use] + pub fn ten_xtal32k(&mut self) -> TEN_XTAL32K_W<6> { + TEN_XTAL32K_W::new(self) } - #[doc = "Bit 16"] + #[doc = "Bit 8"] #[inline(always)] - pub fn ten_ldo15rf_aon(&mut self) -> TEN_LDO15RF_AON_W { - TEN_LDO15RF_AON_W { w: self } + #[must_use] + pub fn ten_vddcore_aon(&mut self) -> TEN_VDDCORE_AON_W<8> { + TEN_VDDCORE_AON_W::new(self) } - #[doc = "Bit 12"] + #[doc = "Bit 9"] #[inline(always)] - pub fn ten_bg_sys_aon(&mut self) -> TEN_BG_SYS_AON_W { - TEN_BG_SYS_AON_W { w: self } + #[must_use] + pub fn ten_ldo11soc_aon(&mut self) -> TEN_LDO11SOC_AON_W<9> { + TEN_LDO11SOC_AON_W::new(self) } - #[doc = "Bit 11"] + #[doc = "Bit 10"] #[inline(always)] - pub fn ten_dcdc18_1_aon(&mut self) -> TEN_DCDC18_1_AON_W { - TEN_DCDC18_1_AON_W { w: self } + #[must_use] + pub fn ten_dcdc18_0_aon(&mut self) -> TEN_DCDC18_0_AON_W<10> { + TEN_DCDC18_0_AON_W::new(self) } - #[doc = "Bit 10"] + #[doc = "Bit 11"] #[inline(always)] - pub fn ten_dcdc18_0_aon(&mut self) -> TEN_DCDC18_0_AON_W { - TEN_DCDC18_0_AON_W { w: self } + #[must_use] + pub fn ten_dcdc18_1_aon(&mut self) -> TEN_DCDC18_1_AON_W<11> { + TEN_DCDC18_1_AON_W::new(self) } - #[doc = "Bit 9"] + #[doc = "Bit 12"] #[inline(always)] - pub fn ten_ldo11soc_aon(&mut self) -> TEN_LDO11SOC_AON_W { - TEN_LDO11SOC_AON_W { w: self } + #[must_use] + pub fn ten_bg_sys_aon(&mut self) -> TEN_BG_SYS_AON_W<12> { + TEN_BG_SYS_AON_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bit 16"] #[inline(always)] - pub fn ten_vddcore_aon(&mut self) -> TEN_VDDCORE_AON_W { - TEN_VDDCORE_AON_W { w: self } + #[must_use] + pub fn ten_ldo15rf_aon(&mut self) -> TEN_LDO15RF_AON_W<16> { + TEN_LDO15RF_AON_W::new(self) } - #[doc = "Bit 6"] + #[doc = "Bit 17"] #[inline(always)] - pub fn ten_xtal32k(&mut self) -> TEN_XTAL32K_W { - TEN_XTAL32K_W { w: self } + #[must_use] + pub fn ten_xtal_aon(&mut self) -> TEN_XTAL_AON_W<17> { + TEN_XTAL_AON_W::new(self) } - #[doc = "Bit 5"] + #[doc = "Bit 18"] #[inline(always)] - pub fn dten_xtal32k(&mut self) -> DTEN_XTAL32K_W { - DTEN_XTAL32K_W { w: self } + #[must_use] + pub fn dten_xtal_aon(&mut self) -> DTEN_XTAL_AON_W<18> { + DTEN_XTAL_AON_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 19"] #[inline(always)] - pub fn ten_aon(&mut self) -> TEN_AON_W { - TEN_AON_W { w: self } + #[must_use] + pub fn ten_mbg_aon(&mut self) -> TEN_MBG_AON_W<19> { + TEN_MBG_AON_W::new(self) } - #[doc = "Bits 0:2"] + #[doc = "Bit 20"] #[inline(always)] - pub fn tmux_aon(&mut self) -> TMUX_AON_W { - TMUX_AON_W { w: self } + #[must_use] + pub fn ten_cip_misc_aon(&mut self) -> TEN_CIP_MISC_AON_W<20> { + TEN_CIP_MISC_AON_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -687,11 +266,10 @@ impl crate::Readable for AON_COMMON_SPEC { #[doc = "`write(|w| ..)` method takes [aon_common::W](W) writer structure"] impl crate::Writable for AON_COMMON_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets aon_common to value 0"] impl crate::Resettable for AON_COMMON_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/aon/aon_misc.rs b/src/aon/aon_misc.rs index d6183d4..cb15f2e 100644 --- a/src/aon/aon_misc.rs +++ b/src/aon/aon_misc.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,107 +28,47 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `sw_wb_en_aon` reader - "] -pub struct SW_WB_EN_AON_R(crate::FieldReader); -impl SW_WB_EN_AON_R { - pub(crate) fn new(bits: bool) -> Self { - SW_WB_EN_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SW_WB_EN_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sw_wb_en_aon` writer - "] -pub struct SW_WB_EN_AON_W<'a> { - w: &'a mut W, -} -impl<'a> SW_WB_EN_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `sw_soc_en_aon` reader - "] -pub struct SW_SOC_EN_AON_R(crate::FieldReader); -impl SW_SOC_EN_AON_R { - pub(crate) fn new(bits: bool) -> Self { - SW_SOC_EN_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SW_SOC_EN_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SW_SOC_EN_AON_R = crate::BitReader; #[doc = "Field `sw_soc_en_aon` writer - "] -pub struct SW_SOC_EN_AON_W<'a> { - w: &'a mut W, -} -impl<'a> SW_SOC_EN_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type SW_SOC_EN_AON_W<'a, const O: u8> = crate::BitWriter<'a, u32, AON_MISC_SPEC, bool, O>; +#[doc = "Field `sw_wb_en_aon` reader - "] +pub type SW_WB_EN_AON_R = crate::BitReader; +#[doc = "Field `sw_wb_en_aon` writer - "] +pub type SW_WB_EN_AON_W<'a, const O: u8> = crate::BitWriter<'a, u32, AON_MISC_SPEC, bool, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn sw_soc_en_aon(&self) -> SW_SOC_EN_AON_R { + SW_SOC_EN_AON_R::new((self.bits & 1) != 0) } -} -impl R { #[doc = "Bit 1"] #[inline(always)] pub fn sw_wb_en_aon(&self) -> SW_WB_EN_AON_R { - SW_WB_EN_AON_R::new(((self.bits >> 1) & 0x01) != 0) - } - #[doc = "Bit 0"] - #[inline(always)] - pub fn sw_soc_en_aon(&self) -> SW_SOC_EN_AON_R { - SW_SOC_EN_AON_R::new((self.bits & 0x01) != 0) + SW_WB_EN_AON_R::new(((self.bits >> 1) & 1) != 0) } } impl W { - #[doc = "Bit 1"] + #[doc = "Bit 0"] #[inline(always)] - pub fn sw_wb_en_aon(&mut self) -> SW_WB_EN_AON_W { - SW_WB_EN_AON_W { w: self } + #[must_use] + pub fn sw_soc_en_aon(&mut self) -> SW_SOC_EN_AON_W<0> { + SW_SOC_EN_AON_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 1"] #[inline(always)] - pub fn sw_soc_en_aon(&mut self) -> SW_SOC_EN_AON_W { - SW_SOC_EN_AON_W { w: self } + #[must_use] + pub fn sw_wb_en_aon(&mut self) -> SW_WB_EN_AON_W<1> { + SW_WB_EN_AON_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -145,11 +86,10 @@ impl crate::Readable for AON_MISC_SPEC { #[doc = "`write(|w| ..)` method takes [aon_misc::W](W) writer structure"] impl crate::Writable for AON_MISC_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets aon_misc to value 0x03"] impl crate::Resettable for AON_MISC_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x03 - } + const RESET_VALUE: Self::Ux = 0x03; } diff --git a/src/aon/bg_sys_top.rs b/src/aon/bg_sys_top.rs index b87ccbf..61cee59 100644 --- a/src/aon/bg_sys_top.rs +++ b/src/aon/bg_sys_top.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,143 +28,63 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `bg_sys_start_ctrl_aon` reader - "] -pub struct BG_SYS_START_CTRL_AON_R(crate::FieldReader); -impl BG_SYS_START_CTRL_AON_R { - pub(crate) fn new(bits: bool) -> Self { - BG_SYS_START_CTRL_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for BG_SYS_START_CTRL_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `bg_sys_start_ctrl_aon` writer - "] -pub struct BG_SYS_START_CTRL_AON_W<'a> { - w: &'a mut W, -} -impl<'a> BG_SYS_START_CTRL_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} -#[doc = "Field `pu_bg_sys_aon` reader - "] -pub struct PU_BG_SYS_AON_R(crate::FieldReader); -impl PU_BG_SYS_AON_R { - pub(crate) fn new(bits: bool) -> Self { - PU_BG_SYS_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_BG_SYS_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_bg_sys_aon` writer - "] -pub struct PU_BG_SYS_AON_W<'a> { - w: &'a mut W, -} -impl<'a> PU_BG_SYS_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} #[doc = "Field `pmip_resv` reader - "] -pub struct PMIP_RESV_R(crate::FieldReader); -impl PMIP_RESV_R { - pub(crate) fn new(bits: u8) -> Self { - PMIP_RESV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PMIP_RESV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PMIP_RESV_R = crate::FieldReader; #[doc = "Field `pmip_resv` writer - "] -pub struct PMIP_RESV_W<'a> { - w: &'a mut W, -} -impl<'a> PMIP_RESV_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff); - self.w - } -} +pub type PMIP_RESV_W<'a, const O: u8> = crate::FieldWriter<'a, u32, BG_SYS_TOP_SPEC, u8, u8, 8, O>; +#[doc = "Field `pu_bg_sys_aon` reader - "] +pub type PU_BG_SYS_AON_R = crate::BitReader; +#[doc = "Field `pu_bg_sys_aon` writer - "] +pub type PU_BG_SYS_AON_W<'a, const O: u8> = crate::BitWriter<'a, u32, BG_SYS_TOP_SPEC, bool, O>; +#[doc = "Field `bg_sys_start_ctrl_aon` reader - "] +pub type BG_SYS_START_CTRL_AON_R = crate::BitReader; +#[doc = "Field `bg_sys_start_ctrl_aon` writer - "] +pub type BG_SYS_START_CTRL_AON_W<'a, const O: u8> = + crate::BitWriter<'a, u32, BG_SYS_TOP_SPEC, bool, O>; impl R { - #[doc = "Bit 12"] + #[doc = "Bits 0:7"] #[inline(always)] - pub fn bg_sys_start_ctrl_aon(&self) -> BG_SYS_START_CTRL_AON_R { - BG_SYS_START_CTRL_AON_R::new(((self.bits >> 12) & 0x01) != 0) + pub fn pmip_resv(&self) -> PMIP_RESV_R { + PMIP_RESV_R::new((self.bits & 0xff) as u8) } #[doc = "Bit 8"] #[inline(always)] pub fn pu_bg_sys_aon(&self) -> PU_BG_SYS_AON_R { - PU_BG_SYS_AON_R::new(((self.bits >> 8) & 0x01) != 0) + PU_BG_SYS_AON_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bits 0:7"] + #[doc = "Bit 12"] #[inline(always)] - pub fn pmip_resv(&self) -> PMIP_RESV_R { - PMIP_RESV_R::new((self.bits & 0xff) as u8) + pub fn bg_sys_start_ctrl_aon(&self) -> BG_SYS_START_CTRL_AON_R { + BG_SYS_START_CTRL_AON_R::new(((self.bits >> 12) & 1) != 0) } } impl W { - #[doc = "Bit 12"] + #[doc = "Bits 0:7"] #[inline(always)] - pub fn bg_sys_start_ctrl_aon(&mut self) -> BG_SYS_START_CTRL_AON_W { - BG_SYS_START_CTRL_AON_W { w: self } + #[must_use] + pub fn pmip_resv(&mut self) -> PMIP_RESV_W<0> { + PMIP_RESV_W::new(self) } #[doc = "Bit 8"] #[inline(always)] - pub fn pu_bg_sys_aon(&mut self) -> PU_BG_SYS_AON_W { - PU_BG_SYS_AON_W { w: self } + #[must_use] + pub fn pu_bg_sys_aon(&mut self) -> PU_BG_SYS_AON_W<8> { + PU_BG_SYS_AON_W::new(self) } - #[doc = "Bits 0:7"] + #[doc = "Bit 12"] #[inline(always)] - pub fn pmip_resv(&mut self) -> PMIP_RESV_W { - PMIP_RESV_W { w: self } + #[must_use] + pub fn bg_sys_start_ctrl_aon(&mut self) -> BG_SYS_START_CTRL_AON_W<12> { + BG_SYS_START_CTRL_AON_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -181,11 +102,10 @@ impl crate::Readable for BG_SYS_TOP_SPEC { #[doc = "`write(|w| ..)` method takes [bg_sys_top::W](W) writer structure"] impl crate::Writable for BG_SYS_TOP_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets bg_sys_top to value 0x1100"] impl crate::Resettable for BG_SYS_TOP_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x1100 - } + const RESET_VALUE: Self::Ux = 0x1100; } diff --git a/src/aon/dcdc18_top_0.rs b/src/aon/dcdc18_top_0.rs index c00e0fa..5cdbeb1 100644 --- a/src/aon/dcdc18_top_0.rs +++ b/src/aon/dcdc18_top_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,398 +28,168 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `dcdc18_rdy_aon` reader - "] -pub struct DCDC18_RDY_AON_R(crate::FieldReader); -impl DCDC18_RDY_AON_R { - pub(crate) fn new(bits: bool) -> Self { - DCDC18_RDY_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DCDC18_RDY_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dcdc18_sstart_time_aon` reader - "] -pub struct DCDC18_SSTART_TIME_AON_R(crate::FieldReader); -impl DCDC18_SSTART_TIME_AON_R { - pub(crate) fn new(bits: u8) -> Self { - DCDC18_SSTART_TIME_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DCDC18_SSTART_TIME_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dcdc18_sstart_time_aon` writer - "] -pub struct DCDC18_SSTART_TIME_AON_W<'a> { - w: &'a mut W, -} -impl<'a> DCDC18_SSTART_TIME_AON_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 28)) | ((value as u32 & 0x03) << 28); - self.w - } -} -#[doc = "Field `dcdc18_osc_inhibit_t2_aon` reader - "] -pub struct DCDC18_OSC_INHIBIT_T2_AON_R(crate::FieldReader); -impl DCDC18_OSC_INHIBIT_T2_AON_R { - pub(crate) fn new(bits: bool) -> Self { - DCDC18_OSC_INHIBIT_T2_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DCDC18_OSC_INHIBIT_T2_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dcdc18_osc_inhibit_t2_aon` writer - "] -pub struct DCDC18_OSC_INHIBIT_T2_AON_W<'a> { - w: &'a mut W, -} -impl<'a> DCDC18_OSC_INHIBIT_T2_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 27)) | ((value as u32 & 0x01) << 27); - self.w - } -} -#[doc = "Field `dcdc18_slow_osc_aon` reader - "] -pub struct DCDC18_SLOW_OSC_AON_R(crate::FieldReader); -impl DCDC18_SLOW_OSC_AON_R { - pub(crate) fn new(bits: bool) -> Self { - DCDC18_SLOW_OSC_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DCDC18_SLOW_OSC_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dcdc18_slow_osc_aon` writer - "] -pub struct DCDC18_SLOW_OSC_AON_W<'a> { - w: &'a mut W, -} -impl<'a> DCDC18_SLOW_OSC_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 26)) | ((value as u32 & 0x01) << 26); - self.w - } -} -#[doc = "Field `dcdc18_stop_osc_aon` reader - "] -pub struct DCDC18_STOP_OSC_AON_R(crate::FieldReader); -impl DCDC18_STOP_OSC_AON_R { - pub(crate) fn new(bits: bool) -> Self { - DCDC18_STOP_OSC_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DCDC18_STOP_OSC_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dcdc18_stop_osc_aon` writer - "] -pub struct DCDC18_STOP_OSC_AON_W<'a> { - w: &'a mut W, -} -impl<'a> DCDC18_STOP_OSC_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 25)) | ((value as u32 & 0x01) << 25); - self.w - } -} -#[doc = "Field `dcdc18_slope_curr_sel_aon` reader - "] -pub struct DCDC18_SLOPE_CURR_SEL_AON_R(crate::FieldReader); -impl DCDC18_SLOPE_CURR_SEL_AON_R { - pub(crate) fn new(bits: u8) -> Self { - DCDC18_SLOPE_CURR_SEL_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DCDC18_SLOPE_CURR_SEL_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dcdc18_slope_curr_sel_aon` writer - "] -pub struct DCDC18_SLOPE_CURR_SEL_AON_W<'a> { - w: &'a mut W, -} -impl<'a> DCDC18_SLOPE_CURR_SEL_AON_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 20)) | ((value as u32 & 0x1f) << 20); - self.w - } -} -#[doc = "Field `dcdc18_osc_freq_trim_aon` reader - "] -pub struct DCDC18_OSC_FREQ_TRIM_AON_R(crate::FieldReader); -impl DCDC18_OSC_FREQ_TRIM_AON_R { - pub(crate) fn new(bits: u8) -> Self { - DCDC18_OSC_FREQ_TRIM_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DCDC18_OSC_FREQ_TRIM_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dcdc18_osc_freq_trim_aon` writer - "] -pub struct DCDC18_OSC_FREQ_TRIM_AON_W<'a> { - w: &'a mut W, -} -impl<'a> DCDC18_OSC_FREQ_TRIM_AON_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 16)) | ((value as u32 & 0x0f) << 16); - self.w - } -} -#[doc = "Field `dcdc18_osc_2m_mode_aon` reader - "] -pub struct DCDC18_OSC_2M_MODE_AON_R(crate::FieldReader); -impl DCDC18_OSC_2M_MODE_AON_R { - pub(crate) fn new(bits: bool) -> Self { - DCDC18_OSC_2M_MODE_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DCDC18_OSC_2M_MODE_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dcdc18_osc_2m_mode_aon` writer - "] -pub struct DCDC18_OSC_2M_MODE_AON_W<'a> { - w: &'a mut W, -} -impl<'a> DCDC18_OSC_2M_MODE_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} -#[doc = "Field `dcdc18_vpfm_aon` reader - "] -pub struct DCDC18_VPFM_AON_R(crate::FieldReader); -impl DCDC18_VPFM_AON_R { - pub(crate) fn new(bits: u8) -> Self { - DCDC18_VPFM_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DCDC18_VPFM_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dcdc18_vpfm_aon` writer - "] -pub struct DCDC18_VPFM_AON_W<'a> { - w: &'a mut W, -} -impl<'a> DCDC18_VPFM_AON_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 8)) | ((value as u32 & 0x0f) << 8); - self.w - } -} #[doc = "Field `dcdc18_vout_sel_aon` reader - "] -pub struct DCDC18_VOUT_SEL_AON_R(crate::FieldReader); -impl DCDC18_VOUT_SEL_AON_R { - pub(crate) fn new(bits: u8) -> Self { - DCDC18_VOUT_SEL_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DCDC18_VOUT_SEL_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type DCDC18_VOUT_SEL_AON_R = crate::FieldReader; #[doc = "Field `dcdc18_vout_sel_aon` writer - "] -pub struct DCDC18_VOUT_SEL_AON_W<'a> { - w: &'a mut W, -} -impl<'a> DCDC18_VOUT_SEL_AON_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 1)) | ((value as u32 & 0x1f) << 1); - self.w - } -} +pub type DCDC18_VOUT_SEL_AON_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DCDC18_TOP_0_SPEC, u8, u8, 5, O>; +#[doc = "Field `dcdc18_vpfm_aon` reader - "] +pub type DCDC18_VPFM_AON_R = crate::FieldReader; +#[doc = "Field `dcdc18_vpfm_aon` writer - "] +pub type DCDC18_VPFM_AON_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DCDC18_TOP_0_SPEC, u8, u8, 4, O>; +#[doc = "Field `dcdc18_osc_2m_mode_aon` reader - "] +pub type DCDC18_OSC_2M_MODE_AON_R = crate::BitReader; +#[doc = "Field `dcdc18_osc_2m_mode_aon` writer - "] +pub type DCDC18_OSC_2M_MODE_AON_W<'a, const O: u8> = + crate::BitWriter<'a, u32, DCDC18_TOP_0_SPEC, bool, O>; +#[doc = "Field `dcdc18_osc_freq_trim_aon` reader - "] +pub type DCDC18_OSC_FREQ_TRIM_AON_R = crate::FieldReader; +#[doc = "Field `dcdc18_osc_freq_trim_aon` writer - "] +pub type DCDC18_OSC_FREQ_TRIM_AON_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DCDC18_TOP_0_SPEC, u8, u8, 4, O>; +#[doc = "Field `dcdc18_slope_curr_sel_aon` reader - "] +pub type DCDC18_SLOPE_CURR_SEL_AON_R = crate::FieldReader; +#[doc = "Field `dcdc18_slope_curr_sel_aon` writer - "] +pub type DCDC18_SLOPE_CURR_SEL_AON_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DCDC18_TOP_0_SPEC, u8, u8, 5, O>; +#[doc = "Field `dcdc18_stop_osc_aon` reader - "] +pub type DCDC18_STOP_OSC_AON_R = crate::BitReader; +#[doc = "Field `dcdc18_stop_osc_aon` writer - "] +pub type DCDC18_STOP_OSC_AON_W<'a, const O: u8> = + crate::BitWriter<'a, u32, DCDC18_TOP_0_SPEC, bool, O>; +#[doc = "Field `dcdc18_slow_osc_aon` reader - "] +pub type DCDC18_SLOW_OSC_AON_R = crate::BitReader; +#[doc = "Field `dcdc18_slow_osc_aon` writer - "] +pub type DCDC18_SLOW_OSC_AON_W<'a, const O: u8> = + crate::BitWriter<'a, u32, DCDC18_TOP_0_SPEC, bool, O>; +#[doc = "Field `dcdc18_osc_inhibit_t2_aon` reader - "] +pub type DCDC18_OSC_INHIBIT_T2_AON_R = crate::BitReader; +#[doc = "Field `dcdc18_osc_inhibit_t2_aon` writer - "] +pub type DCDC18_OSC_INHIBIT_T2_AON_W<'a, const O: u8> = + crate::BitWriter<'a, u32, DCDC18_TOP_0_SPEC, bool, O>; +#[doc = "Field `dcdc18_sstart_time_aon` reader - "] +pub type DCDC18_SSTART_TIME_AON_R = crate::FieldReader; +#[doc = "Field `dcdc18_sstart_time_aon` writer - "] +pub type DCDC18_SSTART_TIME_AON_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DCDC18_TOP_0_SPEC, u8, u8, 2, O>; +#[doc = "Field `dcdc18_rdy_aon` reader - "] +pub type DCDC18_RDY_AON_R = crate::BitReader; impl R { - #[doc = "Bit 31"] - #[inline(always)] - pub fn dcdc18_rdy_aon(&self) -> DCDC18_RDY_AON_R { - DCDC18_RDY_AON_R::new(((self.bits >> 31) & 0x01) != 0) - } - #[doc = "Bits 28:29"] + #[doc = "Bits 1:5"] #[inline(always)] - pub fn dcdc18_sstart_time_aon(&self) -> DCDC18_SSTART_TIME_AON_R { - DCDC18_SSTART_TIME_AON_R::new(((self.bits >> 28) & 0x03) as u8) + pub fn dcdc18_vout_sel_aon(&self) -> DCDC18_VOUT_SEL_AON_R { + DCDC18_VOUT_SEL_AON_R::new(((self.bits >> 1) & 0x1f) as u8) } - #[doc = "Bit 27"] + #[doc = "Bits 8:11"] #[inline(always)] - pub fn dcdc18_osc_inhibit_t2_aon(&self) -> DCDC18_OSC_INHIBIT_T2_AON_R { - DCDC18_OSC_INHIBIT_T2_AON_R::new(((self.bits >> 27) & 0x01) != 0) + pub fn dcdc18_vpfm_aon(&self) -> DCDC18_VPFM_AON_R { + DCDC18_VPFM_AON_R::new(((self.bits >> 8) & 0x0f) as u8) } - #[doc = "Bit 26"] + #[doc = "Bit 12"] #[inline(always)] - pub fn dcdc18_slow_osc_aon(&self) -> DCDC18_SLOW_OSC_AON_R { - DCDC18_SLOW_OSC_AON_R::new(((self.bits >> 26) & 0x01) != 0) + pub fn dcdc18_osc_2m_mode_aon(&self) -> DCDC18_OSC_2M_MODE_AON_R { + DCDC18_OSC_2M_MODE_AON_R::new(((self.bits >> 12) & 1) != 0) } - #[doc = "Bit 25"] + #[doc = "Bits 16:19"] #[inline(always)] - pub fn dcdc18_stop_osc_aon(&self) -> DCDC18_STOP_OSC_AON_R { - DCDC18_STOP_OSC_AON_R::new(((self.bits >> 25) & 0x01) != 0) + pub fn dcdc18_osc_freq_trim_aon(&self) -> DCDC18_OSC_FREQ_TRIM_AON_R { + DCDC18_OSC_FREQ_TRIM_AON_R::new(((self.bits >> 16) & 0x0f) as u8) } #[doc = "Bits 20:24"] #[inline(always)] pub fn dcdc18_slope_curr_sel_aon(&self) -> DCDC18_SLOPE_CURR_SEL_AON_R { DCDC18_SLOPE_CURR_SEL_AON_R::new(((self.bits >> 20) & 0x1f) as u8) } - #[doc = "Bits 16:19"] + #[doc = "Bit 25"] #[inline(always)] - pub fn dcdc18_osc_freq_trim_aon(&self) -> DCDC18_OSC_FREQ_TRIM_AON_R { - DCDC18_OSC_FREQ_TRIM_AON_R::new(((self.bits >> 16) & 0x0f) as u8) + pub fn dcdc18_stop_osc_aon(&self) -> DCDC18_STOP_OSC_AON_R { + DCDC18_STOP_OSC_AON_R::new(((self.bits >> 25) & 1) != 0) } - #[doc = "Bit 12"] + #[doc = "Bit 26"] #[inline(always)] - pub fn dcdc18_osc_2m_mode_aon(&self) -> DCDC18_OSC_2M_MODE_AON_R { - DCDC18_OSC_2M_MODE_AON_R::new(((self.bits >> 12) & 0x01) != 0) + pub fn dcdc18_slow_osc_aon(&self) -> DCDC18_SLOW_OSC_AON_R { + DCDC18_SLOW_OSC_AON_R::new(((self.bits >> 26) & 1) != 0) } - #[doc = "Bits 8:11"] + #[doc = "Bit 27"] #[inline(always)] - pub fn dcdc18_vpfm_aon(&self) -> DCDC18_VPFM_AON_R { - DCDC18_VPFM_AON_R::new(((self.bits >> 8) & 0x0f) as u8) + pub fn dcdc18_osc_inhibit_t2_aon(&self) -> DCDC18_OSC_INHIBIT_T2_AON_R { + DCDC18_OSC_INHIBIT_T2_AON_R::new(((self.bits >> 27) & 1) != 0) } - #[doc = "Bits 1:5"] + #[doc = "Bits 28:29"] #[inline(always)] - pub fn dcdc18_vout_sel_aon(&self) -> DCDC18_VOUT_SEL_AON_R { - DCDC18_VOUT_SEL_AON_R::new(((self.bits >> 1) & 0x1f) as u8) + pub fn dcdc18_sstart_time_aon(&self) -> DCDC18_SSTART_TIME_AON_R { + DCDC18_SSTART_TIME_AON_R::new(((self.bits >> 28) & 3) as u8) + } + #[doc = "Bit 31"] + #[inline(always)] + pub fn dcdc18_rdy_aon(&self) -> DCDC18_RDY_AON_R { + DCDC18_RDY_AON_R::new(((self.bits >> 31) & 1) != 0) } } impl W { - #[doc = "Bits 28:29"] + #[doc = "Bits 1:5"] #[inline(always)] - pub fn dcdc18_sstart_time_aon(&mut self) -> DCDC18_SSTART_TIME_AON_W { - DCDC18_SSTART_TIME_AON_W { w: self } + #[must_use] + pub fn dcdc18_vout_sel_aon(&mut self) -> DCDC18_VOUT_SEL_AON_W<1> { + DCDC18_VOUT_SEL_AON_W::new(self) } - #[doc = "Bit 27"] + #[doc = "Bits 8:11"] #[inline(always)] - pub fn dcdc18_osc_inhibit_t2_aon(&mut self) -> DCDC18_OSC_INHIBIT_T2_AON_W { - DCDC18_OSC_INHIBIT_T2_AON_W { w: self } + #[must_use] + pub fn dcdc18_vpfm_aon(&mut self) -> DCDC18_VPFM_AON_W<8> { + DCDC18_VPFM_AON_W::new(self) } - #[doc = "Bit 26"] + #[doc = "Bit 12"] #[inline(always)] - pub fn dcdc18_slow_osc_aon(&mut self) -> DCDC18_SLOW_OSC_AON_W { - DCDC18_SLOW_OSC_AON_W { w: self } + #[must_use] + pub fn dcdc18_osc_2m_mode_aon(&mut self) -> DCDC18_OSC_2M_MODE_AON_W<12> { + DCDC18_OSC_2M_MODE_AON_W::new(self) } - #[doc = "Bit 25"] + #[doc = "Bits 16:19"] #[inline(always)] - pub fn dcdc18_stop_osc_aon(&mut self) -> DCDC18_STOP_OSC_AON_W { - DCDC18_STOP_OSC_AON_W { w: self } + #[must_use] + pub fn dcdc18_osc_freq_trim_aon(&mut self) -> DCDC18_OSC_FREQ_TRIM_AON_W<16> { + DCDC18_OSC_FREQ_TRIM_AON_W::new(self) } #[doc = "Bits 20:24"] #[inline(always)] - pub fn dcdc18_slope_curr_sel_aon(&mut self) -> DCDC18_SLOPE_CURR_SEL_AON_W { - DCDC18_SLOPE_CURR_SEL_AON_W { w: self } + #[must_use] + pub fn dcdc18_slope_curr_sel_aon(&mut self) -> DCDC18_SLOPE_CURR_SEL_AON_W<20> { + DCDC18_SLOPE_CURR_SEL_AON_W::new(self) } - #[doc = "Bits 16:19"] + #[doc = "Bit 25"] #[inline(always)] - pub fn dcdc18_osc_freq_trim_aon(&mut self) -> DCDC18_OSC_FREQ_TRIM_AON_W { - DCDC18_OSC_FREQ_TRIM_AON_W { w: self } + #[must_use] + pub fn dcdc18_stop_osc_aon(&mut self) -> DCDC18_STOP_OSC_AON_W<25> { + DCDC18_STOP_OSC_AON_W::new(self) } - #[doc = "Bit 12"] + #[doc = "Bit 26"] #[inline(always)] - pub fn dcdc18_osc_2m_mode_aon(&mut self) -> DCDC18_OSC_2M_MODE_AON_W { - DCDC18_OSC_2M_MODE_AON_W { w: self } + #[must_use] + pub fn dcdc18_slow_osc_aon(&mut self) -> DCDC18_SLOW_OSC_AON_W<26> { + DCDC18_SLOW_OSC_AON_W::new(self) } - #[doc = "Bits 8:11"] + #[doc = "Bit 27"] #[inline(always)] - pub fn dcdc18_vpfm_aon(&mut self) -> DCDC18_VPFM_AON_W { - DCDC18_VPFM_AON_W { w: self } + #[must_use] + pub fn dcdc18_osc_inhibit_t2_aon(&mut self) -> DCDC18_OSC_INHIBIT_T2_AON_W<27> { + DCDC18_OSC_INHIBIT_T2_AON_W::new(self) } - #[doc = "Bits 1:5"] + #[doc = "Bits 28:29"] #[inline(always)] - pub fn dcdc18_vout_sel_aon(&mut self) -> DCDC18_VOUT_SEL_AON_W { - DCDC18_VOUT_SEL_AON_W { w: self } + #[must_use] + pub fn dcdc18_sstart_time_aon(&mut self) -> DCDC18_SSTART_TIME_AON_W<28> { + DCDC18_SSTART_TIME_AON_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -436,11 +207,10 @@ impl crate::Readable for DCDC18_TOP_0_SPEC { #[doc = "`write(|w| ..)` method takes [dcdc18_top_0::W](W) writer structure"] impl crate::Writable for DCDC18_TOP_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets dcdc18_top_0 to value 0x8a58_0736"] impl crate::Resettable for DCDC18_TOP_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x8a58_0736 - } + const RESET_VALUE: Self::Ux = 0x8a58_0736; } diff --git a/src/aon/dcdc18_top_1.rs b/src/aon/dcdc18_top_1.rs index 6d6354a..ed2fab0 100644 --- a/src/aon/dcdc18_top_1.rs +++ b/src/aon/dcdc18_top_1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,369 +28,161 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `dcdc18_pulldown_aon` reader - "] -pub struct DCDC18_PULLDOWN_AON_R(crate::FieldReader); -impl DCDC18_PULLDOWN_AON_R { - pub(crate) fn new(bits: bool) -> Self { - DCDC18_PULLDOWN_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DCDC18_PULLDOWN_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dcdc18_pulldown_aon` writer - "] -pub struct DCDC18_PULLDOWN_AON_W<'a> { - w: &'a mut W, -} -impl<'a> DCDC18_PULLDOWN_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 29)) | ((value as u32 & 0x01) << 29); - self.w - } -} -#[doc = "Field `dcdc18_en_antiring_aon` reader - "] -pub struct DCDC18_EN_ANTIRING_AON_R(crate::FieldReader); -impl DCDC18_EN_ANTIRING_AON_R { - pub(crate) fn new(bits: bool) -> Self { - DCDC18_EN_ANTIRING_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DCDC18_EN_ANTIRING_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dcdc18_en_antiring_aon` writer - "] -pub struct DCDC18_EN_ANTIRING_AON_W<'a> { - w: &'a mut W, -} -impl<'a> DCDC18_EN_ANTIRING_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 28)) | ((value as u32 & 0x01) << 28); - self.w - } -} -#[doc = "Field `dcdc18_cfb_sel_aon` reader - "] -pub struct DCDC18_CFB_SEL_AON_R(crate::FieldReader); -impl DCDC18_CFB_SEL_AON_R { - pub(crate) fn new(bits: u8) -> Self { - DCDC18_CFB_SEL_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DCDC18_CFB_SEL_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dcdc18_cfb_sel_aon` writer - "] -pub struct DCDC18_CFB_SEL_AON_W<'a> { - w: &'a mut W, -} -impl<'a> DCDC18_CFB_SEL_AON_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 24)) | ((value as u32 & 0x0f) << 24); - self.w - } -} -#[doc = "Field `dcdc18_chf_sel_aon` reader - "] -pub struct DCDC18_CHF_SEL_AON_R(crate::FieldReader); -impl DCDC18_CHF_SEL_AON_R { - pub(crate) fn new(bits: u8) -> Self { - DCDC18_CHF_SEL_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DCDC18_CHF_SEL_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dcdc18_chf_sel_aon` writer - "] -pub struct DCDC18_CHF_SEL_AON_W<'a> { - w: &'a mut W, -} -impl<'a> DCDC18_CHF_SEL_AON_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 20)) | ((value as u32 & 0x0f) << 20); - self.w - } -} -#[doc = "Field `dcdc18_rc_sel_aon` reader - "] -pub struct DCDC18_RC_SEL_AON_R(crate::FieldReader); -impl DCDC18_RC_SEL_AON_R { - pub(crate) fn new(bits: u8) -> Self { - DCDC18_RC_SEL_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DCDC18_RC_SEL_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dcdc18_rc_sel_aon` writer - "] -pub struct DCDC18_RC_SEL_AON_W<'a> { - w: &'a mut W, -} -impl<'a> DCDC18_RC_SEL_AON_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 16)) | ((value as u32 & 0x0f) << 16); - self.w - } -} -#[doc = "Field `dcdc18_nonoverlap_td_aon` reader - "] -pub struct DCDC18_NONOVERLAP_TD_AON_R(crate::FieldReader); -impl DCDC18_NONOVERLAP_TD_AON_R { - pub(crate) fn new(bits: u8) -> Self { - DCDC18_NONOVERLAP_TD_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DCDC18_NONOVERLAP_TD_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dcdc18_nonoverlap_td_aon` writer - "] -pub struct DCDC18_NONOVERLAP_TD_AON_W<'a> { - w: &'a mut W, -} -impl<'a> DCDC18_NONOVERLAP_TD_AON_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 8)) | ((value as u32 & 0x1f) << 8); - self.w - } -} -#[doc = "Field `dcdc18_zvs_td_opt_aon` reader - "] -pub struct DCDC18_ZVS_TD_OPT_AON_R(crate::FieldReader); -impl DCDC18_ZVS_TD_OPT_AON_R { - pub(crate) fn new(bits: u8) -> Self { - DCDC18_ZVS_TD_OPT_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DCDC18_ZVS_TD_OPT_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dcdc18_zvs_td_opt_aon` writer - "] -pub struct DCDC18_ZVS_TD_OPT_AON_W<'a> { - w: &'a mut W, -} -impl<'a> DCDC18_ZVS_TD_OPT_AON_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 4)) | ((value as u32 & 0x07) << 4); - self.w - } -} -#[doc = "Field `dcdc18_cs_delay_aon` reader - "] -pub struct DCDC18_CS_DELAY_AON_R(crate::FieldReader); -impl DCDC18_CS_DELAY_AON_R { - pub(crate) fn new(bits: u8) -> Self { - DCDC18_CS_DELAY_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DCDC18_CS_DELAY_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dcdc18_cs_delay_aon` writer - "] -pub struct DCDC18_CS_DELAY_AON_W<'a> { - w: &'a mut W, -} -impl<'a> DCDC18_CS_DELAY_AON_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 1)) | ((value as u32 & 0x07) << 1); - self.w - } -} #[doc = "Field `dcdc18_force_cs_zvs_aon` reader - "] -pub struct DCDC18_FORCE_CS_ZVS_AON_R(crate::FieldReader); -impl DCDC18_FORCE_CS_ZVS_AON_R { - pub(crate) fn new(bits: bool) -> Self { - DCDC18_FORCE_CS_ZVS_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DCDC18_FORCE_CS_ZVS_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type DCDC18_FORCE_CS_ZVS_AON_R = crate::BitReader; #[doc = "Field `dcdc18_force_cs_zvs_aon` writer - "] -pub struct DCDC18_FORCE_CS_ZVS_AON_W<'a> { - w: &'a mut W, -} -impl<'a> DCDC18_FORCE_CS_ZVS_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type DCDC18_FORCE_CS_ZVS_AON_W<'a, const O: u8> = + crate::BitWriter<'a, u32, DCDC18_TOP_1_SPEC, bool, O>; +#[doc = "Field `dcdc18_cs_delay_aon` reader - "] +pub type DCDC18_CS_DELAY_AON_R = crate::FieldReader; +#[doc = "Field `dcdc18_cs_delay_aon` writer - "] +pub type DCDC18_CS_DELAY_AON_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DCDC18_TOP_1_SPEC, u8, u8, 3, O>; +#[doc = "Field `dcdc18_zvs_td_opt_aon` reader - "] +pub type DCDC18_ZVS_TD_OPT_AON_R = crate::FieldReader; +#[doc = "Field `dcdc18_zvs_td_opt_aon` writer - "] +pub type DCDC18_ZVS_TD_OPT_AON_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DCDC18_TOP_1_SPEC, u8, u8, 3, O>; +#[doc = "Field `dcdc18_nonoverlap_td_aon` reader - "] +pub type DCDC18_NONOVERLAP_TD_AON_R = crate::FieldReader; +#[doc = "Field `dcdc18_nonoverlap_td_aon` writer - "] +pub type DCDC18_NONOVERLAP_TD_AON_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DCDC18_TOP_1_SPEC, u8, u8, 5, O>; +#[doc = "Field `dcdc18_rc_sel_aon` reader - "] +pub type DCDC18_RC_SEL_AON_R = crate::FieldReader; +#[doc = "Field `dcdc18_rc_sel_aon` writer - "] +pub type DCDC18_RC_SEL_AON_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DCDC18_TOP_1_SPEC, u8, u8, 4, O>; +#[doc = "Field `dcdc18_chf_sel_aon` reader - "] +pub type DCDC18_CHF_SEL_AON_R = crate::FieldReader; +#[doc = "Field `dcdc18_chf_sel_aon` writer - "] +pub type DCDC18_CHF_SEL_AON_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DCDC18_TOP_1_SPEC, u8, u8, 4, O>; +#[doc = "Field `dcdc18_cfb_sel_aon` reader - "] +pub type DCDC18_CFB_SEL_AON_R = crate::FieldReader; +#[doc = "Field `dcdc18_cfb_sel_aon` writer - "] +pub type DCDC18_CFB_SEL_AON_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DCDC18_TOP_1_SPEC, u8, u8, 4, O>; +#[doc = "Field `dcdc18_en_antiring_aon` reader - "] +pub type DCDC18_EN_ANTIRING_AON_R = crate::BitReader; +#[doc = "Field `dcdc18_en_antiring_aon` writer - "] +pub type DCDC18_EN_ANTIRING_AON_W<'a, const O: u8> = + crate::BitWriter<'a, u32, DCDC18_TOP_1_SPEC, bool, O>; +#[doc = "Field `dcdc18_pulldown_aon` reader - "] +pub type DCDC18_PULLDOWN_AON_R = crate::BitReader; +#[doc = "Field `dcdc18_pulldown_aon` writer - "] +pub type DCDC18_PULLDOWN_AON_W<'a, const O: u8> = + crate::BitWriter<'a, u32, DCDC18_TOP_1_SPEC, bool, O>; impl R { - #[doc = "Bit 29"] + #[doc = "Bit 0"] #[inline(always)] - pub fn dcdc18_pulldown_aon(&self) -> DCDC18_PULLDOWN_AON_R { - DCDC18_PULLDOWN_AON_R::new(((self.bits >> 29) & 0x01) != 0) + pub fn dcdc18_force_cs_zvs_aon(&self) -> DCDC18_FORCE_CS_ZVS_AON_R { + DCDC18_FORCE_CS_ZVS_AON_R::new((self.bits & 1) != 0) } - #[doc = "Bit 28"] + #[doc = "Bits 1:3"] #[inline(always)] - pub fn dcdc18_en_antiring_aon(&self) -> DCDC18_EN_ANTIRING_AON_R { - DCDC18_EN_ANTIRING_AON_R::new(((self.bits >> 28) & 0x01) != 0) + pub fn dcdc18_cs_delay_aon(&self) -> DCDC18_CS_DELAY_AON_R { + DCDC18_CS_DELAY_AON_R::new(((self.bits >> 1) & 7) as u8) } - #[doc = "Bits 24:27"] + #[doc = "Bits 4:6"] #[inline(always)] - pub fn dcdc18_cfb_sel_aon(&self) -> DCDC18_CFB_SEL_AON_R { - DCDC18_CFB_SEL_AON_R::new(((self.bits >> 24) & 0x0f) as u8) + pub fn dcdc18_zvs_td_opt_aon(&self) -> DCDC18_ZVS_TD_OPT_AON_R { + DCDC18_ZVS_TD_OPT_AON_R::new(((self.bits >> 4) & 7) as u8) } - #[doc = "Bits 20:23"] + #[doc = "Bits 8:12"] #[inline(always)] - pub fn dcdc18_chf_sel_aon(&self) -> DCDC18_CHF_SEL_AON_R { - DCDC18_CHF_SEL_AON_R::new(((self.bits >> 20) & 0x0f) as u8) + pub fn dcdc18_nonoverlap_td_aon(&self) -> DCDC18_NONOVERLAP_TD_AON_R { + DCDC18_NONOVERLAP_TD_AON_R::new(((self.bits >> 8) & 0x1f) as u8) } #[doc = "Bits 16:19"] #[inline(always)] pub fn dcdc18_rc_sel_aon(&self) -> DCDC18_RC_SEL_AON_R { DCDC18_RC_SEL_AON_R::new(((self.bits >> 16) & 0x0f) as u8) } - #[doc = "Bits 8:12"] + #[doc = "Bits 20:23"] #[inline(always)] - pub fn dcdc18_nonoverlap_td_aon(&self) -> DCDC18_NONOVERLAP_TD_AON_R { - DCDC18_NONOVERLAP_TD_AON_R::new(((self.bits >> 8) & 0x1f) as u8) + pub fn dcdc18_chf_sel_aon(&self) -> DCDC18_CHF_SEL_AON_R { + DCDC18_CHF_SEL_AON_R::new(((self.bits >> 20) & 0x0f) as u8) } - #[doc = "Bits 4:6"] + #[doc = "Bits 24:27"] #[inline(always)] - pub fn dcdc18_zvs_td_opt_aon(&self) -> DCDC18_ZVS_TD_OPT_AON_R { - DCDC18_ZVS_TD_OPT_AON_R::new(((self.bits >> 4) & 0x07) as u8) + pub fn dcdc18_cfb_sel_aon(&self) -> DCDC18_CFB_SEL_AON_R { + DCDC18_CFB_SEL_AON_R::new(((self.bits >> 24) & 0x0f) as u8) } - #[doc = "Bits 1:3"] + #[doc = "Bit 28"] #[inline(always)] - pub fn dcdc18_cs_delay_aon(&self) -> DCDC18_CS_DELAY_AON_R { - DCDC18_CS_DELAY_AON_R::new(((self.bits >> 1) & 0x07) as u8) + pub fn dcdc18_en_antiring_aon(&self) -> DCDC18_EN_ANTIRING_AON_R { + DCDC18_EN_ANTIRING_AON_R::new(((self.bits >> 28) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 29"] #[inline(always)] - pub fn dcdc18_force_cs_zvs_aon(&self) -> DCDC18_FORCE_CS_ZVS_AON_R { - DCDC18_FORCE_CS_ZVS_AON_R::new((self.bits & 0x01) != 0) + pub fn dcdc18_pulldown_aon(&self) -> DCDC18_PULLDOWN_AON_R { + DCDC18_PULLDOWN_AON_R::new(((self.bits >> 29) & 1) != 0) } } impl W { - #[doc = "Bit 29"] + #[doc = "Bit 0"] #[inline(always)] - pub fn dcdc18_pulldown_aon(&mut self) -> DCDC18_PULLDOWN_AON_W { - DCDC18_PULLDOWN_AON_W { w: self } + #[must_use] + pub fn dcdc18_force_cs_zvs_aon(&mut self) -> DCDC18_FORCE_CS_ZVS_AON_W<0> { + DCDC18_FORCE_CS_ZVS_AON_W::new(self) } - #[doc = "Bit 28"] + #[doc = "Bits 1:3"] #[inline(always)] - pub fn dcdc18_en_antiring_aon(&mut self) -> DCDC18_EN_ANTIRING_AON_W { - DCDC18_EN_ANTIRING_AON_W { w: self } + #[must_use] + pub fn dcdc18_cs_delay_aon(&mut self) -> DCDC18_CS_DELAY_AON_W<1> { + DCDC18_CS_DELAY_AON_W::new(self) } - #[doc = "Bits 24:27"] + #[doc = "Bits 4:6"] #[inline(always)] - pub fn dcdc18_cfb_sel_aon(&mut self) -> DCDC18_CFB_SEL_AON_W { - DCDC18_CFB_SEL_AON_W { w: self } + #[must_use] + pub fn dcdc18_zvs_td_opt_aon(&mut self) -> DCDC18_ZVS_TD_OPT_AON_W<4> { + DCDC18_ZVS_TD_OPT_AON_W::new(self) } - #[doc = "Bits 20:23"] + #[doc = "Bits 8:12"] #[inline(always)] - pub fn dcdc18_chf_sel_aon(&mut self) -> DCDC18_CHF_SEL_AON_W { - DCDC18_CHF_SEL_AON_W { w: self } + #[must_use] + pub fn dcdc18_nonoverlap_td_aon(&mut self) -> DCDC18_NONOVERLAP_TD_AON_W<8> { + DCDC18_NONOVERLAP_TD_AON_W::new(self) } #[doc = "Bits 16:19"] #[inline(always)] - pub fn dcdc18_rc_sel_aon(&mut self) -> DCDC18_RC_SEL_AON_W { - DCDC18_RC_SEL_AON_W { w: self } + #[must_use] + pub fn dcdc18_rc_sel_aon(&mut self) -> DCDC18_RC_SEL_AON_W<16> { + DCDC18_RC_SEL_AON_W::new(self) } - #[doc = "Bits 8:12"] + #[doc = "Bits 20:23"] #[inline(always)] - pub fn dcdc18_nonoverlap_td_aon(&mut self) -> DCDC18_NONOVERLAP_TD_AON_W { - DCDC18_NONOVERLAP_TD_AON_W { w: self } + #[must_use] + pub fn dcdc18_chf_sel_aon(&mut self) -> DCDC18_CHF_SEL_AON_W<20> { + DCDC18_CHF_SEL_AON_W::new(self) } - #[doc = "Bits 4:6"] + #[doc = "Bits 24:27"] #[inline(always)] - pub fn dcdc18_zvs_td_opt_aon(&mut self) -> DCDC18_ZVS_TD_OPT_AON_W { - DCDC18_ZVS_TD_OPT_AON_W { w: self } + #[must_use] + pub fn dcdc18_cfb_sel_aon(&mut self) -> DCDC18_CFB_SEL_AON_W<24> { + DCDC18_CFB_SEL_AON_W::new(self) } - #[doc = "Bits 1:3"] + #[doc = "Bit 28"] #[inline(always)] - pub fn dcdc18_cs_delay_aon(&mut self) -> DCDC18_CS_DELAY_AON_W { - DCDC18_CS_DELAY_AON_W { w: self } + #[must_use] + pub fn dcdc18_en_antiring_aon(&mut self) -> DCDC18_EN_ANTIRING_AON_W<28> { + DCDC18_EN_ANTIRING_AON_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 29"] #[inline(always)] - pub fn dcdc18_force_cs_zvs_aon(&mut self) -> DCDC18_FORCE_CS_ZVS_AON_W { - DCDC18_FORCE_CS_ZVS_AON_W { w: self } + #[must_use] + pub fn dcdc18_pulldown_aon(&mut self) -> DCDC18_PULLDOWN_AON_W<29> { + DCDC18_PULLDOWN_AON_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -407,11 +200,10 @@ impl crate::Readable for DCDC18_TOP_1_SPEC { #[doc = "`write(|w| ..)` method takes [dcdc18_top_1::W](W) writer structure"] impl crate::Writable for DCDC18_TOP_1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets dcdc18_top_1 to value 0x1818_0048"] impl crate::Resettable for DCDC18_TOP_1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x1818_0048 - } + const RESET_VALUE: Self::Ux = 0x1818_0048; } diff --git a/src/aon/gpadc_reg_cmd.rs b/src/aon/gpadc_reg_cmd.rs index 6f77b71..1a57233 100644 --- a/src/aon/gpadc_reg_cmd.rs +++ b/src/aon/gpadc_reg_cmd.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,757 +28,286 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `gpadc_sen_test_en` reader - "] -pub struct GPADC_SEN_TEST_EN_R(crate::FieldReader); -impl GPADC_SEN_TEST_EN_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_SEN_TEST_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_SEN_TEST_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_sen_test_en` writer - "] -pub struct GPADC_SEN_TEST_EN_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_SEN_TEST_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 30)) | ((value as u32 & 0x01) << 30); - self.w - } -} -#[doc = "Field `gpadc_sen_sel` reader - "] -pub struct GPADC_SEN_SEL_R(crate::FieldReader); -impl GPADC_SEN_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_SEN_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_SEN_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_sen_sel` writer - "] -pub struct GPADC_SEN_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_SEN_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 28)) | ((value as u32 & 0x03) << 28); - self.w - } -} -#[doc = "Field `gpadc_chip_sen_pu` reader - "] -pub struct GPADC_CHIP_SEN_PU_R(crate::FieldReader); -impl GPADC_CHIP_SEN_PU_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_CHIP_SEN_PU_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_CHIP_SEN_PU_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_chip_sen_pu` writer - "] -pub struct GPADC_CHIP_SEN_PU_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_CHIP_SEN_PU_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 27)) | ((value as u32 & 0x01) << 27); - self.w - } -} -#[doc = "Field `gpadc_micboost_32db_en` reader - "] -pub struct GPADC_MICBOOST_32DB_EN_R(crate::FieldReader); -impl GPADC_MICBOOST_32DB_EN_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_MICBOOST_32DB_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_MICBOOST_32DB_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_micboost_32db_en` writer - "] -pub struct GPADC_MICBOOST_32DB_EN_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_MICBOOST_32DB_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23); - self.w - } -} -#[doc = "Field `gpadc_mic_pga2_gain` reader - "] -pub struct GPADC_MIC_PGA2_GAIN_R(crate::FieldReader); -impl GPADC_MIC_PGA2_GAIN_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_MIC_PGA2_GAIN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_MIC_PGA2_GAIN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_mic_pga2_gain` writer - "] -pub struct GPADC_MIC_PGA2_GAIN_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_MIC_PGA2_GAIN_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 21)) | ((value as u32 & 0x03) << 21); - self.w - } -} -#[doc = "Field `gpadc_mic1_diff` reader - "] -pub struct GPADC_MIC1_DIFF_R(crate::FieldReader); -impl GPADC_MIC1_DIFF_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_MIC1_DIFF_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_MIC1_DIFF_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_mic1_diff` writer - "] -pub struct GPADC_MIC1_DIFF_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_MIC1_DIFF_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w - } -} -#[doc = "Field `gpadc_mic2_diff` reader - "] -pub struct GPADC_MIC2_DIFF_R(crate::FieldReader); -impl GPADC_MIC2_DIFF_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_MIC2_DIFF_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_MIC2_DIFF_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_mic2_diff` writer - "] -pub struct GPADC_MIC2_DIFF_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_MIC2_DIFF_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 19)) | ((value as u32 & 0x01) << 19); - self.w - } -} -#[doc = "Field `gpadc_dwa_en` reader - "] -pub struct GPADC_DWA_EN_R(crate::FieldReader); -impl GPADC_DWA_EN_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_DWA_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_DWA_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_dwa_en` writer - "] -pub struct GPADC_DWA_EN_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_DWA_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18); - self.w - } -} -#[doc = "Field `gpadc_byp_micboost` reader - "] -pub struct GPADC_BYP_MICBOOST_R(crate::FieldReader); -impl GPADC_BYP_MICBOOST_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_BYP_MICBOOST_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_BYP_MICBOOST_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_byp_micboost` writer - "] -pub struct GPADC_BYP_MICBOOST_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_BYP_MICBOOST_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `gpadc_micpga_en` reader - "] -pub struct GPADC_MICPGA_EN_R(crate::FieldReader); -impl GPADC_MICPGA_EN_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_MICPGA_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_MICPGA_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_micpga_en` writer - "] -pub struct GPADC_MICPGA_EN_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_MICPGA_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15); - self.w - } -} -#[doc = "Field `gpadc_micbias_en` reader - "] -pub struct GPADC_MICBIAS_EN_R(crate::FieldReader); -impl GPADC_MICBIAS_EN_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_MICBIAS_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_MICBIAS_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_micbias_en` writer - "] -pub struct GPADC_MICBIAS_EN_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_MICBIAS_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14); - self.w - } -} -#[doc = "Field `gpadc_neg_gnd` reader - "] -pub struct GPADC_NEG_GND_R(crate::FieldReader); -impl GPADC_NEG_GND_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_NEG_GND_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_NEG_GND_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_neg_gnd` writer - "] -pub struct GPADC_NEG_GND_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_NEG_GND_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13); - self.w - } -} -#[doc = "Field `gpadc_pos_sel` reader - "] -pub struct GPADC_POS_SEL_R(crate::FieldReader); -impl GPADC_POS_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_POS_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_POS_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_pos_sel` writer - "] -pub struct GPADC_POS_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_POS_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 8)) | ((value as u32 & 0x1f) << 8); - self.w - } -} -#[doc = "Field `gpadc_neg_sel` reader - "] -pub struct GPADC_NEG_SEL_R(crate::FieldReader); -impl GPADC_NEG_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_NEG_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_NEG_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_neg_sel` writer - "] -pub struct GPADC_NEG_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_NEG_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 3)) | ((value as u32 & 0x1f) << 3); - self.w - } -} -#[doc = "Field `gpadc_soft_rst` reader - "] -pub struct GPADC_SOFT_RST_R(crate::FieldReader); -impl GPADC_SOFT_RST_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_SOFT_RST_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_SOFT_RST_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_soft_rst` writer - "] -pub struct GPADC_SOFT_RST_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_SOFT_RST_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `gpadc_conv_start` reader - "] -pub struct GPADC_CONV_START_R(crate::FieldReader); -impl GPADC_CONV_START_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_CONV_START_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_CONV_START_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_conv_start` writer - "] -pub struct GPADC_CONV_START_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_CONV_START_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `gpadc_global_en` reader - "] -pub struct GPADC_GLOBAL_EN_R(crate::FieldReader); -impl GPADC_GLOBAL_EN_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_GLOBAL_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_GLOBAL_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type GPADC_GLOBAL_EN_R = crate::BitReader; #[doc = "Field `gpadc_global_en` writer - "] -pub struct GPADC_GLOBAL_EN_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_GLOBAL_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type GPADC_GLOBAL_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPADC_REG_CMD_SPEC, bool, O>; +#[doc = "Field `gpadc_conv_start` reader - "] +pub type GPADC_CONV_START_R = crate::BitReader; +#[doc = "Field `gpadc_conv_start` writer - "] +pub type GPADC_CONV_START_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPADC_REG_CMD_SPEC, bool, O>; +#[doc = "Field `gpadc_soft_rst` reader - "] +pub type GPADC_SOFT_RST_R = crate::BitReader; +#[doc = "Field `gpadc_soft_rst` writer - "] +pub type GPADC_SOFT_RST_W<'a, const O: u8> = crate::BitWriter<'a, u32, GPADC_REG_CMD_SPEC, bool, O>; +#[doc = "Field `gpadc_neg_sel` reader - "] +pub type GPADC_NEG_SEL_R = crate::FieldReader; +#[doc = "Field `gpadc_neg_sel` writer - "] +pub type GPADC_NEG_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_CMD_SPEC, u8, u8, 5, O>; +#[doc = "Field `gpadc_pos_sel` reader - "] +pub type GPADC_POS_SEL_R = crate::FieldReader; +#[doc = "Field `gpadc_pos_sel` writer - "] +pub type GPADC_POS_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_CMD_SPEC, u8, u8, 5, O>; +#[doc = "Field `gpadc_neg_gnd` reader - "] +pub type GPADC_NEG_GND_R = crate::BitReader; +#[doc = "Field `gpadc_neg_gnd` writer - "] +pub type GPADC_NEG_GND_W<'a, const O: u8> = crate::BitWriter<'a, u32, GPADC_REG_CMD_SPEC, bool, O>; +#[doc = "Field `gpadc_micbias_en` reader - "] +pub type GPADC_MICBIAS_EN_R = crate::BitReader; +#[doc = "Field `gpadc_micbias_en` writer - "] +pub type GPADC_MICBIAS_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPADC_REG_CMD_SPEC, bool, O>; +#[doc = "Field `gpadc_micpga_en` reader - "] +pub type GPADC_MICPGA_EN_R = crate::BitReader; +#[doc = "Field `gpadc_micpga_en` writer - "] +pub type GPADC_MICPGA_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPADC_REG_CMD_SPEC, bool, O>; +#[doc = "Field `gpadc_byp_micboost` reader - "] +pub type GPADC_BYP_MICBOOST_R = crate::BitReader; +#[doc = "Field `gpadc_byp_micboost` writer - "] +pub type GPADC_BYP_MICBOOST_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPADC_REG_CMD_SPEC, bool, O>; +#[doc = "Field `gpadc_dwa_en` reader - "] +pub type GPADC_DWA_EN_R = crate::BitReader; +#[doc = "Field `gpadc_dwa_en` writer - "] +pub type GPADC_DWA_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, GPADC_REG_CMD_SPEC, bool, O>; +#[doc = "Field `gpadc_mic2_diff` reader - "] +pub type GPADC_MIC2_DIFF_R = crate::BitReader; +#[doc = "Field `gpadc_mic2_diff` writer - "] +pub type GPADC_MIC2_DIFF_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPADC_REG_CMD_SPEC, bool, O>; +#[doc = "Field `gpadc_mic1_diff` reader - "] +pub type GPADC_MIC1_DIFF_R = crate::BitReader; +#[doc = "Field `gpadc_mic1_diff` writer - "] +pub type GPADC_MIC1_DIFF_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPADC_REG_CMD_SPEC, bool, O>; +#[doc = "Field `gpadc_mic_pga2_gain` reader - "] +pub type GPADC_MIC_PGA2_GAIN_R = crate::FieldReader; +#[doc = "Field `gpadc_mic_pga2_gain` writer - "] +pub type GPADC_MIC_PGA2_GAIN_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_CMD_SPEC, u8, u8, 2, O>; +#[doc = "Field `gpadc_micboost_32db_en` reader - "] +pub type GPADC_MICBOOST_32DB_EN_R = crate::BitReader; +#[doc = "Field `gpadc_micboost_32db_en` writer - "] +pub type GPADC_MICBOOST_32DB_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPADC_REG_CMD_SPEC, bool, O>; +#[doc = "Field `gpadc_chip_sen_pu` reader - "] +pub type GPADC_CHIP_SEN_PU_R = crate::BitReader; +#[doc = "Field `gpadc_chip_sen_pu` writer - "] +pub type GPADC_CHIP_SEN_PU_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPADC_REG_CMD_SPEC, bool, O>; +#[doc = "Field `gpadc_sen_sel` reader - "] +pub type GPADC_SEN_SEL_R = crate::FieldReader; +#[doc = "Field `gpadc_sen_sel` writer - "] +pub type GPADC_SEN_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_CMD_SPEC, u8, u8, 2, O>; +#[doc = "Field `gpadc_sen_test_en` reader - "] +pub type GPADC_SEN_TEST_EN_R = crate::BitReader; +#[doc = "Field `gpadc_sen_test_en` writer - "] +pub type GPADC_SEN_TEST_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPADC_REG_CMD_SPEC, bool, O>; impl R { - #[doc = "Bit 30"] + #[doc = "Bit 0"] #[inline(always)] - pub fn gpadc_sen_test_en(&self) -> GPADC_SEN_TEST_EN_R { - GPADC_SEN_TEST_EN_R::new(((self.bits >> 30) & 0x01) != 0) + pub fn gpadc_global_en(&self) -> GPADC_GLOBAL_EN_R { + GPADC_GLOBAL_EN_R::new((self.bits & 1) != 0) } - #[doc = "Bits 28:29"] + #[doc = "Bit 1"] #[inline(always)] - pub fn gpadc_sen_sel(&self) -> GPADC_SEN_SEL_R { - GPADC_SEN_SEL_R::new(((self.bits >> 28) & 0x03) as u8) + pub fn gpadc_conv_start(&self) -> GPADC_CONV_START_R { + GPADC_CONV_START_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 27"] + #[doc = "Bit 2"] #[inline(always)] - pub fn gpadc_chip_sen_pu(&self) -> GPADC_CHIP_SEN_PU_R { - GPADC_CHIP_SEN_PU_R::new(((self.bits >> 27) & 0x01) != 0) + pub fn gpadc_soft_rst(&self) -> GPADC_SOFT_RST_R { + GPADC_SOFT_RST_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 23"] + #[doc = "Bits 3:7"] #[inline(always)] - pub fn gpadc_micboost_32db_en(&self) -> GPADC_MICBOOST_32DB_EN_R { - GPADC_MICBOOST_32DB_EN_R::new(((self.bits >> 23) & 0x01) != 0) + pub fn gpadc_neg_sel(&self) -> GPADC_NEG_SEL_R { + GPADC_NEG_SEL_R::new(((self.bits >> 3) & 0x1f) as u8) } - #[doc = "Bits 21:22"] + #[doc = "Bits 8:12"] #[inline(always)] - pub fn gpadc_mic_pga2_gain(&self) -> GPADC_MIC_PGA2_GAIN_R { - GPADC_MIC_PGA2_GAIN_R::new(((self.bits >> 21) & 0x03) as u8) + pub fn gpadc_pos_sel(&self) -> GPADC_POS_SEL_R { + GPADC_POS_SEL_R::new(((self.bits >> 8) & 0x1f) as u8) } - #[doc = "Bit 20"] + #[doc = "Bit 13"] #[inline(always)] - pub fn gpadc_mic1_diff(&self) -> GPADC_MIC1_DIFF_R { - GPADC_MIC1_DIFF_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn gpadc_neg_gnd(&self) -> GPADC_NEG_GND_R { + GPADC_NEG_GND_R::new(((self.bits >> 13) & 1) != 0) } - #[doc = "Bit 19"] + #[doc = "Bit 14"] #[inline(always)] - pub fn gpadc_mic2_diff(&self) -> GPADC_MIC2_DIFF_R { - GPADC_MIC2_DIFF_R::new(((self.bits >> 19) & 0x01) != 0) + pub fn gpadc_micbias_en(&self) -> GPADC_MICBIAS_EN_R { + GPADC_MICBIAS_EN_R::new(((self.bits >> 14) & 1) != 0) } - #[doc = "Bit 18"] + #[doc = "Bit 15"] #[inline(always)] - pub fn gpadc_dwa_en(&self) -> GPADC_DWA_EN_R { - GPADC_DWA_EN_R::new(((self.bits >> 18) & 0x01) != 0) + pub fn gpadc_micpga_en(&self) -> GPADC_MICPGA_EN_R { + GPADC_MICPGA_EN_R::new(((self.bits >> 15) & 1) != 0) } #[doc = "Bit 16"] #[inline(always)] pub fn gpadc_byp_micboost(&self) -> GPADC_BYP_MICBOOST_R { - GPADC_BYP_MICBOOST_R::new(((self.bits >> 16) & 0x01) != 0) + GPADC_BYP_MICBOOST_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 15"] + #[doc = "Bit 18"] #[inline(always)] - pub fn gpadc_micpga_en(&self) -> GPADC_MICPGA_EN_R { - GPADC_MICPGA_EN_R::new(((self.bits >> 15) & 0x01) != 0) + pub fn gpadc_dwa_en(&self) -> GPADC_DWA_EN_R { + GPADC_DWA_EN_R::new(((self.bits >> 18) & 1) != 0) } - #[doc = "Bit 14"] + #[doc = "Bit 19"] #[inline(always)] - pub fn gpadc_micbias_en(&self) -> GPADC_MICBIAS_EN_R { - GPADC_MICBIAS_EN_R::new(((self.bits >> 14) & 0x01) != 0) + pub fn gpadc_mic2_diff(&self) -> GPADC_MIC2_DIFF_R { + GPADC_MIC2_DIFF_R::new(((self.bits >> 19) & 1) != 0) } - #[doc = "Bit 13"] + #[doc = "Bit 20"] #[inline(always)] - pub fn gpadc_neg_gnd(&self) -> GPADC_NEG_GND_R { - GPADC_NEG_GND_R::new(((self.bits >> 13) & 0x01) != 0) + pub fn gpadc_mic1_diff(&self) -> GPADC_MIC1_DIFF_R { + GPADC_MIC1_DIFF_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bits 8:12"] + #[doc = "Bits 21:22"] #[inline(always)] - pub fn gpadc_pos_sel(&self) -> GPADC_POS_SEL_R { - GPADC_POS_SEL_R::new(((self.bits >> 8) & 0x1f) as u8) + pub fn gpadc_mic_pga2_gain(&self) -> GPADC_MIC_PGA2_GAIN_R { + GPADC_MIC_PGA2_GAIN_R::new(((self.bits >> 21) & 3) as u8) } - #[doc = "Bits 3:7"] + #[doc = "Bit 23"] #[inline(always)] - pub fn gpadc_neg_sel(&self) -> GPADC_NEG_SEL_R { - GPADC_NEG_SEL_R::new(((self.bits >> 3) & 0x1f) as u8) + pub fn gpadc_micboost_32db_en(&self) -> GPADC_MICBOOST_32DB_EN_R { + GPADC_MICBOOST_32DB_EN_R::new(((self.bits >> 23) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bit 27"] #[inline(always)] - pub fn gpadc_soft_rst(&self) -> GPADC_SOFT_RST_R { - GPADC_SOFT_RST_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn gpadc_chip_sen_pu(&self) -> GPADC_CHIP_SEN_PU_R { + GPADC_CHIP_SEN_PU_R::new(((self.bits >> 27) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bits 28:29"] #[inline(always)] - pub fn gpadc_conv_start(&self) -> GPADC_CONV_START_R { - GPADC_CONV_START_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn gpadc_sen_sel(&self) -> GPADC_SEN_SEL_R { + GPADC_SEN_SEL_R::new(((self.bits >> 28) & 3) as u8) } - #[doc = "Bit 0"] + #[doc = "Bit 30"] #[inline(always)] - pub fn gpadc_global_en(&self) -> GPADC_GLOBAL_EN_R { - GPADC_GLOBAL_EN_R::new((self.bits & 0x01) != 0) + pub fn gpadc_sen_test_en(&self) -> GPADC_SEN_TEST_EN_R { + GPADC_SEN_TEST_EN_R::new(((self.bits >> 30) & 1) != 0) } } impl W { - #[doc = "Bit 30"] + #[doc = "Bit 0"] #[inline(always)] - pub fn gpadc_sen_test_en(&mut self) -> GPADC_SEN_TEST_EN_W { - GPADC_SEN_TEST_EN_W { w: self } + #[must_use] + pub fn gpadc_global_en(&mut self) -> GPADC_GLOBAL_EN_W<0> { + GPADC_GLOBAL_EN_W::new(self) } - #[doc = "Bits 28:29"] + #[doc = "Bit 1"] #[inline(always)] - pub fn gpadc_sen_sel(&mut self) -> GPADC_SEN_SEL_W { - GPADC_SEN_SEL_W { w: self } + #[must_use] + pub fn gpadc_conv_start(&mut self) -> GPADC_CONV_START_W<1> { + GPADC_CONV_START_W::new(self) } - #[doc = "Bit 27"] + #[doc = "Bit 2"] #[inline(always)] - pub fn gpadc_chip_sen_pu(&mut self) -> GPADC_CHIP_SEN_PU_W { - GPADC_CHIP_SEN_PU_W { w: self } + #[must_use] + pub fn gpadc_soft_rst(&mut self) -> GPADC_SOFT_RST_W<2> { + GPADC_SOFT_RST_W::new(self) } - #[doc = "Bit 23"] + #[doc = "Bits 3:7"] #[inline(always)] - pub fn gpadc_micboost_32db_en(&mut self) -> GPADC_MICBOOST_32DB_EN_W { - GPADC_MICBOOST_32DB_EN_W { w: self } + #[must_use] + pub fn gpadc_neg_sel(&mut self) -> GPADC_NEG_SEL_W<3> { + GPADC_NEG_SEL_W::new(self) } - #[doc = "Bits 21:22"] + #[doc = "Bits 8:12"] #[inline(always)] - pub fn gpadc_mic_pga2_gain(&mut self) -> GPADC_MIC_PGA2_GAIN_W { - GPADC_MIC_PGA2_GAIN_W { w: self } + #[must_use] + pub fn gpadc_pos_sel(&mut self) -> GPADC_POS_SEL_W<8> { + GPADC_POS_SEL_W::new(self) } - #[doc = "Bit 20"] + #[doc = "Bit 13"] #[inline(always)] - pub fn gpadc_mic1_diff(&mut self) -> GPADC_MIC1_DIFF_W { - GPADC_MIC1_DIFF_W { w: self } + #[must_use] + pub fn gpadc_neg_gnd(&mut self) -> GPADC_NEG_GND_W<13> { + GPADC_NEG_GND_W::new(self) } - #[doc = "Bit 19"] + #[doc = "Bit 14"] #[inline(always)] - pub fn gpadc_mic2_diff(&mut self) -> GPADC_MIC2_DIFF_W { - GPADC_MIC2_DIFF_W { w: self } + #[must_use] + pub fn gpadc_micbias_en(&mut self) -> GPADC_MICBIAS_EN_W<14> { + GPADC_MICBIAS_EN_W::new(self) } - #[doc = "Bit 18"] + #[doc = "Bit 15"] #[inline(always)] - pub fn gpadc_dwa_en(&mut self) -> GPADC_DWA_EN_W { - GPADC_DWA_EN_W { w: self } + #[must_use] + pub fn gpadc_micpga_en(&mut self) -> GPADC_MICPGA_EN_W<15> { + GPADC_MICPGA_EN_W::new(self) } #[doc = "Bit 16"] #[inline(always)] - pub fn gpadc_byp_micboost(&mut self) -> GPADC_BYP_MICBOOST_W { - GPADC_BYP_MICBOOST_W { w: self } + #[must_use] + pub fn gpadc_byp_micboost(&mut self) -> GPADC_BYP_MICBOOST_W<16> { + GPADC_BYP_MICBOOST_W::new(self) } - #[doc = "Bit 15"] + #[doc = "Bit 18"] #[inline(always)] - pub fn gpadc_micpga_en(&mut self) -> GPADC_MICPGA_EN_W { - GPADC_MICPGA_EN_W { w: self } + #[must_use] + pub fn gpadc_dwa_en(&mut self) -> GPADC_DWA_EN_W<18> { + GPADC_DWA_EN_W::new(self) } - #[doc = "Bit 14"] + #[doc = "Bit 19"] #[inline(always)] - pub fn gpadc_micbias_en(&mut self) -> GPADC_MICBIAS_EN_W { - GPADC_MICBIAS_EN_W { w: self } + #[must_use] + pub fn gpadc_mic2_diff(&mut self) -> GPADC_MIC2_DIFF_W<19> { + GPADC_MIC2_DIFF_W::new(self) } - #[doc = "Bit 13"] + #[doc = "Bit 20"] #[inline(always)] - pub fn gpadc_neg_gnd(&mut self) -> GPADC_NEG_GND_W { - GPADC_NEG_GND_W { w: self } + #[must_use] + pub fn gpadc_mic1_diff(&mut self) -> GPADC_MIC1_DIFF_W<20> { + GPADC_MIC1_DIFF_W::new(self) } - #[doc = "Bits 8:12"] + #[doc = "Bits 21:22"] #[inline(always)] - pub fn gpadc_pos_sel(&mut self) -> GPADC_POS_SEL_W { - GPADC_POS_SEL_W { w: self } + #[must_use] + pub fn gpadc_mic_pga2_gain(&mut self) -> GPADC_MIC_PGA2_GAIN_W<21> { + GPADC_MIC_PGA2_GAIN_W::new(self) } - #[doc = "Bits 3:7"] + #[doc = "Bit 23"] #[inline(always)] - pub fn gpadc_neg_sel(&mut self) -> GPADC_NEG_SEL_W { - GPADC_NEG_SEL_W { w: self } + #[must_use] + pub fn gpadc_micboost_32db_en(&mut self) -> GPADC_MICBOOST_32DB_EN_W<23> { + GPADC_MICBOOST_32DB_EN_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bit 27"] #[inline(always)] - pub fn gpadc_soft_rst(&mut self) -> GPADC_SOFT_RST_W { - GPADC_SOFT_RST_W { w: self } + #[must_use] + pub fn gpadc_chip_sen_pu(&mut self) -> GPADC_CHIP_SEN_PU_W<27> { + GPADC_CHIP_SEN_PU_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bits 28:29"] #[inline(always)] - pub fn gpadc_conv_start(&mut self) -> GPADC_CONV_START_W { - GPADC_CONV_START_W { w: self } + #[must_use] + pub fn gpadc_sen_sel(&mut self) -> GPADC_SEN_SEL_W<28> { + GPADC_SEN_SEL_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 30"] #[inline(always)] - pub fn gpadc_global_en(&mut self) -> GPADC_GLOBAL_EN_W { - GPADC_GLOBAL_EN_W { w: self } + #[must_use] + pub fn gpadc_sen_test_en(&mut self) -> GPADC_SEN_TEST_EN_W<30> { + GPADC_SEN_TEST_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -795,11 +325,10 @@ impl crate::Readable for GPADC_REG_CMD_SPEC { #[doc = "`write(|w| ..)` method takes [gpadc_reg_cmd::W](W) writer structure"] impl crate::Writable for GPADC_REG_CMD_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets gpadc_reg_cmd to value 0x0f78"] impl crate::Resettable for GPADC_REG_CMD_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0f78 - } + const RESET_VALUE: Self::Ux = 0x0f78; } diff --git a/src/aon/gpadc_reg_config1.rs b/src/aon/gpadc_reg_config1.rs index 4ef358d..94d5e79 100644 --- a/src/aon/gpadc_reg_config1.rs +++ b/src/aon/gpadc_reg_config1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,425 +28,177 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `gpadc_v18_sel` reader - "] -pub struct GPADC_V18_SEL_R(crate::FieldReader); -impl GPADC_V18_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_V18_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_V18_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_v18_sel` writer - "] -pub struct GPADC_V18_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_V18_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 29)) | ((value as u32 & 0x03) << 29); - self.w - } -} -#[doc = "Field `gpadc_v11_sel` reader - "] -pub struct GPADC_V11_SEL_R(crate::FieldReader); -impl GPADC_V11_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_V11_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_V11_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_v11_sel` writer - "] -pub struct GPADC_V11_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_V11_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 27)) | ((value as u32 & 0x03) << 27); - self.w - } -} -#[doc = "Field `gpadc_dither_en` reader - "] -pub struct GPADC_DITHER_EN_R(crate::FieldReader); -impl GPADC_DITHER_EN_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_DITHER_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_DITHER_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_dither_en` writer - "] -pub struct GPADC_DITHER_EN_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_DITHER_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 26)) | ((value as u32 & 0x01) << 26); - self.w - } -} -#[doc = "Field `gpadc_scan_en` reader - "] -pub struct GPADC_SCAN_EN_R(crate::FieldReader); -impl GPADC_SCAN_EN_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_SCAN_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_SCAN_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_scan_en` writer - "] -pub struct GPADC_SCAN_EN_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_SCAN_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 25)) | ((value as u32 & 0x01) << 25); - self.w - } -} -#[doc = "Field `gpadc_scan_length` reader - "] -pub struct GPADC_SCAN_LENGTH_R(crate::FieldReader); -impl GPADC_SCAN_LENGTH_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_SCAN_LENGTH_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_SCAN_LENGTH_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_scan_length` writer - "] -pub struct GPADC_SCAN_LENGTH_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_SCAN_LENGTH_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 21)) | ((value as u32 & 0x0f) << 21); - self.w - } -} -#[doc = "Field `gpadc_clk_div_ratio` reader - "] -pub struct GPADC_CLK_DIV_RATIO_R(crate::FieldReader); -impl GPADC_CLK_DIV_RATIO_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_CLK_DIV_RATIO_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_CLK_DIV_RATIO_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_clk_div_ratio` writer - "] -pub struct GPADC_CLK_DIV_RATIO_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_CLK_DIV_RATIO_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 18)) | ((value as u32 & 0x07) << 18); - self.w - } -} -#[doc = "Field `gpadc_clk_ana_inv` reader - "] -pub struct GPADC_CLK_ANA_INV_R(crate::FieldReader); -impl GPADC_CLK_ANA_INV_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_CLK_ANA_INV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_CLK_ANA_INV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_clk_ana_inv` writer - "] -pub struct GPADC_CLK_ANA_INV_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_CLK_ANA_INV_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w - } -} -#[doc = "Field `gpadc_res_sel` reader - "] -pub struct GPADC_RES_SEL_R(crate::FieldReader); -impl GPADC_RES_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_RES_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_RES_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_res_sel` writer - "] -pub struct GPADC_RES_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_RES_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 2)) | ((value as u32 & 0x07) << 2); - self.w - } -} -#[doc = "Field `gpadc_cont_conv_en` reader - "] -pub struct GPADC_CONT_CONV_EN_R(crate::FieldReader); -impl GPADC_CONT_CONV_EN_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_CONT_CONV_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_CONT_CONV_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_cont_conv_en` writer - "] -pub struct GPADC_CONT_CONV_EN_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_CONT_CONV_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `gpadc_cal_os_en` reader - "] -pub struct GPADC_CAL_OS_EN_R(crate::FieldReader); -impl GPADC_CAL_OS_EN_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_CAL_OS_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_CAL_OS_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type GPADC_CAL_OS_EN_R = crate::BitReader; #[doc = "Field `gpadc_cal_os_en` writer - "] -pub struct GPADC_CAL_OS_EN_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_CAL_OS_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type GPADC_CAL_OS_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPADC_REG_CONFIG1_SPEC, bool, O>; +#[doc = "Field `gpadc_cont_conv_en` reader - "] +pub type GPADC_CONT_CONV_EN_R = crate::BitReader; +#[doc = "Field `gpadc_cont_conv_en` writer - "] +pub type GPADC_CONT_CONV_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPADC_REG_CONFIG1_SPEC, bool, O>; +#[doc = "Field `gpadc_res_sel` reader - "] +pub type GPADC_RES_SEL_R = crate::FieldReader; +#[doc = "Field `gpadc_res_sel` writer - "] +pub type GPADC_RES_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_CONFIG1_SPEC, u8, u8, 3, O>; +#[doc = "Field `gpadc_clk_ana_inv` reader - "] +pub type GPADC_CLK_ANA_INV_R = crate::BitReader; +#[doc = "Field `gpadc_clk_ana_inv` writer - "] +pub type GPADC_CLK_ANA_INV_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPADC_REG_CONFIG1_SPEC, bool, O>; +#[doc = "Field `gpadc_clk_div_ratio` reader - "] +pub type GPADC_CLK_DIV_RATIO_R = crate::FieldReader; +#[doc = "Field `gpadc_clk_div_ratio` writer - "] +pub type GPADC_CLK_DIV_RATIO_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_CONFIG1_SPEC, u8, u8, 3, O>; +#[doc = "Field `gpadc_scan_length` reader - "] +pub type GPADC_SCAN_LENGTH_R = crate::FieldReader; +#[doc = "Field `gpadc_scan_length` writer - "] +pub type GPADC_SCAN_LENGTH_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_CONFIG1_SPEC, u8, u8, 4, O>; +#[doc = "Field `gpadc_scan_en` reader - "] +pub type GPADC_SCAN_EN_R = crate::BitReader; +#[doc = "Field `gpadc_scan_en` writer - "] +pub type GPADC_SCAN_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPADC_REG_CONFIG1_SPEC, bool, O>; +#[doc = "Field `gpadc_dither_en` reader - "] +pub type GPADC_DITHER_EN_R = crate::BitReader; +#[doc = "Field `gpadc_dither_en` writer - "] +pub type GPADC_DITHER_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPADC_REG_CONFIG1_SPEC, bool, O>; +#[doc = "Field `gpadc_v11_sel` reader - "] +pub type GPADC_V11_SEL_R = crate::FieldReader; +#[doc = "Field `gpadc_v11_sel` writer - "] +pub type GPADC_V11_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_CONFIG1_SPEC, u8, u8, 2, O>; +#[doc = "Field `gpadc_v18_sel` reader - "] +pub type GPADC_V18_SEL_R = crate::FieldReader; +#[doc = "Field `gpadc_v18_sel` writer - "] +pub type GPADC_V18_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_CONFIG1_SPEC, u8, u8, 2, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn gpadc_cal_os_en(&self) -> GPADC_CAL_OS_EN_R { + GPADC_CAL_OS_EN_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bits 29:30"] + #[doc = "Bit 1"] #[inline(always)] - pub fn gpadc_v18_sel(&self) -> GPADC_V18_SEL_R { - GPADC_V18_SEL_R::new(((self.bits >> 29) & 0x03) as u8) + pub fn gpadc_cont_conv_en(&self) -> GPADC_CONT_CONV_EN_R { + GPADC_CONT_CONV_EN_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bits 27:28"] + #[doc = "Bits 2:4"] #[inline(always)] - pub fn gpadc_v11_sel(&self) -> GPADC_V11_SEL_R { - GPADC_V11_SEL_R::new(((self.bits >> 27) & 0x03) as u8) + pub fn gpadc_res_sel(&self) -> GPADC_RES_SEL_R { + GPADC_RES_SEL_R::new(((self.bits >> 2) & 7) as u8) } - #[doc = "Bit 26"] + #[doc = "Bit 17"] #[inline(always)] - pub fn gpadc_dither_en(&self) -> GPADC_DITHER_EN_R { - GPADC_DITHER_EN_R::new(((self.bits >> 26) & 0x01) != 0) + pub fn gpadc_clk_ana_inv(&self) -> GPADC_CLK_ANA_INV_R { + GPADC_CLK_ANA_INV_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bit 25"] + #[doc = "Bits 18:20"] #[inline(always)] - pub fn gpadc_scan_en(&self) -> GPADC_SCAN_EN_R { - GPADC_SCAN_EN_R::new(((self.bits >> 25) & 0x01) != 0) + pub fn gpadc_clk_div_ratio(&self) -> GPADC_CLK_DIV_RATIO_R { + GPADC_CLK_DIV_RATIO_R::new(((self.bits >> 18) & 7) as u8) } #[doc = "Bits 21:24"] #[inline(always)] pub fn gpadc_scan_length(&self) -> GPADC_SCAN_LENGTH_R { GPADC_SCAN_LENGTH_R::new(((self.bits >> 21) & 0x0f) as u8) } - #[doc = "Bits 18:20"] - #[inline(always)] - pub fn gpadc_clk_div_ratio(&self) -> GPADC_CLK_DIV_RATIO_R { - GPADC_CLK_DIV_RATIO_R::new(((self.bits >> 18) & 0x07) as u8) - } - #[doc = "Bit 17"] + #[doc = "Bit 25"] #[inline(always)] - pub fn gpadc_clk_ana_inv(&self) -> GPADC_CLK_ANA_INV_R { - GPADC_CLK_ANA_INV_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn gpadc_scan_en(&self) -> GPADC_SCAN_EN_R { + GPADC_SCAN_EN_R::new(((self.bits >> 25) & 1) != 0) } - #[doc = "Bits 2:4"] + #[doc = "Bit 26"] #[inline(always)] - pub fn gpadc_res_sel(&self) -> GPADC_RES_SEL_R { - GPADC_RES_SEL_R::new(((self.bits >> 2) & 0x07) as u8) + pub fn gpadc_dither_en(&self) -> GPADC_DITHER_EN_R { + GPADC_DITHER_EN_R::new(((self.bits >> 26) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bits 27:28"] #[inline(always)] - pub fn gpadc_cont_conv_en(&self) -> GPADC_CONT_CONV_EN_R { - GPADC_CONT_CONV_EN_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn gpadc_v11_sel(&self) -> GPADC_V11_SEL_R { + GPADC_V11_SEL_R::new(((self.bits >> 27) & 3) as u8) } - #[doc = "Bit 0"] + #[doc = "Bits 29:30"] #[inline(always)] - pub fn gpadc_cal_os_en(&self) -> GPADC_CAL_OS_EN_R { - GPADC_CAL_OS_EN_R::new((self.bits & 0x01) != 0) + pub fn gpadc_v18_sel(&self) -> GPADC_V18_SEL_R { + GPADC_V18_SEL_R::new(((self.bits >> 29) & 3) as u8) } } impl W { - #[doc = "Bits 29:30"] + #[doc = "Bit 0"] #[inline(always)] - pub fn gpadc_v18_sel(&mut self) -> GPADC_V18_SEL_W { - GPADC_V18_SEL_W { w: self } + #[must_use] + pub fn gpadc_cal_os_en(&mut self) -> GPADC_CAL_OS_EN_W<0> { + GPADC_CAL_OS_EN_W::new(self) } - #[doc = "Bits 27:28"] + #[doc = "Bit 1"] #[inline(always)] - pub fn gpadc_v11_sel(&mut self) -> GPADC_V11_SEL_W { - GPADC_V11_SEL_W { w: self } + #[must_use] + pub fn gpadc_cont_conv_en(&mut self) -> GPADC_CONT_CONV_EN_W<1> { + GPADC_CONT_CONV_EN_W::new(self) } - #[doc = "Bit 26"] + #[doc = "Bits 2:4"] #[inline(always)] - pub fn gpadc_dither_en(&mut self) -> GPADC_DITHER_EN_W { - GPADC_DITHER_EN_W { w: self } + #[must_use] + pub fn gpadc_res_sel(&mut self) -> GPADC_RES_SEL_W<2> { + GPADC_RES_SEL_W::new(self) } - #[doc = "Bit 25"] + #[doc = "Bit 17"] #[inline(always)] - pub fn gpadc_scan_en(&mut self) -> GPADC_SCAN_EN_W { - GPADC_SCAN_EN_W { w: self } + #[must_use] + pub fn gpadc_clk_ana_inv(&mut self) -> GPADC_CLK_ANA_INV_W<17> { + GPADC_CLK_ANA_INV_W::new(self) } - #[doc = "Bits 21:24"] + #[doc = "Bits 18:20"] #[inline(always)] - pub fn gpadc_scan_length(&mut self) -> GPADC_SCAN_LENGTH_W { - GPADC_SCAN_LENGTH_W { w: self } + #[must_use] + pub fn gpadc_clk_div_ratio(&mut self) -> GPADC_CLK_DIV_RATIO_W<18> { + GPADC_CLK_DIV_RATIO_W::new(self) } - #[doc = "Bits 18:20"] + #[doc = "Bits 21:24"] #[inline(always)] - pub fn gpadc_clk_div_ratio(&mut self) -> GPADC_CLK_DIV_RATIO_W { - GPADC_CLK_DIV_RATIO_W { w: self } + #[must_use] + pub fn gpadc_scan_length(&mut self) -> GPADC_SCAN_LENGTH_W<21> { + GPADC_SCAN_LENGTH_W::new(self) } - #[doc = "Bit 17"] + #[doc = "Bit 25"] #[inline(always)] - pub fn gpadc_clk_ana_inv(&mut self) -> GPADC_CLK_ANA_INV_W { - GPADC_CLK_ANA_INV_W { w: self } + #[must_use] + pub fn gpadc_scan_en(&mut self) -> GPADC_SCAN_EN_W<25> { + GPADC_SCAN_EN_W::new(self) } - #[doc = "Bits 2:4"] + #[doc = "Bit 26"] #[inline(always)] - pub fn gpadc_res_sel(&mut self) -> GPADC_RES_SEL_W { - GPADC_RES_SEL_W { w: self } + #[must_use] + pub fn gpadc_dither_en(&mut self) -> GPADC_DITHER_EN_W<26> { + GPADC_DITHER_EN_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bits 27:28"] #[inline(always)] - pub fn gpadc_cont_conv_en(&mut self) -> GPADC_CONT_CONV_EN_W { - GPADC_CONT_CONV_EN_W { w: self } + #[must_use] + pub fn gpadc_v11_sel(&mut self) -> GPADC_V11_SEL_W<27> { + GPADC_V11_SEL_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bits 29:30"] #[inline(always)] - pub fn gpadc_cal_os_en(&mut self) -> GPADC_CAL_OS_EN_W { - GPADC_CAL_OS_EN_W { w: self } + #[must_use] + pub fn gpadc_v18_sel(&mut self) -> GPADC_V18_SEL_W<29> { + GPADC_V18_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -463,11 +216,10 @@ impl crate::Readable for GPADC_REG_CONFIG1_SPEC { #[doc = "`write(|w| ..)` method takes [gpadc_reg_config1::W](W) writer structure"] impl crate::Writable for GPADC_REG_CONFIG1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets gpadc_reg_config1 to value 0x000c_0002"] impl crate::Resettable for GPADC_REG_CONFIG1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x000c_0002 - } + const RESET_VALUE: Self::Ux = 0x000c_0002; } diff --git a/src/aon/gpadc_reg_config2.rs b/src/aon/gpadc_reg_config2.rs index 49eadf5..3f0f574 100644 --- a/src/aon/gpadc_reg_config2.rs +++ b/src/aon/gpadc_reg_config2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,727 +28,289 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `gpadc_tsvbe_low` reader - "] -pub struct GPADC_TSVBE_LOW_R(crate::FieldReader); -impl GPADC_TSVBE_LOW_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_TSVBE_LOW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_TSVBE_LOW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_tsvbe_low` writer - "] -pub struct GPADC_TSVBE_LOW_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_TSVBE_LOW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 31)) | ((value as u32 & 0x01) << 31); - self.w - } -} -#[doc = "Field `gpadc_dly_sel` reader - "] -pub struct GPADC_DLY_SEL_R(crate::FieldReader); -impl GPADC_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_dly_sel` writer - "] -pub struct GPADC_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 28)) | ((value as u32 & 0x07) << 28); - self.w - } -} -#[doc = "Field `gpadc_pga1_gain` reader - "] -pub struct GPADC_PGA1_GAIN_R(crate::FieldReader); -impl GPADC_PGA1_GAIN_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_PGA1_GAIN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_PGA1_GAIN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_pga1_gain` writer - "] -pub struct GPADC_PGA1_GAIN_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_PGA1_GAIN_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 25)) | ((value as u32 & 0x07) << 25); - self.w - } -} -#[doc = "Field `gpadc_pga2_gain` reader - "] -pub struct GPADC_PGA2_GAIN_R(crate::FieldReader); -impl GPADC_PGA2_GAIN_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_PGA2_GAIN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_PGA2_GAIN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_pga2_gain` writer - "] -pub struct GPADC_PGA2_GAIN_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_PGA2_GAIN_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 22)) | ((value as u32 & 0x07) << 22); - self.w - } -} -#[doc = "Field `gpadc_test_sel` reader - "] -pub struct GPADC_TEST_SEL_R(crate::FieldReader); -impl GPADC_TEST_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_TEST_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_TEST_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_test_sel` writer - "] -pub struct GPADC_TEST_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_TEST_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 19)) | ((value as u32 & 0x07) << 19); - self.w - } -} -#[doc = "Field `gpadc_test_en` reader - "] -pub struct GPADC_TEST_EN_R(crate::FieldReader); -impl GPADC_TEST_EN_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_TEST_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_TEST_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_test_en` writer - "] -pub struct GPADC_TEST_EN_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_TEST_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18); - self.w - } -} -#[doc = "Field `gpadc_bias_sel` reader - "] -pub struct GPADC_BIAS_SEL_R(crate::FieldReader); -impl GPADC_BIAS_SEL_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_BIAS_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_BIAS_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_bias_sel` writer - "] -pub struct GPADC_BIAS_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_BIAS_SEL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w - } -} -#[doc = "Field `gpadc_chop_mode` reader - "] -pub struct GPADC_CHOP_MODE_R(crate::FieldReader); -impl GPADC_CHOP_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_CHOP_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_CHOP_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_chop_mode` writer - "] -pub struct GPADC_CHOP_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_CHOP_MODE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 15)) | ((value as u32 & 0x03) << 15); - self.w - } -} -#[doc = "Field `gpadc_pga_vcmi_en` reader - "] -pub struct GPADC_PGA_VCMI_EN_R(crate::FieldReader); -impl GPADC_PGA_VCMI_EN_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_PGA_VCMI_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_PGA_VCMI_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_pga_vcmi_en` writer - "] -pub struct GPADC_PGA_VCMI_EN_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_PGA_VCMI_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14); - self.w - } -} -#[doc = "Field `gpadc_pga_en` reader - "] -pub struct GPADC_PGA_EN_R(crate::FieldReader); -impl GPADC_PGA_EN_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_PGA_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_PGA_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_pga_en` writer - "] -pub struct GPADC_PGA_EN_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_PGA_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13); - self.w - } -} -#[doc = "Field `gpadc_pga_os_cal` reader - "] -pub struct GPADC_PGA_OS_CAL_R(crate::FieldReader); -impl GPADC_PGA_OS_CAL_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_PGA_OS_CAL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_PGA_OS_CAL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_pga_os_cal` writer - "] -pub struct GPADC_PGA_OS_CAL_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_PGA_OS_CAL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 9)) | ((value as u32 & 0x0f) << 9); - self.w - } -} -#[doc = "Field `gpadc_pga_vcm` reader - "] -pub struct GPADC_PGA_VCM_R(crate::FieldReader); -impl GPADC_PGA_VCM_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_PGA_VCM_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_PGA_VCM_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_pga_vcm` writer - "] -pub struct GPADC_PGA_VCM_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_PGA_VCM_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 7)) | ((value as u32 & 0x03) << 7); - self.w - } -} -#[doc = "Field `gpadc_ts_en` reader - "] -pub struct GPADC_TS_EN_R(crate::FieldReader); -impl GPADC_TS_EN_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_TS_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_TS_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_ts_en` writer - "] -pub struct GPADC_TS_EN_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_TS_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w - } -} -#[doc = "Field `gpadc_tsext_sel` reader - "] -pub struct GPADC_TSEXT_SEL_R(crate::FieldReader); -impl GPADC_TSEXT_SEL_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_TSEXT_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_TSEXT_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_tsext_sel` writer - "] -pub struct GPADC_TSEXT_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_TSEXT_SEL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w - } -} -#[doc = "Field `gpadc_vbat_en` reader - "] -pub struct GPADC_VBAT_EN_R(crate::FieldReader); -impl GPADC_VBAT_EN_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_VBAT_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_VBAT_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_vbat_en` writer - "] -pub struct GPADC_VBAT_EN_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_VBAT_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} -#[doc = "Field `gpadc_vref_sel` reader - "] -pub struct GPADC_VREF_SEL_R(crate::FieldReader); -impl GPADC_VREF_SEL_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_VREF_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_VREF_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_vref_sel` writer - "] -pub struct GPADC_VREF_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_VREF_SEL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} #[doc = "Field `gpadc_diff_mode` reader - "] -pub struct GPADC_DIFF_MODE_R(crate::FieldReader); -impl GPADC_DIFF_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_DIFF_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_DIFF_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type GPADC_DIFF_MODE_R = crate::BitReader; #[doc = "Field `gpadc_diff_mode` writer - "] -pub struct GPADC_DIFF_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_DIFF_MODE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} +pub type GPADC_DIFF_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPADC_REG_CONFIG2_SPEC, bool, O>; +#[doc = "Field `gpadc_vref_sel` reader - "] +pub type GPADC_VREF_SEL_R = crate::BitReader; +#[doc = "Field `gpadc_vref_sel` writer - "] +pub type GPADC_VREF_SEL_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPADC_REG_CONFIG2_SPEC, bool, O>; +#[doc = "Field `gpadc_vbat_en` reader - "] +pub type GPADC_VBAT_EN_R = crate::BitReader; +#[doc = "Field `gpadc_vbat_en` writer - "] +pub type GPADC_VBAT_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPADC_REG_CONFIG2_SPEC, bool, O>; +#[doc = "Field `gpadc_tsext_sel` reader - "] +pub type GPADC_TSEXT_SEL_R = crate::BitReader; +#[doc = "Field `gpadc_tsext_sel` writer - "] +pub type GPADC_TSEXT_SEL_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPADC_REG_CONFIG2_SPEC, bool, O>; +#[doc = "Field `gpadc_ts_en` reader - "] +pub type GPADC_TS_EN_R = crate::BitReader; +#[doc = "Field `gpadc_ts_en` writer - "] +pub type GPADC_TS_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPADC_REG_CONFIG2_SPEC, bool, O>; +#[doc = "Field `gpadc_pga_vcm` reader - "] +pub type GPADC_PGA_VCM_R = crate::FieldReader; +#[doc = "Field `gpadc_pga_vcm` writer - "] +pub type GPADC_PGA_VCM_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_CONFIG2_SPEC, u8, u8, 2, O>; +#[doc = "Field `gpadc_pga_os_cal` reader - "] +pub type GPADC_PGA_OS_CAL_R = crate::FieldReader; +#[doc = "Field `gpadc_pga_os_cal` writer - "] +pub type GPADC_PGA_OS_CAL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_CONFIG2_SPEC, u8, u8, 4, O>; +#[doc = "Field `gpadc_pga_en` reader - "] +pub type GPADC_PGA_EN_R = crate::BitReader; +#[doc = "Field `gpadc_pga_en` writer - "] +pub type GPADC_PGA_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPADC_REG_CONFIG2_SPEC, bool, O>; +#[doc = "Field `gpadc_pga_vcmi_en` reader - "] +pub type GPADC_PGA_VCMI_EN_R = crate::BitReader; +#[doc = "Field `gpadc_pga_vcmi_en` writer - "] +pub type GPADC_PGA_VCMI_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPADC_REG_CONFIG2_SPEC, bool, O>; +#[doc = "Field `gpadc_chop_mode` reader - "] +pub type GPADC_CHOP_MODE_R = crate::FieldReader; +#[doc = "Field `gpadc_chop_mode` writer - "] +pub type GPADC_CHOP_MODE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_CONFIG2_SPEC, u8, u8, 2, O>; +#[doc = "Field `gpadc_bias_sel` reader - "] +pub type GPADC_BIAS_SEL_R = crate::BitReader; +#[doc = "Field `gpadc_bias_sel` writer - "] +pub type GPADC_BIAS_SEL_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPADC_REG_CONFIG2_SPEC, bool, O>; +#[doc = "Field `gpadc_test_en` reader - "] +pub type GPADC_TEST_EN_R = crate::BitReader; +#[doc = "Field `gpadc_test_en` writer - "] +pub type GPADC_TEST_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPADC_REG_CONFIG2_SPEC, bool, O>; +#[doc = "Field `gpadc_test_sel` reader - "] +pub type GPADC_TEST_SEL_R = crate::FieldReader; +#[doc = "Field `gpadc_test_sel` writer - "] +pub type GPADC_TEST_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_CONFIG2_SPEC, u8, u8, 3, O>; +#[doc = "Field `gpadc_pga2_gain` reader - "] +pub type GPADC_PGA2_GAIN_R = crate::FieldReader; +#[doc = "Field `gpadc_pga2_gain` writer - "] +pub type GPADC_PGA2_GAIN_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_CONFIG2_SPEC, u8, u8, 3, O>; +#[doc = "Field `gpadc_pga1_gain` reader - "] +pub type GPADC_PGA1_GAIN_R = crate::FieldReader; +#[doc = "Field `gpadc_pga1_gain` writer - "] +pub type GPADC_PGA1_GAIN_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_CONFIG2_SPEC, u8, u8, 3, O>; +#[doc = "Field `gpadc_dly_sel` reader - "] +pub type GPADC_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `gpadc_dly_sel` writer - "] +pub type GPADC_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_CONFIG2_SPEC, u8, u8, 3, O>; +#[doc = "Field `gpadc_tsvbe_low` reader - "] +pub type GPADC_TSVBE_LOW_R = crate::BitReader; +#[doc = "Field `gpadc_tsvbe_low` writer - "] +pub type GPADC_TSVBE_LOW_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPADC_REG_CONFIG2_SPEC, bool, O>; impl R { - #[doc = "Bit 31"] + #[doc = "Bit 2"] #[inline(always)] - pub fn gpadc_tsvbe_low(&self) -> GPADC_TSVBE_LOW_R { - GPADC_TSVBE_LOW_R::new(((self.bits >> 31) & 0x01) != 0) + pub fn gpadc_diff_mode(&self) -> GPADC_DIFF_MODE_R { + GPADC_DIFF_MODE_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bits 28:30"] + #[doc = "Bit 3"] #[inline(always)] - pub fn gpadc_dly_sel(&self) -> GPADC_DLY_SEL_R { - GPADC_DLY_SEL_R::new(((self.bits >> 28) & 0x07) as u8) + pub fn gpadc_vref_sel(&self) -> GPADC_VREF_SEL_R { + GPADC_VREF_SEL_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bits 25:27"] + #[doc = "Bit 4"] #[inline(always)] - pub fn gpadc_pga1_gain(&self) -> GPADC_PGA1_GAIN_R { - GPADC_PGA1_GAIN_R::new(((self.bits >> 25) & 0x07) as u8) + pub fn gpadc_vbat_en(&self) -> GPADC_VBAT_EN_R { + GPADC_VBAT_EN_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bits 22:24"] + #[doc = "Bit 5"] #[inline(always)] - pub fn gpadc_pga2_gain(&self) -> GPADC_PGA2_GAIN_R { - GPADC_PGA2_GAIN_R::new(((self.bits >> 22) & 0x07) as u8) + pub fn gpadc_tsext_sel(&self) -> GPADC_TSEXT_SEL_R { + GPADC_TSEXT_SEL_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bits 19:21"] + #[doc = "Bit 6"] #[inline(always)] - pub fn gpadc_test_sel(&self) -> GPADC_TEST_SEL_R { - GPADC_TEST_SEL_R::new(((self.bits >> 19) & 0x07) as u8) + pub fn gpadc_ts_en(&self) -> GPADC_TS_EN_R { + GPADC_TS_EN_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = "Bit 18"] + #[doc = "Bits 7:8"] #[inline(always)] - pub fn gpadc_test_en(&self) -> GPADC_TEST_EN_R { - GPADC_TEST_EN_R::new(((self.bits >> 18) & 0x01) != 0) + pub fn gpadc_pga_vcm(&self) -> GPADC_PGA_VCM_R { + GPADC_PGA_VCM_R::new(((self.bits >> 7) & 3) as u8) } - #[doc = "Bit 17"] + #[doc = "Bits 9:12"] #[inline(always)] - pub fn gpadc_bias_sel(&self) -> GPADC_BIAS_SEL_R { - GPADC_BIAS_SEL_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn gpadc_pga_os_cal(&self) -> GPADC_PGA_OS_CAL_R { + GPADC_PGA_OS_CAL_R::new(((self.bits >> 9) & 0x0f) as u8) } - #[doc = "Bits 15:16"] + #[doc = "Bit 13"] #[inline(always)] - pub fn gpadc_chop_mode(&self) -> GPADC_CHOP_MODE_R { - GPADC_CHOP_MODE_R::new(((self.bits >> 15) & 0x03) as u8) + pub fn gpadc_pga_en(&self) -> GPADC_PGA_EN_R { + GPADC_PGA_EN_R::new(((self.bits >> 13) & 1) != 0) } #[doc = "Bit 14"] #[inline(always)] pub fn gpadc_pga_vcmi_en(&self) -> GPADC_PGA_VCMI_EN_R { - GPADC_PGA_VCMI_EN_R::new(((self.bits >> 14) & 0x01) != 0) + GPADC_PGA_VCMI_EN_R::new(((self.bits >> 14) & 1) != 0) } - #[doc = "Bit 13"] + #[doc = "Bits 15:16"] #[inline(always)] - pub fn gpadc_pga_en(&self) -> GPADC_PGA_EN_R { - GPADC_PGA_EN_R::new(((self.bits >> 13) & 0x01) != 0) + pub fn gpadc_chop_mode(&self) -> GPADC_CHOP_MODE_R { + GPADC_CHOP_MODE_R::new(((self.bits >> 15) & 3) as u8) } - #[doc = "Bits 9:12"] + #[doc = "Bit 17"] #[inline(always)] - pub fn gpadc_pga_os_cal(&self) -> GPADC_PGA_OS_CAL_R { - GPADC_PGA_OS_CAL_R::new(((self.bits >> 9) & 0x0f) as u8) + pub fn gpadc_bias_sel(&self) -> GPADC_BIAS_SEL_R { + GPADC_BIAS_SEL_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bits 7:8"] + #[doc = "Bit 18"] #[inline(always)] - pub fn gpadc_pga_vcm(&self) -> GPADC_PGA_VCM_R { - GPADC_PGA_VCM_R::new(((self.bits >> 7) & 0x03) as u8) + pub fn gpadc_test_en(&self) -> GPADC_TEST_EN_R { + GPADC_TEST_EN_R::new(((self.bits >> 18) & 1) != 0) } - #[doc = "Bit 6"] + #[doc = "Bits 19:21"] #[inline(always)] - pub fn gpadc_ts_en(&self) -> GPADC_TS_EN_R { - GPADC_TS_EN_R::new(((self.bits >> 6) & 0x01) != 0) + pub fn gpadc_test_sel(&self) -> GPADC_TEST_SEL_R { + GPADC_TEST_SEL_R::new(((self.bits >> 19) & 7) as u8) } - #[doc = "Bit 5"] + #[doc = "Bits 22:24"] #[inline(always)] - pub fn gpadc_tsext_sel(&self) -> GPADC_TSEXT_SEL_R { - GPADC_TSEXT_SEL_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn gpadc_pga2_gain(&self) -> GPADC_PGA2_GAIN_R { + GPADC_PGA2_GAIN_R::new(((self.bits >> 22) & 7) as u8) } - #[doc = "Bit 4"] + #[doc = "Bits 25:27"] #[inline(always)] - pub fn gpadc_vbat_en(&self) -> GPADC_VBAT_EN_R { - GPADC_VBAT_EN_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn gpadc_pga1_gain(&self) -> GPADC_PGA1_GAIN_R { + GPADC_PGA1_GAIN_R::new(((self.bits >> 25) & 7) as u8) } - #[doc = "Bit 3"] + #[doc = "Bits 28:30"] #[inline(always)] - pub fn gpadc_vref_sel(&self) -> GPADC_VREF_SEL_R { - GPADC_VREF_SEL_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn gpadc_dly_sel(&self) -> GPADC_DLY_SEL_R { + GPADC_DLY_SEL_R::new(((self.bits >> 28) & 7) as u8) } - #[doc = "Bit 2"] + #[doc = "Bit 31"] #[inline(always)] - pub fn gpadc_diff_mode(&self) -> GPADC_DIFF_MODE_R { - GPADC_DIFF_MODE_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn gpadc_tsvbe_low(&self) -> GPADC_TSVBE_LOW_R { + GPADC_TSVBE_LOW_R::new(((self.bits >> 31) & 1) != 0) } } impl W { - #[doc = "Bit 31"] + #[doc = "Bit 2"] #[inline(always)] - pub fn gpadc_tsvbe_low(&mut self) -> GPADC_TSVBE_LOW_W { - GPADC_TSVBE_LOW_W { w: self } + #[must_use] + pub fn gpadc_diff_mode(&mut self) -> GPADC_DIFF_MODE_W<2> { + GPADC_DIFF_MODE_W::new(self) } - #[doc = "Bits 28:30"] + #[doc = "Bit 3"] #[inline(always)] - pub fn gpadc_dly_sel(&mut self) -> GPADC_DLY_SEL_W { - GPADC_DLY_SEL_W { w: self } + #[must_use] + pub fn gpadc_vref_sel(&mut self) -> GPADC_VREF_SEL_W<3> { + GPADC_VREF_SEL_W::new(self) } - #[doc = "Bits 25:27"] + #[doc = "Bit 4"] #[inline(always)] - pub fn gpadc_pga1_gain(&mut self) -> GPADC_PGA1_GAIN_W { - GPADC_PGA1_GAIN_W { w: self } + #[must_use] + pub fn gpadc_vbat_en(&mut self) -> GPADC_VBAT_EN_W<4> { + GPADC_VBAT_EN_W::new(self) } - #[doc = "Bits 22:24"] + #[doc = "Bit 5"] #[inline(always)] - pub fn gpadc_pga2_gain(&mut self) -> GPADC_PGA2_GAIN_W { - GPADC_PGA2_GAIN_W { w: self } + #[must_use] + pub fn gpadc_tsext_sel(&mut self) -> GPADC_TSEXT_SEL_W<5> { + GPADC_TSEXT_SEL_W::new(self) } - #[doc = "Bits 19:21"] + #[doc = "Bit 6"] #[inline(always)] - pub fn gpadc_test_sel(&mut self) -> GPADC_TEST_SEL_W { - GPADC_TEST_SEL_W { w: self } + #[must_use] + pub fn gpadc_ts_en(&mut self) -> GPADC_TS_EN_W<6> { + GPADC_TS_EN_W::new(self) } - #[doc = "Bit 18"] + #[doc = "Bits 7:8"] #[inline(always)] - pub fn gpadc_test_en(&mut self) -> GPADC_TEST_EN_W { - GPADC_TEST_EN_W { w: self } + #[must_use] + pub fn gpadc_pga_vcm(&mut self) -> GPADC_PGA_VCM_W<7> { + GPADC_PGA_VCM_W::new(self) } - #[doc = "Bit 17"] + #[doc = "Bits 9:12"] #[inline(always)] - pub fn gpadc_bias_sel(&mut self) -> GPADC_BIAS_SEL_W { - GPADC_BIAS_SEL_W { w: self } + #[must_use] + pub fn gpadc_pga_os_cal(&mut self) -> GPADC_PGA_OS_CAL_W<9> { + GPADC_PGA_OS_CAL_W::new(self) } - #[doc = "Bits 15:16"] + #[doc = "Bit 13"] #[inline(always)] - pub fn gpadc_chop_mode(&mut self) -> GPADC_CHOP_MODE_W { - GPADC_CHOP_MODE_W { w: self } + #[must_use] + pub fn gpadc_pga_en(&mut self) -> GPADC_PGA_EN_W<13> { + GPADC_PGA_EN_W::new(self) } #[doc = "Bit 14"] #[inline(always)] - pub fn gpadc_pga_vcmi_en(&mut self) -> GPADC_PGA_VCMI_EN_W { - GPADC_PGA_VCMI_EN_W { w: self } + #[must_use] + pub fn gpadc_pga_vcmi_en(&mut self) -> GPADC_PGA_VCMI_EN_W<14> { + GPADC_PGA_VCMI_EN_W::new(self) } - #[doc = "Bit 13"] + #[doc = "Bits 15:16"] #[inline(always)] - pub fn gpadc_pga_en(&mut self) -> GPADC_PGA_EN_W { - GPADC_PGA_EN_W { w: self } + #[must_use] + pub fn gpadc_chop_mode(&mut self) -> GPADC_CHOP_MODE_W<15> { + GPADC_CHOP_MODE_W::new(self) } - #[doc = "Bits 9:12"] + #[doc = "Bit 17"] #[inline(always)] - pub fn gpadc_pga_os_cal(&mut self) -> GPADC_PGA_OS_CAL_W { - GPADC_PGA_OS_CAL_W { w: self } + #[must_use] + pub fn gpadc_bias_sel(&mut self) -> GPADC_BIAS_SEL_W<17> { + GPADC_BIAS_SEL_W::new(self) } - #[doc = "Bits 7:8"] + #[doc = "Bit 18"] #[inline(always)] - pub fn gpadc_pga_vcm(&mut self) -> GPADC_PGA_VCM_W { - GPADC_PGA_VCM_W { w: self } + #[must_use] + pub fn gpadc_test_en(&mut self) -> GPADC_TEST_EN_W<18> { + GPADC_TEST_EN_W::new(self) } - #[doc = "Bit 6"] + #[doc = "Bits 19:21"] #[inline(always)] - pub fn gpadc_ts_en(&mut self) -> GPADC_TS_EN_W { - GPADC_TS_EN_W { w: self } + #[must_use] + pub fn gpadc_test_sel(&mut self) -> GPADC_TEST_SEL_W<19> { + GPADC_TEST_SEL_W::new(self) } - #[doc = "Bit 5"] + #[doc = "Bits 22:24"] #[inline(always)] - pub fn gpadc_tsext_sel(&mut self) -> GPADC_TSEXT_SEL_W { - GPADC_TSEXT_SEL_W { w: self } + #[must_use] + pub fn gpadc_pga2_gain(&mut self) -> GPADC_PGA2_GAIN_W<22> { + GPADC_PGA2_GAIN_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bits 25:27"] #[inline(always)] - pub fn gpadc_vbat_en(&mut self) -> GPADC_VBAT_EN_W { - GPADC_VBAT_EN_W { w: self } + #[must_use] + pub fn gpadc_pga1_gain(&mut self) -> GPADC_PGA1_GAIN_W<25> { + GPADC_PGA1_GAIN_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bits 28:30"] #[inline(always)] - pub fn gpadc_vref_sel(&mut self) -> GPADC_VREF_SEL_W { - GPADC_VREF_SEL_W { w: self } + #[must_use] + pub fn gpadc_dly_sel(&mut self) -> GPADC_DLY_SEL_W<28> { + GPADC_DLY_SEL_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bit 31"] #[inline(always)] - pub fn gpadc_diff_mode(&mut self) -> GPADC_DIFF_MODE_W { - GPADC_DIFF_MODE_W { w: self } + #[must_use] + pub fn gpadc_tsvbe_low(&mut self) -> GPADC_TSVBE_LOW_W<31> { + GPADC_TSVBE_LOW_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -765,11 +328,10 @@ impl crate::Readable for GPADC_REG_CONFIG2_SPEC { #[doc = "`write(|w| ..)` method takes [gpadc_reg_config2::W](W) writer structure"] impl crate::Writable for GPADC_REG_CONFIG2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets gpadc_reg_config2 to value 0x0001_9100"] impl crate::Resettable for GPADC_REG_CONFIG2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0001_9100 - } + const RESET_VALUE: Self::Ux = 0x0001_9100; } diff --git a/src/aon/gpadc_reg_define.rs b/src/aon/gpadc_reg_define.rs index f6583d2..f9b8eba 100644 --- a/src/aon/gpadc_reg_define.rs +++ b/src/aon/gpadc_reg_define.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,37 +28,17 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `gpadc_os_cal_data` reader - "] -pub struct GPADC_OS_CAL_DATA_R(crate::FieldReader); -impl GPADC_OS_CAL_DATA_R { - pub(crate) fn new(bits: u16) -> Self { - GPADC_OS_CAL_DATA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_OS_CAL_DATA_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type GPADC_OS_CAL_DATA_R = crate::FieldReader; #[doc = "Field `gpadc_os_cal_data` writer - "] -pub struct GPADC_OS_CAL_DATA_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_OS_CAL_DATA_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w - } -} +pub type GPADC_OS_CAL_DATA_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_DEFINE_SPEC, u16, u16, 16, O>; impl R { #[doc = "Bits 0:15"] #[inline(always)] @@ -68,10 +49,12 @@ impl R { impl W { #[doc = "Bits 0:15"] #[inline(always)] - pub fn gpadc_os_cal_data(&mut self) -> GPADC_OS_CAL_DATA_W { - GPADC_OS_CAL_DATA_W { w: self } + #[must_use] + pub fn gpadc_os_cal_data(&mut self) -> GPADC_OS_CAL_DATA_W<0> { + GPADC_OS_CAL_DATA_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for GPADC_REG_DEFINE_SPEC { #[doc = "`write(|w| ..)` method takes [gpadc_reg_define::W](W) writer structure"] impl crate::Writable for GPADC_REG_DEFINE_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets gpadc_reg_define to value 0"] impl crate::Resettable for GPADC_REG_DEFINE_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/aon/gpadc_reg_isr.rs b/src/aon/gpadc_reg_isr.rs index ae95927..73c907e 100644 --- a/src/aon/gpadc_reg_isr.rs +++ b/src/aon/gpadc_reg_isr.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,237 +28,95 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `gpadc_pos_satur_mask` reader - "] -pub struct GPADC_POS_SATUR_MASK_R(crate::FieldReader); -impl GPADC_POS_SATUR_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_POS_SATUR_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_POS_SATUR_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_pos_satur_mask` writer - "] -pub struct GPADC_POS_SATUR_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_POS_SATUR_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w - } -} -#[doc = "Field `gpadc_neg_satur_mask` reader - "] -pub struct GPADC_NEG_SATUR_MASK_R(crate::FieldReader); -impl GPADC_NEG_SATUR_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_NEG_SATUR_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_NEG_SATUR_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_neg_satur_mask` writer - "] -pub struct GPADC_NEG_SATUR_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_NEG_SATUR_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `gpadc_pos_satur_clr` reader - "] -pub struct GPADC_POS_SATUR_CLR_R(crate::FieldReader); -impl GPADC_POS_SATUR_CLR_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_POS_SATUR_CLR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_POS_SATUR_CLR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_pos_satur_clr` writer - "] -pub struct GPADC_POS_SATUR_CLR_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_POS_SATUR_CLR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w - } -} +#[doc = "Field `gpadc_neg_satur` reader - "] +pub type GPADC_NEG_SATUR_R = crate::BitReader; +#[doc = "Field `gpadc_pos_satur` reader - "] +pub type GPADC_POS_SATUR_R = crate::BitReader; #[doc = "Field `gpadc_neg_satur_clr` reader - "] -pub struct GPADC_NEG_SATUR_CLR_R(crate::FieldReader); -impl GPADC_NEG_SATUR_CLR_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_NEG_SATUR_CLR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_NEG_SATUR_CLR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type GPADC_NEG_SATUR_CLR_R = crate::BitReader; #[doc = "Field `gpadc_neg_satur_clr` writer - "] -pub struct GPADC_NEG_SATUR_CLR_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_NEG_SATUR_CLR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} -#[doc = "Field `gpadc_pos_satur` reader - "] -pub struct GPADC_POS_SATUR_R(crate::FieldReader); -impl GPADC_POS_SATUR_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_POS_SATUR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_POS_SATUR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_neg_satur` reader - "] -pub struct GPADC_NEG_SATUR_R(crate::FieldReader); -impl GPADC_NEG_SATUR_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_NEG_SATUR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_NEG_SATUR_R { - type Target = crate::FieldReader; +pub type GPADC_NEG_SATUR_CLR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPADC_REG_ISR_SPEC, bool, O>; +#[doc = "Field `gpadc_pos_satur_clr` reader - "] +pub type GPADC_POS_SATUR_CLR_R = crate::BitReader; +#[doc = "Field `gpadc_pos_satur_clr` writer - "] +pub type GPADC_POS_SATUR_CLR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPADC_REG_ISR_SPEC, bool, O>; +#[doc = "Field `gpadc_neg_satur_mask` reader - "] +pub type GPADC_NEG_SATUR_MASK_R = crate::BitReader; +#[doc = "Field `gpadc_neg_satur_mask` writer - "] +pub type GPADC_NEG_SATUR_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPADC_REG_ISR_SPEC, bool, O>; +#[doc = "Field `gpadc_pos_satur_mask` reader - "] +pub type GPADC_POS_SATUR_MASK_R = crate::BitReader; +#[doc = "Field `gpadc_pos_satur_mask` writer - "] +pub type GPADC_POS_SATUR_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPADC_REG_ISR_SPEC, bool, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn gpadc_neg_satur(&self) -> GPADC_NEG_SATUR_R { + GPADC_NEG_SATUR_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bit 9"] + #[doc = "Bit 1"] #[inline(always)] - pub fn gpadc_pos_satur_mask(&self) -> GPADC_POS_SATUR_MASK_R { - GPADC_POS_SATUR_MASK_R::new(((self.bits >> 9) & 0x01) != 0) + pub fn gpadc_pos_satur(&self) -> GPADC_POS_SATUR_R { + GPADC_POS_SATUR_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 8"] + #[doc = "Bit 4"] #[inline(always)] - pub fn gpadc_neg_satur_mask(&self) -> GPADC_NEG_SATUR_MASK_R { - GPADC_NEG_SATUR_MASK_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn gpadc_neg_satur_clr(&self) -> GPADC_NEG_SATUR_CLR_R { + GPADC_NEG_SATUR_CLR_R::new(((self.bits >> 4) & 1) != 0) } #[doc = "Bit 5"] #[inline(always)] pub fn gpadc_pos_satur_clr(&self) -> GPADC_POS_SATUR_CLR_R { - GPADC_POS_SATUR_CLR_R::new(((self.bits >> 5) & 0x01) != 0) + GPADC_POS_SATUR_CLR_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 4"] - #[inline(always)] - pub fn gpadc_neg_satur_clr(&self) -> GPADC_NEG_SATUR_CLR_R { - GPADC_NEG_SATUR_CLR_R::new(((self.bits >> 4) & 0x01) != 0) - } - #[doc = "Bit 1"] + #[doc = "Bit 8"] #[inline(always)] - pub fn gpadc_pos_satur(&self) -> GPADC_POS_SATUR_R { - GPADC_POS_SATUR_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn gpadc_neg_satur_mask(&self) -> GPADC_NEG_SATUR_MASK_R { + GPADC_NEG_SATUR_MASK_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 9"] #[inline(always)] - pub fn gpadc_neg_satur(&self) -> GPADC_NEG_SATUR_R { - GPADC_NEG_SATUR_R::new((self.bits & 0x01) != 0) + pub fn gpadc_pos_satur_mask(&self) -> GPADC_POS_SATUR_MASK_R { + GPADC_POS_SATUR_MASK_R::new(((self.bits >> 9) & 1) != 0) } } impl W { - #[doc = "Bit 9"] + #[doc = "Bit 4"] #[inline(always)] - pub fn gpadc_pos_satur_mask(&mut self) -> GPADC_POS_SATUR_MASK_W { - GPADC_POS_SATUR_MASK_W { w: self } + #[must_use] + pub fn gpadc_neg_satur_clr(&mut self) -> GPADC_NEG_SATUR_CLR_W<4> { + GPADC_NEG_SATUR_CLR_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bit 5"] #[inline(always)] - pub fn gpadc_neg_satur_mask(&mut self) -> GPADC_NEG_SATUR_MASK_W { - GPADC_NEG_SATUR_MASK_W { w: self } + #[must_use] + pub fn gpadc_pos_satur_clr(&mut self) -> GPADC_POS_SATUR_CLR_W<5> { + GPADC_POS_SATUR_CLR_W::new(self) } - #[doc = "Bit 5"] + #[doc = "Bit 8"] #[inline(always)] - pub fn gpadc_pos_satur_clr(&mut self) -> GPADC_POS_SATUR_CLR_W { - GPADC_POS_SATUR_CLR_W { w: self } + #[must_use] + pub fn gpadc_neg_satur_mask(&mut self) -> GPADC_NEG_SATUR_MASK_W<8> { + GPADC_NEG_SATUR_MASK_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 9"] #[inline(always)] - pub fn gpadc_neg_satur_clr(&mut self) -> GPADC_NEG_SATUR_CLR_W { - GPADC_NEG_SATUR_CLR_W { w: self } + #[must_use] + pub fn gpadc_pos_satur_mask(&mut self) -> GPADC_POS_SATUR_MASK_W<9> { + GPADC_POS_SATUR_MASK_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -275,11 +134,10 @@ impl crate::Readable for GPADC_REG_ISR_SPEC { #[doc = "`write(|w| ..)` method takes [gpadc_reg_isr::W](W) writer structure"] impl crate::Writable for GPADC_REG_ISR_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets gpadc_reg_isr to value 0"] impl crate::Resettable for GPADC_REG_ISR_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/aon/gpadc_reg_raw_result.rs b/src/aon/gpadc_reg_raw_result.rs index 8f9c94b..349aeaf 100644 --- a/src/aon/gpadc_reg_raw_result.rs +++ b/src/aon/gpadc_reg_raw_result.rs @@ -7,25 +7,35 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `gpadc_raw_data` reader - "] -pub struct GPADC_RAW_DATA_R(crate::FieldReader); -impl GPADC_RAW_DATA_R { - pub(crate) fn new(bits: u16) -> Self { - GPADC_RAW_DATA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_RAW_DATA_R { - type Target = crate::FieldReader; +#[doc = "Register `gpadc_reg_raw_result` writer"] +pub struct W(crate::W); +impl core::ops::Deref for W { + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } +impl core::ops::DerefMut for W { + #[inline(always)] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } +} +impl From> for W { + #[inline(always)] + fn from(writer: crate::W) -> Self { + W(writer) + } +} +#[doc = "Field `gpadc_raw_data` reader - "] +pub type GPADC_RAW_DATA_R = crate::FieldReader; impl R { #[doc = "Bits 0:11"] #[inline(always)] @@ -33,7 +43,15 @@ impl R { GPADC_RAW_DATA_R::new((self.bits & 0x0fff) as u16) } } -#[doc = "gpadc_reg_raw_result.\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 [gpadc_reg_raw_result](index.html) module"] +impl W { + #[doc = "Writes raw bits to the register."] + #[inline(always)] + pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { + self.0.bits(bits); + self + } +} +#[doc = "gpadc_reg_raw_result.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [gpadc_reg_raw_result](index.html) module"] pub struct GPADC_REG_RAW_RESULT_SPEC; impl crate::RegisterSpec for GPADC_REG_RAW_RESULT_SPEC { type Ux = u32; @@ -42,10 +60,13 @@ impl crate::RegisterSpec for GPADC_REG_RAW_RESULT_SPEC { impl crate::Readable for GPADC_REG_RAW_RESULT_SPEC { type Reader = R; } +#[doc = "`write(|w| ..)` method takes [gpadc_reg_raw_result::W](W) writer structure"] +impl crate::Writable for GPADC_REG_RAW_RESULT_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} #[doc = "`reset()` method sets gpadc_reg_raw_result to value 0"] impl crate::Resettable for GPADC_REG_RAW_RESULT_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/aon/gpadc_reg_result.rs b/src/aon/gpadc_reg_result.rs index cfd994b..6d860bf 100644 --- a/src/aon/gpadc_reg_result.rs +++ b/src/aon/gpadc_reg_result.rs @@ -7,33 +7,51 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `gpadc_data_out` reader - "] -pub struct GPADC_DATA_OUT_R(crate::FieldReader); -impl GPADC_DATA_OUT_R { - pub(crate) fn new(bits: u32) -> Self { - GPADC_DATA_OUT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_DATA_OUT_R { - type Target = crate::FieldReader; +#[doc = "Register `gpadc_reg_result` writer"] +pub struct W(crate::W); +impl core::ops::Deref for W { + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } +impl core::ops::DerefMut for W { + #[inline(always)] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } +} +impl From> for W { + #[inline(always)] + fn from(writer: crate::W) -> Self { + W(writer) + } +} +#[doc = "Field `gpadc_data_out` reader - "] +pub type GPADC_DATA_OUT_R = crate::FieldReader; impl R { #[doc = "Bits 0:25"] #[inline(always)] pub fn gpadc_data_out(&self) -> GPADC_DATA_OUT_R { - GPADC_DATA_OUT_R::new((self.bits & 0x03ff_ffff) as u32) + GPADC_DATA_OUT_R::new(self.bits & 0x03ff_ffff) + } +} +impl W { + #[doc = "Writes raw bits to the register."] + #[inline(always)] + pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { + self.0.bits(bits); + self } } -#[doc = "gpadc_reg_result.\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 [gpadc_reg_result](index.html) module"] +#[doc = "gpadc_reg_result.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [gpadc_reg_result](index.html) module"] pub struct GPADC_REG_RESULT_SPEC; impl crate::RegisterSpec for GPADC_REG_RESULT_SPEC { type Ux = u32; @@ -42,10 +60,13 @@ impl crate::RegisterSpec for GPADC_REG_RESULT_SPEC { impl crate::Readable for GPADC_REG_RESULT_SPEC { type Reader = R; } +#[doc = "`write(|w| ..)` method takes [gpadc_reg_result::W](W) writer structure"] +impl crate::Writable for GPADC_REG_RESULT_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} #[doc = "`reset()` method sets gpadc_reg_result to value 0x01ef_0000"] impl crate::Resettable for GPADC_REG_RESULT_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x01ef_0000 - } + const RESET_VALUE: Self::Ux = 0x01ef_0000; } diff --git a/src/aon/gpadc_reg_scn_neg1.rs b/src/aon/gpadc_reg_scn_neg1.rs index bcc1497..b85e2a4 100644 --- a/src/aon/gpadc_reg_scn_neg1.rs +++ b/src/aon/gpadc_reg_scn_neg1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,231 +28,113 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `gpadc_scan_neg_5` reader - "] -pub struct GPADC_SCAN_NEG_5_R(crate::FieldReader); -impl GPADC_SCAN_NEG_5_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_SCAN_NEG_5_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_SCAN_NEG_5_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_scan_neg_5` writer - "] -pub struct GPADC_SCAN_NEG_5_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_SCAN_NEG_5_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 25)) | ((value as u32 & 0x1f) << 25); - self.w - } -} -#[doc = "Field `gpadc_scan_neg_4` reader - "] -pub struct GPADC_SCAN_NEG_4_R(crate::FieldReader); -impl GPADC_SCAN_NEG_4_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_SCAN_NEG_4_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_SCAN_NEG_4_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_scan_neg_4` writer - "] -pub struct GPADC_SCAN_NEG_4_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_SCAN_NEG_4_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 20)) | ((value as u32 & 0x1f) << 20); - self.w - } -} -#[doc = "Field `gpadc_scan_neg_3` reader - "] -pub struct GPADC_SCAN_NEG_3_R(crate::FieldReader); -impl GPADC_SCAN_NEG_3_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_SCAN_NEG_3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_SCAN_NEG_3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_scan_neg_3` writer - "] -pub struct GPADC_SCAN_NEG_3_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_SCAN_NEG_3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 15)) | ((value as u32 & 0x1f) << 15); - self.w - } -} -#[doc = "Field `gpadc_scan_neg_2` reader - "] -pub struct GPADC_SCAN_NEG_2_R(crate::FieldReader); -impl GPADC_SCAN_NEG_2_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_SCAN_NEG_2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_SCAN_NEG_2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_scan_neg_2` writer - "] -pub struct GPADC_SCAN_NEG_2_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_SCAN_NEG_2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 10)) | ((value as u32 & 0x1f) << 10); - self.w - } -} -#[doc = "Field `gpadc_scan_neg_1` reader - "] -pub struct GPADC_SCAN_NEG_1_R(crate::FieldReader); -impl GPADC_SCAN_NEG_1_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_SCAN_NEG_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_SCAN_NEG_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_scan_neg_1` writer - "] -pub struct GPADC_SCAN_NEG_1_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_SCAN_NEG_1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 5)) | ((value as u32 & 0x1f) << 5); - self.w - } -} #[doc = "Field `gpadc_scan_neg_0` reader - "] -pub struct GPADC_SCAN_NEG_0_R(crate::FieldReader); -impl GPADC_SCAN_NEG_0_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_SCAN_NEG_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_SCAN_NEG_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type GPADC_SCAN_NEG_0_R = crate::FieldReader; #[doc = "Field `gpadc_scan_neg_0` writer - "] -pub struct GPADC_SCAN_NEG_0_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_SCAN_NEG_0_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type GPADC_SCAN_NEG_0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_SCN_NEG1_SPEC, u8, u8, 5, O>; +#[doc = "Field `gpadc_scan_neg_1` reader - "] +pub type GPADC_SCAN_NEG_1_R = crate::FieldReader; +#[doc = "Field `gpadc_scan_neg_1` writer - "] +pub type GPADC_SCAN_NEG_1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_SCN_NEG1_SPEC, u8, u8, 5, O>; +#[doc = "Field `gpadc_scan_neg_2` reader - "] +pub type GPADC_SCAN_NEG_2_R = crate::FieldReader; +#[doc = "Field `gpadc_scan_neg_2` writer - "] +pub type GPADC_SCAN_NEG_2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_SCN_NEG1_SPEC, u8, u8, 5, O>; +#[doc = "Field `gpadc_scan_neg_3` reader - "] +pub type GPADC_SCAN_NEG_3_R = crate::FieldReader; +#[doc = "Field `gpadc_scan_neg_3` writer - "] +pub type GPADC_SCAN_NEG_3_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_SCN_NEG1_SPEC, u8, u8, 5, O>; +#[doc = "Field `gpadc_scan_neg_4` reader - "] +pub type GPADC_SCAN_NEG_4_R = crate::FieldReader; +#[doc = "Field `gpadc_scan_neg_4` writer - "] +pub type GPADC_SCAN_NEG_4_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_SCN_NEG1_SPEC, u8, u8, 5, O>; +#[doc = "Field `gpadc_scan_neg_5` reader - "] +pub type GPADC_SCAN_NEG_5_R = crate::FieldReader; +#[doc = "Field `gpadc_scan_neg_5` writer - "] +pub type GPADC_SCAN_NEG_5_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_SCN_NEG1_SPEC, u8, u8, 5, O>; +impl R { + #[doc = "Bits 0:4"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x1f) | (value as u32 & 0x1f); - self.w + pub fn gpadc_scan_neg_0(&self) -> GPADC_SCAN_NEG_0_R { + GPADC_SCAN_NEG_0_R::new((self.bits & 0x1f) as u8) } -} -impl R { - #[doc = "Bits 25:29"] + #[doc = "Bits 5:9"] #[inline(always)] - pub fn gpadc_scan_neg_5(&self) -> GPADC_SCAN_NEG_5_R { - GPADC_SCAN_NEG_5_R::new(((self.bits >> 25) & 0x1f) as u8) + pub fn gpadc_scan_neg_1(&self) -> GPADC_SCAN_NEG_1_R { + GPADC_SCAN_NEG_1_R::new(((self.bits >> 5) & 0x1f) as u8) } - #[doc = "Bits 20:24"] + #[doc = "Bits 10:14"] #[inline(always)] - pub fn gpadc_scan_neg_4(&self) -> GPADC_SCAN_NEG_4_R { - GPADC_SCAN_NEG_4_R::new(((self.bits >> 20) & 0x1f) as u8) + pub fn gpadc_scan_neg_2(&self) -> GPADC_SCAN_NEG_2_R { + GPADC_SCAN_NEG_2_R::new(((self.bits >> 10) & 0x1f) as u8) } #[doc = "Bits 15:19"] #[inline(always)] pub fn gpadc_scan_neg_3(&self) -> GPADC_SCAN_NEG_3_R { GPADC_SCAN_NEG_3_R::new(((self.bits >> 15) & 0x1f) as u8) } - #[doc = "Bits 10:14"] - #[inline(always)] - pub fn gpadc_scan_neg_2(&self) -> GPADC_SCAN_NEG_2_R { - GPADC_SCAN_NEG_2_R::new(((self.bits >> 10) & 0x1f) as u8) - } - #[doc = "Bits 5:9"] + #[doc = "Bits 20:24"] #[inline(always)] - pub fn gpadc_scan_neg_1(&self) -> GPADC_SCAN_NEG_1_R { - GPADC_SCAN_NEG_1_R::new(((self.bits >> 5) & 0x1f) as u8) + pub fn gpadc_scan_neg_4(&self) -> GPADC_SCAN_NEG_4_R { + GPADC_SCAN_NEG_4_R::new(((self.bits >> 20) & 0x1f) as u8) } - #[doc = "Bits 0:4"] + #[doc = "Bits 25:29"] #[inline(always)] - pub fn gpadc_scan_neg_0(&self) -> GPADC_SCAN_NEG_0_R { - GPADC_SCAN_NEG_0_R::new((self.bits & 0x1f) as u8) + pub fn gpadc_scan_neg_5(&self) -> GPADC_SCAN_NEG_5_R { + GPADC_SCAN_NEG_5_R::new(((self.bits >> 25) & 0x1f) as u8) } } impl W { - #[doc = "Bits 25:29"] + #[doc = "Bits 0:4"] #[inline(always)] - pub fn gpadc_scan_neg_5(&mut self) -> GPADC_SCAN_NEG_5_W { - GPADC_SCAN_NEG_5_W { w: self } + #[must_use] + pub fn gpadc_scan_neg_0(&mut self) -> GPADC_SCAN_NEG_0_W<0> { + GPADC_SCAN_NEG_0_W::new(self) } - #[doc = "Bits 20:24"] + #[doc = "Bits 5:9"] #[inline(always)] - pub fn gpadc_scan_neg_4(&mut self) -> GPADC_SCAN_NEG_4_W { - GPADC_SCAN_NEG_4_W { w: self } + #[must_use] + pub fn gpadc_scan_neg_1(&mut self) -> GPADC_SCAN_NEG_1_W<5> { + GPADC_SCAN_NEG_1_W::new(self) } - #[doc = "Bits 15:19"] + #[doc = "Bits 10:14"] #[inline(always)] - pub fn gpadc_scan_neg_3(&mut self) -> GPADC_SCAN_NEG_3_W { - GPADC_SCAN_NEG_3_W { w: self } + #[must_use] + pub fn gpadc_scan_neg_2(&mut self) -> GPADC_SCAN_NEG_2_W<10> { + GPADC_SCAN_NEG_2_W::new(self) } - #[doc = "Bits 10:14"] + #[doc = "Bits 15:19"] #[inline(always)] - pub fn gpadc_scan_neg_2(&mut self) -> GPADC_SCAN_NEG_2_W { - GPADC_SCAN_NEG_2_W { w: self } + #[must_use] + pub fn gpadc_scan_neg_3(&mut self) -> GPADC_SCAN_NEG_3_W<15> { + GPADC_SCAN_NEG_3_W::new(self) } - #[doc = "Bits 5:9"] + #[doc = "Bits 20:24"] #[inline(always)] - pub fn gpadc_scan_neg_1(&mut self) -> GPADC_SCAN_NEG_1_W { - GPADC_SCAN_NEG_1_W { w: self } + #[must_use] + pub fn gpadc_scan_neg_4(&mut self) -> GPADC_SCAN_NEG_4_W<20> { + GPADC_SCAN_NEG_4_W::new(self) } - #[doc = "Bits 0:4"] + #[doc = "Bits 25:29"] #[inline(always)] - pub fn gpadc_scan_neg_0(&mut self) -> GPADC_SCAN_NEG_0_W { - GPADC_SCAN_NEG_0_W { w: self } + #[must_use] + pub fn gpadc_scan_neg_5(&mut self) -> GPADC_SCAN_NEG_5_W<25> { + GPADC_SCAN_NEG_5_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -269,11 +152,10 @@ impl crate::Readable for GPADC_REG_SCN_NEG1_SPEC { #[doc = "`write(|w| ..)` method takes [gpadc_reg_scn_neg1::W](W) writer structure"] impl crate::Writable for GPADC_REG_SCN_NEG1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets gpadc_reg_scn_neg1 to value 0x1ef7_bdef"] impl crate::Resettable for GPADC_REG_SCN_NEG1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x1ef7_bdef - } + const RESET_VALUE: Self::Ux = 0x1ef7_bdef; } diff --git a/src/aon/gpadc_reg_scn_neg2.rs b/src/aon/gpadc_reg_scn_neg2.rs index 05f93c1..62684cd 100644 --- a/src/aon/gpadc_reg_scn_neg2.rs +++ b/src/aon/gpadc_reg_scn_neg2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,231 +28,113 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `gpadc_scan_neg_11` reader - "] -pub struct GPADC_SCAN_NEG_11_R(crate::FieldReader); -impl GPADC_SCAN_NEG_11_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_SCAN_NEG_11_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_SCAN_NEG_11_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_scan_neg_11` writer - "] -pub struct GPADC_SCAN_NEG_11_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_SCAN_NEG_11_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 25)) | ((value as u32 & 0x1f) << 25); - self.w - } -} -#[doc = "Field `gpadc_scan_neg_10` reader - "] -pub struct GPADC_SCAN_NEG_10_R(crate::FieldReader); -impl GPADC_SCAN_NEG_10_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_SCAN_NEG_10_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_SCAN_NEG_10_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_scan_neg_10` writer - "] -pub struct GPADC_SCAN_NEG_10_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_SCAN_NEG_10_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 20)) | ((value as u32 & 0x1f) << 20); - self.w - } -} -#[doc = "Field `gpadc_scan_neg_9` reader - "] -pub struct GPADC_SCAN_NEG_9_R(crate::FieldReader); -impl GPADC_SCAN_NEG_9_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_SCAN_NEG_9_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_SCAN_NEG_9_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_scan_neg_9` writer - "] -pub struct GPADC_SCAN_NEG_9_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_SCAN_NEG_9_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 15)) | ((value as u32 & 0x1f) << 15); - self.w - } -} -#[doc = "Field `gpadc_scan_neg_8` reader - "] -pub struct GPADC_SCAN_NEG_8_R(crate::FieldReader); -impl GPADC_SCAN_NEG_8_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_SCAN_NEG_8_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_SCAN_NEG_8_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_scan_neg_8` writer - "] -pub struct GPADC_SCAN_NEG_8_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_SCAN_NEG_8_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 10)) | ((value as u32 & 0x1f) << 10); - self.w - } -} -#[doc = "Field `gpadc_scan_neg_7` reader - "] -pub struct GPADC_SCAN_NEG_7_R(crate::FieldReader); -impl GPADC_SCAN_NEG_7_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_SCAN_NEG_7_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_SCAN_NEG_7_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_scan_neg_7` writer - "] -pub struct GPADC_SCAN_NEG_7_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_SCAN_NEG_7_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 5)) | ((value as u32 & 0x1f) << 5); - self.w - } -} #[doc = "Field `gpadc_scan_neg_6` reader - "] -pub struct GPADC_SCAN_NEG_6_R(crate::FieldReader); -impl GPADC_SCAN_NEG_6_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_SCAN_NEG_6_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_SCAN_NEG_6_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type GPADC_SCAN_NEG_6_R = crate::FieldReader; #[doc = "Field `gpadc_scan_neg_6` writer - "] -pub struct GPADC_SCAN_NEG_6_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_SCAN_NEG_6_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type GPADC_SCAN_NEG_6_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_SCN_NEG2_SPEC, u8, u8, 5, O>; +#[doc = "Field `gpadc_scan_neg_7` reader - "] +pub type GPADC_SCAN_NEG_7_R = crate::FieldReader; +#[doc = "Field `gpadc_scan_neg_7` writer - "] +pub type GPADC_SCAN_NEG_7_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_SCN_NEG2_SPEC, u8, u8, 5, O>; +#[doc = "Field `gpadc_scan_neg_8` reader - "] +pub type GPADC_SCAN_NEG_8_R = crate::FieldReader; +#[doc = "Field `gpadc_scan_neg_8` writer - "] +pub type GPADC_SCAN_NEG_8_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_SCN_NEG2_SPEC, u8, u8, 5, O>; +#[doc = "Field `gpadc_scan_neg_9` reader - "] +pub type GPADC_SCAN_NEG_9_R = crate::FieldReader; +#[doc = "Field `gpadc_scan_neg_9` writer - "] +pub type GPADC_SCAN_NEG_9_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_SCN_NEG2_SPEC, u8, u8, 5, O>; +#[doc = "Field `gpadc_scan_neg_10` reader - "] +pub type GPADC_SCAN_NEG_10_R = crate::FieldReader; +#[doc = "Field `gpadc_scan_neg_10` writer - "] +pub type GPADC_SCAN_NEG_10_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_SCN_NEG2_SPEC, u8, u8, 5, O>; +#[doc = "Field `gpadc_scan_neg_11` reader - "] +pub type GPADC_SCAN_NEG_11_R = crate::FieldReader; +#[doc = "Field `gpadc_scan_neg_11` writer - "] +pub type GPADC_SCAN_NEG_11_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_SCN_NEG2_SPEC, u8, u8, 5, O>; +impl R { + #[doc = "Bits 0:4"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x1f) | (value as u32 & 0x1f); - self.w + pub fn gpadc_scan_neg_6(&self) -> GPADC_SCAN_NEG_6_R { + GPADC_SCAN_NEG_6_R::new((self.bits & 0x1f) as u8) } -} -impl R { - #[doc = "Bits 25:29"] + #[doc = "Bits 5:9"] #[inline(always)] - pub fn gpadc_scan_neg_11(&self) -> GPADC_SCAN_NEG_11_R { - GPADC_SCAN_NEG_11_R::new(((self.bits >> 25) & 0x1f) as u8) + pub fn gpadc_scan_neg_7(&self) -> GPADC_SCAN_NEG_7_R { + GPADC_SCAN_NEG_7_R::new(((self.bits >> 5) & 0x1f) as u8) } - #[doc = "Bits 20:24"] + #[doc = "Bits 10:14"] #[inline(always)] - pub fn gpadc_scan_neg_10(&self) -> GPADC_SCAN_NEG_10_R { - GPADC_SCAN_NEG_10_R::new(((self.bits >> 20) & 0x1f) as u8) + pub fn gpadc_scan_neg_8(&self) -> GPADC_SCAN_NEG_8_R { + GPADC_SCAN_NEG_8_R::new(((self.bits >> 10) & 0x1f) as u8) } #[doc = "Bits 15:19"] #[inline(always)] pub fn gpadc_scan_neg_9(&self) -> GPADC_SCAN_NEG_9_R { GPADC_SCAN_NEG_9_R::new(((self.bits >> 15) & 0x1f) as u8) } - #[doc = "Bits 10:14"] - #[inline(always)] - pub fn gpadc_scan_neg_8(&self) -> GPADC_SCAN_NEG_8_R { - GPADC_SCAN_NEG_8_R::new(((self.bits >> 10) & 0x1f) as u8) - } - #[doc = "Bits 5:9"] + #[doc = "Bits 20:24"] #[inline(always)] - pub fn gpadc_scan_neg_7(&self) -> GPADC_SCAN_NEG_7_R { - GPADC_SCAN_NEG_7_R::new(((self.bits >> 5) & 0x1f) as u8) + pub fn gpadc_scan_neg_10(&self) -> GPADC_SCAN_NEG_10_R { + GPADC_SCAN_NEG_10_R::new(((self.bits >> 20) & 0x1f) as u8) } - #[doc = "Bits 0:4"] + #[doc = "Bits 25:29"] #[inline(always)] - pub fn gpadc_scan_neg_6(&self) -> GPADC_SCAN_NEG_6_R { - GPADC_SCAN_NEG_6_R::new((self.bits & 0x1f) as u8) + pub fn gpadc_scan_neg_11(&self) -> GPADC_SCAN_NEG_11_R { + GPADC_SCAN_NEG_11_R::new(((self.bits >> 25) & 0x1f) as u8) } } impl W { - #[doc = "Bits 25:29"] + #[doc = "Bits 0:4"] #[inline(always)] - pub fn gpadc_scan_neg_11(&mut self) -> GPADC_SCAN_NEG_11_W { - GPADC_SCAN_NEG_11_W { w: self } + #[must_use] + pub fn gpadc_scan_neg_6(&mut self) -> GPADC_SCAN_NEG_6_W<0> { + GPADC_SCAN_NEG_6_W::new(self) } - #[doc = "Bits 20:24"] + #[doc = "Bits 5:9"] #[inline(always)] - pub fn gpadc_scan_neg_10(&mut self) -> GPADC_SCAN_NEG_10_W { - GPADC_SCAN_NEG_10_W { w: self } + #[must_use] + pub fn gpadc_scan_neg_7(&mut self) -> GPADC_SCAN_NEG_7_W<5> { + GPADC_SCAN_NEG_7_W::new(self) } - #[doc = "Bits 15:19"] + #[doc = "Bits 10:14"] #[inline(always)] - pub fn gpadc_scan_neg_9(&mut self) -> GPADC_SCAN_NEG_9_W { - GPADC_SCAN_NEG_9_W { w: self } + #[must_use] + pub fn gpadc_scan_neg_8(&mut self) -> GPADC_SCAN_NEG_8_W<10> { + GPADC_SCAN_NEG_8_W::new(self) } - #[doc = "Bits 10:14"] + #[doc = "Bits 15:19"] #[inline(always)] - pub fn gpadc_scan_neg_8(&mut self) -> GPADC_SCAN_NEG_8_W { - GPADC_SCAN_NEG_8_W { w: self } + #[must_use] + pub fn gpadc_scan_neg_9(&mut self) -> GPADC_SCAN_NEG_9_W<15> { + GPADC_SCAN_NEG_9_W::new(self) } - #[doc = "Bits 5:9"] + #[doc = "Bits 20:24"] #[inline(always)] - pub fn gpadc_scan_neg_7(&mut self) -> GPADC_SCAN_NEG_7_W { - GPADC_SCAN_NEG_7_W { w: self } + #[must_use] + pub fn gpadc_scan_neg_10(&mut self) -> GPADC_SCAN_NEG_10_W<20> { + GPADC_SCAN_NEG_10_W::new(self) } - #[doc = "Bits 0:4"] + #[doc = "Bits 25:29"] #[inline(always)] - pub fn gpadc_scan_neg_6(&mut self) -> GPADC_SCAN_NEG_6_W { - GPADC_SCAN_NEG_6_W { w: self } + #[must_use] + pub fn gpadc_scan_neg_11(&mut self) -> GPADC_SCAN_NEG_11_W<25> { + GPADC_SCAN_NEG_11_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -269,11 +152,10 @@ impl crate::Readable for GPADC_REG_SCN_NEG2_SPEC { #[doc = "`write(|w| ..)` method takes [gpadc_reg_scn_neg2::W](W) writer structure"] impl crate::Writable for GPADC_REG_SCN_NEG2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets gpadc_reg_scn_neg2 to value 0x1ef7_bdef"] impl crate::Resettable for GPADC_REG_SCN_NEG2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x1ef7_bdef - } + const RESET_VALUE: Self::Ux = 0x1ef7_bdef; } diff --git a/src/aon/gpadc_reg_scn_pos1.rs b/src/aon/gpadc_reg_scn_pos1.rs index 7dc59e4..44dbde1 100644 --- a/src/aon/gpadc_reg_scn_pos1.rs +++ b/src/aon/gpadc_reg_scn_pos1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,231 +28,113 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `gpadc_scan_pos_5` reader - "] -pub struct GPADC_SCAN_POS_5_R(crate::FieldReader); -impl GPADC_SCAN_POS_5_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_SCAN_POS_5_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_SCAN_POS_5_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_scan_pos_5` writer - "] -pub struct GPADC_SCAN_POS_5_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_SCAN_POS_5_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 25)) | ((value as u32 & 0x1f) << 25); - self.w - } -} -#[doc = "Field `gpadc_scan_pos_4` reader - "] -pub struct GPADC_SCAN_POS_4_R(crate::FieldReader); -impl GPADC_SCAN_POS_4_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_SCAN_POS_4_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_SCAN_POS_4_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_scan_pos_4` writer - "] -pub struct GPADC_SCAN_POS_4_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_SCAN_POS_4_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 20)) | ((value as u32 & 0x1f) << 20); - self.w - } -} -#[doc = "Field `gpadc_scan_pos_3` reader - "] -pub struct GPADC_SCAN_POS_3_R(crate::FieldReader); -impl GPADC_SCAN_POS_3_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_SCAN_POS_3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_SCAN_POS_3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_scan_pos_3` writer - "] -pub struct GPADC_SCAN_POS_3_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_SCAN_POS_3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 15)) | ((value as u32 & 0x1f) << 15); - self.w - } -} -#[doc = "Field `gpadc_scan_pos_2` reader - "] -pub struct GPADC_SCAN_POS_2_R(crate::FieldReader); -impl GPADC_SCAN_POS_2_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_SCAN_POS_2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_SCAN_POS_2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_scan_pos_2` writer - "] -pub struct GPADC_SCAN_POS_2_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_SCAN_POS_2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 10)) | ((value as u32 & 0x1f) << 10); - self.w - } -} -#[doc = "Field `gpadc_scan_pos_1` reader - "] -pub struct GPADC_SCAN_POS_1_R(crate::FieldReader); -impl GPADC_SCAN_POS_1_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_SCAN_POS_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_SCAN_POS_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_scan_pos_1` writer - "] -pub struct GPADC_SCAN_POS_1_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_SCAN_POS_1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 5)) | ((value as u32 & 0x1f) << 5); - self.w - } -} #[doc = "Field `gpadc_scan_pos_0` reader - "] -pub struct GPADC_SCAN_POS_0_R(crate::FieldReader); -impl GPADC_SCAN_POS_0_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_SCAN_POS_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_SCAN_POS_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type GPADC_SCAN_POS_0_R = crate::FieldReader; #[doc = "Field `gpadc_scan_pos_0` writer - "] -pub struct GPADC_SCAN_POS_0_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_SCAN_POS_0_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type GPADC_SCAN_POS_0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_SCN_POS1_SPEC, u8, u8, 5, O>; +#[doc = "Field `gpadc_scan_pos_1` reader - "] +pub type GPADC_SCAN_POS_1_R = crate::FieldReader; +#[doc = "Field `gpadc_scan_pos_1` writer - "] +pub type GPADC_SCAN_POS_1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_SCN_POS1_SPEC, u8, u8, 5, O>; +#[doc = "Field `gpadc_scan_pos_2` reader - "] +pub type GPADC_SCAN_POS_2_R = crate::FieldReader; +#[doc = "Field `gpadc_scan_pos_2` writer - "] +pub type GPADC_SCAN_POS_2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_SCN_POS1_SPEC, u8, u8, 5, O>; +#[doc = "Field `gpadc_scan_pos_3` reader - "] +pub type GPADC_SCAN_POS_3_R = crate::FieldReader; +#[doc = "Field `gpadc_scan_pos_3` writer - "] +pub type GPADC_SCAN_POS_3_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_SCN_POS1_SPEC, u8, u8, 5, O>; +#[doc = "Field `gpadc_scan_pos_4` reader - "] +pub type GPADC_SCAN_POS_4_R = crate::FieldReader; +#[doc = "Field `gpadc_scan_pos_4` writer - "] +pub type GPADC_SCAN_POS_4_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_SCN_POS1_SPEC, u8, u8, 5, O>; +#[doc = "Field `gpadc_scan_pos_5` reader - "] +pub type GPADC_SCAN_POS_5_R = crate::FieldReader; +#[doc = "Field `gpadc_scan_pos_5` writer - "] +pub type GPADC_SCAN_POS_5_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_SCN_POS1_SPEC, u8, u8, 5, O>; +impl R { + #[doc = "Bits 0:4"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x1f) | (value as u32 & 0x1f); - self.w + pub fn gpadc_scan_pos_0(&self) -> GPADC_SCAN_POS_0_R { + GPADC_SCAN_POS_0_R::new((self.bits & 0x1f) as u8) } -} -impl R { - #[doc = "Bits 25:29"] + #[doc = "Bits 5:9"] #[inline(always)] - pub fn gpadc_scan_pos_5(&self) -> GPADC_SCAN_POS_5_R { - GPADC_SCAN_POS_5_R::new(((self.bits >> 25) & 0x1f) as u8) + pub fn gpadc_scan_pos_1(&self) -> GPADC_SCAN_POS_1_R { + GPADC_SCAN_POS_1_R::new(((self.bits >> 5) & 0x1f) as u8) } - #[doc = "Bits 20:24"] + #[doc = "Bits 10:14"] #[inline(always)] - pub fn gpadc_scan_pos_4(&self) -> GPADC_SCAN_POS_4_R { - GPADC_SCAN_POS_4_R::new(((self.bits >> 20) & 0x1f) as u8) + pub fn gpadc_scan_pos_2(&self) -> GPADC_SCAN_POS_2_R { + GPADC_SCAN_POS_2_R::new(((self.bits >> 10) & 0x1f) as u8) } #[doc = "Bits 15:19"] #[inline(always)] pub fn gpadc_scan_pos_3(&self) -> GPADC_SCAN_POS_3_R { GPADC_SCAN_POS_3_R::new(((self.bits >> 15) & 0x1f) as u8) } - #[doc = "Bits 10:14"] - #[inline(always)] - pub fn gpadc_scan_pos_2(&self) -> GPADC_SCAN_POS_2_R { - GPADC_SCAN_POS_2_R::new(((self.bits >> 10) & 0x1f) as u8) - } - #[doc = "Bits 5:9"] + #[doc = "Bits 20:24"] #[inline(always)] - pub fn gpadc_scan_pos_1(&self) -> GPADC_SCAN_POS_1_R { - GPADC_SCAN_POS_1_R::new(((self.bits >> 5) & 0x1f) as u8) + pub fn gpadc_scan_pos_4(&self) -> GPADC_SCAN_POS_4_R { + GPADC_SCAN_POS_4_R::new(((self.bits >> 20) & 0x1f) as u8) } - #[doc = "Bits 0:4"] + #[doc = "Bits 25:29"] #[inline(always)] - pub fn gpadc_scan_pos_0(&self) -> GPADC_SCAN_POS_0_R { - GPADC_SCAN_POS_0_R::new((self.bits & 0x1f) as u8) + pub fn gpadc_scan_pos_5(&self) -> GPADC_SCAN_POS_5_R { + GPADC_SCAN_POS_5_R::new(((self.bits >> 25) & 0x1f) as u8) } } impl W { - #[doc = "Bits 25:29"] + #[doc = "Bits 0:4"] #[inline(always)] - pub fn gpadc_scan_pos_5(&mut self) -> GPADC_SCAN_POS_5_W { - GPADC_SCAN_POS_5_W { w: self } + #[must_use] + pub fn gpadc_scan_pos_0(&mut self) -> GPADC_SCAN_POS_0_W<0> { + GPADC_SCAN_POS_0_W::new(self) } - #[doc = "Bits 20:24"] + #[doc = "Bits 5:9"] #[inline(always)] - pub fn gpadc_scan_pos_4(&mut self) -> GPADC_SCAN_POS_4_W { - GPADC_SCAN_POS_4_W { w: self } + #[must_use] + pub fn gpadc_scan_pos_1(&mut self) -> GPADC_SCAN_POS_1_W<5> { + GPADC_SCAN_POS_1_W::new(self) } - #[doc = "Bits 15:19"] + #[doc = "Bits 10:14"] #[inline(always)] - pub fn gpadc_scan_pos_3(&mut self) -> GPADC_SCAN_POS_3_W { - GPADC_SCAN_POS_3_W { w: self } + #[must_use] + pub fn gpadc_scan_pos_2(&mut self) -> GPADC_SCAN_POS_2_W<10> { + GPADC_SCAN_POS_2_W::new(self) } - #[doc = "Bits 10:14"] + #[doc = "Bits 15:19"] #[inline(always)] - pub fn gpadc_scan_pos_2(&mut self) -> GPADC_SCAN_POS_2_W { - GPADC_SCAN_POS_2_W { w: self } + #[must_use] + pub fn gpadc_scan_pos_3(&mut self) -> GPADC_SCAN_POS_3_W<15> { + GPADC_SCAN_POS_3_W::new(self) } - #[doc = "Bits 5:9"] + #[doc = "Bits 20:24"] #[inline(always)] - pub fn gpadc_scan_pos_1(&mut self) -> GPADC_SCAN_POS_1_W { - GPADC_SCAN_POS_1_W { w: self } + #[must_use] + pub fn gpadc_scan_pos_4(&mut self) -> GPADC_SCAN_POS_4_W<20> { + GPADC_SCAN_POS_4_W::new(self) } - #[doc = "Bits 0:4"] + #[doc = "Bits 25:29"] #[inline(always)] - pub fn gpadc_scan_pos_0(&mut self) -> GPADC_SCAN_POS_0_W { - GPADC_SCAN_POS_0_W { w: self } + #[must_use] + pub fn gpadc_scan_pos_5(&mut self) -> GPADC_SCAN_POS_5_W<25> { + GPADC_SCAN_POS_5_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -269,11 +152,10 @@ impl crate::Readable for GPADC_REG_SCN_POS1_SPEC { #[doc = "`write(|w| ..)` method takes [gpadc_reg_scn_pos1::W](W) writer structure"] impl crate::Writable for GPADC_REG_SCN_POS1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets gpadc_reg_scn_pos1 to value 0x1ef7_bdef"] impl crate::Resettable for GPADC_REG_SCN_POS1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x1ef7_bdef - } + const RESET_VALUE: Self::Ux = 0x1ef7_bdef; } diff --git a/src/aon/gpadc_reg_scn_pos2.rs b/src/aon/gpadc_reg_scn_pos2.rs index 6143f7d..707ef76 100644 --- a/src/aon/gpadc_reg_scn_pos2.rs +++ b/src/aon/gpadc_reg_scn_pos2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,231 +28,113 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `gpadc_scan_pos_11` reader - "] -pub struct GPADC_SCAN_POS_11_R(crate::FieldReader); -impl GPADC_SCAN_POS_11_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_SCAN_POS_11_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_SCAN_POS_11_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_scan_pos_11` writer - "] -pub struct GPADC_SCAN_POS_11_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_SCAN_POS_11_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 25)) | ((value as u32 & 0x1f) << 25); - self.w - } -} -#[doc = "Field `gpadc_scan_pos_10` reader - "] -pub struct GPADC_SCAN_POS_10_R(crate::FieldReader); -impl GPADC_SCAN_POS_10_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_SCAN_POS_10_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_SCAN_POS_10_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_scan_pos_10` writer - "] -pub struct GPADC_SCAN_POS_10_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_SCAN_POS_10_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 20)) | ((value as u32 & 0x1f) << 20); - self.w - } -} -#[doc = "Field `gpadc_scan_pos_9` reader - "] -pub struct GPADC_SCAN_POS_9_R(crate::FieldReader); -impl GPADC_SCAN_POS_9_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_SCAN_POS_9_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_SCAN_POS_9_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_scan_pos_9` writer - "] -pub struct GPADC_SCAN_POS_9_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_SCAN_POS_9_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 15)) | ((value as u32 & 0x1f) << 15); - self.w - } -} -#[doc = "Field `gpadc_scan_pos_8` reader - "] -pub struct GPADC_SCAN_POS_8_R(crate::FieldReader); -impl GPADC_SCAN_POS_8_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_SCAN_POS_8_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_SCAN_POS_8_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_scan_pos_8` writer - "] -pub struct GPADC_SCAN_POS_8_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_SCAN_POS_8_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 10)) | ((value as u32 & 0x1f) << 10); - self.w - } -} -#[doc = "Field `gpadc_scan_pos_7` reader - "] -pub struct GPADC_SCAN_POS_7_R(crate::FieldReader); -impl GPADC_SCAN_POS_7_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_SCAN_POS_7_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_SCAN_POS_7_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_scan_pos_7` writer - "] -pub struct GPADC_SCAN_POS_7_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_SCAN_POS_7_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 5)) | ((value as u32 & 0x1f) << 5); - self.w - } -} #[doc = "Field `gpadc_scan_pos_6` reader - "] -pub struct GPADC_SCAN_POS_6_R(crate::FieldReader); -impl GPADC_SCAN_POS_6_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_SCAN_POS_6_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_SCAN_POS_6_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type GPADC_SCAN_POS_6_R = crate::FieldReader; #[doc = "Field `gpadc_scan_pos_6` writer - "] -pub struct GPADC_SCAN_POS_6_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_SCAN_POS_6_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type GPADC_SCAN_POS_6_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_SCN_POS2_SPEC, u8, u8, 5, O>; +#[doc = "Field `gpadc_scan_pos_7` reader - "] +pub type GPADC_SCAN_POS_7_R = crate::FieldReader; +#[doc = "Field `gpadc_scan_pos_7` writer - "] +pub type GPADC_SCAN_POS_7_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_SCN_POS2_SPEC, u8, u8, 5, O>; +#[doc = "Field `gpadc_scan_pos_8` reader - "] +pub type GPADC_SCAN_POS_8_R = crate::FieldReader; +#[doc = "Field `gpadc_scan_pos_8` writer - "] +pub type GPADC_SCAN_POS_8_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_SCN_POS2_SPEC, u8, u8, 5, O>; +#[doc = "Field `gpadc_scan_pos_9` reader - "] +pub type GPADC_SCAN_POS_9_R = crate::FieldReader; +#[doc = "Field `gpadc_scan_pos_9` writer - "] +pub type GPADC_SCAN_POS_9_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_SCN_POS2_SPEC, u8, u8, 5, O>; +#[doc = "Field `gpadc_scan_pos_10` reader - "] +pub type GPADC_SCAN_POS_10_R = crate::FieldReader; +#[doc = "Field `gpadc_scan_pos_10` writer - "] +pub type GPADC_SCAN_POS_10_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_SCN_POS2_SPEC, u8, u8, 5, O>; +#[doc = "Field `gpadc_scan_pos_11` reader - "] +pub type GPADC_SCAN_POS_11_R = crate::FieldReader; +#[doc = "Field `gpadc_scan_pos_11` writer - "] +pub type GPADC_SCAN_POS_11_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_SCN_POS2_SPEC, u8, u8, 5, O>; +impl R { + #[doc = "Bits 0:4"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x1f) | (value as u32 & 0x1f); - self.w + pub fn gpadc_scan_pos_6(&self) -> GPADC_SCAN_POS_6_R { + GPADC_SCAN_POS_6_R::new((self.bits & 0x1f) as u8) } -} -impl R { - #[doc = "Bits 25:29"] + #[doc = "Bits 5:9"] #[inline(always)] - pub fn gpadc_scan_pos_11(&self) -> GPADC_SCAN_POS_11_R { - GPADC_SCAN_POS_11_R::new(((self.bits >> 25) & 0x1f) as u8) + pub fn gpadc_scan_pos_7(&self) -> GPADC_SCAN_POS_7_R { + GPADC_SCAN_POS_7_R::new(((self.bits >> 5) & 0x1f) as u8) } - #[doc = "Bits 20:24"] + #[doc = "Bits 10:14"] #[inline(always)] - pub fn gpadc_scan_pos_10(&self) -> GPADC_SCAN_POS_10_R { - GPADC_SCAN_POS_10_R::new(((self.bits >> 20) & 0x1f) as u8) + pub fn gpadc_scan_pos_8(&self) -> GPADC_SCAN_POS_8_R { + GPADC_SCAN_POS_8_R::new(((self.bits >> 10) & 0x1f) as u8) } #[doc = "Bits 15:19"] #[inline(always)] pub fn gpadc_scan_pos_9(&self) -> GPADC_SCAN_POS_9_R { GPADC_SCAN_POS_9_R::new(((self.bits >> 15) & 0x1f) as u8) } - #[doc = "Bits 10:14"] - #[inline(always)] - pub fn gpadc_scan_pos_8(&self) -> GPADC_SCAN_POS_8_R { - GPADC_SCAN_POS_8_R::new(((self.bits >> 10) & 0x1f) as u8) - } - #[doc = "Bits 5:9"] + #[doc = "Bits 20:24"] #[inline(always)] - pub fn gpadc_scan_pos_7(&self) -> GPADC_SCAN_POS_7_R { - GPADC_SCAN_POS_7_R::new(((self.bits >> 5) & 0x1f) as u8) + pub fn gpadc_scan_pos_10(&self) -> GPADC_SCAN_POS_10_R { + GPADC_SCAN_POS_10_R::new(((self.bits >> 20) & 0x1f) as u8) } - #[doc = "Bits 0:4"] + #[doc = "Bits 25:29"] #[inline(always)] - pub fn gpadc_scan_pos_6(&self) -> GPADC_SCAN_POS_6_R { - GPADC_SCAN_POS_6_R::new((self.bits & 0x1f) as u8) + pub fn gpadc_scan_pos_11(&self) -> GPADC_SCAN_POS_11_R { + GPADC_SCAN_POS_11_R::new(((self.bits >> 25) & 0x1f) as u8) } } impl W { - #[doc = "Bits 25:29"] + #[doc = "Bits 0:4"] #[inline(always)] - pub fn gpadc_scan_pos_11(&mut self) -> GPADC_SCAN_POS_11_W { - GPADC_SCAN_POS_11_W { w: self } + #[must_use] + pub fn gpadc_scan_pos_6(&mut self) -> GPADC_SCAN_POS_6_W<0> { + GPADC_SCAN_POS_6_W::new(self) } - #[doc = "Bits 20:24"] + #[doc = "Bits 5:9"] #[inline(always)] - pub fn gpadc_scan_pos_10(&mut self) -> GPADC_SCAN_POS_10_W { - GPADC_SCAN_POS_10_W { w: self } + #[must_use] + pub fn gpadc_scan_pos_7(&mut self) -> GPADC_SCAN_POS_7_W<5> { + GPADC_SCAN_POS_7_W::new(self) } - #[doc = "Bits 15:19"] + #[doc = "Bits 10:14"] #[inline(always)] - pub fn gpadc_scan_pos_9(&mut self) -> GPADC_SCAN_POS_9_W { - GPADC_SCAN_POS_9_W { w: self } + #[must_use] + pub fn gpadc_scan_pos_8(&mut self) -> GPADC_SCAN_POS_8_W<10> { + GPADC_SCAN_POS_8_W::new(self) } - #[doc = "Bits 10:14"] + #[doc = "Bits 15:19"] #[inline(always)] - pub fn gpadc_scan_pos_8(&mut self) -> GPADC_SCAN_POS_8_W { - GPADC_SCAN_POS_8_W { w: self } + #[must_use] + pub fn gpadc_scan_pos_9(&mut self) -> GPADC_SCAN_POS_9_W<15> { + GPADC_SCAN_POS_9_W::new(self) } - #[doc = "Bits 5:9"] + #[doc = "Bits 20:24"] #[inline(always)] - pub fn gpadc_scan_pos_7(&mut self) -> GPADC_SCAN_POS_7_W { - GPADC_SCAN_POS_7_W { w: self } + #[must_use] + pub fn gpadc_scan_pos_10(&mut self) -> GPADC_SCAN_POS_10_W<20> { + GPADC_SCAN_POS_10_W::new(self) } - #[doc = "Bits 0:4"] + #[doc = "Bits 25:29"] #[inline(always)] - pub fn gpadc_scan_pos_6(&mut self) -> GPADC_SCAN_POS_6_W { - GPADC_SCAN_POS_6_W { w: self } + #[must_use] + pub fn gpadc_scan_pos_11(&mut self) -> GPADC_SCAN_POS_11_W<25> { + GPADC_SCAN_POS_11_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -269,11 +152,10 @@ impl crate::Readable for GPADC_REG_SCN_POS2_SPEC { #[doc = "`write(|w| ..)` method takes [gpadc_reg_scn_pos2::W](W) writer structure"] impl crate::Writable for GPADC_REG_SCN_POS2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets gpadc_reg_scn_pos2 to value 0x1ef7_bdef"] impl crate::Resettable for GPADC_REG_SCN_POS2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x1ef7_bdef - } + const RESET_VALUE: Self::Ux = 0x1ef7_bdef; } diff --git a/src/aon/gpadc_reg_status.rs b/src/aon/gpadc_reg_status.rs index 2ad63c9..aad100a 100644 --- a/src/aon/gpadc_reg_status.rs +++ b/src/aon/gpadc_reg_status.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,70 +28,40 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } +#[doc = "Field `gpadc_data_rdy` reader - "] +pub type GPADC_DATA_RDY_R = crate::BitReader; #[doc = "Field `gpadc_reserved` reader - "] -pub struct GPADC_RESERVED_R(crate::FieldReader); -impl GPADC_RESERVED_R { - pub(crate) fn new(bits: u16) -> Self { - GPADC_RESERVED_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_RESERVED_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type GPADC_RESERVED_R = crate::FieldReader; #[doc = "Field `gpadc_reserved` writer - "] -pub struct GPADC_RESERVED_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_RESERVED_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xffff << 16)) | ((value as u32 & 0xffff) << 16); - self.w - } -} -#[doc = "Field `gpadc_data_rdy` reader - "] -pub struct GPADC_DATA_RDY_R(crate::FieldReader); -impl GPADC_DATA_RDY_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_DATA_RDY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_DATA_RDY_R { - type Target = crate::FieldReader; +pub type GPADC_RESERVED_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_REG_STATUS_SPEC, u16, u16, 16, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn gpadc_data_rdy(&self) -> GPADC_DATA_RDY_R { + GPADC_DATA_RDY_R::new((self.bits & 1) != 0) } -} -impl R { #[doc = "Bits 16:31"] #[inline(always)] pub fn gpadc_reserved(&self) -> GPADC_RESERVED_R { GPADC_RESERVED_R::new(((self.bits >> 16) & 0xffff) as u16) } - #[doc = "Bit 0"] - #[inline(always)] - pub fn gpadc_data_rdy(&self) -> GPADC_DATA_RDY_R { - GPADC_DATA_RDY_R::new((self.bits & 0x01) != 0) - } } impl W { #[doc = "Bits 16:31"] #[inline(always)] - pub fn gpadc_reserved(&mut self) -> GPADC_RESERVED_W { - GPADC_RESERVED_W { w: self } + #[must_use] + pub fn gpadc_reserved(&mut self) -> GPADC_RESERVED_W<16> { + GPADC_RESERVED_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -108,11 +79,10 @@ impl crate::Readable for GPADC_REG_STATUS_SPEC { #[doc = "`write(|w| ..)` method takes [gpadc_reg_status::W](W) writer structure"] impl crate::Writable for GPADC_REG_STATUS_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets gpadc_reg_status to value 0"] impl crate::Resettable for GPADC_REG_STATUS_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/aon/hbncore_resv0.rs b/src/aon/hbncore_resv0.rs index 6c139c4..78b8957 100644 --- a/src/aon/hbncore_resv0.rs +++ b/src/aon/hbncore_resv0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `hbncore_resv0_data` reader - "] -pub struct HBNCORE_RESV0_DATA_R(crate::FieldReader); -impl HBNCORE_RESV0_DATA_R { - pub(crate) fn new(bits: u32) -> Self { - HBNCORE_RESV0_DATA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for HBNCORE_RESV0_DATA_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type HBNCORE_RESV0_DATA_R = crate::FieldReader; #[doc = "Field `hbncore_resv0_data` writer - "] -pub struct HBNCORE_RESV0_DATA_W<'a> { - w: &'a mut W, -} -impl<'a> HBNCORE_RESV0_DATA_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type HBNCORE_RESV0_DATA_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, HBNCORE_RESV0_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn hbncore_resv0_data(&self) -> HBNCORE_RESV0_DATA_R { - HBNCORE_RESV0_DATA_R::new((self.bits & 0xffff_ffff) as u32) + HBNCORE_RESV0_DATA_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn hbncore_resv0_data(&mut self) -> HBNCORE_RESV0_DATA_W { - HBNCORE_RESV0_DATA_W { w: self } + #[must_use] + pub fn hbncore_resv0_data(&mut self) -> HBNCORE_RESV0_DATA_W<0> { + HBNCORE_RESV0_DATA_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for HBNCORE_RESV0_SPEC { #[doc = "`write(|w| ..)` method takes [hbncore_resv0::W](W) writer structure"] impl crate::Writable for HBNCORE_RESV0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets hbncore_resv0 to value 0"] impl crate::Resettable for HBNCORE_RESV0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/aon/hbncore_resv1.rs b/src/aon/hbncore_resv1.rs index 087038b..32c6dc8 100644 --- a/src/aon/hbncore_resv1.rs +++ b/src/aon/hbncore_resv1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `hbncore_resv1_data` reader - "] -pub struct HBNCORE_RESV1_DATA_R(crate::FieldReader); -impl HBNCORE_RESV1_DATA_R { - pub(crate) fn new(bits: u32) -> Self { - HBNCORE_RESV1_DATA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for HBNCORE_RESV1_DATA_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type HBNCORE_RESV1_DATA_R = crate::FieldReader; #[doc = "Field `hbncore_resv1_data` writer - "] -pub struct HBNCORE_RESV1_DATA_W<'a> { - w: &'a mut W, -} -impl<'a> HBNCORE_RESV1_DATA_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type HBNCORE_RESV1_DATA_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, HBNCORE_RESV1_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn hbncore_resv1_data(&self) -> HBNCORE_RESV1_DATA_R { - HBNCORE_RESV1_DATA_R::new((self.bits & 0xffff_ffff) as u32) + HBNCORE_RESV1_DATA_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn hbncore_resv1_data(&mut self) -> HBNCORE_RESV1_DATA_W { - HBNCORE_RESV1_DATA_W { w: self } + #[must_use] + pub fn hbncore_resv1_data(&mut self) -> HBNCORE_RESV1_DATA_W<0> { + HBNCORE_RESV1_DATA_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for HBNCORE_RESV1_SPEC { #[doc = "`write(|w| ..)` method takes [hbncore_resv1::W](W) writer structure"] impl crate::Writable for HBNCORE_RESV1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets hbncore_resv1 to value 0xffff_ffff"] impl crate::Resettable for HBNCORE_RESV1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xffff_ffff - } + const RESET_VALUE: Self::Ux = 0xffff_ffff; } diff --git a/src/aon/ldo11soc_and_dctest.rs b/src/aon/ldo11soc_and_dctest.rs index d2cde85..1bf44ff 100644 --- a/src/aon/ldo11soc_and_dctest.rs +++ b/src/aon/ldo11soc_and_dctest.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,437 +28,175 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `pmip_dc_tp_out_en_aon` reader - "] -pub struct PMIP_DC_TP_OUT_EN_AON_R(crate::FieldReader); -impl PMIP_DC_TP_OUT_EN_AON_R { - pub(crate) fn new(bits: bool) -> Self { - PMIP_DC_TP_OUT_EN_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PMIP_DC_TP_OUT_EN_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pmip_dc_tp_out_en_aon` writer - "] -pub struct PMIP_DC_TP_OUT_EN_AON_W<'a> { - w: &'a mut W, -} -impl<'a> PMIP_DC_TP_OUT_EN_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 31)) | ((value as u32 & 0x01) << 31); - self.w - } -} -#[doc = "Field `pu_vddcore_misc_aon` reader - "] -pub struct PU_VDDCORE_MISC_AON_R(crate::FieldReader); -impl PU_VDDCORE_MISC_AON_R { - pub(crate) fn new(bits: bool) -> Self { - PU_VDDCORE_MISC_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_VDDCORE_MISC_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_vddcore_misc_aon` writer - "] -pub struct PU_VDDCORE_MISC_AON_W<'a> { - w: &'a mut W, -} -impl<'a> PU_VDDCORE_MISC_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 30)) | ((value as u32 & 0x01) << 30); - self.w - } -} -#[doc = "Field `ldo11soc_power_good_aon` reader - "] -pub struct LDO11SOC_POWER_GOOD_AON_R(crate::FieldReader); -impl LDO11SOC_POWER_GOOD_AON_R { - pub(crate) fn new(bits: bool) -> Self { - LDO11SOC_POWER_GOOD_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LDO11SOC_POWER_GOOD_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ldo11soc_rdy_aon` reader - "] -pub struct LDO11SOC_RDY_AON_R(crate::FieldReader); -impl LDO11SOC_RDY_AON_R { - pub(crate) fn new(bits: bool) -> Self { - LDO11SOC_RDY_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LDO11SOC_RDY_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ldo11soc_cc_aon` reader - "] -pub struct LDO11SOC_CC_AON_R(crate::FieldReader); -impl LDO11SOC_CC_AON_R { - pub(crate) fn new(bits: u8) -> Self { - LDO11SOC_CC_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LDO11SOC_CC_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ldo11soc_cc_aon` writer - "] -pub struct LDO11SOC_CC_AON_W<'a> { - w: &'a mut W, -} -impl<'a> LDO11SOC_CC_AON_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 24)) | ((value as u32 & 0x03) << 24); - self.w - } -} -#[doc = "Field `ldo11soc_vth_sel_aon` reader - "] -pub struct LDO11SOC_VTH_SEL_AON_R(crate::FieldReader); -impl LDO11SOC_VTH_SEL_AON_R { - pub(crate) fn new(bits: u8) -> Self { - LDO11SOC_VTH_SEL_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LDO11SOC_VTH_SEL_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ldo11soc_vth_sel_aon` writer - "] -pub struct LDO11SOC_VTH_SEL_AON_W<'a> { - w: &'a mut W, -} -impl<'a> LDO11SOC_VTH_SEL_AON_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 12)) | ((value as u32 & 0x03) << 12); - self.w - } -} -#[doc = "Field `ldo11soc_pulldown_sel_aon` reader - "] -pub struct LDO11SOC_PULLDOWN_SEL_AON_R(crate::FieldReader); -impl LDO11SOC_PULLDOWN_SEL_AON_R { - pub(crate) fn new(bits: bool) -> Self { - LDO11SOC_PULLDOWN_SEL_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LDO11SOC_PULLDOWN_SEL_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ldo11soc_pulldown_sel_aon` writer - "] -pub struct LDO11SOC_PULLDOWN_SEL_AON_W<'a> { - w: &'a mut W, -} -impl<'a> LDO11SOC_PULLDOWN_SEL_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w - } -} -#[doc = "Field `ldo11soc_pulldown_aon` reader - "] -pub struct LDO11SOC_PULLDOWN_AON_R(crate::FieldReader); -impl LDO11SOC_PULLDOWN_AON_R { - pub(crate) fn new(bits: bool) -> Self { - LDO11SOC_PULLDOWN_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LDO11SOC_PULLDOWN_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ldo11soc_pulldown_aon` writer - "] -pub struct LDO11SOC_PULLDOWN_AON_W<'a> { - w: &'a mut W, -} -impl<'a> LDO11SOC_PULLDOWN_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); - self.w - } -} -#[doc = "Field `ldo11soc_sstart_delay_aon` reader - "] -pub struct LDO11SOC_SSTART_DELAY_AON_R(crate::FieldReader); -impl LDO11SOC_SSTART_DELAY_AON_R { - pub(crate) fn new(bits: u8) -> Self { - LDO11SOC_SSTART_DELAY_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LDO11SOC_SSTART_DELAY_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ldo11soc_sstart_delay_aon` writer - "] -pub struct LDO11SOC_SSTART_DELAY_AON_W<'a> { - w: &'a mut W, -} -impl<'a> LDO11SOC_SSTART_DELAY_AON_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} -#[doc = "Field `ldo11soc_sstart_sel_aon` reader - "] -pub struct LDO11SOC_SSTART_SEL_AON_R(crate::FieldReader); -impl LDO11SOC_SSTART_SEL_AON_R { - pub(crate) fn new(bits: bool) -> Self { - LDO11SOC_SSTART_SEL_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LDO11SOC_SSTART_SEL_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ldo11soc_sstart_sel_aon` writer - "] -pub struct LDO11SOC_SSTART_SEL_AON_W<'a> { - w: &'a mut W, -} -impl<'a> LDO11SOC_SSTART_SEL_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} #[doc = "Field `pu_ldo11soc_aon` reader - "] -pub struct PU_LDO11SOC_AON_R(crate::FieldReader); -impl PU_LDO11SOC_AON_R { - pub(crate) fn new(bits: bool) -> Self { - PU_LDO11SOC_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_LDO11SOC_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PU_LDO11SOC_AON_R = crate::BitReader; #[doc = "Field `pu_ldo11soc_aon` writer - "] -pub struct PU_LDO11SOC_AON_W<'a> { - w: &'a mut W, -} -impl<'a> PU_LDO11SOC_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type PU_LDO11SOC_AON_W<'a, const O: u8> = + crate::BitWriter<'a, u32, LDO11SOC_AND_DCTEST_SPEC, bool, O>; +#[doc = "Field `ldo11soc_sstart_sel_aon` reader - "] +pub type LDO11SOC_SSTART_SEL_AON_R = crate::BitReader; +#[doc = "Field `ldo11soc_sstart_sel_aon` writer - "] +pub type LDO11SOC_SSTART_SEL_AON_W<'a, const O: u8> = + crate::BitWriter<'a, u32, LDO11SOC_AND_DCTEST_SPEC, bool, O>; +#[doc = "Field `ldo11soc_sstart_delay_aon` reader - "] +pub type LDO11SOC_SSTART_DELAY_AON_R = crate::FieldReader; +#[doc = "Field `ldo11soc_sstart_delay_aon` writer - "] +pub type LDO11SOC_SSTART_DELAY_AON_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LDO11SOC_AND_DCTEST_SPEC, u8, u8, 2, O>; +#[doc = "Field `ldo11soc_pulldown_aon` reader - "] +pub type LDO11SOC_PULLDOWN_AON_R = crate::BitReader; +#[doc = "Field `ldo11soc_pulldown_aon` writer - "] +pub type LDO11SOC_PULLDOWN_AON_W<'a, const O: u8> = + crate::BitWriter<'a, u32, LDO11SOC_AND_DCTEST_SPEC, bool, O>; +#[doc = "Field `ldo11soc_pulldown_sel_aon` reader - "] +pub type LDO11SOC_PULLDOWN_SEL_AON_R = crate::BitReader; +#[doc = "Field `ldo11soc_pulldown_sel_aon` writer - "] +pub type LDO11SOC_PULLDOWN_SEL_AON_W<'a, const O: u8> = + crate::BitWriter<'a, u32, LDO11SOC_AND_DCTEST_SPEC, bool, O>; +#[doc = "Field `ldo11soc_vth_sel_aon` reader - "] +pub type LDO11SOC_VTH_SEL_AON_R = crate::FieldReader; +#[doc = "Field `ldo11soc_vth_sel_aon` writer - "] +pub type LDO11SOC_VTH_SEL_AON_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LDO11SOC_AND_DCTEST_SPEC, u8, u8, 2, O>; +#[doc = "Field `ldo11soc_cc_aon` reader - "] +pub type LDO11SOC_CC_AON_R = crate::FieldReader; +#[doc = "Field `ldo11soc_cc_aon` writer - "] +pub type LDO11SOC_CC_AON_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LDO11SOC_AND_DCTEST_SPEC, u8, u8, 2, O>; +#[doc = "Field `ldo11soc_rdy_aon` reader - "] +pub type LDO11SOC_RDY_AON_R = crate::BitReader; +#[doc = "Field `ldo11soc_power_good_aon` reader - "] +pub type LDO11SOC_POWER_GOOD_AON_R = crate::BitReader; +#[doc = "Field `pu_vddcore_misc_aon` reader - "] +pub type PU_VDDCORE_MISC_AON_R = crate::BitReader; +#[doc = "Field `pu_vddcore_misc_aon` writer - "] +pub type PU_VDDCORE_MISC_AON_W<'a, const O: u8> = + crate::BitWriter<'a, u32, LDO11SOC_AND_DCTEST_SPEC, bool, O>; +#[doc = "Field `pmip_dc_tp_out_en_aon` reader - "] +pub type PMIP_DC_TP_OUT_EN_AON_R = crate::BitReader; +#[doc = "Field `pmip_dc_tp_out_en_aon` writer - "] +pub type PMIP_DC_TP_OUT_EN_AON_W<'a, const O: u8> = + crate::BitWriter<'a, u32, LDO11SOC_AND_DCTEST_SPEC, bool, O>; impl R { - #[doc = "Bit 31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn pmip_dc_tp_out_en_aon(&self) -> PMIP_DC_TP_OUT_EN_AON_R { - PMIP_DC_TP_OUT_EN_AON_R::new(((self.bits >> 31) & 0x01) != 0) + pub fn pu_ldo11soc_aon(&self) -> PU_LDO11SOC_AON_R { + PU_LDO11SOC_AON_R::new((self.bits & 1) != 0) } - #[doc = "Bit 30"] + #[doc = "Bit 4"] #[inline(always)] - pub fn pu_vddcore_misc_aon(&self) -> PU_VDDCORE_MISC_AON_R { - PU_VDDCORE_MISC_AON_R::new(((self.bits >> 30) & 0x01) != 0) + pub fn ldo11soc_sstart_sel_aon(&self) -> LDO11SOC_SSTART_SEL_AON_R { + LDO11SOC_SSTART_SEL_AON_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 29"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn ldo11soc_power_good_aon(&self) -> LDO11SOC_POWER_GOOD_AON_R { - LDO11SOC_POWER_GOOD_AON_R::new(((self.bits >> 29) & 0x01) != 0) + pub fn ldo11soc_sstart_delay_aon(&self) -> LDO11SOC_SSTART_DELAY_AON_R { + LDO11SOC_SSTART_DELAY_AON_R::new(((self.bits >> 8) & 3) as u8) } - #[doc = "Bit 28"] + #[doc = "Bit 10"] #[inline(always)] - pub fn ldo11soc_rdy_aon(&self) -> LDO11SOC_RDY_AON_R { - LDO11SOC_RDY_AON_R::new(((self.bits >> 28) & 0x01) != 0) + pub fn ldo11soc_pulldown_aon(&self) -> LDO11SOC_PULLDOWN_AON_R { + LDO11SOC_PULLDOWN_AON_R::new(((self.bits >> 10) & 1) != 0) } - #[doc = "Bits 24:25"] + #[doc = "Bit 11"] #[inline(always)] - pub fn ldo11soc_cc_aon(&self) -> LDO11SOC_CC_AON_R { - LDO11SOC_CC_AON_R::new(((self.bits >> 24) & 0x03) as u8) + pub fn ldo11soc_pulldown_sel_aon(&self) -> LDO11SOC_PULLDOWN_SEL_AON_R { + LDO11SOC_PULLDOWN_SEL_AON_R::new(((self.bits >> 11) & 1) != 0) } #[doc = "Bits 12:13"] #[inline(always)] pub fn ldo11soc_vth_sel_aon(&self) -> LDO11SOC_VTH_SEL_AON_R { - LDO11SOC_VTH_SEL_AON_R::new(((self.bits >> 12) & 0x03) as u8) + LDO11SOC_VTH_SEL_AON_R::new(((self.bits >> 12) & 3) as u8) } - #[doc = "Bit 11"] + #[doc = "Bits 24:25"] #[inline(always)] - pub fn ldo11soc_pulldown_sel_aon(&self) -> LDO11SOC_PULLDOWN_SEL_AON_R { - LDO11SOC_PULLDOWN_SEL_AON_R::new(((self.bits >> 11) & 0x01) != 0) + pub fn ldo11soc_cc_aon(&self) -> LDO11SOC_CC_AON_R { + LDO11SOC_CC_AON_R::new(((self.bits >> 24) & 3) as u8) } - #[doc = "Bit 10"] + #[doc = "Bit 28"] #[inline(always)] - pub fn ldo11soc_pulldown_aon(&self) -> LDO11SOC_PULLDOWN_AON_R { - LDO11SOC_PULLDOWN_AON_R::new(((self.bits >> 10) & 0x01) != 0) + pub fn ldo11soc_rdy_aon(&self) -> LDO11SOC_RDY_AON_R { + LDO11SOC_RDY_AON_R::new(((self.bits >> 28) & 1) != 0) } - #[doc = "Bits 8:9"] + #[doc = "Bit 29"] #[inline(always)] - pub fn ldo11soc_sstart_delay_aon(&self) -> LDO11SOC_SSTART_DELAY_AON_R { - LDO11SOC_SSTART_DELAY_AON_R::new(((self.bits >> 8) & 0x03) as u8) + pub fn ldo11soc_power_good_aon(&self) -> LDO11SOC_POWER_GOOD_AON_R { + LDO11SOC_POWER_GOOD_AON_R::new(((self.bits >> 29) & 1) != 0) } - #[doc = "Bit 4"] + #[doc = "Bit 30"] #[inline(always)] - pub fn ldo11soc_sstart_sel_aon(&self) -> LDO11SOC_SSTART_SEL_AON_R { - LDO11SOC_SSTART_SEL_AON_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn pu_vddcore_misc_aon(&self) -> PU_VDDCORE_MISC_AON_R { + PU_VDDCORE_MISC_AON_R::new(((self.bits >> 30) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 31"] #[inline(always)] - pub fn pu_ldo11soc_aon(&self) -> PU_LDO11SOC_AON_R { - PU_LDO11SOC_AON_R::new((self.bits & 0x01) != 0) + pub fn pmip_dc_tp_out_en_aon(&self) -> PMIP_DC_TP_OUT_EN_AON_R { + PMIP_DC_TP_OUT_EN_AON_R::new(((self.bits >> 31) & 1) != 0) } } impl W { - #[doc = "Bit 31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn pmip_dc_tp_out_en_aon(&mut self) -> PMIP_DC_TP_OUT_EN_AON_W { - PMIP_DC_TP_OUT_EN_AON_W { w: self } + #[must_use] + pub fn pu_ldo11soc_aon(&mut self) -> PU_LDO11SOC_AON_W<0> { + PU_LDO11SOC_AON_W::new(self) } - #[doc = "Bit 30"] + #[doc = "Bit 4"] #[inline(always)] - pub fn pu_vddcore_misc_aon(&mut self) -> PU_VDDCORE_MISC_AON_W { - PU_VDDCORE_MISC_AON_W { w: self } + #[must_use] + pub fn ldo11soc_sstart_sel_aon(&mut self) -> LDO11SOC_SSTART_SEL_AON_W<4> { + LDO11SOC_SSTART_SEL_AON_W::new(self) } - #[doc = "Bits 24:25"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn ldo11soc_cc_aon(&mut self) -> LDO11SOC_CC_AON_W { - LDO11SOC_CC_AON_W { w: self } + #[must_use] + pub fn ldo11soc_sstart_delay_aon(&mut self) -> LDO11SOC_SSTART_DELAY_AON_W<8> { + LDO11SOC_SSTART_DELAY_AON_W::new(self) } - #[doc = "Bits 12:13"] + #[doc = "Bit 10"] #[inline(always)] - pub fn ldo11soc_vth_sel_aon(&mut self) -> LDO11SOC_VTH_SEL_AON_W { - LDO11SOC_VTH_SEL_AON_W { w: self } + #[must_use] + pub fn ldo11soc_pulldown_aon(&mut self) -> LDO11SOC_PULLDOWN_AON_W<10> { + LDO11SOC_PULLDOWN_AON_W::new(self) } #[doc = "Bit 11"] #[inline(always)] - pub fn ldo11soc_pulldown_sel_aon(&mut self) -> LDO11SOC_PULLDOWN_SEL_AON_W { - LDO11SOC_PULLDOWN_SEL_AON_W { w: self } + #[must_use] + pub fn ldo11soc_pulldown_sel_aon(&mut self) -> LDO11SOC_PULLDOWN_SEL_AON_W<11> { + LDO11SOC_PULLDOWN_SEL_AON_W::new(self) } - #[doc = "Bit 10"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn ldo11soc_pulldown_aon(&mut self) -> LDO11SOC_PULLDOWN_AON_W { - LDO11SOC_PULLDOWN_AON_W { w: self } + #[must_use] + pub fn ldo11soc_vth_sel_aon(&mut self) -> LDO11SOC_VTH_SEL_AON_W<12> { + LDO11SOC_VTH_SEL_AON_W::new(self) } - #[doc = "Bits 8:9"] + #[doc = "Bits 24:25"] #[inline(always)] - pub fn ldo11soc_sstart_delay_aon(&mut self) -> LDO11SOC_SSTART_DELAY_AON_W { - LDO11SOC_SSTART_DELAY_AON_W { w: self } + #[must_use] + pub fn ldo11soc_cc_aon(&mut self) -> LDO11SOC_CC_AON_W<24> { + LDO11SOC_CC_AON_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 30"] #[inline(always)] - pub fn ldo11soc_sstart_sel_aon(&mut self) -> LDO11SOC_SSTART_SEL_AON_W { - LDO11SOC_SSTART_SEL_AON_W { w: self } + #[must_use] + pub fn pu_vddcore_misc_aon(&mut self) -> PU_VDDCORE_MISC_AON_W<30> { + PU_VDDCORE_MISC_AON_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 31"] #[inline(always)] - pub fn pu_ldo11soc_aon(&mut self) -> PU_LDO11SOC_AON_W { - PU_LDO11SOC_AON_W { w: self } + #[must_use] + pub fn pmip_dc_tp_out_en_aon(&mut self) -> PMIP_DC_TP_OUT_EN_AON_W<31> { + PMIP_DC_TP_OUT_EN_AON_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -475,11 +214,10 @@ impl crate::Readable for LDO11SOC_AND_DCTEST_SPEC { #[doc = "`write(|w| ..)` method takes [ldo11soc_and_dctest::W](W) writer structure"] impl crate::Writable for LDO11SOC_AND_DCTEST_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ldo11soc_and_dctest to value 0x7000_1811"] impl crate::Resettable for LDO11SOC_AND_DCTEST_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x7000_1811 - } + const RESET_VALUE: Self::Ux = 0x7000_1811; } diff --git a/src/aon/psw_irrcv.rs b/src/aon/psw_irrcv.rs index a0eedf0..b87988d 100644 --- a/src/aon/psw_irrcv.rs +++ b/src/aon/psw_irrcv.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,61 +28,32 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `pu_ir_psw_aon` reader - "] -pub struct PU_IR_PSW_AON_R(crate::FieldReader); -impl PU_IR_PSW_AON_R { - pub(crate) fn new(bits: bool) -> Self { - PU_IR_PSW_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_IR_PSW_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PU_IR_PSW_AON_R = crate::BitReader; #[doc = "Field `pu_ir_psw_aon` writer - "] -pub struct PU_IR_PSW_AON_W<'a> { - w: &'a mut W, -} -impl<'a> PU_IR_PSW_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type PU_IR_PSW_AON_W<'a, const O: u8> = crate::BitWriter<'a, u32, PSW_IRRCV_SPEC, bool, O>; impl R { #[doc = "Bit 0"] #[inline(always)] pub fn pu_ir_psw_aon(&self) -> PU_IR_PSW_AON_R { - PU_IR_PSW_AON_R::new((self.bits & 0x01) != 0) + PU_IR_PSW_AON_R::new((self.bits & 1) != 0) } } impl W { #[doc = "Bit 0"] #[inline(always)] - pub fn pu_ir_psw_aon(&mut self) -> PU_IR_PSW_AON_W { - PU_IR_PSW_AON_W { w: self } + #[must_use] + pub fn pu_ir_psw_aon(&mut self) -> PU_IR_PSW_AON_W<0> { + PU_IR_PSW_AON_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -99,11 +71,10 @@ impl crate::Readable for PSW_IRRCV_SPEC { #[doc = "`write(|w| ..)` method takes [psw_irrcv::W](W) writer structure"] impl crate::Writable for PSW_IRRCV_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets psw_irrcv to value 0"] impl crate::Resettable for PSW_IRRCV_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/aon/rf_top_aon.rs b/src/aon/rf_top_aon.rs index a156898..b399d79 100644 --- a/src/aon/rf_top_aon.rs +++ b/src/aon/rf_top_aon.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,537 +28,204 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `ldo15rf_bypass_aon` reader - "] -pub struct LDO15RF_BYPASS_AON_R(crate::FieldReader); -impl LDO15RF_BYPASS_AON_R { - pub(crate) fn new(bits: bool) -> Self { - LDO15RF_BYPASS_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LDO15RF_BYPASS_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ldo15rf_bypass_aon` writer - "] -pub struct LDO15RF_BYPASS_AON_W<'a> { - w: &'a mut W, -} -impl<'a> LDO15RF_BYPASS_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 28)) | ((value as u32 & 0x01) << 28); - self.w - } -} -#[doc = "Field `ldo15rf_cc_aon` reader - "] -pub struct LDO15RF_CC_AON_R(crate::FieldReader); -impl LDO15RF_CC_AON_R { - pub(crate) fn new(bits: u8) -> Self { - LDO15RF_CC_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LDO15RF_CC_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ldo15rf_cc_aon` writer - "] -pub struct LDO15RF_CC_AON_W<'a> { - w: &'a mut W, -} -impl<'a> LDO15RF_CC_AON_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 24)) | ((value as u32 & 0x03) << 24); - self.w - } -} -#[doc = "Field `ldo15rf_vout_sel_aon` reader - "] -pub struct LDO15RF_VOUT_SEL_AON_R(crate::FieldReader); -impl LDO15RF_VOUT_SEL_AON_R { - pub(crate) fn new(bits: u8) -> Self { - LDO15RF_VOUT_SEL_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LDO15RF_VOUT_SEL_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ldo15rf_vout_sel_aon` writer - "] -pub struct LDO15RF_VOUT_SEL_AON_W<'a> { - w: &'a mut W, -} -impl<'a> LDO15RF_VOUT_SEL_AON_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 16)) | ((value as u32 & 0x07) << 16); - self.w - } -} -#[doc = "Field `ldo15rf_pulldown_sel_aon` reader - "] -pub struct LDO15RF_PULLDOWN_SEL_AON_R(crate::FieldReader); -impl LDO15RF_PULLDOWN_SEL_AON_R { - pub(crate) fn new(bits: bool) -> Self { - LDO15RF_PULLDOWN_SEL_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LDO15RF_PULLDOWN_SEL_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ldo15rf_pulldown_sel_aon` writer - "] -pub struct LDO15RF_PULLDOWN_SEL_AON_W<'a> { - w: &'a mut W, -} -impl<'a> LDO15RF_PULLDOWN_SEL_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13); - self.w - } -} -#[doc = "Field `ldo15rf_pulldown_aon` reader - "] -pub struct LDO15RF_PULLDOWN_AON_R(crate::FieldReader); -impl LDO15RF_PULLDOWN_AON_R { - pub(crate) fn new(bits: bool) -> Self { - LDO15RF_PULLDOWN_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LDO15RF_PULLDOWN_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ldo15rf_pulldown_aon` writer - "] -pub struct LDO15RF_PULLDOWN_AON_W<'a> { - w: &'a mut W, -} -impl<'a> LDO15RF_PULLDOWN_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} -#[doc = "Field `ldo15rf_sstart_delay_aon` reader - "] -pub struct LDO15RF_SSTART_DELAY_AON_R(crate::FieldReader); -impl LDO15RF_SSTART_DELAY_AON_R { - pub(crate) fn new(bits: u8) -> Self { - LDO15RF_SSTART_DELAY_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LDO15RF_SSTART_DELAY_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ldo15rf_sstart_delay_aon` writer - "] -pub struct LDO15RF_SSTART_DELAY_AON_W<'a> { - w: &'a mut W, -} -impl<'a> LDO15RF_SSTART_DELAY_AON_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 9)) | ((value as u32 & 0x03) << 9); - self.w - } -} -#[doc = "Field `ldo15rf_sstart_sel_aon` reader - "] -pub struct LDO15RF_SSTART_SEL_AON_R(crate::FieldReader); -impl LDO15RF_SSTART_SEL_AON_R { - pub(crate) fn new(bits: bool) -> Self { - LDO15RF_SSTART_SEL_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LDO15RF_SSTART_SEL_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ldo15rf_sstart_sel_aon` writer - "] -pub struct LDO15RF_SSTART_SEL_AON_W<'a> { - w: &'a mut W, -} -impl<'a> LDO15RF_SSTART_SEL_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `pu_xtal_aon` reader - "] -pub struct PU_XTAL_AON_R(crate::FieldReader); -impl PU_XTAL_AON_R { - pub(crate) fn new(bits: bool) -> Self { - PU_XTAL_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_XTAL_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_xtal_aon` writer - "] -pub struct PU_XTAL_AON_W<'a> { - w: &'a mut W, -} -impl<'a> PU_XTAL_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w - } -} -#[doc = "Field `pu_xtal_buf_aon` reader - "] -pub struct PU_XTAL_BUF_AON_R(crate::FieldReader); -impl PU_XTAL_BUF_AON_R { - pub(crate) fn new(bits: bool) -> Self { - PU_XTAL_BUF_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_XTAL_BUF_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_xtal_buf_aon` writer - "] -pub struct PU_XTAL_BUF_AON_W<'a> { - w: &'a mut W, -} -impl<'a> PU_XTAL_BUF_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} -#[doc = "Field `pu_sfreg_aon` reader - "] -pub struct PU_SFREG_AON_R(crate::FieldReader); -impl PU_SFREG_AON_R { - pub(crate) fn new(bits: bool) -> Self { - PU_SFREG_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_SFREG_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_sfreg_aon` writer - "] -pub struct PU_SFREG_AON_W<'a> { - w: &'a mut W, -} -impl<'a> PU_SFREG_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `pu_ldo15rf_aon` reader - "] -pub struct PU_LDO15RF_AON_R(crate::FieldReader); -impl PU_LDO15RF_AON_R { - pub(crate) fn new(bits: bool) -> Self { - PU_LDO15RF_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_LDO15RF_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_ldo15rf_aon` writer - "] -pub struct PU_LDO15RF_AON_W<'a> { - w: &'a mut W, -} -impl<'a> PU_LDO15RF_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `pu_mbg_aon` reader - "] -pub struct PU_MBG_AON_R(crate::FieldReader); -impl PU_MBG_AON_R { - pub(crate) fn new(bits: bool) -> Self { - PU_MBG_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_MBG_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PU_MBG_AON_R = crate::BitReader; #[doc = "Field `pu_mbg_aon` writer - "] -pub struct PU_MBG_AON_W<'a> { - w: &'a mut W, -} -impl<'a> PU_MBG_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type PU_MBG_AON_W<'a, const O: u8> = crate::BitWriter<'a, u32, RF_TOP_AON_SPEC, bool, O>; +#[doc = "Field `pu_ldo15rf_aon` reader - "] +pub type PU_LDO15RF_AON_R = crate::BitReader; +#[doc = "Field `pu_ldo15rf_aon` writer - "] +pub type PU_LDO15RF_AON_W<'a, const O: u8> = crate::BitWriter<'a, u32, RF_TOP_AON_SPEC, bool, O>; +#[doc = "Field `pu_sfreg_aon` reader - "] +pub type PU_SFREG_AON_R = crate::BitReader; +#[doc = "Field `pu_sfreg_aon` writer - "] +pub type PU_SFREG_AON_W<'a, const O: u8> = crate::BitWriter<'a, u32, RF_TOP_AON_SPEC, bool, O>; +#[doc = "Field `pu_xtal_buf_aon` reader - "] +pub type PU_XTAL_BUF_AON_R = crate::BitReader; +#[doc = "Field `pu_xtal_buf_aon` writer - "] +pub type PU_XTAL_BUF_AON_W<'a, const O: u8> = crate::BitWriter<'a, u32, RF_TOP_AON_SPEC, bool, O>; +#[doc = "Field `pu_xtal_aon` reader - "] +pub type PU_XTAL_AON_R = crate::BitReader; +#[doc = "Field `pu_xtal_aon` writer - "] +pub type PU_XTAL_AON_W<'a, const O: u8> = crate::BitWriter<'a, u32, RF_TOP_AON_SPEC, bool, O>; +#[doc = "Field `ldo15rf_sstart_sel_aon` reader - "] +pub type LDO15RF_SSTART_SEL_AON_R = crate::BitReader; +#[doc = "Field `ldo15rf_sstart_sel_aon` writer - "] +pub type LDO15RF_SSTART_SEL_AON_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RF_TOP_AON_SPEC, bool, O>; +#[doc = "Field `ldo15rf_sstart_delay_aon` reader - "] +pub type LDO15RF_SSTART_DELAY_AON_R = crate::FieldReader; +#[doc = "Field `ldo15rf_sstart_delay_aon` writer - "] +pub type LDO15RF_SSTART_DELAY_AON_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_TOP_AON_SPEC, u8, u8, 2, O>; +#[doc = "Field `ldo15rf_pulldown_aon` reader - "] +pub type LDO15RF_PULLDOWN_AON_R = crate::BitReader; +#[doc = "Field `ldo15rf_pulldown_aon` writer - "] +pub type LDO15RF_PULLDOWN_AON_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RF_TOP_AON_SPEC, bool, O>; +#[doc = "Field `ldo15rf_pulldown_sel_aon` reader - "] +pub type LDO15RF_PULLDOWN_SEL_AON_R = crate::BitReader; +#[doc = "Field `ldo15rf_pulldown_sel_aon` writer - "] +pub type LDO15RF_PULLDOWN_SEL_AON_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RF_TOP_AON_SPEC, bool, O>; +#[doc = "Field `ldo15rf_vout_sel_aon` reader - "] +pub type LDO15RF_VOUT_SEL_AON_R = crate::FieldReader; +#[doc = "Field `ldo15rf_vout_sel_aon` writer - "] +pub type LDO15RF_VOUT_SEL_AON_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_TOP_AON_SPEC, u8, u8, 3, O>; +#[doc = "Field `ldo15rf_cc_aon` reader - "] +pub type LDO15RF_CC_AON_R = crate::FieldReader; +#[doc = "Field `ldo15rf_cc_aon` writer - "] +pub type LDO15RF_CC_AON_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_TOP_AON_SPEC, u8, u8, 2, O>; +#[doc = "Field `ldo15rf_bypass_aon` reader - "] +pub type LDO15RF_BYPASS_AON_R = crate::BitReader; +#[doc = "Field `ldo15rf_bypass_aon` writer - "] +pub type LDO15RF_BYPASS_AON_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RF_TOP_AON_SPEC, bool, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn pu_mbg_aon(&self) -> PU_MBG_AON_R { + PU_MBG_AON_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bit 28"] + #[doc = "Bit 1"] #[inline(always)] - pub fn ldo15rf_bypass_aon(&self) -> LDO15RF_BYPASS_AON_R { - LDO15RF_BYPASS_AON_R::new(((self.bits >> 28) & 0x01) != 0) + pub fn pu_ldo15rf_aon(&self) -> PU_LDO15RF_AON_R { + PU_LDO15RF_AON_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bits 24:25"] + #[doc = "Bit 2"] #[inline(always)] - pub fn ldo15rf_cc_aon(&self) -> LDO15RF_CC_AON_R { - LDO15RF_CC_AON_R::new(((self.bits >> 24) & 0x03) as u8) + pub fn pu_sfreg_aon(&self) -> PU_SFREG_AON_R { + PU_SFREG_AON_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bits 16:18"] + #[doc = "Bit 4"] #[inline(always)] - pub fn ldo15rf_vout_sel_aon(&self) -> LDO15RF_VOUT_SEL_AON_R { - LDO15RF_VOUT_SEL_AON_R::new(((self.bits >> 16) & 0x07) as u8) + pub fn pu_xtal_buf_aon(&self) -> PU_XTAL_BUF_AON_R { + PU_XTAL_BUF_AON_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 13"] + #[doc = "Bit 5"] #[inline(always)] - pub fn ldo15rf_pulldown_sel_aon(&self) -> LDO15RF_PULLDOWN_SEL_AON_R { - LDO15RF_PULLDOWN_SEL_AON_R::new(((self.bits >> 13) & 0x01) != 0) + pub fn pu_xtal_aon(&self) -> PU_XTAL_AON_R { + PU_XTAL_AON_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 12"] + #[doc = "Bit 8"] #[inline(always)] - pub fn ldo15rf_pulldown_aon(&self) -> LDO15RF_PULLDOWN_AON_R { - LDO15RF_PULLDOWN_AON_R::new(((self.bits >> 12) & 0x01) != 0) + pub fn ldo15rf_sstart_sel_aon(&self) -> LDO15RF_SSTART_SEL_AON_R { + LDO15RF_SSTART_SEL_AON_R::new(((self.bits >> 8) & 1) != 0) } #[doc = "Bits 9:10"] #[inline(always)] pub fn ldo15rf_sstart_delay_aon(&self) -> LDO15RF_SSTART_DELAY_AON_R { - LDO15RF_SSTART_DELAY_AON_R::new(((self.bits >> 9) & 0x03) as u8) + LDO15RF_SSTART_DELAY_AON_R::new(((self.bits >> 9) & 3) as u8) } - #[doc = "Bit 8"] - #[inline(always)] - pub fn ldo15rf_sstart_sel_aon(&self) -> LDO15RF_SSTART_SEL_AON_R { - LDO15RF_SSTART_SEL_AON_R::new(((self.bits >> 8) & 0x01) != 0) - } - #[doc = "Bit 5"] + #[doc = "Bit 12"] #[inline(always)] - pub fn pu_xtal_aon(&self) -> PU_XTAL_AON_R { - PU_XTAL_AON_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn ldo15rf_pulldown_aon(&self) -> LDO15RF_PULLDOWN_AON_R { + LDO15RF_PULLDOWN_AON_R::new(((self.bits >> 12) & 1) != 0) } - #[doc = "Bit 4"] + #[doc = "Bit 13"] #[inline(always)] - pub fn pu_xtal_buf_aon(&self) -> PU_XTAL_BUF_AON_R { - PU_XTAL_BUF_AON_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn ldo15rf_pulldown_sel_aon(&self) -> LDO15RF_PULLDOWN_SEL_AON_R { + LDO15RF_PULLDOWN_SEL_AON_R::new(((self.bits >> 13) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bits 16:18"] #[inline(always)] - pub fn pu_sfreg_aon(&self) -> PU_SFREG_AON_R { - PU_SFREG_AON_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn ldo15rf_vout_sel_aon(&self) -> LDO15RF_VOUT_SEL_AON_R { + LDO15RF_VOUT_SEL_AON_R::new(((self.bits >> 16) & 7) as u8) } - #[doc = "Bit 1"] + #[doc = "Bits 24:25"] #[inline(always)] - pub fn pu_ldo15rf_aon(&self) -> PU_LDO15RF_AON_R { - PU_LDO15RF_AON_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn ldo15rf_cc_aon(&self) -> LDO15RF_CC_AON_R { + LDO15RF_CC_AON_R::new(((self.bits >> 24) & 3) as u8) } - #[doc = "Bit 0"] + #[doc = "Bit 28"] #[inline(always)] - pub fn pu_mbg_aon(&self) -> PU_MBG_AON_R { - PU_MBG_AON_R::new((self.bits & 0x01) != 0) + pub fn ldo15rf_bypass_aon(&self) -> LDO15RF_BYPASS_AON_R { + LDO15RF_BYPASS_AON_R::new(((self.bits >> 28) & 1) != 0) } } impl W { - #[doc = "Bit 28"] + #[doc = "Bit 0"] #[inline(always)] - pub fn ldo15rf_bypass_aon(&mut self) -> LDO15RF_BYPASS_AON_W { - LDO15RF_BYPASS_AON_W { w: self } + #[must_use] + pub fn pu_mbg_aon(&mut self) -> PU_MBG_AON_W<0> { + PU_MBG_AON_W::new(self) } - #[doc = "Bits 24:25"] + #[doc = "Bit 1"] #[inline(always)] - pub fn ldo15rf_cc_aon(&mut self) -> LDO15RF_CC_AON_W { - LDO15RF_CC_AON_W { w: self } + #[must_use] + pub fn pu_ldo15rf_aon(&mut self) -> PU_LDO15RF_AON_W<1> { + PU_LDO15RF_AON_W::new(self) } - #[doc = "Bits 16:18"] + #[doc = "Bit 2"] #[inline(always)] - pub fn ldo15rf_vout_sel_aon(&mut self) -> LDO15RF_VOUT_SEL_AON_W { - LDO15RF_VOUT_SEL_AON_W { w: self } + #[must_use] + pub fn pu_sfreg_aon(&mut self) -> PU_SFREG_AON_W<2> { + PU_SFREG_AON_W::new(self) } - #[doc = "Bit 13"] + #[doc = "Bit 4"] #[inline(always)] - pub fn ldo15rf_pulldown_sel_aon(&mut self) -> LDO15RF_PULLDOWN_SEL_AON_W { - LDO15RF_PULLDOWN_SEL_AON_W { w: self } + #[must_use] + pub fn pu_xtal_buf_aon(&mut self) -> PU_XTAL_BUF_AON_W<4> { + PU_XTAL_BUF_AON_W::new(self) } - #[doc = "Bit 12"] + #[doc = "Bit 5"] #[inline(always)] - pub fn ldo15rf_pulldown_aon(&mut self) -> LDO15RF_PULLDOWN_AON_W { - LDO15RF_PULLDOWN_AON_W { w: self } + #[must_use] + pub fn pu_xtal_aon(&mut self) -> PU_XTAL_AON_W<5> { + PU_XTAL_AON_W::new(self) } - #[doc = "Bits 9:10"] + #[doc = "Bit 8"] #[inline(always)] - pub fn ldo15rf_sstart_delay_aon(&mut self) -> LDO15RF_SSTART_DELAY_AON_W { - LDO15RF_SSTART_DELAY_AON_W { w: self } + #[must_use] + pub fn ldo15rf_sstart_sel_aon(&mut self) -> LDO15RF_SSTART_SEL_AON_W<8> { + LDO15RF_SSTART_SEL_AON_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bits 9:10"] #[inline(always)] - pub fn ldo15rf_sstart_sel_aon(&mut self) -> LDO15RF_SSTART_SEL_AON_W { - LDO15RF_SSTART_SEL_AON_W { w: self } + #[must_use] + pub fn ldo15rf_sstart_delay_aon(&mut self) -> LDO15RF_SSTART_DELAY_AON_W<9> { + LDO15RF_SSTART_DELAY_AON_W::new(self) } - #[doc = "Bit 5"] + #[doc = "Bit 12"] #[inline(always)] - pub fn pu_xtal_aon(&mut self) -> PU_XTAL_AON_W { - PU_XTAL_AON_W { w: self } + #[must_use] + pub fn ldo15rf_pulldown_aon(&mut self) -> LDO15RF_PULLDOWN_AON_W<12> { + LDO15RF_PULLDOWN_AON_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 13"] #[inline(always)] - pub fn pu_xtal_buf_aon(&mut self) -> PU_XTAL_BUF_AON_W { - PU_XTAL_BUF_AON_W { w: self } + #[must_use] + pub fn ldo15rf_pulldown_sel_aon(&mut self) -> LDO15RF_PULLDOWN_SEL_AON_W<13> { + LDO15RF_PULLDOWN_SEL_AON_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bits 16:18"] #[inline(always)] - pub fn pu_sfreg_aon(&mut self) -> PU_SFREG_AON_W { - PU_SFREG_AON_W { w: self } + #[must_use] + pub fn ldo15rf_vout_sel_aon(&mut self) -> LDO15RF_VOUT_SEL_AON_W<16> { + LDO15RF_VOUT_SEL_AON_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bits 24:25"] #[inline(always)] - pub fn pu_ldo15rf_aon(&mut self) -> PU_LDO15RF_AON_W { - PU_LDO15RF_AON_W { w: self } + #[must_use] + pub fn ldo15rf_cc_aon(&mut self) -> LDO15RF_CC_AON_W<24> { + LDO15RF_CC_AON_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 28"] #[inline(always)] - pub fn pu_mbg_aon(&mut self) -> PU_MBG_AON_W { - PU_MBG_AON_W { w: self } + #[must_use] + pub fn ldo15rf_bypass_aon(&mut self) -> LDO15RF_BYPASS_AON_W<28> { + LDO15RF_BYPASS_AON_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -575,11 +243,10 @@ impl crate::Readable for RF_TOP_AON_SPEC { #[doc = "`write(|w| ..)` method takes [rf_top_aon::W](W) writer structure"] impl crate::Writable for RF_TOP_AON_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rf_top_aon to value 0x0002_0137"] impl crate::Resettable for RF_TOP_AON_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0002_0137 - } + const RESET_VALUE: Self::Ux = 0x0002_0137; } diff --git a/src/aon/tsen.rs b/src/aon/tsen.rs index 86d84d7..679c1fa 100644 --- a/src/aon/tsen.rs +++ b/src/aon/tsen.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,188 +28,87 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `xtal_rdy_int_sel_aon` reader - "] -pub struct XTAL_RDY_INT_SEL_AON_R(crate::FieldReader); -impl XTAL_RDY_INT_SEL_AON_R { - pub(crate) fn new(bits: u8) -> Self { - XTAL_RDY_INT_SEL_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for XTAL_RDY_INT_SEL_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `xtal_rdy_int_sel_aon` writer - "] -pub struct XTAL_RDY_INT_SEL_AON_W<'a> { - w: &'a mut W, -} -impl<'a> XTAL_RDY_INT_SEL_AON_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 30)) | ((value as u32 & 0x03) << 30); - self.w - } -} -#[doc = "Field `xtal_inn_cfg_en_aon` reader - "] -pub struct XTAL_INN_CFG_EN_AON_R(crate::FieldReader); -impl XTAL_INN_CFG_EN_AON_R { - pub(crate) fn new(bits: bool) -> Self { - XTAL_INN_CFG_EN_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for XTAL_INN_CFG_EN_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `xtal_inn_cfg_en_aon` writer - "] -pub struct XTAL_INN_CFG_EN_AON_W<'a> { - w: &'a mut W, -} -impl<'a> XTAL_INN_CFG_EN_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 29)) | ((value as u32 & 0x01) << 29); - self.w - } -} -#[doc = "Field `xtal_rdy` reader - "] -pub struct XTAL_RDY_R(crate::FieldReader); -impl XTAL_RDY_R { - pub(crate) fn new(bits: bool) -> Self { - XTAL_RDY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for XTAL_RDY_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tsen_refcode_rfcal` reader - "] -pub struct TSEN_REFCODE_RFCAL_R(crate::FieldReader); -impl TSEN_REFCODE_RFCAL_R { - pub(crate) fn new(bits: u16) -> Self { - TSEN_REFCODE_RFCAL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TSEN_REFCODE_RFCAL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tsen_refcode_rfcal` writer - "] -pub struct TSEN_REFCODE_RFCAL_W<'a> { - w: &'a mut W, -} -impl<'a> TSEN_REFCODE_RFCAL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0fff << 16)) | ((value as u32 & 0x0fff) << 16); - self.w - } -} #[doc = "Field `tsen_refcode_corner` reader - "] -pub struct TSEN_REFCODE_CORNER_R(crate::FieldReader); -impl TSEN_REFCODE_CORNER_R { - pub(crate) fn new(bits: u16) -> Self { - TSEN_REFCODE_CORNER_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TSEN_REFCODE_CORNER_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TSEN_REFCODE_CORNER_R = crate::FieldReader; #[doc = "Field `tsen_refcode_corner` writer - "] -pub struct TSEN_REFCODE_CORNER_W<'a> { - w: &'a mut W, -} -impl<'a> TSEN_REFCODE_CORNER_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x0fff) | (value as u32 & 0x0fff); - self.w - } -} +pub type TSEN_REFCODE_CORNER_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TSEN_SPEC, u16, u16, 12, O>; +#[doc = "Field `tsen_refcode_rfcal` reader - "] +pub type TSEN_REFCODE_RFCAL_R = crate::FieldReader; +#[doc = "Field `tsen_refcode_rfcal` writer - "] +pub type TSEN_REFCODE_RFCAL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TSEN_SPEC, u16, u16, 12, O>; +#[doc = "Field `xtal_rdy` reader - "] +pub type XTAL_RDY_R = crate::BitReader; +#[doc = "Field `xtal_inn_cfg_en_aon` reader - "] +pub type XTAL_INN_CFG_EN_AON_R = crate::BitReader; +#[doc = "Field `xtal_inn_cfg_en_aon` writer - "] +pub type XTAL_INN_CFG_EN_AON_W<'a, const O: u8> = crate::BitWriter<'a, u32, TSEN_SPEC, bool, O>; +#[doc = "Field `xtal_rdy_int_sel_aon` reader - "] +pub type XTAL_RDY_INT_SEL_AON_R = crate::FieldReader; +#[doc = "Field `xtal_rdy_int_sel_aon` writer - "] +pub type XTAL_RDY_INT_SEL_AON_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TSEN_SPEC, u8, u8, 2, O>; impl R { - #[doc = "Bits 30:31"] + #[doc = "Bits 0:11"] #[inline(always)] - pub fn xtal_rdy_int_sel_aon(&self) -> XTAL_RDY_INT_SEL_AON_R { - XTAL_RDY_INT_SEL_AON_R::new(((self.bits >> 30) & 0x03) as u8) + pub fn tsen_refcode_corner(&self) -> TSEN_REFCODE_CORNER_R { + TSEN_REFCODE_CORNER_R::new((self.bits & 0x0fff) as u16) } - #[doc = "Bit 29"] + #[doc = "Bits 16:27"] #[inline(always)] - pub fn xtal_inn_cfg_en_aon(&self) -> XTAL_INN_CFG_EN_AON_R { - XTAL_INN_CFG_EN_AON_R::new(((self.bits >> 29) & 0x01) != 0) + pub fn tsen_refcode_rfcal(&self) -> TSEN_REFCODE_RFCAL_R { + TSEN_REFCODE_RFCAL_R::new(((self.bits >> 16) & 0x0fff) as u16) } #[doc = "Bit 28"] #[inline(always)] pub fn xtal_rdy(&self) -> XTAL_RDY_R { - XTAL_RDY_R::new(((self.bits >> 28) & 0x01) != 0) + XTAL_RDY_R::new(((self.bits >> 28) & 1) != 0) } - #[doc = "Bits 16:27"] + #[doc = "Bit 29"] #[inline(always)] - pub fn tsen_refcode_rfcal(&self) -> TSEN_REFCODE_RFCAL_R { - TSEN_REFCODE_RFCAL_R::new(((self.bits >> 16) & 0x0fff) as u16) + pub fn xtal_inn_cfg_en_aon(&self) -> XTAL_INN_CFG_EN_AON_R { + XTAL_INN_CFG_EN_AON_R::new(((self.bits >> 29) & 1) != 0) } - #[doc = "Bits 0:11"] + #[doc = "Bits 30:31"] #[inline(always)] - pub fn tsen_refcode_corner(&self) -> TSEN_REFCODE_CORNER_R { - TSEN_REFCODE_CORNER_R::new((self.bits & 0x0fff) as u16) + pub fn xtal_rdy_int_sel_aon(&self) -> XTAL_RDY_INT_SEL_AON_R { + XTAL_RDY_INT_SEL_AON_R::new(((self.bits >> 30) & 3) as u8) } } impl W { - #[doc = "Bits 30:31"] + #[doc = "Bits 0:11"] #[inline(always)] - pub fn xtal_rdy_int_sel_aon(&mut self) -> XTAL_RDY_INT_SEL_AON_W { - XTAL_RDY_INT_SEL_AON_W { w: self } + #[must_use] + pub fn tsen_refcode_corner(&mut self) -> TSEN_REFCODE_CORNER_W<0> { + TSEN_REFCODE_CORNER_W::new(self) } - #[doc = "Bit 29"] + #[doc = "Bits 16:27"] #[inline(always)] - pub fn xtal_inn_cfg_en_aon(&mut self) -> XTAL_INN_CFG_EN_AON_W { - XTAL_INN_CFG_EN_AON_W { w: self } + #[must_use] + pub fn tsen_refcode_rfcal(&mut self) -> TSEN_REFCODE_RFCAL_W<16> { + TSEN_REFCODE_RFCAL_W::new(self) } - #[doc = "Bits 16:27"] + #[doc = "Bit 29"] #[inline(always)] - pub fn tsen_refcode_rfcal(&mut self) -> TSEN_REFCODE_RFCAL_W { - TSEN_REFCODE_RFCAL_W { w: self } + #[must_use] + pub fn xtal_inn_cfg_en_aon(&mut self) -> XTAL_INN_CFG_EN_AON_W<29> { + XTAL_INN_CFG_EN_AON_W::new(self) } - #[doc = "Bits 0:11"] + #[doc = "Bits 30:31"] #[inline(always)] - pub fn tsen_refcode_corner(&mut self) -> TSEN_REFCODE_CORNER_W { - TSEN_REFCODE_CORNER_W { w: self } + #[must_use] + pub fn xtal_rdy_int_sel_aon(&mut self) -> XTAL_RDY_INT_SEL_AON_W<30> { + XTAL_RDY_INT_SEL_AON_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -226,11 +126,10 @@ impl crate::Readable for TSEN_SPEC { #[doc = "`write(|w| ..)` method takes [tsen::W](W) writer structure"] impl crate::Writable for TSEN_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets tsen to value 0x78ff_08ff"] impl crate::Resettable for TSEN_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x78ff_08ff - } + const RESET_VALUE: Self::Ux = 0x78ff_08ff; } diff --git a/src/aon/xtal_cfg.rs b/src/aon/xtal_cfg.rs index 5ecee6b..79aa01d 100644 --- a/src/aon/xtal_cfg.rs +++ b/src/aon/xtal_cfg.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,487 +28,206 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `xtal_rdy_sel_aon` reader - "] -pub struct XTAL_RDY_SEL_AON_R(crate::FieldReader); -impl XTAL_RDY_SEL_AON_R { - pub(crate) fn new(bits: u8) -> Self { - XTAL_RDY_SEL_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for XTAL_RDY_SEL_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `xtal_rdy_sel_aon` writer - "] -pub struct XTAL_RDY_SEL_AON_W<'a> { - w: &'a mut W, -} -impl<'a> XTAL_RDY_SEL_AON_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 30)) | ((value as u32 & 0x03) << 30); - self.w - } -} -#[doc = "Field `xtal_gm_boost_aon` reader - "] -pub struct XTAL_GM_BOOST_AON_R(crate::FieldReader); -impl XTAL_GM_BOOST_AON_R { - pub(crate) fn new(bits: u8) -> Self { - XTAL_GM_BOOST_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for XTAL_GM_BOOST_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `xtal_gm_boost_aon` writer - "] -pub struct XTAL_GM_BOOST_AON_W<'a> { - w: &'a mut W, -} -impl<'a> XTAL_GM_BOOST_AON_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 28)) | ((value as u32 & 0x03) << 28); - self.w - } -} -#[doc = "Field `xtal_capcode_in_aon` reader - "] -pub struct XTAL_CAPCODE_IN_AON_R(crate::FieldReader); -impl XTAL_CAPCODE_IN_AON_R { - pub(crate) fn new(bits: u8) -> Self { - XTAL_CAPCODE_IN_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for XTAL_CAPCODE_IN_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `xtal_capcode_in_aon` writer - "] -pub struct XTAL_CAPCODE_IN_AON_W<'a> { - w: &'a mut W, -} -impl<'a> XTAL_CAPCODE_IN_AON_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 22)) | ((value as u32 & 0x3f) << 22); - self.w - } -} -#[doc = "Field `xtal_capcode_out_aon` reader - "] -pub struct XTAL_CAPCODE_OUT_AON_R(crate::FieldReader); -impl XTAL_CAPCODE_OUT_AON_R { - pub(crate) fn new(bits: u8) -> Self { - XTAL_CAPCODE_OUT_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for XTAL_CAPCODE_OUT_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `xtal_capcode_out_aon` writer - "] -pub struct XTAL_CAPCODE_OUT_AON_W<'a> { - w: &'a mut W, -} -impl<'a> XTAL_CAPCODE_OUT_AON_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 16)) | ((value as u32 & 0x3f) << 16); - self.w - } -} -#[doc = "Field `xtal_amp_ctrl_aon` reader - "] -pub struct XTAL_AMP_CTRL_AON_R(crate::FieldReader); -impl XTAL_AMP_CTRL_AON_R { - pub(crate) fn new(bits: u8) -> Self { - XTAL_AMP_CTRL_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for XTAL_AMP_CTRL_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `xtal_amp_ctrl_aon` writer - "] -pub struct XTAL_AMP_CTRL_AON_W<'a> { - w: &'a mut W, -} -impl<'a> XTAL_AMP_CTRL_AON_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 14)) | ((value as u32 & 0x03) << 14); - self.w - } -} -#[doc = "Field `xtal_sleep_aon` reader - "] -pub struct XTAL_SLEEP_AON_R(crate::FieldReader); -impl XTAL_SLEEP_AON_R { - pub(crate) fn new(bits: bool) -> Self { - XTAL_SLEEP_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for XTAL_SLEEP_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `xtal_sleep_aon` writer - "] -pub struct XTAL_SLEEP_AON_W<'a> { - w: &'a mut W, -} -impl<'a> XTAL_SLEEP_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13); - self.w - } -} -#[doc = "Field `xtal_fast_startup_aon` reader - "] -pub struct XTAL_FAST_STARTUP_AON_R(crate::FieldReader); -impl XTAL_FAST_STARTUP_AON_R { - pub(crate) fn new(bits: bool) -> Self { - XTAL_FAST_STARTUP_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for XTAL_FAST_STARTUP_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `xtal_fast_startup_aon` writer - "] -pub struct XTAL_FAST_STARTUP_AON_W<'a> { - w: &'a mut W, -} -impl<'a> XTAL_FAST_STARTUP_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} -#[doc = "Field `xtal_buf_hp_aon` reader - "] -pub struct XTAL_BUF_HP_AON_R(crate::FieldReader); -impl XTAL_BUF_HP_AON_R { - pub(crate) fn new(bits: u8) -> Self { - XTAL_BUF_HP_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for XTAL_BUF_HP_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `xtal_buf_hp_aon` writer - "] -pub struct XTAL_BUF_HP_AON_W<'a> { - w: &'a mut W, -} -impl<'a> XTAL_BUF_HP_AON_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 8)) | ((value as u32 & 0x0f) << 8); - self.w - } -} -#[doc = "Field `xtal_buf_en_aon` reader - "] -pub struct XTAL_BUF_EN_AON_R(crate::FieldReader); -impl XTAL_BUF_EN_AON_R { - pub(crate) fn new(bits: u8) -> Self { - XTAL_BUF_EN_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for XTAL_BUF_EN_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `xtal_buf_en_aon` writer - "] -pub struct XTAL_BUF_EN_AON_W<'a> { - w: &'a mut W, -} -impl<'a> XTAL_BUF_EN_AON_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 4)) | ((value as u32 & 0x0f) << 4); - self.w - } -} -#[doc = "Field `xtal_ext_sel_aon` reader - "] -pub struct XTAL_EXT_SEL_AON_R(crate::FieldReader); -impl XTAL_EXT_SEL_AON_R { - pub(crate) fn new(bits: bool) -> Self { - XTAL_EXT_SEL_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for XTAL_EXT_SEL_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `xtal_ext_sel_aon` writer - "] -pub struct XTAL_EXT_SEL_AON_W<'a> { - w: &'a mut W, -} -impl<'a> XTAL_EXT_SEL_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} +#[doc = "Field `xtal_bk_aon` reader - "] +pub type XTAL_BK_AON_R = crate::FieldReader; +#[doc = "Field `xtal_bk_aon` writer - "] +pub type XTAL_BK_AON_W<'a, const O: u8> = crate::FieldWriter<'a, u32, XTAL_CFG_SPEC, u8, u8, 2, O>; #[doc = "Field `xtal_capcode_extra_aon` reader - "] -pub struct XTAL_CAPCODE_EXTRA_AON_R(crate::FieldReader); -impl XTAL_CAPCODE_EXTRA_AON_R { - pub(crate) fn new(bits: bool) -> Self { - XTAL_CAPCODE_EXTRA_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for XTAL_CAPCODE_EXTRA_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type XTAL_CAPCODE_EXTRA_AON_R = crate::BitReader; #[doc = "Field `xtal_capcode_extra_aon` writer - "] -pub struct XTAL_CAPCODE_EXTRA_AON_W<'a> { - w: &'a mut W, -} -impl<'a> XTAL_CAPCODE_EXTRA_AON_W<'a> { - #[doc = r"Sets the field bit"] +pub type XTAL_CAPCODE_EXTRA_AON_W<'a, const O: u8> = + crate::BitWriter<'a, u32, XTAL_CFG_SPEC, bool, O>; +#[doc = "Field `xtal_ext_sel_aon` reader - "] +pub type XTAL_EXT_SEL_AON_R = crate::BitReader; +#[doc = "Field `xtal_ext_sel_aon` writer - "] +pub type XTAL_EXT_SEL_AON_W<'a, const O: u8> = crate::BitWriter<'a, u32, XTAL_CFG_SPEC, bool, O>; +#[doc = "Field `xtal_buf_en_aon` reader - "] +pub type XTAL_BUF_EN_AON_R = crate::FieldReader; +#[doc = "Field `xtal_buf_en_aon` writer - "] +pub type XTAL_BUF_EN_AON_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, XTAL_CFG_SPEC, u8, u8, 4, O>; +#[doc = "Field `xtal_buf_hp_aon` reader - "] +pub type XTAL_BUF_HP_AON_R = crate::FieldReader; +#[doc = "Field `xtal_buf_hp_aon` writer - "] +pub type XTAL_BUF_HP_AON_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, XTAL_CFG_SPEC, u8, u8, 4, O>; +#[doc = "Field `xtal_fast_startup_aon` reader - "] +pub type XTAL_FAST_STARTUP_AON_R = crate::BitReader; +#[doc = "Field `xtal_fast_startup_aon` writer - "] +pub type XTAL_FAST_STARTUP_AON_W<'a, const O: u8> = + crate::BitWriter<'a, u32, XTAL_CFG_SPEC, bool, O>; +#[doc = "Field `xtal_sleep_aon` reader - "] +pub type XTAL_SLEEP_AON_R = crate::BitReader; +#[doc = "Field `xtal_sleep_aon` writer - "] +pub type XTAL_SLEEP_AON_W<'a, const O: u8> = crate::BitWriter<'a, u32, XTAL_CFG_SPEC, bool, O>; +#[doc = "Field `xtal_amp_ctrl_aon` reader - "] +pub type XTAL_AMP_CTRL_AON_R = crate::FieldReader; +#[doc = "Field `xtal_amp_ctrl_aon` writer - "] +pub type XTAL_AMP_CTRL_AON_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, XTAL_CFG_SPEC, u8, u8, 2, O>; +#[doc = "Field `xtal_capcode_out_aon` reader - "] +pub type XTAL_CAPCODE_OUT_AON_R = crate::FieldReader; +#[doc = "Field `xtal_capcode_out_aon` writer - "] +pub type XTAL_CAPCODE_OUT_AON_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, XTAL_CFG_SPEC, u8, u8, 6, O>; +#[doc = "Field `xtal_capcode_in_aon` reader - "] +pub type XTAL_CAPCODE_IN_AON_R = crate::FieldReader; +#[doc = "Field `xtal_capcode_in_aon` writer - "] +pub type XTAL_CAPCODE_IN_AON_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, XTAL_CFG_SPEC, u8, u8, 6, O>; +#[doc = "Field `xtal_gm_boost_aon` reader - "] +pub type XTAL_GM_BOOST_AON_R = crate::FieldReader; +#[doc = "Field `xtal_gm_boost_aon` writer - "] +pub type XTAL_GM_BOOST_AON_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, XTAL_CFG_SPEC, u8, u8, 2, O>; +#[doc = "Field `xtal_rdy_sel_aon` reader - "] +pub type XTAL_RDY_SEL_AON_R = crate::FieldReader; +#[doc = "Field `xtal_rdy_sel_aon` writer - "] +pub type XTAL_RDY_SEL_AON_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, XTAL_CFG_SPEC, u8, u8, 2, O>; +impl R { + #[doc = "Bits 0:1"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn xtal_bk_aon(&self) -> XTAL_BK_AON_R { + XTAL_BK_AON_R::new((self.bits & 3) as u8) } - #[doc = r"Clears the field bit"] + #[doc = "Bit 2"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn xtal_capcode_extra_aon(&self) -> XTAL_CAPCODE_EXTRA_AON_R { + XTAL_CAPCODE_EXTRA_AON_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = r"Writes raw bits to the field"] + #[doc = "Bit 3"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `xtal_bk_aon` reader - "] -pub struct XTAL_BK_AON_R(crate::FieldReader); -impl XTAL_BK_AON_R { - pub(crate) fn new(bits: u8) -> Self { - XTAL_BK_AON_R(crate::FieldReader::new(bits)) + pub fn xtal_ext_sel_aon(&self) -> XTAL_EXT_SEL_AON_R { + XTAL_EXT_SEL_AON_R::new(((self.bits >> 3) & 1) != 0) } -} -impl core::ops::Deref for XTAL_BK_AON_R { - type Target = crate::FieldReader; + #[doc = "Bits 4:7"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn xtal_buf_en_aon(&self) -> XTAL_BUF_EN_AON_R { + XTAL_BUF_EN_AON_R::new(((self.bits >> 4) & 0x0f) as u8) } -} -#[doc = "Field `xtal_bk_aon` writer - "] -pub struct XTAL_BK_AON_W<'a> { - w: &'a mut W, -} -impl<'a> XTAL_BK_AON_W<'a> { - #[doc = r"Writes raw bits to the field"] + #[doc = "Bits 8:11"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w + pub fn xtal_buf_hp_aon(&self) -> XTAL_BUF_HP_AON_R { + XTAL_BUF_HP_AON_R::new(((self.bits >> 8) & 0x0f) as u8) } -} -impl R { - #[doc = "Bits 30:31"] + #[doc = "Bit 12"] #[inline(always)] - pub fn xtal_rdy_sel_aon(&self) -> XTAL_RDY_SEL_AON_R { - XTAL_RDY_SEL_AON_R::new(((self.bits >> 30) & 0x03) as u8) + pub fn xtal_fast_startup_aon(&self) -> XTAL_FAST_STARTUP_AON_R { + XTAL_FAST_STARTUP_AON_R::new(((self.bits >> 12) & 1) != 0) } - #[doc = "Bits 28:29"] + #[doc = "Bit 13"] #[inline(always)] - pub fn xtal_gm_boost_aon(&self) -> XTAL_GM_BOOST_AON_R { - XTAL_GM_BOOST_AON_R::new(((self.bits >> 28) & 0x03) as u8) + pub fn xtal_sleep_aon(&self) -> XTAL_SLEEP_AON_R { + XTAL_SLEEP_AON_R::new(((self.bits >> 13) & 1) != 0) } - #[doc = "Bits 22:27"] + #[doc = "Bits 14:15"] #[inline(always)] - pub fn xtal_capcode_in_aon(&self) -> XTAL_CAPCODE_IN_AON_R { - XTAL_CAPCODE_IN_AON_R::new(((self.bits >> 22) & 0x3f) as u8) + pub fn xtal_amp_ctrl_aon(&self) -> XTAL_AMP_CTRL_AON_R { + XTAL_AMP_CTRL_AON_R::new(((self.bits >> 14) & 3) as u8) } #[doc = "Bits 16:21"] #[inline(always)] pub fn xtal_capcode_out_aon(&self) -> XTAL_CAPCODE_OUT_AON_R { XTAL_CAPCODE_OUT_AON_R::new(((self.bits >> 16) & 0x3f) as u8) } - #[doc = "Bits 14:15"] - #[inline(always)] - pub fn xtal_amp_ctrl_aon(&self) -> XTAL_AMP_CTRL_AON_R { - XTAL_AMP_CTRL_AON_R::new(((self.bits >> 14) & 0x03) as u8) - } - #[doc = "Bit 13"] - #[inline(always)] - pub fn xtal_sleep_aon(&self) -> XTAL_SLEEP_AON_R { - XTAL_SLEEP_AON_R::new(((self.bits >> 13) & 0x01) != 0) - } - #[doc = "Bit 12"] - #[inline(always)] - pub fn xtal_fast_startup_aon(&self) -> XTAL_FAST_STARTUP_AON_R { - XTAL_FAST_STARTUP_AON_R::new(((self.bits >> 12) & 0x01) != 0) - } - #[doc = "Bits 8:11"] - #[inline(always)] - pub fn xtal_buf_hp_aon(&self) -> XTAL_BUF_HP_AON_R { - XTAL_BUF_HP_AON_R::new(((self.bits >> 8) & 0x0f) as u8) - } - #[doc = "Bits 4:7"] - #[inline(always)] - pub fn xtal_buf_en_aon(&self) -> XTAL_BUF_EN_AON_R { - XTAL_BUF_EN_AON_R::new(((self.bits >> 4) & 0x0f) as u8) - } - #[doc = "Bit 3"] + #[doc = "Bits 22:27"] #[inline(always)] - pub fn xtal_ext_sel_aon(&self) -> XTAL_EXT_SEL_AON_R { - XTAL_EXT_SEL_AON_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn xtal_capcode_in_aon(&self) -> XTAL_CAPCODE_IN_AON_R { + XTAL_CAPCODE_IN_AON_R::new(((self.bits >> 22) & 0x3f) as u8) } - #[doc = "Bit 2"] + #[doc = "Bits 28:29"] #[inline(always)] - pub fn xtal_capcode_extra_aon(&self) -> XTAL_CAPCODE_EXTRA_AON_R { - XTAL_CAPCODE_EXTRA_AON_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn xtal_gm_boost_aon(&self) -> XTAL_GM_BOOST_AON_R { + XTAL_GM_BOOST_AON_R::new(((self.bits >> 28) & 3) as u8) } - #[doc = "Bits 0:1"] + #[doc = "Bits 30:31"] #[inline(always)] - pub fn xtal_bk_aon(&self) -> XTAL_BK_AON_R { - XTAL_BK_AON_R::new((self.bits & 0x03) as u8) + pub fn xtal_rdy_sel_aon(&self) -> XTAL_RDY_SEL_AON_R { + XTAL_RDY_SEL_AON_R::new(((self.bits >> 30) & 3) as u8) } } impl W { - #[doc = "Bits 30:31"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn xtal_rdy_sel_aon(&mut self) -> XTAL_RDY_SEL_AON_W { - XTAL_RDY_SEL_AON_W { w: self } + #[must_use] + pub fn xtal_bk_aon(&mut self) -> XTAL_BK_AON_W<0> { + XTAL_BK_AON_W::new(self) } - #[doc = "Bits 28:29"] + #[doc = "Bit 2"] #[inline(always)] - pub fn xtal_gm_boost_aon(&mut self) -> XTAL_GM_BOOST_AON_W { - XTAL_GM_BOOST_AON_W { w: self } + #[must_use] + pub fn xtal_capcode_extra_aon(&mut self) -> XTAL_CAPCODE_EXTRA_AON_W<2> { + XTAL_CAPCODE_EXTRA_AON_W::new(self) } - #[doc = "Bits 22:27"] + #[doc = "Bit 3"] #[inline(always)] - pub fn xtal_capcode_in_aon(&mut self) -> XTAL_CAPCODE_IN_AON_W { - XTAL_CAPCODE_IN_AON_W { w: self } + #[must_use] + pub fn xtal_ext_sel_aon(&mut self) -> XTAL_EXT_SEL_AON_W<3> { + XTAL_EXT_SEL_AON_W::new(self) } - #[doc = "Bits 16:21"] + #[doc = "Bits 4:7"] #[inline(always)] - pub fn xtal_capcode_out_aon(&mut self) -> XTAL_CAPCODE_OUT_AON_W { - XTAL_CAPCODE_OUT_AON_W { w: self } + #[must_use] + pub fn xtal_buf_en_aon(&mut self) -> XTAL_BUF_EN_AON_W<4> { + XTAL_BUF_EN_AON_W::new(self) } - #[doc = "Bits 14:15"] + #[doc = "Bits 8:11"] #[inline(always)] - pub fn xtal_amp_ctrl_aon(&mut self) -> XTAL_AMP_CTRL_AON_W { - XTAL_AMP_CTRL_AON_W { w: self } + #[must_use] + pub fn xtal_buf_hp_aon(&mut self) -> XTAL_BUF_HP_AON_W<8> { + XTAL_BUF_HP_AON_W::new(self) } - #[doc = "Bit 13"] + #[doc = "Bit 12"] #[inline(always)] - pub fn xtal_sleep_aon(&mut self) -> XTAL_SLEEP_AON_W { - XTAL_SLEEP_AON_W { w: self } + #[must_use] + pub fn xtal_fast_startup_aon(&mut self) -> XTAL_FAST_STARTUP_AON_W<12> { + XTAL_FAST_STARTUP_AON_W::new(self) } - #[doc = "Bit 12"] + #[doc = "Bit 13"] #[inline(always)] - pub fn xtal_fast_startup_aon(&mut self) -> XTAL_FAST_STARTUP_AON_W { - XTAL_FAST_STARTUP_AON_W { w: self } + #[must_use] + pub fn xtal_sleep_aon(&mut self) -> XTAL_SLEEP_AON_W<13> { + XTAL_SLEEP_AON_W::new(self) } - #[doc = "Bits 8:11"] + #[doc = "Bits 14:15"] #[inline(always)] - pub fn xtal_buf_hp_aon(&mut self) -> XTAL_BUF_HP_AON_W { - XTAL_BUF_HP_AON_W { w: self } + #[must_use] + pub fn xtal_amp_ctrl_aon(&mut self) -> XTAL_AMP_CTRL_AON_W<14> { + XTAL_AMP_CTRL_AON_W::new(self) } - #[doc = "Bits 4:7"] + #[doc = "Bits 16:21"] #[inline(always)] - pub fn xtal_buf_en_aon(&mut self) -> XTAL_BUF_EN_AON_W { - XTAL_BUF_EN_AON_W { w: self } + #[must_use] + pub fn xtal_capcode_out_aon(&mut self) -> XTAL_CAPCODE_OUT_AON_W<16> { + XTAL_CAPCODE_OUT_AON_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bits 22:27"] #[inline(always)] - pub fn xtal_ext_sel_aon(&mut self) -> XTAL_EXT_SEL_AON_W { - XTAL_EXT_SEL_AON_W { w: self } + #[must_use] + pub fn xtal_capcode_in_aon(&mut self) -> XTAL_CAPCODE_IN_AON_W<22> { + XTAL_CAPCODE_IN_AON_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bits 28:29"] #[inline(always)] - pub fn xtal_capcode_extra_aon(&mut self) -> XTAL_CAPCODE_EXTRA_AON_W { - XTAL_CAPCODE_EXTRA_AON_W { w: self } + #[must_use] + pub fn xtal_gm_boost_aon(&mut self) -> XTAL_GM_BOOST_AON_W<28> { + XTAL_GM_BOOST_AON_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bits 30:31"] #[inline(always)] - pub fn xtal_bk_aon(&mut self) -> XTAL_BK_AON_W { - XTAL_BK_AON_W { w: self } + #[must_use] + pub fn xtal_rdy_sel_aon(&mut self) -> XTAL_RDY_SEL_AON_W<30> { + XTAL_RDY_SEL_AON_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -525,11 +245,10 @@ impl crate::Readable for XTAL_CFG_SPEC { #[doc = "`write(|w| ..)` method takes [xtal_cfg::W](W) writer structure"] impl crate::Writable for XTAL_CFG_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets xtal_cfg to value 0xb410_f0f0"] impl crate::Resettable for XTAL_CFG_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xb410_f0f0 - } + const RESET_VALUE: Self::Ux = 0xb410_f0f0; } diff --git a/src/cci.rs b/src/cci.rs index e87b82e..ed4afe3 100644 --- a/src/cci.rs +++ b/src/cci.rs @@ -2,33 +2,33 @@ #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - cci_cfg."] - pub cci_cfg: crate::Reg, + pub cci_cfg: CCI_CFG, #[doc = "0x04 - cci_addr."] - pub cci_addr: crate::Reg, + pub cci_addr: CCI_ADDR, #[doc = "0x08 - cci_wdata."] - pub cci_wdata: crate::Reg, + pub cci_wdata: CCI_WDATA, #[doc = "0x0c - cci_rdata."] - pub cci_rdata: crate::Reg, + pub cci_rdata: CCI_RDATA, #[doc = "0x10 - cci_ctl."] - pub cci_ctl: crate::Reg, + pub cci_ctl: CCI_CTL, } -#[doc = "cci_cfg register accessor: an alias for `Reg`"] +#[doc = "cci_cfg (rw) register accessor: an alias for `Reg`"] pub type CCI_CFG = crate::Reg; #[doc = "cci_cfg."] pub mod cci_cfg; -#[doc = "cci_addr register accessor: an alias for `Reg`"] +#[doc = "cci_addr (rw) register accessor: an alias for `Reg`"] pub type CCI_ADDR = crate::Reg; #[doc = "cci_addr."] pub mod cci_addr; -#[doc = "cci_wdata register accessor: an alias for `Reg`"] +#[doc = "cci_wdata (rw) register accessor: an alias for `Reg`"] pub type CCI_WDATA = crate::Reg; #[doc = "cci_wdata."] pub mod cci_wdata; -#[doc = "cci_rdata register accessor: an alias for `Reg`"] +#[doc = "cci_rdata (rw) register accessor: an alias for `Reg`"] pub type CCI_RDATA = crate::Reg; #[doc = "cci_rdata."] pub mod cci_rdata; -#[doc = "cci_ctl register accessor: an alias for `Reg`"] +#[doc = "cci_ctl (rw) register accessor: an alias for `Reg`"] pub type CCI_CTL = crate::Reg; #[doc = "cci_ctl."] pub mod cci_ctl; diff --git a/src/cci/cci_addr.rs b/src/cci/cci_addr.rs index 2e247e7..9b46c55 100644 --- a/src/cci/cci_addr.rs +++ b/src/cci/cci_addr.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `apb_cci_addr` reader - "] -pub struct APB_CCI_ADDR_R(crate::FieldReader); -impl APB_CCI_ADDR_R { - pub(crate) fn new(bits: u32) -> Self { - APB_CCI_ADDR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for APB_CCI_ADDR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type APB_CCI_ADDR_R = crate::FieldReader; #[doc = "Field `apb_cci_addr` writer - "] -pub struct APB_CCI_ADDR_W<'a> { - w: &'a mut W, -} -impl<'a> APB_CCI_ADDR_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type APB_CCI_ADDR_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, CCI_ADDR_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn apb_cci_addr(&self) -> APB_CCI_ADDR_R { - APB_CCI_ADDR_R::new((self.bits & 0xffff_ffff) as u32) + APB_CCI_ADDR_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn apb_cci_addr(&mut self) -> APB_CCI_ADDR_W { - APB_CCI_ADDR_W { w: self } + #[must_use] + pub fn apb_cci_addr(&mut self) -> APB_CCI_ADDR_W<0> { + APB_CCI_ADDR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for CCI_ADDR_SPEC { #[doc = "`write(|w| ..)` method takes [cci_addr::W](W) writer structure"] impl crate::Writable for CCI_ADDR_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets cci_addr to value 0"] impl crate::Resettable for CCI_ADDR_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/cci/cci_cfg.rs b/src/cci/cci_cfg.rs index ce0e801..8894c47 100644 --- a/src/cci/cci_cfg.rs +++ b/src/cci/cci_cfg.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,419 +28,153 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `reg_mcci_clk_inv` reader - "] -pub struct REG_MCCI_CLK_INV_R(crate::FieldReader); -impl REG_MCCI_CLK_INV_R { - pub(crate) fn new(bits: bool) -> Self { - REG_MCCI_CLK_INV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_MCCI_CLK_INV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_mcci_clk_inv` writer - "] -pub struct REG_MCCI_CLK_INV_W<'a> { - w: &'a mut W, -} -impl<'a> REG_MCCI_CLK_INV_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w - } -} -#[doc = "Field `reg_scci_clk_inv` reader - "] -pub struct REG_SCCI_CLK_INV_R(crate::FieldReader); -impl REG_SCCI_CLK_INV_R { - pub(crate) fn new(bits: bool) -> Self { - REG_SCCI_CLK_INV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_SCCI_CLK_INV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_scci_clk_inv` writer - "] -pub struct REG_SCCI_CLK_INV_W<'a> { - w: &'a mut W, -} -impl<'a> REG_SCCI_CLK_INV_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `cfg_cci1_pre_read` reader - "] -pub struct CFG_CCI1_PRE_READ_R(crate::FieldReader); -impl CFG_CCI1_PRE_READ_R { - pub(crate) fn new(bits: bool) -> Self { - CFG_CCI1_PRE_READ_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CFG_CCI1_PRE_READ_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cfg_cci1_pre_read` writer - "] -pub struct CFG_CCI1_PRE_READ_W<'a> { - w: &'a mut W, -} -impl<'a> CFG_CCI1_PRE_READ_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7); - self.w - } -} -#[doc = "Field `reg_div_m_cci_sclk` reader - "] -pub struct REG_DIV_M_CCI_SCLK_R(crate::FieldReader); -impl REG_DIV_M_CCI_SCLK_R { - pub(crate) fn new(bits: u8) -> Self { - REG_DIV_M_CCI_SCLK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_DIV_M_CCI_SCLK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_div_m_cci_sclk` writer - "] -pub struct REG_DIV_M_CCI_SCLK_W<'a> { - w: &'a mut W, -} -impl<'a> REG_DIV_M_CCI_SCLK_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 5)) | ((value as u32 & 0x03) << 5); - self.w - } -} -#[doc = "Field `reg_m_cci_sclk_en` reader - "] -pub struct REG_M_CCI_SCLK_EN_R(crate::FieldReader); -impl REG_M_CCI_SCLK_EN_R { - pub(crate) fn new(bits: bool) -> Self { - REG_M_CCI_SCLK_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_M_CCI_SCLK_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_m_cci_sclk_en` writer - "] -pub struct REG_M_CCI_SCLK_EN_W<'a> { - w: &'a mut W, -} -impl<'a> REG_M_CCI_SCLK_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} -#[doc = "Field `cci_mas_hw_mode` reader - "] -pub struct CCI_MAS_HW_MODE_R(crate::FieldReader); -impl CCI_MAS_HW_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - CCI_MAS_HW_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CCI_MAS_HW_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cci_mas_hw_mode` writer - "] -pub struct CCI_MAS_HW_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> CCI_MAS_HW_MODE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `cci_mas_sel_cci2` reader - "] -pub struct CCI_MAS_SEL_CCI2_R(crate::FieldReader); -impl CCI_MAS_SEL_CCI2_R { - pub(crate) fn new(bits: bool) -> Self { - CCI_MAS_SEL_CCI2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CCI_MAS_SEL_CCI2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cci_mas_sel_cci2` writer - "] -pub struct CCI_MAS_SEL_CCI2_W<'a> { - w: &'a mut W, -} -impl<'a> CCI_MAS_SEL_CCI2_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `cci_slv_sel_cci2` reader - "] -pub struct CCI_SLV_SEL_CCI2_R(crate::FieldReader); -impl CCI_SLV_SEL_CCI2_R { - pub(crate) fn new(bits: bool) -> Self { - CCI_SLV_SEL_CCI2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CCI_SLV_SEL_CCI2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cci_slv_sel_cci2` writer - "] -pub struct CCI_SLV_SEL_CCI2_W<'a> { - w: &'a mut W, -} -impl<'a> CCI_SLV_SEL_CCI2_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `cci_en` reader - "] -pub struct CCI_EN_R(crate::FieldReader); -impl CCI_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CCI_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CCI_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CCI_EN_R = crate::BitReader; #[doc = "Field `cci_en` writer - "] -pub struct CCI_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CCI_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type CCI_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, CCI_CFG_SPEC, bool, O>; +#[doc = "Field `cci_slv_sel_cci2` reader - "] +pub type CCI_SLV_SEL_CCI2_R = crate::BitReader; +#[doc = "Field `cci_slv_sel_cci2` writer - "] +pub type CCI_SLV_SEL_CCI2_W<'a, const O: u8> = crate::BitWriter<'a, u32, CCI_CFG_SPEC, bool, O>; +#[doc = "Field `cci_mas_sel_cci2` reader - "] +pub type CCI_MAS_SEL_CCI2_R = crate::BitReader; +#[doc = "Field `cci_mas_sel_cci2` writer - "] +pub type CCI_MAS_SEL_CCI2_W<'a, const O: u8> = crate::BitWriter<'a, u32, CCI_CFG_SPEC, bool, O>; +#[doc = "Field `cci_mas_hw_mode` reader - "] +pub type CCI_MAS_HW_MODE_R = crate::BitReader; +#[doc = "Field `cci_mas_hw_mode` writer - "] +pub type CCI_MAS_HW_MODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, CCI_CFG_SPEC, bool, O>; +#[doc = "Field `reg_m_cci_sclk_en` reader - "] +pub type REG_M_CCI_SCLK_EN_R = crate::BitReader; +#[doc = "Field `reg_m_cci_sclk_en` writer - "] +pub type REG_M_CCI_SCLK_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, CCI_CFG_SPEC, bool, O>; +#[doc = "Field `reg_div_m_cci_sclk` reader - "] +pub type REG_DIV_M_CCI_SCLK_R = crate::FieldReader; +#[doc = "Field `reg_div_m_cci_sclk` writer - "] +pub type REG_DIV_M_CCI_SCLK_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, CCI_CFG_SPEC, u8, u8, 2, O>; +#[doc = "Field `cfg_cci1_pre_read` reader - "] +pub type CFG_CCI1_PRE_READ_R = crate::BitReader; +#[doc = "Field `cfg_cci1_pre_read` writer - "] +pub type CFG_CCI1_PRE_READ_W<'a, const O: u8> = crate::BitWriter<'a, u32, CCI_CFG_SPEC, bool, O>; +#[doc = "Field `reg_scci_clk_inv` reader - "] +pub type REG_SCCI_CLK_INV_R = crate::BitReader; +#[doc = "Field `reg_scci_clk_inv` writer - "] +pub type REG_SCCI_CLK_INV_W<'a, const O: u8> = crate::BitWriter<'a, u32, CCI_CFG_SPEC, bool, O>; +#[doc = "Field `reg_mcci_clk_inv` reader - "] +pub type REG_MCCI_CLK_INV_R = crate::BitReader; +#[doc = "Field `reg_mcci_clk_inv` writer - "] +pub type REG_MCCI_CLK_INV_W<'a, const O: u8> = crate::BitWriter<'a, u32, CCI_CFG_SPEC, bool, O>; impl R { - #[doc = "Bit 9"] + #[doc = "Bit 0"] #[inline(always)] - pub fn reg_mcci_clk_inv(&self) -> REG_MCCI_CLK_INV_R { - REG_MCCI_CLK_INV_R::new(((self.bits >> 9) & 0x01) != 0) + pub fn cci_en(&self) -> CCI_EN_R { + CCI_EN_R::new((self.bits & 1) != 0) } - #[doc = "Bit 8"] + #[doc = "Bit 1"] #[inline(always)] - pub fn reg_scci_clk_inv(&self) -> REG_SCCI_CLK_INV_R { - REG_SCCI_CLK_INV_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn cci_slv_sel_cci2(&self) -> CCI_SLV_SEL_CCI2_R { + CCI_SLV_SEL_CCI2_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 7"] + #[doc = "Bit 2"] #[inline(always)] - pub fn cfg_cci1_pre_read(&self) -> CFG_CCI1_PRE_READ_R { - CFG_CCI1_PRE_READ_R::new(((self.bits >> 7) & 0x01) != 0) + pub fn cci_mas_sel_cci2(&self) -> CCI_MAS_SEL_CCI2_R { + CCI_MAS_SEL_CCI2_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bits 5:6"] + #[doc = "Bit 3"] #[inline(always)] - pub fn reg_div_m_cci_sclk(&self) -> REG_DIV_M_CCI_SCLK_R { - REG_DIV_M_CCI_SCLK_R::new(((self.bits >> 5) & 0x03) as u8) + pub fn cci_mas_hw_mode(&self) -> CCI_MAS_HW_MODE_R { + CCI_MAS_HW_MODE_R::new(((self.bits >> 3) & 1) != 0) } #[doc = "Bit 4"] #[inline(always)] pub fn reg_m_cci_sclk_en(&self) -> REG_M_CCI_SCLK_EN_R { - REG_M_CCI_SCLK_EN_R::new(((self.bits >> 4) & 0x01) != 0) + REG_M_CCI_SCLK_EN_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 3"] + #[doc = "Bits 5:6"] #[inline(always)] - pub fn cci_mas_hw_mode(&self) -> CCI_MAS_HW_MODE_R { - CCI_MAS_HW_MODE_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn reg_div_m_cci_sclk(&self) -> REG_DIV_M_CCI_SCLK_R { + REG_DIV_M_CCI_SCLK_R::new(((self.bits >> 5) & 3) as u8) } - #[doc = "Bit 2"] + #[doc = "Bit 7"] #[inline(always)] - pub fn cci_mas_sel_cci2(&self) -> CCI_MAS_SEL_CCI2_R { - CCI_MAS_SEL_CCI2_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn cfg_cci1_pre_read(&self) -> CFG_CCI1_PRE_READ_R { + CFG_CCI1_PRE_READ_R::new(((self.bits >> 7) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 8"] #[inline(always)] - pub fn cci_slv_sel_cci2(&self) -> CCI_SLV_SEL_CCI2_R { - CCI_SLV_SEL_CCI2_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn reg_scci_clk_inv(&self) -> REG_SCCI_CLK_INV_R { + REG_SCCI_CLK_INV_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 9"] #[inline(always)] - pub fn cci_en(&self) -> CCI_EN_R { - CCI_EN_R::new((self.bits & 0x01) != 0) + pub fn reg_mcci_clk_inv(&self) -> REG_MCCI_CLK_INV_R { + REG_MCCI_CLK_INV_R::new(((self.bits >> 9) & 1) != 0) } } impl W { - #[doc = "Bit 9"] + #[doc = "Bit 0"] #[inline(always)] - pub fn reg_mcci_clk_inv(&mut self) -> REG_MCCI_CLK_INV_W { - REG_MCCI_CLK_INV_W { w: self } + #[must_use] + pub fn cci_en(&mut self) -> CCI_EN_W<0> { + CCI_EN_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bit 1"] #[inline(always)] - pub fn reg_scci_clk_inv(&mut self) -> REG_SCCI_CLK_INV_W { - REG_SCCI_CLK_INV_W { w: self } + #[must_use] + pub fn cci_slv_sel_cci2(&mut self) -> CCI_SLV_SEL_CCI2_W<1> { + CCI_SLV_SEL_CCI2_W::new(self) } - #[doc = "Bit 7"] + #[doc = "Bit 2"] #[inline(always)] - pub fn cfg_cci1_pre_read(&mut self) -> CFG_CCI1_PRE_READ_W { - CFG_CCI1_PRE_READ_W { w: self } + #[must_use] + pub fn cci_mas_sel_cci2(&mut self) -> CCI_MAS_SEL_CCI2_W<2> { + CCI_MAS_SEL_CCI2_W::new(self) } - #[doc = "Bits 5:6"] + #[doc = "Bit 3"] #[inline(always)] - pub fn reg_div_m_cci_sclk(&mut self) -> REG_DIV_M_CCI_SCLK_W { - REG_DIV_M_CCI_SCLK_W { w: self } + #[must_use] + pub fn cci_mas_hw_mode(&mut self) -> CCI_MAS_HW_MODE_W<3> { + CCI_MAS_HW_MODE_W::new(self) } #[doc = "Bit 4"] #[inline(always)] - pub fn reg_m_cci_sclk_en(&mut self) -> REG_M_CCI_SCLK_EN_W { - REG_M_CCI_SCLK_EN_W { w: self } + #[must_use] + pub fn reg_m_cci_sclk_en(&mut self) -> REG_M_CCI_SCLK_EN_W<4> { + REG_M_CCI_SCLK_EN_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bits 5:6"] #[inline(always)] - pub fn cci_mas_hw_mode(&mut self) -> CCI_MAS_HW_MODE_W { - CCI_MAS_HW_MODE_W { w: self } + #[must_use] + pub fn reg_div_m_cci_sclk(&mut self) -> REG_DIV_M_CCI_SCLK_W<5> { + REG_DIV_M_CCI_SCLK_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bit 7"] #[inline(always)] - pub fn cci_mas_sel_cci2(&mut self) -> CCI_MAS_SEL_CCI2_W { - CCI_MAS_SEL_CCI2_W { w: self } + #[must_use] + pub fn cfg_cci1_pre_read(&mut self) -> CFG_CCI1_PRE_READ_W<7> { + CFG_CCI1_PRE_READ_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 8"] #[inline(always)] - pub fn cci_slv_sel_cci2(&mut self) -> CCI_SLV_SEL_CCI2_W { - CCI_SLV_SEL_CCI2_W { w: self } + #[must_use] + pub fn reg_scci_clk_inv(&mut self) -> REG_SCCI_CLK_INV_W<8> { + REG_SCCI_CLK_INV_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 9"] #[inline(always)] - pub fn cci_en(&mut self) -> CCI_EN_W { - CCI_EN_W { w: self } + #[must_use] + pub fn reg_mcci_clk_inv(&mut self) -> REG_MCCI_CLK_INV_W<9> { + REG_MCCI_CLK_INV_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -457,11 +192,10 @@ impl crate::Readable for CCI_CFG_SPEC { #[doc = "`write(|w| ..)` method takes [cci_cfg::W](W) writer structure"] impl crate::Writable for CCI_CFG_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets cci_cfg to value 0x0221"] impl crate::Resettable for CCI_CFG_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0221 - } + const RESET_VALUE: Self::Ux = 0x0221; } diff --git a/src/cci/cci_ctl.rs b/src/cci/cci_ctl.rs index fe14a92..8e483e4 100644 --- a/src/cci/cci_ctl.rs +++ b/src/cci/cci_ctl.rs @@ -7,71 +7,65 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `ahb_state` reader - "] -pub struct AHB_STATE_R(crate::FieldReader); -impl AHB_STATE_R { - pub(crate) fn new(bits: u8) -> Self { - AHB_STATE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for AHB_STATE_R { - type Target = crate::FieldReader; +#[doc = "Register `cci_ctl` writer"] +pub struct W(crate::W); +impl core::ops::Deref for W { + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } -#[doc = "Field `cci_read_flag` reader - "] -pub struct CCI_READ_FLAG_R(crate::FieldReader); -impl CCI_READ_FLAG_R { - pub(crate) fn new(bits: bool) -> Self { - CCI_READ_FLAG_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CCI_READ_FLAG_R { - type Target = crate::FieldReader; +impl core::ops::DerefMut for W { #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cci_write_flag` reader - "] -pub struct CCI_WRITE_FLAG_R(crate::FieldReader); -impl CCI_WRITE_FLAG_R { - pub(crate) fn new(bits: bool) -> Self { - CCI_WRITE_FLAG_R(crate::FieldReader::new(bits)) + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 } } -impl core::ops::Deref for CCI_WRITE_FLAG_R { - type Target = crate::FieldReader; +impl From> for W { #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + fn from(writer: crate::W) -> Self { + W(writer) } } +#[doc = "Field `cci_write_flag` reader - "] +pub type CCI_WRITE_FLAG_R = crate::BitReader; +#[doc = "Field `cci_read_flag` reader - "] +pub type CCI_READ_FLAG_R = crate::BitReader; +#[doc = "Field `ahb_state` reader - "] +pub type AHB_STATE_R = crate::FieldReader; impl R { - #[doc = "Bits 2:3"] + #[doc = "Bit 0"] #[inline(always)] - pub fn ahb_state(&self) -> AHB_STATE_R { - AHB_STATE_R::new(((self.bits >> 2) & 0x03) as u8) + pub fn cci_write_flag(&self) -> CCI_WRITE_FLAG_R { + CCI_WRITE_FLAG_R::new((self.bits & 1) != 0) } #[doc = "Bit 1"] #[inline(always)] pub fn cci_read_flag(&self) -> CCI_READ_FLAG_R { - CCI_READ_FLAG_R::new(((self.bits >> 1) & 0x01) != 0) + CCI_READ_FLAG_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bits 2:3"] #[inline(always)] - pub fn cci_write_flag(&self) -> CCI_WRITE_FLAG_R { - CCI_WRITE_FLAG_R::new((self.bits & 0x01) != 0) + pub fn ahb_state(&self) -> AHB_STATE_R { + AHB_STATE_R::new(((self.bits >> 2) & 3) as u8) + } +} +impl W { + #[doc = "Writes raw bits to the register."] + #[inline(always)] + pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { + self.0.bits(bits); + self } } -#[doc = "cci_ctl.\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 [cci_ctl](index.html) module"] +#[doc = "cci_ctl.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cci_ctl](index.html) module"] pub struct CCI_CTL_SPEC; impl crate::RegisterSpec for CCI_CTL_SPEC { type Ux = u32; @@ -80,10 +74,13 @@ impl crate::RegisterSpec for CCI_CTL_SPEC { impl crate::Readable for CCI_CTL_SPEC { type Reader = R; } +#[doc = "`write(|w| ..)` method takes [cci_ctl::W](W) writer structure"] +impl crate::Writable for CCI_CTL_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} #[doc = "`reset()` method sets cci_ctl to value 0"] impl crate::Resettable for CCI_CTL_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/cci/cci_rdata.rs b/src/cci/cci_rdata.rs index 8c2c4ff..a033b8b 100644 --- a/src/cci/cci_rdata.rs +++ b/src/cci/cci_rdata.rs @@ -7,33 +7,51 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `apb_cci_rdata` reader - "] -pub struct APB_CCI_RDATA_R(crate::FieldReader); -impl APB_CCI_RDATA_R { - pub(crate) fn new(bits: u32) -> Self { - APB_CCI_RDATA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for APB_CCI_RDATA_R { - type Target = crate::FieldReader; +#[doc = "Register `cci_rdata` writer"] +pub struct W(crate::W); +impl core::ops::Deref for W { + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } +impl core::ops::DerefMut for W { + #[inline(always)] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } +} +impl From> for W { + #[inline(always)] + fn from(writer: crate::W) -> Self { + W(writer) + } +} +#[doc = "Field `apb_cci_rdata` reader - "] +pub type APB_CCI_RDATA_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn apb_cci_rdata(&self) -> APB_CCI_RDATA_R { - APB_CCI_RDATA_R::new((self.bits & 0xffff_ffff) as u32) + APB_CCI_RDATA_R::new(self.bits) + } +} +impl W { + #[doc = "Writes raw bits to the register."] + #[inline(always)] + pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { + self.0.bits(bits); + self } } -#[doc = "cci_rdata.\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 [cci_rdata](index.html) module"] +#[doc = "cci_rdata.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cci_rdata](index.html) module"] pub struct CCI_RDATA_SPEC; impl crate::RegisterSpec for CCI_RDATA_SPEC { type Ux = u32; @@ -42,10 +60,13 @@ impl crate::RegisterSpec for CCI_RDATA_SPEC { impl crate::Readable for CCI_RDATA_SPEC { type Reader = R; } +#[doc = "`write(|w| ..)` method takes [cci_rdata::W](W) writer structure"] +impl crate::Writable for CCI_RDATA_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} #[doc = "`reset()` method sets cci_rdata to value 0"] impl crate::Resettable for CCI_RDATA_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/cci/cci_wdata.rs b/src/cci/cci_wdata.rs index 58909fb..dfc0df7 100644 --- a/src/cci/cci_wdata.rs +++ b/src/cci/cci_wdata.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `apb_cci_wdata` reader - "] -pub struct APB_CCI_WDATA_R(crate::FieldReader); -impl APB_CCI_WDATA_R { - pub(crate) fn new(bits: u32) -> Self { - APB_CCI_WDATA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for APB_CCI_WDATA_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type APB_CCI_WDATA_R = crate::FieldReader; #[doc = "Field `apb_cci_wdata` writer - "] -pub struct APB_CCI_WDATA_W<'a> { - w: &'a mut W, -} -impl<'a> APB_CCI_WDATA_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type APB_CCI_WDATA_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, CCI_WDATA_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn apb_cci_wdata(&self) -> APB_CCI_WDATA_R { - APB_CCI_WDATA_R::new((self.bits & 0xffff_ffff) as u32) + APB_CCI_WDATA_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn apb_cci_wdata(&mut self) -> APB_CCI_WDATA_W { - APB_CCI_WDATA_W { w: self } + #[must_use] + pub fn apb_cci_wdata(&mut self) -> APB_CCI_WDATA_W<0> { + APB_CCI_WDATA_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for CCI_WDATA_SPEC { #[doc = "`write(|w| ..)` method takes [cci_wdata::W](W) writer structure"] impl crate::Writable for CCI_WDATA_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets cci_wdata to value 0"] impl crate::Resettable for CCI_WDATA_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/cks.rs b/src/cks.rs index 161c389..e73c725 100644 --- a/src/cks.rs +++ b/src/cks.rs @@ -2,21 +2,21 @@ #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - cks_config."] - pub cks_config: crate::Reg, + pub cks_config: CKS_CONFIG, #[doc = "0x04 - Checksum data in"] - pub data_in: crate::Reg, + pub data_in: DATA_IN, #[doc = "0x08 - Checksum value out"] - pub cks_out: crate::Reg, + pub cks_out: CKS_OUT, } -#[doc = "cks_config register accessor: an alias for `Reg`"] +#[doc = "cks_config (rw) register accessor: an alias for `Reg`"] pub type CKS_CONFIG = crate::Reg; #[doc = "cks_config."] pub mod cks_config; -#[doc = "data_in register accessor: an alias for `Reg`"] +#[doc = "data_in (rw) register accessor: an alias for `Reg`"] pub type DATA_IN = crate::Reg; #[doc = "Checksum data in"] pub mod data_in; -#[doc = "cks_out register accessor: an alias for `Reg`"] +#[doc = "cks_out (rw) register accessor: an alias for `Reg`"] pub type CKS_OUT = crate::Reg; #[doc = "Checksum value out"] pub mod cks_out; diff --git a/src/cks/cks_config.rs b/src/cks/cks_config.rs index 1afabfe..2bf80ca 100644 --- a/src/cks/cks_config.rs +++ b/src/cks/cks_config.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,154 +28,94 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } +#[doc = "Field `cr_cks_clr` reader - "] +pub type CR_CKS_CLR_R = crate::BitReader; +#[doc = "Field `cr_cks_clr` writer - "] +pub type CR_CKS_CLR_W<'a, const O: u8> = crate::BitWriter<'a, u32, CKS_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_cks_byte_swap` reader - Endianness."] +pub type CR_CKS_BYTE_SWAP_R = crate::BitReader; #[doc = "Endianness.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum CR_CKS_BYTE_SWAP_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CKSBYTE_SWAP_A { #[doc = "0: Little endian."] LITTLE_ENDIAN = 0, #[doc = "1: Big endian."] BIG_ENDIAN = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: CR_CKS_BYTE_SWAP_A) -> Self { + fn from(variant: CKSBYTE_SWAP_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `cr_cks_byte_swap` reader - Endianness."] -pub struct CR_CKS_BYTE_SWAP_R(crate::FieldReader); impl CR_CKS_BYTE_SWAP_R { - pub(crate) fn new(bits: bool) -> Self { - CR_CKS_BYTE_SWAP_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> CR_CKS_BYTE_SWAP_A { + pub fn variant(&self) -> CKSBYTE_SWAP_A { match self.bits { - false => CR_CKS_BYTE_SWAP_A::LITTLE_ENDIAN, - true => CR_CKS_BYTE_SWAP_A::BIG_ENDIAN, + false => CKSBYTE_SWAP_A::LITTLE_ENDIAN, + true => CKSBYTE_SWAP_A::BIG_ENDIAN, } } #[doc = "Checks if the value of the field is `LITTLE_ENDIAN`"] #[inline(always)] pub fn is_little_endian(&self) -> bool { - **self == CR_CKS_BYTE_SWAP_A::LITTLE_ENDIAN + *self == CKSBYTE_SWAP_A::LITTLE_ENDIAN } #[doc = "Checks if the value of the field is `BIG_ENDIAN`"] #[inline(always)] pub fn is_big_endian(&self) -> bool { - **self == CR_CKS_BYTE_SWAP_A::BIG_ENDIAN - } -} -impl core::ops::Deref for CR_CKS_BYTE_SWAP_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == CKSBYTE_SWAP_A::BIG_ENDIAN } } #[doc = "Field `cr_cks_byte_swap` writer - Endianness."] -pub struct CR_CKS_BYTE_SWAP_W<'a> { - w: &'a mut W, -} -impl<'a> CR_CKS_BYTE_SWAP_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: CR_CKS_BYTE_SWAP_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type CR_CKS_BYTE_SWAP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, CKS_CONFIG_SPEC, CKSBYTE_SWAP_A, O>; +impl<'a, const O: u8> CR_CKS_BYTE_SWAP_W<'a, O> { #[doc = "Little endian."] #[inline(always)] pub fn little_endian(self) -> &'a mut W { - self.variant(CR_CKS_BYTE_SWAP_A::LITTLE_ENDIAN) + self.variant(CKSBYTE_SWAP_A::LITTLE_ENDIAN) } #[doc = "Big endian."] #[inline(always)] pub fn big_endian(self) -> &'a mut W { - self.variant(CR_CKS_BYTE_SWAP_A::BIG_ENDIAN) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} -#[doc = "Field `cr_cks_clr` reader - "] -pub struct CR_CKS_CLR_R(crate::FieldReader); -impl CR_CKS_CLR_R { - pub(crate) fn new(bits: bool) -> Self { - CR_CKS_CLR_R(crate::FieldReader::new(bits)) + self.variant(CKSBYTE_SWAP_A::BIG_ENDIAN) } } -impl core::ops::Deref for CR_CKS_CLR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_cks_clr` writer - "] -pub struct CR_CKS_CLR_W<'a> { - w: &'a mut W, -} -impl<'a> CR_CKS_CLR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn cr_cks_clr(&self) -> CR_CKS_CLR_R { + CR_CKS_CLR_R::new((self.bits & 1) != 0) } -} -impl R { #[doc = "Bit 1 - Endianness."] #[inline(always)] pub fn cr_cks_byte_swap(&self) -> CR_CKS_BYTE_SWAP_R { - CR_CKS_BYTE_SWAP_R::new(((self.bits >> 1) & 0x01) != 0) - } - #[doc = "Bit 0"] - #[inline(always)] - pub fn cr_cks_clr(&self) -> CR_CKS_CLR_R { - CR_CKS_CLR_R::new((self.bits & 0x01) != 0) + CR_CKS_BYTE_SWAP_R::new(((self.bits >> 1) & 1) != 0) } } impl W { - #[doc = "Bit 1 - Endianness."] + #[doc = "Bit 0"] #[inline(always)] - pub fn cr_cks_byte_swap(&mut self) -> CR_CKS_BYTE_SWAP_W { - CR_CKS_BYTE_SWAP_W { w: self } + #[must_use] + pub fn cr_cks_clr(&mut self) -> CR_CKS_CLR_W<0> { + CR_CKS_CLR_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 1 - Endianness."] #[inline(always)] - pub fn cr_cks_clr(&mut self) -> CR_CKS_CLR_W { - CR_CKS_CLR_W { w: self } + #[must_use] + pub fn cr_cks_byte_swap(&mut self) -> CR_CKS_BYTE_SWAP_W<1> { + CR_CKS_BYTE_SWAP_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -192,11 +133,10 @@ impl crate::Readable for CKS_CONFIG_SPEC { #[doc = "`write(|w| ..)` method takes [cks_config::W](W) writer structure"] impl crate::Writable for CKS_CONFIG_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets cks_config to value 0"] impl crate::Resettable for CKS_CONFIG_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/cks/cks_out.rs b/src/cks/cks_out.rs index 49d6148..1f8f806 100644 --- a/src/cks/cks_out.rs +++ b/src/cks/cks_out.rs @@ -7,25 +7,35 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `cks_out` reader - "] -pub struct CKS_OUT_R(crate::FieldReader); -impl CKS_OUT_R { - pub(crate) fn new(bits: u16) -> Self { - CKS_OUT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CKS_OUT_R { - type Target = crate::FieldReader; +#[doc = "Register `cks_out` writer"] +pub struct W(crate::W); +impl core::ops::Deref for W { + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } +impl core::ops::DerefMut for W { + #[inline(always)] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } +} +impl From> for W { + #[inline(always)] + fn from(writer: crate::W) -> Self { + W(writer) + } +} +#[doc = "Field `cks_out` reader - "] +pub type CKS_OUT_R = crate::FieldReader; impl R { #[doc = "Bits 0:15"] #[inline(always)] @@ -33,7 +43,15 @@ impl R { CKS_OUT_R::new((self.bits & 0xffff) as u16) } } -#[doc = "Checksum value out\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 [cks_out](index.html) module"] +impl W { + #[doc = "Writes raw bits to the register."] + #[inline(always)] + pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { + self.0.bits(bits); + self + } +} +#[doc = "Checksum value out\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cks_out](index.html) module"] pub struct CKS_OUT_SPEC; impl crate::RegisterSpec for CKS_OUT_SPEC { type Ux = u32; @@ -42,10 +60,13 @@ impl crate::RegisterSpec for CKS_OUT_SPEC { impl crate::Readable for CKS_OUT_SPEC { type Reader = R; } +#[doc = "`write(|w| ..)` method takes [cks_out::W](W) writer structure"] +impl crate::Writable for CKS_OUT_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} #[doc = "`reset()` method sets cks_out to value 0xffff"] impl crate::Resettable for CKS_OUT_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xffff - } + const RESET_VALUE: Self::Ux = 0xffff; } diff --git a/src/cks/data_in.rs b/src/cks/data_in.rs index c96918f..2920cbc 100644 --- a/src/cks/data_in.rs +++ b/src/cks/data_in.rs @@ -1,3 +1,18 @@ +#[doc = "Register `data_in` reader"] +pub struct R(crate::R); +impl core::ops::Deref for R { + type Target = crate::R; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +impl From> for R { + #[inline(always)] + fn from(reader: crate::R) -> Self { + R(reader) + } +} #[doc = "Register `data_in` writer"] pub struct W(crate::W); impl core::ops::Deref for W { @@ -13,48 +28,44 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `data_in` writer - "] -pub struct DATA_IN_W<'a> { - w: &'a mut W, -} -impl<'a> DATA_IN_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff); - self.w - } -} +pub type DATA_IN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DATA_IN_SPEC, u8, u8, 8, O>; impl W { #[doc = "Bits 0:7"] #[inline(always)] - pub fn data_in(&mut self) -> DATA_IN_W { - DATA_IN_W { w: self } + #[must_use] + pub fn data_in(&mut self) -> DATA_IN_W<0> { + DATA_IN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self } } -#[doc = "Checksum data in\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data_in](index.html) module"] +#[doc = "Checksum data in\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data_in](index.html) module"] pub struct DATA_IN_SPEC; impl crate::RegisterSpec for DATA_IN_SPEC { type Ux = u32; } +#[doc = "`read()` method returns [data_in::R](R) reader structure"] +impl crate::Readable for DATA_IN_SPEC { + type Reader = R; +} #[doc = "`write(|w| ..)` method takes [data_in::W](W) writer structure"] impl crate::Writable for DATA_IN_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets data_in to value 0"] impl crate::Resettable for DATA_IN_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/dma.rs b/src/dma.rs index 993343f..4c1ebeb 100644 --- a/src/dma.rs +++ b/src/dma.rs @@ -2,211 +2,212 @@ #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - DMA_IntStatus."] - pub dma_int_status: crate::Reg, + pub dma_int_status: DMA_INT_STATUS, #[doc = "0x04 - DMA_IntTCStatus."] - pub dma_int_tcstatus: crate::Reg, + pub dma_int_tcstatus: DMA_INT_TCSTATUS, #[doc = "0x08 - DMA_IntTCClear."] - pub dma_int_tcclear: crate::Reg, + pub dma_int_tcclear: DMA_INT_TCCLEAR, #[doc = "0x0c - DMA_IntErrorStatus."] - pub dma_int_error_status: crate::Reg, + pub dma_int_error_status: DMA_INT_ERROR_STATUS, #[doc = "0x10 - DMA_IntErrClr."] - pub dma_int_err_clr: crate::Reg, + pub dma_int_err_clr: DMA_INT_ERR_CLR, #[doc = "0x14 - DMA_RawIntTCStatus."] - pub dma_raw_int_tcstatus: crate::Reg, + pub dma_raw_int_tcstatus: DMA_RAW_INT_TCSTATUS, #[doc = "0x18 - DMA_RawIntErrorStatus."] - pub dma_raw_int_error_status: crate::Reg, + pub dma_raw_int_error_status: DMA_RAW_INT_ERROR_STATUS, #[doc = "0x1c - DMA_EnbldChns."] - pub dma_enbld_chns: crate::Reg, + pub dma_enbld_chns: DMA_ENBLD_CHNS, #[doc = "0x20 - DMA_SoftBReq."] - pub dma_soft_breq: crate::Reg, + pub dma_soft_breq: DMA_SOFT_BREQ, #[doc = "0x24 - DMA_SoftSReq."] - pub dma_soft_sreq: crate::Reg, + pub dma_soft_sreq: DMA_SOFT_SREQ, #[doc = "0x28 - DMA_SoftLBReq."] - pub dma_soft_lbreq: crate::Reg, + pub dma_soft_lbreq: DMA_SOFT_LBREQ, #[doc = "0x2c - DMA_SoftLSReq."] - pub dma_soft_lsreq: crate::Reg, + pub dma_soft_lsreq: DMA_SOFT_LSREQ, #[doc = "0x30 - DMA_Top_Config."] - pub dma_top_config: crate::Reg, + pub dma_top_config: DMA_TOP_CONFIG, #[doc = "0x34 - DMA_Sync."] - pub dma_sync: crate::Reg, - _reserved14: [u8; 200usize], + pub dma_sync: DMA_SYNC, + _reserved14: [u8; 0xc8], #[doc = "0x100 - DMA_C0SrcAddr."] - pub dma_c0src_addr: crate::Reg, + pub dma_c0src_addr: DMA_C0SRC_ADDR, #[doc = "0x104 - DMA_C0DstAddr."] - pub dma_c0dst_addr: crate::Reg, + pub dma_c0dst_addr: DMA_C0DST_ADDR, #[doc = "0x108 - DMA_C0LLI."] - pub dma_c0lli: crate::Reg, + pub dma_c0lli: DMA_C0LLI, #[doc = "0x10c - DMA_C0Control."] - pub dma_c0control: crate::Reg, + pub dma_c0control: DMA_C0CONTROL, #[doc = "0x110 - DMA_C0Config."] - pub dma_c0config: crate::Reg, - _reserved19: [u8; 236usize], + pub dma_c0config: DMA_C0CONFIG, + _reserved19: [u8; 0xec], #[doc = "0x200 - DMA_C1SrcAddr."] - pub dma_c1src_addr: crate::Reg, + pub dma_c1src_addr: DMA_C1SRC_ADDR, #[doc = "0x204 - DMA_C1DstAddr."] - pub dma_c1dst_addr: crate::Reg, + pub dma_c1dst_addr: DMA_C1DST_ADDR, #[doc = "0x208 - DMA_C1LLI."] - pub dma_c1lli: crate::Reg, + pub dma_c1lli: DMA_C1LLI, #[doc = "0x20c - DMA_C1Control."] - pub dma_c1control: crate::Reg, + pub dma_c1control: DMA_C1CONTROL, #[doc = "0x210 - DMA_C1Config."] - pub dma_c1config: crate::Reg, - _reserved24: [u8; 236usize], + pub dma_c1config: DMA_C1CONFIG, + _reserved24: [u8; 0xec], #[doc = "0x300 - DMA_C2SrcAddr."] - pub dma_c2src_addr: crate::Reg, + pub dma_c2src_addr: DMA_C2SRC_ADDR, #[doc = "0x304 - DMA_C2DstAddr."] - pub dma_c2dst_addr: crate::Reg, + pub dma_c2dst_addr: DMA_C2DST_ADDR, #[doc = "0x308 - DMA_C2LLI."] - pub dma_c2lli: crate::Reg, + pub dma_c2lli: DMA_C2LLI, #[doc = "0x30c - DMA_C2Control."] - pub dma_c2control: crate::Reg, + pub dma_c2control: DMA_C2CONTROL, #[doc = "0x310 - DMA_C2Config."] - pub dma_c2config: crate::Reg, - _reserved29: [u8; 236usize], + pub dma_c2config: DMA_C2CONFIG, + _reserved29: [u8; 0xec], #[doc = "0x400 - DMA_C3SrcAddr."] - pub dma_c3src_addr: crate::Reg, + pub dma_c3src_addr: DMA_C3SRC_ADDR, #[doc = "0x404 - DMA_C3DstAddr."] - pub dma_c3dst_addr: crate::Reg, + pub dma_c3dst_addr: DMA_C3DST_ADDR, #[doc = "0x408 - DMA_C3LLI."] - pub dma_c3lli: crate::Reg, + pub dma_c3lli: DMA_C3LLI, #[doc = "0x40c - DMA_C3Control."] - pub dma_c3control: crate::Reg, + pub dma_c3control: DMA_C3CONTROL, #[doc = "0x410 - DMA_C3Config."] - pub dma_c3config: crate::Reg, + pub dma_c3config: DMA_C3CONFIG, } -#[doc = "DMA_IntStatus register accessor: an alias for `Reg`"] -pub type DMA_INTSTATUS = crate::Reg; +#[doc = "DMA_IntStatus (rw) register accessor: an alias for `Reg`"] +pub type DMA_INT_STATUS = crate::Reg; #[doc = "DMA_IntStatus."] pub mod dma_int_status; -#[doc = "DMA_IntTCStatus register accessor: an alias for `Reg`"] -pub type DMA_INTTCSTATUS = crate::Reg; +#[doc = "DMA_IntTCStatus (rw) register accessor: an alias for `Reg`"] +pub type DMA_INT_TCSTATUS = crate::Reg; #[doc = "DMA_IntTCStatus."] pub mod dma_int_tcstatus; -#[doc = "DMA_IntTCClear register accessor: an alias for `Reg`"] -pub type DMA_INTTCCLEAR = crate::Reg; +#[doc = "DMA_IntTCClear (rw) register accessor: an alias for `Reg`"] +pub type DMA_INT_TCCLEAR = crate::Reg; #[doc = "DMA_IntTCClear."] pub mod dma_int_tcclear; -#[doc = "DMA_IntErrorStatus register accessor: an alias for `Reg`"] -pub type DMA_INTERRORSTATUS = crate::Reg; +#[doc = "DMA_IntErrorStatus (rw) register accessor: an alias for `Reg`"] +pub type DMA_INT_ERROR_STATUS = crate::Reg; #[doc = "DMA_IntErrorStatus."] pub mod dma_int_error_status; -#[doc = "DMA_IntErrClr register accessor: an alias for `Reg`"] -pub type DMA_INTERRCLR = crate::Reg; +#[doc = "DMA_IntErrClr (rw) register accessor: an alias for `Reg`"] +pub type DMA_INT_ERR_CLR = crate::Reg; #[doc = "DMA_IntErrClr."] pub mod dma_int_err_clr; -#[doc = "DMA_RawIntTCStatus register accessor: an alias for `Reg`"] -pub type DMA_RAWINTTCSTATUS = crate::Reg; +#[doc = "DMA_RawIntTCStatus (rw) register accessor: an alias for `Reg`"] +pub type DMA_RAW_INT_TCSTATUS = crate::Reg; #[doc = "DMA_RawIntTCStatus."] pub mod dma_raw_int_tcstatus; -#[doc = "DMA_RawIntErrorStatus register accessor: an alias for `Reg`"] -pub type DMA_RAWINTERRORSTATUS = crate::Reg; +#[doc = "DMA_RawIntErrorStatus (rw) register accessor: an alias for `Reg`"] +pub type DMA_RAW_INT_ERROR_STATUS = + crate::Reg; #[doc = "DMA_RawIntErrorStatus."] pub mod dma_raw_int_error_status; -#[doc = "DMA_EnbldChns register accessor: an alias for `Reg`"] -pub type DMA_ENBLDCHNS = crate::Reg; +#[doc = "DMA_EnbldChns (rw) register accessor: an alias for `Reg`"] +pub type DMA_ENBLD_CHNS = crate::Reg; #[doc = "DMA_EnbldChns."] pub mod dma_enbld_chns; -#[doc = "DMA_SoftBReq register accessor: an alias for `Reg`"] -pub type DMA_SOFTBREQ = crate::Reg; +#[doc = "DMA_SoftBReq (rw) register accessor: an alias for `Reg`"] +pub type DMA_SOFT_BREQ = crate::Reg; #[doc = "DMA_SoftBReq."] pub mod dma_soft_breq; -#[doc = "DMA_SoftSReq register accessor: an alias for `Reg`"] -pub type DMA_SOFTSREQ = crate::Reg; +#[doc = "DMA_SoftSReq (rw) register accessor: an alias for `Reg`"] +pub type DMA_SOFT_SREQ = crate::Reg; #[doc = "DMA_SoftSReq."] pub mod dma_soft_sreq; -#[doc = "DMA_SoftLBReq register accessor: an alias for `Reg`"] -pub type DMA_SOFTLBREQ = crate::Reg; +#[doc = "DMA_SoftLBReq (rw) register accessor: an alias for `Reg`"] +pub type DMA_SOFT_LBREQ = crate::Reg; #[doc = "DMA_SoftLBReq."] pub mod dma_soft_lbreq; -#[doc = "DMA_SoftLSReq register accessor: an alias for `Reg`"] -pub type DMA_SOFTLSREQ = crate::Reg; +#[doc = "DMA_SoftLSReq (rw) register accessor: an alias for `Reg`"] +pub type DMA_SOFT_LSREQ = crate::Reg; #[doc = "DMA_SoftLSReq."] pub mod dma_soft_lsreq; -#[doc = "DMA_Top_Config register accessor: an alias for `Reg`"] +#[doc = "DMA_Top_Config (rw) register accessor: an alias for `Reg`"] pub type DMA_TOP_CONFIG = crate::Reg; #[doc = "DMA_Top_Config."] pub mod dma_top_config; -#[doc = "DMA_Sync register accessor: an alias for `Reg`"] +#[doc = "DMA_Sync (rw) register accessor: an alias for `Reg`"] pub type DMA_SYNC = crate::Reg; #[doc = "DMA_Sync."] pub mod dma_sync; -#[doc = "DMA_C0SrcAddr register accessor: an alias for `Reg`"] -pub type DMA_C0SRCADDR = crate::Reg; +#[doc = "DMA_C0SrcAddr (rw) register accessor: an alias for `Reg`"] +pub type DMA_C0SRC_ADDR = crate::Reg; #[doc = "DMA_C0SrcAddr."] pub mod dma_c0src_addr; -#[doc = "DMA_C0DstAddr register accessor: an alias for `Reg`"] -pub type DMA_C0DSTADDR = crate::Reg; +#[doc = "DMA_C0DstAddr (rw) register accessor: an alias for `Reg`"] +pub type DMA_C0DST_ADDR = crate::Reg; #[doc = "DMA_C0DstAddr."] pub mod dma_c0dst_addr; -#[doc = "DMA_C0LLI register accessor: an alias for `Reg`"] +#[doc = "DMA_C0LLI (rw) register accessor: an alias for `Reg`"] pub type DMA_C0LLI = crate::Reg; #[doc = "DMA_C0LLI."] pub mod dma_c0lli; -#[doc = "DMA_C0Control register accessor: an alias for `Reg`"] +#[doc = "DMA_C0Control (rw) register accessor: an alias for `Reg`"] pub type DMA_C0CONTROL = crate::Reg; #[doc = "DMA_C0Control."] pub mod dma_c0control; -#[doc = "DMA_C0Config register accessor: an alias for `Reg`"] +#[doc = "DMA_C0Config (rw) register accessor: an alias for `Reg`"] pub type DMA_C0CONFIG = crate::Reg; #[doc = "DMA_C0Config."] pub mod dma_c0config; -#[doc = "DMA_C1SrcAddr register accessor: an alias for `Reg`"] -pub type DMA_C1SRCADDR = crate::Reg; +#[doc = "DMA_C1SrcAddr (rw) register accessor: an alias for `Reg`"] +pub type DMA_C1SRC_ADDR = crate::Reg; #[doc = "DMA_C1SrcAddr."] pub mod dma_c1src_addr; -#[doc = "DMA_C1DstAddr register accessor: an alias for `Reg`"] -pub type DMA_C1DSTADDR = crate::Reg; +#[doc = "DMA_C1DstAddr (rw) register accessor: an alias for `Reg`"] +pub type DMA_C1DST_ADDR = crate::Reg; #[doc = "DMA_C1DstAddr."] pub mod dma_c1dst_addr; -#[doc = "DMA_C1LLI register accessor: an alias for `Reg`"] +#[doc = "DMA_C1LLI (rw) register accessor: an alias for `Reg`"] pub type DMA_C1LLI = crate::Reg; #[doc = "DMA_C1LLI."] pub mod dma_c1lli; -#[doc = "DMA_C1Control register accessor: an alias for `Reg`"] +#[doc = "DMA_C1Control (rw) register accessor: an alias for `Reg`"] pub type DMA_C1CONTROL = crate::Reg; #[doc = "DMA_C1Control."] pub mod dma_c1control; -#[doc = "DMA_C1Config register accessor: an alias for `Reg`"] +#[doc = "DMA_C1Config (rw) register accessor: an alias for `Reg`"] pub type DMA_C1CONFIG = crate::Reg; #[doc = "DMA_C1Config."] pub mod dma_c1config; -#[doc = "DMA_C2SrcAddr register accessor: an alias for `Reg`"] -pub type DMA_C2SRCADDR = crate::Reg; +#[doc = "DMA_C2SrcAddr (rw) register accessor: an alias for `Reg`"] +pub type DMA_C2SRC_ADDR = crate::Reg; #[doc = "DMA_C2SrcAddr."] pub mod dma_c2src_addr; -#[doc = "DMA_C2DstAddr register accessor: an alias for `Reg`"] -pub type DMA_C2DSTADDR = crate::Reg; +#[doc = "DMA_C2DstAddr (rw) register accessor: an alias for `Reg`"] +pub type DMA_C2DST_ADDR = crate::Reg; #[doc = "DMA_C2DstAddr."] pub mod dma_c2dst_addr; -#[doc = "DMA_C2LLI register accessor: an alias for `Reg`"] +#[doc = "DMA_C2LLI (rw) register accessor: an alias for `Reg`"] pub type DMA_C2LLI = crate::Reg; #[doc = "DMA_C2LLI."] pub mod dma_c2lli; -#[doc = "DMA_C2Control register accessor: an alias for `Reg`"] +#[doc = "DMA_C2Control (rw) register accessor: an alias for `Reg`"] pub type DMA_C2CONTROL = crate::Reg; #[doc = "DMA_C2Control."] pub mod dma_c2control; -#[doc = "DMA_C2Config register accessor: an alias for `Reg`"] +#[doc = "DMA_C2Config (rw) register accessor: an alias for `Reg`"] pub type DMA_C2CONFIG = crate::Reg; #[doc = "DMA_C2Config."] pub mod dma_c2config; -#[doc = "DMA_C3SrcAddr register accessor: an alias for `Reg`"] -pub type DMA_C3SRCADDR = crate::Reg; +#[doc = "DMA_C3SrcAddr (rw) register accessor: an alias for `Reg`"] +pub type DMA_C3SRC_ADDR = crate::Reg; #[doc = "DMA_C3SrcAddr."] pub mod dma_c3src_addr; -#[doc = "DMA_C3DstAddr register accessor: an alias for `Reg`"] -pub type DMA_C3DSTADDR = crate::Reg; +#[doc = "DMA_C3DstAddr (rw) register accessor: an alias for `Reg`"] +pub type DMA_C3DST_ADDR = crate::Reg; #[doc = "DMA_C3DstAddr."] pub mod dma_c3dst_addr; -#[doc = "DMA_C3LLI register accessor: an alias for `Reg`"] +#[doc = "DMA_C3LLI (rw) register accessor: an alias for `Reg`"] pub type DMA_C3LLI = crate::Reg; #[doc = "DMA_C3LLI."] pub mod dma_c3lli; -#[doc = "DMA_C3Control register accessor: an alias for `Reg`"] +#[doc = "DMA_C3Control (rw) register accessor: an alias for `Reg`"] pub type DMA_C3CONTROL = crate::Reg; #[doc = "DMA_C3Control."] pub mod dma_c3control; -#[doc = "DMA_C3Config register accessor: an alias for `Reg`"] +#[doc = "DMA_C3Config (rw) register accessor: an alias for `Reg`"] pub type DMA_C3CONFIG = crate::Reg; #[doc = "DMA_C3Config."] pub mod dma_c3config; diff --git a/src/dma/dma_c0config.rs b/src/dma/dma_c0config.rs index 50df0de..6c06736 100644 --- a/src/dma/dma_c0config.rs +++ b/src/dma/dma_c0config.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,391 +28,154 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `LLICounter` reader - "] -pub struct LLICOUNTER_R(crate::FieldReader); -impl LLICOUNTER_R { - pub(crate) fn new(bits: u16) -> Self { - LLICOUNTER_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LLICOUNTER_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `H` reader - "] -pub struct H_R(crate::FieldReader); -impl H_R { - pub(crate) fn new(bits: bool) -> Self { - H_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for H_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `H` writer - "] -pub struct H_W<'a> { - w: &'a mut W, -} -impl<'a> H_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18); - self.w - } -} -#[doc = "Field `A` reader - "] -pub struct A_R(crate::FieldReader); -impl A_R { - pub(crate) fn new(bits: bool) -> Self { - A_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for A_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `L` reader - "] -pub struct L_R(crate::FieldReader); -impl L_R { - pub(crate) fn new(bits: bool) -> Self { - L_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for L_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `L` writer - "] -pub struct L_W<'a> { - w: &'a mut W, -} -impl<'a> L_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `ITC` reader - "] -pub struct ITC_R(crate::FieldReader); -impl ITC_R { - pub(crate) fn new(bits: bool) -> Self { - ITC_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ITC_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ITC` writer - "] -pub struct ITC_W<'a> { - w: &'a mut W, -} -impl<'a> ITC_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15); - self.w - } -} -#[doc = "Field `IE` reader - "] -pub struct IE_R(crate::FieldReader); -impl IE_R { - pub(crate) fn new(bits: bool) -> Self { - IE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for IE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `IE` writer - "] -pub struct IE_W<'a> { - w: &'a mut W, -} -impl<'a> IE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14); - self.w - } -} +#[doc = "Field `E` reader - "] +pub type E_R = crate::BitReader; +#[doc = "Field `E` writer - "] +pub type E_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C0CONFIG_SPEC, bool, O>; +#[doc = "Field `SrcPeripheral` reader - "] +pub type SRC_PERIPHERAL_R = crate::FieldReader; +#[doc = "Field `SrcPeripheral` writer - "] +pub type SRC_PERIPHERAL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DMA_C0CONFIG_SPEC, u8, u8, 5, O>; +#[doc = "Field `DstPeripheral` reader - "] +pub type DST_PERIPHERAL_R = crate::FieldReader; +#[doc = "Field `DstPeripheral` writer - "] +pub type DST_PERIPHERAL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DMA_C0CONFIG_SPEC, u8, u8, 5, O>; #[doc = "Field `FlowCntrl` reader - "] -pub struct FLOWCNTRL_R(crate::FieldReader); -impl FLOWCNTRL_R { - pub(crate) fn new(bits: u8) -> Self { - FLOWCNTRL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for FLOWCNTRL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type FLOW_CNTRL_R = crate::FieldReader; #[doc = "Field `FlowCntrl` writer - "] -pub struct FLOWCNTRL_W<'a> { - w: &'a mut W, -} -impl<'a> FLOWCNTRL_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type FLOW_CNTRL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DMA_C0CONFIG_SPEC, u8, u8, 3, O>; +#[doc = "Field `IE` reader - "] +pub type IE_R = crate::BitReader; +#[doc = "Field `IE` writer - "] +pub type IE_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C0CONFIG_SPEC, bool, O>; +#[doc = "Field `ITC` reader - "] +pub type ITC_R = crate::BitReader; +#[doc = "Field `ITC` writer - "] +pub type ITC_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C0CONFIG_SPEC, bool, O>; +#[doc = "Field `L` reader - "] +pub type L_R = crate::BitReader; +#[doc = "Field `L` writer - "] +pub type L_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C0CONFIG_SPEC, bool, O>; +#[doc = "Field `A` reader - "] +pub type A_R = crate::BitReader; +#[doc = "Field `H` reader - "] +pub type H_R = crate::BitReader; +#[doc = "Field `H` writer - "] +pub type H_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C0CONFIG_SPEC, bool, O>; +#[doc = "Field `LLICounter` reader - "] +pub type LLICOUNTER_R = crate::FieldReader; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 11)) | ((value as u32 & 0x07) << 11); - self.w - } -} -#[doc = "Field `DstPeripheral` reader - "] -pub struct DSTPERIPHERAL_R(crate::FieldReader); -impl DSTPERIPHERAL_R { - pub(crate) fn new(bits: u8) -> Self { - DSTPERIPHERAL_R(crate::FieldReader::new(bits)) + pub fn e(&self) -> E_R { + E_R::new((self.bits & 1) != 0) } -} -impl core::ops::Deref for DSTPERIPHERAL_R { - type Target = crate::FieldReader; + #[doc = "Bits 1:5"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn src_peripheral(&self) -> SRC_PERIPHERAL_R { + SRC_PERIPHERAL_R::new(((self.bits >> 1) & 0x1f) as u8) } -} -#[doc = "Field `DstPeripheral` writer - "] -pub struct DSTPERIPHERAL_W<'a> { - w: &'a mut W, -} -impl<'a> DSTPERIPHERAL_W<'a> { - #[doc = r"Writes raw bits to the field"] + #[doc = "Bits 6:10"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 6)) | ((value as u32 & 0x1f) << 6); - self.w + pub fn dst_peripheral(&self) -> DST_PERIPHERAL_R { + DST_PERIPHERAL_R::new(((self.bits >> 6) & 0x1f) as u8) } -} -#[doc = "Field `SrcPeripheral` reader - "] -pub struct SRCPERIPHERAL_R(crate::FieldReader); -impl SRCPERIPHERAL_R { - pub(crate) fn new(bits: u8) -> Self { - SRCPERIPHERAL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SRCPERIPHERAL_R { - type Target = crate::FieldReader; + #[doc = "Bits 11:13"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn flow_cntrl(&self) -> FLOW_CNTRL_R { + FLOW_CNTRL_R::new(((self.bits >> 11) & 7) as u8) } -} -#[doc = "Field `SrcPeripheral` writer - "] -pub struct SRCPERIPHERAL_W<'a> { - w: &'a mut W, -} -impl<'a> SRCPERIPHERAL_W<'a> { - #[doc = r"Writes raw bits to the field"] + #[doc = "Bit 14"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 1)) | ((value as u32 & 0x1f) << 1); - self.w - } -} -#[doc = "Field `E` reader - "] -pub struct E_R(crate::FieldReader); -impl E_R { - pub(crate) fn new(bits: bool) -> Self { - E_R(crate::FieldReader::new(bits)) + pub fn ie(&self) -> IE_R { + IE_R::new(((self.bits >> 14) & 1) != 0) } -} -impl core::ops::Deref for E_R { - type Target = crate::FieldReader; + #[doc = "Bit 15"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn itc(&self) -> ITC_R { + ITC_R::new(((self.bits >> 15) & 1) != 0) } -} -#[doc = "Field `E` writer - "] -pub struct E_W<'a> { - w: &'a mut W, -} -impl<'a> E_W<'a> { - #[doc = r"Sets the field bit"] + #[doc = "Bit 16"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn l(&self) -> L_R { + L_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = r"Clears the field bit"] + #[doc = "Bit 17"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn a(&self) -> A_R { + A_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = r"Writes raw bits to the field"] + #[doc = "Bit 18"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn h(&self) -> H_R { + H_R::new(((self.bits >> 18) & 1) != 0) } -} -impl R { #[doc = "Bits 20:29"] #[inline(always)] pub fn llicounter(&self) -> LLICOUNTER_R { LLICOUNTER_R::new(((self.bits >> 20) & 0x03ff) as u16) } - #[doc = "Bit 18"] - #[inline(always)] - pub fn h(&self) -> H_R { - H_R::new(((self.bits >> 18) & 0x01) != 0) - } - #[doc = "Bit 17"] - #[inline(always)] - pub fn a(&self) -> A_R { - A_R::new(((self.bits >> 17) & 0x01) != 0) - } - #[doc = "Bit 16"] - #[inline(always)] - pub fn l(&self) -> L_R { - L_R::new(((self.bits >> 16) & 0x01) != 0) - } - #[doc = "Bit 15"] - #[inline(always)] - pub fn itc(&self) -> ITC_R { - ITC_R::new(((self.bits >> 15) & 0x01) != 0) - } - #[doc = "Bit 14"] - #[inline(always)] - pub fn ie(&self) -> IE_R { - IE_R::new(((self.bits >> 14) & 0x01) != 0) - } - #[doc = "Bits 11:13"] - #[inline(always)] - pub fn flow_cntrl(&self) -> FLOWCNTRL_R { - FLOWCNTRL_R::new(((self.bits >> 11) & 0x07) as u8) - } - #[doc = "Bits 6:10"] - #[inline(always)] - pub fn dst_peripheral(&self) -> DSTPERIPHERAL_R { - DSTPERIPHERAL_R::new(((self.bits >> 6) & 0x1f) as u8) - } - #[doc = "Bits 1:5"] - #[inline(always)] - pub fn src_peripheral(&self) -> SRCPERIPHERAL_R { - SRCPERIPHERAL_R::new(((self.bits >> 1) & 0x1f) as u8) - } - #[doc = "Bit 0"] - #[inline(always)] - pub fn e(&self) -> E_R { - E_R::new((self.bits & 0x01) != 0) - } } impl W { - #[doc = "Bit 18"] + #[doc = "Bit 0"] #[inline(always)] - pub fn h(&mut self) -> H_W { - H_W { w: self } + #[must_use] + pub fn e(&mut self) -> E_W<0> { + E_W::new(self) } - #[doc = "Bit 16"] + #[doc = "Bits 1:5"] #[inline(always)] - pub fn l(&mut self) -> L_W { - L_W { w: self } + #[must_use] + pub fn src_peripheral(&mut self) -> SRC_PERIPHERAL_W<1> { + SRC_PERIPHERAL_W::new(self) } - #[doc = "Bit 15"] + #[doc = "Bits 6:10"] #[inline(always)] - pub fn itc(&mut self) -> ITC_W { - ITC_W { w: self } + #[must_use] + pub fn dst_peripheral(&mut self) -> DST_PERIPHERAL_W<6> { + DST_PERIPHERAL_W::new(self) } - #[doc = "Bit 14"] + #[doc = "Bits 11:13"] #[inline(always)] - pub fn ie(&mut self) -> IE_W { - IE_W { w: self } + #[must_use] + pub fn flow_cntrl(&mut self) -> FLOW_CNTRL_W<11> { + FLOW_CNTRL_W::new(self) } - #[doc = "Bits 11:13"] + #[doc = "Bit 14"] #[inline(always)] - pub fn flow_cntrl(&mut self) -> FLOWCNTRL_W { - FLOWCNTRL_W { w: self } + #[must_use] + pub fn ie(&mut self) -> IE_W<14> { + IE_W::new(self) } - #[doc = "Bits 6:10"] + #[doc = "Bit 15"] #[inline(always)] - pub fn dst_peripheral(&mut self) -> DSTPERIPHERAL_W { - DSTPERIPHERAL_W { w: self } + #[must_use] + pub fn itc(&mut self) -> ITC_W<15> { + ITC_W::new(self) } - #[doc = "Bits 1:5"] + #[doc = "Bit 16"] #[inline(always)] - pub fn src_peripheral(&mut self) -> SRCPERIPHERAL_W { - SRCPERIPHERAL_W { w: self } + #[must_use] + pub fn l(&mut self) -> L_W<16> { + L_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 18"] #[inline(always)] - pub fn e(&mut self) -> E_W { - E_W { w: self } + #[must_use] + pub fn h(&mut self) -> H_W<18> { + H_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -429,11 +193,10 @@ impl crate::Readable for DMA_C0CONFIG_SPEC { #[doc = "`write(|w| ..)` method takes [dma_c0config::W](W) writer structure"] impl crate::Writable for DMA_C0CONFIG_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets DMA_C0Config to value 0"] impl crate::Resettable for DMA_C0CONFIG_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/dma/dma_c0control.rs b/src/dma/dma_c0control.rs index 00b5fd8..8745484 100644 --- a/src/dma/dma_c0control.rs +++ b/src/dma/dma_c0control.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,415 +28,168 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `I` reader - "] -pub struct I_R(crate::FieldReader); -impl I_R { - pub(crate) fn new(bits: bool) -> Self { - I_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `I` writer - "] -pub struct I_W<'a> { - w: &'a mut W, -} -impl<'a> I_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 31)) | ((value as u32 & 0x01) << 31); - self.w - } -} -#[doc = "Field `Prot` reader - "] -pub struct PROT_R(crate::FieldReader); -impl PROT_R { - pub(crate) fn new(bits: u8) -> Self { - PROT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PROT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `Prot` writer - "] -pub struct PROT_W<'a> { - w: &'a mut W, -} -impl<'a> PROT_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 28)) | ((value as u32 & 0x07) << 28); - self.w - } -} -#[doc = "Field `DI` reader - "] -pub struct DI_R(crate::FieldReader); -impl DI_R { - pub(crate) fn new(bits: bool) -> Self { - DI_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DI_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `DI` writer - "] -pub struct DI_W<'a> { - w: &'a mut W, -} -impl<'a> DI_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 27)) | ((value as u32 & 0x01) << 27); - self.w - } -} -#[doc = "Field `SI` reader - "] -pub struct SI_R(crate::FieldReader); -impl SI_R { - pub(crate) fn new(bits: bool) -> Self { - SI_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SI_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `SI` writer - "] -pub struct SI_W<'a> { - w: &'a mut W, -} -impl<'a> SI_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 26)) | ((value as u32 & 0x01) << 26); - self.w - } -} -#[doc = "Field `SLargerD` reader - "] -pub struct SLARGERD_R(crate::FieldReader); -impl SLARGERD_R { - pub(crate) fn new(bits: bool) -> Self { - SLARGERD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SLARGERD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `SLargerD` writer - "] -pub struct SLARGERD_W<'a> { - w: &'a mut W, -} -impl<'a> SLARGERD_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24); - self.w - } -} -#[doc = "Field `DWidth` reader - "] -pub struct DWIDTH_R(crate::FieldReader); -impl DWIDTH_R { - pub(crate) fn new(bits: u8) -> Self { - DWIDTH_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DWIDTH_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `DWidth` writer - "] -pub struct DWIDTH_W<'a> { - w: &'a mut W, -} -impl<'a> DWIDTH_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 21)) | ((value as u32 & 0x07) << 21); - self.w - } -} -#[doc = "Field `SWidth` reader - "] -pub struct SWIDTH_R(crate::FieldReader); -impl SWIDTH_R { - pub(crate) fn new(bits: u8) -> Self { - SWIDTH_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SWIDTH_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `SWidth` writer - "] -pub struct SWIDTH_W<'a> { - w: &'a mut W, -} -impl<'a> SWIDTH_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 18)) | ((value as u32 & 0x07) << 18); - self.w - } -} -#[doc = "Field `DBSize` reader - "] -pub struct DBSIZE_R(crate::FieldReader); -impl DBSIZE_R { - pub(crate) fn new(bits: u8) -> Self { - DBSIZE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DBSIZE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `DBSize` writer - "] -pub struct DBSIZE_W<'a> { - w: &'a mut W, -} -impl<'a> DBSIZE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 15)) | ((value as u32 & 0x07) << 15); - self.w - } -} +#[doc = "Field `TransferSize` reader - "] +pub type TRANSFER_SIZE_R = crate::FieldReader; +#[doc = "Field `TransferSize` writer - "] +pub type TRANSFER_SIZE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DMA_C0CONTROL_SPEC, u16, u16, 12, O>; #[doc = "Field `SBSize` reader - "] -pub struct SBSIZE_R(crate::FieldReader); -impl SBSIZE_R { - pub(crate) fn new(bits: u8) -> Self { - SBSIZE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SBSIZE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SBSIZE_R = crate::FieldReader; #[doc = "Field `SBSize` writer - "] -pub struct SBSIZE_W<'a> { - w: &'a mut W, -} -impl<'a> SBSIZE_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type SBSIZE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DMA_C0CONTROL_SPEC, u8, u8, 3, O>; +#[doc = "Field `DBSize` reader - "] +pub type DBSIZE_R = crate::FieldReader; +#[doc = "Field `DBSize` writer - "] +pub type DBSIZE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DMA_C0CONTROL_SPEC, u8, u8, 3, O>; +#[doc = "Field `SWidth` reader - "] +pub type SWIDTH_R = crate::FieldReader; +#[doc = "Field `SWidth` writer - "] +pub type SWIDTH_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DMA_C0CONTROL_SPEC, u8, u8, 3, O>; +#[doc = "Field `DWidth` reader - "] +pub type DWIDTH_R = crate::FieldReader; +#[doc = "Field `DWidth` writer - "] +pub type DWIDTH_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DMA_C0CONTROL_SPEC, u8, u8, 3, O>; +#[doc = "Field `SLargerD` reader - "] +pub type SLARGER_D_R = crate::BitReader; +#[doc = "Field `SLargerD` writer - "] +pub type SLARGER_D_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C0CONTROL_SPEC, bool, O>; +#[doc = "Field `SI` reader - "] +pub type SI_R = crate::BitReader; +#[doc = "Field `SI` writer - "] +pub type SI_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C0CONTROL_SPEC, bool, O>; +#[doc = "Field `DI` reader - "] +pub type DI_R = crate::BitReader; +#[doc = "Field `DI` writer - "] +pub type DI_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C0CONTROL_SPEC, bool, O>; +#[doc = "Field `Prot` reader - "] +pub type PROT_R = crate::FieldReader; +#[doc = "Field `Prot` writer - "] +pub type PROT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DMA_C0CONTROL_SPEC, u8, u8, 3, O>; +#[doc = "Field `I` reader - "] +pub type I_R = crate::BitReader; +#[doc = "Field `I` writer - "] +pub type I_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C0CONTROL_SPEC, bool, O>; +impl R { + #[doc = "Bits 0:11"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 12)) | ((value as u32 & 0x07) << 12); - self.w - } -} -#[doc = "Field `TransferSize` reader - "] -pub struct TRANSFERSIZE_R(crate::FieldReader); -impl TRANSFERSIZE_R { - pub(crate) fn new(bits: u16) -> Self { - TRANSFERSIZE_R(crate::FieldReader::new(bits)) + pub fn transfer_size(&self) -> TRANSFER_SIZE_R { + TRANSFER_SIZE_R::new((self.bits & 0x0fff) as u16) } -} -impl core::ops::Deref for TRANSFERSIZE_R { - type Target = crate::FieldReader; + #[doc = "Bits 12:14"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn sbsize(&self) -> SBSIZE_R { + SBSIZE_R::new(((self.bits >> 12) & 7) as u8) } -} -#[doc = "Field `TransferSize` writer - "] -pub struct TRANSFERSIZE_W<'a> { - w: &'a mut W, -} -impl<'a> TRANSFERSIZE_W<'a> { - #[doc = r"Writes raw bits to the field"] + #[doc = "Bits 15:17"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x0fff) | (value as u32 & 0x0fff); - self.w + pub fn dbsize(&self) -> DBSIZE_R { + DBSIZE_R::new(((self.bits >> 15) & 7) as u8) } -} -impl R { - #[doc = "Bit 31"] + #[doc = "Bits 18:20"] #[inline(always)] - pub fn i(&self) -> I_R { - I_R::new(((self.bits >> 31) & 0x01) != 0) + pub fn swidth(&self) -> SWIDTH_R { + SWIDTH_R::new(((self.bits >> 18) & 7) as u8) } - #[doc = "Bits 28:30"] + #[doc = "Bits 21:23"] #[inline(always)] - pub fn prot(&self) -> PROT_R { - PROT_R::new(((self.bits >> 28) & 0x07) as u8) + pub fn dwidth(&self) -> DWIDTH_R { + DWIDTH_R::new(((self.bits >> 21) & 7) as u8) } - #[doc = "Bit 27"] + #[doc = "Bit 24"] #[inline(always)] - pub fn di(&self) -> DI_R { - DI_R::new(((self.bits >> 27) & 0x01) != 0) + pub fn slarger_d(&self) -> SLARGER_D_R { + SLARGER_D_R::new(((self.bits >> 24) & 1) != 0) } #[doc = "Bit 26"] #[inline(always)] pub fn si(&self) -> SI_R { - SI_R::new(((self.bits >> 26) & 0x01) != 0) - } - #[doc = "Bit 24"] - #[inline(always)] - pub fn slarger_d(&self) -> SLARGERD_R { - SLARGERD_R::new(((self.bits >> 24) & 0x01) != 0) - } - #[doc = "Bits 21:23"] - #[inline(always)] - pub fn dwidth(&self) -> DWIDTH_R { - DWIDTH_R::new(((self.bits >> 21) & 0x07) as u8) - } - #[doc = "Bits 18:20"] - #[inline(always)] - pub fn swidth(&self) -> SWIDTH_R { - SWIDTH_R::new(((self.bits >> 18) & 0x07) as u8) + SI_R::new(((self.bits >> 26) & 1) != 0) } - #[doc = "Bits 15:17"] + #[doc = "Bit 27"] #[inline(always)] - pub fn dbsize(&self) -> DBSIZE_R { - DBSIZE_R::new(((self.bits >> 15) & 0x07) as u8) + pub fn di(&self) -> DI_R { + DI_R::new(((self.bits >> 27) & 1) != 0) } - #[doc = "Bits 12:14"] + #[doc = "Bits 28:30"] #[inline(always)] - pub fn sbsize(&self) -> SBSIZE_R { - SBSIZE_R::new(((self.bits >> 12) & 0x07) as u8) + pub fn prot(&self) -> PROT_R { + PROT_R::new(((self.bits >> 28) & 7) as u8) } - #[doc = "Bits 0:11"] + #[doc = "Bit 31"] #[inline(always)] - pub fn transfer_size(&self) -> TRANSFERSIZE_R { - TRANSFERSIZE_R::new((self.bits & 0x0fff) as u16) + pub fn i(&self) -> I_R { + I_R::new(((self.bits >> 31) & 1) != 0) } } impl W { - #[doc = "Bit 31"] + #[doc = "Bits 0:11"] #[inline(always)] - pub fn i(&mut self) -> I_W { - I_W { w: self } + #[must_use] + pub fn transfer_size(&mut self) -> TRANSFER_SIZE_W<0> { + TRANSFER_SIZE_W::new(self) } - #[doc = "Bits 28:30"] + #[doc = "Bits 12:14"] #[inline(always)] - pub fn prot(&mut self) -> PROT_W { - PROT_W { w: self } + #[must_use] + pub fn sbsize(&mut self) -> SBSIZE_W<12> { + SBSIZE_W::new(self) } - #[doc = "Bit 27"] + #[doc = "Bits 15:17"] #[inline(always)] - pub fn di(&mut self) -> DI_W { - DI_W { w: self } + #[must_use] + pub fn dbsize(&mut self) -> DBSIZE_W<15> { + DBSIZE_W::new(self) } - #[doc = "Bit 26"] + #[doc = "Bits 18:20"] #[inline(always)] - pub fn si(&mut self) -> SI_W { - SI_W { w: self } + #[must_use] + pub fn swidth(&mut self) -> SWIDTH_W<18> { + SWIDTH_W::new(self) } - #[doc = "Bit 24"] + #[doc = "Bits 21:23"] #[inline(always)] - pub fn slarger_d(&mut self) -> SLARGERD_W { - SLARGERD_W { w: self } + #[must_use] + pub fn dwidth(&mut self) -> DWIDTH_W<21> { + DWIDTH_W::new(self) } - #[doc = "Bits 21:23"] + #[doc = "Bit 24"] #[inline(always)] - pub fn dwidth(&mut self) -> DWIDTH_W { - DWIDTH_W { w: self } + #[must_use] + pub fn slarger_d(&mut self) -> SLARGER_D_W<24> { + SLARGER_D_W::new(self) } - #[doc = "Bits 18:20"] + #[doc = "Bit 26"] #[inline(always)] - pub fn swidth(&mut self) -> SWIDTH_W { - SWIDTH_W { w: self } + #[must_use] + pub fn si(&mut self) -> SI_W<26> { + SI_W::new(self) } - #[doc = "Bits 15:17"] + #[doc = "Bit 27"] #[inline(always)] - pub fn dbsize(&mut self) -> DBSIZE_W { - DBSIZE_W { w: self } + #[must_use] + pub fn di(&mut self) -> DI_W<27> { + DI_W::new(self) } - #[doc = "Bits 12:14"] + #[doc = "Bits 28:30"] #[inline(always)] - pub fn sbsize(&mut self) -> SBSIZE_W { - SBSIZE_W { w: self } + #[must_use] + pub fn prot(&mut self) -> PROT_W<28> { + PROT_W::new(self) } - #[doc = "Bits 0:11"] + #[doc = "Bit 31"] #[inline(always)] - pub fn transfer_size(&mut self) -> TRANSFERSIZE_W { - TRANSFERSIZE_W { w: self } + #[must_use] + pub fn i(&mut self) -> I_W<31> { + I_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -453,11 +207,10 @@ impl crate::Readable for DMA_C0CONTROL_SPEC { #[doc = "`write(|w| ..)` method takes [dma_c0control::W](W) writer structure"] impl crate::Writable for DMA_C0CONTROL_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets DMA_C0Control to value 0x0c48_9000"] impl crate::Resettable for DMA_C0CONTROL_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0c48_9000 - } + const RESET_VALUE: Self::Ux = 0x0c48_9000; } diff --git a/src/dma/dma_c0dst_addr.rs b/src/dma/dma_c0dst_addr.rs index 1b99743..9cdfa5f 100644 --- a/src/dma/dma_c0dst_addr.rs +++ b/src/dma/dma_c0dst_addr.rs @@ -1,21 +1,22 @@ #[doc = "Register `DMA_C0DstAddr` reader"] -pub struct R(crate::R); +pub struct R(crate::R); impl core::ops::Deref for R { - type Target = crate::R; + type Target = crate::R; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } -impl core::convert::From> for R { - fn from(reader: crate::R) -> Self { +impl From> for R { + #[inline(always)] + fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Register `DMA_C0DstAddr` writer"] -pub struct W(crate::W); +pub struct W(crate::W); impl core::ops::Deref for W { - type Target = crate::W; + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 @@ -27,73 +28,54 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { - fn from(writer: crate::W) -> Self { +impl From> for W { + #[inline(always)] + fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `DstAddr` reader - "] -pub struct DSTADDR_R(crate::FieldReader); -impl DSTADDR_R { - pub(crate) fn new(bits: u32) -> Self { - DSTADDR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DSTADDR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type DST_ADDR_R = crate::FieldReader; #[doc = "Field `DstAddr` writer - "] -pub struct DSTADDR_W<'a> { - w: &'a mut W, -} -impl<'a> DSTADDR_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type DST_ADDR_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DMA_C0DST_ADDR_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] - pub fn dst_addr(&self) -> DSTADDR_R { - DSTADDR_R::new((self.bits & 0xffff_ffff) as u32) + pub fn dst_addr(&self) -> DST_ADDR_R { + DST_ADDR_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn dst_addr(&mut self) -> DSTADDR_W { - DSTADDR_W { w: self } + #[must_use] + pub fn dst_addr(&mut self) -> DST_ADDR_W<0> { + DST_ADDR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self } } #[doc = "DMA_C0DstAddr.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dma_c0dst_addr](index.html) module"] -pub struct DMA_C0DSTADDR_SPEC; -impl crate::RegisterSpec for DMA_C0DSTADDR_SPEC { +pub struct DMA_C0DST_ADDR_SPEC; +impl crate::RegisterSpec for DMA_C0DST_ADDR_SPEC { type Ux = u32; } #[doc = "`read()` method returns [dma_c0dst_addr::R](R) reader structure"] -impl crate::Readable for DMA_C0DSTADDR_SPEC { +impl crate::Readable for DMA_C0DST_ADDR_SPEC { type Reader = R; } #[doc = "`write(|w| ..)` method takes [dma_c0dst_addr::W](W) writer structure"] -impl crate::Writable for DMA_C0DSTADDR_SPEC { +impl crate::Writable for DMA_C0DST_ADDR_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets DMA_C0DstAddr to value 0"] -impl crate::Resettable for DMA_C0DSTADDR_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } +impl crate::Resettable for DMA_C0DST_ADDR_SPEC { + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/dma/dma_c0lli.rs b/src/dma/dma_c0lli.rs index f276add..47c63ed 100644 --- a/src/dma/dma_c0lli.rs +++ b/src/dma/dma_c0lli.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,32 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `LLI` reader - "] -pub struct LLI_R(crate::FieldReader); -impl LLI_R { - pub(crate) fn new(bits: u32) -> Self { - LLI_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LLI_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type LLI_R = crate::FieldReader; #[doc = "Field `LLI` writer - "] -pub struct LLI_W<'a> { - w: &'a mut W, -} -impl<'a> LLI_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type LLI_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DMA_C0LLI_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn lli(&self) -> LLI_R { - LLI_R::new((self.bits & 0xffff_ffff) as u32) + LLI_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn lli(&mut self) -> LLI_W { - LLI_W { w: self } + #[must_use] + pub fn lli(&mut self) -> LLI_W<0> { + LLI_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +71,10 @@ impl crate::Readable for DMA_C0LLI_SPEC { #[doc = "`write(|w| ..)` method takes [dma_c0lli::W](W) writer structure"] impl crate::Writable for DMA_C0LLI_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets DMA_C0LLI to value 0"] impl crate::Resettable for DMA_C0LLI_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/dma/dma_c0src_addr.rs b/src/dma/dma_c0src_addr.rs index 4affae2..f35d369 100644 --- a/src/dma/dma_c0src_addr.rs +++ b/src/dma/dma_c0src_addr.rs @@ -1,21 +1,22 @@ #[doc = "Register `DMA_C0SrcAddr` reader"] -pub struct R(crate::R); +pub struct R(crate::R); impl core::ops::Deref for R { - type Target = crate::R; + type Target = crate::R; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } -impl core::convert::From> for R { - fn from(reader: crate::R) -> Self { +impl From> for R { + #[inline(always)] + fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Register `DMA_C0SrcAddr` writer"] -pub struct W(crate::W); +pub struct W(crate::W); impl core::ops::Deref for W { - type Target = crate::W; + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 @@ -27,73 +28,54 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { - fn from(writer: crate::W) -> Self { +impl From> for W { + #[inline(always)] + fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `SrcAddr` reader - "] -pub struct SRCADDR_R(crate::FieldReader); -impl SRCADDR_R { - pub(crate) fn new(bits: u32) -> Self { - SRCADDR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SRCADDR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SRC_ADDR_R = crate::FieldReader; #[doc = "Field `SrcAddr` writer - "] -pub struct SRCADDR_W<'a> { - w: &'a mut W, -} -impl<'a> SRCADDR_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SRC_ADDR_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DMA_C0SRC_ADDR_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] - pub fn src_addr(&self) -> SRCADDR_R { - SRCADDR_R::new((self.bits & 0xffff_ffff) as u32) + pub fn src_addr(&self) -> SRC_ADDR_R { + SRC_ADDR_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn src_addr(&mut self) -> SRCADDR_W { - SRCADDR_W { w: self } + #[must_use] + pub fn src_addr(&mut self) -> SRC_ADDR_W<0> { + SRC_ADDR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self } } #[doc = "DMA_C0SrcAddr.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dma_c0src_addr](index.html) module"] -pub struct DMA_C0SRCADDR_SPEC; -impl crate::RegisterSpec for DMA_C0SRCADDR_SPEC { +pub struct DMA_C0SRC_ADDR_SPEC; +impl crate::RegisterSpec for DMA_C0SRC_ADDR_SPEC { type Ux = u32; } #[doc = "`read()` method returns [dma_c0src_addr::R](R) reader structure"] -impl crate::Readable for DMA_C0SRCADDR_SPEC { +impl crate::Readable for DMA_C0SRC_ADDR_SPEC { type Reader = R; } #[doc = "`write(|w| ..)` method takes [dma_c0src_addr::W](W) writer structure"] -impl crate::Writable for DMA_C0SRCADDR_SPEC { +impl crate::Writable for DMA_C0SRC_ADDR_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets DMA_C0SrcAddr to value 0"] -impl crate::Resettable for DMA_C0SRCADDR_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } +impl crate::Resettable for DMA_C0SRC_ADDR_SPEC { + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/dma/dma_c1config.rs b/src/dma/dma_c1config.rs index 636500c..502152d 100644 --- a/src/dma/dma_c1config.rs +++ b/src/dma/dma_c1config.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,372 +28,147 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `H` reader - "] -pub struct H_R(crate::FieldReader); -impl H_R { - pub(crate) fn new(bits: bool) -> Self { - H_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for H_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `H` writer - "] -pub struct H_W<'a> { - w: &'a mut W, -} -impl<'a> H_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18); - self.w - } -} -#[doc = "Field `A` reader - "] -pub struct A_R(crate::FieldReader); -impl A_R { - pub(crate) fn new(bits: bool) -> Self { - A_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for A_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `L` reader - "] -pub struct L_R(crate::FieldReader); -impl L_R { - pub(crate) fn new(bits: bool) -> Self { - L_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for L_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `L` writer - "] -pub struct L_W<'a> { - w: &'a mut W, -} -impl<'a> L_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `ITC` reader - "] -pub struct ITC_R(crate::FieldReader); -impl ITC_R { - pub(crate) fn new(bits: bool) -> Self { - ITC_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ITC_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ITC` writer - "] -pub struct ITC_W<'a> { - w: &'a mut W, -} -impl<'a> ITC_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15); - self.w - } -} -#[doc = "Field `IE` reader - "] -pub struct IE_R(crate::FieldReader); -impl IE_R { - pub(crate) fn new(bits: bool) -> Self { - IE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for IE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `IE` writer - "] -pub struct IE_W<'a> { - w: &'a mut W, -} -impl<'a> IE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14); - self.w - } -} -#[doc = "Field `FlowCntrl` reader - "] -pub struct FLOWCNTRL_R(crate::FieldReader); -impl FLOWCNTRL_R { - pub(crate) fn new(bits: u8) -> Self { - FLOWCNTRL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for FLOWCNTRL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `FlowCntrl` writer - "] -pub struct FLOWCNTRL_W<'a> { - w: &'a mut W, -} -impl<'a> FLOWCNTRL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 11)) | ((value as u32 & 0x07) << 11); - self.w - } -} -#[doc = "Field `DstPeripheral` reader - "] -pub struct DSTPERIPHERAL_R(crate::FieldReader); -impl DSTPERIPHERAL_R { - pub(crate) fn new(bits: u8) -> Self { - DSTPERIPHERAL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DSTPERIPHERAL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `DstPeripheral` writer - "] -pub struct DSTPERIPHERAL_W<'a> { - w: &'a mut W, -} -impl<'a> DSTPERIPHERAL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 6)) | ((value as u32 & 0x1f) << 6); - self.w - } -} -#[doc = "Field `SrcPeripheral` reader - "] -pub struct SRCPERIPHERAL_R(crate::FieldReader); -impl SRCPERIPHERAL_R { - pub(crate) fn new(bits: u8) -> Self { - SRCPERIPHERAL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SRCPERIPHERAL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `SrcPeripheral` writer - "] -pub struct SRCPERIPHERAL_W<'a> { - w: &'a mut W, -} -impl<'a> SRCPERIPHERAL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 1)) | ((value as u32 & 0x1f) << 1); - self.w - } -} #[doc = "Field `E` reader - "] -pub struct E_R(crate::FieldReader); -impl E_R { - pub(crate) fn new(bits: bool) -> Self { - E_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for E_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type E_R = crate::BitReader; #[doc = "Field `E` writer - "] -pub struct E_W<'a> { - w: &'a mut W, -} -impl<'a> E_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type E_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C1CONFIG_SPEC, bool, O>; +#[doc = "Field `SrcPeripheral` reader - "] +pub type SRC_PERIPHERAL_R = crate::FieldReader; +#[doc = "Field `SrcPeripheral` writer - "] +pub type SRC_PERIPHERAL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DMA_C1CONFIG_SPEC, u8, u8, 5, O>; +#[doc = "Field `DstPeripheral` reader - "] +pub type DST_PERIPHERAL_R = crate::FieldReader; +#[doc = "Field `DstPeripheral` writer - "] +pub type DST_PERIPHERAL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DMA_C1CONFIG_SPEC, u8, u8, 5, O>; +#[doc = "Field `FlowCntrl` reader - "] +pub type FLOW_CNTRL_R = crate::FieldReader; +#[doc = "Field `FlowCntrl` writer - "] +pub type FLOW_CNTRL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DMA_C1CONFIG_SPEC, u8, u8, 3, O>; +#[doc = "Field `IE` reader - "] +pub type IE_R = crate::BitReader; +#[doc = "Field `IE` writer - "] +pub type IE_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C1CONFIG_SPEC, bool, O>; +#[doc = "Field `ITC` reader - "] +pub type ITC_R = crate::BitReader; +#[doc = "Field `ITC` writer - "] +pub type ITC_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C1CONFIG_SPEC, bool, O>; +#[doc = "Field `L` reader - "] +pub type L_R = crate::BitReader; +#[doc = "Field `L` writer - "] +pub type L_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C1CONFIG_SPEC, bool, O>; +#[doc = "Field `A` reader - "] +pub type A_R = crate::BitReader; +#[doc = "Field `H` reader - "] +pub type H_R = crate::BitReader; +#[doc = "Field `H` writer - "] +pub type H_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C1CONFIG_SPEC, bool, O>; impl R { - #[doc = "Bit 18"] + #[doc = "Bit 0"] #[inline(always)] - pub fn h(&self) -> H_R { - H_R::new(((self.bits >> 18) & 0x01) != 0) + pub fn e(&self) -> E_R { + E_R::new((self.bits & 1) != 0) } - #[doc = "Bit 17"] + #[doc = "Bits 1:5"] #[inline(always)] - pub fn a(&self) -> A_R { - A_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn src_peripheral(&self) -> SRC_PERIPHERAL_R { + SRC_PERIPHERAL_R::new(((self.bits >> 1) & 0x1f) as u8) } - #[doc = "Bit 16"] + #[doc = "Bits 6:10"] #[inline(always)] - pub fn l(&self) -> L_R { - L_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn dst_peripheral(&self) -> DST_PERIPHERAL_R { + DST_PERIPHERAL_R::new(((self.bits >> 6) & 0x1f) as u8) } - #[doc = "Bit 15"] + #[doc = "Bits 11:13"] #[inline(always)] - pub fn itc(&self) -> ITC_R { - ITC_R::new(((self.bits >> 15) & 0x01) != 0) + pub fn flow_cntrl(&self) -> FLOW_CNTRL_R { + FLOW_CNTRL_R::new(((self.bits >> 11) & 7) as u8) } #[doc = "Bit 14"] #[inline(always)] pub fn ie(&self) -> IE_R { - IE_R::new(((self.bits >> 14) & 0x01) != 0) + IE_R::new(((self.bits >> 14) & 1) != 0) } - #[doc = "Bits 11:13"] + #[doc = "Bit 15"] #[inline(always)] - pub fn flow_cntrl(&self) -> FLOWCNTRL_R { - FLOWCNTRL_R::new(((self.bits >> 11) & 0x07) as u8) + pub fn itc(&self) -> ITC_R { + ITC_R::new(((self.bits >> 15) & 1) != 0) } - #[doc = "Bits 6:10"] + #[doc = "Bit 16"] #[inline(always)] - pub fn dst_peripheral(&self) -> DSTPERIPHERAL_R { - DSTPERIPHERAL_R::new(((self.bits >> 6) & 0x1f) as u8) + pub fn l(&self) -> L_R { + L_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bits 1:5"] + #[doc = "Bit 17"] #[inline(always)] - pub fn src_peripheral(&self) -> SRCPERIPHERAL_R { - SRCPERIPHERAL_R::new(((self.bits >> 1) & 0x1f) as u8) + pub fn a(&self) -> A_R { + A_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 18"] #[inline(always)] - pub fn e(&self) -> E_R { - E_R::new((self.bits & 0x01) != 0) + pub fn h(&self) -> H_R { + H_R::new(((self.bits >> 18) & 1) != 0) } } impl W { - #[doc = "Bit 18"] + #[doc = "Bit 0"] #[inline(always)] - pub fn h(&mut self) -> H_W { - H_W { w: self } + #[must_use] + pub fn e(&mut self) -> E_W<0> { + E_W::new(self) } - #[doc = "Bit 16"] + #[doc = "Bits 1:5"] #[inline(always)] - pub fn l(&mut self) -> L_W { - L_W { w: self } + #[must_use] + pub fn src_peripheral(&mut self) -> SRC_PERIPHERAL_W<1> { + SRC_PERIPHERAL_W::new(self) } - #[doc = "Bit 15"] + #[doc = "Bits 6:10"] #[inline(always)] - pub fn itc(&mut self) -> ITC_W { - ITC_W { w: self } + #[must_use] + pub fn dst_peripheral(&mut self) -> DST_PERIPHERAL_W<6> { + DST_PERIPHERAL_W::new(self) } - #[doc = "Bit 14"] + #[doc = "Bits 11:13"] #[inline(always)] - pub fn ie(&mut self) -> IE_W { - IE_W { w: self } + #[must_use] + pub fn flow_cntrl(&mut self) -> FLOW_CNTRL_W<11> { + FLOW_CNTRL_W::new(self) } - #[doc = "Bits 11:13"] + #[doc = "Bit 14"] #[inline(always)] - pub fn flow_cntrl(&mut self) -> FLOWCNTRL_W { - FLOWCNTRL_W { w: self } + #[must_use] + pub fn ie(&mut self) -> IE_W<14> { + IE_W::new(self) } - #[doc = "Bits 6:10"] + #[doc = "Bit 15"] #[inline(always)] - pub fn dst_peripheral(&mut self) -> DSTPERIPHERAL_W { - DSTPERIPHERAL_W { w: self } + #[must_use] + pub fn itc(&mut self) -> ITC_W<15> { + ITC_W::new(self) } - #[doc = "Bits 1:5"] + #[doc = "Bit 16"] #[inline(always)] - pub fn src_peripheral(&mut self) -> SRCPERIPHERAL_W { - SRCPERIPHERAL_W { w: self } + #[must_use] + pub fn l(&mut self) -> L_W<16> { + L_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 18"] #[inline(always)] - pub fn e(&mut self) -> E_W { - E_W { w: self } + #[must_use] + pub fn h(&mut self) -> H_W<18> { + H_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -410,11 +186,10 @@ impl crate::Readable for DMA_C1CONFIG_SPEC { #[doc = "`write(|w| ..)` method takes [dma_c1config::W](W) writer structure"] impl crate::Writable for DMA_C1CONFIG_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets DMA_C1Config to value 0"] impl crate::Resettable for DMA_C1CONFIG_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/dma/dma_c1control.rs b/src/dma/dma_c1control.rs index 6e8de5e..36c0605 100644 --- a/src/dma/dma_c1control.rs +++ b/src/dma/dma_c1control.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,369 +28,153 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `I` reader - "] -pub struct I_R(crate::FieldReader); -impl I_R { - pub(crate) fn new(bits: bool) -> Self { - I_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `I` writer - "] -pub struct I_W<'a> { - w: &'a mut W, -} -impl<'a> I_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 31)) | ((value as u32 & 0x01) << 31); - self.w - } -} -#[doc = "Field `Prot` reader - "] -pub struct PROT_R(crate::FieldReader); -impl PROT_R { - pub(crate) fn new(bits: u8) -> Self { - PROT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PROT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `Prot` writer - "] -pub struct PROT_W<'a> { - w: &'a mut W, -} -impl<'a> PROT_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 28)) | ((value as u32 & 0x07) << 28); - self.w - } -} -#[doc = "Field `DI` reader - "] -pub struct DI_R(crate::FieldReader); -impl DI_R { - pub(crate) fn new(bits: bool) -> Self { - DI_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DI_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `DI` writer - "] -pub struct DI_W<'a> { - w: &'a mut W, -} -impl<'a> DI_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 27)) | ((value as u32 & 0x01) << 27); - self.w - } -} -#[doc = "Field `SI` reader - "] -pub struct SI_R(crate::FieldReader); -impl SI_R { - pub(crate) fn new(bits: bool) -> Self { - SI_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SI_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `SI` writer - "] -pub struct SI_W<'a> { - w: &'a mut W, -} -impl<'a> SI_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 26)) | ((value as u32 & 0x01) << 26); - self.w - } -} -#[doc = "Field `DWidth` reader - "] -pub struct DWIDTH_R(crate::FieldReader); -impl DWIDTH_R { - pub(crate) fn new(bits: u8) -> Self { - DWIDTH_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DWIDTH_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `DWidth` writer - "] -pub struct DWIDTH_W<'a> { - w: &'a mut W, -} -impl<'a> DWIDTH_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 21)) | ((value as u32 & 0x07) << 21); - self.w - } -} -#[doc = "Field `SWidth` reader - "] -pub struct SWIDTH_R(crate::FieldReader); -impl SWIDTH_R { - pub(crate) fn new(bits: u8) -> Self { - SWIDTH_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SWIDTH_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `SWidth` writer - "] -pub struct SWIDTH_W<'a> { - w: &'a mut W, -} -impl<'a> SWIDTH_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 18)) | ((value as u32 & 0x07) << 18); - self.w - } -} -#[doc = "Field `DBSize` reader - "] -pub struct DBSIZE_R(crate::FieldReader); -impl DBSIZE_R { - pub(crate) fn new(bits: u8) -> Self { - DBSIZE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DBSIZE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `DBSize` writer - "] -pub struct DBSIZE_W<'a> { - w: &'a mut W, -} -impl<'a> DBSIZE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 15)) | ((value as u32 & 0x07) << 15); - self.w - } -} -#[doc = "Field `SBSize` reader - "] -pub struct SBSIZE_R(crate::FieldReader); -impl SBSIZE_R { - pub(crate) fn new(bits: u8) -> Self { - SBSIZE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SBSIZE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `SBSize` writer - "] -pub struct SBSIZE_W<'a> { - w: &'a mut W, -} -impl<'a> SBSIZE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 12)) | ((value as u32 & 0x07) << 12); - self.w - } -} #[doc = "Field `TransferSize` reader - "] -pub struct TRANSFERSIZE_R(crate::FieldReader); -impl TRANSFERSIZE_R { - pub(crate) fn new(bits: u16) -> Self { - TRANSFERSIZE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TRANSFERSIZE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TRANSFER_SIZE_R = crate::FieldReader; #[doc = "Field `TransferSize` writer - "] -pub struct TRANSFERSIZE_W<'a> { - w: &'a mut W, -} -impl<'a> TRANSFERSIZE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x0fff) | (value as u32 & 0x0fff); - self.w - } -} +pub type TRANSFER_SIZE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DMA_C1CONTROL_SPEC, u16, u16, 12, O>; +#[doc = "Field `SBSize` reader - "] +pub type SBSIZE_R = crate::FieldReader; +#[doc = "Field `SBSize` writer - "] +pub type SBSIZE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DMA_C1CONTROL_SPEC, u8, u8, 3, O>; +#[doc = "Field `DBSize` reader - "] +pub type DBSIZE_R = crate::FieldReader; +#[doc = "Field `DBSize` writer - "] +pub type DBSIZE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DMA_C1CONTROL_SPEC, u8, u8, 3, O>; +#[doc = "Field `SWidth` reader - "] +pub type SWIDTH_R = crate::FieldReader; +#[doc = "Field `SWidth` writer - "] +pub type SWIDTH_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DMA_C1CONTROL_SPEC, u8, u8, 3, O>; +#[doc = "Field `DWidth` reader - "] +pub type DWIDTH_R = crate::FieldReader; +#[doc = "Field `DWidth` writer - "] +pub type DWIDTH_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DMA_C1CONTROL_SPEC, u8, u8, 3, O>; +#[doc = "Field `SI` reader - "] +pub type SI_R = crate::BitReader; +#[doc = "Field `SI` writer - "] +pub type SI_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C1CONTROL_SPEC, bool, O>; +#[doc = "Field `DI` reader - "] +pub type DI_R = crate::BitReader; +#[doc = "Field `DI` writer - "] +pub type DI_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C1CONTROL_SPEC, bool, O>; +#[doc = "Field `Prot` reader - "] +pub type PROT_R = crate::FieldReader; +#[doc = "Field `Prot` writer - "] +pub type PROT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DMA_C1CONTROL_SPEC, u8, u8, 3, O>; +#[doc = "Field `I` reader - "] +pub type I_R = crate::BitReader; +#[doc = "Field `I` writer - "] +pub type I_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C1CONTROL_SPEC, bool, O>; impl R { - #[doc = "Bit 31"] + #[doc = "Bits 0:11"] #[inline(always)] - pub fn i(&self) -> I_R { - I_R::new(((self.bits >> 31) & 0x01) != 0) + pub fn transfer_size(&self) -> TRANSFER_SIZE_R { + TRANSFER_SIZE_R::new((self.bits & 0x0fff) as u16) } - #[doc = "Bits 28:30"] + #[doc = "Bits 12:14"] #[inline(always)] - pub fn prot(&self) -> PROT_R { - PROT_R::new(((self.bits >> 28) & 0x07) as u8) + pub fn sbsize(&self) -> SBSIZE_R { + SBSIZE_R::new(((self.bits >> 12) & 7) as u8) } - #[doc = "Bit 27"] + #[doc = "Bits 15:17"] #[inline(always)] - pub fn di(&self) -> DI_R { - DI_R::new(((self.bits >> 27) & 0x01) != 0) + pub fn dbsize(&self) -> DBSIZE_R { + DBSIZE_R::new(((self.bits >> 15) & 7) as u8) } - #[doc = "Bit 26"] + #[doc = "Bits 18:20"] #[inline(always)] - pub fn si(&self) -> SI_R { - SI_R::new(((self.bits >> 26) & 0x01) != 0) + pub fn swidth(&self) -> SWIDTH_R { + SWIDTH_R::new(((self.bits >> 18) & 7) as u8) } #[doc = "Bits 21:23"] #[inline(always)] pub fn dwidth(&self) -> DWIDTH_R { - DWIDTH_R::new(((self.bits >> 21) & 0x07) as u8) + DWIDTH_R::new(((self.bits >> 21) & 7) as u8) } - #[doc = "Bits 18:20"] + #[doc = "Bit 26"] #[inline(always)] - pub fn swidth(&self) -> SWIDTH_R { - SWIDTH_R::new(((self.bits >> 18) & 0x07) as u8) + pub fn si(&self) -> SI_R { + SI_R::new(((self.bits >> 26) & 1) != 0) } - #[doc = "Bits 15:17"] + #[doc = "Bit 27"] #[inline(always)] - pub fn dbsize(&self) -> DBSIZE_R { - DBSIZE_R::new(((self.bits >> 15) & 0x07) as u8) + pub fn di(&self) -> DI_R { + DI_R::new(((self.bits >> 27) & 1) != 0) } - #[doc = "Bits 12:14"] + #[doc = "Bits 28:30"] #[inline(always)] - pub fn sbsize(&self) -> SBSIZE_R { - SBSIZE_R::new(((self.bits >> 12) & 0x07) as u8) + pub fn prot(&self) -> PROT_R { + PROT_R::new(((self.bits >> 28) & 7) as u8) } - #[doc = "Bits 0:11"] + #[doc = "Bit 31"] #[inline(always)] - pub fn transfer_size(&self) -> TRANSFERSIZE_R { - TRANSFERSIZE_R::new((self.bits & 0x0fff) as u16) + pub fn i(&self) -> I_R { + I_R::new(((self.bits >> 31) & 1) != 0) } } impl W { - #[doc = "Bit 31"] + #[doc = "Bits 0:11"] #[inline(always)] - pub fn i(&mut self) -> I_W { - I_W { w: self } + #[must_use] + pub fn transfer_size(&mut self) -> TRANSFER_SIZE_W<0> { + TRANSFER_SIZE_W::new(self) } - #[doc = "Bits 28:30"] + #[doc = "Bits 12:14"] #[inline(always)] - pub fn prot(&mut self) -> PROT_W { - PROT_W { w: self } + #[must_use] + pub fn sbsize(&mut self) -> SBSIZE_W<12> { + SBSIZE_W::new(self) } - #[doc = "Bit 27"] + #[doc = "Bits 15:17"] #[inline(always)] - pub fn di(&mut self) -> DI_W { - DI_W { w: self } + #[must_use] + pub fn dbsize(&mut self) -> DBSIZE_W<15> { + DBSIZE_W::new(self) } - #[doc = "Bit 26"] + #[doc = "Bits 18:20"] #[inline(always)] - pub fn si(&mut self) -> SI_W { - SI_W { w: self } + #[must_use] + pub fn swidth(&mut self) -> SWIDTH_W<18> { + SWIDTH_W::new(self) } #[doc = "Bits 21:23"] #[inline(always)] - pub fn dwidth(&mut self) -> DWIDTH_W { - DWIDTH_W { w: self } + #[must_use] + pub fn dwidth(&mut self) -> DWIDTH_W<21> { + DWIDTH_W::new(self) } - #[doc = "Bits 18:20"] + #[doc = "Bit 26"] #[inline(always)] - pub fn swidth(&mut self) -> SWIDTH_W { - SWIDTH_W { w: self } + #[must_use] + pub fn si(&mut self) -> SI_W<26> { + SI_W::new(self) } - #[doc = "Bits 15:17"] + #[doc = "Bit 27"] #[inline(always)] - pub fn dbsize(&mut self) -> DBSIZE_W { - DBSIZE_W { w: self } + #[must_use] + pub fn di(&mut self) -> DI_W<27> { + DI_W::new(self) } - #[doc = "Bits 12:14"] + #[doc = "Bits 28:30"] #[inline(always)] - pub fn sbsize(&mut self) -> SBSIZE_W { - SBSIZE_W { w: self } + #[must_use] + pub fn prot(&mut self) -> PROT_W<28> { + PROT_W::new(self) } - #[doc = "Bits 0:11"] + #[doc = "Bit 31"] #[inline(always)] - pub fn transfer_size(&mut self) -> TRANSFERSIZE_W { - TRANSFERSIZE_W { w: self } + #[must_use] + pub fn i(&mut self) -> I_W<31> { + I_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -407,11 +192,10 @@ impl crate::Readable for DMA_C1CONTROL_SPEC { #[doc = "`write(|w| ..)` method takes [dma_c1control::W](W) writer structure"] impl crate::Writable for DMA_C1CONTROL_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets DMA_C1Control to value 0x0c48_9000"] impl crate::Resettable for DMA_C1CONTROL_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0c48_9000 - } + const RESET_VALUE: Self::Ux = 0x0c48_9000; } diff --git a/src/dma/dma_c1dst_addr.rs b/src/dma/dma_c1dst_addr.rs index 68132ba..29446de 100644 --- a/src/dma/dma_c1dst_addr.rs +++ b/src/dma/dma_c1dst_addr.rs @@ -1,21 +1,22 @@ #[doc = "Register `DMA_C1DstAddr` reader"] -pub struct R(crate::R); +pub struct R(crate::R); impl core::ops::Deref for R { - type Target = crate::R; + type Target = crate::R; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } -impl core::convert::From> for R { - fn from(reader: crate::R) -> Self { +impl From> for R { + #[inline(always)] + fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Register `DMA_C1DstAddr` writer"] -pub struct W(crate::W); +pub struct W(crate::W); impl core::ops::Deref for W { - type Target = crate::W; + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 @@ -27,73 +28,54 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { - fn from(writer: crate::W) -> Self { +impl From> for W { + #[inline(always)] + fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `DstAddr` reader - "] -pub struct DSTADDR_R(crate::FieldReader); -impl DSTADDR_R { - pub(crate) fn new(bits: u32) -> Self { - DSTADDR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DSTADDR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type DST_ADDR_R = crate::FieldReader; #[doc = "Field `DstAddr` writer - "] -pub struct DSTADDR_W<'a> { - w: &'a mut W, -} -impl<'a> DSTADDR_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type DST_ADDR_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DMA_C1DST_ADDR_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] - pub fn dst_addr(&self) -> DSTADDR_R { - DSTADDR_R::new((self.bits & 0xffff_ffff) as u32) + pub fn dst_addr(&self) -> DST_ADDR_R { + DST_ADDR_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn dst_addr(&mut self) -> DSTADDR_W { - DSTADDR_W { w: self } + #[must_use] + pub fn dst_addr(&mut self) -> DST_ADDR_W<0> { + DST_ADDR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self } } #[doc = "DMA_C1DstAddr.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dma_c1dst_addr](index.html) module"] -pub struct DMA_C1DSTADDR_SPEC; -impl crate::RegisterSpec for DMA_C1DSTADDR_SPEC { +pub struct DMA_C1DST_ADDR_SPEC; +impl crate::RegisterSpec for DMA_C1DST_ADDR_SPEC { type Ux = u32; } #[doc = "`read()` method returns [dma_c1dst_addr::R](R) reader structure"] -impl crate::Readable for DMA_C1DSTADDR_SPEC { +impl crate::Readable for DMA_C1DST_ADDR_SPEC { type Reader = R; } #[doc = "`write(|w| ..)` method takes [dma_c1dst_addr::W](W) writer structure"] -impl crate::Writable for DMA_C1DSTADDR_SPEC { +impl crate::Writable for DMA_C1DST_ADDR_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets DMA_C1DstAddr to value 0"] -impl crate::Resettable for DMA_C1DSTADDR_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } +impl crate::Resettable for DMA_C1DST_ADDR_SPEC { + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/dma/dma_c1lli.rs b/src/dma/dma_c1lli.rs index 65d632b..8313fcd 100644 --- a/src/dma/dma_c1lli.rs +++ b/src/dma/dma_c1lli.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,32 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `LLI` reader - "] -pub struct LLI_R(crate::FieldReader); -impl LLI_R { - pub(crate) fn new(bits: u32) -> Self { - LLI_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LLI_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type LLI_R = crate::FieldReader; #[doc = "Field `LLI` writer - "] -pub struct LLI_W<'a> { - w: &'a mut W, -} -impl<'a> LLI_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3fff_ffff << 2)) | ((value as u32 & 0x3fff_ffff) << 2); - self.w - } -} +pub type LLI_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DMA_C1LLI_SPEC, u32, u32, 30, O>; impl R { #[doc = "Bits 2:31"] #[inline(always)] pub fn lli(&self) -> LLI_R { - LLI_R::new(((self.bits >> 2) & 0x3fff_ffff) as u32) + LLI_R::new((self.bits >> 2) & 0x3fff_ffff) } } impl W { #[doc = "Bits 2:31"] #[inline(always)] - pub fn lli(&mut self) -> LLI_W { - LLI_W { w: self } + #[must_use] + pub fn lli(&mut self) -> LLI_W<2> { + LLI_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +71,10 @@ impl crate::Readable for DMA_C1LLI_SPEC { #[doc = "`write(|w| ..)` method takes [dma_c1lli::W](W) writer structure"] impl crate::Writable for DMA_C1LLI_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets DMA_C1LLI to value 0"] impl crate::Resettable for DMA_C1LLI_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/dma/dma_c1src_addr.rs b/src/dma/dma_c1src_addr.rs index 7c88817..1b2c69d 100644 --- a/src/dma/dma_c1src_addr.rs +++ b/src/dma/dma_c1src_addr.rs @@ -1,21 +1,22 @@ #[doc = "Register `DMA_C1SrcAddr` reader"] -pub struct R(crate::R); +pub struct R(crate::R); impl core::ops::Deref for R { - type Target = crate::R; + type Target = crate::R; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } -impl core::convert::From> for R { - fn from(reader: crate::R) -> Self { +impl From> for R { + #[inline(always)] + fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Register `DMA_C1SrcAddr` writer"] -pub struct W(crate::W); +pub struct W(crate::W); impl core::ops::Deref for W { - type Target = crate::W; + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 @@ -27,73 +28,54 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { - fn from(writer: crate::W) -> Self { +impl From> for W { + #[inline(always)] + fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `SrcAddr` reader - "] -pub struct SRCADDR_R(crate::FieldReader); -impl SRCADDR_R { - pub(crate) fn new(bits: u32) -> Self { - SRCADDR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SRCADDR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SRC_ADDR_R = crate::FieldReader; #[doc = "Field `SrcAddr` writer - "] -pub struct SRCADDR_W<'a> { - w: &'a mut W, -} -impl<'a> SRCADDR_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SRC_ADDR_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DMA_C1SRC_ADDR_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] - pub fn src_addr(&self) -> SRCADDR_R { - SRCADDR_R::new((self.bits & 0xffff_ffff) as u32) + pub fn src_addr(&self) -> SRC_ADDR_R { + SRC_ADDR_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn src_addr(&mut self) -> SRCADDR_W { - SRCADDR_W { w: self } + #[must_use] + pub fn src_addr(&mut self) -> SRC_ADDR_W<0> { + SRC_ADDR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self } } #[doc = "DMA_C1SrcAddr.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dma_c1src_addr](index.html) module"] -pub struct DMA_C1SRCADDR_SPEC; -impl crate::RegisterSpec for DMA_C1SRCADDR_SPEC { +pub struct DMA_C1SRC_ADDR_SPEC; +impl crate::RegisterSpec for DMA_C1SRC_ADDR_SPEC { type Ux = u32; } #[doc = "`read()` method returns [dma_c1src_addr::R](R) reader structure"] -impl crate::Readable for DMA_C1SRCADDR_SPEC { +impl crate::Readable for DMA_C1SRC_ADDR_SPEC { type Reader = R; } #[doc = "`write(|w| ..)` method takes [dma_c1src_addr::W](W) writer structure"] -impl crate::Writable for DMA_C1SRCADDR_SPEC { +impl crate::Writable for DMA_C1SRC_ADDR_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets DMA_C1SrcAddr to value 0"] -impl crate::Resettable for DMA_C1SRCADDR_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } +impl crate::Resettable for DMA_C1SRC_ADDR_SPEC { + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/dma/dma_c2config.rs b/src/dma/dma_c2config.rs index 973f373..41eb41b 100644 --- a/src/dma/dma_c2config.rs +++ b/src/dma/dma_c2config.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,372 +28,147 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `H` reader - "] -pub struct H_R(crate::FieldReader); -impl H_R { - pub(crate) fn new(bits: bool) -> Self { - H_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for H_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `H` writer - "] -pub struct H_W<'a> { - w: &'a mut W, -} -impl<'a> H_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18); - self.w - } -} -#[doc = "Field `A` reader - "] -pub struct A_R(crate::FieldReader); -impl A_R { - pub(crate) fn new(bits: bool) -> Self { - A_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for A_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `L` reader - "] -pub struct L_R(crate::FieldReader); -impl L_R { - pub(crate) fn new(bits: bool) -> Self { - L_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for L_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `L` writer - "] -pub struct L_W<'a> { - w: &'a mut W, -} -impl<'a> L_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `ITC` reader - "] -pub struct ITC_R(crate::FieldReader); -impl ITC_R { - pub(crate) fn new(bits: bool) -> Self { - ITC_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ITC_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ITC` writer - "] -pub struct ITC_W<'a> { - w: &'a mut W, -} -impl<'a> ITC_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15); - self.w - } -} -#[doc = "Field `IE` reader - "] -pub struct IE_R(crate::FieldReader); -impl IE_R { - pub(crate) fn new(bits: bool) -> Self { - IE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for IE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `IE` writer - "] -pub struct IE_W<'a> { - w: &'a mut W, -} -impl<'a> IE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14); - self.w - } -} -#[doc = "Field `FlowCntrl` reader - "] -pub struct FLOWCNTRL_R(crate::FieldReader); -impl FLOWCNTRL_R { - pub(crate) fn new(bits: u8) -> Self { - FLOWCNTRL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for FLOWCNTRL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `FlowCntrl` writer - "] -pub struct FLOWCNTRL_W<'a> { - w: &'a mut W, -} -impl<'a> FLOWCNTRL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 11)) | ((value as u32 & 0x07) << 11); - self.w - } -} -#[doc = "Field `DstPeripheral` reader - "] -pub struct DSTPERIPHERAL_R(crate::FieldReader); -impl DSTPERIPHERAL_R { - pub(crate) fn new(bits: u8) -> Self { - DSTPERIPHERAL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DSTPERIPHERAL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `DstPeripheral` writer - "] -pub struct DSTPERIPHERAL_W<'a> { - w: &'a mut W, -} -impl<'a> DSTPERIPHERAL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 6)) | ((value as u32 & 0x1f) << 6); - self.w - } -} -#[doc = "Field `SrcPeripheral` reader - "] -pub struct SRCPERIPHERAL_R(crate::FieldReader); -impl SRCPERIPHERAL_R { - pub(crate) fn new(bits: u8) -> Self { - SRCPERIPHERAL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SRCPERIPHERAL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `SrcPeripheral` writer - "] -pub struct SRCPERIPHERAL_W<'a> { - w: &'a mut W, -} -impl<'a> SRCPERIPHERAL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 1)) | ((value as u32 & 0x1f) << 1); - self.w - } -} #[doc = "Field `E` reader - "] -pub struct E_R(crate::FieldReader); -impl E_R { - pub(crate) fn new(bits: bool) -> Self { - E_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for E_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type E_R = crate::BitReader; #[doc = "Field `E` writer - "] -pub struct E_W<'a> { - w: &'a mut W, -} -impl<'a> E_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type E_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C2CONFIG_SPEC, bool, O>; +#[doc = "Field `SrcPeripheral` reader - "] +pub type SRC_PERIPHERAL_R = crate::FieldReader; +#[doc = "Field `SrcPeripheral` writer - "] +pub type SRC_PERIPHERAL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DMA_C2CONFIG_SPEC, u8, u8, 5, O>; +#[doc = "Field `DstPeripheral` reader - "] +pub type DST_PERIPHERAL_R = crate::FieldReader; +#[doc = "Field `DstPeripheral` writer - "] +pub type DST_PERIPHERAL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DMA_C2CONFIG_SPEC, u8, u8, 5, O>; +#[doc = "Field `FlowCntrl` reader - "] +pub type FLOW_CNTRL_R = crate::FieldReader; +#[doc = "Field `FlowCntrl` writer - "] +pub type FLOW_CNTRL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DMA_C2CONFIG_SPEC, u8, u8, 3, O>; +#[doc = "Field `IE` reader - "] +pub type IE_R = crate::BitReader; +#[doc = "Field `IE` writer - "] +pub type IE_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C2CONFIG_SPEC, bool, O>; +#[doc = "Field `ITC` reader - "] +pub type ITC_R = crate::BitReader; +#[doc = "Field `ITC` writer - "] +pub type ITC_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C2CONFIG_SPEC, bool, O>; +#[doc = "Field `L` reader - "] +pub type L_R = crate::BitReader; +#[doc = "Field `L` writer - "] +pub type L_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C2CONFIG_SPEC, bool, O>; +#[doc = "Field `A` reader - "] +pub type A_R = crate::BitReader; +#[doc = "Field `H` reader - "] +pub type H_R = crate::BitReader; +#[doc = "Field `H` writer - "] +pub type H_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C2CONFIG_SPEC, bool, O>; impl R { - #[doc = "Bit 18"] + #[doc = "Bit 0"] #[inline(always)] - pub fn h(&self) -> H_R { - H_R::new(((self.bits >> 18) & 0x01) != 0) + pub fn e(&self) -> E_R { + E_R::new((self.bits & 1) != 0) } - #[doc = "Bit 17"] + #[doc = "Bits 1:5"] #[inline(always)] - pub fn a(&self) -> A_R { - A_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn src_peripheral(&self) -> SRC_PERIPHERAL_R { + SRC_PERIPHERAL_R::new(((self.bits >> 1) & 0x1f) as u8) } - #[doc = "Bit 16"] + #[doc = "Bits 6:10"] #[inline(always)] - pub fn l(&self) -> L_R { - L_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn dst_peripheral(&self) -> DST_PERIPHERAL_R { + DST_PERIPHERAL_R::new(((self.bits >> 6) & 0x1f) as u8) } - #[doc = "Bit 15"] + #[doc = "Bits 11:13"] #[inline(always)] - pub fn itc(&self) -> ITC_R { - ITC_R::new(((self.bits >> 15) & 0x01) != 0) + pub fn flow_cntrl(&self) -> FLOW_CNTRL_R { + FLOW_CNTRL_R::new(((self.bits >> 11) & 7) as u8) } #[doc = "Bit 14"] #[inline(always)] pub fn ie(&self) -> IE_R { - IE_R::new(((self.bits >> 14) & 0x01) != 0) + IE_R::new(((self.bits >> 14) & 1) != 0) } - #[doc = "Bits 11:13"] + #[doc = "Bit 15"] #[inline(always)] - pub fn flow_cntrl(&self) -> FLOWCNTRL_R { - FLOWCNTRL_R::new(((self.bits >> 11) & 0x07) as u8) + pub fn itc(&self) -> ITC_R { + ITC_R::new(((self.bits >> 15) & 1) != 0) } - #[doc = "Bits 6:10"] + #[doc = "Bit 16"] #[inline(always)] - pub fn dst_peripheral(&self) -> DSTPERIPHERAL_R { - DSTPERIPHERAL_R::new(((self.bits >> 6) & 0x1f) as u8) + pub fn l(&self) -> L_R { + L_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bits 1:5"] + #[doc = "Bit 17"] #[inline(always)] - pub fn src_peripheral(&self) -> SRCPERIPHERAL_R { - SRCPERIPHERAL_R::new(((self.bits >> 1) & 0x1f) as u8) + pub fn a(&self) -> A_R { + A_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 18"] #[inline(always)] - pub fn e(&self) -> E_R { - E_R::new((self.bits & 0x01) != 0) + pub fn h(&self) -> H_R { + H_R::new(((self.bits >> 18) & 1) != 0) } } impl W { - #[doc = "Bit 18"] + #[doc = "Bit 0"] #[inline(always)] - pub fn h(&mut self) -> H_W { - H_W { w: self } + #[must_use] + pub fn e(&mut self) -> E_W<0> { + E_W::new(self) } - #[doc = "Bit 16"] + #[doc = "Bits 1:5"] #[inline(always)] - pub fn l(&mut self) -> L_W { - L_W { w: self } + #[must_use] + pub fn src_peripheral(&mut self) -> SRC_PERIPHERAL_W<1> { + SRC_PERIPHERAL_W::new(self) } - #[doc = "Bit 15"] + #[doc = "Bits 6:10"] #[inline(always)] - pub fn itc(&mut self) -> ITC_W { - ITC_W { w: self } + #[must_use] + pub fn dst_peripheral(&mut self) -> DST_PERIPHERAL_W<6> { + DST_PERIPHERAL_W::new(self) } - #[doc = "Bit 14"] + #[doc = "Bits 11:13"] #[inline(always)] - pub fn ie(&mut self) -> IE_W { - IE_W { w: self } + #[must_use] + pub fn flow_cntrl(&mut self) -> FLOW_CNTRL_W<11> { + FLOW_CNTRL_W::new(self) } - #[doc = "Bits 11:13"] + #[doc = "Bit 14"] #[inline(always)] - pub fn flow_cntrl(&mut self) -> FLOWCNTRL_W { - FLOWCNTRL_W { w: self } + #[must_use] + pub fn ie(&mut self) -> IE_W<14> { + IE_W::new(self) } - #[doc = "Bits 6:10"] + #[doc = "Bit 15"] #[inline(always)] - pub fn dst_peripheral(&mut self) -> DSTPERIPHERAL_W { - DSTPERIPHERAL_W { w: self } + #[must_use] + pub fn itc(&mut self) -> ITC_W<15> { + ITC_W::new(self) } - #[doc = "Bits 1:5"] + #[doc = "Bit 16"] #[inline(always)] - pub fn src_peripheral(&mut self) -> SRCPERIPHERAL_W { - SRCPERIPHERAL_W { w: self } + #[must_use] + pub fn l(&mut self) -> L_W<16> { + L_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 18"] #[inline(always)] - pub fn e(&mut self) -> E_W { - E_W { w: self } + #[must_use] + pub fn h(&mut self) -> H_W<18> { + H_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -410,11 +186,10 @@ impl crate::Readable for DMA_C2CONFIG_SPEC { #[doc = "`write(|w| ..)` method takes [dma_c2config::W](W) writer structure"] impl crate::Writable for DMA_C2CONFIG_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets DMA_C2Config to value 0"] impl crate::Resettable for DMA_C2CONFIG_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/dma/dma_c2control.rs b/src/dma/dma_c2control.rs index d043e78..4f4064b 100644 --- a/src/dma/dma_c2control.rs +++ b/src/dma/dma_c2control.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,369 +28,153 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `I` reader - "] -pub struct I_R(crate::FieldReader); -impl I_R { - pub(crate) fn new(bits: bool) -> Self { - I_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `I` writer - "] -pub struct I_W<'a> { - w: &'a mut W, -} -impl<'a> I_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 31)) | ((value as u32 & 0x01) << 31); - self.w - } -} -#[doc = "Field `Prot` reader - "] -pub struct PROT_R(crate::FieldReader); -impl PROT_R { - pub(crate) fn new(bits: u8) -> Self { - PROT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PROT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `Prot` writer - "] -pub struct PROT_W<'a> { - w: &'a mut W, -} -impl<'a> PROT_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 28)) | ((value as u32 & 0x07) << 28); - self.w - } -} -#[doc = "Field `DI` reader - "] -pub struct DI_R(crate::FieldReader); -impl DI_R { - pub(crate) fn new(bits: bool) -> Self { - DI_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DI_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `DI` writer - "] -pub struct DI_W<'a> { - w: &'a mut W, -} -impl<'a> DI_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 27)) | ((value as u32 & 0x01) << 27); - self.w - } -} -#[doc = "Field `SI` reader - "] -pub struct SI_R(crate::FieldReader); -impl SI_R { - pub(crate) fn new(bits: bool) -> Self { - SI_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SI_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `SI` writer - "] -pub struct SI_W<'a> { - w: &'a mut W, -} -impl<'a> SI_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 26)) | ((value as u32 & 0x01) << 26); - self.w - } -} -#[doc = "Field `DWidth` reader - "] -pub struct DWIDTH_R(crate::FieldReader); -impl DWIDTH_R { - pub(crate) fn new(bits: u8) -> Self { - DWIDTH_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DWIDTH_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `DWidth` writer - "] -pub struct DWIDTH_W<'a> { - w: &'a mut W, -} -impl<'a> DWIDTH_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 21)) | ((value as u32 & 0x07) << 21); - self.w - } -} -#[doc = "Field `SWidth` reader - "] -pub struct SWIDTH_R(crate::FieldReader); -impl SWIDTH_R { - pub(crate) fn new(bits: u8) -> Self { - SWIDTH_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SWIDTH_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `SWidth` writer - "] -pub struct SWIDTH_W<'a> { - w: &'a mut W, -} -impl<'a> SWIDTH_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 18)) | ((value as u32 & 0x07) << 18); - self.w - } -} -#[doc = "Field `DBSize` reader - "] -pub struct DBSIZE_R(crate::FieldReader); -impl DBSIZE_R { - pub(crate) fn new(bits: u8) -> Self { - DBSIZE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DBSIZE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `DBSize` writer - "] -pub struct DBSIZE_W<'a> { - w: &'a mut W, -} -impl<'a> DBSIZE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 15)) | ((value as u32 & 0x07) << 15); - self.w - } -} -#[doc = "Field `SBSize` reader - "] -pub struct SBSIZE_R(crate::FieldReader); -impl SBSIZE_R { - pub(crate) fn new(bits: u8) -> Self { - SBSIZE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SBSIZE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `SBSize` writer - "] -pub struct SBSIZE_W<'a> { - w: &'a mut W, -} -impl<'a> SBSIZE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 12)) | ((value as u32 & 0x07) << 12); - self.w - } -} #[doc = "Field `TransferSize` reader - "] -pub struct TRANSFERSIZE_R(crate::FieldReader); -impl TRANSFERSIZE_R { - pub(crate) fn new(bits: u16) -> Self { - TRANSFERSIZE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TRANSFERSIZE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TRANSFER_SIZE_R = crate::FieldReader; #[doc = "Field `TransferSize` writer - "] -pub struct TRANSFERSIZE_W<'a> { - w: &'a mut W, -} -impl<'a> TRANSFERSIZE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x0fff) | (value as u32 & 0x0fff); - self.w - } -} +pub type TRANSFER_SIZE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DMA_C2CONTROL_SPEC, u16, u16, 12, O>; +#[doc = "Field `SBSize` reader - "] +pub type SBSIZE_R = crate::FieldReader; +#[doc = "Field `SBSize` writer - "] +pub type SBSIZE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DMA_C2CONTROL_SPEC, u8, u8, 3, O>; +#[doc = "Field `DBSize` reader - "] +pub type DBSIZE_R = crate::FieldReader; +#[doc = "Field `DBSize` writer - "] +pub type DBSIZE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DMA_C2CONTROL_SPEC, u8, u8, 3, O>; +#[doc = "Field `SWidth` reader - "] +pub type SWIDTH_R = crate::FieldReader; +#[doc = "Field `SWidth` writer - "] +pub type SWIDTH_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DMA_C2CONTROL_SPEC, u8, u8, 3, O>; +#[doc = "Field `DWidth` reader - "] +pub type DWIDTH_R = crate::FieldReader; +#[doc = "Field `DWidth` writer - "] +pub type DWIDTH_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DMA_C2CONTROL_SPEC, u8, u8, 3, O>; +#[doc = "Field `SI` reader - "] +pub type SI_R = crate::BitReader; +#[doc = "Field `SI` writer - "] +pub type SI_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C2CONTROL_SPEC, bool, O>; +#[doc = "Field `DI` reader - "] +pub type DI_R = crate::BitReader; +#[doc = "Field `DI` writer - "] +pub type DI_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C2CONTROL_SPEC, bool, O>; +#[doc = "Field `Prot` reader - "] +pub type PROT_R = crate::FieldReader; +#[doc = "Field `Prot` writer - "] +pub type PROT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DMA_C2CONTROL_SPEC, u8, u8, 3, O>; +#[doc = "Field `I` reader - "] +pub type I_R = crate::BitReader; +#[doc = "Field `I` writer - "] +pub type I_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C2CONTROL_SPEC, bool, O>; impl R { - #[doc = "Bit 31"] + #[doc = "Bits 0:11"] #[inline(always)] - pub fn i(&self) -> I_R { - I_R::new(((self.bits >> 31) & 0x01) != 0) + pub fn transfer_size(&self) -> TRANSFER_SIZE_R { + TRANSFER_SIZE_R::new((self.bits & 0x0fff) as u16) } - #[doc = "Bits 28:30"] + #[doc = "Bits 12:14"] #[inline(always)] - pub fn prot(&self) -> PROT_R { - PROT_R::new(((self.bits >> 28) & 0x07) as u8) + pub fn sbsize(&self) -> SBSIZE_R { + SBSIZE_R::new(((self.bits >> 12) & 7) as u8) } - #[doc = "Bit 27"] + #[doc = "Bits 15:17"] #[inline(always)] - pub fn di(&self) -> DI_R { - DI_R::new(((self.bits >> 27) & 0x01) != 0) + pub fn dbsize(&self) -> DBSIZE_R { + DBSIZE_R::new(((self.bits >> 15) & 7) as u8) } - #[doc = "Bit 26"] + #[doc = "Bits 18:20"] #[inline(always)] - pub fn si(&self) -> SI_R { - SI_R::new(((self.bits >> 26) & 0x01) != 0) + pub fn swidth(&self) -> SWIDTH_R { + SWIDTH_R::new(((self.bits >> 18) & 7) as u8) } #[doc = "Bits 21:23"] #[inline(always)] pub fn dwidth(&self) -> DWIDTH_R { - DWIDTH_R::new(((self.bits >> 21) & 0x07) as u8) + DWIDTH_R::new(((self.bits >> 21) & 7) as u8) } - #[doc = "Bits 18:20"] + #[doc = "Bit 26"] #[inline(always)] - pub fn swidth(&self) -> SWIDTH_R { - SWIDTH_R::new(((self.bits >> 18) & 0x07) as u8) + pub fn si(&self) -> SI_R { + SI_R::new(((self.bits >> 26) & 1) != 0) } - #[doc = "Bits 15:17"] + #[doc = "Bit 27"] #[inline(always)] - pub fn dbsize(&self) -> DBSIZE_R { - DBSIZE_R::new(((self.bits >> 15) & 0x07) as u8) + pub fn di(&self) -> DI_R { + DI_R::new(((self.bits >> 27) & 1) != 0) } - #[doc = "Bits 12:14"] + #[doc = "Bits 28:30"] #[inline(always)] - pub fn sbsize(&self) -> SBSIZE_R { - SBSIZE_R::new(((self.bits >> 12) & 0x07) as u8) + pub fn prot(&self) -> PROT_R { + PROT_R::new(((self.bits >> 28) & 7) as u8) } - #[doc = "Bits 0:11"] + #[doc = "Bit 31"] #[inline(always)] - pub fn transfer_size(&self) -> TRANSFERSIZE_R { - TRANSFERSIZE_R::new((self.bits & 0x0fff) as u16) + pub fn i(&self) -> I_R { + I_R::new(((self.bits >> 31) & 1) != 0) } } impl W { - #[doc = "Bit 31"] + #[doc = "Bits 0:11"] #[inline(always)] - pub fn i(&mut self) -> I_W { - I_W { w: self } + #[must_use] + pub fn transfer_size(&mut self) -> TRANSFER_SIZE_W<0> { + TRANSFER_SIZE_W::new(self) } - #[doc = "Bits 28:30"] + #[doc = "Bits 12:14"] #[inline(always)] - pub fn prot(&mut self) -> PROT_W { - PROT_W { w: self } + #[must_use] + pub fn sbsize(&mut self) -> SBSIZE_W<12> { + SBSIZE_W::new(self) } - #[doc = "Bit 27"] + #[doc = "Bits 15:17"] #[inline(always)] - pub fn di(&mut self) -> DI_W { - DI_W { w: self } + #[must_use] + pub fn dbsize(&mut self) -> DBSIZE_W<15> { + DBSIZE_W::new(self) } - #[doc = "Bit 26"] + #[doc = "Bits 18:20"] #[inline(always)] - pub fn si(&mut self) -> SI_W { - SI_W { w: self } + #[must_use] + pub fn swidth(&mut self) -> SWIDTH_W<18> { + SWIDTH_W::new(self) } #[doc = "Bits 21:23"] #[inline(always)] - pub fn dwidth(&mut self) -> DWIDTH_W { - DWIDTH_W { w: self } + #[must_use] + pub fn dwidth(&mut self) -> DWIDTH_W<21> { + DWIDTH_W::new(self) } - #[doc = "Bits 18:20"] + #[doc = "Bit 26"] #[inline(always)] - pub fn swidth(&mut self) -> SWIDTH_W { - SWIDTH_W { w: self } + #[must_use] + pub fn si(&mut self) -> SI_W<26> { + SI_W::new(self) } - #[doc = "Bits 15:17"] + #[doc = "Bit 27"] #[inline(always)] - pub fn dbsize(&mut self) -> DBSIZE_W { - DBSIZE_W { w: self } + #[must_use] + pub fn di(&mut self) -> DI_W<27> { + DI_W::new(self) } - #[doc = "Bits 12:14"] + #[doc = "Bits 28:30"] #[inline(always)] - pub fn sbsize(&mut self) -> SBSIZE_W { - SBSIZE_W { w: self } + #[must_use] + pub fn prot(&mut self) -> PROT_W<28> { + PROT_W::new(self) } - #[doc = "Bits 0:11"] + #[doc = "Bit 31"] #[inline(always)] - pub fn transfer_size(&mut self) -> TRANSFERSIZE_W { - TRANSFERSIZE_W { w: self } + #[must_use] + pub fn i(&mut self) -> I_W<31> { + I_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -407,11 +192,10 @@ impl crate::Readable for DMA_C2CONTROL_SPEC { #[doc = "`write(|w| ..)` method takes [dma_c2control::W](W) writer structure"] impl crate::Writable for DMA_C2CONTROL_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets DMA_C2Control to value 0x0c48_9000"] impl crate::Resettable for DMA_C2CONTROL_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0c48_9000 - } + const RESET_VALUE: Self::Ux = 0x0c48_9000; } diff --git a/src/dma/dma_c2dst_addr.rs b/src/dma/dma_c2dst_addr.rs index 14f6df3..c8a5bde 100644 --- a/src/dma/dma_c2dst_addr.rs +++ b/src/dma/dma_c2dst_addr.rs @@ -1,21 +1,22 @@ #[doc = "Register `DMA_C2DstAddr` reader"] -pub struct R(crate::R); +pub struct R(crate::R); impl core::ops::Deref for R { - type Target = crate::R; + type Target = crate::R; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } -impl core::convert::From> for R { - fn from(reader: crate::R) -> Self { +impl From> for R { + #[inline(always)] + fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Register `DMA_C2DstAddr` writer"] -pub struct W(crate::W); +pub struct W(crate::W); impl core::ops::Deref for W { - type Target = crate::W; + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 @@ -27,73 +28,54 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { - fn from(writer: crate::W) -> Self { +impl From> for W { + #[inline(always)] + fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `DstAddr` reader - "] -pub struct DSTADDR_R(crate::FieldReader); -impl DSTADDR_R { - pub(crate) fn new(bits: u32) -> Self { - DSTADDR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DSTADDR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type DST_ADDR_R = crate::FieldReader; #[doc = "Field `DstAddr` writer - "] -pub struct DSTADDR_W<'a> { - w: &'a mut W, -} -impl<'a> DSTADDR_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type DST_ADDR_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DMA_C2DST_ADDR_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] - pub fn dst_addr(&self) -> DSTADDR_R { - DSTADDR_R::new((self.bits & 0xffff_ffff) as u32) + pub fn dst_addr(&self) -> DST_ADDR_R { + DST_ADDR_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn dst_addr(&mut self) -> DSTADDR_W { - DSTADDR_W { w: self } + #[must_use] + pub fn dst_addr(&mut self) -> DST_ADDR_W<0> { + DST_ADDR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self } } #[doc = "DMA_C2DstAddr.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dma_c2dst_addr](index.html) module"] -pub struct DMA_C2DSTADDR_SPEC; -impl crate::RegisterSpec for DMA_C2DSTADDR_SPEC { +pub struct DMA_C2DST_ADDR_SPEC; +impl crate::RegisterSpec for DMA_C2DST_ADDR_SPEC { type Ux = u32; } #[doc = "`read()` method returns [dma_c2dst_addr::R](R) reader structure"] -impl crate::Readable for DMA_C2DSTADDR_SPEC { +impl crate::Readable for DMA_C2DST_ADDR_SPEC { type Reader = R; } #[doc = "`write(|w| ..)` method takes [dma_c2dst_addr::W](W) writer structure"] -impl crate::Writable for DMA_C2DSTADDR_SPEC { +impl crate::Writable for DMA_C2DST_ADDR_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets DMA_C2DstAddr to value 0"] -impl crate::Resettable for DMA_C2DSTADDR_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } +impl crate::Resettable for DMA_C2DST_ADDR_SPEC { + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/dma/dma_c2lli.rs b/src/dma/dma_c2lli.rs index fdc564c..17d5d20 100644 --- a/src/dma/dma_c2lli.rs +++ b/src/dma/dma_c2lli.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,32 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `LLI` reader - "] -pub struct LLI_R(crate::FieldReader); -impl LLI_R { - pub(crate) fn new(bits: u32) -> Self { - LLI_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LLI_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type LLI_R = crate::FieldReader; #[doc = "Field `LLI` writer - "] -pub struct LLI_W<'a> { - w: &'a mut W, -} -impl<'a> LLI_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3fff_ffff << 2)) | ((value as u32 & 0x3fff_ffff) << 2); - self.w - } -} +pub type LLI_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DMA_C2LLI_SPEC, u32, u32, 30, O>; impl R { #[doc = "Bits 2:31"] #[inline(always)] pub fn lli(&self) -> LLI_R { - LLI_R::new(((self.bits >> 2) & 0x3fff_ffff) as u32) + LLI_R::new((self.bits >> 2) & 0x3fff_ffff) } } impl W { #[doc = "Bits 2:31"] #[inline(always)] - pub fn lli(&mut self) -> LLI_W { - LLI_W { w: self } + #[must_use] + pub fn lli(&mut self) -> LLI_W<2> { + LLI_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +71,10 @@ impl crate::Readable for DMA_C2LLI_SPEC { #[doc = "`write(|w| ..)` method takes [dma_c2lli::W](W) writer structure"] impl crate::Writable for DMA_C2LLI_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets DMA_C2LLI to value 0"] impl crate::Resettable for DMA_C2LLI_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/dma/dma_c2src_addr.rs b/src/dma/dma_c2src_addr.rs index e1419e0..0fee438 100644 --- a/src/dma/dma_c2src_addr.rs +++ b/src/dma/dma_c2src_addr.rs @@ -1,21 +1,22 @@ #[doc = "Register `DMA_C2SrcAddr` reader"] -pub struct R(crate::R); +pub struct R(crate::R); impl core::ops::Deref for R { - type Target = crate::R; + type Target = crate::R; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } -impl core::convert::From> for R { - fn from(reader: crate::R) -> Self { +impl From> for R { + #[inline(always)] + fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Register `DMA_C2SrcAddr` writer"] -pub struct W(crate::W); +pub struct W(crate::W); impl core::ops::Deref for W { - type Target = crate::W; + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 @@ -27,73 +28,54 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { - fn from(writer: crate::W) -> Self { +impl From> for W { + #[inline(always)] + fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `SrcAddr` reader - "] -pub struct SRCADDR_R(crate::FieldReader); -impl SRCADDR_R { - pub(crate) fn new(bits: u32) -> Self { - SRCADDR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SRCADDR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SRC_ADDR_R = crate::FieldReader; #[doc = "Field `SrcAddr` writer - "] -pub struct SRCADDR_W<'a> { - w: &'a mut W, -} -impl<'a> SRCADDR_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SRC_ADDR_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DMA_C2SRC_ADDR_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] - pub fn src_addr(&self) -> SRCADDR_R { - SRCADDR_R::new((self.bits & 0xffff_ffff) as u32) + pub fn src_addr(&self) -> SRC_ADDR_R { + SRC_ADDR_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn src_addr(&mut self) -> SRCADDR_W { - SRCADDR_W { w: self } + #[must_use] + pub fn src_addr(&mut self) -> SRC_ADDR_W<0> { + SRC_ADDR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self } } #[doc = "DMA_C2SrcAddr.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dma_c2src_addr](index.html) module"] -pub struct DMA_C2SRCADDR_SPEC; -impl crate::RegisterSpec for DMA_C2SRCADDR_SPEC { +pub struct DMA_C2SRC_ADDR_SPEC; +impl crate::RegisterSpec for DMA_C2SRC_ADDR_SPEC { type Ux = u32; } #[doc = "`read()` method returns [dma_c2src_addr::R](R) reader structure"] -impl crate::Readable for DMA_C2SRCADDR_SPEC { +impl crate::Readable for DMA_C2SRC_ADDR_SPEC { type Reader = R; } #[doc = "`write(|w| ..)` method takes [dma_c2src_addr::W](W) writer structure"] -impl crate::Writable for DMA_C2SRCADDR_SPEC { +impl crate::Writable for DMA_C2SRC_ADDR_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets DMA_C2SrcAddr to value 0"] -impl crate::Resettable for DMA_C2SRCADDR_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } +impl crate::Resettable for DMA_C2SRC_ADDR_SPEC { + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/dma/dma_c3config.rs b/src/dma/dma_c3config.rs index 367cdbb..5313933 100644 --- a/src/dma/dma_c3config.rs +++ b/src/dma/dma_c3config.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,372 +28,147 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `H` reader - "] -pub struct H_R(crate::FieldReader); -impl H_R { - pub(crate) fn new(bits: bool) -> Self { - H_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for H_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `H` writer - "] -pub struct H_W<'a> { - w: &'a mut W, -} -impl<'a> H_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18); - self.w - } -} -#[doc = "Field `A` reader - "] -pub struct A_R(crate::FieldReader); -impl A_R { - pub(crate) fn new(bits: bool) -> Self { - A_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for A_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `L` reader - "] -pub struct L_R(crate::FieldReader); -impl L_R { - pub(crate) fn new(bits: bool) -> Self { - L_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for L_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `L` writer - "] -pub struct L_W<'a> { - w: &'a mut W, -} -impl<'a> L_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `ITC` reader - "] -pub struct ITC_R(crate::FieldReader); -impl ITC_R { - pub(crate) fn new(bits: bool) -> Self { - ITC_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ITC_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ITC` writer - "] -pub struct ITC_W<'a> { - w: &'a mut W, -} -impl<'a> ITC_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15); - self.w - } -} -#[doc = "Field `IE` reader - "] -pub struct IE_R(crate::FieldReader); -impl IE_R { - pub(crate) fn new(bits: bool) -> Self { - IE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for IE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `IE` writer - "] -pub struct IE_W<'a> { - w: &'a mut W, -} -impl<'a> IE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14); - self.w - } -} -#[doc = "Field `FlowCntrl` reader - "] -pub struct FLOWCNTRL_R(crate::FieldReader); -impl FLOWCNTRL_R { - pub(crate) fn new(bits: u8) -> Self { - FLOWCNTRL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for FLOWCNTRL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `FlowCntrl` writer - "] -pub struct FLOWCNTRL_W<'a> { - w: &'a mut W, -} -impl<'a> FLOWCNTRL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 11)) | ((value as u32 & 0x07) << 11); - self.w - } -} -#[doc = "Field `DstPeripheral` reader - "] -pub struct DSTPERIPHERAL_R(crate::FieldReader); -impl DSTPERIPHERAL_R { - pub(crate) fn new(bits: u8) -> Self { - DSTPERIPHERAL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DSTPERIPHERAL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `DstPeripheral` writer - "] -pub struct DSTPERIPHERAL_W<'a> { - w: &'a mut W, -} -impl<'a> DSTPERIPHERAL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 6)) | ((value as u32 & 0x1f) << 6); - self.w - } -} -#[doc = "Field `SrcPeripheral` reader - "] -pub struct SRCPERIPHERAL_R(crate::FieldReader); -impl SRCPERIPHERAL_R { - pub(crate) fn new(bits: u8) -> Self { - SRCPERIPHERAL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SRCPERIPHERAL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `SrcPeripheral` writer - "] -pub struct SRCPERIPHERAL_W<'a> { - w: &'a mut W, -} -impl<'a> SRCPERIPHERAL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 1)) | ((value as u32 & 0x1f) << 1); - self.w - } -} #[doc = "Field `E` reader - "] -pub struct E_R(crate::FieldReader); -impl E_R { - pub(crate) fn new(bits: bool) -> Self { - E_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for E_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type E_R = crate::BitReader; #[doc = "Field `E` writer - "] -pub struct E_W<'a> { - w: &'a mut W, -} -impl<'a> E_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type E_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C3CONFIG_SPEC, bool, O>; +#[doc = "Field `SrcPeripheral` reader - "] +pub type SRC_PERIPHERAL_R = crate::FieldReader; +#[doc = "Field `SrcPeripheral` writer - "] +pub type SRC_PERIPHERAL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DMA_C3CONFIG_SPEC, u8, u8, 5, O>; +#[doc = "Field `DstPeripheral` reader - "] +pub type DST_PERIPHERAL_R = crate::FieldReader; +#[doc = "Field `DstPeripheral` writer - "] +pub type DST_PERIPHERAL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DMA_C3CONFIG_SPEC, u8, u8, 5, O>; +#[doc = "Field `FlowCntrl` reader - "] +pub type FLOW_CNTRL_R = crate::FieldReader; +#[doc = "Field `FlowCntrl` writer - "] +pub type FLOW_CNTRL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DMA_C3CONFIG_SPEC, u8, u8, 3, O>; +#[doc = "Field `IE` reader - "] +pub type IE_R = crate::BitReader; +#[doc = "Field `IE` writer - "] +pub type IE_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C3CONFIG_SPEC, bool, O>; +#[doc = "Field `ITC` reader - "] +pub type ITC_R = crate::BitReader; +#[doc = "Field `ITC` writer - "] +pub type ITC_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C3CONFIG_SPEC, bool, O>; +#[doc = "Field `L` reader - "] +pub type L_R = crate::BitReader; +#[doc = "Field `L` writer - "] +pub type L_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C3CONFIG_SPEC, bool, O>; +#[doc = "Field `A` reader - "] +pub type A_R = crate::BitReader; +#[doc = "Field `H` reader - "] +pub type H_R = crate::BitReader; +#[doc = "Field `H` writer - "] +pub type H_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C3CONFIG_SPEC, bool, O>; impl R { - #[doc = "Bit 18"] + #[doc = "Bit 0"] #[inline(always)] - pub fn h(&self) -> H_R { - H_R::new(((self.bits >> 18) & 0x01) != 0) + pub fn e(&self) -> E_R { + E_R::new((self.bits & 1) != 0) } - #[doc = "Bit 17"] + #[doc = "Bits 1:5"] #[inline(always)] - pub fn a(&self) -> A_R { - A_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn src_peripheral(&self) -> SRC_PERIPHERAL_R { + SRC_PERIPHERAL_R::new(((self.bits >> 1) & 0x1f) as u8) } - #[doc = "Bit 16"] + #[doc = "Bits 6:10"] #[inline(always)] - pub fn l(&self) -> L_R { - L_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn dst_peripheral(&self) -> DST_PERIPHERAL_R { + DST_PERIPHERAL_R::new(((self.bits >> 6) & 0x1f) as u8) } - #[doc = "Bit 15"] + #[doc = "Bits 11:13"] #[inline(always)] - pub fn itc(&self) -> ITC_R { - ITC_R::new(((self.bits >> 15) & 0x01) != 0) + pub fn flow_cntrl(&self) -> FLOW_CNTRL_R { + FLOW_CNTRL_R::new(((self.bits >> 11) & 7) as u8) } #[doc = "Bit 14"] #[inline(always)] pub fn ie(&self) -> IE_R { - IE_R::new(((self.bits >> 14) & 0x01) != 0) + IE_R::new(((self.bits >> 14) & 1) != 0) } - #[doc = "Bits 11:13"] + #[doc = "Bit 15"] #[inline(always)] - pub fn flow_cntrl(&self) -> FLOWCNTRL_R { - FLOWCNTRL_R::new(((self.bits >> 11) & 0x07) as u8) + pub fn itc(&self) -> ITC_R { + ITC_R::new(((self.bits >> 15) & 1) != 0) } - #[doc = "Bits 6:10"] + #[doc = "Bit 16"] #[inline(always)] - pub fn dst_peripheral(&self) -> DSTPERIPHERAL_R { - DSTPERIPHERAL_R::new(((self.bits >> 6) & 0x1f) as u8) + pub fn l(&self) -> L_R { + L_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bits 1:5"] + #[doc = "Bit 17"] #[inline(always)] - pub fn src_peripheral(&self) -> SRCPERIPHERAL_R { - SRCPERIPHERAL_R::new(((self.bits >> 1) & 0x1f) as u8) + pub fn a(&self) -> A_R { + A_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 18"] #[inline(always)] - pub fn e(&self) -> E_R { - E_R::new((self.bits & 0x01) != 0) + pub fn h(&self) -> H_R { + H_R::new(((self.bits >> 18) & 1) != 0) } } impl W { - #[doc = "Bit 18"] + #[doc = "Bit 0"] #[inline(always)] - pub fn h(&mut self) -> H_W { - H_W { w: self } + #[must_use] + pub fn e(&mut self) -> E_W<0> { + E_W::new(self) } - #[doc = "Bit 16"] + #[doc = "Bits 1:5"] #[inline(always)] - pub fn l(&mut self) -> L_W { - L_W { w: self } + #[must_use] + pub fn src_peripheral(&mut self) -> SRC_PERIPHERAL_W<1> { + SRC_PERIPHERAL_W::new(self) } - #[doc = "Bit 15"] + #[doc = "Bits 6:10"] #[inline(always)] - pub fn itc(&mut self) -> ITC_W { - ITC_W { w: self } + #[must_use] + pub fn dst_peripheral(&mut self) -> DST_PERIPHERAL_W<6> { + DST_PERIPHERAL_W::new(self) } - #[doc = "Bit 14"] + #[doc = "Bits 11:13"] #[inline(always)] - pub fn ie(&mut self) -> IE_W { - IE_W { w: self } + #[must_use] + pub fn flow_cntrl(&mut self) -> FLOW_CNTRL_W<11> { + FLOW_CNTRL_W::new(self) } - #[doc = "Bits 11:13"] + #[doc = "Bit 14"] #[inline(always)] - pub fn flow_cntrl(&mut self) -> FLOWCNTRL_W { - FLOWCNTRL_W { w: self } + #[must_use] + pub fn ie(&mut self) -> IE_W<14> { + IE_W::new(self) } - #[doc = "Bits 6:10"] + #[doc = "Bit 15"] #[inline(always)] - pub fn dst_peripheral(&mut self) -> DSTPERIPHERAL_W { - DSTPERIPHERAL_W { w: self } + #[must_use] + pub fn itc(&mut self) -> ITC_W<15> { + ITC_W::new(self) } - #[doc = "Bits 1:5"] + #[doc = "Bit 16"] #[inline(always)] - pub fn src_peripheral(&mut self) -> SRCPERIPHERAL_W { - SRCPERIPHERAL_W { w: self } + #[must_use] + pub fn l(&mut self) -> L_W<16> { + L_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 18"] #[inline(always)] - pub fn e(&mut self) -> E_W { - E_W { w: self } + #[must_use] + pub fn h(&mut self) -> H_W<18> { + H_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -410,11 +186,10 @@ impl crate::Readable for DMA_C3CONFIG_SPEC { #[doc = "`write(|w| ..)` method takes [dma_c3config::W](W) writer structure"] impl crate::Writable for DMA_C3CONFIG_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets DMA_C3Config to value 0"] impl crate::Resettable for DMA_C3CONFIG_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/dma/dma_c3control.rs b/src/dma/dma_c3control.rs index 02b4167..c73a292 100644 --- a/src/dma/dma_c3control.rs +++ b/src/dma/dma_c3control.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,369 +28,153 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `I` reader - "] -pub struct I_R(crate::FieldReader); -impl I_R { - pub(crate) fn new(bits: bool) -> Self { - I_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `I` writer - "] -pub struct I_W<'a> { - w: &'a mut W, -} -impl<'a> I_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 31)) | ((value as u32 & 0x01) << 31); - self.w - } -} -#[doc = "Field `Prot` reader - "] -pub struct PROT_R(crate::FieldReader); -impl PROT_R { - pub(crate) fn new(bits: u8) -> Self { - PROT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PROT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `Prot` writer - "] -pub struct PROT_W<'a> { - w: &'a mut W, -} -impl<'a> PROT_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 28)) | ((value as u32 & 0x07) << 28); - self.w - } -} -#[doc = "Field `DI` reader - "] -pub struct DI_R(crate::FieldReader); -impl DI_R { - pub(crate) fn new(bits: bool) -> Self { - DI_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DI_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `DI` writer - "] -pub struct DI_W<'a> { - w: &'a mut W, -} -impl<'a> DI_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 27)) | ((value as u32 & 0x01) << 27); - self.w - } -} -#[doc = "Field `SI` reader - "] -pub struct SI_R(crate::FieldReader); -impl SI_R { - pub(crate) fn new(bits: bool) -> Self { - SI_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SI_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `SI` writer - "] -pub struct SI_W<'a> { - w: &'a mut W, -} -impl<'a> SI_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 26)) | ((value as u32 & 0x01) << 26); - self.w - } -} -#[doc = "Field `DWidth` reader - "] -pub struct DWIDTH_R(crate::FieldReader); -impl DWIDTH_R { - pub(crate) fn new(bits: u8) -> Self { - DWIDTH_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DWIDTH_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `DWidth` writer - "] -pub struct DWIDTH_W<'a> { - w: &'a mut W, -} -impl<'a> DWIDTH_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 21)) | ((value as u32 & 0x07) << 21); - self.w - } -} -#[doc = "Field `SWidth` reader - "] -pub struct SWIDTH_R(crate::FieldReader); -impl SWIDTH_R { - pub(crate) fn new(bits: u8) -> Self { - SWIDTH_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SWIDTH_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `SWidth` writer - "] -pub struct SWIDTH_W<'a> { - w: &'a mut W, -} -impl<'a> SWIDTH_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 18)) | ((value as u32 & 0x07) << 18); - self.w - } -} -#[doc = "Field `DBSize` reader - "] -pub struct DBSIZE_R(crate::FieldReader); -impl DBSIZE_R { - pub(crate) fn new(bits: u8) -> Self { - DBSIZE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DBSIZE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `DBSize` writer - "] -pub struct DBSIZE_W<'a> { - w: &'a mut W, -} -impl<'a> DBSIZE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 15)) | ((value as u32 & 0x07) << 15); - self.w - } -} -#[doc = "Field `SBSize` reader - "] -pub struct SBSIZE_R(crate::FieldReader); -impl SBSIZE_R { - pub(crate) fn new(bits: u8) -> Self { - SBSIZE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SBSIZE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `SBSize` writer - "] -pub struct SBSIZE_W<'a> { - w: &'a mut W, -} -impl<'a> SBSIZE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 12)) | ((value as u32 & 0x07) << 12); - self.w - } -} #[doc = "Field `TransferSize` reader - "] -pub struct TRANSFERSIZE_R(crate::FieldReader); -impl TRANSFERSIZE_R { - pub(crate) fn new(bits: u16) -> Self { - TRANSFERSIZE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TRANSFERSIZE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TRANSFER_SIZE_R = crate::FieldReader; #[doc = "Field `TransferSize` writer - "] -pub struct TRANSFERSIZE_W<'a> { - w: &'a mut W, -} -impl<'a> TRANSFERSIZE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x0fff) | (value as u32 & 0x0fff); - self.w - } -} +pub type TRANSFER_SIZE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DMA_C3CONTROL_SPEC, u16, u16, 12, O>; +#[doc = "Field `SBSize` reader - "] +pub type SBSIZE_R = crate::FieldReader; +#[doc = "Field `SBSize` writer - "] +pub type SBSIZE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DMA_C3CONTROL_SPEC, u8, u8, 3, O>; +#[doc = "Field `DBSize` reader - "] +pub type DBSIZE_R = crate::FieldReader; +#[doc = "Field `DBSize` writer - "] +pub type DBSIZE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DMA_C3CONTROL_SPEC, u8, u8, 3, O>; +#[doc = "Field `SWidth` reader - "] +pub type SWIDTH_R = crate::FieldReader; +#[doc = "Field `SWidth` writer - "] +pub type SWIDTH_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DMA_C3CONTROL_SPEC, u8, u8, 3, O>; +#[doc = "Field `DWidth` reader - "] +pub type DWIDTH_R = crate::FieldReader; +#[doc = "Field `DWidth` writer - "] +pub type DWIDTH_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DMA_C3CONTROL_SPEC, u8, u8, 3, O>; +#[doc = "Field `SI` reader - "] +pub type SI_R = crate::BitReader; +#[doc = "Field `SI` writer - "] +pub type SI_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C3CONTROL_SPEC, bool, O>; +#[doc = "Field `DI` reader - "] +pub type DI_R = crate::BitReader; +#[doc = "Field `DI` writer - "] +pub type DI_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C3CONTROL_SPEC, bool, O>; +#[doc = "Field `Prot` reader - "] +pub type PROT_R = crate::FieldReader; +#[doc = "Field `Prot` writer - "] +pub type PROT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DMA_C3CONTROL_SPEC, u8, u8, 3, O>; +#[doc = "Field `I` reader - "] +pub type I_R = crate::BitReader; +#[doc = "Field `I` writer - "] +pub type I_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_C3CONTROL_SPEC, bool, O>; impl R { - #[doc = "Bit 31"] + #[doc = "Bits 0:11"] #[inline(always)] - pub fn i(&self) -> I_R { - I_R::new(((self.bits >> 31) & 0x01) != 0) + pub fn transfer_size(&self) -> TRANSFER_SIZE_R { + TRANSFER_SIZE_R::new((self.bits & 0x0fff) as u16) } - #[doc = "Bits 28:30"] + #[doc = "Bits 12:14"] #[inline(always)] - pub fn prot(&self) -> PROT_R { - PROT_R::new(((self.bits >> 28) & 0x07) as u8) + pub fn sbsize(&self) -> SBSIZE_R { + SBSIZE_R::new(((self.bits >> 12) & 7) as u8) } - #[doc = "Bit 27"] + #[doc = "Bits 15:17"] #[inline(always)] - pub fn di(&self) -> DI_R { - DI_R::new(((self.bits >> 27) & 0x01) != 0) + pub fn dbsize(&self) -> DBSIZE_R { + DBSIZE_R::new(((self.bits >> 15) & 7) as u8) } - #[doc = "Bit 26"] + #[doc = "Bits 18:20"] #[inline(always)] - pub fn si(&self) -> SI_R { - SI_R::new(((self.bits >> 26) & 0x01) != 0) + pub fn swidth(&self) -> SWIDTH_R { + SWIDTH_R::new(((self.bits >> 18) & 7) as u8) } #[doc = "Bits 21:23"] #[inline(always)] pub fn dwidth(&self) -> DWIDTH_R { - DWIDTH_R::new(((self.bits >> 21) & 0x07) as u8) + DWIDTH_R::new(((self.bits >> 21) & 7) as u8) } - #[doc = "Bits 18:20"] + #[doc = "Bit 26"] #[inline(always)] - pub fn swidth(&self) -> SWIDTH_R { - SWIDTH_R::new(((self.bits >> 18) & 0x07) as u8) + pub fn si(&self) -> SI_R { + SI_R::new(((self.bits >> 26) & 1) != 0) } - #[doc = "Bits 15:17"] + #[doc = "Bit 27"] #[inline(always)] - pub fn dbsize(&self) -> DBSIZE_R { - DBSIZE_R::new(((self.bits >> 15) & 0x07) as u8) + pub fn di(&self) -> DI_R { + DI_R::new(((self.bits >> 27) & 1) != 0) } - #[doc = "Bits 12:14"] + #[doc = "Bits 28:30"] #[inline(always)] - pub fn sbsize(&self) -> SBSIZE_R { - SBSIZE_R::new(((self.bits >> 12) & 0x07) as u8) + pub fn prot(&self) -> PROT_R { + PROT_R::new(((self.bits >> 28) & 7) as u8) } - #[doc = "Bits 0:11"] + #[doc = "Bit 31"] #[inline(always)] - pub fn transfer_size(&self) -> TRANSFERSIZE_R { - TRANSFERSIZE_R::new((self.bits & 0x0fff) as u16) + pub fn i(&self) -> I_R { + I_R::new(((self.bits >> 31) & 1) != 0) } } impl W { - #[doc = "Bit 31"] + #[doc = "Bits 0:11"] #[inline(always)] - pub fn i(&mut self) -> I_W { - I_W { w: self } + #[must_use] + pub fn transfer_size(&mut self) -> TRANSFER_SIZE_W<0> { + TRANSFER_SIZE_W::new(self) } - #[doc = "Bits 28:30"] + #[doc = "Bits 12:14"] #[inline(always)] - pub fn prot(&mut self) -> PROT_W { - PROT_W { w: self } + #[must_use] + pub fn sbsize(&mut self) -> SBSIZE_W<12> { + SBSIZE_W::new(self) } - #[doc = "Bit 27"] + #[doc = "Bits 15:17"] #[inline(always)] - pub fn di(&mut self) -> DI_W { - DI_W { w: self } + #[must_use] + pub fn dbsize(&mut self) -> DBSIZE_W<15> { + DBSIZE_W::new(self) } - #[doc = "Bit 26"] + #[doc = "Bits 18:20"] #[inline(always)] - pub fn si(&mut self) -> SI_W { - SI_W { w: self } + #[must_use] + pub fn swidth(&mut self) -> SWIDTH_W<18> { + SWIDTH_W::new(self) } #[doc = "Bits 21:23"] #[inline(always)] - pub fn dwidth(&mut self) -> DWIDTH_W { - DWIDTH_W { w: self } + #[must_use] + pub fn dwidth(&mut self) -> DWIDTH_W<21> { + DWIDTH_W::new(self) } - #[doc = "Bits 18:20"] + #[doc = "Bit 26"] #[inline(always)] - pub fn swidth(&mut self) -> SWIDTH_W { - SWIDTH_W { w: self } + #[must_use] + pub fn si(&mut self) -> SI_W<26> { + SI_W::new(self) } - #[doc = "Bits 15:17"] + #[doc = "Bit 27"] #[inline(always)] - pub fn dbsize(&mut self) -> DBSIZE_W { - DBSIZE_W { w: self } + #[must_use] + pub fn di(&mut self) -> DI_W<27> { + DI_W::new(self) } - #[doc = "Bits 12:14"] + #[doc = "Bits 28:30"] #[inline(always)] - pub fn sbsize(&mut self) -> SBSIZE_W { - SBSIZE_W { w: self } + #[must_use] + pub fn prot(&mut self) -> PROT_W<28> { + PROT_W::new(self) } - #[doc = "Bits 0:11"] + #[doc = "Bit 31"] #[inline(always)] - pub fn transfer_size(&mut self) -> TRANSFERSIZE_W { - TRANSFERSIZE_W { w: self } + #[must_use] + pub fn i(&mut self) -> I_W<31> { + I_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -407,11 +192,10 @@ impl crate::Readable for DMA_C3CONTROL_SPEC { #[doc = "`write(|w| ..)` method takes [dma_c3control::W](W) writer structure"] impl crate::Writable for DMA_C3CONTROL_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets DMA_C3Control to value 0x0c48_9000"] impl crate::Resettable for DMA_C3CONTROL_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0c48_9000 - } + const RESET_VALUE: Self::Ux = 0x0c48_9000; } diff --git a/src/dma/dma_c3dst_addr.rs b/src/dma/dma_c3dst_addr.rs index f2982bf..367f43e 100644 --- a/src/dma/dma_c3dst_addr.rs +++ b/src/dma/dma_c3dst_addr.rs @@ -1,21 +1,22 @@ #[doc = "Register `DMA_C3DstAddr` reader"] -pub struct R(crate::R); +pub struct R(crate::R); impl core::ops::Deref for R { - type Target = crate::R; + type Target = crate::R; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } -impl core::convert::From> for R { - fn from(reader: crate::R) -> Self { +impl From> for R { + #[inline(always)] + fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Register `DMA_C3DstAddr` writer"] -pub struct W(crate::W); +pub struct W(crate::W); impl core::ops::Deref for W { - type Target = crate::W; + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 @@ -27,73 +28,54 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { - fn from(writer: crate::W) -> Self { +impl From> for W { + #[inline(always)] + fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `DstAddr` reader - "] -pub struct DSTADDR_R(crate::FieldReader); -impl DSTADDR_R { - pub(crate) fn new(bits: u32) -> Self { - DSTADDR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DSTADDR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type DST_ADDR_R = crate::FieldReader; #[doc = "Field `DstAddr` writer - "] -pub struct DSTADDR_W<'a> { - w: &'a mut W, -} -impl<'a> DSTADDR_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type DST_ADDR_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DMA_C3DST_ADDR_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] - pub fn dst_addr(&self) -> DSTADDR_R { - DSTADDR_R::new((self.bits & 0xffff_ffff) as u32) + pub fn dst_addr(&self) -> DST_ADDR_R { + DST_ADDR_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn dst_addr(&mut self) -> DSTADDR_W { - DSTADDR_W { w: self } + #[must_use] + pub fn dst_addr(&mut self) -> DST_ADDR_W<0> { + DST_ADDR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self } } #[doc = "DMA_C3DstAddr.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dma_c3dst_addr](index.html) module"] -pub struct DMA_C3DSTADDR_SPEC; -impl crate::RegisterSpec for DMA_C3DSTADDR_SPEC { +pub struct DMA_C3DST_ADDR_SPEC; +impl crate::RegisterSpec for DMA_C3DST_ADDR_SPEC { type Ux = u32; } #[doc = "`read()` method returns [dma_c3dst_addr::R](R) reader structure"] -impl crate::Readable for DMA_C3DSTADDR_SPEC { +impl crate::Readable for DMA_C3DST_ADDR_SPEC { type Reader = R; } #[doc = "`write(|w| ..)` method takes [dma_c3dst_addr::W](W) writer structure"] -impl crate::Writable for DMA_C3DSTADDR_SPEC { +impl crate::Writable for DMA_C3DST_ADDR_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets DMA_C3DstAddr to value 0"] -impl crate::Resettable for DMA_C3DSTADDR_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } +impl crate::Resettable for DMA_C3DST_ADDR_SPEC { + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/dma/dma_c3lli.rs b/src/dma/dma_c3lli.rs index 0268859..ed60237 100644 --- a/src/dma/dma_c3lli.rs +++ b/src/dma/dma_c3lli.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,32 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `LLI` reader - "] -pub struct LLI_R(crate::FieldReader); -impl LLI_R { - pub(crate) fn new(bits: u32) -> Self { - LLI_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LLI_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type LLI_R = crate::FieldReader; #[doc = "Field `LLI` writer - "] -pub struct LLI_W<'a> { - w: &'a mut W, -} -impl<'a> LLI_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3fff_ffff << 2)) | ((value as u32 & 0x3fff_ffff) << 2); - self.w - } -} +pub type LLI_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DMA_C3LLI_SPEC, u32, u32, 30, O>; impl R { #[doc = "Bits 2:31"] #[inline(always)] pub fn lli(&self) -> LLI_R { - LLI_R::new(((self.bits >> 2) & 0x3fff_ffff) as u32) + LLI_R::new((self.bits >> 2) & 0x3fff_ffff) } } impl W { #[doc = "Bits 2:31"] #[inline(always)] - pub fn lli(&mut self) -> LLI_W { - LLI_W { w: self } + #[must_use] + pub fn lli(&mut self) -> LLI_W<2> { + LLI_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +71,10 @@ impl crate::Readable for DMA_C3LLI_SPEC { #[doc = "`write(|w| ..)` method takes [dma_c3lli::W](W) writer structure"] impl crate::Writable for DMA_C3LLI_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets DMA_C3LLI to value 0"] impl crate::Resettable for DMA_C3LLI_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/dma/dma_c3src_addr.rs b/src/dma/dma_c3src_addr.rs index d792804..3ac4717 100644 --- a/src/dma/dma_c3src_addr.rs +++ b/src/dma/dma_c3src_addr.rs @@ -1,21 +1,22 @@ #[doc = "Register `DMA_C3SrcAddr` reader"] -pub struct R(crate::R); +pub struct R(crate::R); impl core::ops::Deref for R { - type Target = crate::R; + type Target = crate::R; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } -impl core::convert::From> for R { - fn from(reader: crate::R) -> Self { +impl From> for R { + #[inline(always)] + fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Register `DMA_C3SrcAddr` writer"] -pub struct W(crate::W); +pub struct W(crate::W); impl core::ops::Deref for W { - type Target = crate::W; + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 @@ -27,73 +28,54 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { - fn from(writer: crate::W) -> Self { +impl From> for W { + #[inline(always)] + fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `SrcAddr` reader - "] -pub struct SRCADDR_R(crate::FieldReader); -impl SRCADDR_R { - pub(crate) fn new(bits: u32) -> Self { - SRCADDR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SRCADDR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SRC_ADDR_R = crate::FieldReader; #[doc = "Field `SrcAddr` writer - "] -pub struct SRCADDR_W<'a> { - w: &'a mut W, -} -impl<'a> SRCADDR_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SRC_ADDR_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DMA_C3SRC_ADDR_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] - pub fn src_addr(&self) -> SRCADDR_R { - SRCADDR_R::new((self.bits & 0xffff_ffff) as u32) + pub fn src_addr(&self) -> SRC_ADDR_R { + SRC_ADDR_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn src_addr(&mut self) -> SRCADDR_W { - SRCADDR_W { w: self } + #[must_use] + pub fn src_addr(&mut self) -> SRC_ADDR_W<0> { + SRC_ADDR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self } } #[doc = "DMA_C3SrcAddr.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dma_c3src_addr](index.html) module"] -pub struct DMA_C3SRCADDR_SPEC; -impl crate::RegisterSpec for DMA_C3SRCADDR_SPEC { +pub struct DMA_C3SRC_ADDR_SPEC; +impl crate::RegisterSpec for DMA_C3SRC_ADDR_SPEC { type Ux = u32; } #[doc = "`read()` method returns [dma_c3src_addr::R](R) reader structure"] -impl crate::Readable for DMA_C3SRCADDR_SPEC { +impl crate::Readable for DMA_C3SRC_ADDR_SPEC { type Reader = R; } #[doc = "`write(|w| ..)` method takes [dma_c3src_addr::W](W) writer structure"] -impl crate::Writable for DMA_C3SRCADDR_SPEC { +impl crate::Writable for DMA_C3SRC_ADDR_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets DMA_C3SrcAddr to value 0"] -impl crate::Resettable for DMA_C3SRCADDR_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } +impl crate::Resettable for DMA_C3SRC_ADDR_SPEC { + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/dma/dma_enbld_chns.rs b/src/dma/dma_enbld_chns.rs index 08cca12..5765ac8 100644 --- a/src/dma/dma_enbld_chns.rs +++ b/src/dma/dma_enbld_chns.rs @@ -1,51 +1,72 @@ #[doc = "Register `DMA_EnbldChns` reader"] -pub struct R(crate::R); +pub struct R(crate::R); impl core::ops::Deref for R { - type Target = crate::R; + type Target = crate::R; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } -impl core::convert::From> for R { - fn from(reader: crate::R) -> Self { +impl From> for R { + #[inline(always)] + fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `EnabledChannels` reader - "] -pub struct ENABLEDCHANNELS_R(crate::FieldReader); -impl ENABLEDCHANNELS_R { - pub(crate) fn new(bits: u8) -> Self { - ENABLEDCHANNELS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ENABLEDCHANNELS_R { - type Target = crate::FieldReader; +#[doc = "Register `DMA_EnbldChns` writer"] +pub struct W(crate::W); +impl core::ops::Deref for W { + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } +impl core::ops::DerefMut for W { + #[inline(always)] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } +} +impl From> for W { + #[inline(always)] + fn from(writer: crate::W) -> Self { + W(writer) + } +} +#[doc = "Field `EnabledChannels` reader - "] +pub type ENABLED_CHANNELS_R = crate::FieldReader; impl R { #[doc = "Bits 0:7"] #[inline(always)] - pub fn enabled_channels(&self) -> ENABLEDCHANNELS_R { - ENABLEDCHANNELS_R::new((self.bits & 0xff) as u8) + pub fn enabled_channels(&self) -> ENABLED_CHANNELS_R { + ENABLED_CHANNELS_R::new((self.bits & 0xff) as u8) + } +} +impl W { + #[doc = "Writes raw bits to the register."] + #[inline(always)] + pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { + self.0.bits(bits); + self } } -#[doc = "DMA_EnbldChns.\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 [dma_enbld_chns](index.html) module"] -pub struct DMA_ENBLDCHNS_SPEC; -impl crate::RegisterSpec for DMA_ENBLDCHNS_SPEC { +#[doc = "DMA_EnbldChns.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dma_enbld_chns](index.html) module"] +pub struct DMA_ENBLD_CHNS_SPEC; +impl crate::RegisterSpec for DMA_ENBLD_CHNS_SPEC { type Ux = u32; } #[doc = "`read()` method returns [dma_enbld_chns::R](R) reader structure"] -impl crate::Readable for DMA_ENBLDCHNS_SPEC { +impl crate::Readable for DMA_ENBLD_CHNS_SPEC { type Reader = R; } +#[doc = "`write(|w| ..)` method takes [dma_enbld_chns::W](W) writer structure"] +impl crate::Writable for DMA_ENBLD_CHNS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} #[doc = "`reset()` method sets DMA_EnbldChns to value 0"] -impl crate::Resettable for DMA_ENBLDCHNS_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } +impl crate::Resettable for DMA_ENBLD_CHNS_SPEC { + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/dma/dma_int_err_clr.rs b/src/dma/dma_int_err_clr.rs index 12e101b..63fd86b 100644 --- a/src/dma/dma_int_err_clr.rs +++ b/src/dma/dma_int_err_clr.rs @@ -1,7 +1,22 @@ +#[doc = "Register `DMA_IntErrClr` reader"] +pub struct R(crate::R); +impl core::ops::Deref for R { + type Target = crate::R; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +impl From> for R { + #[inline(always)] + fn from(reader: crate::R) -> Self { + R(reader) + } +} #[doc = "Register `DMA_IntErrClr` writer"] -pub struct W(crate::W); +pub struct W(crate::W); impl core::ops::Deref for W { - type Target = crate::W; + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 @@ -13,48 +28,45 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { - fn from(writer: crate::W) -> Self { +impl From> for W { + #[inline(always)] + fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `IntErrClr` writer - "] -pub struct INTERRCLR_W<'a> { - w: &'a mut W, -} -impl<'a> INTERRCLR_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff); - self.w - } -} +pub type INT_ERR_CLR_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DMA_INT_ERR_CLR_SPEC, u8, u8, 8, O>; impl W { #[doc = "Bits 0:7"] #[inline(always)] - pub fn int_err_clr(&mut self) -> INTERRCLR_W { - INTERRCLR_W { w: self } + #[must_use] + pub fn int_err_clr(&mut self) -> INT_ERR_CLR_W<0> { + INT_ERR_CLR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self } } -#[doc = "DMA_IntErrClr.\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dma_int_err_clr](index.html) module"] -pub struct DMA_INTERRCLR_SPEC; -impl crate::RegisterSpec for DMA_INTERRCLR_SPEC { +#[doc = "DMA_IntErrClr.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dma_int_err_clr](index.html) module"] +pub struct DMA_INT_ERR_CLR_SPEC; +impl crate::RegisterSpec for DMA_INT_ERR_CLR_SPEC { type Ux = u32; } +#[doc = "`read()` method returns [dma_int_err_clr::R](R) reader structure"] +impl crate::Readable for DMA_INT_ERR_CLR_SPEC { + type Reader = R; +} #[doc = "`write(|w| ..)` method takes [dma_int_err_clr::W](W) writer structure"] -impl crate::Writable for DMA_INTERRCLR_SPEC { +impl crate::Writable for DMA_INT_ERR_CLR_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets DMA_IntErrClr to value 0"] -impl crate::Resettable for DMA_INTERRCLR_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } +impl crate::Resettable for DMA_INT_ERR_CLR_SPEC { + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/dma/dma_int_error_status.rs b/src/dma/dma_int_error_status.rs index 8eb3ebc..363c35b 100644 --- a/src/dma/dma_int_error_status.rs +++ b/src/dma/dma_int_error_status.rs @@ -1,51 +1,72 @@ #[doc = "Register `DMA_IntErrorStatus` reader"] -pub struct R(crate::R); +pub struct R(crate::R); impl core::ops::Deref for R { - type Target = crate::R; + type Target = crate::R; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } -impl core::convert::From> for R { - fn from(reader: crate::R) -> Self { +impl From> for R { + #[inline(always)] + fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `IntErrorStatus` reader - "] -pub struct INTERRORSTATUS_R(crate::FieldReader); -impl INTERRORSTATUS_R { - pub(crate) fn new(bits: u8) -> Self { - INTERRORSTATUS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for INTERRORSTATUS_R { - type Target = crate::FieldReader; +#[doc = "Register `DMA_IntErrorStatus` writer"] +pub struct W(crate::W); +impl core::ops::Deref for W { + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } +impl core::ops::DerefMut for W { + #[inline(always)] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } +} +impl From> for W { + #[inline(always)] + fn from(writer: crate::W) -> Self { + W(writer) + } +} +#[doc = "Field `IntErrorStatus` reader - "] +pub type INT_ERROR_STATUS_R = crate::FieldReader; impl R { #[doc = "Bits 0:7"] #[inline(always)] - pub fn int_error_status(&self) -> INTERRORSTATUS_R { - INTERRORSTATUS_R::new((self.bits & 0xff) as u8) + pub fn int_error_status(&self) -> INT_ERROR_STATUS_R { + INT_ERROR_STATUS_R::new((self.bits & 0xff) as u8) + } +} +impl W { + #[doc = "Writes raw bits to the register."] + #[inline(always)] + pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { + self.0.bits(bits); + self } } -#[doc = "DMA_IntErrorStatus.\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 [dma_int_error_status](index.html) module"] -pub struct DMA_INTERRORSTATUS_SPEC; -impl crate::RegisterSpec for DMA_INTERRORSTATUS_SPEC { +#[doc = "DMA_IntErrorStatus.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dma_int_error_status](index.html) module"] +pub struct DMA_INT_ERROR_STATUS_SPEC; +impl crate::RegisterSpec for DMA_INT_ERROR_STATUS_SPEC { type Ux = u32; } #[doc = "`read()` method returns [dma_int_error_status::R](R) reader structure"] -impl crate::Readable for DMA_INTERRORSTATUS_SPEC { +impl crate::Readable for DMA_INT_ERROR_STATUS_SPEC { type Reader = R; } +#[doc = "`write(|w| ..)` method takes [dma_int_error_status::W](W) writer structure"] +impl crate::Writable for DMA_INT_ERROR_STATUS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} #[doc = "`reset()` method sets DMA_IntErrorStatus to value 0"] -impl crate::Resettable for DMA_INTERRORSTATUS_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } +impl crate::Resettable for DMA_INT_ERROR_STATUS_SPEC { + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/dma/dma_int_status.rs b/src/dma/dma_int_status.rs index 87c42b2..9321c95 100644 --- a/src/dma/dma_int_status.rs +++ b/src/dma/dma_int_status.rs @@ -1,51 +1,72 @@ #[doc = "Register `DMA_IntStatus` reader"] -pub struct R(crate::R); +pub struct R(crate::R); impl core::ops::Deref for R { - type Target = crate::R; + type Target = crate::R; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } -impl core::convert::From> for R { - fn from(reader: crate::R) -> Self { +impl From> for R { + #[inline(always)] + fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `IntStatus` reader - "] -pub struct INTSTATUS_R(crate::FieldReader); -impl INTSTATUS_R { - pub(crate) fn new(bits: u8) -> Self { - INTSTATUS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for INTSTATUS_R { - type Target = crate::FieldReader; +#[doc = "Register `DMA_IntStatus` writer"] +pub struct W(crate::W); +impl core::ops::Deref for W { + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } +impl core::ops::DerefMut for W { + #[inline(always)] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } +} +impl From> for W { + #[inline(always)] + fn from(writer: crate::W) -> Self { + W(writer) + } +} +#[doc = "Field `IntStatus` reader - "] +pub type INT_STATUS_R = crate::FieldReader; impl R { #[doc = "Bits 0:7"] #[inline(always)] - pub fn int_status(&self) -> INTSTATUS_R { - INTSTATUS_R::new((self.bits & 0xff) as u8) + pub fn int_status(&self) -> INT_STATUS_R { + INT_STATUS_R::new((self.bits & 0xff) as u8) + } +} +impl W { + #[doc = "Writes raw bits to the register."] + #[inline(always)] + pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { + self.0.bits(bits); + self } } -#[doc = "DMA_IntStatus.\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 [dma_int_status](index.html) module"] -pub struct DMA_INTSTATUS_SPEC; -impl crate::RegisterSpec for DMA_INTSTATUS_SPEC { +#[doc = "DMA_IntStatus.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dma_int_status](index.html) module"] +pub struct DMA_INT_STATUS_SPEC; +impl crate::RegisterSpec for DMA_INT_STATUS_SPEC { type Ux = u32; } #[doc = "`read()` method returns [dma_int_status::R](R) reader structure"] -impl crate::Readable for DMA_INTSTATUS_SPEC { +impl crate::Readable for DMA_INT_STATUS_SPEC { type Reader = R; } +#[doc = "`write(|w| ..)` method takes [dma_int_status::W](W) writer structure"] +impl crate::Writable for DMA_INT_STATUS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} #[doc = "`reset()` method sets DMA_IntStatus to value 0"] -impl crate::Resettable for DMA_INTSTATUS_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } +impl crate::Resettable for DMA_INT_STATUS_SPEC { + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/dma/dma_int_tcclear.rs b/src/dma/dma_int_tcclear.rs index d0ab15b..7edd566 100644 --- a/src/dma/dma_int_tcclear.rs +++ b/src/dma/dma_int_tcclear.rs @@ -1,7 +1,22 @@ +#[doc = "Register `DMA_IntTCClear` reader"] +pub struct R(crate::R); +impl core::ops::Deref for R { + type Target = crate::R; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +impl From> for R { + #[inline(always)] + fn from(reader: crate::R) -> Self { + R(reader) + } +} #[doc = "Register `DMA_IntTCClear` writer"] -pub struct W(crate::W); +pub struct W(crate::W); impl core::ops::Deref for W { - type Target = crate::W; + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 @@ -13,48 +28,45 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { - fn from(writer: crate::W) -> Self { +impl From> for W { + #[inline(always)] + fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `IntTCClear` writer - "] -pub struct INTTCCLEAR_W<'a> { - w: &'a mut W, -} -impl<'a> INTTCCLEAR_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff); - self.w - } -} +pub type INT_TCCLEAR_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DMA_INT_TCCLEAR_SPEC, u8, u8, 8, O>; impl W { #[doc = "Bits 0:7"] #[inline(always)] - pub fn int_tcclear(&mut self) -> INTTCCLEAR_W { - INTTCCLEAR_W { w: self } + #[must_use] + pub fn int_tcclear(&mut self) -> INT_TCCLEAR_W<0> { + INT_TCCLEAR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self } } -#[doc = "DMA_IntTCClear.\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dma_int_tcclear](index.html) module"] -pub struct DMA_INTTCCLEAR_SPEC; -impl crate::RegisterSpec for DMA_INTTCCLEAR_SPEC { +#[doc = "DMA_IntTCClear.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dma_int_tcclear](index.html) module"] +pub struct DMA_INT_TCCLEAR_SPEC; +impl crate::RegisterSpec for DMA_INT_TCCLEAR_SPEC { type Ux = u32; } +#[doc = "`read()` method returns [dma_int_tcclear::R](R) reader structure"] +impl crate::Readable for DMA_INT_TCCLEAR_SPEC { + type Reader = R; +} #[doc = "`write(|w| ..)` method takes [dma_int_tcclear::W](W) writer structure"] -impl crate::Writable for DMA_INTTCCLEAR_SPEC { +impl crate::Writable for DMA_INT_TCCLEAR_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets DMA_IntTCClear to value 0"] -impl crate::Resettable for DMA_INTTCCLEAR_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } +impl crate::Resettable for DMA_INT_TCCLEAR_SPEC { + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/dma/dma_int_tcstatus.rs b/src/dma/dma_int_tcstatus.rs index 495ef5e..763da1e 100644 --- a/src/dma/dma_int_tcstatus.rs +++ b/src/dma/dma_int_tcstatus.rs @@ -1,51 +1,72 @@ #[doc = "Register `DMA_IntTCStatus` reader"] -pub struct R(crate::R); +pub struct R(crate::R); impl core::ops::Deref for R { - type Target = crate::R; + type Target = crate::R; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } -impl core::convert::From> for R { - fn from(reader: crate::R) -> Self { +impl From> for R { + #[inline(always)] + fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `IntTCStatus` reader - "] -pub struct INTTCSTATUS_R(crate::FieldReader); -impl INTTCSTATUS_R { - pub(crate) fn new(bits: u8) -> Self { - INTTCSTATUS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for INTTCSTATUS_R { - type Target = crate::FieldReader; +#[doc = "Register `DMA_IntTCStatus` writer"] +pub struct W(crate::W); +impl core::ops::Deref for W { + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } +impl core::ops::DerefMut for W { + #[inline(always)] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } +} +impl From> for W { + #[inline(always)] + fn from(writer: crate::W) -> Self { + W(writer) + } +} +#[doc = "Field `IntTCStatus` reader - "] +pub type INT_TCSTATUS_R = crate::FieldReader; impl R { #[doc = "Bits 0:7"] #[inline(always)] - pub fn int_tcstatus(&self) -> INTTCSTATUS_R { - INTTCSTATUS_R::new((self.bits & 0xff) as u8) + pub fn int_tcstatus(&self) -> INT_TCSTATUS_R { + INT_TCSTATUS_R::new((self.bits & 0xff) as u8) + } +} +impl W { + #[doc = "Writes raw bits to the register."] + #[inline(always)] + pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { + self.0.bits(bits); + self } } -#[doc = "DMA_IntTCStatus.\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 [dma_int_tcstatus](index.html) module"] -pub struct DMA_INTTCSTATUS_SPEC; -impl crate::RegisterSpec for DMA_INTTCSTATUS_SPEC { +#[doc = "DMA_IntTCStatus.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dma_int_tcstatus](index.html) module"] +pub struct DMA_INT_TCSTATUS_SPEC; +impl crate::RegisterSpec for DMA_INT_TCSTATUS_SPEC { type Ux = u32; } #[doc = "`read()` method returns [dma_int_tcstatus::R](R) reader structure"] -impl crate::Readable for DMA_INTTCSTATUS_SPEC { +impl crate::Readable for DMA_INT_TCSTATUS_SPEC { type Reader = R; } +#[doc = "`write(|w| ..)` method takes [dma_int_tcstatus::W](W) writer structure"] +impl crate::Writable for DMA_INT_TCSTATUS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} #[doc = "`reset()` method sets DMA_IntTCStatus to value 0"] -impl crate::Resettable for DMA_INTTCSTATUS_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } +impl crate::Resettable for DMA_INT_TCSTATUS_SPEC { + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/dma/dma_raw_int_error_status.rs b/src/dma/dma_raw_int_error_status.rs index c8bcb7a..c6d481c 100644 --- a/src/dma/dma_raw_int_error_status.rs +++ b/src/dma/dma_raw_int_error_status.rs @@ -1,51 +1,72 @@ #[doc = "Register `DMA_RawIntErrorStatus` reader"] -pub struct R(crate::R); +pub struct R(crate::R); impl core::ops::Deref for R { - type Target = crate::R; + type Target = crate::R; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } -impl core::convert::From> for R { - fn from(reader: crate::R) -> Self { +impl From> for R { + #[inline(always)] + fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `RawIntErrorStatus` reader - "] -pub struct RAWINTERRORSTATUS_R(crate::FieldReader); -impl RAWINTERRORSTATUS_R { - pub(crate) fn new(bits: u8) -> Self { - RAWINTERRORSTATUS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RAWINTERRORSTATUS_R { - type Target = crate::FieldReader; +#[doc = "Register `DMA_RawIntErrorStatus` writer"] +pub struct W(crate::W); +impl core::ops::Deref for W { + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } +impl core::ops::DerefMut for W { + #[inline(always)] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } +} +impl From> for W { + #[inline(always)] + fn from(writer: crate::W) -> Self { + W(writer) + } +} +#[doc = "Field `RawIntErrorStatus` reader - "] +pub type RAW_INT_ERROR_STATUS_R = crate::FieldReader; impl R { #[doc = "Bits 0:7"] #[inline(always)] - pub fn raw_int_error_status(&self) -> RAWINTERRORSTATUS_R { - RAWINTERRORSTATUS_R::new((self.bits & 0xff) as u8) + pub fn raw_int_error_status(&self) -> RAW_INT_ERROR_STATUS_R { + RAW_INT_ERROR_STATUS_R::new((self.bits & 0xff) as u8) + } +} +impl W { + #[doc = "Writes raw bits to the register."] + #[inline(always)] + pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { + self.0.bits(bits); + self } } -#[doc = "DMA_RawIntErrorStatus.\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 [dma_raw_int_error_status](index.html) module"] -pub struct DMA_RAWINTERRORSTATUS_SPEC; -impl crate::RegisterSpec for DMA_RAWINTERRORSTATUS_SPEC { +#[doc = "DMA_RawIntErrorStatus.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dma_raw_int_error_status](index.html) module"] +pub struct DMA_RAW_INT_ERROR_STATUS_SPEC; +impl crate::RegisterSpec for DMA_RAW_INT_ERROR_STATUS_SPEC { type Ux = u32; } #[doc = "`read()` method returns [dma_raw_int_error_status::R](R) reader structure"] -impl crate::Readable for DMA_RAWINTERRORSTATUS_SPEC { +impl crate::Readable for DMA_RAW_INT_ERROR_STATUS_SPEC { type Reader = R; } +#[doc = "`write(|w| ..)` method takes [dma_raw_int_error_status::W](W) writer structure"] +impl crate::Writable for DMA_RAW_INT_ERROR_STATUS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} #[doc = "`reset()` method sets DMA_RawIntErrorStatus to value 0"] -impl crate::Resettable for DMA_RAWINTERRORSTATUS_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } +impl crate::Resettable for DMA_RAW_INT_ERROR_STATUS_SPEC { + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/dma/dma_raw_int_tcstatus.rs b/src/dma/dma_raw_int_tcstatus.rs index 70533e4..f7698a1 100644 --- a/src/dma/dma_raw_int_tcstatus.rs +++ b/src/dma/dma_raw_int_tcstatus.rs @@ -1,51 +1,72 @@ #[doc = "Register `DMA_RawIntTCStatus` reader"] -pub struct R(crate::R); +pub struct R(crate::R); impl core::ops::Deref for R { - type Target = crate::R; + type Target = crate::R; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } -impl core::convert::From> for R { - fn from(reader: crate::R) -> Self { +impl From> for R { + #[inline(always)] + fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `RawIntTCStatus` reader - "] -pub struct RAWINTTCSTATUS_R(crate::FieldReader); -impl RAWINTTCSTATUS_R { - pub(crate) fn new(bits: u8) -> Self { - RAWINTTCSTATUS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RAWINTTCSTATUS_R { - type Target = crate::FieldReader; +#[doc = "Register `DMA_RawIntTCStatus` writer"] +pub struct W(crate::W); +impl core::ops::Deref for W { + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } +impl core::ops::DerefMut for W { + #[inline(always)] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } +} +impl From> for W { + #[inline(always)] + fn from(writer: crate::W) -> Self { + W(writer) + } +} +#[doc = "Field `RawIntTCStatus` reader - "] +pub type RAW_INT_TCSTATUS_R = crate::FieldReader; impl R { #[doc = "Bits 0:7"] #[inline(always)] - pub fn raw_int_tcstatus(&self) -> RAWINTTCSTATUS_R { - RAWINTTCSTATUS_R::new((self.bits & 0xff) as u8) + pub fn raw_int_tcstatus(&self) -> RAW_INT_TCSTATUS_R { + RAW_INT_TCSTATUS_R::new((self.bits & 0xff) as u8) + } +} +impl W { + #[doc = "Writes raw bits to the register."] + #[inline(always)] + pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { + self.0.bits(bits); + self } } -#[doc = "DMA_RawIntTCStatus.\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 [dma_raw_int_tcstatus](index.html) module"] -pub struct DMA_RAWINTTCSTATUS_SPEC; -impl crate::RegisterSpec for DMA_RAWINTTCSTATUS_SPEC { +#[doc = "DMA_RawIntTCStatus.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dma_raw_int_tcstatus](index.html) module"] +pub struct DMA_RAW_INT_TCSTATUS_SPEC; +impl crate::RegisterSpec for DMA_RAW_INT_TCSTATUS_SPEC { type Ux = u32; } #[doc = "`read()` method returns [dma_raw_int_tcstatus::R](R) reader structure"] -impl crate::Readable for DMA_RAWINTTCSTATUS_SPEC { +impl crate::Readable for DMA_RAW_INT_TCSTATUS_SPEC { type Reader = R; } +#[doc = "`write(|w| ..)` method takes [dma_raw_int_tcstatus::W](W) writer structure"] +impl crate::Writable for DMA_RAW_INT_TCSTATUS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} #[doc = "`reset()` method sets DMA_RawIntTCStatus to value 0"] -impl crate::Resettable for DMA_RAWINTTCSTATUS_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } +impl crate::Resettable for DMA_RAW_INT_TCSTATUS_SPEC { + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/dma/dma_soft_breq.rs b/src/dma/dma_soft_breq.rs index 60b9d82..c1e6904 100644 --- a/src/dma/dma_soft_breq.rs +++ b/src/dma/dma_soft_breq.rs @@ -1,21 +1,22 @@ #[doc = "Register `DMA_SoftBReq` reader"] -pub struct R(crate::R); +pub struct R(crate::R); impl core::ops::Deref for R { - type Target = crate::R; + type Target = crate::R; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } -impl core::convert::From> for R { - fn from(reader: crate::R) -> Self { +impl From> for R { + #[inline(always)] + fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Register `DMA_SoftBReq` writer"] -pub struct W(crate::W); +pub struct W(crate::W); impl core::ops::Deref for W { - type Target = crate::W; + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 @@ -27,73 +28,54 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { - fn from(writer: crate::W) -> Self { +impl From> for W { + #[inline(always)] + fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `SoftBReq` reader - "] -pub struct SOFTBREQ_R(crate::FieldReader); -impl SOFTBREQ_R { - pub(crate) fn new(bits: u32) -> Self { - SOFTBREQ_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SOFTBREQ_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SOFT_BREQ_R = crate::FieldReader; #[doc = "Field `SoftBReq` writer - "] -pub struct SOFTBREQ_W<'a> { - w: &'a mut W, -} -impl<'a> SOFTBREQ_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SOFT_BREQ_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DMA_SOFT_BREQ_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] - pub fn soft_breq(&self) -> SOFTBREQ_R { - SOFTBREQ_R::new((self.bits & 0xffff_ffff) as u32) + pub fn soft_breq(&self) -> SOFT_BREQ_R { + SOFT_BREQ_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn soft_breq(&mut self) -> SOFTBREQ_W { - SOFTBREQ_W { w: self } + #[must_use] + pub fn soft_breq(&mut self) -> SOFT_BREQ_W<0> { + SOFT_BREQ_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self } } #[doc = "DMA_SoftBReq.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dma_soft_breq](index.html) module"] -pub struct DMA_SOFTBREQ_SPEC; -impl crate::RegisterSpec for DMA_SOFTBREQ_SPEC { +pub struct DMA_SOFT_BREQ_SPEC; +impl crate::RegisterSpec for DMA_SOFT_BREQ_SPEC { type Ux = u32; } #[doc = "`read()` method returns [dma_soft_breq::R](R) reader structure"] -impl crate::Readable for DMA_SOFTBREQ_SPEC { +impl crate::Readable for DMA_SOFT_BREQ_SPEC { type Reader = R; } #[doc = "`write(|w| ..)` method takes [dma_soft_breq::W](W) writer structure"] -impl crate::Writable for DMA_SOFTBREQ_SPEC { +impl crate::Writable for DMA_SOFT_BREQ_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets DMA_SoftBReq to value 0"] -impl crate::Resettable for DMA_SOFTBREQ_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } +impl crate::Resettable for DMA_SOFT_BREQ_SPEC { + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/dma/dma_soft_lbreq.rs b/src/dma/dma_soft_lbreq.rs index 5125737..f40043e 100644 --- a/src/dma/dma_soft_lbreq.rs +++ b/src/dma/dma_soft_lbreq.rs @@ -1,21 +1,22 @@ #[doc = "Register `DMA_SoftLBReq` reader"] -pub struct R(crate::R); +pub struct R(crate::R); impl core::ops::Deref for R { - type Target = crate::R; + type Target = crate::R; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } -impl core::convert::From> for R { - fn from(reader: crate::R) -> Self { +impl From> for R { + #[inline(always)] + fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Register `DMA_SoftLBReq` writer"] -pub struct W(crate::W); +pub struct W(crate::W); impl core::ops::Deref for W { - type Target = crate::W; + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 @@ -27,73 +28,54 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { - fn from(writer: crate::W) -> Self { +impl From> for W { + #[inline(always)] + fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `SoftLBReq` reader - "] -pub struct SOFTLBREQ_R(crate::FieldReader); -impl SOFTLBREQ_R { - pub(crate) fn new(bits: u32) -> Self { - SOFTLBREQ_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SOFTLBREQ_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SOFT_LBREQ_R = crate::FieldReader; #[doc = "Field `SoftLBReq` writer - "] -pub struct SOFTLBREQ_W<'a> { - w: &'a mut W, -} -impl<'a> SOFTLBREQ_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SOFT_LBREQ_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DMA_SOFT_LBREQ_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] - pub fn soft_lbreq(&self) -> SOFTLBREQ_R { - SOFTLBREQ_R::new((self.bits & 0xffff_ffff) as u32) + pub fn soft_lbreq(&self) -> SOFT_LBREQ_R { + SOFT_LBREQ_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn soft_lbreq(&mut self) -> SOFTLBREQ_W { - SOFTLBREQ_W { w: self } + #[must_use] + pub fn soft_lbreq(&mut self) -> SOFT_LBREQ_W<0> { + SOFT_LBREQ_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self } } #[doc = "DMA_SoftLBReq.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dma_soft_lbreq](index.html) module"] -pub struct DMA_SOFTLBREQ_SPEC; -impl crate::RegisterSpec for DMA_SOFTLBREQ_SPEC { +pub struct DMA_SOFT_LBREQ_SPEC; +impl crate::RegisterSpec for DMA_SOFT_LBREQ_SPEC { type Ux = u32; } #[doc = "`read()` method returns [dma_soft_lbreq::R](R) reader structure"] -impl crate::Readable for DMA_SOFTLBREQ_SPEC { +impl crate::Readable for DMA_SOFT_LBREQ_SPEC { type Reader = R; } #[doc = "`write(|w| ..)` method takes [dma_soft_lbreq::W](W) writer structure"] -impl crate::Writable for DMA_SOFTLBREQ_SPEC { +impl crate::Writable for DMA_SOFT_LBREQ_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets DMA_SoftLBReq to value 0"] -impl crate::Resettable for DMA_SOFTLBREQ_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } +impl crate::Resettable for DMA_SOFT_LBREQ_SPEC { + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/dma/dma_soft_lsreq.rs b/src/dma/dma_soft_lsreq.rs index 8f5287c..c264f29 100644 --- a/src/dma/dma_soft_lsreq.rs +++ b/src/dma/dma_soft_lsreq.rs @@ -1,21 +1,22 @@ #[doc = "Register `DMA_SoftLSReq` reader"] -pub struct R(crate::R); +pub struct R(crate::R); impl core::ops::Deref for R { - type Target = crate::R; + type Target = crate::R; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } -impl core::convert::From> for R { - fn from(reader: crate::R) -> Self { +impl From> for R { + #[inline(always)] + fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Register `DMA_SoftLSReq` writer"] -pub struct W(crate::W); +pub struct W(crate::W); impl core::ops::Deref for W { - type Target = crate::W; + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 @@ -27,73 +28,54 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { - fn from(writer: crate::W) -> Self { +impl From> for W { + #[inline(always)] + fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `SoftLSReq` reader - "] -pub struct SOFTLSREQ_R(crate::FieldReader); -impl SOFTLSREQ_R { - pub(crate) fn new(bits: u32) -> Self { - SOFTLSREQ_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SOFTLSREQ_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SOFT_LSREQ_R = crate::FieldReader; #[doc = "Field `SoftLSReq` writer - "] -pub struct SOFTLSREQ_W<'a> { - w: &'a mut W, -} -impl<'a> SOFTLSREQ_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SOFT_LSREQ_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DMA_SOFT_LSREQ_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] - pub fn soft_lsreq(&self) -> SOFTLSREQ_R { - SOFTLSREQ_R::new((self.bits & 0xffff_ffff) as u32) + pub fn soft_lsreq(&self) -> SOFT_LSREQ_R { + SOFT_LSREQ_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn soft_lsreq(&mut self) -> SOFTLSREQ_W { - SOFTLSREQ_W { w: self } + #[must_use] + pub fn soft_lsreq(&mut self) -> SOFT_LSREQ_W<0> { + SOFT_LSREQ_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self } } #[doc = "DMA_SoftLSReq.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dma_soft_lsreq](index.html) module"] -pub struct DMA_SOFTLSREQ_SPEC; -impl crate::RegisterSpec for DMA_SOFTLSREQ_SPEC { +pub struct DMA_SOFT_LSREQ_SPEC; +impl crate::RegisterSpec for DMA_SOFT_LSREQ_SPEC { type Ux = u32; } #[doc = "`read()` method returns [dma_soft_lsreq::R](R) reader structure"] -impl crate::Readable for DMA_SOFTLSREQ_SPEC { +impl crate::Readable for DMA_SOFT_LSREQ_SPEC { type Reader = R; } #[doc = "`write(|w| ..)` method takes [dma_soft_lsreq::W](W) writer structure"] -impl crate::Writable for DMA_SOFTLSREQ_SPEC { +impl crate::Writable for DMA_SOFT_LSREQ_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets DMA_SoftLSReq to value 0"] -impl crate::Resettable for DMA_SOFTLSREQ_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } +impl crate::Resettable for DMA_SOFT_LSREQ_SPEC { + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/dma/dma_soft_sreq.rs b/src/dma/dma_soft_sreq.rs index a6f0516..f28024a 100644 --- a/src/dma/dma_soft_sreq.rs +++ b/src/dma/dma_soft_sreq.rs @@ -1,21 +1,22 @@ #[doc = "Register `DMA_SoftSReq` reader"] -pub struct R(crate::R); +pub struct R(crate::R); impl core::ops::Deref for R { - type Target = crate::R; + type Target = crate::R; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } -impl core::convert::From> for R { - fn from(reader: crate::R) -> Self { +impl From> for R { + #[inline(always)] + fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Register `DMA_SoftSReq` writer"] -pub struct W(crate::W); +pub struct W(crate::W); impl core::ops::Deref for W { - type Target = crate::W; + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 @@ -27,73 +28,54 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { - fn from(writer: crate::W) -> Self { +impl From> for W { + #[inline(always)] + fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `SoftSReq` reader - "] -pub struct SOFTSREQ_R(crate::FieldReader); -impl SOFTSREQ_R { - pub(crate) fn new(bits: u32) -> Self { - SOFTSREQ_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SOFTSREQ_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SOFT_SREQ_R = crate::FieldReader; #[doc = "Field `SoftSReq` writer - "] -pub struct SOFTSREQ_W<'a> { - w: &'a mut W, -} -impl<'a> SOFTSREQ_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SOFT_SREQ_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DMA_SOFT_SREQ_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] - pub fn soft_sreq(&self) -> SOFTSREQ_R { - SOFTSREQ_R::new((self.bits & 0xffff_ffff) as u32) + pub fn soft_sreq(&self) -> SOFT_SREQ_R { + SOFT_SREQ_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn soft_sreq(&mut self) -> SOFTSREQ_W { - SOFTSREQ_W { w: self } + #[must_use] + pub fn soft_sreq(&mut self) -> SOFT_SREQ_W<0> { + SOFT_SREQ_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self } } #[doc = "DMA_SoftSReq.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dma_soft_sreq](index.html) module"] -pub struct DMA_SOFTSREQ_SPEC; -impl crate::RegisterSpec for DMA_SOFTSREQ_SPEC { +pub struct DMA_SOFT_SREQ_SPEC; +impl crate::RegisterSpec for DMA_SOFT_SREQ_SPEC { type Ux = u32; } #[doc = "`read()` method returns [dma_soft_sreq::R](R) reader structure"] -impl crate::Readable for DMA_SOFTSREQ_SPEC { +impl crate::Readable for DMA_SOFT_SREQ_SPEC { type Reader = R; } #[doc = "`write(|w| ..)` method takes [dma_soft_sreq::W](W) writer structure"] -impl crate::Writable for DMA_SOFTSREQ_SPEC { +impl crate::Writable for DMA_SOFT_SREQ_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets DMA_SoftSReq to value 0"] -impl crate::Resettable for DMA_SOFTSREQ_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } +impl crate::Resettable for DMA_SOFT_SREQ_SPEC { + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/dma/dma_sync.rs b/src/dma/dma_sync.rs index e1466e4..a22cf16 100644 --- a/src/dma/dma_sync.rs +++ b/src/dma/dma_sync.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,32 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `DMA_Sync` reader - "] -pub struct DMA_SYNC_R(crate::FieldReader); -impl DMA_SYNC_R { - pub(crate) fn new(bits: u32) -> Self { - DMA_SYNC_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DMA_SYNC_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type DMA_SYNC_R = crate::FieldReader; #[doc = "Field `DMA_Sync` writer - "] -pub struct DMA_SYNC_W<'a> { - w: &'a mut W, -} -impl<'a> DMA_SYNC_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type DMA_SYNC_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DMA_SYNC_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn dma_sync(&self) -> DMA_SYNC_R { - DMA_SYNC_R::new((self.bits & 0xffff_ffff) as u32) + DMA_SYNC_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn dma_sync(&mut self) -> DMA_SYNC_W { - DMA_SYNC_W { w: self } + #[must_use] + pub fn dma_sync(&mut self) -> DMA_SYNC_W<0> { + DMA_SYNC_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +71,10 @@ impl crate::Readable for DMA_SYNC_SPEC { #[doc = "`write(|w| ..)` method takes [dma_sync::W](W) writer structure"] impl crate::Writable for DMA_SYNC_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets DMA_Sync to value 0"] impl crate::Resettable for DMA_SYNC_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/dma/dma_top_config.rs b/src/dma/dma_top_config.rs index 8668913..91aaedd 100644 --- a/src/dma/dma_top_config.rs +++ b/src/dma/dma_top_config.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,107 +28,47 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `M` reader - "] -pub struct M_R(crate::FieldReader); -impl M_R { - pub(crate) fn new(bits: bool) -> Self { - M_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for M_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `M` writer - "] -pub struct M_W<'a> { - w: &'a mut W, -} -impl<'a> M_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `E` reader - "] -pub struct E_R(crate::FieldReader); -impl E_R { - pub(crate) fn new(bits: bool) -> Self { - E_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for E_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type E_R = crate::BitReader; #[doc = "Field `E` writer - "] -pub struct E_W<'a> { - w: &'a mut W, -} -impl<'a> E_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type E_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_TOP_CONFIG_SPEC, bool, O>; +#[doc = "Field `M` reader - "] +pub type M_R = crate::BitReader; +#[doc = "Field `M` writer - "] +pub type M_W<'a, const O: u8> = crate::BitWriter<'a, u32, DMA_TOP_CONFIG_SPEC, bool, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn e(&self) -> E_R { + E_R::new((self.bits & 1) != 0) } -} -impl R { #[doc = "Bit 1"] #[inline(always)] pub fn m(&self) -> M_R { - M_R::new(((self.bits >> 1) & 0x01) != 0) - } - #[doc = "Bit 0"] - #[inline(always)] - pub fn e(&self) -> E_R { - E_R::new((self.bits & 0x01) != 0) + M_R::new(((self.bits >> 1) & 1) != 0) } } impl W { - #[doc = "Bit 1"] + #[doc = "Bit 0"] #[inline(always)] - pub fn m(&mut self) -> M_W { - M_W { w: self } + #[must_use] + pub fn e(&mut self) -> E_W<0> { + E_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 1"] #[inline(always)] - pub fn e(&mut self) -> E_W { - E_W { w: self } + #[must_use] + pub fn m(&mut self) -> M_W<1> { + M_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -145,11 +86,10 @@ impl crate::Readable for DMA_TOP_CONFIG_SPEC { #[doc = "`write(|w| ..)` method takes [dma_top_config::W](W) writer structure"] impl crate::Writable for DMA_TOP_CONFIG_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets DMA_Top_Config to value 0"] impl crate::Resettable for DMA_TOP_CONFIG_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_ctrl.rs b/src/ef_ctrl.rs index 45c0a4d..740d3b0 100644 --- a/src/ef_ctrl.rs +++ b/src/ef_ctrl.rs @@ -2,100 +2,100 @@ #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - ef_if_ctrl_0."] - pub ef_if_ctrl_0: crate::Reg, + pub ef_if_ctrl_0: EF_IF_CTRL_0, #[doc = "0x04 - ef_if_cyc_0."] - pub ef_if_cyc_0: crate::Reg, + pub ef_if_cyc_0: EF_IF_CYC_0, #[doc = "0x08 - ef_if_cyc_1."] - pub ef_if_cyc_1: crate::Reg, + pub ef_if_cyc_1: EF_IF_CYC_1, #[doc = "0x0c - ef_if_0_manual."] - pub ef_if_0_manual: crate::Reg, + pub ef_if_0_manual: EF_IF_0_MANUAL, #[doc = "0x10 - ef_if_0_status."] - pub ef_if_0_status: crate::Reg, + pub ef_if_0_status: EF_IF_0_STATUS, #[doc = "0x14 - ef_if_cfg_0."] - pub ef_if_cfg_0: crate::Reg, + pub ef_if_cfg_0: EF_IF_CFG_0, #[doc = "0x18 - ef_sw_cfg_0."] - pub ef_sw_cfg_0: crate::Reg, + pub ef_sw_cfg_0: EF_SW_CFG_0, #[doc = "0x1c - ef_reserved."] - pub ef_reserved: crate::Reg, + pub ef_reserved: EF_RESERVED, #[doc = "0x20 - ef_if_ana_trim_0."] - pub ef_if_ana_trim_0: crate::Reg, + pub ef_if_ana_trim_0: EF_IF_ANA_TRIM_0, #[doc = "0x24 - ef_if_sw_usage_0."] - pub ef_if_sw_usage_0: crate::Reg, - _reserved10: [u8; 472usize], + pub ef_if_sw_usage_0: EF_IF_SW_USAGE_0, + _reserved10: [u8; 0x01d8], #[doc = "0x200 - ef_crc_ctrl_0."] - pub ef_crc_ctrl_0: crate::Reg, + pub ef_crc_ctrl_0: EF_CRC_CTRL_0, #[doc = "0x204 - ef_crc_ctrl_1."] - pub ef_crc_ctrl_1: crate::Reg, + pub ef_crc_ctrl_1: EF_CRC_CTRL_1, #[doc = "0x208 - ef_crc_ctrl_2."] - pub ef_crc_ctrl_2: crate::Reg, + pub ef_crc_ctrl_2: EF_CRC_CTRL_2, #[doc = "0x20c - ef_crc_ctrl_3."] - pub ef_crc_ctrl_3: crate::Reg, + pub ef_crc_ctrl_3: EF_CRC_CTRL_3, #[doc = "0x210 - ef_crc_ctrl_4."] - pub ef_crc_ctrl_4: crate::Reg, + pub ef_crc_ctrl_4: EF_CRC_CTRL_4, #[doc = "0x214 - ef_crc_ctrl_5."] - pub ef_crc_ctrl_5: crate::Reg, + pub ef_crc_ctrl_5: EF_CRC_CTRL_5, } -#[doc = "ef_if_ctrl_0 register accessor: an alias for `Reg`"] +#[doc = "ef_if_ctrl_0 (rw) register accessor: an alias for `Reg`"] pub type EF_IF_CTRL_0 = crate::Reg; #[doc = "ef_if_ctrl_0."] pub mod ef_if_ctrl_0; -#[doc = "ef_if_cyc_0 register accessor: an alias for `Reg`"] +#[doc = "ef_if_cyc_0 (rw) register accessor: an alias for `Reg`"] pub type EF_IF_CYC_0 = crate::Reg; #[doc = "ef_if_cyc_0."] pub mod ef_if_cyc_0; -#[doc = "ef_if_cyc_1 register accessor: an alias for `Reg`"] +#[doc = "ef_if_cyc_1 (rw) register accessor: an alias for `Reg`"] pub type EF_IF_CYC_1 = crate::Reg; #[doc = "ef_if_cyc_1."] pub mod ef_if_cyc_1; -#[doc = "ef_if_0_manual register accessor: an alias for `Reg`"] +#[doc = "ef_if_0_manual (rw) register accessor: an alias for `Reg`"] pub type EF_IF_0_MANUAL = crate::Reg; #[doc = "ef_if_0_manual."] pub mod ef_if_0_manual; -#[doc = "ef_if_0_status register accessor: an alias for `Reg`"] +#[doc = "ef_if_0_status (rw) register accessor: an alias for `Reg`"] pub type EF_IF_0_STATUS = crate::Reg; #[doc = "ef_if_0_status."] pub mod ef_if_0_status; -#[doc = "ef_if_cfg_0 register accessor: an alias for `Reg`"] +#[doc = "ef_if_cfg_0 (r) register accessor: an alias for `Reg`"] pub type EF_IF_CFG_0 = crate::Reg; #[doc = "ef_if_cfg_0."] pub mod ef_if_cfg_0; -#[doc = "ef_sw_cfg_0 register accessor: an alias for `Reg`"] +#[doc = "ef_sw_cfg_0 (rw) register accessor: an alias for `Reg`"] pub type EF_SW_CFG_0 = crate::Reg; #[doc = "ef_sw_cfg_0."] pub mod ef_sw_cfg_0; -#[doc = "ef_reserved register accessor: an alias for `Reg`"] +#[doc = "ef_reserved (rw) register accessor: an alias for `Reg`"] pub type EF_RESERVED = crate::Reg; #[doc = "ef_reserved."] pub mod ef_reserved; -#[doc = "ef_if_ana_trim_0 register accessor: an alias for `Reg`"] +#[doc = "ef_if_ana_trim_0 (rw) register accessor: an alias for `Reg`"] pub type EF_IF_ANA_TRIM_0 = crate::Reg; #[doc = "ef_if_ana_trim_0."] pub mod ef_if_ana_trim_0; -#[doc = "ef_if_sw_usage_0 register accessor: an alias for `Reg`"] +#[doc = "ef_if_sw_usage_0 (rw) register accessor: an alias for `Reg`"] pub type EF_IF_SW_USAGE_0 = crate::Reg; #[doc = "ef_if_sw_usage_0."] pub mod ef_if_sw_usage_0; -#[doc = "ef_crc_ctrl_0 register accessor: an alias for `Reg`"] +#[doc = "ef_crc_ctrl_0 (rw) register accessor: an alias for `Reg`"] pub type EF_CRC_CTRL_0 = crate::Reg; #[doc = "ef_crc_ctrl_0."] pub mod ef_crc_ctrl_0; -#[doc = "ef_crc_ctrl_1 register accessor: an alias for `Reg`"] +#[doc = "ef_crc_ctrl_1 (rw) register accessor: an alias for `Reg`"] pub type EF_CRC_CTRL_1 = crate::Reg; #[doc = "ef_crc_ctrl_1."] pub mod ef_crc_ctrl_1; -#[doc = "ef_crc_ctrl_2 register accessor: an alias for `Reg`"] +#[doc = "ef_crc_ctrl_2 (rw) register accessor: an alias for `Reg`"] pub type EF_CRC_CTRL_2 = crate::Reg; #[doc = "ef_crc_ctrl_2."] pub mod ef_crc_ctrl_2; -#[doc = "ef_crc_ctrl_3 register accessor: an alias for `Reg`"] +#[doc = "ef_crc_ctrl_3 (rw) register accessor: an alias for `Reg`"] pub type EF_CRC_CTRL_3 = crate::Reg; #[doc = "ef_crc_ctrl_3."] pub mod ef_crc_ctrl_3; -#[doc = "ef_crc_ctrl_4 register accessor: an alias for `Reg`"] +#[doc = "ef_crc_ctrl_4 (rw) register accessor: an alias for `Reg`"] pub type EF_CRC_CTRL_4 = crate::Reg; #[doc = "ef_crc_ctrl_4."] pub mod ef_crc_ctrl_4; -#[doc = "ef_crc_ctrl_5 register accessor: an alias for `Reg`"] +#[doc = "ef_crc_ctrl_5 (rw) register accessor: an alias for `Reg`"] pub type EF_CRC_CTRL_5 = crate::Reg; #[doc = "ef_crc_ctrl_5."] pub mod ef_crc_ctrl_5; diff --git a/src/ef_ctrl/ef_crc_ctrl_0.rs b/src/ef_ctrl/ef_crc_ctrl_0.rs index 50b585d..6cd50a5 100644 --- a/src/ef_ctrl/ef_crc_ctrl_0.rs +++ b/src/ef_ctrl/ef_crc_ctrl_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,522 +28,192 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `ef_crc_slp_n` reader - "] -pub struct EF_CRC_SLP_N_R(crate::FieldReader); -impl EF_CRC_SLP_N_R { - pub(crate) fn new(bits: u16) -> Self { - EF_CRC_SLP_N_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_CRC_SLP_N_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_crc_slp_n` writer - "] -pub struct EF_CRC_SLP_N_W<'a> { - w: &'a mut W, -} -impl<'a> EF_CRC_SLP_N_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xffff << 16)) | ((value as u32 & 0xffff) << 16); - self.w - } -} -#[doc = "Field `ef_crc_lock` reader - "] -pub struct EF_CRC_LOCK_R(crate::FieldReader); -impl EF_CRC_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - EF_CRC_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_CRC_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_crc_lock` writer - "] -pub struct EF_CRC_LOCK_W<'a> { - w: &'a mut W, -} -impl<'a> EF_CRC_LOCK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w - } -} -#[doc = "Field `ef_crc_int_set` reader - "] -pub struct EF_CRC_INT_SET_R(crate::FieldReader); -impl EF_CRC_INT_SET_R { - pub(crate) fn new(bits: bool) -> Self { - EF_CRC_INT_SET_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_CRC_INT_SET_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_crc_int_set` writer - "] -pub struct EF_CRC_INT_SET_W<'a> { - w: &'a mut W, -} -impl<'a> EF_CRC_INT_SET_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); - self.w - } -} -#[doc = "Field `ef_crc_int_clr` reader - "] -pub struct EF_CRC_INT_CLR_R(crate::FieldReader); -impl EF_CRC_INT_CLR_R { - pub(crate) fn new(bits: bool) -> Self { - EF_CRC_INT_CLR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_CRC_INT_CLR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_crc_int_clr` writer - "] -pub struct EF_CRC_INT_CLR_W<'a> { - w: &'a mut W, -} -impl<'a> EF_CRC_INT_CLR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w - } -} -#[doc = "Field `ef_crc_int` reader - "] -pub struct EF_CRC_INT_R(crate::FieldReader); -impl EF_CRC_INT_R { - pub(crate) fn new(bits: bool) -> Self { - EF_CRC_INT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_CRC_INT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_crc_din_endian` reader - "] -pub struct EF_CRC_DIN_ENDIAN_R(crate::FieldReader); -impl EF_CRC_DIN_ENDIAN_R { - pub(crate) fn new(bits: bool) -> Self { - EF_CRC_DIN_ENDIAN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_CRC_DIN_ENDIAN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_crc_din_endian` writer - "] -pub struct EF_CRC_DIN_ENDIAN_W<'a> { - w: &'a mut W, -} -impl<'a> EF_CRC_DIN_ENDIAN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7); - self.w - } -} -#[doc = "Field `ef_crc_dout_endian` reader - "] -pub struct EF_CRC_DOUT_ENDIAN_R(crate::FieldReader); -impl EF_CRC_DOUT_ENDIAN_R { - pub(crate) fn new(bits: bool) -> Self { - EF_CRC_DOUT_ENDIAN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_CRC_DOUT_ENDIAN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_crc_dout_endian` writer - "] -pub struct EF_CRC_DOUT_ENDIAN_W<'a> { - w: &'a mut W, -} -impl<'a> EF_CRC_DOUT_ENDIAN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w - } -} -#[doc = "Field `ef_crc_dout_inv_en` reader - "] -pub struct EF_CRC_DOUT_INV_EN_R(crate::FieldReader); -impl EF_CRC_DOUT_INV_EN_R { - pub(crate) fn new(bits: bool) -> Self { - EF_CRC_DOUT_INV_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_CRC_DOUT_INV_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_crc_dout_inv_en` writer - "] -pub struct EF_CRC_DOUT_INV_EN_W<'a> { - w: &'a mut W, -} -impl<'a> EF_CRC_DOUT_INV_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w - } -} -#[doc = "Field `ef_crc_error` reader - "] -pub struct EF_CRC_ERROR_R(crate::FieldReader); -impl EF_CRC_ERROR_R { - pub(crate) fn new(bits: bool) -> Self { - EF_CRC_ERROR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_CRC_ERROR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_crc_mode` reader - "] -pub struct EF_CRC_MODE_R(crate::FieldReader); -impl EF_CRC_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - EF_CRC_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_CRC_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_crc_mode` writer - "] -pub struct EF_CRC_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> EF_CRC_MODE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `ef_crc_en` reader - "] -pub struct EF_CRC_EN_R(crate::FieldReader); -impl EF_CRC_EN_R { - pub(crate) fn new(bits: bool) -> Self { - EF_CRC_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_CRC_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_crc_en` writer - "] -pub struct EF_CRC_EN_W<'a> { - w: &'a mut W, -} -impl<'a> EF_CRC_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} +#[doc = "Field `ef_crc_busy` reader - "] +pub type EF_CRC_BUSY_R = crate::BitReader; #[doc = "Field `ef_crc_trig` reader - "] -pub struct EF_CRC_TRIG_R(crate::FieldReader); -impl EF_CRC_TRIG_R { - pub(crate) fn new(bits: bool) -> Self { - EF_CRC_TRIG_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_CRC_TRIG_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_CRC_TRIG_R = crate::BitReader; #[doc = "Field `ef_crc_trig` writer - "] -pub struct EF_CRC_TRIG_W<'a> { - w: &'a mut W, -} -impl<'a> EF_CRC_TRIG_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} -#[doc = "Field `ef_crc_busy` reader - "] -pub struct EF_CRC_BUSY_R(crate::FieldReader); -impl EF_CRC_BUSY_R { - pub(crate) fn new(bits: bool) -> Self { - EF_CRC_BUSY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_CRC_BUSY_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_CRC_TRIG_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_CRC_CTRL_0_SPEC, bool, O>; +#[doc = "Field `ef_crc_en` reader - "] +pub type EF_CRC_EN_R = crate::BitReader; +#[doc = "Field `ef_crc_en` writer - "] +pub type EF_CRC_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_CRC_CTRL_0_SPEC, bool, O>; +#[doc = "Field `ef_crc_mode` reader - "] +pub type EF_CRC_MODE_R = crate::BitReader; +#[doc = "Field `ef_crc_mode` writer - "] +pub type EF_CRC_MODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_CRC_CTRL_0_SPEC, bool, O>; +#[doc = "Field `ef_crc_error` reader - "] +pub type EF_CRC_ERROR_R = crate::BitReader; +#[doc = "Field `ef_crc_dout_inv_en` reader - "] +pub type EF_CRC_DOUT_INV_EN_R = crate::BitReader; +#[doc = "Field `ef_crc_dout_inv_en` writer - "] +pub type EF_CRC_DOUT_INV_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EF_CRC_CTRL_0_SPEC, bool, O>; +#[doc = "Field `ef_crc_dout_endian` reader - "] +pub type EF_CRC_DOUT_ENDIAN_R = crate::BitReader; +#[doc = "Field `ef_crc_dout_endian` writer - "] +pub type EF_CRC_DOUT_ENDIAN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EF_CRC_CTRL_0_SPEC, bool, O>; +#[doc = "Field `ef_crc_din_endian` reader - "] +pub type EF_CRC_DIN_ENDIAN_R = crate::BitReader; +#[doc = "Field `ef_crc_din_endian` writer - "] +pub type EF_CRC_DIN_ENDIAN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EF_CRC_CTRL_0_SPEC, bool, O>; +#[doc = "Field `ef_crc_int` reader - "] +pub type EF_CRC_INT_R = crate::BitReader; +#[doc = "Field `ef_crc_int_clr` reader - "] +pub type EF_CRC_INT_CLR_R = crate::BitReader; +#[doc = "Field `ef_crc_int_clr` writer - "] +pub type EF_CRC_INT_CLR_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_CRC_CTRL_0_SPEC, bool, O>; +#[doc = "Field `ef_crc_int_set` reader - "] +pub type EF_CRC_INT_SET_R = crate::BitReader; +#[doc = "Field `ef_crc_int_set` writer - "] +pub type EF_CRC_INT_SET_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_CRC_CTRL_0_SPEC, bool, O>; +#[doc = "Field `ef_crc_lock` reader - "] +pub type EF_CRC_LOCK_R = crate::BitReader; +#[doc = "Field `ef_crc_lock` writer - "] +pub type EF_CRC_LOCK_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_CRC_CTRL_0_SPEC, bool, O>; +#[doc = "Field `ef_crc_slp_n` reader - "] +pub type EF_CRC_SLP_N_R = crate::FieldReader; +#[doc = "Field `ef_crc_slp_n` writer - "] +pub type EF_CRC_SLP_N_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_CRC_CTRL_0_SPEC, u16, u16, 16, O>; impl R { - #[doc = "Bits 16:31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn ef_crc_slp_n(&self) -> EF_CRC_SLP_N_R { - EF_CRC_SLP_N_R::new(((self.bits >> 16) & 0xffff) as u16) + pub fn ef_crc_busy(&self) -> EF_CRC_BUSY_R { + EF_CRC_BUSY_R::new((self.bits & 1) != 0) } - #[doc = "Bit 11"] + #[doc = "Bit 1"] #[inline(always)] - pub fn ef_crc_lock(&self) -> EF_CRC_LOCK_R { - EF_CRC_LOCK_R::new(((self.bits >> 11) & 0x01) != 0) + pub fn ef_crc_trig(&self) -> EF_CRC_TRIG_R { + EF_CRC_TRIG_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 10"] + #[doc = "Bit 2"] #[inline(always)] - pub fn ef_crc_int_set(&self) -> EF_CRC_INT_SET_R { - EF_CRC_INT_SET_R::new(((self.bits >> 10) & 0x01) != 0) + pub fn ef_crc_en(&self) -> EF_CRC_EN_R { + EF_CRC_EN_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 9"] + #[doc = "Bit 3"] #[inline(always)] - pub fn ef_crc_int_clr(&self) -> EF_CRC_INT_CLR_R { - EF_CRC_INT_CLR_R::new(((self.bits >> 9) & 0x01) != 0) + pub fn ef_crc_mode(&self) -> EF_CRC_MODE_R { + EF_CRC_MODE_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bit 8"] + #[doc = "Bit 4"] #[inline(always)] - pub fn ef_crc_int(&self) -> EF_CRC_INT_R { - EF_CRC_INT_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn ef_crc_error(&self) -> EF_CRC_ERROR_R { + EF_CRC_ERROR_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 7"] + #[doc = "Bit 5"] #[inline(always)] - pub fn ef_crc_din_endian(&self) -> EF_CRC_DIN_ENDIAN_R { - EF_CRC_DIN_ENDIAN_R::new(((self.bits >> 7) & 0x01) != 0) + pub fn ef_crc_dout_inv_en(&self) -> EF_CRC_DOUT_INV_EN_R { + EF_CRC_DOUT_INV_EN_R::new(((self.bits >> 5) & 1) != 0) } #[doc = "Bit 6"] #[inline(always)] pub fn ef_crc_dout_endian(&self) -> EF_CRC_DOUT_ENDIAN_R { - EF_CRC_DOUT_ENDIAN_R::new(((self.bits >> 6) & 0x01) != 0) + EF_CRC_DOUT_ENDIAN_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = "Bit 5"] + #[doc = "Bit 7"] #[inline(always)] - pub fn ef_crc_dout_inv_en(&self) -> EF_CRC_DOUT_INV_EN_R { - EF_CRC_DOUT_INV_EN_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn ef_crc_din_endian(&self) -> EF_CRC_DIN_ENDIAN_R { + EF_CRC_DIN_ENDIAN_R::new(((self.bits >> 7) & 1) != 0) } - #[doc = "Bit 4"] + #[doc = "Bit 8"] #[inline(always)] - pub fn ef_crc_error(&self) -> EF_CRC_ERROR_R { - EF_CRC_ERROR_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn ef_crc_int(&self) -> EF_CRC_INT_R { + EF_CRC_INT_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bit 3"] + #[doc = "Bit 9"] #[inline(always)] - pub fn ef_crc_mode(&self) -> EF_CRC_MODE_R { - EF_CRC_MODE_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn ef_crc_int_clr(&self) -> EF_CRC_INT_CLR_R { + EF_CRC_INT_CLR_R::new(((self.bits >> 9) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bit 10"] #[inline(always)] - pub fn ef_crc_en(&self) -> EF_CRC_EN_R { - EF_CRC_EN_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn ef_crc_int_set(&self) -> EF_CRC_INT_SET_R { + EF_CRC_INT_SET_R::new(((self.bits >> 10) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 11"] #[inline(always)] - pub fn ef_crc_trig(&self) -> EF_CRC_TRIG_R { - EF_CRC_TRIG_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn ef_crc_lock(&self) -> EF_CRC_LOCK_R { + EF_CRC_LOCK_R::new(((self.bits >> 11) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bits 16:31"] #[inline(always)] - pub fn ef_crc_busy(&self) -> EF_CRC_BUSY_R { - EF_CRC_BUSY_R::new((self.bits & 0x01) != 0) + pub fn ef_crc_slp_n(&self) -> EF_CRC_SLP_N_R { + EF_CRC_SLP_N_R::new(((self.bits >> 16) & 0xffff) as u16) } } impl W { - #[doc = "Bits 16:31"] + #[doc = "Bit 1"] #[inline(always)] - pub fn ef_crc_slp_n(&mut self) -> EF_CRC_SLP_N_W { - EF_CRC_SLP_N_W { w: self } + #[must_use] + pub fn ef_crc_trig(&mut self) -> EF_CRC_TRIG_W<1> { + EF_CRC_TRIG_W::new(self) } - #[doc = "Bit 11"] + #[doc = "Bit 2"] #[inline(always)] - pub fn ef_crc_lock(&mut self) -> EF_CRC_LOCK_W { - EF_CRC_LOCK_W { w: self } + #[must_use] + pub fn ef_crc_en(&mut self) -> EF_CRC_EN_W<2> { + EF_CRC_EN_W::new(self) } - #[doc = "Bit 10"] + #[doc = "Bit 3"] #[inline(always)] - pub fn ef_crc_int_set(&mut self) -> EF_CRC_INT_SET_W { - EF_CRC_INT_SET_W { w: self } + #[must_use] + pub fn ef_crc_mode(&mut self) -> EF_CRC_MODE_W<3> { + EF_CRC_MODE_W::new(self) } - #[doc = "Bit 9"] + #[doc = "Bit 5"] #[inline(always)] - pub fn ef_crc_int_clr(&mut self) -> EF_CRC_INT_CLR_W { - EF_CRC_INT_CLR_W { w: self } + #[must_use] + pub fn ef_crc_dout_inv_en(&mut self) -> EF_CRC_DOUT_INV_EN_W<5> { + EF_CRC_DOUT_INV_EN_W::new(self) } - #[doc = "Bit 7"] + #[doc = "Bit 6"] #[inline(always)] - pub fn ef_crc_din_endian(&mut self) -> EF_CRC_DIN_ENDIAN_W { - EF_CRC_DIN_ENDIAN_W { w: self } + #[must_use] + pub fn ef_crc_dout_endian(&mut self) -> EF_CRC_DOUT_ENDIAN_W<6> { + EF_CRC_DOUT_ENDIAN_W::new(self) } - #[doc = "Bit 6"] + #[doc = "Bit 7"] #[inline(always)] - pub fn ef_crc_dout_endian(&mut self) -> EF_CRC_DOUT_ENDIAN_W { - EF_CRC_DOUT_ENDIAN_W { w: self } + #[must_use] + pub fn ef_crc_din_endian(&mut self) -> EF_CRC_DIN_ENDIAN_W<7> { + EF_CRC_DIN_ENDIAN_W::new(self) } - #[doc = "Bit 5"] + #[doc = "Bit 9"] #[inline(always)] - pub fn ef_crc_dout_inv_en(&mut self) -> EF_CRC_DOUT_INV_EN_W { - EF_CRC_DOUT_INV_EN_W { w: self } + #[must_use] + pub fn ef_crc_int_clr(&mut self) -> EF_CRC_INT_CLR_W<9> { + EF_CRC_INT_CLR_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bit 10"] #[inline(always)] - pub fn ef_crc_mode(&mut self) -> EF_CRC_MODE_W { - EF_CRC_MODE_W { w: self } + #[must_use] + pub fn ef_crc_int_set(&mut self) -> EF_CRC_INT_SET_W<10> { + EF_CRC_INT_SET_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bit 11"] #[inline(always)] - pub fn ef_crc_en(&mut self) -> EF_CRC_EN_W { - EF_CRC_EN_W { w: self } + #[must_use] + pub fn ef_crc_lock(&mut self) -> EF_CRC_LOCK_W<11> { + EF_CRC_LOCK_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bits 16:31"] #[inline(always)] - pub fn ef_crc_trig(&mut self) -> EF_CRC_TRIG_W { - EF_CRC_TRIG_W { w: self } + #[must_use] + pub fn ef_crc_slp_n(&mut self) -> EF_CRC_SLP_N_W<16> { + EF_CRC_SLP_N_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -560,11 +231,10 @@ impl crate::Readable for EF_CRC_CTRL_0_SPEC { #[doc = "`write(|w| ..)` method takes [ef_crc_ctrl_0::W](W) writer structure"] impl crate::Writable for EF_CRC_CTRL_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_crc_ctrl_0 to value 0x00ff_0224"] impl crate::Resettable for EF_CRC_CTRL_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x00ff_0224 - } + const RESET_VALUE: Self::Ux = 0x00ff_0224; } diff --git a/src/ef_ctrl/ef_crc_ctrl_1.rs b/src/ef_ctrl/ef_crc_ctrl_1.rs index b5dd279..3c69152 100644 --- a/src/ef_ctrl/ef_crc_ctrl_1.rs +++ b/src/ef_ctrl/ef_crc_ctrl_1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `ef_crc_data_0_en` reader - "] -pub struct EF_CRC_DATA_0_EN_R(crate::FieldReader); -impl EF_CRC_DATA_0_EN_R { - pub(crate) fn new(bits: u32) -> Self { - EF_CRC_DATA_0_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_CRC_DATA_0_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_CRC_DATA_0_EN_R = crate::FieldReader; #[doc = "Field `ef_crc_data_0_en` writer - "] -pub struct EF_CRC_DATA_0_EN_W<'a> { - w: &'a mut W, -} -impl<'a> EF_CRC_DATA_0_EN_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type EF_CRC_DATA_0_EN_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_CRC_CTRL_1_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_crc_data_0_en(&self) -> EF_CRC_DATA_0_EN_R { - EF_CRC_DATA_0_EN_R::new((self.bits & 0xffff_ffff) as u32) + EF_CRC_DATA_0_EN_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn ef_crc_data_0_en(&mut self) -> EF_CRC_DATA_0_EN_W { - EF_CRC_DATA_0_EN_W { w: self } + #[must_use] + pub fn ef_crc_data_0_en(&mut self) -> EF_CRC_DATA_0_EN_W<0> { + EF_CRC_DATA_0_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for EF_CRC_CTRL_1_SPEC { #[doc = "`write(|w| ..)` method takes [ef_crc_ctrl_1::W](W) writer structure"] impl crate::Writable for EF_CRC_CTRL_1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_crc_ctrl_1 to value 0xffff_ffff"] impl crate::Resettable for EF_CRC_CTRL_1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xffff_ffff - } + const RESET_VALUE: Self::Ux = 0xffff_ffff; } diff --git a/src/ef_ctrl/ef_crc_ctrl_2.rs b/src/ef_ctrl/ef_crc_ctrl_2.rs index 2a9658e..30f9dc2 100644 --- a/src/ef_ctrl/ef_crc_ctrl_2.rs +++ b/src/ef_ctrl/ef_crc_ctrl_2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `ef_crc_data_1_en` reader - "] -pub struct EF_CRC_DATA_1_EN_R(crate::FieldReader); -impl EF_CRC_DATA_1_EN_R { - pub(crate) fn new(bits: u32) -> Self { - EF_CRC_DATA_1_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_CRC_DATA_1_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_CRC_DATA_1_EN_R = crate::FieldReader; #[doc = "Field `ef_crc_data_1_en` writer - "] -pub struct EF_CRC_DATA_1_EN_W<'a> { - w: &'a mut W, -} -impl<'a> EF_CRC_DATA_1_EN_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type EF_CRC_DATA_1_EN_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_CRC_CTRL_2_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_crc_data_1_en(&self) -> EF_CRC_DATA_1_EN_R { - EF_CRC_DATA_1_EN_R::new((self.bits & 0xffff_ffff) as u32) + EF_CRC_DATA_1_EN_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn ef_crc_data_1_en(&mut self) -> EF_CRC_DATA_1_EN_W { - EF_CRC_DATA_1_EN_W { w: self } + #[must_use] + pub fn ef_crc_data_1_en(&mut self) -> EF_CRC_DATA_1_EN_W<0> { + EF_CRC_DATA_1_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for EF_CRC_CTRL_2_SPEC { #[doc = "`write(|w| ..)` method takes [ef_crc_ctrl_2::W](W) writer structure"] impl crate::Writable for EF_CRC_CTRL_2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_crc_ctrl_2 to value 0xffff_ffff"] impl crate::Resettable for EF_CRC_CTRL_2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xffff_ffff - } + const RESET_VALUE: Self::Ux = 0xffff_ffff; } diff --git a/src/ef_ctrl/ef_crc_ctrl_3.rs b/src/ef_ctrl/ef_crc_ctrl_3.rs index 2f1960f..40ff771 100644 --- a/src/ef_ctrl/ef_crc_ctrl_3.rs +++ b/src/ef_ctrl/ef_crc_ctrl_3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `ef_crc_iv` reader - "] -pub struct EF_CRC_IV_R(crate::FieldReader); -impl EF_CRC_IV_R { - pub(crate) fn new(bits: u32) -> Self { - EF_CRC_IV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_CRC_IV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_CRC_IV_R = crate::FieldReader; #[doc = "Field `ef_crc_iv` writer - "] -pub struct EF_CRC_IV_W<'a> { - w: &'a mut W, -} -impl<'a> EF_CRC_IV_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type EF_CRC_IV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_CRC_CTRL_3_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_crc_iv(&self) -> EF_CRC_IV_R { - EF_CRC_IV_R::new((self.bits & 0xffff_ffff) as u32) + EF_CRC_IV_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn ef_crc_iv(&mut self) -> EF_CRC_IV_W { - EF_CRC_IV_W { w: self } + #[must_use] + pub fn ef_crc_iv(&mut self) -> EF_CRC_IV_W<0> { + EF_CRC_IV_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for EF_CRC_CTRL_3_SPEC { #[doc = "`write(|w| ..)` method takes [ef_crc_ctrl_3::W](W) writer structure"] impl crate::Writable for EF_CRC_CTRL_3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_crc_ctrl_3 to value 0xffff_ffff"] impl crate::Resettable for EF_CRC_CTRL_3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xffff_ffff - } + const RESET_VALUE: Self::Ux = 0xffff_ffff; } diff --git a/src/ef_ctrl/ef_crc_ctrl_4.rs b/src/ef_ctrl/ef_crc_ctrl_4.rs index 9b75630..c420fab 100644 --- a/src/ef_ctrl/ef_crc_ctrl_4.rs +++ b/src/ef_ctrl/ef_crc_ctrl_4.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `ef_crc_golden` reader - "] -pub struct EF_CRC_GOLDEN_R(crate::FieldReader); -impl EF_CRC_GOLDEN_R { - pub(crate) fn new(bits: u32) -> Self { - EF_CRC_GOLDEN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_CRC_GOLDEN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_CRC_GOLDEN_R = crate::FieldReader; #[doc = "Field `ef_crc_golden` writer - "] -pub struct EF_CRC_GOLDEN_W<'a> { - w: &'a mut W, -} -impl<'a> EF_CRC_GOLDEN_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type EF_CRC_GOLDEN_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_CRC_CTRL_4_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_crc_golden(&self) -> EF_CRC_GOLDEN_R { - EF_CRC_GOLDEN_R::new((self.bits & 0xffff_ffff) as u32) + EF_CRC_GOLDEN_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn ef_crc_golden(&mut self) -> EF_CRC_GOLDEN_W { - EF_CRC_GOLDEN_W { w: self } + #[must_use] + pub fn ef_crc_golden(&mut self) -> EF_CRC_GOLDEN_W<0> { + EF_CRC_GOLDEN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for EF_CRC_CTRL_4_SPEC { #[doc = "`write(|w| ..)` method takes [ef_crc_ctrl_4::W](W) writer structure"] impl crate::Writable for EF_CRC_CTRL_4_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_crc_ctrl_4 to value 0xc2a8_fa9d"] impl crate::Resettable for EF_CRC_CTRL_4_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xc2a8_fa9d - } + const RESET_VALUE: Self::Ux = 0xc2a8_fa9d; } diff --git a/src/ef_ctrl/ef_crc_ctrl_5.rs b/src/ef_ctrl/ef_crc_ctrl_5.rs index 18743be..477d77a 100644 --- a/src/ef_ctrl/ef_crc_ctrl_5.rs +++ b/src/ef_ctrl/ef_crc_ctrl_5.rs @@ -7,33 +7,51 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `ef_crc_dout` reader - "] -pub struct EF_CRC_DOUT_R(crate::FieldReader); -impl EF_CRC_DOUT_R { - pub(crate) fn new(bits: u32) -> Self { - EF_CRC_DOUT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_CRC_DOUT_R { - type Target = crate::FieldReader; +#[doc = "Register `ef_crc_ctrl_5` writer"] +pub struct W(crate::W); +impl core::ops::Deref for W { + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } +impl core::ops::DerefMut for W { + #[inline(always)] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } +} +impl From> for W { + #[inline(always)] + fn from(writer: crate::W) -> Self { + W(writer) + } +} +#[doc = "Field `ef_crc_dout` reader - "] +pub type EF_CRC_DOUT_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_crc_dout(&self) -> EF_CRC_DOUT_R { - EF_CRC_DOUT_R::new((self.bits & 0xffff_ffff) as u32) + EF_CRC_DOUT_R::new(self.bits) + } +} +impl W { + #[doc = "Writes raw bits to the register."] + #[inline(always)] + pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { + self.0.bits(bits); + self } } -#[doc = "ef_crc_ctrl_5.\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 [ef_crc_ctrl_5](index.html) module"] +#[doc = "ef_crc_ctrl_5.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ef_crc_ctrl_5](index.html) module"] pub struct EF_CRC_CTRL_5_SPEC; impl crate::RegisterSpec for EF_CRC_CTRL_5_SPEC { type Ux = u32; @@ -42,10 +60,13 @@ impl crate::RegisterSpec for EF_CRC_CTRL_5_SPEC { impl crate::Readable for EF_CRC_CTRL_5_SPEC { type Reader = R; } +#[doc = "`write(|w| ..)` method takes [ef_crc_ctrl_5::W](W) writer structure"] +impl crate::Writable for EF_CRC_CTRL_5_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} #[doc = "`reset()` method sets ef_crc_ctrl_5 to value 0xffff_ffff"] impl crate::Resettable for EF_CRC_CTRL_5_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xffff_ffff - } + const RESET_VALUE: Self::Ux = 0xffff_ffff; } diff --git a/src/ef_ctrl/ef_if_0_manual.rs b/src/ef_ctrl/ef_if_0_manual.rs index b17261e..413866b 100644 --- a/src/ef_ctrl/ef_if_0_manual.rs +++ b/src/ef_ctrl/ef_if_0_manual.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,382 +28,146 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `ef_if_prot_code_manual` reader - "] -pub struct EF_IF_PROT_CODE_MANUAL_R(crate::FieldReader); -impl EF_IF_PROT_CODE_MANUAL_R { - pub(crate) fn new(bits: u8) -> Self { - EF_IF_PROT_CODE_MANUAL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_PROT_CODE_MANUAL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_prot_code_manual` writer - "] -pub struct EF_IF_PROT_CODE_MANUAL_W<'a> { - w: &'a mut W, -} -impl<'a> EF_IF_PROT_CODE_MANUAL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 24)) | ((value as u32 & 0xff) << 24); - self.w - } -} -#[doc = "Field `ef_if_0_q` reader - "] -pub struct EF_IF_0_Q_R(crate::FieldReader); -impl EF_IF_0_Q_R { - pub(crate) fn new(bits: u8) -> Self { - EF_IF_0_Q_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_0_Q_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_csb` reader - "] -pub struct EF_IF_CSB_R(crate::FieldReader); -impl EF_IF_CSB_R { - pub(crate) fn new(bits: bool) -> Self { - EF_IF_CSB_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_CSB_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_csb` writer - "] -pub struct EF_IF_CSB_W<'a> { - w: &'a mut W, -} -impl<'a> EF_IF_CSB_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15); - self.w - } -} -#[doc = "Field `ef_if_load` reader - "] -pub struct EF_IF_LOAD_R(crate::FieldReader); -impl EF_IF_LOAD_R { - pub(crate) fn new(bits: bool) -> Self { - EF_IF_LOAD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_LOAD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_load` writer - "] -pub struct EF_IF_LOAD_W<'a> { - w: &'a mut W, -} -impl<'a> EF_IF_LOAD_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14); - self.w - } -} -#[doc = "Field `ef_if_pgenb` reader - "] -pub struct EF_IF_PGENB_R(crate::FieldReader); -impl EF_IF_PGENB_R { - pub(crate) fn new(bits: bool) -> Self { - EF_IF_PGENB_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_PGENB_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_pgenb` writer - "] -pub struct EF_IF_PGENB_W<'a> { - w: &'a mut W, -} -impl<'a> EF_IF_PGENB_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13); - self.w - } -} -#[doc = "Field `ef_if_strobe` reader - "] -pub struct EF_IF_STROBE_R(crate::FieldReader); -impl EF_IF_STROBE_R { - pub(crate) fn new(bits: bool) -> Self { - EF_IF_STROBE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_STROBE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_strobe` writer - "] -pub struct EF_IF_STROBE_W<'a> { - w: &'a mut W, -} -impl<'a> EF_IF_STROBE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} -#[doc = "Field `ef_if_ps` reader - "] -pub struct EF_IF_PS_R(crate::FieldReader); -impl EF_IF_PS_R { - pub(crate) fn new(bits: bool) -> Self { - EF_IF_PS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_PS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_ps` writer - "] -pub struct EF_IF_PS_W<'a> { - w: &'a mut W, -} -impl<'a> EF_IF_PS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w - } -} -#[doc = "Field `ef_if_pd` reader - "] -pub struct EF_IF_PD_R(crate::FieldReader); -impl EF_IF_PD_R { - pub(crate) fn new(bits: bool) -> Self { - EF_IF_PD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_PD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_pd` writer - "] -pub struct EF_IF_PD_W<'a> { - w: &'a mut W, -} -impl<'a> EF_IF_PD_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); - self.w - } -} #[doc = "Field `ef_if_a` reader - "] -pub struct EF_IF_A_R(crate::FieldReader); -impl EF_IF_A_R { - pub(crate) fn new(bits: u16) -> Self { - EF_IF_A_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_A_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_IF_A_R = crate::FieldReader; #[doc = "Field `ef_if_a` writer - "] -pub struct EF_IF_A_W<'a> { - w: &'a mut W, -} -impl<'a> EF_IF_A_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03ff) | (value as u32 & 0x03ff); - self.w - } -} +pub type EF_IF_A_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_IF_0_MANUAL_SPEC, u16, u16, 10, O>; +#[doc = "Field `ef_if_pd` reader - "] +pub type EF_IF_PD_R = crate::BitReader; +#[doc = "Field `ef_if_pd` writer - "] +pub type EF_IF_PD_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_IF_0_MANUAL_SPEC, bool, O>; +#[doc = "Field `ef_if_ps` reader - "] +pub type EF_IF_PS_R = crate::BitReader; +#[doc = "Field `ef_if_ps` writer - "] +pub type EF_IF_PS_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_IF_0_MANUAL_SPEC, bool, O>; +#[doc = "Field `ef_if_strobe` reader - "] +pub type EF_IF_STROBE_R = crate::BitReader; +#[doc = "Field `ef_if_strobe` writer - "] +pub type EF_IF_STROBE_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_IF_0_MANUAL_SPEC, bool, O>; +#[doc = "Field `ef_if_pgenb` reader - "] +pub type EF_IF_PGENB_R = crate::BitReader; +#[doc = "Field `ef_if_pgenb` writer - "] +pub type EF_IF_PGENB_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_IF_0_MANUAL_SPEC, bool, O>; +#[doc = "Field `ef_if_load` reader - "] +pub type EF_IF_LOAD_R = crate::BitReader; +#[doc = "Field `ef_if_load` writer - "] +pub type EF_IF_LOAD_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_IF_0_MANUAL_SPEC, bool, O>; +#[doc = "Field `ef_if_csb` reader - "] +pub type EF_IF_CSB_R = crate::BitReader; +#[doc = "Field `ef_if_csb` writer - "] +pub type EF_IF_CSB_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_IF_0_MANUAL_SPEC, bool, O>; +#[doc = "Field `ef_if_0_q` reader - "] +pub type EF_IF_0_Q_R = crate::FieldReader; +#[doc = "Field `ef_if_prot_code_manual` reader - "] +pub type EF_IF_PROT_CODE_MANUAL_R = crate::FieldReader; +#[doc = "Field `ef_if_prot_code_manual` writer - "] +pub type EF_IF_PROT_CODE_MANUAL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_IF_0_MANUAL_SPEC, u8, u8, 8, O>; impl R { - #[doc = "Bits 24:31"] + #[doc = "Bits 0:9"] #[inline(always)] - pub fn ef_if_prot_code_manual(&self) -> EF_IF_PROT_CODE_MANUAL_R { - EF_IF_PROT_CODE_MANUAL_R::new(((self.bits >> 24) & 0xff) as u8) + pub fn ef_if_a(&self) -> EF_IF_A_R { + EF_IF_A_R::new((self.bits & 0x03ff) as u16) } - #[doc = "Bits 16:23"] + #[doc = "Bit 10"] #[inline(always)] - pub fn ef_if_0_q(&self) -> EF_IF_0_Q_R { - EF_IF_0_Q_R::new(((self.bits >> 16) & 0xff) as u8) + pub fn ef_if_pd(&self) -> EF_IF_PD_R { + EF_IF_PD_R::new(((self.bits >> 10) & 1) != 0) } - #[doc = "Bit 15"] + #[doc = "Bit 11"] #[inline(always)] - pub fn ef_if_csb(&self) -> EF_IF_CSB_R { - EF_IF_CSB_R::new(((self.bits >> 15) & 0x01) != 0) + pub fn ef_if_ps(&self) -> EF_IF_PS_R { + EF_IF_PS_R::new(((self.bits >> 11) & 1) != 0) } - #[doc = "Bit 14"] + #[doc = "Bit 12"] #[inline(always)] - pub fn ef_if_load(&self) -> EF_IF_LOAD_R { - EF_IF_LOAD_R::new(((self.bits >> 14) & 0x01) != 0) + pub fn ef_if_strobe(&self) -> EF_IF_STROBE_R { + EF_IF_STROBE_R::new(((self.bits >> 12) & 1) != 0) } #[doc = "Bit 13"] #[inline(always)] pub fn ef_if_pgenb(&self) -> EF_IF_PGENB_R { - EF_IF_PGENB_R::new(((self.bits >> 13) & 0x01) != 0) + EF_IF_PGENB_R::new(((self.bits >> 13) & 1) != 0) } - #[doc = "Bit 12"] + #[doc = "Bit 14"] #[inline(always)] - pub fn ef_if_strobe(&self) -> EF_IF_STROBE_R { - EF_IF_STROBE_R::new(((self.bits >> 12) & 0x01) != 0) + pub fn ef_if_load(&self) -> EF_IF_LOAD_R { + EF_IF_LOAD_R::new(((self.bits >> 14) & 1) != 0) } - #[doc = "Bit 11"] + #[doc = "Bit 15"] #[inline(always)] - pub fn ef_if_ps(&self) -> EF_IF_PS_R { - EF_IF_PS_R::new(((self.bits >> 11) & 0x01) != 0) + pub fn ef_if_csb(&self) -> EF_IF_CSB_R { + EF_IF_CSB_R::new(((self.bits >> 15) & 1) != 0) } - #[doc = "Bit 10"] + #[doc = "Bits 16:23"] #[inline(always)] - pub fn ef_if_pd(&self) -> EF_IF_PD_R { - EF_IF_PD_R::new(((self.bits >> 10) & 0x01) != 0) + pub fn ef_if_0_q(&self) -> EF_IF_0_Q_R { + EF_IF_0_Q_R::new(((self.bits >> 16) & 0xff) as u8) } - #[doc = "Bits 0:9"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn ef_if_a(&self) -> EF_IF_A_R { - EF_IF_A_R::new((self.bits & 0x03ff) as u16) + pub fn ef_if_prot_code_manual(&self) -> EF_IF_PROT_CODE_MANUAL_R { + EF_IF_PROT_CODE_MANUAL_R::new(((self.bits >> 24) & 0xff) as u8) } } impl W { - #[doc = "Bits 24:31"] + #[doc = "Bits 0:9"] #[inline(always)] - pub fn ef_if_prot_code_manual(&mut self) -> EF_IF_PROT_CODE_MANUAL_W { - EF_IF_PROT_CODE_MANUAL_W { w: self } + #[must_use] + pub fn ef_if_a(&mut self) -> EF_IF_A_W<0> { + EF_IF_A_W::new(self) } - #[doc = "Bit 15"] + #[doc = "Bit 10"] #[inline(always)] - pub fn ef_if_csb(&mut self) -> EF_IF_CSB_W { - EF_IF_CSB_W { w: self } + #[must_use] + pub fn ef_if_pd(&mut self) -> EF_IF_PD_W<10> { + EF_IF_PD_W::new(self) } - #[doc = "Bit 14"] + #[doc = "Bit 11"] #[inline(always)] - pub fn ef_if_load(&mut self) -> EF_IF_LOAD_W { - EF_IF_LOAD_W { w: self } + #[must_use] + pub fn ef_if_ps(&mut self) -> EF_IF_PS_W<11> { + EF_IF_PS_W::new(self) } - #[doc = "Bit 13"] + #[doc = "Bit 12"] #[inline(always)] - pub fn ef_if_pgenb(&mut self) -> EF_IF_PGENB_W { - EF_IF_PGENB_W { w: self } + #[must_use] + pub fn ef_if_strobe(&mut self) -> EF_IF_STROBE_W<12> { + EF_IF_STROBE_W::new(self) } - #[doc = "Bit 12"] + #[doc = "Bit 13"] #[inline(always)] - pub fn ef_if_strobe(&mut self) -> EF_IF_STROBE_W { - EF_IF_STROBE_W { w: self } + #[must_use] + pub fn ef_if_pgenb(&mut self) -> EF_IF_PGENB_W<13> { + EF_IF_PGENB_W::new(self) } - #[doc = "Bit 11"] + #[doc = "Bit 14"] #[inline(always)] - pub fn ef_if_ps(&mut self) -> EF_IF_PS_W { - EF_IF_PS_W { w: self } + #[must_use] + pub fn ef_if_load(&mut self) -> EF_IF_LOAD_W<14> { + EF_IF_LOAD_W::new(self) } - #[doc = "Bit 10"] + #[doc = "Bit 15"] #[inline(always)] - pub fn ef_if_pd(&mut self) -> EF_IF_PD_W { - EF_IF_PD_W { w: self } + #[must_use] + pub fn ef_if_csb(&mut self) -> EF_IF_CSB_W<15> { + EF_IF_CSB_W::new(self) } - #[doc = "Bits 0:9"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn ef_if_a(&mut self) -> EF_IF_A_W { - EF_IF_A_W { w: self } + #[must_use] + pub fn ef_if_prot_code_manual(&mut self) -> EF_IF_PROT_CODE_MANUAL_W<24> { + EF_IF_PROT_CODE_MANUAL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -420,11 +185,10 @@ impl crate::Readable for EF_IF_0_MANUAL_SPEC { #[doc = "`write(|w| ..)` method takes [ef_if_0_manual::W](W) writer structure"] impl crate::Writable for EF_IF_0_MANUAL_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_if_0_manual to value 0xe400"] impl crate::Resettable for EF_IF_0_MANUAL_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xe400 - } + const RESET_VALUE: Self::Ux = 0xe400; } diff --git a/src/ef_ctrl/ef_if_0_status.rs b/src/ef_ctrl/ef_if_0_status.rs index c1db449..ba676b9 100644 --- a/src/ef_ctrl/ef_if_0_status.rs +++ b/src/ef_ctrl/ef_if_0_status.rs @@ -7,33 +7,51 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `ef_if_0_status` reader - "] -pub struct EF_IF_0_STATUS_R(crate::FieldReader); -impl EF_IF_0_STATUS_R { - pub(crate) fn new(bits: u32) -> Self { - EF_IF_0_STATUS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_0_STATUS_R { - type Target = crate::FieldReader; +#[doc = "Register `ef_if_0_status` writer"] +pub struct W(crate::W); +impl core::ops::Deref for W { + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } +impl core::ops::DerefMut for W { + #[inline(always)] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } +} +impl From> for W { + #[inline(always)] + fn from(writer: crate::W) -> Self { + W(writer) + } +} +#[doc = "Field `ef_if_0_status` reader - "] +pub type EF_IF_0_STATUS_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_if_0_status(&self) -> EF_IF_0_STATUS_R { - EF_IF_0_STATUS_R::new((self.bits & 0xffff_ffff) as u32) + EF_IF_0_STATUS_R::new(self.bits) + } +} +impl W { + #[doc = "Writes raw bits to the register."] + #[inline(always)] + pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { + self.0.bits(bits); + self } } -#[doc = "ef_if_0_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 [ef_if_0_status](index.html) module"] +#[doc = "ef_if_0_status.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ef_if_0_status](index.html) module"] pub struct EF_IF_0_STATUS_SPEC; impl crate::RegisterSpec for EF_IF_0_STATUS_SPEC { type Ux = u32; @@ -42,10 +60,13 @@ impl crate::RegisterSpec for EF_IF_0_STATUS_SPEC { impl crate::Readable for EF_IF_0_STATUS_SPEC { type Reader = R; } +#[doc = "`write(|w| ..)` method takes [ef_if_0_status::W](W) writer structure"] +impl crate::Writable for EF_IF_0_STATUS_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} #[doc = "`reset()` method sets ef_if_0_status to value 0xe400"] impl crate::Resettable for EF_IF_0_STATUS_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xe400 - } + const RESET_VALUE: Self::Ux = 0xe400; } diff --git a/src/ef_ctrl/ef_if_ana_trim_0.rs b/src/ef_ctrl/ef_if_ana_trim_0.rs index 0a204f2..31ac377 100644 --- a/src/ef_ctrl/ef_if_ana_trim_0.rs +++ b/src/ef_ctrl/ef_if_ana_trim_0.rs @@ -7,33 +7,51 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `ef_if_ana_trim_0` reader - "] -pub struct EF_IF_ANA_TRIM_0_R(crate::FieldReader); -impl EF_IF_ANA_TRIM_0_R { - pub(crate) fn new(bits: u32) -> Self { - EF_IF_ANA_TRIM_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_ANA_TRIM_0_R { - type Target = crate::FieldReader; +#[doc = "Register `ef_if_ana_trim_0` writer"] +pub struct W(crate::W); +impl core::ops::Deref for W { + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } +impl core::ops::DerefMut for W { + #[inline(always)] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } +} +impl From> for W { + #[inline(always)] + fn from(writer: crate::W) -> Self { + W(writer) + } +} +#[doc = "Field `ef_if_ana_trim_0` reader - "] +pub type EF_IF_ANA_TRIM_0_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_if_ana_trim_0(&self) -> EF_IF_ANA_TRIM_0_R { - EF_IF_ANA_TRIM_0_R::new((self.bits & 0xffff_ffff) as u32) + EF_IF_ANA_TRIM_0_R::new(self.bits) + } +} +impl W { + #[doc = "Writes raw bits to the register."] + #[inline(always)] + pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { + self.0.bits(bits); + self } } -#[doc = "ef_if_ana_trim_0.\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 [ef_if_ana_trim_0](index.html) module"] +#[doc = "ef_if_ana_trim_0.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ef_if_ana_trim_0](index.html) module"] pub struct EF_IF_ANA_TRIM_0_SPEC; impl crate::RegisterSpec for EF_IF_ANA_TRIM_0_SPEC { type Ux = u32; @@ -42,10 +60,13 @@ impl crate::RegisterSpec for EF_IF_ANA_TRIM_0_SPEC { impl crate::Readable for EF_IF_ANA_TRIM_0_SPEC { type Reader = R; } +#[doc = "`write(|w| ..)` method takes [ef_if_ana_trim_0::W](W) writer structure"] +impl crate::Writable for EF_IF_ANA_TRIM_0_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} #[doc = "`reset()` method sets ef_if_ana_trim_0 to value 0"] impl crate::Resettable for EF_IF_ANA_TRIM_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_ctrl/ef_if_cfg_0.rs b/src/ef_ctrl/ef_if_cfg_0.rs index 563527c..1ebd2ff 100644 --- a/src/ef_ctrl/ef_if_cfg_0.rs +++ b/src/ef_ctrl/ef_if_cfg_0.rs @@ -7,392 +7,153 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `ef_if_dbg_mode` reader - "] -pub struct EF_IF_DBG_MODE_R(crate::FieldReader); -impl EF_IF_DBG_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - EF_IF_DBG_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_DBG_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +#[doc = "Field `ef_if_sf_aes_mode` reader - "] +pub type EF_IF_SF_AES_MODE_R = crate::FieldReader; +#[doc = "Field `ef_if_sboot_sign_mode` reader - "] +pub type EF_IF_SBOOT_SIGN_MODE_R = crate::FieldReader; +#[doc = "Field `ef_if_sboot_en` reader - "] +pub type EF_IF_SBOOT_EN_R = crate::FieldReader; +#[doc = "Field `ef_if_cpu1_enc_en` reader - "] +pub type EF_IF_CPU1_ENC_EN_R = crate::BitReader; +#[doc = "Field `ef_if_cpu0_enc_en` reader - "] +pub type EF_IF_CPU0_ENC_EN_R = crate::BitReader; +#[doc = "Field `ef_if_boot_sel` reader - "] +pub type EF_IF_BOOT_SEL_R = crate::FieldReader; +#[doc = "Field `ef_if_sw_usage_1` reader - "] +pub type EF_IF_SW_USAGE_1_R = crate::FieldReader; +#[doc = "Field `ef_if_sdu_dis` reader - "] +pub type EF_IF_SDU_DIS_R = crate::BitReader; +#[doc = "Field `ef_if_ble_dis` reader - "] +pub type EF_IF_BLE_DIS_R = crate::BitReader; +#[doc = "Field `ef_if_wifi_dis` reader - "] +pub type EF_IF_WIFI_DIS_R = crate::BitReader; +#[doc = "Field `ef_if_0_key_enc_en` reader - "] +pub type EF_IF_0_KEY_ENC_EN_R = crate::BitReader; +#[doc = "Field `ef_if_cam_dis` reader - "] +pub type EF_IF_CAM_DIS_R = crate::BitReader; +#[doc = "Field `ef_if_sf_dis` reader - "] +pub type EF_IF_SF_DIS_R = crate::BitReader; +#[doc = "Field `ef_if_cpu1_dis` reader - "] +pub type EF_IF_CPU1_DIS_R = crate::BitReader; +#[doc = "Field `ef_if_cpu_rst_dbg_dis` reader - "] +pub type EF_IF_CPU_RST_DBG_DIS_R = crate::BitReader; +#[doc = "Field `ef_if_se_dbg_dis` reader - "] +pub type EF_IF_SE_DBG_DIS_R = crate::BitReader; +#[doc = "Field `ef_if_efuse_dbg_dis` reader - "] +pub type EF_IF_EFUSE_DBG_DIS_R = crate::BitReader; +#[doc = "Field `ef_if_dbg_jtag_1_dis` reader - "] +pub type EF_IF_DBG_JTAG_1_DIS_R = crate::FieldReader; #[doc = "Field `ef_if_dbg_jtag_0_dis` reader - "] -pub struct EF_IF_DBG_JTAG_0_DIS_R(crate::FieldReader); -impl EF_IF_DBG_JTAG_0_DIS_R { - pub(crate) fn new(bits: u8) -> Self { - EF_IF_DBG_JTAG_0_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_DBG_JTAG_0_DIS_R { - type Target = crate::FieldReader; +pub type EF_IF_DBG_JTAG_0_DIS_R = crate::FieldReader; +#[doc = "Field `ef_if_dbg_mode` reader - "] +pub type EF_IF_DBG_MODE_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:1"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_dbg_jtag_1_dis` reader - "] -pub struct EF_IF_DBG_JTAG_1_DIS_R(crate::FieldReader); -impl EF_IF_DBG_JTAG_1_DIS_R { - pub(crate) fn new(bits: u8) -> Self { - EF_IF_DBG_JTAG_1_DIS_R(crate::FieldReader::new(bits)) + pub fn ef_if_sf_aes_mode(&self) -> EF_IF_SF_AES_MODE_R { + EF_IF_SF_AES_MODE_R::new((self.bits & 3) as u8) } -} -impl core::ops::Deref for EF_IF_DBG_JTAG_1_DIS_R { - type Target = crate::FieldReader; + #[doc = "Bits 2:3"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_efuse_dbg_dis` reader - "] -pub struct EF_IF_EFUSE_DBG_DIS_R(crate::FieldReader); -impl EF_IF_EFUSE_DBG_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - EF_IF_EFUSE_DBG_DIS_R(crate::FieldReader::new(bits)) + pub fn ef_if_sboot_sign_mode(&self) -> EF_IF_SBOOT_SIGN_MODE_R { + EF_IF_SBOOT_SIGN_MODE_R::new(((self.bits >> 2) & 3) as u8) } -} -impl core::ops::Deref for EF_IF_EFUSE_DBG_DIS_R { - type Target = crate::FieldReader; + #[doc = "Bits 4:5"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_se_dbg_dis` reader - "] -pub struct EF_IF_SE_DBG_DIS_R(crate::FieldReader); -impl EF_IF_SE_DBG_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - EF_IF_SE_DBG_DIS_R(crate::FieldReader::new(bits)) + pub fn ef_if_sboot_en(&self) -> EF_IF_SBOOT_EN_R { + EF_IF_SBOOT_EN_R::new(((self.bits >> 4) & 3) as u8) } -} -impl core::ops::Deref for EF_IF_SE_DBG_DIS_R { - type Target = crate::FieldReader; + #[doc = "Bit 6"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_cpu_rst_dbg_dis` reader - "] -pub struct EF_IF_CPU_RST_DBG_DIS_R(crate::FieldReader); -impl EF_IF_CPU_RST_DBG_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - EF_IF_CPU_RST_DBG_DIS_R(crate::FieldReader::new(bits)) + pub fn ef_if_cpu1_enc_en(&self) -> EF_IF_CPU1_ENC_EN_R { + EF_IF_CPU1_ENC_EN_R::new(((self.bits >> 6) & 1) != 0) } -} -impl core::ops::Deref for EF_IF_CPU_RST_DBG_DIS_R { - type Target = crate::FieldReader; + #[doc = "Bit 7"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_cpu1_dis` reader - "] -pub struct EF_IF_CPU1_DIS_R(crate::FieldReader); -impl EF_IF_CPU1_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - EF_IF_CPU1_DIS_R(crate::FieldReader::new(bits)) + pub fn ef_if_cpu0_enc_en(&self) -> EF_IF_CPU0_ENC_EN_R { + EF_IF_CPU0_ENC_EN_R::new(((self.bits >> 7) & 1) != 0) } -} -impl core::ops::Deref for EF_IF_CPU1_DIS_R { - type Target = crate::FieldReader; + #[doc = "Bits 8:11"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_sf_dis` reader - "] -pub struct EF_IF_SF_DIS_R(crate::FieldReader); -impl EF_IF_SF_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - EF_IF_SF_DIS_R(crate::FieldReader::new(bits)) + pub fn ef_if_boot_sel(&self) -> EF_IF_BOOT_SEL_R { + EF_IF_BOOT_SEL_R::new(((self.bits >> 8) & 0x0f) as u8) } -} -impl core::ops::Deref for EF_IF_SF_DIS_R { - type Target = crate::FieldReader; + #[doc = "Bits 12:13"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_cam_dis` reader - "] -pub struct EF_IF_CAM_DIS_R(crate::FieldReader); -impl EF_IF_CAM_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - EF_IF_CAM_DIS_R(crate::FieldReader::new(bits)) + pub fn ef_if_sw_usage_1(&self) -> EF_IF_SW_USAGE_1_R { + EF_IF_SW_USAGE_1_R::new(((self.bits >> 12) & 3) as u8) } -} -impl core::ops::Deref for EF_IF_CAM_DIS_R { - type Target = crate::FieldReader; + #[doc = "Bit 14"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_0_key_enc_en` reader - "] -pub struct EF_IF_0_KEY_ENC_EN_R(crate::FieldReader); -impl EF_IF_0_KEY_ENC_EN_R { - pub(crate) fn new(bits: bool) -> Self { - EF_IF_0_KEY_ENC_EN_R(crate::FieldReader::new(bits)) + pub fn ef_if_sdu_dis(&self) -> EF_IF_SDU_DIS_R { + EF_IF_SDU_DIS_R::new(((self.bits >> 14) & 1) != 0) } -} -impl core::ops::Deref for EF_IF_0_KEY_ENC_EN_R { - type Target = crate::FieldReader; + #[doc = "Bit 15"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_wifi_dis` reader - "] -pub struct EF_IF_WIFI_DIS_R(crate::FieldReader); -impl EF_IF_WIFI_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - EF_IF_WIFI_DIS_R(crate::FieldReader::new(bits)) + pub fn ef_if_ble_dis(&self) -> EF_IF_BLE_DIS_R { + EF_IF_BLE_DIS_R::new(((self.bits >> 15) & 1) != 0) } -} -impl core::ops::Deref for EF_IF_WIFI_DIS_R { - type Target = crate::FieldReader; + #[doc = "Bit 16"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_ble_dis` reader - "] -pub struct EF_IF_BLE_DIS_R(crate::FieldReader); -impl EF_IF_BLE_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - EF_IF_BLE_DIS_R(crate::FieldReader::new(bits)) + pub fn ef_if_wifi_dis(&self) -> EF_IF_WIFI_DIS_R { + EF_IF_WIFI_DIS_R::new(((self.bits >> 16) & 1) != 0) } -} -impl core::ops::Deref for EF_IF_BLE_DIS_R { - type Target = crate::FieldReader; + #[doc = "Bit 17"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_sdu_dis` reader - "] -pub struct EF_IF_SDU_DIS_R(crate::FieldReader); -impl EF_IF_SDU_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - EF_IF_SDU_DIS_R(crate::FieldReader::new(bits)) + pub fn ef_if_0_key_enc_en(&self) -> EF_IF_0_KEY_ENC_EN_R { + EF_IF_0_KEY_ENC_EN_R::new(((self.bits >> 17) & 1) != 0) } -} -impl core::ops::Deref for EF_IF_SDU_DIS_R { - type Target = crate::FieldReader; + #[doc = "Bit 18"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_sw_usage_1` reader - "] -pub struct EF_IF_SW_USAGE_1_R(crate::FieldReader); -impl EF_IF_SW_USAGE_1_R { - pub(crate) fn new(bits: u8) -> Self { - EF_IF_SW_USAGE_1_R(crate::FieldReader::new(bits)) + pub fn ef_if_cam_dis(&self) -> EF_IF_CAM_DIS_R { + EF_IF_CAM_DIS_R::new(((self.bits >> 18) & 1) != 0) } -} -impl core::ops::Deref for EF_IF_SW_USAGE_1_R { - type Target = crate::FieldReader; + #[doc = "Bit 19"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_boot_sel` reader - "] -pub struct EF_IF_BOOT_SEL_R(crate::FieldReader); -impl EF_IF_BOOT_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - EF_IF_BOOT_SEL_R(crate::FieldReader::new(bits)) + pub fn ef_if_sf_dis(&self) -> EF_IF_SF_DIS_R { + EF_IF_SF_DIS_R::new(((self.bits >> 19) & 1) != 0) } -} -impl core::ops::Deref for EF_IF_BOOT_SEL_R { - type Target = crate::FieldReader; + #[doc = "Bit 20"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_cpu0_enc_en` reader - "] -pub struct EF_IF_CPU0_ENC_EN_R(crate::FieldReader); -impl EF_IF_CPU0_ENC_EN_R { - pub(crate) fn new(bits: bool) -> Self { - EF_IF_CPU0_ENC_EN_R(crate::FieldReader::new(bits)) + pub fn ef_if_cpu1_dis(&self) -> EF_IF_CPU1_DIS_R { + EF_IF_CPU1_DIS_R::new(((self.bits >> 20) & 1) != 0) } -} -impl core::ops::Deref for EF_IF_CPU0_ENC_EN_R { - type Target = crate::FieldReader; + #[doc = "Bit 21"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_cpu1_enc_en` reader - "] -pub struct EF_IF_CPU1_ENC_EN_R(crate::FieldReader); -impl EF_IF_CPU1_ENC_EN_R { - pub(crate) fn new(bits: bool) -> Self { - EF_IF_CPU1_ENC_EN_R(crate::FieldReader::new(bits)) + pub fn ef_if_cpu_rst_dbg_dis(&self) -> EF_IF_CPU_RST_DBG_DIS_R { + EF_IF_CPU_RST_DBG_DIS_R::new(((self.bits >> 21) & 1) != 0) } -} -impl core::ops::Deref for EF_IF_CPU1_ENC_EN_R { - type Target = crate::FieldReader; + #[doc = "Bit 22"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_sboot_en` reader - "] -pub struct EF_IF_SBOOT_EN_R(crate::FieldReader); -impl EF_IF_SBOOT_EN_R { - pub(crate) fn new(bits: u8) -> Self { - EF_IF_SBOOT_EN_R(crate::FieldReader::new(bits)) + pub fn ef_if_se_dbg_dis(&self) -> EF_IF_SE_DBG_DIS_R { + EF_IF_SE_DBG_DIS_R::new(((self.bits >> 22) & 1) != 0) } -} -impl core::ops::Deref for EF_IF_SBOOT_EN_R { - type Target = crate::FieldReader; + #[doc = "Bit 23"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_sboot_sign_mode` reader - "] -pub struct EF_IF_SBOOT_SIGN_MODE_R(crate::FieldReader); -impl EF_IF_SBOOT_SIGN_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - EF_IF_SBOOT_SIGN_MODE_R(crate::FieldReader::new(bits)) + pub fn ef_if_efuse_dbg_dis(&self) -> EF_IF_EFUSE_DBG_DIS_R { + EF_IF_EFUSE_DBG_DIS_R::new(((self.bits >> 23) & 1) != 0) } -} -impl core::ops::Deref for EF_IF_SBOOT_SIGN_MODE_R { - type Target = crate::FieldReader; + #[doc = "Bits 24:25"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_sf_aes_mode` reader - "] -pub struct EF_IF_SF_AES_MODE_R(crate::FieldReader); -impl EF_IF_SF_AES_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - EF_IF_SF_AES_MODE_R(crate::FieldReader::new(bits)) + pub fn ef_if_dbg_jtag_1_dis(&self) -> EF_IF_DBG_JTAG_1_DIS_R { + EF_IF_DBG_JTAG_1_DIS_R::new(((self.bits >> 24) & 3) as u8) } -} -impl core::ops::Deref for EF_IF_SF_AES_MODE_R { - type Target = crate::FieldReader; + #[doc = "Bits 26:27"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn ef_if_dbg_jtag_0_dis(&self) -> EF_IF_DBG_JTAG_0_DIS_R { + EF_IF_DBG_JTAG_0_DIS_R::new(((self.bits >> 26) & 3) as u8) } -} -impl R { #[doc = "Bits 28:31"] #[inline(always)] pub fn ef_if_dbg_mode(&self) -> EF_IF_DBG_MODE_R { EF_IF_DBG_MODE_R::new(((self.bits >> 28) & 0x0f) as u8) } - #[doc = "Bits 26:27"] - #[inline(always)] - pub fn ef_if_dbg_jtag_0_dis(&self) -> EF_IF_DBG_JTAG_0_DIS_R { - EF_IF_DBG_JTAG_0_DIS_R::new(((self.bits >> 26) & 0x03) as u8) - } - #[doc = "Bits 24:25"] - #[inline(always)] - pub fn ef_if_dbg_jtag_1_dis(&self) -> EF_IF_DBG_JTAG_1_DIS_R { - EF_IF_DBG_JTAG_1_DIS_R::new(((self.bits >> 24) & 0x03) as u8) - } - #[doc = "Bit 23"] - #[inline(always)] - pub fn ef_if_efuse_dbg_dis(&self) -> EF_IF_EFUSE_DBG_DIS_R { - EF_IF_EFUSE_DBG_DIS_R::new(((self.bits >> 23) & 0x01) != 0) - } - #[doc = "Bit 22"] - #[inline(always)] - pub fn ef_if_se_dbg_dis(&self) -> EF_IF_SE_DBG_DIS_R { - EF_IF_SE_DBG_DIS_R::new(((self.bits >> 22) & 0x01) != 0) - } - #[doc = "Bit 21"] - #[inline(always)] - pub fn ef_if_cpu_rst_dbg_dis(&self) -> EF_IF_CPU_RST_DBG_DIS_R { - EF_IF_CPU_RST_DBG_DIS_R::new(((self.bits >> 21) & 0x01) != 0) - } - #[doc = "Bit 20"] - #[inline(always)] - pub fn ef_if_cpu1_dis(&self) -> EF_IF_CPU1_DIS_R { - EF_IF_CPU1_DIS_R::new(((self.bits >> 20) & 0x01) != 0) - } - #[doc = "Bit 19"] - #[inline(always)] - pub fn ef_if_sf_dis(&self) -> EF_IF_SF_DIS_R { - EF_IF_SF_DIS_R::new(((self.bits >> 19) & 0x01) != 0) - } - #[doc = "Bit 18"] - #[inline(always)] - pub fn ef_if_cam_dis(&self) -> EF_IF_CAM_DIS_R { - EF_IF_CAM_DIS_R::new(((self.bits >> 18) & 0x01) != 0) - } - #[doc = "Bit 17"] - #[inline(always)] - pub fn ef_if_0_key_enc_en(&self) -> EF_IF_0_KEY_ENC_EN_R { - EF_IF_0_KEY_ENC_EN_R::new(((self.bits >> 17) & 0x01) != 0) - } - #[doc = "Bit 16"] - #[inline(always)] - pub fn ef_if_wifi_dis(&self) -> EF_IF_WIFI_DIS_R { - EF_IF_WIFI_DIS_R::new(((self.bits >> 16) & 0x01) != 0) - } - #[doc = "Bit 15"] - #[inline(always)] - pub fn ef_if_ble_dis(&self) -> EF_IF_BLE_DIS_R { - EF_IF_BLE_DIS_R::new(((self.bits >> 15) & 0x01) != 0) - } - #[doc = "Bit 14"] - #[inline(always)] - pub fn ef_if_sdu_dis(&self) -> EF_IF_SDU_DIS_R { - EF_IF_SDU_DIS_R::new(((self.bits >> 14) & 0x01) != 0) - } - #[doc = "Bits 12:13"] - #[inline(always)] - pub fn ef_if_sw_usage_1(&self) -> EF_IF_SW_USAGE_1_R { - EF_IF_SW_USAGE_1_R::new(((self.bits >> 12) & 0x03) as u8) - } - #[doc = "Bits 8:11"] - #[inline(always)] - pub fn ef_if_boot_sel(&self) -> EF_IF_BOOT_SEL_R { - EF_IF_BOOT_SEL_R::new(((self.bits >> 8) & 0x0f) as u8) - } - #[doc = "Bit 7"] - #[inline(always)] - pub fn ef_if_cpu0_enc_en(&self) -> EF_IF_CPU0_ENC_EN_R { - EF_IF_CPU0_ENC_EN_R::new(((self.bits >> 7) & 0x01) != 0) - } - #[doc = "Bit 6"] - #[inline(always)] - pub fn ef_if_cpu1_enc_en(&self) -> EF_IF_CPU1_ENC_EN_R { - EF_IF_CPU1_ENC_EN_R::new(((self.bits >> 6) & 0x01) != 0) - } - #[doc = "Bits 4:5"] - #[inline(always)] - pub fn ef_if_sboot_en(&self) -> EF_IF_SBOOT_EN_R { - EF_IF_SBOOT_EN_R::new(((self.bits >> 4) & 0x03) as u8) - } - #[doc = "Bits 2:3"] - #[inline(always)] - pub fn ef_if_sboot_sign_mode(&self) -> EF_IF_SBOOT_SIGN_MODE_R { - EF_IF_SBOOT_SIGN_MODE_R::new(((self.bits >> 2) & 0x03) as u8) - } - #[doc = "Bits 0:1"] - #[inline(always)] - pub fn ef_if_sf_aes_mode(&self) -> EF_IF_SF_AES_MODE_R { - EF_IF_SF_AES_MODE_R::new((self.bits & 0x03) as u8) - } } #[doc = "ef_if_cfg_0.\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 [ef_if_cfg_0](index.html) module"] pub struct EF_IF_CFG_0_SPEC; @@ -405,8 +166,5 @@ impl crate::Readable for EF_IF_CFG_0_SPEC { } #[doc = "`reset()` method sets ef_if_cfg_0 to value 0"] impl crate::Resettable for EF_IF_CFG_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_ctrl/ef_if_ctrl_0.rs b/src/ef_ctrl/ef_if_ctrl_0.rs index a9c9e8e..43efbd7 100644 --- a/src/ef_ctrl/ef_if_ctrl_0.rs +++ b/src/ef_ctrl/ef_if_ctrl_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,669 +28,248 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `ef_if_prot_code_cyc` reader - "] -pub struct EF_IF_PROT_CODE_CYC_R(crate::FieldReader); -impl EF_IF_PROT_CODE_CYC_R { - pub(crate) fn new(bits: u8) -> Self { - EF_IF_PROT_CODE_CYC_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_PROT_CODE_CYC_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_prot_code_cyc` writer - "] -pub struct EF_IF_PROT_CODE_CYC_W<'a> { - w: &'a mut W, -} -impl<'a> EF_IF_PROT_CODE_CYC_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 24)) | ((value as u32 & 0xff) << 24); - self.w - } -} -#[doc = "Field `ef_if_0_int_set` reader - "] -pub struct EF_IF_0_INT_SET_R(crate::FieldReader); -impl EF_IF_0_INT_SET_R { - pub(crate) fn new(bits: bool) -> Self { - EF_IF_0_INT_SET_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_0_INT_SET_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_0_int_set` writer - "] -pub struct EF_IF_0_INT_SET_W<'a> { - w: &'a mut W, -} -impl<'a> EF_IF_0_INT_SET_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 22)) | ((value as u32 & 0x01) << 22); - self.w - } -} -#[doc = "Field `ef_if_0_int_clr` reader - "] -pub struct EF_IF_0_INT_CLR_R(crate::FieldReader); -impl EF_IF_0_INT_CLR_R { - pub(crate) fn new(bits: bool) -> Self { - EF_IF_0_INT_CLR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_0_INT_CLR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_0_int_clr` writer - "] -pub struct EF_IF_0_INT_CLR_W<'a> { - w: &'a mut W, -} -impl<'a> EF_IF_0_INT_CLR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); - self.w - } -} -#[doc = "Field `ef_if_0_int` reader - "] -pub struct EF_IF_0_INT_R(crate::FieldReader); -impl EF_IF_0_INT_R { - pub(crate) fn new(bits: bool) -> Self { - EF_IF_0_INT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_0_INT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_cyc_modify_lock` reader - "] -pub struct EF_IF_CYC_MODIFY_LOCK_R(crate::FieldReader); -impl EF_IF_CYC_MODIFY_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - EF_IF_CYC_MODIFY_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_CYC_MODIFY_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_cyc_modify_lock` writer - "] -pub struct EF_IF_CYC_MODIFY_LOCK_W<'a> { - w: &'a mut W, -} -impl<'a> EF_IF_CYC_MODIFY_LOCK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 19)) | ((value as u32 & 0x01) << 19); - self.w - } -} -#[doc = "Field `ef_if_auto_rd_en` reader - "] -pub struct EF_IF_AUTO_RD_EN_R(crate::FieldReader); -impl EF_IF_AUTO_RD_EN_R { - pub(crate) fn new(bits: bool) -> Self { - EF_IF_AUTO_RD_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_AUTO_RD_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_auto_rd_en` writer - "] -pub struct EF_IF_AUTO_RD_EN_W<'a> { - w: &'a mut W, -} -impl<'a> EF_IF_AUTO_RD_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18); - self.w - } -} -#[doc = "Field `ef_clk_sahb_data_gate` reader - "] -pub struct EF_CLK_SAHB_DATA_GATE_R(crate::FieldReader); -impl EF_CLK_SAHB_DATA_GATE_R { - pub(crate) fn new(bits: bool) -> Self { - EF_CLK_SAHB_DATA_GATE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_CLK_SAHB_DATA_GATE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_clk_sahb_data_gate` writer - "] -pub struct EF_CLK_SAHB_DATA_GATE_W<'a> { - w: &'a mut W, -} -impl<'a> EF_CLK_SAHB_DATA_GATE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w - } -} -#[doc = "Field `ef_if_por_dig` reader - "] -pub struct EF_IF_POR_DIG_R(crate::FieldReader); -impl EF_IF_POR_DIG_R { - pub(crate) fn new(bits: bool) -> Self { - EF_IF_POR_DIG_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_POR_DIG_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_por_dig` writer - "] -pub struct EF_IF_POR_DIG_W<'a> { - w: &'a mut W, -} -impl<'a> EF_IF_POR_DIG_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `ef_if_prot_code_ctrl` reader - "] -pub struct EF_IF_PROT_CODE_CTRL_R(crate::FieldReader); -impl EF_IF_PROT_CODE_CTRL_R { - pub(crate) fn new(bits: u8) -> Self { - EF_IF_PROT_CODE_CTRL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_PROT_CODE_CTRL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_prot_code_ctrl` writer - "] -pub struct EF_IF_PROT_CODE_CTRL_W<'a> { - w: &'a mut W, -} -impl<'a> EF_IF_PROT_CODE_CTRL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8); - self.w - } -} -#[doc = "Field `ef_clk_sahb_data_sel` reader - "] -pub struct EF_CLK_SAHB_DATA_SEL_R(crate::FieldReader); -impl EF_CLK_SAHB_DATA_SEL_R { - pub(crate) fn new(bits: bool) -> Self { - EF_CLK_SAHB_DATA_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_CLK_SAHB_DATA_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_clk_sahb_data_sel` writer - "] -pub struct EF_CLK_SAHB_DATA_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> EF_CLK_SAHB_DATA_SEL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7); - self.w - } -} -#[doc = "Field `ef_if_0_cyc_modify` reader - "] -pub struct EF_IF_0_CYC_MODIFY_R(crate::FieldReader); -impl EF_IF_0_CYC_MODIFY_R { - pub(crate) fn new(bits: bool) -> Self { - EF_IF_0_CYC_MODIFY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_0_CYC_MODIFY_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_0_cyc_modify` writer - "] -pub struct EF_IF_0_CYC_MODIFY_W<'a> { - w: &'a mut W, -} -impl<'a> EF_IF_0_CYC_MODIFY_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w - } -} -#[doc = "Field `ef_if_0_manual_en` reader - "] -pub struct EF_IF_0_MANUAL_EN_R(crate::FieldReader); -impl EF_IF_0_MANUAL_EN_R { - pub(crate) fn new(bits: bool) -> Self { - EF_IF_0_MANUAL_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_0_MANUAL_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_0_manual_en` writer - "] -pub struct EF_IF_0_MANUAL_EN_W<'a> { - w: &'a mut W, -} -impl<'a> EF_IF_0_MANUAL_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w - } -} -#[doc = "Field `ef_if_0_trig` reader - "] -pub struct EF_IF_0_TRIG_R(crate::FieldReader); -impl EF_IF_0_TRIG_R { - pub(crate) fn new(bits: bool) -> Self { - EF_IF_0_TRIG_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_0_TRIG_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_0_trig` writer - "] -pub struct EF_IF_0_TRIG_W<'a> { - w: &'a mut W, -} -impl<'a> EF_IF_0_TRIG_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} +#[doc = "Field `ef_if_0_autoload_p1_done` reader - "] +pub type EF_IF_0_AUTOLOAD_P1_DONE_R = crate::BitReader; +#[doc = "Field `ef_if_0_autoload_done` reader - "] +pub type EF_IF_0_AUTOLOAD_DONE_R = crate::BitReader; +#[doc = "Field `ef_if_0_busy` reader - "] +pub type EF_IF_0_BUSY_R = crate::BitReader; #[doc = "Field `ef_if_0_rw` reader - "] -pub struct EF_IF_0_RW_R(crate::FieldReader); -impl EF_IF_0_RW_R { - pub(crate) fn new(bits: bool) -> Self { - EF_IF_0_RW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_0_RW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_IF_0_RW_R = crate::BitReader; #[doc = "Field `ef_if_0_rw` writer - "] -pub struct EF_IF_0_RW_W<'a> { - w: &'a mut W, -} -impl<'a> EF_IF_0_RW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `ef_if_0_busy` reader - "] -pub struct EF_IF_0_BUSY_R(crate::FieldReader); -impl EF_IF_0_BUSY_R { - pub(crate) fn new(bits: bool) -> Self { - EF_IF_0_BUSY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_0_BUSY_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_0_autoload_done` reader - "] -pub struct EF_IF_0_AUTOLOAD_DONE_R(crate::FieldReader); -impl EF_IF_0_AUTOLOAD_DONE_R { - pub(crate) fn new(bits: bool) -> Self { - EF_IF_0_AUTOLOAD_DONE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_0_AUTOLOAD_DONE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_0_autoload_p1_done` reader - "] -pub struct EF_IF_0_AUTOLOAD_P1_DONE_R(crate::FieldReader); -impl EF_IF_0_AUTOLOAD_P1_DONE_R { - pub(crate) fn new(bits: bool) -> Self { - EF_IF_0_AUTOLOAD_P1_DONE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_0_AUTOLOAD_P1_DONE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_IF_0_RW_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_IF_CTRL_0_SPEC, bool, O>; +#[doc = "Field `ef_if_0_trig` reader - "] +pub type EF_IF_0_TRIG_R = crate::BitReader; +#[doc = "Field `ef_if_0_trig` writer - "] +pub type EF_IF_0_TRIG_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_IF_CTRL_0_SPEC, bool, O>; +#[doc = "Field `ef_if_0_manual_en` reader - "] +pub type EF_IF_0_MANUAL_EN_R = crate::BitReader; +#[doc = "Field `ef_if_0_manual_en` writer - "] +pub type EF_IF_0_MANUAL_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EF_IF_CTRL_0_SPEC, bool, O>; +#[doc = "Field `ef_if_0_cyc_modify` reader - "] +pub type EF_IF_0_CYC_MODIFY_R = crate::BitReader; +#[doc = "Field `ef_if_0_cyc_modify` writer - "] +pub type EF_IF_0_CYC_MODIFY_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EF_IF_CTRL_0_SPEC, bool, O>; +#[doc = "Field `ef_clk_sahb_data_sel` reader - "] +pub type EF_CLK_SAHB_DATA_SEL_R = crate::BitReader; +#[doc = "Field `ef_clk_sahb_data_sel` writer - "] +pub type EF_CLK_SAHB_DATA_SEL_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EF_IF_CTRL_0_SPEC, bool, O>; +#[doc = "Field `ef_if_prot_code_ctrl` reader - "] +pub type EF_IF_PROT_CODE_CTRL_R = crate::FieldReader; +#[doc = "Field `ef_if_prot_code_ctrl` writer - "] +pub type EF_IF_PROT_CODE_CTRL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_IF_CTRL_0_SPEC, u8, u8, 8, O>; +#[doc = "Field `ef_if_por_dig` reader - "] +pub type EF_IF_POR_DIG_R = crate::BitReader; +#[doc = "Field `ef_if_por_dig` writer - "] +pub type EF_IF_POR_DIG_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_IF_CTRL_0_SPEC, bool, O>; +#[doc = "Field `ef_clk_sahb_data_gate` reader - "] +pub type EF_CLK_SAHB_DATA_GATE_R = crate::BitReader; +#[doc = "Field `ef_clk_sahb_data_gate` writer - "] +pub type EF_CLK_SAHB_DATA_GATE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EF_IF_CTRL_0_SPEC, bool, O>; +#[doc = "Field `ef_if_auto_rd_en` reader - "] +pub type EF_IF_AUTO_RD_EN_R = crate::BitReader; +#[doc = "Field `ef_if_auto_rd_en` writer - "] +pub type EF_IF_AUTO_RD_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EF_IF_CTRL_0_SPEC, bool, O>; +#[doc = "Field `ef_if_cyc_modify_lock` reader - "] +pub type EF_IF_CYC_MODIFY_LOCK_R = crate::BitReader; +#[doc = "Field `ef_if_cyc_modify_lock` writer - "] +pub type EF_IF_CYC_MODIFY_LOCK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EF_IF_CTRL_0_SPEC, bool, O>; +#[doc = "Field `ef_if_0_int` reader - "] +pub type EF_IF_0_INT_R = crate::BitReader; +#[doc = "Field `ef_if_0_int_clr` reader - "] +pub type EF_IF_0_INT_CLR_R = crate::BitReader; +#[doc = "Field `ef_if_0_int_clr` writer - "] +pub type EF_IF_0_INT_CLR_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_IF_CTRL_0_SPEC, bool, O>; +#[doc = "Field `ef_if_0_int_set` reader - "] +pub type EF_IF_0_INT_SET_R = crate::BitReader; +#[doc = "Field `ef_if_0_int_set` writer - "] +pub type EF_IF_0_INT_SET_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_IF_CTRL_0_SPEC, bool, O>; +#[doc = "Field `ef_if_prot_code_cyc` reader - "] +pub type EF_IF_PROT_CODE_CYC_R = crate::FieldReader; +#[doc = "Field `ef_if_prot_code_cyc` writer - "] +pub type EF_IF_PROT_CODE_CYC_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_IF_CTRL_0_SPEC, u8, u8, 8, O>; impl R { - #[doc = "Bits 24:31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn ef_if_prot_code_cyc(&self) -> EF_IF_PROT_CODE_CYC_R { - EF_IF_PROT_CODE_CYC_R::new(((self.bits >> 24) & 0xff) as u8) + pub fn ef_if_0_autoload_p1_done(&self) -> EF_IF_0_AUTOLOAD_P1_DONE_R { + EF_IF_0_AUTOLOAD_P1_DONE_R::new((self.bits & 1) != 0) } - #[doc = "Bit 22"] + #[doc = "Bit 1"] #[inline(always)] - pub fn ef_if_0_int_set(&self) -> EF_IF_0_INT_SET_R { - EF_IF_0_INT_SET_R::new(((self.bits >> 22) & 0x01) != 0) + pub fn ef_if_0_autoload_done(&self) -> EF_IF_0_AUTOLOAD_DONE_R { + EF_IF_0_AUTOLOAD_DONE_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 21"] + #[doc = "Bit 2"] #[inline(always)] - pub fn ef_if_0_int_clr(&self) -> EF_IF_0_INT_CLR_R { - EF_IF_0_INT_CLR_R::new(((self.bits >> 21) & 0x01) != 0) + pub fn ef_if_0_busy(&self) -> EF_IF_0_BUSY_R { + EF_IF_0_BUSY_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 20"] + #[doc = "Bit 3"] #[inline(always)] - pub fn ef_if_0_int(&self) -> EF_IF_0_INT_R { - EF_IF_0_INT_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn ef_if_0_rw(&self) -> EF_IF_0_RW_R { + EF_IF_0_RW_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bit 19"] + #[doc = "Bit 4"] #[inline(always)] - pub fn ef_if_cyc_modify_lock(&self) -> EF_IF_CYC_MODIFY_LOCK_R { - EF_IF_CYC_MODIFY_LOCK_R::new(((self.bits >> 19) & 0x01) != 0) + pub fn ef_if_0_trig(&self) -> EF_IF_0_TRIG_R { + EF_IF_0_TRIG_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 18"] + #[doc = "Bit 5"] #[inline(always)] - pub fn ef_if_auto_rd_en(&self) -> EF_IF_AUTO_RD_EN_R { - EF_IF_AUTO_RD_EN_R::new(((self.bits >> 18) & 0x01) != 0) + pub fn ef_if_0_manual_en(&self) -> EF_IF_0_MANUAL_EN_R { + EF_IF_0_MANUAL_EN_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 17"] + #[doc = "Bit 6"] #[inline(always)] - pub fn ef_clk_sahb_data_gate(&self) -> EF_CLK_SAHB_DATA_GATE_R { - EF_CLK_SAHB_DATA_GATE_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn ef_if_0_cyc_modify(&self) -> EF_IF_0_CYC_MODIFY_R { + EF_IF_0_CYC_MODIFY_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = "Bit 16"] + #[doc = "Bit 7"] #[inline(always)] - pub fn ef_if_por_dig(&self) -> EF_IF_POR_DIG_R { - EF_IF_POR_DIG_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn ef_clk_sahb_data_sel(&self) -> EF_CLK_SAHB_DATA_SEL_R { + EF_CLK_SAHB_DATA_SEL_R::new(((self.bits >> 7) & 1) != 0) } #[doc = "Bits 8:15"] #[inline(always)] pub fn ef_if_prot_code_ctrl(&self) -> EF_IF_PROT_CODE_CTRL_R { EF_IF_PROT_CODE_CTRL_R::new(((self.bits >> 8) & 0xff) as u8) } - #[doc = "Bit 7"] + #[doc = "Bit 16"] #[inline(always)] - pub fn ef_clk_sahb_data_sel(&self) -> EF_CLK_SAHB_DATA_SEL_R { - EF_CLK_SAHB_DATA_SEL_R::new(((self.bits >> 7) & 0x01) != 0) + pub fn ef_if_por_dig(&self) -> EF_IF_POR_DIG_R { + EF_IF_POR_DIG_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 6"] + #[doc = "Bit 17"] #[inline(always)] - pub fn ef_if_0_cyc_modify(&self) -> EF_IF_0_CYC_MODIFY_R { - EF_IF_0_CYC_MODIFY_R::new(((self.bits >> 6) & 0x01) != 0) + pub fn ef_clk_sahb_data_gate(&self) -> EF_CLK_SAHB_DATA_GATE_R { + EF_CLK_SAHB_DATA_GATE_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bit 5"] + #[doc = "Bit 18"] #[inline(always)] - pub fn ef_if_0_manual_en(&self) -> EF_IF_0_MANUAL_EN_R { - EF_IF_0_MANUAL_EN_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn ef_if_auto_rd_en(&self) -> EF_IF_AUTO_RD_EN_R { + EF_IF_AUTO_RD_EN_R::new(((self.bits >> 18) & 1) != 0) } - #[doc = "Bit 4"] + #[doc = "Bit 19"] #[inline(always)] - pub fn ef_if_0_trig(&self) -> EF_IF_0_TRIG_R { - EF_IF_0_TRIG_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn ef_if_cyc_modify_lock(&self) -> EF_IF_CYC_MODIFY_LOCK_R { + EF_IF_CYC_MODIFY_LOCK_R::new(((self.bits >> 19) & 1) != 0) } - #[doc = "Bit 3"] + #[doc = "Bit 20"] #[inline(always)] - pub fn ef_if_0_rw(&self) -> EF_IF_0_RW_R { - EF_IF_0_RW_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn ef_if_0_int(&self) -> EF_IF_0_INT_R { + EF_IF_0_INT_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bit 21"] #[inline(always)] - pub fn ef_if_0_busy(&self) -> EF_IF_0_BUSY_R { - EF_IF_0_BUSY_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn ef_if_0_int_clr(&self) -> EF_IF_0_INT_CLR_R { + EF_IF_0_INT_CLR_R::new(((self.bits >> 21) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 22"] #[inline(always)] - pub fn ef_if_0_autoload_done(&self) -> EF_IF_0_AUTOLOAD_DONE_R { - EF_IF_0_AUTOLOAD_DONE_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn ef_if_0_int_set(&self) -> EF_IF_0_INT_SET_R { + EF_IF_0_INT_SET_R::new(((self.bits >> 22) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn ef_if_0_autoload_p1_done(&self) -> EF_IF_0_AUTOLOAD_P1_DONE_R { - EF_IF_0_AUTOLOAD_P1_DONE_R::new((self.bits & 0x01) != 0) + pub fn ef_if_prot_code_cyc(&self) -> EF_IF_PROT_CODE_CYC_R { + EF_IF_PROT_CODE_CYC_R::new(((self.bits >> 24) & 0xff) as u8) } } impl W { - #[doc = "Bits 24:31"] + #[doc = "Bit 3"] #[inline(always)] - pub fn ef_if_prot_code_cyc(&mut self) -> EF_IF_PROT_CODE_CYC_W { - EF_IF_PROT_CODE_CYC_W { w: self } + #[must_use] + pub fn ef_if_0_rw(&mut self) -> EF_IF_0_RW_W<3> { + EF_IF_0_RW_W::new(self) } - #[doc = "Bit 22"] + #[doc = "Bit 4"] #[inline(always)] - pub fn ef_if_0_int_set(&mut self) -> EF_IF_0_INT_SET_W { - EF_IF_0_INT_SET_W { w: self } + #[must_use] + pub fn ef_if_0_trig(&mut self) -> EF_IF_0_TRIG_W<4> { + EF_IF_0_TRIG_W::new(self) } - #[doc = "Bit 21"] + #[doc = "Bit 5"] #[inline(always)] - pub fn ef_if_0_int_clr(&mut self) -> EF_IF_0_INT_CLR_W { - EF_IF_0_INT_CLR_W { w: self } + #[must_use] + pub fn ef_if_0_manual_en(&mut self) -> EF_IF_0_MANUAL_EN_W<5> { + EF_IF_0_MANUAL_EN_W::new(self) } - #[doc = "Bit 19"] + #[doc = "Bit 6"] #[inline(always)] - pub fn ef_if_cyc_modify_lock(&mut self) -> EF_IF_CYC_MODIFY_LOCK_W { - EF_IF_CYC_MODIFY_LOCK_W { w: self } + #[must_use] + pub fn ef_if_0_cyc_modify(&mut self) -> EF_IF_0_CYC_MODIFY_W<6> { + EF_IF_0_CYC_MODIFY_W::new(self) } - #[doc = "Bit 18"] + #[doc = "Bit 7"] #[inline(always)] - pub fn ef_if_auto_rd_en(&mut self) -> EF_IF_AUTO_RD_EN_W { - EF_IF_AUTO_RD_EN_W { w: self } + #[must_use] + pub fn ef_clk_sahb_data_sel(&mut self) -> EF_CLK_SAHB_DATA_SEL_W<7> { + EF_CLK_SAHB_DATA_SEL_W::new(self) } - #[doc = "Bit 17"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn ef_clk_sahb_data_gate(&mut self) -> EF_CLK_SAHB_DATA_GATE_W { - EF_CLK_SAHB_DATA_GATE_W { w: self } + #[must_use] + pub fn ef_if_prot_code_ctrl(&mut self) -> EF_IF_PROT_CODE_CTRL_W<8> { + EF_IF_PROT_CODE_CTRL_W::new(self) } #[doc = "Bit 16"] #[inline(always)] - pub fn ef_if_por_dig(&mut self) -> EF_IF_POR_DIG_W { - EF_IF_POR_DIG_W { w: self } + #[must_use] + pub fn ef_if_por_dig(&mut self) -> EF_IF_POR_DIG_W<16> { + EF_IF_POR_DIG_W::new(self) } - #[doc = "Bits 8:15"] + #[doc = "Bit 17"] #[inline(always)] - pub fn ef_if_prot_code_ctrl(&mut self) -> EF_IF_PROT_CODE_CTRL_W { - EF_IF_PROT_CODE_CTRL_W { w: self } + #[must_use] + pub fn ef_clk_sahb_data_gate(&mut self) -> EF_CLK_SAHB_DATA_GATE_W<17> { + EF_CLK_SAHB_DATA_GATE_W::new(self) } - #[doc = "Bit 7"] + #[doc = "Bit 18"] #[inline(always)] - pub fn ef_clk_sahb_data_sel(&mut self) -> EF_CLK_SAHB_DATA_SEL_W { - EF_CLK_SAHB_DATA_SEL_W { w: self } + #[must_use] + pub fn ef_if_auto_rd_en(&mut self) -> EF_IF_AUTO_RD_EN_W<18> { + EF_IF_AUTO_RD_EN_W::new(self) } - #[doc = "Bit 6"] + #[doc = "Bit 19"] #[inline(always)] - pub fn ef_if_0_cyc_modify(&mut self) -> EF_IF_0_CYC_MODIFY_W { - EF_IF_0_CYC_MODIFY_W { w: self } + #[must_use] + pub fn ef_if_cyc_modify_lock(&mut self) -> EF_IF_CYC_MODIFY_LOCK_W<19> { + EF_IF_CYC_MODIFY_LOCK_W::new(self) } - #[doc = "Bit 5"] + #[doc = "Bit 21"] #[inline(always)] - pub fn ef_if_0_manual_en(&mut self) -> EF_IF_0_MANUAL_EN_W { - EF_IF_0_MANUAL_EN_W { w: self } + #[must_use] + pub fn ef_if_0_int_clr(&mut self) -> EF_IF_0_INT_CLR_W<21> { + EF_IF_0_INT_CLR_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 22"] #[inline(always)] - pub fn ef_if_0_trig(&mut self) -> EF_IF_0_TRIG_W { - EF_IF_0_TRIG_W { w: self } + #[must_use] + pub fn ef_if_0_int_set(&mut self) -> EF_IF_0_INT_SET_W<22> { + EF_IF_0_INT_SET_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn ef_if_0_rw(&mut self) -> EF_IF_0_RW_W { - EF_IF_0_RW_W { w: self } + #[must_use] + pub fn ef_if_prot_code_cyc(&mut self) -> EF_IF_PROT_CODE_CYC_W<24> { + EF_IF_PROT_CODE_CYC_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -707,11 +287,10 @@ impl crate::Readable for EF_IF_CTRL_0_SPEC { #[doc = "`write(|w| ..)` method takes [ef_if_ctrl_0::W](W) writer structure"] impl crate::Writable for EF_IF_CTRL_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_if_ctrl_0 to value 0x0024_0003"] impl crate::Resettable for EF_IF_CTRL_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0024_0003 - } + const RESET_VALUE: Self::Ux = 0x0024_0003; } diff --git a/src/ef_ctrl/ef_if_cyc_0.rs b/src/ef_ctrl/ef_if_cyc_0.rs index 6ae791d..5f7dd9b 100644 --- a/src/ef_ctrl/ef_if_cyc_0.rs +++ b/src/ef_ctrl/ef_if_cyc_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,195 +28,97 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `ef_if_cyc_pd_cs_s` reader - "] -pub struct EF_IF_CYC_PD_CS_S_R(crate::FieldReader); -impl EF_IF_CYC_PD_CS_S_R { - pub(crate) fn new(bits: u8) -> Self { - EF_IF_CYC_PD_CS_S_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_CYC_PD_CS_S_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_cyc_pd_cs_s` writer - "] -pub struct EF_IF_CYC_PD_CS_S_W<'a> { - w: &'a mut W, -} -impl<'a> EF_IF_CYC_PD_CS_S_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 24)) | ((value as u32 & 0xff) << 24); - self.w - } -} -#[doc = "Field `ef_if_cyc_cs` reader - "] -pub struct EF_IF_CYC_CS_R(crate::FieldReader); -impl EF_IF_CYC_CS_R { - pub(crate) fn new(bits: u8) -> Self { - EF_IF_CYC_CS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_CYC_CS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_cyc_cs` writer - "] -pub struct EF_IF_CYC_CS_W<'a> { - w: &'a mut W, -} -impl<'a> EF_IF_CYC_CS_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 18)) | ((value as u32 & 0x3f) << 18); - self.w - } -} -#[doc = "Field `ef_if_cyc_rd_adr` reader - "] -pub struct EF_IF_CYC_RD_ADR_R(crate::FieldReader); -impl EF_IF_CYC_RD_ADR_R { - pub(crate) fn new(bits: u8) -> Self { - EF_IF_CYC_RD_ADR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_CYC_RD_ADR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_cyc_rd_adr` writer - "] -pub struct EF_IF_CYC_RD_ADR_W<'a> { - w: &'a mut W, -} -impl<'a> EF_IF_CYC_RD_ADR_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 12)) | ((value as u32 & 0x3f) << 12); - self.w - } -} -#[doc = "Field `ef_if_cyc_rd_dat` reader - "] -pub struct EF_IF_CYC_RD_DAT_R(crate::FieldReader); -impl EF_IF_CYC_RD_DAT_R { - pub(crate) fn new(bits: u8) -> Self { - EF_IF_CYC_RD_DAT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_CYC_RD_DAT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_cyc_rd_dat` writer - "] -pub struct EF_IF_CYC_RD_DAT_W<'a> { - w: &'a mut W, -} -impl<'a> EF_IF_CYC_RD_DAT_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 6)) | ((value as u32 & 0x3f) << 6); - self.w - } -} #[doc = "Field `ef_if_cyc_rd_dmy` reader - "] -pub struct EF_IF_CYC_RD_DMY_R(crate::FieldReader); -impl EF_IF_CYC_RD_DMY_R { - pub(crate) fn new(bits: u8) -> Self { - EF_IF_CYC_RD_DMY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_CYC_RD_DMY_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_IF_CYC_RD_DMY_R = crate::FieldReader; #[doc = "Field `ef_if_cyc_rd_dmy` writer - "] -pub struct EF_IF_CYC_RD_DMY_W<'a> { - w: &'a mut W, -} -impl<'a> EF_IF_CYC_RD_DMY_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x3f) | (value as u32 & 0x3f); - self.w - } -} +pub type EF_IF_CYC_RD_DMY_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_IF_CYC_0_SPEC, u8, u8, 6, O>; +#[doc = "Field `ef_if_cyc_rd_dat` reader - "] +pub type EF_IF_CYC_RD_DAT_R = crate::FieldReader; +#[doc = "Field `ef_if_cyc_rd_dat` writer - "] +pub type EF_IF_CYC_RD_DAT_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_IF_CYC_0_SPEC, u8, u8, 6, O>; +#[doc = "Field `ef_if_cyc_rd_adr` reader - "] +pub type EF_IF_CYC_RD_ADR_R = crate::FieldReader; +#[doc = "Field `ef_if_cyc_rd_adr` writer - "] +pub type EF_IF_CYC_RD_ADR_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_IF_CYC_0_SPEC, u8, u8, 6, O>; +#[doc = "Field `ef_if_cyc_cs` reader - "] +pub type EF_IF_CYC_CS_R = crate::FieldReader; +#[doc = "Field `ef_if_cyc_cs` writer - "] +pub type EF_IF_CYC_CS_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_IF_CYC_0_SPEC, u8, u8, 6, O>; +#[doc = "Field `ef_if_cyc_pd_cs_s` reader - "] +pub type EF_IF_CYC_PD_CS_S_R = crate::FieldReader; +#[doc = "Field `ef_if_cyc_pd_cs_s` writer - "] +pub type EF_IF_CYC_PD_CS_S_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_IF_CYC_0_SPEC, u8, u8, 8, O>; impl R { - #[doc = "Bits 24:31"] + #[doc = "Bits 0:5"] #[inline(always)] - pub fn ef_if_cyc_pd_cs_s(&self) -> EF_IF_CYC_PD_CS_S_R { - EF_IF_CYC_PD_CS_S_R::new(((self.bits >> 24) & 0xff) as u8) + pub fn ef_if_cyc_rd_dmy(&self) -> EF_IF_CYC_RD_DMY_R { + EF_IF_CYC_RD_DMY_R::new((self.bits & 0x3f) as u8) } - #[doc = "Bits 18:23"] + #[doc = "Bits 6:11"] #[inline(always)] - pub fn ef_if_cyc_cs(&self) -> EF_IF_CYC_CS_R { - EF_IF_CYC_CS_R::new(((self.bits >> 18) & 0x3f) as u8) + pub fn ef_if_cyc_rd_dat(&self) -> EF_IF_CYC_RD_DAT_R { + EF_IF_CYC_RD_DAT_R::new(((self.bits >> 6) & 0x3f) as u8) } #[doc = "Bits 12:17"] #[inline(always)] pub fn ef_if_cyc_rd_adr(&self) -> EF_IF_CYC_RD_ADR_R { EF_IF_CYC_RD_ADR_R::new(((self.bits >> 12) & 0x3f) as u8) } - #[doc = "Bits 6:11"] + #[doc = "Bits 18:23"] #[inline(always)] - pub fn ef_if_cyc_rd_dat(&self) -> EF_IF_CYC_RD_DAT_R { - EF_IF_CYC_RD_DAT_R::new(((self.bits >> 6) & 0x3f) as u8) + pub fn ef_if_cyc_cs(&self) -> EF_IF_CYC_CS_R { + EF_IF_CYC_CS_R::new(((self.bits >> 18) & 0x3f) as u8) } - #[doc = "Bits 0:5"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn ef_if_cyc_rd_dmy(&self) -> EF_IF_CYC_RD_DMY_R { - EF_IF_CYC_RD_DMY_R::new((self.bits & 0x3f) as u8) + pub fn ef_if_cyc_pd_cs_s(&self) -> EF_IF_CYC_PD_CS_S_R { + EF_IF_CYC_PD_CS_S_R::new(((self.bits >> 24) & 0xff) as u8) } } impl W { - #[doc = "Bits 24:31"] + #[doc = "Bits 0:5"] #[inline(always)] - pub fn ef_if_cyc_pd_cs_s(&mut self) -> EF_IF_CYC_PD_CS_S_W { - EF_IF_CYC_PD_CS_S_W { w: self } + #[must_use] + pub fn ef_if_cyc_rd_dmy(&mut self) -> EF_IF_CYC_RD_DMY_W<0> { + EF_IF_CYC_RD_DMY_W::new(self) } - #[doc = "Bits 18:23"] + #[doc = "Bits 6:11"] #[inline(always)] - pub fn ef_if_cyc_cs(&mut self) -> EF_IF_CYC_CS_W { - EF_IF_CYC_CS_W { w: self } + #[must_use] + pub fn ef_if_cyc_rd_dat(&mut self) -> EF_IF_CYC_RD_DAT_W<6> { + EF_IF_CYC_RD_DAT_W::new(self) } #[doc = "Bits 12:17"] #[inline(always)] - pub fn ef_if_cyc_rd_adr(&mut self) -> EF_IF_CYC_RD_ADR_W { - EF_IF_CYC_RD_ADR_W { w: self } + #[must_use] + pub fn ef_if_cyc_rd_adr(&mut self) -> EF_IF_CYC_RD_ADR_W<12> { + EF_IF_CYC_RD_ADR_W::new(self) } - #[doc = "Bits 6:11"] + #[doc = "Bits 18:23"] #[inline(always)] - pub fn ef_if_cyc_rd_dat(&mut self) -> EF_IF_CYC_RD_DAT_W { - EF_IF_CYC_RD_DAT_W { w: self } + #[must_use] + pub fn ef_if_cyc_cs(&mut self) -> EF_IF_CYC_CS_W<18> { + EF_IF_CYC_CS_W::new(self) } - #[doc = "Bits 0:5"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn ef_if_cyc_rd_dmy(&mut self) -> EF_IF_CYC_RD_DMY_W { - EF_IF_CYC_RD_DMY_W { w: self } + #[must_use] + pub fn ef_if_cyc_pd_cs_s(&mut self) -> EF_IF_CYC_PD_CS_S_W<24> { + EF_IF_CYC_PD_CS_S_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -233,11 +136,10 @@ impl crate::Readable for EF_IF_CYC_0_SPEC { #[doc = "`write(|w| ..)` method takes [ef_if_cyc_0::W](W) writer structure"] impl crate::Writable for EF_IF_CYC_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_if_cyc_0 to value 0x1600_0040"] impl crate::Resettable for EF_IF_CYC_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x1600_0040 - } + const RESET_VALUE: Self::Ux = 0x1600_0040; } diff --git a/src/ef_ctrl/ef_if_cyc_1.rs b/src/ef_ctrl/ef_if_cyc_1.rs index 4eca952..47f6f8d 100644 --- a/src/ef_ctrl/ef_if_cyc_1.rs +++ b/src/ef_ctrl/ef_if_cyc_1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,195 +28,97 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `ef_if_cyc_pd_cs_h` reader - "] -pub struct EF_IF_CYC_PD_CS_H_R(crate::FieldReader); -impl EF_IF_CYC_PD_CS_H_R { - pub(crate) fn new(bits: u8) -> Self { - EF_IF_CYC_PD_CS_H_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_CYC_PD_CS_H_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_cyc_pd_cs_h` writer - "] -pub struct EF_IF_CYC_PD_CS_H_W<'a> { - w: &'a mut W, -} -impl<'a> EF_IF_CYC_PD_CS_H_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 26)) | ((value as u32 & 0x3f) << 26); - self.w - } -} -#[doc = "Field `ef_if_cyc_ps_cs` reader - "] -pub struct EF_IF_CYC_PS_CS_R(crate::FieldReader); -impl EF_IF_CYC_PS_CS_R { - pub(crate) fn new(bits: u8) -> Self { - EF_IF_CYC_PS_CS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_CYC_PS_CS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_cyc_ps_cs` writer - "] -pub struct EF_IF_CYC_PS_CS_W<'a> { - w: &'a mut W, -} -impl<'a> EF_IF_CYC_PS_CS_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 20)) | ((value as u32 & 0x3f) << 20); - self.w - } -} -#[doc = "Field `ef_if_cyc_wr_adr` reader - "] -pub struct EF_IF_CYC_WR_ADR_R(crate::FieldReader); -impl EF_IF_CYC_WR_ADR_R { - pub(crate) fn new(bits: u8) -> Self { - EF_IF_CYC_WR_ADR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_CYC_WR_ADR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_cyc_wr_adr` writer - "] -pub struct EF_IF_CYC_WR_ADR_W<'a> { - w: &'a mut W, -} -impl<'a> EF_IF_CYC_WR_ADR_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 14)) | ((value as u32 & 0x3f) << 14); - self.w - } -} -#[doc = "Field `ef_if_cyc_pp` reader - "] -pub struct EF_IF_CYC_PP_R(crate::FieldReader); -impl EF_IF_CYC_PP_R { - pub(crate) fn new(bits: u8) -> Self { - EF_IF_CYC_PP_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_CYC_PP_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_if_cyc_pp` writer - "] -pub struct EF_IF_CYC_PP_W<'a> { - w: &'a mut W, -} -impl<'a> EF_IF_CYC_PP_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 6)) | ((value as u32 & 0xff) << 6); - self.w - } -} #[doc = "Field `ef_if_cyc_pi` reader - "] -pub struct EF_IF_CYC_PI_R(crate::FieldReader); -impl EF_IF_CYC_PI_R { - pub(crate) fn new(bits: u8) -> Self { - EF_IF_CYC_PI_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_CYC_PI_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_IF_CYC_PI_R = crate::FieldReader; #[doc = "Field `ef_if_cyc_pi` writer - "] -pub struct EF_IF_CYC_PI_W<'a> { - w: &'a mut W, -} -impl<'a> EF_IF_CYC_PI_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x3f) | (value as u32 & 0x3f); - self.w - } -} +pub type EF_IF_CYC_PI_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_IF_CYC_1_SPEC, u8, u8, 6, O>; +#[doc = "Field `ef_if_cyc_pp` reader - "] +pub type EF_IF_CYC_PP_R = crate::FieldReader; +#[doc = "Field `ef_if_cyc_pp` writer - "] +pub type EF_IF_CYC_PP_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_IF_CYC_1_SPEC, u8, u8, 8, O>; +#[doc = "Field `ef_if_cyc_wr_adr` reader - "] +pub type EF_IF_CYC_WR_ADR_R = crate::FieldReader; +#[doc = "Field `ef_if_cyc_wr_adr` writer - "] +pub type EF_IF_CYC_WR_ADR_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_IF_CYC_1_SPEC, u8, u8, 6, O>; +#[doc = "Field `ef_if_cyc_ps_cs` reader - "] +pub type EF_IF_CYC_PS_CS_R = crate::FieldReader; +#[doc = "Field `ef_if_cyc_ps_cs` writer - "] +pub type EF_IF_CYC_PS_CS_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_IF_CYC_1_SPEC, u8, u8, 6, O>; +#[doc = "Field `ef_if_cyc_pd_cs_h` reader - "] +pub type EF_IF_CYC_PD_CS_H_R = crate::FieldReader; +#[doc = "Field `ef_if_cyc_pd_cs_h` writer - "] +pub type EF_IF_CYC_PD_CS_H_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_IF_CYC_1_SPEC, u8, u8, 6, O>; impl R { - #[doc = "Bits 26:31"] + #[doc = "Bits 0:5"] #[inline(always)] - pub fn ef_if_cyc_pd_cs_h(&self) -> EF_IF_CYC_PD_CS_H_R { - EF_IF_CYC_PD_CS_H_R::new(((self.bits >> 26) & 0x3f) as u8) + pub fn ef_if_cyc_pi(&self) -> EF_IF_CYC_PI_R { + EF_IF_CYC_PI_R::new((self.bits & 0x3f) as u8) } - #[doc = "Bits 20:25"] + #[doc = "Bits 6:13"] #[inline(always)] - pub fn ef_if_cyc_ps_cs(&self) -> EF_IF_CYC_PS_CS_R { - EF_IF_CYC_PS_CS_R::new(((self.bits >> 20) & 0x3f) as u8) + pub fn ef_if_cyc_pp(&self) -> EF_IF_CYC_PP_R { + EF_IF_CYC_PP_R::new(((self.bits >> 6) & 0xff) as u8) } #[doc = "Bits 14:19"] #[inline(always)] pub fn ef_if_cyc_wr_adr(&self) -> EF_IF_CYC_WR_ADR_R { EF_IF_CYC_WR_ADR_R::new(((self.bits >> 14) & 0x3f) as u8) } - #[doc = "Bits 6:13"] + #[doc = "Bits 20:25"] #[inline(always)] - pub fn ef_if_cyc_pp(&self) -> EF_IF_CYC_PP_R { - EF_IF_CYC_PP_R::new(((self.bits >> 6) & 0xff) as u8) + pub fn ef_if_cyc_ps_cs(&self) -> EF_IF_CYC_PS_CS_R { + EF_IF_CYC_PS_CS_R::new(((self.bits >> 20) & 0x3f) as u8) } - #[doc = "Bits 0:5"] + #[doc = "Bits 26:31"] #[inline(always)] - pub fn ef_if_cyc_pi(&self) -> EF_IF_CYC_PI_R { - EF_IF_CYC_PI_R::new((self.bits & 0x3f) as u8) + pub fn ef_if_cyc_pd_cs_h(&self) -> EF_IF_CYC_PD_CS_H_R { + EF_IF_CYC_PD_CS_H_R::new(((self.bits >> 26) & 0x3f) as u8) } } impl W { - #[doc = "Bits 26:31"] + #[doc = "Bits 0:5"] #[inline(always)] - pub fn ef_if_cyc_pd_cs_h(&mut self) -> EF_IF_CYC_PD_CS_H_W { - EF_IF_CYC_PD_CS_H_W { w: self } + #[must_use] + pub fn ef_if_cyc_pi(&mut self) -> EF_IF_CYC_PI_W<0> { + EF_IF_CYC_PI_W::new(self) } - #[doc = "Bits 20:25"] + #[doc = "Bits 6:13"] #[inline(always)] - pub fn ef_if_cyc_ps_cs(&mut self) -> EF_IF_CYC_PS_CS_W { - EF_IF_CYC_PS_CS_W { w: self } + #[must_use] + pub fn ef_if_cyc_pp(&mut self) -> EF_IF_CYC_PP_W<6> { + EF_IF_CYC_PP_W::new(self) } #[doc = "Bits 14:19"] #[inline(always)] - pub fn ef_if_cyc_wr_adr(&mut self) -> EF_IF_CYC_WR_ADR_W { - EF_IF_CYC_WR_ADR_W { w: self } + #[must_use] + pub fn ef_if_cyc_wr_adr(&mut self) -> EF_IF_CYC_WR_ADR_W<14> { + EF_IF_CYC_WR_ADR_W::new(self) } - #[doc = "Bits 6:13"] + #[doc = "Bits 20:25"] #[inline(always)] - pub fn ef_if_cyc_pp(&mut self) -> EF_IF_CYC_PP_W { - EF_IF_CYC_PP_W { w: self } + #[must_use] + pub fn ef_if_cyc_ps_cs(&mut self) -> EF_IF_CYC_PS_CS_W<20> { + EF_IF_CYC_PS_CS_W::new(self) } - #[doc = "Bits 0:5"] + #[doc = "Bits 26:31"] #[inline(always)] - pub fn ef_if_cyc_pi(&mut self) -> EF_IF_CYC_PI_W { - EF_IF_CYC_PI_W { w: self } + #[must_use] + pub fn ef_if_cyc_pd_cs_h(&mut self) -> EF_IF_CYC_PD_CS_H_W<26> { + EF_IF_CYC_PD_CS_H_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -233,11 +136,10 @@ impl crate::Readable for EF_IF_CYC_1_SPEC { #[doc = "`write(|w| ..)` method takes [ef_if_cyc_1::W](W) writer structure"] impl crate::Writable for EF_IF_CYC_1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_if_cyc_1 to value 0x0020_6609"] impl crate::Resettable for EF_IF_CYC_1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0020_6609 - } + const RESET_VALUE: Self::Ux = 0x0020_6609; } diff --git a/src/ef_ctrl/ef_if_sw_usage_0.rs b/src/ef_ctrl/ef_if_sw_usage_0.rs index 50e4890..4d4fc34 100644 --- a/src/ef_ctrl/ef_if_sw_usage_0.rs +++ b/src/ef_ctrl/ef_if_sw_usage_0.rs @@ -7,33 +7,51 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `ef_if_sw_usage_0` reader - "] -pub struct EF_IF_SW_USAGE_0_R(crate::FieldReader); -impl EF_IF_SW_USAGE_0_R { - pub(crate) fn new(bits: u32) -> Self { - EF_IF_SW_USAGE_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_IF_SW_USAGE_0_R { - type Target = crate::FieldReader; +#[doc = "Register `ef_if_sw_usage_0` writer"] +pub struct W(crate::W); +impl core::ops::Deref for W { + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } +impl core::ops::DerefMut for W { + #[inline(always)] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } +} +impl From> for W { + #[inline(always)] + fn from(writer: crate::W) -> Self { + W(writer) + } +} +#[doc = "Field `ef_if_sw_usage_0` reader - "] +pub type EF_IF_SW_USAGE_0_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_if_sw_usage_0(&self) -> EF_IF_SW_USAGE_0_R { - EF_IF_SW_USAGE_0_R::new((self.bits & 0xffff_ffff) as u32) + EF_IF_SW_USAGE_0_R::new(self.bits) + } +} +impl W { + #[doc = "Writes raw bits to the register."] + #[inline(always)] + pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { + self.0.bits(bits); + self } } -#[doc = "ef_if_sw_usage_0.\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 [ef_if_sw_usage_0](index.html) module"] +#[doc = "ef_if_sw_usage_0.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ef_if_sw_usage_0](index.html) module"] pub struct EF_IF_SW_USAGE_0_SPEC; impl crate::RegisterSpec for EF_IF_SW_USAGE_0_SPEC { type Ux = u32; @@ -42,10 +60,13 @@ impl crate::RegisterSpec for EF_IF_SW_USAGE_0_SPEC { impl crate::Readable for EF_IF_SW_USAGE_0_SPEC { type Reader = R; } +#[doc = "`write(|w| ..)` method takes [ef_if_sw_usage_0::W](W) writer structure"] +impl crate::Writable for EF_IF_SW_USAGE_0_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} #[doc = "`reset()` method sets ef_if_sw_usage_0 to value 0"] impl crate::Resettable for EF_IF_SW_USAGE_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_ctrl/ef_reserved.rs b/src/ef_ctrl/ef_reserved.rs index 87a3279..18068fa 100644 --- a/src/ef_ctrl/ef_reserved.rs +++ b/src/ef_ctrl/ef_reserved.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `ef_reserved` reader - "] -pub struct EF_RESERVED_R(crate::FieldReader); -impl EF_RESERVED_R { - pub(crate) fn new(bits: u32) -> Self { - EF_RESERVED_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_RESERVED_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_RESERVED_R = crate::FieldReader; #[doc = "Field `ef_reserved` writer - "] -pub struct EF_RESERVED_W<'a> { - w: &'a mut W, -} -impl<'a> EF_RESERVED_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type EF_RESERVED_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_RESERVED_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_reserved(&self) -> EF_RESERVED_R { - EF_RESERVED_R::new((self.bits & 0xffff_ffff) as u32) + EF_RESERVED_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn ef_reserved(&mut self) -> EF_RESERVED_W { - EF_RESERVED_W { w: self } + #[must_use] + pub fn ef_reserved(&mut self) -> EF_RESERVED_W<0> { + EF_RESERVED_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for EF_RESERVED_SPEC { #[doc = "`write(|w| ..)` method takes [ef_reserved::W](W) writer structure"] impl crate::Writable for EF_RESERVED_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_reserved to value 0"] impl crate::Resettable for EF_RESERVED_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_ctrl/ef_sw_cfg_0.rs b/src/ef_ctrl/ef_sw_cfg_0.rs index 69d3991..8337b65 100644 --- a/src/ef_ctrl/ef_sw_cfg_0.rs +++ b/src/ef_ctrl/ef_sw_cfg_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,819 +28,314 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `ef_sw_dbg_mode` reader - "] -pub struct EF_SW_DBG_MODE_R(crate::FieldReader); -impl EF_SW_DBG_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - EF_SW_DBG_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_SW_DBG_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_sw_dbg_mode` writer - "] -pub struct EF_SW_DBG_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> EF_SW_DBG_MODE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 28)) | ((value as u32 & 0x0f) << 28); - self.w - } -} -#[doc = "Field `ef_sw_dbg_jtag_0_dis` reader - "] -pub struct EF_SW_DBG_JTAG_0_DIS_R(crate::FieldReader); -impl EF_SW_DBG_JTAG_0_DIS_R { - pub(crate) fn new(bits: u8) -> Self { - EF_SW_DBG_JTAG_0_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_SW_DBG_JTAG_0_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_sw_dbg_jtag_0_dis` writer - "] -pub struct EF_SW_DBG_JTAG_0_DIS_W<'a> { - w: &'a mut W, -} -impl<'a> EF_SW_DBG_JTAG_0_DIS_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 26)) | ((value as u32 & 0x03) << 26); - self.w - } -} -#[doc = "Field `ef_sw_dbg_jtag_1_dis` reader - "] -pub struct EF_SW_DBG_JTAG_1_DIS_R(crate::FieldReader); -impl EF_SW_DBG_JTAG_1_DIS_R { - pub(crate) fn new(bits: u8) -> Self { - EF_SW_DBG_JTAG_1_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_SW_DBG_JTAG_1_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_sw_dbg_jtag_1_dis` writer - "] -pub struct EF_SW_DBG_JTAG_1_DIS_W<'a> { - w: &'a mut W, -} -impl<'a> EF_SW_DBG_JTAG_1_DIS_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 24)) | ((value as u32 & 0x03) << 24); - self.w - } -} -#[doc = "Field `ef_sw_efuse_dbg_dis` reader - "] -pub struct EF_SW_EFUSE_DBG_DIS_R(crate::FieldReader); -impl EF_SW_EFUSE_DBG_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - EF_SW_EFUSE_DBG_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_SW_EFUSE_DBG_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_sw_efuse_dbg_dis` writer - "] -pub struct EF_SW_EFUSE_DBG_DIS_W<'a> { - w: &'a mut W, -} -impl<'a> EF_SW_EFUSE_DBG_DIS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23); - self.w - } -} -#[doc = "Field `ef_sw_se_dbg_dis` reader - "] -pub struct EF_SW_SE_DBG_DIS_R(crate::FieldReader); -impl EF_SW_SE_DBG_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - EF_SW_SE_DBG_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_SW_SE_DBG_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_sw_se_dbg_dis` writer - "] -pub struct EF_SW_SE_DBG_DIS_W<'a> { - w: &'a mut W, -} -impl<'a> EF_SW_SE_DBG_DIS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 22)) | ((value as u32 & 0x01) << 22); - self.w - } -} -#[doc = "Field `ef_sw_cpu_rst_dbg_dis` reader - "] -pub struct EF_SW_CPU_RST_DBG_DIS_R(crate::FieldReader); -impl EF_SW_CPU_RST_DBG_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - EF_SW_CPU_RST_DBG_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_SW_CPU_RST_DBG_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_sw_cpu_rst_dbg_dis` writer - "] -pub struct EF_SW_CPU_RST_DBG_DIS_W<'a> { - w: &'a mut W, -} -impl<'a> EF_SW_CPU_RST_DBG_DIS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); - self.w - } -} -#[doc = "Field `ef_sw_cpu1_dis` reader - "] -pub struct EF_SW_CPU1_DIS_R(crate::FieldReader); -impl EF_SW_CPU1_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - EF_SW_CPU1_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_SW_CPU1_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_sw_cpu1_dis` writer - "] -pub struct EF_SW_CPU1_DIS_W<'a> { - w: &'a mut W, -} -impl<'a> EF_SW_CPU1_DIS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w - } -} -#[doc = "Field `ef_sw_sf_dis` reader - "] -pub struct EF_SW_SF_DIS_R(crate::FieldReader); -impl EF_SW_SF_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - EF_SW_SF_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_SW_SF_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_sw_sf_dis` writer - "] -pub struct EF_SW_SF_DIS_W<'a> { - w: &'a mut W, -} -impl<'a> EF_SW_SF_DIS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 19)) | ((value as u32 & 0x01) << 19); - self.w - } -} -#[doc = "Field `ef_sw_cam_dis` reader - "] -pub struct EF_SW_CAM_DIS_R(crate::FieldReader); -impl EF_SW_CAM_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - EF_SW_CAM_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_SW_CAM_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_sw_cam_dis` writer - "] -pub struct EF_SW_CAM_DIS_W<'a> { - w: &'a mut W, -} -impl<'a> EF_SW_CAM_DIS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18); - self.w - } -} -#[doc = "Field `ef_sw_0_key_enc_en` reader - "] -pub struct EF_SW_0_KEY_ENC_EN_R(crate::FieldReader); -impl EF_SW_0_KEY_ENC_EN_R { - pub(crate) fn new(bits: bool) -> Self { - EF_SW_0_KEY_ENC_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_SW_0_KEY_ENC_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_sw_0_key_enc_en` writer - "] -pub struct EF_SW_0_KEY_ENC_EN_W<'a> { - w: &'a mut W, -} -impl<'a> EF_SW_0_KEY_ENC_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w - } -} -#[doc = "Field `ef_sw_wifi_dis` reader - "] -pub struct EF_SW_WIFI_DIS_R(crate::FieldReader); -impl EF_SW_WIFI_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - EF_SW_WIFI_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_SW_WIFI_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_sw_wifi_dis` writer - "] -pub struct EF_SW_WIFI_DIS_W<'a> { - w: &'a mut W, -} -impl<'a> EF_SW_WIFI_DIS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `ef_sw_ble_dis` reader - "] -pub struct EF_SW_BLE_DIS_R(crate::FieldReader); -impl EF_SW_BLE_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - EF_SW_BLE_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_SW_BLE_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_sw_ble_dis` writer - "] -pub struct EF_SW_BLE_DIS_W<'a> { - w: &'a mut W, -} -impl<'a> EF_SW_BLE_DIS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15); - self.w - } -} -#[doc = "Field `ef_sw_sdu_dis` reader - "] -pub struct EF_SW_SDU_DIS_R(crate::FieldReader); -impl EF_SW_SDU_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - EF_SW_SDU_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_SW_SDU_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_sw_sdu_dis` writer - "] -pub struct EF_SW_SDU_DIS_W<'a> { - w: &'a mut W, -} -impl<'a> EF_SW_SDU_DIS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14); - self.w - } -} -#[doc = "Field `ef_sw_sw_usage_1` reader - "] -pub struct EF_SW_SW_USAGE_1_R(crate::FieldReader); -impl EF_SW_SW_USAGE_1_R { - pub(crate) fn new(bits: u8) -> Self { - EF_SW_SW_USAGE_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_SW_SW_USAGE_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_sw_sw_usage_1` writer - "] -pub struct EF_SW_SW_USAGE_1_W<'a> { - w: &'a mut W, -} -impl<'a> EF_SW_SW_USAGE_1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 12)) | ((value as u32 & 0x03) << 12); - self.w - } -} -#[doc = "Field `ef_sw_cpu0_enc_en` reader - "] -pub struct EF_SW_CPU0_ENC_EN_R(crate::FieldReader); -impl EF_SW_CPU0_ENC_EN_R { - pub(crate) fn new(bits: bool) -> Self { - EF_SW_CPU0_ENC_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_SW_CPU0_ENC_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_sw_cpu0_enc_en` writer - "] -pub struct EF_SW_CPU0_ENC_EN_W<'a> { - w: &'a mut W, -} -impl<'a> EF_SW_CPU0_ENC_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7); - self.w - } -} -#[doc = "Field `ef_sw_cpu1_enc_en` reader - "] -pub struct EF_SW_CPU1_ENC_EN_R(crate::FieldReader); -impl EF_SW_CPU1_ENC_EN_R { - pub(crate) fn new(bits: bool) -> Self { - EF_SW_CPU1_ENC_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_SW_CPU1_ENC_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_sw_cpu1_enc_en` writer - "] -pub struct EF_SW_CPU1_ENC_EN_W<'a> { - w: &'a mut W, -} -impl<'a> EF_SW_CPU1_ENC_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w - } -} -#[doc = "Field `ef_sw_sboot_en` reader - "] -pub struct EF_SW_SBOOT_EN_R(crate::FieldReader); -impl EF_SW_SBOOT_EN_R { - pub(crate) fn new(bits: u8) -> Self { - EF_SW_SBOOT_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_SW_SBOOT_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_sw_sboot_en` writer - "] -pub struct EF_SW_SBOOT_EN_W<'a> { - w: &'a mut W, -} -impl<'a> EF_SW_SBOOT_EN_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 4)) | ((value as u32 & 0x03) << 4); - self.w - } -} -#[doc = "Field `ef_sw_sboot_sign_mode` reader - "] -pub struct EF_SW_SBOOT_SIGN_MODE_R(crate::FieldReader); -impl EF_SW_SBOOT_SIGN_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - EF_SW_SBOOT_SIGN_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_SW_SBOOT_SIGN_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_sw_sboot_sign_mode` writer - "] -pub struct EF_SW_SBOOT_SIGN_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> EF_SW_SBOOT_SIGN_MODE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 2)) | ((value as u32 & 0x03) << 2); - self.w - } -} #[doc = "Field `ef_sw_sf_aes_mode` reader - "] -pub struct EF_SW_SF_AES_MODE_R(crate::FieldReader); -impl EF_SW_SF_AES_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - EF_SW_SF_AES_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_SW_SF_AES_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_SW_SF_AES_MODE_R = crate::FieldReader; #[doc = "Field `ef_sw_sf_aes_mode` writer - "] -pub struct EF_SW_SF_AES_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> EF_SW_SF_AES_MODE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w - } -} +pub type EF_SW_SF_AES_MODE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_SW_CFG_0_SPEC, u8, u8, 2, O>; +#[doc = "Field `ef_sw_sboot_sign_mode` reader - "] +pub type EF_SW_SBOOT_SIGN_MODE_R = crate::FieldReader; +#[doc = "Field `ef_sw_sboot_sign_mode` writer - "] +pub type EF_SW_SBOOT_SIGN_MODE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_SW_CFG_0_SPEC, u8, u8, 2, O>; +#[doc = "Field `ef_sw_sboot_en` reader - "] +pub type EF_SW_SBOOT_EN_R = crate::FieldReader; +#[doc = "Field `ef_sw_sboot_en` writer - "] +pub type EF_SW_SBOOT_EN_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_SW_CFG_0_SPEC, u8, u8, 2, O>; +#[doc = "Field `ef_sw_cpu1_enc_en` reader - "] +pub type EF_SW_CPU1_ENC_EN_R = crate::BitReader; +#[doc = "Field `ef_sw_cpu1_enc_en` writer - "] +pub type EF_SW_CPU1_ENC_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EF_SW_CFG_0_SPEC, bool, O>; +#[doc = "Field `ef_sw_cpu0_enc_en` reader - "] +pub type EF_SW_CPU0_ENC_EN_R = crate::BitReader; +#[doc = "Field `ef_sw_cpu0_enc_en` writer - "] +pub type EF_SW_CPU0_ENC_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EF_SW_CFG_0_SPEC, bool, O>; +#[doc = "Field `ef_sw_sw_usage_1` reader - "] +pub type EF_SW_SW_USAGE_1_R = crate::FieldReader; +#[doc = "Field `ef_sw_sw_usage_1` writer - "] +pub type EF_SW_SW_USAGE_1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_SW_CFG_0_SPEC, u8, u8, 2, O>; +#[doc = "Field `ef_sw_sdu_dis` reader - "] +pub type EF_SW_SDU_DIS_R = crate::BitReader; +#[doc = "Field `ef_sw_sdu_dis` writer - "] +pub type EF_SW_SDU_DIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_SW_CFG_0_SPEC, bool, O>; +#[doc = "Field `ef_sw_ble_dis` reader - "] +pub type EF_SW_BLE_DIS_R = crate::BitReader; +#[doc = "Field `ef_sw_ble_dis` writer - "] +pub type EF_SW_BLE_DIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_SW_CFG_0_SPEC, bool, O>; +#[doc = "Field `ef_sw_wifi_dis` reader - "] +pub type EF_SW_WIFI_DIS_R = crate::BitReader; +#[doc = "Field `ef_sw_wifi_dis` writer - "] +pub type EF_SW_WIFI_DIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_SW_CFG_0_SPEC, bool, O>; +#[doc = "Field `ef_sw_0_key_enc_en` reader - "] +pub type EF_SW_0_KEY_ENC_EN_R = crate::BitReader; +#[doc = "Field `ef_sw_0_key_enc_en` writer - "] +pub type EF_SW_0_KEY_ENC_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EF_SW_CFG_0_SPEC, bool, O>; +#[doc = "Field `ef_sw_cam_dis` reader - "] +pub type EF_SW_CAM_DIS_R = crate::BitReader; +#[doc = "Field `ef_sw_cam_dis` writer - "] +pub type EF_SW_CAM_DIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_SW_CFG_0_SPEC, bool, O>; +#[doc = "Field `ef_sw_sf_dis` reader - "] +pub type EF_SW_SF_DIS_R = crate::BitReader; +#[doc = "Field `ef_sw_sf_dis` writer - "] +pub type EF_SW_SF_DIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_SW_CFG_0_SPEC, bool, O>; +#[doc = "Field `ef_sw_cpu1_dis` reader - "] +pub type EF_SW_CPU1_DIS_R = crate::BitReader; +#[doc = "Field `ef_sw_cpu1_dis` writer - "] +pub type EF_SW_CPU1_DIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_SW_CFG_0_SPEC, bool, O>; +#[doc = "Field `ef_sw_cpu_rst_dbg_dis` reader - "] +pub type EF_SW_CPU_RST_DBG_DIS_R = crate::BitReader; +#[doc = "Field `ef_sw_cpu_rst_dbg_dis` writer - "] +pub type EF_SW_CPU_RST_DBG_DIS_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EF_SW_CFG_0_SPEC, bool, O>; +#[doc = "Field `ef_sw_se_dbg_dis` reader - "] +pub type EF_SW_SE_DBG_DIS_R = crate::BitReader; +#[doc = "Field `ef_sw_se_dbg_dis` writer - "] +pub type EF_SW_SE_DBG_DIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_SW_CFG_0_SPEC, bool, O>; +#[doc = "Field `ef_sw_efuse_dbg_dis` reader - "] +pub type EF_SW_EFUSE_DBG_DIS_R = crate::BitReader; +#[doc = "Field `ef_sw_efuse_dbg_dis` writer - "] +pub type EF_SW_EFUSE_DBG_DIS_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EF_SW_CFG_0_SPEC, bool, O>; +#[doc = "Field `ef_sw_dbg_jtag_1_dis` reader - "] +pub type EF_SW_DBG_JTAG_1_DIS_R = crate::FieldReader; +#[doc = "Field `ef_sw_dbg_jtag_1_dis` writer - "] +pub type EF_SW_DBG_JTAG_1_DIS_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_SW_CFG_0_SPEC, u8, u8, 2, O>; +#[doc = "Field `ef_sw_dbg_jtag_0_dis` reader - "] +pub type EF_SW_DBG_JTAG_0_DIS_R = crate::FieldReader; +#[doc = "Field `ef_sw_dbg_jtag_0_dis` writer - "] +pub type EF_SW_DBG_JTAG_0_DIS_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_SW_CFG_0_SPEC, u8, u8, 2, O>; +#[doc = "Field `ef_sw_dbg_mode` reader - "] +pub type EF_SW_DBG_MODE_R = crate::FieldReader; +#[doc = "Field `ef_sw_dbg_mode` writer - "] +pub type EF_SW_DBG_MODE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_SW_CFG_0_SPEC, u8, u8, 4, O>; impl R { - #[doc = "Bits 28:31"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn ef_sw_dbg_mode(&self) -> EF_SW_DBG_MODE_R { - EF_SW_DBG_MODE_R::new(((self.bits >> 28) & 0x0f) as u8) + pub fn ef_sw_sf_aes_mode(&self) -> EF_SW_SF_AES_MODE_R { + EF_SW_SF_AES_MODE_R::new((self.bits & 3) as u8) } - #[doc = "Bits 26:27"] + #[doc = "Bits 2:3"] #[inline(always)] - pub fn ef_sw_dbg_jtag_0_dis(&self) -> EF_SW_DBG_JTAG_0_DIS_R { - EF_SW_DBG_JTAG_0_DIS_R::new(((self.bits >> 26) & 0x03) as u8) + pub fn ef_sw_sboot_sign_mode(&self) -> EF_SW_SBOOT_SIGN_MODE_R { + EF_SW_SBOOT_SIGN_MODE_R::new(((self.bits >> 2) & 3) as u8) } - #[doc = "Bits 24:25"] + #[doc = "Bits 4:5"] #[inline(always)] - pub fn ef_sw_dbg_jtag_1_dis(&self) -> EF_SW_DBG_JTAG_1_DIS_R { - EF_SW_DBG_JTAG_1_DIS_R::new(((self.bits >> 24) & 0x03) as u8) + pub fn ef_sw_sboot_en(&self) -> EF_SW_SBOOT_EN_R { + EF_SW_SBOOT_EN_R::new(((self.bits >> 4) & 3) as u8) } - #[doc = "Bit 23"] + #[doc = "Bit 6"] #[inline(always)] - pub fn ef_sw_efuse_dbg_dis(&self) -> EF_SW_EFUSE_DBG_DIS_R { - EF_SW_EFUSE_DBG_DIS_R::new(((self.bits >> 23) & 0x01) != 0) + pub fn ef_sw_cpu1_enc_en(&self) -> EF_SW_CPU1_ENC_EN_R { + EF_SW_CPU1_ENC_EN_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = "Bit 22"] + #[doc = "Bit 7"] #[inline(always)] - pub fn ef_sw_se_dbg_dis(&self) -> EF_SW_SE_DBG_DIS_R { - EF_SW_SE_DBG_DIS_R::new(((self.bits >> 22) & 0x01) != 0) + pub fn ef_sw_cpu0_enc_en(&self) -> EF_SW_CPU0_ENC_EN_R { + EF_SW_CPU0_ENC_EN_R::new(((self.bits >> 7) & 1) != 0) } - #[doc = "Bit 21"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn ef_sw_cpu_rst_dbg_dis(&self) -> EF_SW_CPU_RST_DBG_DIS_R { - EF_SW_CPU_RST_DBG_DIS_R::new(((self.bits >> 21) & 0x01) != 0) + pub fn ef_sw_sw_usage_1(&self) -> EF_SW_SW_USAGE_1_R { + EF_SW_SW_USAGE_1_R::new(((self.bits >> 12) & 3) as u8) } - #[doc = "Bit 20"] + #[doc = "Bit 14"] #[inline(always)] - pub fn ef_sw_cpu1_dis(&self) -> EF_SW_CPU1_DIS_R { - EF_SW_CPU1_DIS_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn ef_sw_sdu_dis(&self) -> EF_SW_SDU_DIS_R { + EF_SW_SDU_DIS_R::new(((self.bits >> 14) & 1) != 0) } - #[doc = "Bit 19"] + #[doc = "Bit 15"] #[inline(always)] - pub fn ef_sw_sf_dis(&self) -> EF_SW_SF_DIS_R { - EF_SW_SF_DIS_R::new(((self.bits >> 19) & 0x01) != 0) + pub fn ef_sw_ble_dis(&self) -> EF_SW_BLE_DIS_R { + EF_SW_BLE_DIS_R::new(((self.bits >> 15) & 1) != 0) } - #[doc = "Bit 18"] + #[doc = "Bit 16"] #[inline(always)] - pub fn ef_sw_cam_dis(&self) -> EF_SW_CAM_DIS_R { - EF_SW_CAM_DIS_R::new(((self.bits >> 18) & 0x01) != 0) + pub fn ef_sw_wifi_dis(&self) -> EF_SW_WIFI_DIS_R { + EF_SW_WIFI_DIS_R::new(((self.bits >> 16) & 1) != 0) } #[doc = "Bit 17"] #[inline(always)] pub fn ef_sw_0_key_enc_en(&self) -> EF_SW_0_KEY_ENC_EN_R { - EF_SW_0_KEY_ENC_EN_R::new(((self.bits >> 17) & 0x01) != 0) + EF_SW_0_KEY_ENC_EN_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bit 16"] + #[doc = "Bit 18"] #[inline(always)] - pub fn ef_sw_wifi_dis(&self) -> EF_SW_WIFI_DIS_R { - EF_SW_WIFI_DIS_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn ef_sw_cam_dis(&self) -> EF_SW_CAM_DIS_R { + EF_SW_CAM_DIS_R::new(((self.bits >> 18) & 1) != 0) } - #[doc = "Bit 15"] + #[doc = "Bit 19"] #[inline(always)] - pub fn ef_sw_ble_dis(&self) -> EF_SW_BLE_DIS_R { - EF_SW_BLE_DIS_R::new(((self.bits >> 15) & 0x01) != 0) + pub fn ef_sw_sf_dis(&self) -> EF_SW_SF_DIS_R { + EF_SW_SF_DIS_R::new(((self.bits >> 19) & 1) != 0) } - #[doc = "Bit 14"] + #[doc = "Bit 20"] #[inline(always)] - pub fn ef_sw_sdu_dis(&self) -> EF_SW_SDU_DIS_R { - EF_SW_SDU_DIS_R::new(((self.bits >> 14) & 0x01) != 0) + pub fn ef_sw_cpu1_dis(&self) -> EF_SW_CPU1_DIS_R { + EF_SW_CPU1_DIS_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bits 12:13"] + #[doc = "Bit 21"] #[inline(always)] - pub fn ef_sw_sw_usage_1(&self) -> EF_SW_SW_USAGE_1_R { - EF_SW_SW_USAGE_1_R::new(((self.bits >> 12) & 0x03) as u8) + pub fn ef_sw_cpu_rst_dbg_dis(&self) -> EF_SW_CPU_RST_DBG_DIS_R { + EF_SW_CPU_RST_DBG_DIS_R::new(((self.bits >> 21) & 1) != 0) } - #[doc = "Bit 7"] + #[doc = "Bit 22"] #[inline(always)] - pub fn ef_sw_cpu0_enc_en(&self) -> EF_SW_CPU0_ENC_EN_R { - EF_SW_CPU0_ENC_EN_R::new(((self.bits >> 7) & 0x01) != 0) + pub fn ef_sw_se_dbg_dis(&self) -> EF_SW_SE_DBG_DIS_R { + EF_SW_SE_DBG_DIS_R::new(((self.bits >> 22) & 1) != 0) } - #[doc = "Bit 6"] + #[doc = "Bit 23"] #[inline(always)] - pub fn ef_sw_cpu1_enc_en(&self) -> EF_SW_CPU1_ENC_EN_R { - EF_SW_CPU1_ENC_EN_R::new(((self.bits >> 6) & 0x01) != 0) + pub fn ef_sw_efuse_dbg_dis(&self) -> EF_SW_EFUSE_DBG_DIS_R { + EF_SW_EFUSE_DBG_DIS_R::new(((self.bits >> 23) & 1) != 0) } - #[doc = "Bits 4:5"] + #[doc = "Bits 24:25"] #[inline(always)] - pub fn ef_sw_sboot_en(&self) -> EF_SW_SBOOT_EN_R { - EF_SW_SBOOT_EN_R::new(((self.bits >> 4) & 0x03) as u8) + pub fn ef_sw_dbg_jtag_1_dis(&self) -> EF_SW_DBG_JTAG_1_DIS_R { + EF_SW_DBG_JTAG_1_DIS_R::new(((self.bits >> 24) & 3) as u8) } - #[doc = "Bits 2:3"] + #[doc = "Bits 26:27"] #[inline(always)] - pub fn ef_sw_sboot_sign_mode(&self) -> EF_SW_SBOOT_SIGN_MODE_R { - EF_SW_SBOOT_SIGN_MODE_R::new(((self.bits >> 2) & 0x03) as u8) + pub fn ef_sw_dbg_jtag_0_dis(&self) -> EF_SW_DBG_JTAG_0_DIS_R { + EF_SW_DBG_JTAG_0_DIS_R::new(((self.bits >> 26) & 3) as u8) } - #[doc = "Bits 0:1"] + #[doc = "Bits 28:31"] #[inline(always)] - pub fn ef_sw_sf_aes_mode(&self) -> EF_SW_SF_AES_MODE_R { - EF_SW_SF_AES_MODE_R::new((self.bits & 0x03) as u8) + pub fn ef_sw_dbg_mode(&self) -> EF_SW_DBG_MODE_R { + EF_SW_DBG_MODE_R::new(((self.bits >> 28) & 0x0f) as u8) } } impl W { - #[doc = "Bits 28:31"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn ef_sw_dbg_mode(&mut self) -> EF_SW_DBG_MODE_W { - EF_SW_DBG_MODE_W { w: self } + #[must_use] + pub fn ef_sw_sf_aes_mode(&mut self) -> EF_SW_SF_AES_MODE_W<0> { + EF_SW_SF_AES_MODE_W::new(self) } - #[doc = "Bits 26:27"] + #[doc = "Bits 2:3"] #[inline(always)] - pub fn ef_sw_dbg_jtag_0_dis(&mut self) -> EF_SW_DBG_JTAG_0_DIS_W { - EF_SW_DBG_JTAG_0_DIS_W { w: self } + #[must_use] + pub fn ef_sw_sboot_sign_mode(&mut self) -> EF_SW_SBOOT_SIGN_MODE_W<2> { + EF_SW_SBOOT_SIGN_MODE_W::new(self) } - #[doc = "Bits 24:25"] + #[doc = "Bits 4:5"] #[inline(always)] - pub fn ef_sw_dbg_jtag_1_dis(&mut self) -> EF_SW_DBG_JTAG_1_DIS_W { - EF_SW_DBG_JTAG_1_DIS_W { w: self } + #[must_use] + pub fn ef_sw_sboot_en(&mut self) -> EF_SW_SBOOT_EN_W<4> { + EF_SW_SBOOT_EN_W::new(self) } - #[doc = "Bit 23"] + #[doc = "Bit 6"] #[inline(always)] - pub fn ef_sw_efuse_dbg_dis(&mut self) -> EF_SW_EFUSE_DBG_DIS_W { - EF_SW_EFUSE_DBG_DIS_W { w: self } + #[must_use] + pub fn ef_sw_cpu1_enc_en(&mut self) -> EF_SW_CPU1_ENC_EN_W<6> { + EF_SW_CPU1_ENC_EN_W::new(self) } - #[doc = "Bit 22"] + #[doc = "Bit 7"] #[inline(always)] - pub fn ef_sw_se_dbg_dis(&mut self) -> EF_SW_SE_DBG_DIS_W { - EF_SW_SE_DBG_DIS_W { w: self } + #[must_use] + pub fn ef_sw_cpu0_enc_en(&mut self) -> EF_SW_CPU0_ENC_EN_W<7> { + EF_SW_CPU0_ENC_EN_W::new(self) } - #[doc = "Bit 21"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn ef_sw_cpu_rst_dbg_dis(&mut self) -> EF_SW_CPU_RST_DBG_DIS_W { - EF_SW_CPU_RST_DBG_DIS_W { w: self } + #[must_use] + pub fn ef_sw_sw_usage_1(&mut self) -> EF_SW_SW_USAGE_1_W<12> { + EF_SW_SW_USAGE_1_W::new(self) } - #[doc = "Bit 20"] + #[doc = "Bit 14"] #[inline(always)] - pub fn ef_sw_cpu1_dis(&mut self) -> EF_SW_CPU1_DIS_W { - EF_SW_CPU1_DIS_W { w: self } + #[must_use] + pub fn ef_sw_sdu_dis(&mut self) -> EF_SW_SDU_DIS_W<14> { + EF_SW_SDU_DIS_W::new(self) } - #[doc = "Bit 19"] + #[doc = "Bit 15"] #[inline(always)] - pub fn ef_sw_sf_dis(&mut self) -> EF_SW_SF_DIS_W { - EF_SW_SF_DIS_W { w: self } + #[must_use] + pub fn ef_sw_ble_dis(&mut self) -> EF_SW_BLE_DIS_W<15> { + EF_SW_BLE_DIS_W::new(self) } - #[doc = "Bit 18"] + #[doc = "Bit 16"] #[inline(always)] - pub fn ef_sw_cam_dis(&mut self) -> EF_SW_CAM_DIS_W { - EF_SW_CAM_DIS_W { w: self } + #[must_use] + pub fn ef_sw_wifi_dis(&mut self) -> EF_SW_WIFI_DIS_W<16> { + EF_SW_WIFI_DIS_W::new(self) } #[doc = "Bit 17"] #[inline(always)] - pub fn ef_sw_0_key_enc_en(&mut self) -> EF_SW_0_KEY_ENC_EN_W { - EF_SW_0_KEY_ENC_EN_W { w: self } + #[must_use] + pub fn ef_sw_0_key_enc_en(&mut self) -> EF_SW_0_KEY_ENC_EN_W<17> { + EF_SW_0_KEY_ENC_EN_W::new(self) } - #[doc = "Bit 16"] + #[doc = "Bit 18"] #[inline(always)] - pub fn ef_sw_wifi_dis(&mut self) -> EF_SW_WIFI_DIS_W { - EF_SW_WIFI_DIS_W { w: self } + #[must_use] + pub fn ef_sw_cam_dis(&mut self) -> EF_SW_CAM_DIS_W<18> { + EF_SW_CAM_DIS_W::new(self) } - #[doc = "Bit 15"] + #[doc = "Bit 19"] #[inline(always)] - pub fn ef_sw_ble_dis(&mut self) -> EF_SW_BLE_DIS_W { - EF_SW_BLE_DIS_W { w: self } + #[must_use] + pub fn ef_sw_sf_dis(&mut self) -> EF_SW_SF_DIS_W<19> { + EF_SW_SF_DIS_W::new(self) } - #[doc = "Bit 14"] + #[doc = "Bit 20"] #[inline(always)] - pub fn ef_sw_sdu_dis(&mut self) -> EF_SW_SDU_DIS_W { - EF_SW_SDU_DIS_W { w: self } + #[must_use] + pub fn ef_sw_cpu1_dis(&mut self) -> EF_SW_CPU1_DIS_W<20> { + EF_SW_CPU1_DIS_W::new(self) } - #[doc = "Bits 12:13"] + #[doc = "Bit 21"] #[inline(always)] - pub fn ef_sw_sw_usage_1(&mut self) -> EF_SW_SW_USAGE_1_W { - EF_SW_SW_USAGE_1_W { w: self } + #[must_use] + pub fn ef_sw_cpu_rst_dbg_dis(&mut self) -> EF_SW_CPU_RST_DBG_DIS_W<21> { + EF_SW_CPU_RST_DBG_DIS_W::new(self) } - #[doc = "Bit 7"] + #[doc = "Bit 22"] #[inline(always)] - pub fn ef_sw_cpu0_enc_en(&mut self) -> EF_SW_CPU0_ENC_EN_W { - EF_SW_CPU0_ENC_EN_W { w: self } + #[must_use] + pub fn ef_sw_se_dbg_dis(&mut self) -> EF_SW_SE_DBG_DIS_W<22> { + EF_SW_SE_DBG_DIS_W::new(self) } - #[doc = "Bit 6"] + #[doc = "Bit 23"] #[inline(always)] - pub fn ef_sw_cpu1_enc_en(&mut self) -> EF_SW_CPU1_ENC_EN_W { - EF_SW_CPU1_ENC_EN_W { w: self } + #[must_use] + pub fn ef_sw_efuse_dbg_dis(&mut self) -> EF_SW_EFUSE_DBG_DIS_W<23> { + EF_SW_EFUSE_DBG_DIS_W::new(self) } - #[doc = "Bits 4:5"] + #[doc = "Bits 24:25"] #[inline(always)] - pub fn ef_sw_sboot_en(&mut self) -> EF_SW_SBOOT_EN_W { - EF_SW_SBOOT_EN_W { w: self } + #[must_use] + pub fn ef_sw_dbg_jtag_1_dis(&mut self) -> EF_SW_DBG_JTAG_1_DIS_W<24> { + EF_SW_DBG_JTAG_1_DIS_W::new(self) } - #[doc = "Bits 2:3"] + #[doc = "Bits 26:27"] #[inline(always)] - pub fn ef_sw_sboot_sign_mode(&mut self) -> EF_SW_SBOOT_SIGN_MODE_W { - EF_SW_SBOOT_SIGN_MODE_W { w: self } + #[must_use] + pub fn ef_sw_dbg_jtag_0_dis(&mut self) -> EF_SW_DBG_JTAG_0_DIS_W<26> { + EF_SW_DBG_JTAG_0_DIS_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bits 28:31"] #[inline(always)] - pub fn ef_sw_sf_aes_mode(&mut self) -> EF_SW_SF_AES_MODE_W { - EF_SW_SF_AES_MODE_W { w: self } + #[must_use] + pub fn ef_sw_dbg_mode(&mut self) -> EF_SW_DBG_MODE_W<28> { + EF_SW_DBG_MODE_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -857,11 +353,10 @@ impl crate::Readable for EF_SW_CFG_0_SPEC { #[doc = "`write(|w| ..)` method takes [ef_sw_cfg_0::W](W) writer structure"] impl crate::Writable for EF_SW_CFG_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_sw_cfg_0 to value 0"] impl crate::Resettable for EF_SW_CFG_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_0.rs b/src/ef_data_0.rs index d230e85..4ab178c 100644 --- a/src/ef_data_0.rs +++ b/src/ef_data_0.rs @@ -2,195 +2,195 @@ #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - ef_cfg_0."] - pub ef_cfg_0: crate::Reg, + pub ef_cfg_0: EF_CFG_0, #[doc = "0x04 - ef_dbg_pwd_low."] - pub ef_dbg_pwd_low: crate::Reg, + pub ef_dbg_pwd_low: EF_DBG_PWD_LOW, #[doc = "0x08 - ef_dbg_pwd_high."] - pub ef_dbg_pwd_high: crate::Reg, + pub ef_dbg_pwd_high: EF_DBG_PWD_HIGH, #[doc = "0x0c - ef_ana_trim_0."] - pub ef_ana_trim_0: crate::Reg, + pub ef_ana_trim_0: EF_ANA_TRIM_0, #[doc = "0x10 - ef_sw_usage_0."] - pub ef_sw_usage_0: crate::Reg, + pub ef_sw_usage_0: EF_SW_USAGE_0, #[doc = "0x14 - ef_wifi_mac_low."] - pub ef_wifi_mac_low: crate::Reg, + pub ef_wifi_mac_low: EF_WIFI_MAC_LOW, #[doc = "0x18 - ef_wifi_mac_high."] - pub ef_wifi_mac_high: crate::Reg, + pub ef_wifi_mac_high: EF_WIFI_MAC_HIGH, #[doc = "0x1c - ef_key_slot_0_w0."] - pub ef_key_slot_0_w0: crate::Reg, + pub ef_key_slot_0_w0: EF_KEY_SLOT_0_W0, #[doc = "0x20 - ef_key_slot_0_w1."] - pub ef_key_slot_0_w1: crate::Reg, + pub ef_key_slot_0_w1: EF_KEY_SLOT_0_W1, #[doc = "0x24 - ef_key_slot_0_w2."] - pub ef_key_slot_0_w2: crate::Reg, + pub ef_key_slot_0_w2: EF_KEY_SLOT_0_W2, #[doc = "0x28 - ef_key_slot_0_w3."] - pub ef_key_slot_0_w3: crate::Reg, + pub ef_key_slot_0_w3: EF_KEY_SLOT_0_W3, #[doc = "0x2c - ef_key_slot_1_w0."] - pub ef_key_slot_1_w0: crate::Reg, + pub ef_key_slot_1_w0: EF_KEY_SLOT_1_W0, #[doc = "0x30 - ef_key_slot_1_w1."] - pub ef_key_slot_1_w1: crate::Reg, + pub ef_key_slot_1_w1: EF_KEY_SLOT_1_W1, #[doc = "0x34 - ef_key_slot_1_w2."] - pub ef_key_slot_1_w2: crate::Reg, + pub ef_key_slot_1_w2: EF_KEY_SLOT_1_W2, #[doc = "0x38 - ef_key_slot_1_w3."] - pub ef_key_slot_1_w3: crate::Reg, + pub ef_key_slot_1_w3: EF_KEY_SLOT_1_W3, #[doc = "0x3c - ef_key_slot_2_w0."] - pub ef_key_slot_2_w0: crate::Reg, + pub ef_key_slot_2_w0: EF_KEY_SLOT_2_W0, #[doc = "0x40 - ef_key_slot_2_w1."] - pub ef_key_slot_2_w1: crate::Reg, + pub ef_key_slot_2_w1: EF_KEY_SLOT_2_W1, #[doc = "0x44 - ef_key_slot_2_w2."] - pub ef_key_slot_2_w2: crate::Reg, + pub ef_key_slot_2_w2: EF_KEY_SLOT_2_W2, #[doc = "0x48 - ef_key_slot_2_w3."] - pub ef_key_slot_2_w3: crate::Reg, + pub ef_key_slot_2_w3: EF_KEY_SLOT_2_W3, #[doc = "0x4c - ef_key_slot_3_w0."] - pub ef_key_slot_3_w0: crate::Reg, + pub ef_key_slot_3_w0: EF_KEY_SLOT_3_W0, #[doc = "0x50 - ef_key_slot_3_w1."] - pub ef_key_slot_3_w1: crate::Reg, + pub ef_key_slot_3_w1: EF_KEY_SLOT_3_W1, #[doc = "0x54 - ef_key_slot_3_w2."] - pub ef_key_slot_3_w2: crate::Reg, + pub ef_key_slot_3_w2: EF_KEY_SLOT_3_W2, #[doc = "0x58 - ef_key_slot_3_w3."] - pub ef_key_slot_3_w3: crate::Reg, + pub ef_key_slot_3_w3: EF_KEY_SLOT_3_W3, #[doc = "0x5c - ef_key_slot_4_w0."] - pub ef_key_slot_4_w0: crate::Reg, + pub ef_key_slot_4_w0: EF_KEY_SLOT_4_W0, #[doc = "0x60 - ef_key_slot_4_w1."] - pub ef_key_slot_4_w1: crate::Reg, + pub ef_key_slot_4_w1: EF_KEY_SLOT_4_W1, #[doc = "0x64 - ef_key_slot_4_w2."] - pub ef_key_slot_4_w2: crate::Reg, + pub ef_key_slot_4_w2: EF_KEY_SLOT_4_W2, #[doc = "0x68 - ef_key_slot_4_w3."] - pub ef_key_slot_4_w3: crate::Reg, + pub ef_key_slot_4_w3: EF_KEY_SLOT_4_W3, #[doc = "0x6c - ef_key_slot_5_w0."] - pub ef_key_slot_5_w0: crate::Reg, + pub ef_key_slot_5_w0: EF_KEY_SLOT_5_W0, #[doc = "0x70 - ef_key_slot_5_w1."] - pub ef_key_slot_5_w1: crate::Reg, + pub ef_key_slot_5_w1: EF_KEY_SLOT_5_W1, #[doc = "0x74 - ef_key_slot_5_w2."] - pub ef_key_slot_5_w2: crate::Reg, + pub ef_key_slot_5_w2: EF_KEY_SLOT_5_W2, #[doc = "0x78 - ef_key_slot_5_w3."] - pub ef_key_slot_5_w3: crate::Reg, + pub ef_key_slot_5_w3: EF_KEY_SLOT_5_W3, #[doc = "0x7c - ef_data_0_lock."] - pub ef_data_0_lock: crate::Reg, + pub ef_data_0_lock: EF_DATA_0_LOCK, } -#[doc = "ef_cfg_0 register accessor: an alias for `Reg`"] +#[doc = "ef_cfg_0 (rw) register accessor: an alias for `Reg`"] pub type EF_CFG_0 = crate::Reg; #[doc = "ef_cfg_0."] pub mod ef_cfg_0; -#[doc = "ef_dbg_pwd_low register accessor: an alias for `Reg`"] +#[doc = "ef_dbg_pwd_low (rw) register accessor: an alias for `Reg`"] pub type EF_DBG_PWD_LOW = crate::Reg; #[doc = "ef_dbg_pwd_low."] pub mod ef_dbg_pwd_low; -#[doc = "ef_dbg_pwd_high register accessor: an alias for `Reg`"] +#[doc = "ef_dbg_pwd_high (rw) register accessor: an alias for `Reg`"] pub type EF_DBG_PWD_HIGH = crate::Reg; #[doc = "ef_dbg_pwd_high."] pub mod ef_dbg_pwd_high; -#[doc = "ef_ana_trim_0 register accessor: an alias for `Reg`"] +#[doc = "ef_ana_trim_0 (rw) register accessor: an alias for `Reg`"] pub type EF_ANA_TRIM_0 = crate::Reg; #[doc = "ef_ana_trim_0."] pub mod ef_ana_trim_0; -#[doc = "ef_sw_usage_0 register accessor: an alias for `Reg`"] +#[doc = "ef_sw_usage_0 (rw) register accessor: an alias for `Reg`"] pub type EF_SW_USAGE_0 = crate::Reg; #[doc = "ef_sw_usage_0."] pub mod ef_sw_usage_0; -#[doc = "ef_wifi_mac_low register accessor: an alias for `Reg`"] +#[doc = "ef_wifi_mac_low (rw) register accessor: an alias for `Reg`"] pub type EF_WIFI_MAC_LOW = crate::Reg; #[doc = "ef_wifi_mac_low."] pub mod ef_wifi_mac_low; -#[doc = "ef_wifi_mac_high register accessor: an alias for `Reg`"] +#[doc = "ef_wifi_mac_high (rw) register accessor: an alias for `Reg`"] pub type EF_WIFI_MAC_HIGH = crate::Reg; #[doc = "ef_wifi_mac_high."] pub mod ef_wifi_mac_high; -#[doc = "ef_key_slot_0_w0 register accessor: an alias for `Reg`"] +#[doc = "ef_key_slot_0_w0 (rw) register accessor: an alias for `Reg`"] pub type EF_KEY_SLOT_0_W0 = crate::Reg; #[doc = "ef_key_slot_0_w0."] pub mod ef_key_slot_0_w0; -#[doc = "ef_key_slot_0_w1 register accessor: an alias for `Reg`"] +#[doc = "ef_key_slot_0_w1 (rw) register accessor: an alias for `Reg`"] pub type EF_KEY_SLOT_0_W1 = crate::Reg; #[doc = "ef_key_slot_0_w1."] pub mod ef_key_slot_0_w1; -#[doc = "ef_key_slot_0_w2 register accessor: an alias for `Reg`"] +#[doc = "ef_key_slot_0_w2 (rw) register accessor: an alias for `Reg`"] pub type EF_KEY_SLOT_0_W2 = crate::Reg; #[doc = "ef_key_slot_0_w2."] pub mod ef_key_slot_0_w2; -#[doc = "ef_key_slot_0_w3 register accessor: an alias for `Reg`"] +#[doc = "ef_key_slot_0_w3 (rw) register accessor: an alias for `Reg`"] pub type EF_KEY_SLOT_0_W3 = crate::Reg; #[doc = "ef_key_slot_0_w3."] pub mod ef_key_slot_0_w3; -#[doc = "ef_key_slot_1_w0 register accessor: an alias for `Reg`"] +#[doc = "ef_key_slot_1_w0 (rw) register accessor: an alias for `Reg`"] pub type EF_KEY_SLOT_1_W0 = crate::Reg; #[doc = "ef_key_slot_1_w0."] pub mod ef_key_slot_1_w0; -#[doc = "ef_key_slot_1_w1 register accessor: an alias for `Reg`"] +#[doc = "ef_key_slot_1_w1 (rw) register accessor: an alias for `Reg`"] pub type EF_KEY_SLOT_1_W1 = crate::Reg; #[doc = "ef_key_slot_1_w1."] pub mod ef_key_slot_1_w1; -#[doc = "ef_key_slot_1_w2 register accessor: an alias for `Reg`"] +#[doc = "ef_key_slot_1_w2 (rw) register accessor: an alias for `Reg`"] pub type EF_KEY_SLOT_1_W2 = crate::Reg; #[doc = "ef_key_slot_1_w2."] pub mod ef_key_slot_1_w2; -#[doc = "ef_key_slot_1_w3 register accessor: an alias for `Reg`"] +#[doc = "ef_key_slot_1_w3 (rw) register accessor: an alias for `Reg`"] pub type EF_KEY_SLOT_1_W3 = crate::Reg; #[doc = "ef_key_slot_1_w3."] pub mod ef_key_slot_1_w3; -#[doc = "ef_key_slot_2_w0 register accessor: an alias for `Reg`"] +#[doc = "ef_key_slot_2_w0 (rw) register accessor: an alias for `Reg`"] pub type EF_KEY_SLOT_2_W0 = crate::Reg; #[doc = "ef_key_slot_2_w0."] pub mod ef_key_slot_2_w0; -#[doc = "ef_key_slot_2_w1 register accessor: an alias for `Reg`"] +#[doc = "ef_key_slot_2_w1 (rw) register accessor: an alias for `Reg`"] pub type EF_KEY_SLOT_2_W1 = crate::Reg; #[doc = "ef_key_slot_2_w1."] pub mod ef_key_slot_2_w1; -#[doc = "ef_key_slot_2_w2 register accessor: an alias for `Reg`"] +#[doc = "ef_key_slot_2_w2 (rw) register accessor: an alias for `Reg`"] pub type EF_KEY_SLOT_2_W2 = crate::Reg; #[doc = "ef_key_slot_2_w2."] pub mod ef_key_slot_2_w2; -#[doc = "ef_key_slot_2_w3 register accessor: an alias for `Reg`"] +#[doc = "ef_key_slot_2_w3 (rw) register accessor: an alias for `Reg`"] pub type EF_KEY_SLOT_2_W3 = crate::Reg; #[doc = "ef_key_slot_2_w3."] pub mod ef_key_slot_2_w3; -#[doc = "ef_key_slot_3_w0 register accessor: an alias for `Reg`"] +#[doc = "ef_key_slot_3_w0 (rw) register accessor: an alias for `Reg`"] pub type EF_KEY_SLOT_3_W0 = crate::Reg; #[doc = "ef_key_slot_3_w0."] pub mod ef_key_slot_3_w0; -#[doc = "ef_key_slot_3_w1 register accessor: an alias for `Reg`"] +#[doc = "ef_key_slot_3_w1 (rw) register accessor: an alias for `Reg`"] pub type EF_KEY_SLOT_3_W1 = crate::Reg; #[doc = "ef_key_slot_3_w1."] pub mod ef_key_slot_3_w1; -#[doc = "ef_key_slot_3_w2 register accessor: an alias for `Reg`"] +#[doc = "ef_key_slot_3_w2 (rw) register accessor: an alias for `Reg`"] pub type EF_KEY_SLOT_3_W2 = crate::Reg; #[doc = "ef_key_slot_3_w2."] pub mod ef_key_slot_3_w2; -#[doc = "ef_key_slot_3_w3 register accessor: an alias for `Reg`"] +#[doc = "ef_key_slot_3_w3 (rw) register accessor: an alias for `Reg`"] pub type EF_KEY_SLOT_3_W3 = crate::Reg; #[doc = "ef_key_slot_3_w3."] pub mod ef_key_slot_3_w3; -#[doc = "ef_key_slot_4_w0 register accessor: an alias for `Reg`"] +#[doc = "ef_key_slot_4_w0 (rw) register accessor: an alias for `Reg`"] pub type EF_KEY_SLOT_4_W0 = crate::Reg; #[doc = "ef_key_slot_4_w0."] pub mod ef_key_slot_4_w0; -#[doc = "ef_key_slot_4_w1 register accessor: an alias for `Reg`"] +#[doc = "ef_key_slot_4_w1 (rw) register accessor: an alias for `Reg`"] pub type EF_KEY_SLOT_4_W1 = crate::Reg; #[doc = "ef_key_slot_4_w1."] pub mod ef_key_slot_4_w1; -#[doc = "ef_key_slot_4_w2 register accessor: an alias for `Reg`"] +#[doc = "ef_key_slot_4_w2 (rw) register accessor: an alias for `Reg`"] pub type EF_KEY_SLOT_4_W2 = crate::Reg; #[doc = "ef_key_slot_4_w2."] pub mod ef_key_slot_4_w2; -#[doc = "ef_key_slot_4_w3 register accessor: an alias for `Reg`"] +#[doc = "ef_key_slot_4_w3 (rw) register accessor: an alias for `Reg`"] pub type EF_KEY_SLOT_4_W3 = crate::Reg; #[doc = "ef_key_slot_4_w3."] pub mod ef_key_slot_4_w3; -#[doc = "ef_key_slot_5_w0 register accessor: an alias for `Reg`"] +#[doc = "ef_key_slot_5_w0 (rw) register accessor: an alias for `Reg`"] pub type EF_KEY_SLOT_5_W0 = crate::Reg; #[doc = "ef_key_slot_5_w0."] pub mod ef_key_slot_5_w0; -#[doc = "ef_key_slot_5_w1 register accessor: an alias for `Reg`"] +#[doc = "ef_key_slot_5_w1 (rw) register accessor: an alias for `Reg`"] pub type EF_KEY_SLOT_5_W1 = crate::Reg; #[doc = "ef_key_slot_5_w1."] pub mod ef_key_slot_5_w1; -#[doc = "ef_key_slot_5_w2 register accessor: an alias for `Reg`"] +#[doc = "ef_key_slot_5_w2 (rw) register accessor: an alias for `Reg`"] pub type EF_KEY_SLOT_5_W2 = crate::Reg; #[doc = "ef_key_slot_5_w2."] pub mod ef_key_slot_5_w2; -#[doc = "ef_key_slot_5_w3 register accessor: an alias for `Reg`"] +#[doc = "ef_key_slot_5_w3 (rw) register accessor: an alias for `Reg`"] pub type EF_KEY_SLOT_5_W3 = crate::Reg; #[doc = "ef_key_slot_5_w3."] pub mod ef_key_slot_5_w3; -#[doc = "ef_data_0_lock register accessor: an alias for `Reg`"] +#[doc = "ef_data_0_lock (rw) register accessor: an alias for `Reg`"] pub type EF_DATA_0_LOCK = crate::Reg; #[doc = "ef_data_0_lock."] pub mod ef_data_0_lock; diff --git a/src/ef_data_0/ef_ana_trim_0.rs b/src/ef_data_0/ef_ana_trim_0.rs index 13be9c7..f73731e 100644 --- a/src/ef_data_0/ef_ana_trim_0.rs +++ b/src/ef_data_0/ef_ana_trim_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `ef_ana_trim_0` reader - "] -pub struct EF_ANA_TRIM_0_R(crate::FieldReader); -impl EF_ANA_TRIM_0_R { - pub(crate) fn new(bits: u32) -> Self { - EF_ANA_TRIM_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_ANA_TRIM_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_ANA_TRIM_0_R = crate::FieldReader; #[doc = "Field `ef_ana_trim_0` writer - "] -pub struct EF_ANA_TRIM_0_W<'a> { - w: &'a mut W, -} -impl<'a> EF_ANA_TRIM_0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type EF_ANA_TRIM_0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_ANA_TRIM_0_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_ana_trim_0(&self) -> EF_ANA_TRIM_0_R { - EF_ANA_TRIM_0_R::new((self.bits & 0xffff_ffff) as u32) + EF_ANA_TRIM_0_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn ef_ana_trim_0(&mut self) -> EF_ANA_TRIM_0_W { - EF_ANA_TRIM_0_W { w: self } + #[must_use] + pub fn ef_ana_trim_0(&mut self) -> EF_ANA_TRIM_0_W<0> { + EF_ANA_TRIM_0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for EF_ANA_TRIM_0_SPEC { #[doc = "`write(|w| ..)` method takes [ef_ana_trim_0::W](W) writer structure"] impl crate::Writable for EF_ANA_TRIM_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_ana_trim_0 to value 0"] impl crate::Resettable for EF_ANA_TRIM_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_0/ef_cfg_0.rs b/src/ef_data_0/ef_cfg_0.rs index 83769cd..76fc61d 100644 --- a/src/ef_data_0/ef_cfg_0.rs +++ b/src/ef_data_0/ef_cfg_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,855 +28,322 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `ef_dbg_mode` reader - "] -pub struct EF_DBG_MODE_R(crate::FieldReader); -impl EF_DBG_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - EF_DBG_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_DBG_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_dbg_mode` writer - "] -pub struct EF_DBG_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> EF_DBG_MODE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 28)) | ((value as u32 & 0x0f) << 28); - self.w - } -} -#[doc = "Field `ef_dbg_jtag_0_dis` reader - "] -pub struct EF_DBG_JTAG_0_DIS_R(crate::FieldReader); -impl EF_DBG_JTAG_0_DIS_R { - pub(crate) fn new(bits: u8) -> Self { - EF_DBG_JTAG_0_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_DBG_JTAG_0_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_dbg_jtag_0_dis` writer - "] -pub struct EF_DBG_JTAG_0_DIS_W<'a> { - w: &'a mut W, -} -impl<'a> EF_DBG_JTAG_0_DIS_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 26)) | ((value as u32 & 0x03) << 26); - self.w - } -} -#[doc = "Field `ef_dbg_jtag_1_dis` reader - "] -pub struct EF_DBG_JTAG_1_DIS_R(crate::FieldReader); -impl EF_DBG_JTAG_1_DIS_R { - pub(crate) fn new(bits: u8) -> Self { - EF_DBG_JTAG_1_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_DBG_JTAG_1_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_dbg_jtag_1_dis` writer - "] -pub struct EF_DBG_JTAG_1_DIS_W<'a> { - w: &'a mut W, -} -impl<'a> EF_DBG_JTAG_1_DIS_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 24)) | ((value as u32 & 0x03) << 24); - self.w - } -} -#[doc = "Field `ef_efuse_dbg_dis` reader - "] -pub struct EF_EFUSE_DBG_DIS_R(crate::FieldReader); -impl EF_EFUSE_DBG_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - EF_EFUSE_DBG_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_EFUSE_DBG_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_efuse_dbg_dis` writer - "] -pub struct EF_EFUSE_DBG_DIS_W<'a> { - w: &'a mut W, -} -impl<'a> EF_EFUSE_DBG_DIS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23); - self.w - } -} -#[doc = "Field `ef_se_dbg_dis` reader - "] -pub struct EF_SE_DBG_DIS_R(crate::FieldReader); -impl EF_SE_DBG_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - EF_SE_DBG_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_SE_DBG_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_se_dbg_dis` writer - "] -pub struct EF_SE_DBG_DIS_W<'a> { - w: &'a mut W, -} -impl<'a> EF_SE_DBG_DIS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 22)) | ((value as u32 & 0x01) << 22); - self.w - } -} -#[doc = "Field `ef_cpu_rst_dbg_dis` reader - "] -pub struct EF_CPU_RST_DBG_DIS_R(crate::FieldReader); -impl EF_CPU_RST_DBG_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - EF_CPU_RST_DBG_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_CPU_RST_DBG_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_cpu_rst_dbg_dis` writer - "] -pub struct EF_CPU_RST_DBG_DIS_W<'a> { - w: &'a mut W, -} -impl<'a> EF_CPU_RST_DBG_DIS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); - self.w - } -} -#[doc = "Field `ef_cpu1_dis` reader - "] -pub struct EF_CPU1_DIS_R(crate::FieldReader); -impl EF_CPU1_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - EF_CPU1_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_CPU1_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_cpu1_dis` writer - "] -pub struct EF_CPU1_DIS_W<'a> { - w: &'a mut W, -} -impl<'a> EF_CPU1_DIS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w - } -} -#[doc = "Field `ef_sf_dis` reader - "] -pub struct EF_SF_DIS_R(crate::FieldReader); -impl EF_SF_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - EF_SF_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_SF_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_sf_dis` writer - "] -pub struct EF_SF_DIS_W<'a> { - w: &'a mut W, -} -impl<'a> EF_SF_DIS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 19)) | ((value as u32 & 0x01) << 19); - self.w - } -} -#[doc = "Field `ef_cam_dis` reader - "] -pub struct EF_CAM_DIS_R(crate::FieldReader); -impl EF_CAM_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - EF_CAM_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_CAM_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_cam_dis` writer - "] -pub struct EF_CAM_DIS_W<'a> { - w: &'a mut W, -} -impl<'a> EF_CAM_DIS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18); - self.w - } -} -#[doc = "Field `ef_0_key_enc_en` reader - "] -pub struct EF_0_KEY_ENC_EN_R(crate::FieldReader); -impl EF_0_KEY_ENC_EN_R { - pub(crate) fn new(bits: bool) -> Self { - EF_0_KEY_ENC_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_0_KEY_ENC_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_0_key_enc_en` writer - "] -pub struct EF_0_KEY_ENC_EN_W<'a> { - w: &'a mut W, -} -impl<'a> EF_0_KEY_ENC_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w - } -} -#[doc = "Field `ef_wifi_dis` reader - "] -pub struct EF_WIFI_DIS_R(crate::FieldReader); -impl EF_WIFI_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - EF_WIFI_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_WIFI_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_wifi_dis` writer - "] -pub struct EF_WIFI_DIS_W<'a> { - w: &'a mut W, -} -impl<'a> EF_WIFI_DIS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `ef_ble_dis` reader - "] -pub struct EF_BLE_DIS_R(crate::FieldReader); -impl EF_BLE_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - EF_BLE_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_BLE_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ef_ble_dis` writer - "] -pub struct EF_BLE_DIS_W<'a> { - w: &'a mut W, -} -impl<'a> EF_BLE_DIS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15); - self.w - } -} +#[doc = "Field `ef_sf_aes_mode` reader - "] +pub type EF_SF_AES_MODE_R = crate::FieldReader; +#[doc = "Field `ef_sf_aes_mode` writer - "] +pub type EF_SF_AES_MODE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_CFG_0_SPEC, u8, u8, 2, O>; +#[doc = "Field `ef_sboot_sign_mode` reader - "] +pub type EF_SBOOT_SIGN_MODE_R = crate::FieldReader; +#[doc = "Field `ef_sboot_sign_mode` writer - "] +pub type EF_SBOOT_SIGN_MODE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_CFG_0_SPEC, u8, u8, 2, O>; +#[doc = "Field `ef_sboot_en` reader - "] +pub type EF_SBOOT_EN_R = crate::FieldReader; +#[doc = "Field `ef_sboot_en` writer - "] +pub type EF_SBOOT_EN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, EF_CFG_0_SPEC, u8, u8, 2, O>; +#[doc = "Field `ef_cpu1_enc_en` reader - "] +pub type EF_CPU1_ENC_EN_R = crate::BitReader; +#[doc = "Field `ef_cpu1_enc_en` writer - "] +pub type EF_CPU1_ENC_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_CFG_0_SPEC, bool, O>; +#[doc = "Field `ef_cpu0_enc_en` reader - "] +pub type EF_CPU0_ENC_EN_R = crate::BitReader; +#[doc = "Field `ef_cpu0_enc_en` writer - "] +pub type EF_CPU0_ENC_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_CFG_0_SPEC, bool, O>; +#[doc = "Field `ef_boot_sel` reader - "] +pub type EF_BOOT_SEL_R = crate::FieldReader; +#[doc = "Field `ef_boot_sel` writer - "] +pub type EF_BOOT_SEL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, EF_CFG_0_SPEC, u8, u8, 4, O>; +#[doc = "Field `ef_sw_usage_1` reader - "] +pub type EF_SW_USAGE_1_R = crate::FieldReader; +#[doc = "Field `ef_sw_usage_1` writer - "] +pub type EF_SW_USAGE_1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_CFG_0_SPEC, u8, u8, 2, O>; #[doc = "Field `ef_sdu_dis` reader - "] -pub struct EF_SDU_DIS_R(crate::FieldReader); -impl EF_SDU_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - EF_SDU_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_SDU_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_SDU_DIS_R = crate::BitReader; #[doc = "Field `ef_sdu_dis` writer - "] -pub struct EF_SDU_DIS_W<'a> { - w: &'a mut W, -} -impl<'a> EF_SDU_DIS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type EF_SDU_DIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_CFG_0_SPEC, bool, O>; +#[doc = "Field `ef_ble_dis` reader - "] +pub type EF_BLE_DIS_R = crate::BitReader; +#[doc = "Field `ef_ble_dis` writer - "] +pub type EF_BLE_DIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_CFG_0_SPEC, bool, O>; +#[doc = "Field `ef_wifi_dis` reader - "] +pub type EF_WIFI_DIS_R = crate::BitReader; +#[doc = "Field `ef_wifi_dis` writer - "] +pub type EF_WIFI_DIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_CFG_0_SPEC, bool, O>; +#[doc = "Field `ef_0_key_enc_en` reader - "] +pub type EF_0_KEY_ENC_EN_R = crate::BitReader; +#[doc = "Field `ef_0_key_enc_en` writer - "] +pub type EF_0_KEY_ENC_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_CFG_0_SPEC, bool, O>; +#[doc = "Field `ef_cam_dis` reader - "] +pub type EF_CAM_DIS_R = crate::BitReader; +#[doc = "Field `ef_cam_dis` writer - "] +pub type EF_CAM_DIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_CFG_0_SPEC, bool, O>; +#[doc = "Field `ef_sf_dis` reader - "] +pub type EF_SF_DIS_R = crate::BitReader; +#[doc = "Field `ef_sf_dis` writer - "] +pub type EF_SF_DIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_CFG_0_SPEC, bool, O>; +#[doc = "Field `ef_cpu1_dis` reader - "] +pub type EF_CPU1_DIS_R = crate::BitReader; +#[doc = "Field `ef_cpu1_dis` writer - "] +pub type EF_CPU1_DIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_CFG_0_SPEC, bool, O>; +#[doc = "Field `ef_cpu_rst_dbg_dis` reader - "] +pub type EF_CPU_RST_DBG_DIS_R = crate::BitReader; +#[doc = "Field `ef_cpu_rst_dbg_dis` writer - "] +pub type EF_CPU_RST_DBG_DIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_CFG_0_SPEC, bool, O>; +#[doc = "Field `ef_se_dbg_dis` reader - "] +pub type EF_SE_DBG_DIS_R = crate::BitReader; +#[doc = "Field `ef_se_dbg_dis` writer - "] +pub type EF_SE_DBG_DIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_CFG_0_SPEC, bool, O>; +#[doc = "Field `ef_efuse_dbg_dis` reader - "] +pub type EF_EFUSE_DBG_DIS_R = crate::BitReader; +#[doc = "Field `ef_efuse_dbg_dis` writer - "] +pub type EF_EFUSE_DBG_DIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_CFG_0_SPEC, bool, O>; +#[doc = "Field `ef_dbg_jtag_1_dis` reader - "] +pub type EF_DBG_JTAG_1_DIS_R = crate::FieldReader; +#[doc = "Field `ef_dbg_jtag_1_dis` writer - "] +pub type EF_DBG_JTAG_1_DIS_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_CFG_0_SPEC, u8, u8, 2, O>; +#[doc = "Field `ef_dbg_jtag_0_dis` reader - "] +pub type EF_DBG_JTAG_0_DIS_R = crate::FieldReader; +#[doc = "Field `ef_dbg_jtag_0_dis` writer - "] +pub type EF_DBG_JTAG_0_DIS_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_CFG_0_SPEC, u8, u8, 2, O>; +#[doc = "Field `ef_dbg_mode` reader - "] +pub type EF_DBG_MODE_R = crate::FieldReader; +#[doc = "Field `ef_dbg_mode` writer - "] +pub type EF_DBG_MODE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, EF_CFG_0_SPEC, u8, u8, 4, O>; +impl R { + #[doc = "Bits 0:1"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14); - self.w - } -} -#[doc = "Field `ef_sw_usage_1` reader - "] -pub struct EF_SW_USAGE_1_R(crate::FieldReader); -impl EF_SW_USAGE_1_R { - pub(crate) fn new(bits: u8) -> Self { - EF_SW_USAGE_1_R(crate::FieldReader::new(bits)) + pub fn ef_sf_aes_mode(&self) -> EF_SF_AES_MODE_R { + EF_SF_AES_MODE_R::new((self.bits & 3) as u8) } -} -impl core::ops::Deref for EF_SW_USAGE_1_R { - type Target = crate::FieldReader; + #[doc = "Bits 2:3"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn ef_sboot_sign_mode(&self) -> EF_SBOOT_SIGN_MODE_R { + EF_SBOOT_SIGN_MODE_R::new(((self.bits >> 2) & 3) as u8) } -} -#[doc = "Field `ef_sw_usage_1` writer - "] -pub struct EF_SW_USAGE_1_W<'a> { - w: &'a mut W, -} -impl<'a> EF_SW_USAGE_1_W<'a> { - #[doc = r"Writes raw bits to the field"] + #[doc = "Bits 4:5"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 12)) | ((value as u32 & 0x03) << 12); - self.w - } -} -#[doc = "Field `ef_boot_sel` reader - "] -pub struct EF_BOOT_SEL_R(crate::FieldReader); -impl EF_BOOT_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - EF_BOOT_SEL_R(crate::FieldReader::new(bits)) + pub fn ef_sboot_en(&self) -> EF_SBOOT_EN_R { + EF_SBOOT_EN_R::new(((self.bits >> 4) & 3) as u8) } -} -impl core::ops::Deref for EF_BOOT_SEL_R { - type Target = crate::FieldReader; + #[doc = "Bit 6"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn ef_cpu1_enc_en(&self) -> EF_CPU1_ENC_EN_R { + EF_CPU1_ENC_EN_R::new(((self.bits >> 6) & 1) != 0) } -} -#[doc = "Field `ef_boot_sel` writer - "] -pub struct EF_BOOT_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> EF_BOOT_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] + #[doc = "Bit 7"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 8)) | ((value as u32 & 0x0f) << 8); - self.w - } -} -#[doc = "Field `ef_cpu0_enc_en` reader - "] -pub struct EF_CPU0_ENC_EN_R(crate::FieldReader); -impl EF_CPU0_ENC_EN_R { - pub(crate) fn new(bits: bool) -> Self { - EF_CPU0_ENC_EN_R(crate::FieldReader::new(bits)) + pub fn ef_cpu0_enc_en(&self) -> EF_CPU0_ENC_EN_R { + EF_CPU0_ENC_EN_R::new(((self.bits >> 7) & 1) != 0) } -} -impl core::ops::Deref for EF_CPU0_ENC_EN_R { - type Target = crate::FieldReader; + #[doc = "Bits 8:11"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn ef_boot_sel(&self) -> EF_BOOT_SEL_R { + EF_BOOT_SEL_R::new(((self.bits >> 8) & 0x0f) as u8) } -} -#[doc = "Field `ef_cpu0_enc_en` writer - "] -pub struct EF_CPU0_ENC_EN_W<'a> { - w: &'a mut W, -} -impl<'a> EF_CPU0_ENC_EN_W<'a> { - #[doc = r"Sets the field bit"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn ef_sw_usage_1(&self) -> EF_SW_USAGE_1_R { + EF_SW_USAGE_1_R::new(((self.bits >> 12) & 3) as u8) } - #[doc = r"Clears the field bit"] + #[doc = "Bit 14"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn ef_sdu_dis(&self) -> EF_SDU_DIS_R { + EF_SDU_DIS_R::new(((self.bits >> 14) & 1) != 0) } - #[doc = r"Writes raw bits to the field"] + #[doc = "Bit 15"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7); - self.w - } -} -#[doc = "Field `ef_cpu1_enc_en` reader - "] -pub struct EF_CPU1_ENC_EN_R(crate::FieldReader); -impl EF_CPU1_ENC_EN_R { - pub(crate) fn new(bits: bool) -> Self { - EF_CPU1_ENC_EN_R(crate::FieldReader::new(bits)) + pub fn ef_ble_dis(&self) -> EF_BLE_DIS_R { + EF_BLE_DIS_R::new(((self.bits >> 15) & 1) != 0) } -} -impl core::ops::Deref for EF_CPU1_ENC_EN_R { - type Target = crate::FieldReader; + #[doc = "Bit 16"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn ef_wifi_dis(&self) -> EF_WIFI_DIS_R { + EF_WIFI_DIS_R::new(((self.bits >> 16) & 1) != 0) } -} -#[doc = "Field `ef_cpu1_enc_en` writer - "] -pub struct EF_CPU1_ENC_EN_W<'a> { - w: &'a mut W, -} -impl<'a> EF_CPU1_ENC_EN_W<'a> { - #[doc = r"Sets the field bit"] + #[doc = "Bit 17"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn ef_0_key_enc_en(&self) -> EF_0_KEY_ENC_EN_R { + EF_0_KEY_ENC_EN_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = r"Clears the field bit"] + #[doc = "Bit 18"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn ef_cam_dis(&self) -> EF_CAM_DIS_R { + EF_CAM_DIS_R::new(((self.bits >> 18) & 1) != 0) } - #[doc = r"Writes raw bits to the field"] + #[doc = "Bit 19"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w - } -} -#[doc = "Field `ef_sboot_en` reader - "] -pub struct EF_SBOOT_EN_R(crate::FieldReader); -impl EF_SBOOT_EN_R { - pub(crate) fn new(bits: u8) -> Self { - EF_SBOOT_EN_R(crate::FieldReader::new(bits)) + pub fn ef_sf_dis(&self) -> EF_SF_DIS_R { + EF_SF_DIS_R::new(((self.bits >> 19) & 1) != 0) } -} -impl core::ops::Deref for EF_SBOOT_EN_R { - type Target = crate::FieldReader; + #[doc = "Bit 20"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn ef_cpu1_dis(&self) -> EF_CPU1_DIS_R { + EF_CPU1_DIS_R::new(((self.bits >> 20) & 1) != 0) } -} -#[doc = "Field `ef_sboot_en` writer - "] -pub struct EF_SBOOT_EN_W<'a> { - w: &'a mut W, -} -impl<'a> EF_SBOOT_EN_W<'a> { - #[doc = r"Writes raw bits to the field"] + #[doc = "Bit 21"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 4)) | ((value as u32 & 0x03) << 4); - self.w - } -} -#[doc = "Field `ef_sboot_sign_mode` reader - "] -pub struct EF_SBOOT_SIGN_MODE_R(crate::FieldReader); -impl EF_SBOOT_SIGN_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - EF_SBOOT_SIGN_MODE_R(crate::FieldReader::new(bits)) + pub fn ef_cpu_rst_dbg_dis(&self) -> EF_CPU_RST_DBG_DIS_R { + EF_CPU_RST_DBG_DIS_R::new(((self.bits >> 21) & 1) != 0) } -} -impl core::ops::Deref for EF_SBOOT_SIGN_MODE_R { - type Target = crate::FieldReader; + #[doc = "Bit 22"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn ef_se_dbg_dis(&self) -> EF_SE_DBG_DIS_R { + EF_SE_DBG_DIS_R::new(((self.bits >> 22) & 1) != 0) } -} -#[doc = "Field `ef_sboot_sign_mode` writer - "] -pub struct EF_SBOOT_SIGN_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> EF_SBOOT_SIGN_MODE_W<'a> { - #[doc = r"Writes raw bits to the field"] + #[doc = "Bit 23"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 2)) | ((value as u32 & 0x03) << 2); - self.w - } -} -#[doc = "Field `ef_sf_aes_mode` reader - "] -pub struct EF_SF_AES_MODE_R(crate::FieldReader); -impl EF_SF_AES_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - EF_SF_AES_MODE_R(crate::FieldReader::new(bits)) + pub fn ef_efuse_dbg_dis(&self) -> EF_EFUSE_DBG_DIS_R { + EF_EFUSE_DBG_DIS_R::new(((self.bits >> 23) & 1) != 0) } -} -impl core::ops::Deref for EF_SF_AES_MODE_R { - type Target = crate::FieldReader; + #[doc = "Bits 24:25"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn ef_dbg_jtag_1_dis(&self) -> EF_DBG_JTAG_1_DIS_R { + EF_DBG_JTAG_1_DIS_R::new(((self.bits >> 24) & 3) as u8) } -} -#[doc = "Field `ef_sf_aes_mode` writer - "] -pub struct EF_SF_AES_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> EF_SF_AES_MODE_W<'a> { - #[doc = r"Writes raw bits to the field"] + #[doc = "Bits 26:27"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w + pub fn ef_dbg_jtag_0_dis(&self) -> EF_DBG_JTAG_0_DIS_R { + EF_DBG_JTAG_0_DIS_R::new(((self.bits >> 26) & 3) as u8) } -} -impl R { #[doc = "Bits 28:31"] #[inline(always)] pub fn ef_dbg_mode(&self) -> EF_DBG_MODE_R { EF_DBG_MODE_R::new(((self.bits >> 28) & 0x0f) as u8) } - #[doc = "Bits 26:27"] - #[inline(always)] - pub fn ef_dbg_jtag_0_dis(&self) -> EF_DBG_JTAG_0_DIS_R { - EF_DBG_JTAG_0_DIS_R::new(((self.bits >> 26) & 0x03) as u8) - } - #[doc = "Bits 24:25"] - #[inline(always)] - pub fn ef_dbg_jtag_1_dis(&self) -> EF_DBG_JTAG_1_DIS_R { - EF_DBG_JTAG_1_DIS_R::new(((self.bits >> 24) & 0x03) as u8) - } - #[doc = "Bit 23"] - #[inline(always)] - pub fn ef_efuse_dbg_dis(&self) -> EF_EFUSE_DBG_DIS_R { - EF_EFUSE_DBG_DIS_R::new(((self.bits >> 23) & 0x01) != 0) - } - #[doc = "Bit 22"] - #[inline(always)] - pub fn ef_se_dbg_dis(&self) -> EF_SE_DBG_DIS_R { - EF_SE_DBG_DIS_R::new(((self.bits >> 22) & 0x01) != 0) - } - #[doc = "Bit 21"] - #[inline(always)] - pub fn ef_cpu_rst_dbg_dis(&self) -> EF_CPU_RST_DBG_DIS_R { - EF_CPU_RST_DBG_DIS_R::new(((self.bits >> 21) & 0x01) != 0) - } - #[doc = "Bit 20"] - #[inline(always)] - pub fn ef_cpu1_dis(&self) -> EF_CPU1_DIS_R { - EF_CPU1_DIS_R::new(((self.bits >> 20) & 0x01) != 0) - } - #[doc = "Bit 19"] - #[inline(always)] - pub fn ef_sf_dis(&self) -> EF_SF_DIS_R { - EF_SF_DIS_R::new(((self.bits >> 19) & 0x01) != 0) - } - #[doc = "Bit 18"] - #[inline(always)] - pub fn ef_cam_dis(&self) -> EF_CAM_DIS_R { - EF_CAM_DIS_R::new(((self.bits >> 18) & 0x01) != 0) - } - #[doc = "Bit 17"] - #[inline(always)] - pub fn ef_0_key_enc_en(&self) -> EF_0_KEY_ENC_EN_R { - EF_0_KEY_ENC_EN_R::new(((self.bits >> 17) & 0x01) != 0) - } - #[doc = "Bit 16"] - #[inline(always)] - pub fn ef_wifi_dis(&self) -> EF_WIFI_DIS_R { - EF_WIFI_DIS_R::new(((self.bits >> 16) & 0x01) != 0) - } - #[doc = "Bit 15"] - #[inline(always)] - pub fn ef_ble_dis(&self) -> EF_BLE_DIS_R { - EF_BLE_DIS_R::new(((self.bits >> 15) & 0x01) != 0) - } - #[doc = "Bit 14"] - #[inline(always)] - pub fn ef_sdu_dis(&self) -> EF_SDU_DIS_R { - EF_SDU_DIS_R::new(((self.bits >> 14) & 0x01) != 0) - } - #[doc = "Bits 12:13"] - #[inline(always)] - pub fn ef_sw_usage_1(&self) -> EF_SW_USAGE_1_R { - EF_SW_USAGE_1_R::new(((self.bits >> 12) & 0x03) as u8) - } - #[doc = "Bits 8:11"] - #[inline(always)] - pub fn ef_boot_sel(&self) -> EF_BOOT_SEL_R { - EF_BOOT_SEL_R::new(((self.bits >> 8) & 0x0f) as u8) - } - #[doc = "Bit 7"] - #[inline(always)] - pub fn ef_cpu0_enc_en(&self) -> EF_CPU0_ENC_EN_R { - EF_CPU0_ENC_EN_R::new(((self.bits >> 7) & 0x01) != 0) - } - #[doc = "Bit 6"] - #[inline(always)] - pub fn ef_cpu1_enc_en(&self) -> EF_CPU1_ENC_EN_R { - EF_CPU1_ENC_EN_R::new(((self.bits >> 6) & 0x01) != 0) - } - #[doc = "Bits 4:5"] - #[inline(always)] - pub fn ef_sboot_en(&self) -> EF_SBOOT_EN_R { - EF_SBOOT_EN_R::new(((self.bits >> 4) & 0x03) as u8) - } - #[doc = "Bits 2:3"] - #[inline(always)] - pub fn ef_sboot_sign_mode(&self) -> EF_SBOOT_SIGN_MODE_R { - EF_SBOOT_SIGN_MODE_R::new(((self.bits >> 2) & 0x03) as u8) - } - #[doc = "Bits 0:1"] - #[inline(always)] - pub fn ef_sf_aes_mode(&self) -> EF_SF_AES_MODE_R { - EF_SF_AES_MODE_R::new((self.bits & 0x03) as u8) - } } impl W { - #[doc = "Bits 28:31"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn ef_dbg_mode(&mut self) -> EF_DBG_MODE_W { - EF_DBG_MODE_W { w: self } + #[must_use] + pub fn ef_sf_aes_mode(&mut self) -> EF_SF_AES_MODE_W<0> { + EF_SF_AES_MODE_W::new(self) } - #[doc = "Bits 26:27"] + #[doc = "Bits 2:3"] #[inline(always)] - pub fn ef_dbg_jtag_0_dis(&mut self) -> EF_DBG_JTAG_0_DIS_W { - EF_DBG_JTAG_0_DIS_W { w: self } + #[must_use] + pub fn ef_sboot_sign_mode(&mut self) -> EF_SBOOT_SIGN_MODE_W<2> { + EF_SBOOT_SIGN_MODE_W::new(self) } - #[doc = "Bits 24:25"] + #[doc = "Bits 4:5"] #[inline(always)] - pub fn ef_dbg_jtag_1_dis(&mut self) -> EF_DBG_JTAG_1_DIS_W { - EF_DBG_JTAG_1_DIS_W { w: self } + #[must_use] + pub fn ef_sboot_en(&mut self) -> EF_SBOOT_EN_W<4> { + EF_SBOOT_EN_W::new(self) } - #[doc = "Bit 23"] + #[doc = "Bit 6"] #[inline(always)] - pub fn ef_efuse_dbg_dis(&mut self) -> EF_EFUSE_DBG_DIS_W { - EF_EFUSE_DBG_DIS_W { w: self } + #[must_use] + pub fn ef_cpu1_enc_en(&mut self) -> EF_CPU1_ENC_EN_W<6> { + EF_CPU1_ENC_EN_W::new(self) } - #[doc = "Bit 22"] + #[doc = "Bit 7"] #[inline(always)] - pub fn ef_se_dbg_dis(&mut self) -> EF_SE_DBG_DIS_W { - EF_SE_DBG_DIS_W { w: self } + #[must_use] + pub fn ef_cpu0_enc_en(&mut self) -> EF_CPU0_ENC_EN_W<7> { + EF_CPU0_ENC_EN_W::new(self) } - #[doc = "Bit 21"] + #[doc = "Bits 8:11"] #[inline(always)] - pub fn ef_cpu_rst_dbg_dis(&mut self) -> EF_CPU_RST_DBG_DIS_W { - EF_CPU_RST_DBG_DIS_W { w: self } + #[must_use] + pub fn ef_boot_sel(&mut self) -> EF_BOOT_SEL_W<8> { + EF_BOOT_SEL_W::new(self) } - #[doc = "Bit 20"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn ef_cpu1_dis(&mut self) -> EF_CPU1_DIS_W { - EF_CPU1_DIS_W { w: self } + #[must_use] + pub fn ef_sw_usage_1(&mut self) -> EF_SW_USAGE_1_W<12> { + EF_SW_USAGE_1_W::new(self) } - #[doc = "Bit 19"] + #[doc = "Bit 14"] #[inline(always)] - pub fn ef_sf_dis(&mut self) -> EF_SF_DIS_W { - EF_SF_DIS_W { w: self } + #[must_use] + pub fn ef_sdu_dis(&mut self) -> EF_SDU_DIS_W<14> { + EF_SDU_DIS_W::new(self) } - #[doc = "Bit 18"] + #[doc = "Bit 15"] #[inline(always)] - pub fn ef_cam_dis(&mut self) -> EF_CAM_DIS_W { - EF_CAM_DIS_W { w: self } + #[must_use] + pub fn ef_ble_dis(&mut self) -> EF_BLE_DIS_W<15> { + EF_BLE_DIS_W::new(self) } - #[doc = "Bit 17"] + #[doc = "Bit 16"] #[inline(always)] - pub fn ef_0_key_enc_en(&mut self) -> EF_0_KEY_ENC_EN_W { - EF_0_KEY_ENC_EN_W { w: self } + #[must_use] + pub fn ef_wifi_dis(&mut self) -> EF_WIFI_DIS_W<16> { + EF_WIFI_DIS_W::new(self) } - #[doc = "Bit 16"] + #[doc = "Bit 17"] #[inline(always)] - pub fn ef_wifi_dis(&mut self) -> EF_WIFI_DIS_W { - EF_WIFI_DIS_W { w: self } + #[must_use] + pub fn ef_0_key_enc_en(&mut self) -> EF_0_KEY_ENC_EN_W<17> { + EF_0_KEY_ENC_EN_W::new(self) } - #[doc = "Bit 15"] + #[doc = "Bit 18"] #[inline(always)] - pub fn ef_ble_dis(&mut self) -> EF_BLE_DIS_W { - EF_BLE_DIS_W { w: self } + #[must_use] + pub fn ef_cam_dis(&mut self) -> EF_CAM_DIS_W<18> { + EF_CAM_DIS_W::new(self) } - #[doc = "Bit 14"] + #[doc = "Bit 19"] #[inline(always)] - pub fn ef_sdu_dis(&mut self) -> EF_SDU_DIS_W { - EF_SDU_DIS_W { w: self } + #[must_use] + pub fn ef_sf_dis(&mut self) -> EF_SF_DIS_W<19> { + EF_SF_DIS_W::new(self) } - #[doc = "Bits 12:13"] + #[doc = "Bit 20"] #[inline(always)] - pub fn ef_sw_usage_1(&mut self) -> EF_SW_USAGE_1_W { - EF_SW_USAGE_1_W { w: self } + #[must_use] + pub fn ef_cpu1_dis(&mut self) -> EF_CPU1_DIS_W<20> { + EF_CPU1_DIS_W::new(self) } - #[doc = "Bits 8:11"] + #[doc = "Bit 21"] #[inline(always)] - pub fn ef_boot_sel(&mut self) -> EF_BOOT_SEL_W { - EF_BOOT_SEL_W { w: self } + #[must_use] + pub fn ef_cpu_rst_dbg_dis(&mut self) -> EF_CPU_RST_DBG_DIS_W<21> { + EF_CPU_RST_DBG_DIS_W::new(self) } - #[doc = "Bit 7"] + #[doc = "Bit 22"] #[inline(always)] - pub fn ef_cpu0_enc_en(&mut self) -> EF_CPU0_ENC_EN_W { - EF_CPU0_ENC_EN_W { w: self } + #[must_use] + pub fn ef_se_dbg_dis(&mut self) -> EF_SE_DBG_DIS_W<22> { + EF_SE_DBG_DIS_W::new(self) } - #[doc = "Bit 6"] + #[doc = "Bit 23"] #[inline(always)] - pub fn ef_cpu1_enc_en(&mut self) -> EF_CPU1_ENC_EN_W { - EF_CPU1_ENC_EN_W { w: self } + #[must_use] + pub fn ef_efuse_dbg_dis(&mut self) -> EF_EFUSE_DBG_DIS_W<23> { + EF_EFUSE_DBG_DIS_W::new(self) } - #[doc = "Bits 4:5"] + #[doc = "Bits 24:25"] #[inline(always)] - pub fn ef_sboot_en(&mut self) -> EF_SBOOT_EN_W { - EF_SBOOT_EN_W { w: self } + #[must_use] + pub fn ef_dbg_jtag_1_dis(&mut self) -> EF_DBG_JTAG_1_DIS_W<24> { + EF_DBG_JTAG_1_DIS_W::new(self) } - #[doc = "Bits 2:3"] + #[doc = "Bits 26:27"] #[inline(always)] - pub fn ef_sboot_sign_mode(&mut self) -> EF_SBOOT_SIGN_MODE_W { - EF_SBOOT_SIGN_MODE_W { w: self } + #[must_use] + pub fn ef_dbg_jtag_0_dis(&mut self) -> EF_DBG_JTAG_0_DIS_W<26> { + EF_DBG_JTAG_0_DIS_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bits 28:31"] #[inline(always)] - pub fn ef_sf_aes_mode(&mut self) -> EF_SF_AES_MODE_W { - EF_SF_AES_MODE_W { w: self } + #[must_use] + pub fn ef_dbg_mode(&mut self) -> EF_DBG_MODE_W<28> { + EF_DBG_MODE_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -893,11 +361,10 @@ impl crate::Readable for EF_CFG_0_SPEC { #[doc = "`write(|w| ..)` method takes [ef_cfg_0::W](W) writer structure"] impl crate::Writable for EF_CFG_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_cfg_0 to value 0"] impl crate::Resettable for EF_CFG_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_0/ef_data_0_lock.rs b/src/ef_data_0/ef_data_0_lock.rs index be7afbc..395b497 100644 --- a/src/ef_data_0/ef_data_0_lock.rs +++ b/src/ef_data_0/ef_data_0_lock.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,925 +28,337 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rd_lock_key_slot_5` reader - "] -pub struct RD_LOCK_KEY_SLOT_5_R(crate::FieldReader); -impl RD_LOCK_KEY_SLOT_5_R { - pub(crate) fn new(bits: bool) -> Self { - RD_LOCK_KEY_SLOT_5_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RD_LOCK_KEY_SLOT_5_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rd_lock_key_slot_5` writer - "] -pub struct RD_LOCK_KEY_SLOT_5_W<'a> { - w: &'a mut W, -} -impl<'a> RD_LOCK_KEY_SLOT_5_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 31)) | ((value as u32 & 0x01) << 31); - self.w - } -} -#[doc = "Field `rd_lock_key_slot_4` reader - "] -pub struct RD_LOCK_KEY_SLOT_4_R(crate::FieldReader); -impl RD_LOCK_KEY_SLOT_4_R { - pub(crate) fn new(bits: bool) -> Self { - RD_LOCK_KEY_SLOT_4_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RD_LOCK_KEY_SLOT_4_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rd_lock_key_slot_4` writer - "] -pub struct RD_LOCK_KEY_SLOT_4_W<'a> { - w: &'a mut W, -} -impl<'a> RD_LOCK_KEY_SLOT_4_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 30)) | ((value as u32 & 0x01) << 30); - self.w - } -} -#[doc = "Field `rd_lock_key_slot_3` reader - "] -pub struct RD_LOCK_KEY_SLOT_3_R(crate::FieldReader); -impl RD_LOCK_KEY_SLOT_3_R { - pub(crate) fn new(bits: bool) -> Self { - RD_LOCK_KEY_SLOT_3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RD_LOCK_KEY_SLOT_3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rd_lock_key_slot_3` writer - "] -pub struct RD_LOCK_KEY_SLOT_3_W<'a> { - w: &'a mut W, -} -impl<'a> RD_LOCK_KEY_SLOT_3_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 29)) | ((value as u32 & 0x01) << 29); - self.w - } -} -#[doc = "Field `rd_lock_key_slot_2` reader - "] -pub struct RD_LOCK_KEY_SLOT_2_R(crate::FieldReader); -impl RD_LOCK_KEY_SLOT_2_R { - pub(crate) fn new(bits: bool) -> Self { - RD_LOCK_KEY_SLOT_2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RD_LOCK_KEY_SLOT_2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rd_lock_key_slot_2` writer - "] -pub struct RD_LOCK_KEY_SLOT_2_W<'a> { - w: &'a mut W, -} -impl<'a> RD_LOCK_KEY_SLOT_2_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 28)) | ((value as u32 & 0x01) << 28); - self.w - } -} -#[doc = "Field `rd_lock_key_slot_1` reader - "] -pub struct RD_LOCK_KEY_SLOT_1_R(crate::FieldReader); -impl RD_LOCK_KEY_SLOT_1_R { - pub(crate) fn new(bits: bool) -> Self { - RD_LOCK_KEY_SLOT_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RD_LOCK_KEY_SLOT_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rd_lock_key_slot_1` writer - "] -pub struct RD_LOCK_KEY_SLOT_1_W<'a> { - w: &'a mut W, -} -impl<'a> RD_LOCK_KEY_SLOT_1_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 27)) | ((value as u32 & 0x01) << 27); - self.w - } -} -#[doc = "Field `rd_lock_key_slot_0` reader - "] -pub struct RD_LOCK_KEY_SLOT_0_R(crate::FieldReader); -impl RD_LOCK_KEY_SLOT_0_R { - pub(crate) fn new(bits: bool) -> Self { - RD_LOCK_KEY_SLOT_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RD_LOCK_KEY_SLOT_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rd_lock_key_slot_0` writer - "] -pub struct RD_LOCK_KEY_SLOT_0_W<'a> { - w: &'a mut W, -} -impl<'a> RD_LOCK_KEY_SLOT_0_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 26)) | ((value as u32 & 0x01) << 26); - self.w - } -} -#[doc = "Field `rd_lock_dbg_pwd` reader - "] -pub struct RD_LOCK_DBG_PWD_R(crate::FieldReader); -impl RD_LOCK_DBG_PWD_R { - pub(crate) fn new(bits: bool) -> Self { - RD_LOCK_DBG_PWD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RD_LOCK_DBG_PWD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rd_lock_dbg_pwd` writer - "] -pub struct RD_LOCK_DBG_PWD_W<'a> { - w: &'a mut W, -} -impl<'a> RD_LOCK_DBG_PWD_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 25)) | ((value as u32 & 0x01) << 25); - self.w - } -} -#[doc = "Field `wr_lock_key_slot_5_h` reader - "] -pub struct WR_LOCK_KEY_SLOT_5_H_R(crate::FieldReader); -impl WR_LOCK_KEY_SLOT_5_H_R { - pub(crate) fn new(bits: bool) -> Self { - WR_LOCK_KEY_SLOT_5_H_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for WR_LOCK_KEY_SLOT_5_H_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `wr_lock_key_slot_5_h` writer - "] -pub struct WR_LOCK_KEY_SLOT_5_H_W<'a> { - w: &'a mut W, -} -impl<'a> WR_LOCK_KEY_SLOT_5_H_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24); - self.w - } -} -#[doc = "Field `wr_lock_key_slot_4_h` reader - "] -pub struct WR_LOCK_KEY_SLOT_4_H_R(crate::FieldReader); -impl WR_LOCK_KEY_SLOT_4_H_R { - pub(crate) fn new(bits: bool) -> Self { - WR_LOCK_KEY_SLOT_4_H_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for WR_LOCK_KEY_SLOT_4_H_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `wr_lock_key_slot_4_h` writer - "] -pub struct WR_LOCK_KEY_SLOT_4_H_W<'a> { - w: &'a mut W, -} -impl<'a> WR_LOCK_KEY_SLOT_4_H_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23); - self.w - } -} -#[doc = "Field `wr_lock_key_slot_3` reader - "] -pub struct WR_LOCK_KEY_SLOT_3_R(crate::FieldReader); -impl WR_LOCK_KEY_SLOT_3_R { - pub(crate) fn new(bits: bool) -> Self { - WR_LOCK_KEY_SLOT_3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for WR_LOCK_KEY_SLOT_3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `wr_lock_key_slot_3` writer - "] -pub struct WR_LOCK_KEY_SLOT_3_W<'a> { - w: &'a mut W, -} -impl<'a> WR_LOCK_KEY_SLOT_3_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 22)) | ((value as u32 & 0x01) << 22); - self.w - } -} -#[doc = "Field `wr_lock_key_slot_2` reader - "] -pub struct WR_LOCK_KEY_SLOT_2_R(crate::FieldReader); -impl WR_LOCK_KEY_SLOT_2_R { - pub(crate) fn new(bits: bool) -> Self { - WR_LOCK_KEY_SLOT_2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for WR_LOCK_KEY_SLOT_2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `wr_lock_key_slot_2` writer - "] -pub struct WR_LOCK_KEY_SLOT_2_W<'a> { - w: &'a mut W, -} -impl<'a> WR_LOCK_KEY_SLOT_2_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); - self.w - } -} -#[doc = "Field `wr_lock_key_slot_1` reader - "] -pub struct WR_LOCK_KEY_SLOT_1_R(crate::FieldReader); -impl WR_LOCK_KEY_SLOT_1_R { - pub(crate) fn new(bits: bool) -> Self { - WR_LOCK_KEY_SLOT_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for WR_LOCK_KEY_SLOT_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `wr_lock_key_slot_1` writer - "] -pub struct WR_LOCK_KEY_SLOT_1_W<'a> { - w: &'a mut W, -} -impl<'a> WR_LOCK_KEY_SLOT_1_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w - } -} -#[doc = "Field `wr_lock_key_slot_0` reader - "] -pub struct WR_LOCK_KEY_SLOT_0_R(crate::FieldReader); -impl WR_LOCK_KEY_SLOT_0_R { - pub(crate) fn new(bits: bool) -> Self { - WR_LOCK_KEY_SLOT_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for WR_LOCK_KEY_SLOT_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `wr_lock_key_slot_0` writer - "] -pub struct WR_LOCK_KEY_SLOT_0_W<'a> { - w: &'a mut W, -} -impl<'a> WR_LOCK_KEY_SLOT_0_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 19)) | ((value as u32 & 0x01) << 19); - self.w - } -} -#[doc = "Field `wr_lock_wifi_mac` reader - "] -pub struct WR_LOCK_WIFI_MAC_R(crate::FieldReader); -impl WR_LOCK_WIFI_MAC_R { - pub(crate) fn new(bits: bool) -> Self { - WR_LOCK_WIFI_MAC_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for WR_LOCK_WIFI_MAC_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `wr_lock_wifi_mac` writer - "] -pub struct WR_LOCK_WIFI_MAC_W<'a> { - w: &'a mut W, -} -impl<'a> WR_LOCK_WIFI_MAC_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18); - self.w - } -} -#[doc = "Field `wr_lock_sw_usage_0` reader - "] -pub struct WR_LOCK_SW_USAGE_0_R(crate::FieldReader); -impl WR_LOCK_SW_USAGE_0_R { - pub(crate) fn new(bits: bool) -> Self { - WR_LOCK_SW_USAGE_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for WR_LOCK_SW_USAGE_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `wr_lock_sw_usage_0` writer - "] -pub struct WR_LOCK_SW_USAGE_0_W<'a> { - w: &'a mut W, -} -impl<'a> WR_LOCK_SW_USAGE_0_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w - } -} -#[doc = "Field `wr_lock_dbg_pwd` reader - "] -pub struct WR_LOCK_DBG_PWD_R(crate::FieldReader); -impl WR_LOCK_DBG_PWD_R { - pub(crate) fn new(bits: bool) -> Self { - WR_LOCK_DBG_PWD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for WR_LOCK_DBG_PWD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `wr_lock_dbg_pwd` writer - "] -pub struct WR_LOCK_DBG_PWD_W<'a> { - w: &'a mut W, -} -impl<'a> WR_LOCK_DBG_PWD_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `wr_lock_boot_mode` reader - "] -pub struct WR_LOCK_BOOT_MODE_R(crate::FieldReader); -impl WR_LOCK_BOOT_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - WR_LOCK_BOOT_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for WR_LOCK_BOOT_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `wr_lock_boot_mode` writer - "] -pub struct WR_LOCK_BOOT_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> WR_LOCK_BOOT_MODE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15); - self.w - } -} -#[doc = "Field `wr_lock_key_slot_5_l` reader - "] -pub struct WR_LOCK_KEY_SLOT_5_L_R(crate::FieldReader); -impl WR_LOCK_KEY_SLOT_5_L_R { - pub(crate) fn new(bits: bool) -> Self { - WR_LOCK_KEY_SLOT_5_L_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for WR_LOCK_KEY_SLOT_5_L_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `wr_lock_key_slot_5_l` writer - "] -pub struct WR_LOCK_KEY_SLOT_5_L_W<'a> { - w: &'a mut W, -} -impl<'a> WR_LOCK_KEY_SLOT_5_L_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14); - self.w - } -} -#[doc = "Field `wr_lock_key_slot_4_l` reader - "] -pub struct WR_LOCK_KEY_SLOT_4_L_R(crate::FieldReader); -impl WR_LOCK_KEY_SLOT_4_L_R { - pub(crate) fn new(bits: bool) -> Self { - WR_LOCK_KEY_SLOT_4_L_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for WR_LOCK_KEY_SLOT_4_L_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `wr_lock_key_slot_4_l` writer - "] -pub struct WR_LOCK_KEY_SLOT_4_L_W<'a> { - w: &'a mut W, -} -impl<'a> WR_LOCK_KEY_SLOT_4_L_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13); - self.w - } -} #[doc = "Field `ef_ana_trim_1` reader - "] -pub struct EF_ANA_TRIM_1_R(crate::FieldReader); -impl EF_ANA_TRIM_1_R { - pub(crate) fn new(bits: u16) -> Self { - EF_ANA_TRIM_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_ANA_TRIM_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_ANA_TRIM_1_R = crate::FieldReader; #[doc = "Field `ef_ana_trim_1` writer - "] -pub struct EF_ANA_TRIM_1_W<'a> { - w: &'a mut W, -} -impl<'a> EF_ANA_TRIM_1_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type EF_ANA_TRIM_1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_DATA_0_LOCK_SPEC, u16, u16, 13, O>; +#[doc = "Field `wr_lock_key_slot_4_l` reader - "] +pub type WR_LOCK_KEY_SLOT_4_L_R = crate::BitReader; +#[doc = "Field `wr_lock_key_slot_4_l` writer - "] +pub type WR_LOCK_KEY_SLOT_4_L_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>; +#[doc = "Field `wr_lock_key_slot_5_l` reader - "] +pub type WR_LOCK_KEY_SLOT_5_L_R = crate::BitReader; +#[doc = "Field `wr_lock_key_slot_5_l` writer - "] +pub type WR_LOCK_KEY_SLOT_5_L_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>; +#[doc = "Field `wr_lock_boot_mode` reader - "] +pub type WR_LOCK_BOOT_MODE_R = crate::BitReader; +#[doc = "Field `wr_lock_boot_mode` writer - "] +pub type WR_LOCK_BOOT_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>; +#[doc = "Field `wr_lock_dbg_pwd` reader - "] +pub type WR_LOCK_DBG_PWD_R = crate::BitReader; +#[doc = "Field `wr_lock_dbg_pwd` writer - "] +pub type WR_LOCK_DBG_PWD_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>; +#[doc = "Field `wr_lock_sw_usage_0` reader - "] +pub type WR_LOCK_SW_USAGE_0_R = crate::BitReader; +#[doc = "Field `wr_lock_sw_usage_0` writer - "] +pub type WR_LOCK_SW_USAGE_0_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>; +#[doc = "Field `wr_lock_wifi_mac` reader - "] +pub type WR_LOCK_WIFI_MAC_R = crate::BitReader; +#[doc = "Field `wr_lock_wifi_mac` writer - "] +pub type WR_LOCK_WIFI_MAC_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>; +#[doc = "Field `wr_lock_key_slot_0` reader - "] +pub type WR_LOCK_KEY_SLOT_0_R = crate::BitReader; +#[doc = "Field `wr_lock_key_slot_0` writer - "] +pub type WR_LOCK_KEY_SLOT_0_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>; +#[doc = "Field `wr_lock_key_slot_1` reader - "] +pub type WR_LOCK_KEY_SLOT_1_R = crate::BitReader; +#[doc = "Field `wr_lock_key_slot_1` writer - "] +pub type WR_LOCK_KEY_SLOT_1_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>; +#[doc = "Field `wr_lock_key_slot_2` reader - "] +pub type WR_LOCK_KEY_SLOT_2_R = crate::BitReader; +#[doc = "Field `wr_lock_key_slot_2` writer - "] +pub type WR_LOCK_KEY_SLOT_2_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>; +#[doc = "Field `wr_lock_key_slot_3` reader - "] +pub type WR_LOCK_KEY_SLOT_3_R = crate::BitReader; +#[doc = "Field `wr_lock_key_slot_3` writer - "] +pub type WR_LOCK_KEY_SLOT_3_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>; +#[doc = "Field `wr_lock_key_slot_4_h` reader - "] +pub type WR_LOCK_KEY_SLOT_4_H_R = crate::BitReader; +#[doc = "Field `wr_lock_key_slot_4_h` writer - "] +pub type WR_LOCK_KEY_SLOT_4_H_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>; +#[doc = "Field `wr_lock_key_slot_5_h` reader - "] +pub type WR_LOCK_KEY_SLOT_5_H_R = crate::BitReader; +#[doc = "Field `wr_lock_key_slot_5_h` writer - "] +pub type WR_LOCK_KEY_SLOT_5_H_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>; +#[doc = "Field `rd_lock_dbg_pwd` reader - "] +pub type RD_LOCK_DBG_PWD_R = crate::BitReader; +#[doc = "Field `rd_lock_dbg_pwd` writer - "] +pub type RD_LOCK_DBG_PWD_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>; +#[doc = "Field `rd_lock_key_slot_0` reader - "] +pub type RD_LOCK_KEY_SLOT_0_R = crate::BitReader; +#[doc = "Field `rd_lock_key_slot_0` writer - "] +pub type RD_LOCK_KEY_SLOT_0_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>; +#[doc = "Field `rd_lock_key_slot_1` reader - "] +pub type RD_LOCK_KEY_SLOT_1_R = crate::BitReader; +#[doc = "Field `rd_lock_key_slot_1` writer - "] +pub type RD_LOCK_KEY_SLOT_1_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>; +#[doc = "Field `rd_lock_key_slot_2` reader - "] +pub type RD_LOCK_KEY_SLOT_2_R = crate::BitReader; +#[doc = "Field `rd_lock_key_slot_2` writer - "] +pub type RD_LOCK_KEY_SLOT_2_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>; +#[doc = "Field `rd_lock_key_slot_3` reader - "] +pub type RD_LOCK_KEY_SLOT_3_R = crate::BitReader; +#[doc = "Field `rd_lock_key_slot_3` writer - "] +pub type RD_LOCK_KEY_SLOT_3_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>; +#[doc = "Field `rd_lock_key_slot_4` reader - "] +pub type RD_LOCK_KEY_SLOT_4_R = crate::BitReader; +#[doc = "Field `rd_lock_key_slot_4` writer - "] +pub type RD_LOCK_KEY_SLOT_4_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>; +#[doc = "Field `rd_lock_key_slot_5` reader - "] +pub type RD_LOCK_KEY_SLOT_5_R = crate::BitReader; +#[doc = "Field `rd_lock_key_slot_5` writer - "] +pub type RD_LOCK_KEY_SLOT_5_W<'a, const O: u8> = + crate::BitWriter<'a, u32, EF_DATA_0_LOCK_SPEC, bool, O>; +impl R { + #[doc = "Bits 0:12"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x1fff) | (value as u32 & 0x1fff); - self.w + pub fn ef_ana_trim_1(&self) -> EF_ANA_TRIM_1_R { + EF_ANA_TRIM_1_R::new((self.bits & 0x1fff) as u16) } -} -impl R { - #[doc = "Bit 31"] + #[doc = "Bit 13"] #[inline(always)] - pub fn rd_lock_key_slot_5(&self) -> RD_LOCK_KEY_SLOT_5_R { - RD_LOCK_KEY_SLOT_5_R::new(((self.bits >> 31) & 0x01) != 0) + pub fn wr_lock_key_slot_4_l(&self) -> WR_LOCK_KEY_SLOT_4_L_R { + WR_LOCK_KEY_SLOT_4_L_R::new(((self.bits >> 13) & 1) != 0) } - #[doc = "Bit 30"] + #[doc = "Bit 14"] #[inline(always)] - pub fn rd_lock_key_slot_4(&self) -> RD_LOCK_KEY_SLOT_4_R { - RD_LOCK_KEY_SLOT_4_R::new(((self.bits >> 30) & 0x01) != 0) + pub fn wr_lock_key_slot_5_l(&self) -> WR_LOCK_KEY_SLOT_5_L_R { + WR_LOCK_KEY_SLOT_5_L_R::new(((self.bits >> 14) & 1) != 0) } - #[doc = "Bit 29"] + #[doc = "Bit 15"] #[inline(always)] - pub fn rd_lock_key_slot_3(&self) -> RD_LOCK_KEY_SLOT_3_R { - RD_LOCK_KEY_SLOT_3_R::new(((self.bits >> 29) & 0x01) != 0) + pub fn wr_lock_boot_mode(&self) -> WR_LOCK_BOOT_MODE_R { + WR_LOCK_BOOT_MODE_R::new(((self.bits >> 15) & 1) != 0) } - #[doc = "Bit 28"] + #[doc = "Bit 16"] #[inline(always)] - pub fn rd_lock_key_slot_2(&self) -> RD_LOCK_KEY_SLOT_2_R { - RD_LOCK_KEY_SLOT_2_R::new(((self.bits >> 28) & 0x01) != 0) + pub fn wr_lock_dbg_pwd(&self) -> WR_LOCK_DBG_PWD_R { + WR_LOCK_DBG_PWD_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 27"] + #[doc = "Bit 17"] #[inline(always)] - pub fn rd_lock_key_slot_1(&self) -> RD_LOCK_KEY_SLOT_1_R { - RD_LOCK_KEY_SLOT_1_R::new(((self.bits >> 27) & 0x01) != 0) + pub fn wr_lock_sw_usage_0(&self) -> WR_LOCK_SW_USAGE_0_R { + WR_LOCK_SW_USAGE_0_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bit 26"] + #[doc = "Bit 18"] #[inline(always)] - pub fn rd_lock_key_slot_0(&self) -> RD_LOCK_KEY_SLOT_0_R { - RD_LOCK_KEY_SLOT_0_R::new(((self.bits >> 26) & 0x01) != 0) + pub fn wr_lock_wifi_mac(&self) -> WR_LOCK_WIFI_MAC_R { + WR_LOCK_WIFI_MAC_R::new(((self.bits >> 18) & 1) != 0) } - #[doc = "Bit 25"] + #[doc = "Bit 19"] #[inline(always)] - pub fn rd_lock_dbg_pwd(&self) -> RD_LOCK_DBG_PWD_R { - RD_LOCK_DBG_PWD_R::new(((self.bits >> 25) & 0x01) != 0) + pub fn wr_lock_key_slot_0(&self) -> WR_LOCK_KEY_SLOT_0_R { + WR_LOCK_KEY_SLOT_0_R::new(((self.bits >> 19) & 1) != 0) } - #[doc = "Bit 24"] + #[doc = "Bit 20"] #[inline(always)] - pub fn wr_lock_key_slot_5_h(&self) -> WR_LOCK_KEY_SLOT_5_H_R { - WR_LOCK_KEY_SLOT_5_H_R::new(((self.bits >> 24) & 0x01) != 0) + pub fn wr_lock_key_slot_1(&self) -> WR_LOCK_KEY_SLOT_1_R { + WR_LOCK_KEY_SLOT_1_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bit 23"] + #[doc = "Bit 21"] #[inline(always)] - pub fn wr_lock_key_slot_4_h(&self) -> WR_LOCK_KEY_SLOT_4_H_R { - WR_LOCK_KEY_SLOT_4_H_R::new(((self.bits >> 23) & 0x01) != 0) + pub fn wr_lock_key_slot_2(&self) -> WR_LOCK_KEY_SLOT_2_R { + WR_LOCK_KEY_SLOT_2_R::new(((self.bits >> 21) & 1) != 0) } #[doc = "Bit 22"] #[inline(always)] pub fn wr_lock_key_slot_3(&self) -> WR_LOCK_KEY_SLOT_3_R { - WR_LOCK_KEY_SLOT_3_R::new(((self.bits >> 22) & 0x01) != 0) - } - #[doc = "Bit 21"] - #[inline(always)] - pub fn wr_lock_key_slot_2(&self) -> WR_LOCK_KEY_SLOT_2_R { - WR_LOCK_KEY_SLOT_2_R::new(((self.bits >> 21) & 0x01) != 0) + WR_LOCK_KEY_SLOT_3_R::new(((self.bits >> 22) & 1) != 0) } - #[doc = "Bit 20"] + #[doc = "Bit 23"] #[inline(always)] - pub fn wr_lock_key_slot_1(&self) -> WR_LOCK_KEY_SLOT_1_R { - WR_LOCK_KEY_SLOT_1_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn wr_lock_key_slot_4_h(&self) -> WR_LOCK_KEY_SLOT_4_H_R { + WR_LOCK_KEY_SLOT_4_H_R::new(((self.bits >> 23) & 1) != 0) } - #[doc = "Bit 19"] + #[doc = "Bit 24"] #[inline(always)] - pub fn wr_lock_key_slot_0(&self) -> WR_LOCK_KEY_SLOT_0_R { - WR_LOCK_KEY_SLOT_0_R::new(((self.bits >> 19) & 0x01) != 0) + pub fn wr_lock_key_slot_5_h(&self) -> WR_LOCK_KEY_SLOT_5_H_R { + WR_LOCK_KEY_SLOT_5_H_R::new(((self.bits >> 24) & 1) != 0) } - #[doc = "Bit 18"] + #[doc = "Bit 25"] #[inline(always)] - pub fn wr_lock_wifi_mac(&self) -> WR_LOCK_WIFI_MAC_R { - WR_LOCK_WIFI_MAC_R::new(((self.bits >> 18) & 0x01) != 0) + pub fn rd_lock_dbg_pwd(&self) -> RD_LOCK_DBG_PWD_R { + RD_LOCK_DBG_PWD_R::new(((self.bits >> 25) & 1) != 0) } - #[doc = "Bit 17"] + #[doc = "Bit 26"] #[inline(always)] - pub fn wr_lock_sw_usage_0(&self) -> WR_LOCK_SW_USAGE_0_R { - WR_LOCK_SW_USAGE_0_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn rd_lock_key_slot_0(&self) -> RD_LOCK_KEY_SLOT_0_R { + RD_LOCK_KEY_SLOT_0_R::new(((self.bits >> 26) & 1) != 0) } - #[doc = "Bit 16"] + #[doc = "Bit 27"] #[inline(always)] - pub fn wr_lock_dbg_pwd(&self) -> WR_LOCK_DBG_PWD_R { - WR_LOCK_DBG_PWD_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn rd_lock_key_slot_1(&self) -> RD_LOCK_KEY_SLOT_1_R { + RD_LOCK_KEY_SLOT_1_R::new(((self.bits >> 27) & 1) != 0) } - #[doc = "Bit 15"] + #[doc = "Bit 28"] #[inline(always)] - pub fn wr_lock_boot_mode(&self) -> WR_LOCK_BOOT_MODE_R { - WR_LOCK_BOOT_MODE_R::new(((self.bits >> 15) & 0x01) != 0) + pub fn rd_lock_key_slot_2(&self) -> RD_LOCK_KEY_SLOT_2_R { + RD_LOCK_KEY_SLOT_2_R::new(((self.bits >> 28) & 1) != 0) } - #[doc = "Bit 14"] + #[doc = "Bit 29"] #[inline(always)] - pub fn wr_lock_key_slot_5_l(&self) -> WR_LOCK_KEY_SLOT_5_L_R { - WR_LOCK_KEY_SLOT_5_L_R::new(((self.bits >> 14) & 0x01) != 0) + pub fn rd_lock_key_slot_3(&self) -> RD_LOCK_KEY_SLOT_3_R { + RD_LOCK_KEY_SLOT_3_R::new(((self.bits >> 29) & 1) != 0) } - #[doc = "Bit 13"] + #[doc = "Bit 30"] #[inline(always)] - pub fn wr_lock_key_slot_4_l(&self) -> WR_LOCK_KEY_SLOT_4_L_R { - WR_LOCK_KEY_SLOT_4_L_R::new(((self.bits >> 13) & 0x01) != 0) + pub fn rd_lock_key_slot_4(&self) -> RD_LOCK_KEY_SLOT_4_R { + RD_LOCK_KEY_SLOT_4_R::new(((self.bits >> 30) & 1) != 0) } - #[doc = "Bits 0:12"] + #[doc = "Bit 31"] #[inline(always)] - pub fn ef_ana_trim_1(&self) -> EF_ANA_TRIM_1_R { - EF_ANA_TRIM_1_R::new((self.bits & 0x1fff) as u16) + pub fn rd_lock_key_slot_5(&self) -> RD_LOCK_KEY_SLOT_5_R { + RD_LOCK_KEY_SLOT_5_R::new(((self.bits >> 31) & 1) != 0) } } impl W { - #[doc = "Bit 31"] + #[doc = "Bits 0:12"] #[inline(always)] - pub fn rd_lock_key_slot_5(&mut self) -> RD_LOCK_KEY_SLOT_5_W { - RD_LOCK_KEY_SLOT_5_W { w: self } + #[must_use] + pub fn ef_ana_trim_1(&mut self) -> EF_ANA_TRIM_1_W<0> { + EF_ANA_TRIM_1_W::new(self) } - #[doc = "Bit 30"] + #[doc = "Bit 13"] #[inline(always)] - pub fn rd_lock_key_slot_4(&mut self) -> RD_LOCK_KEY_SLOT_4_W { - RD_LOCK_KEY_SLOT_4_W { w: self } + #[must_use] + pub fn wr_lock_key_slot_4_l(&mut self) -> WR_LOCK_KEY_SLOT_4_L_W<13> { + WR_LOCK_KEY_SLOT_4_L_W::new(self) } - #[doc = "Bit 29"] + #[doc = "Bit 14"] #[inline(always)] - pub fn rd_lock_key_slot_3(&mut self) -> RD_LOCK_KEY_SLOT_3_W { - RD_LOCK_KEY_SLOT_3_W { w: self } + #[must_use] + pub fn wr_lock_key_slot_5_l(&mut self) -> WR_LOCK_KEY_SLOT_5_L_W<14> { + WR_LOCK_KEY_SLOT_5_L_W::new(self) } - #[doc = "Bit 28"] + #[doc = "Bit 15"] #[inline(always)] - pub fn rd_lock_key_slot_2(&mut self) -> RD_LOCK_KEY_SLOT_2_W { - RD_LOCK_KEY_SLOT_2_W { w: self } + #[must_use] + pub fn wr_lock_boot_mode(&mut self) -> WR_LOCK_BOOT_MODE_W<15> { + WR_LOCK_BOOT_MODE_W::new(self) } - #[doc = "Bit 27"] + #[doc = "Bit 16"] #[inline(always)] - pub fn rd_lock_key_slot_1(&mut self) -> RD_LOCK_KEY_SLOT_1_W { - RD_LOCK_KEY_SLOT_1_W { w: self } + #[must_use] + pub fn wr_lock_dbg_pwd(&mut self) -> WR_LOCK_DBG_PWD_W<16> { + WR_LOCK_DBG_PWD_W::new(self) } - #[doc = "Bit 26"] + #[doc = "Bit 17"] #[inline(always)] - pub fn rd_lock_key_slot_0(&mut self) -> RD_LOCK_KEY_SLOT_0_W { - RD_LOCK_KEY_SLOT_0_W { w: self } + #[must_use] + pub fn wr_lock_sw_usage_0(&mut self) -> WR_LOCK_SW_USAGE_0_W<17> { + WR_LOCK_SW_USAGE_0_W::new(self) } - #[doc = "Bit 25"] + #[doc = "Bit 18"] #[inline(always)] - pub fn rd_lock_dbg_pwd(&mut self) -> RD_LOCK_DBG_PWD_W { - RD_LOCK_DBG_PWD_W { w: self } + #[must_use] + pub fn wr_lock_wifi_mac(&mut self) -> WR_LOCK_WIFI_MAC_W<18> { + WR_LOCK_WIFI_MAC_W::new(self) } - #[doc = "Bit 24"] + #[doc = "Bit 19"] #[inline(always)] - pub fn wr_lock_key_slot_5_h(&mut self) -> WR_LOCK_KEY_SLOT_5_H_W { - WR_LOCK_KEY_SLOT_5_H_W { w: self } + #[must_use] + pub fn wr_lock_key_slot_0(&mut self) -> WR_LOCK_KEY_SLOT_0_W<19> { + WR_LOCK_KEY_SLOT_0_W::new(self) } - #[doc = "Bit 23"] + #[doc = "Bit 20"] #[inline(always)] - pub fn wr_lock_key_slot_4_h(&mut self) -> WR_LOCK_KEY_SLOT_4_H_W { - WR_LOCK_KEY_SLOT_4_H_W { w: self } + #[must_use] + pub fn wr_lock_key_slot_1(&mut self) -> WR_LOCK_KEY_SLOT_1_W<20> { + WR_LOCK_KEY_SLOT_1_W::new(self) } - #[doc = "Bit 22"] + #[doc = "Bit 21"] #[inline(always)] - pub fn wr_lock_key_slot_3(&mut self) -> WR_LOCK_KEY_SLOT_3_W { - WR_LOCK_KEY_SLOT_3_W { w: self } + #[must_use] + pub fn wr_lock_key_slot_2(&mut self) -> WR_LOCK_KEY_SLOT_2_W<21> { + WR_LOCK_KEY_SLOT_2_W::new(self) } - #[doc = "Bit 21"] + #[doc = "Bit 22"] #[inline(always)] - pub fn wr_lock_key_slot_2(&mut self) -> WR_LOCK_KEY_SLOT_2_W { - WR_LOCK_KEY_SLOT_2_W { w: self } + #[must_use] + pub fn wr_lock_key_slot_3(&mut self) -> WR_LOCK_KEY_SLOT_3_W<22> { + WR_LOCK_KEY_SLOT_3_W::new(self) } - #[doc = "Bit 20"] + #[doc = "Bit 23"] #[inline(always)] - pub fn wr_lock_key_slot_1(&mut self) -> WR_LOCK_KEY_SLOT_1_W { - WR_LOCK_KEY_SLOT_1_W { w: self } + #[must_use] + pub fn wr_lock_key_slot_4_h(&mut self) -> WR_LOCK_KEY_SLOT_4_H_W<23> { + WR_LOCK_KEY_SLOT_4_H_W::new(self) } - #[doc = "Bit 19"] + #[doc = "Bit 24"] #[inline(always)] - pub fn wr_lock_key_slot_0(&mut self) -> WR_LOCK_KEY_SLOT_0_W { - WR_LOCK_KEY_SLOT_0_W { w: self } + #[must_use] + pub fn wr_lock_key_slot_5_h(&mut self) -> WR_LOCK_KEY_SLOT_5_H_W<24> { + WR_LOCK_KEY_SLOT_5_H_W::new(self) } - #[doc = "Bit 18"] + #[doc = "Bit 25"] #[inline(always)] - pub fn wr_lock_wifi_mac(&mut self) -> WR_LOCK_WIFI_MAC_W { - WR_LOCK_WIFI_MAC_W { w: self } + #[must_use] + pub fn rd_lock_dbg_pwd(&mut self) -> RD_LOCK_DBG_PWD_W<25> { + RD_LOCK_DBG_PWD_W::new(self) } - #[doc = "Bit 17"] + #[doc = "Bit 26"] #[inline(always)] - pub fn wr_lock_sw_usage_0(&mut self) -> WR_LOCK_SW_USAGE_0_W { - WR_LOCK_SW_USAGE_0_W { w: self } + #[must_use] + pub fn rd_lock_key_slot_0(&mut self) -> RD_LOCK_KEY_SLOT_0_W<26> { + RD_LOCK_KEY_SLOT_0_W::new(self) } - #[doc = "Bit 16"] + #[doc = "Bit 27"] #[inline(always)] - pub fn wr_lock_dbg_pwd(&mut self) -> WR_LOCK_DBG_PWD_W { - WR_LOCK_DBG_PWD_W { w: self } + #[must_use] + pub fn rd_lock_key_slot_1(&mut self) -> RD_LOCK_KEY_SLOT_1_W<27> { + RD_LOCK_KEY_SLOT_1_W::new(self) } - #[doc = "Bit 15"] + #[doc = "Bit 28"] #[inline(always)] - pub fn wr_lock_boot_mode(&mut self) -> WR_LOCK_BOOT_MODE_W { - WR_LOCK_BOOT_MODE_W { w: self } + #[must_use] + pub fn rd_lock_key_slot_2(&mut self) -> RD_LOCK_KEY_SLOT_2_W<28> { + RD_LOCK_KEY_SLOT_2_W::new(self) } - #[doc = "Bit 14"] + #[doc = "Bit 29"] #[inline(always)] - pub fn wr_lock_key_slot_5_l(&mut self) -> WR_LOCK_KEY_SLOT_5_L_W { - WR_LOCK_KEY_SLOT_5_L_W { w: self } + #[must_use] + pub fn rd_lock_key_slot_3(&mut self) -> RD_LOCK_KEY_SLOT_3_W<29> { + RD_LOCK_KEY_SLOT_3_W::new(self) } - #[doc = "Bit 13"] + #[doc = "Bit 30"] #[inline(always)] - pub fn wr_lock_key_slot_4_l(&mut self) -> WR_LOCK_KEY_SLOT_4_L_W { - WR_LOCK_KEY_SLOT_4_L_W { w: self } + #[must_use] + pub fn rd_lock_key_slot_4(&mut self) -> RD_LOCK_KEY_SLOT_4_W<30> { + RD_LOCK_KEY_SLOT_4_W::new(self) } - #[doc = "Bits 0:12"] + #[doc = "Bit 31"] #[inline(always)] - pub fn ef_ana_trim_1(&mut self) -> EF_ANA_TRIM_1_W { - EF_ANA_TRIM_1_W { w: self } + #[must_use] + pub fn rd_lock_key_slot_5(&mut self) -> RD_LOCK_KEY_SLOT_5_W<31> { + RD_LOCK_KEY_SLOT_5_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -963,11 +376,10 @@ impl crate::Readable for EF_DATA_0_LOCK_SPEC { #[doc = "`write(|w| ..)` method takes [ef_data_0_lock::W](W) writer structure"] impl crate::Writable for EF_DATA_0_LOCK_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_data_0_lock to value 0"] impl crate::Resettable for EF_DATA_0_LOCK_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_0/ef_dbg_pwd_high.rs b/src/ef_data_0/ef_dbg_pwd_high.rs index 512654a..4a0e0c3 100644 --- a/src/ef_data_0/ef_dbg_pwd_high.rs +++ b/src/ef_data_0/ef_dbg_pwd_high.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `ef_dbg_pwd_high` reader - "] -pub struct EF_DBG_PWD_HIGH_R(crate::FieldReader); -impl EF_DBG_PWD_HIGH_R { - pub(crate) fn new(bits: u32) -> Self { - EF_DBG_PWD_HIGH_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_DBG_PWD_HIGH_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_DBG_PWD_HIGH_R = crate::FieldReader; #[doc = "Field `ef_dbg_pwd_high` writer - "] -pub struct EF_DBG_PWD_HIGH_W<'a> { - w: &'a mut W, -} -impl<'a> EF_DBG_PWD_HIGH_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type EF_DBG_PWD_HIGH_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_DBG_PWD_HIGH_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_dbg_pwd_high(&self) -> EF_DBG_PWD_HIGH_R { - EF_DBG_PWD_HIGH_R::new((self.bits & 0xffff_ffff) as u32) + EF_DBG_PWD_HIGH_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn ef_dbg_pwd_high(&mut self) -> EF_DBG_PWD_HIGH_W { - EF_DBG_PWD_HIGH_W { w: self } + #[must_use] + pub fn ef_dbg_pwd_high(&mut self) -> EF_DBG_PWD_HIGH_W<0> { + EF_DBG_PWD_HIGH_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for EF_DBG_PWD_HIGH_SPEC { #[doc = "`write(|w| ..)` method takes [ef_dbg_pwd_high::W](W) writer structure"] impl crate::Writable for EF_DBG_PWD_HIGH_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_dbg_pwd_high to value 0"] impl crate::Resettable for EF_DBG_PWD_HIGH_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_0/ef_dbg_pwd_low.rs b/src/ef_data_0/ef_dbg_pwd_low.rs index 99268f2..e1ccb94 100644 --- a/src/ef_data_0/ef_dbg_pwd_low.rs +++ b/src/ef_data_0/ef_dbg_pwd_low.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `ef_dbg_pwd_low` reader - "] -pub struct EF_DBG_PWD_LOW_R(crate::FieldReader); -impl EF_DBG_PWD_LOW_R { - pub(crate) fn new(bits: u32) -> Self { - EF_DBG_PWD_LOW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_DBG_PWD_LOW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_DBG_PWD_LOW_R = crate::FieldReader; #[doc = "Field `ef_dbg_pwd_low` writer - "] -pub struct EF_DBG_PWD_LOW_W<'a> { - w: &'a mut W, -} -impl<'a> EF_DBG_PWD_LOW_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type EF_DBG_PWD_LOW_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_DBG_PWD_LOW_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_dbg_pwd_low(&self) -> EF_DBG_PWD_LOW_R { - EF_DBG_PWD_LOW_R::new((self.bits & 0xffff_ffff) as u32) + EF_DBG_PWD_LOW_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn ef_dbg_pwd_low(&mut self) -> EF_DBG_PWD_LOW_W { - EF_DBG_PWD_LOW_W { w: self } + #[must_use] + pub fn ef_dbg_pwd_low(&mut self) -> EF_DBG_PWD_LOW_W<0> { + EF_DBG_PWD_LOW_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for EF_DBG_PWD_LOW_SPEC { #[doc = "`write(|w| ..)` method takes [ef_dbg_pwd_low::W](W) writer structure"] impl crate::Writable for EF_DBG_PWD_LOW_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_dbg_pwd_low to value 0"] impl crate::Resettable for EF_DBG_PWD_LOW_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_0/ef_key_slot_0_w0.rs b/src/ef_data_0/ef_key_slot_0_w0.rs index 834d8c9..6f0ec33 100644 --- a/src/ef_data_0/ef_key_slot_0_w0.rs +++ b/src/ef_data_0/ef_key_slot_0_w0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `ef_key_slot_0_w0` reader - "] -pub struct EF_KEY_SLOT_0_W0_R(crate::FieldReader); -impl EF_KEY_SLOT_0_W0_R { - pub(crate) fn new(bits: u32) -> Self { - EF_KEY_SLOT_0_W0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_KEY_SLOT_0_W0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_KEY_SLOT_0_W0_R = crate::FieldReader; #[doc = "Field `ef_key_slot_0_w0` writer - "] -pub struct EF_KEY_SLOT_0_W0_W<'a> { - w: &'a mut W, -} -impl<'a> EF_KEY_SLOT_0_W0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type EF_KEY_SLOT_0_W0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_KEY_SLOT_0_W0_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_key_slot_0_w0(&self) -> EF_KEY_SLOT_0_W0_R { - EF_KEY_SLOT_0_W0_R::new((self.bits & 0xffff_ffff) as u32) + EF_KEY_SLOT_0_W0_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn ef_key_slot_0_w0(&mut self) -> EF_KEY_SLOT_0_W0_W { - EF_KEY_SLOT_0_W0_W { w: self } + #[must_use] + pub fn ef_key_slot_0_w0(&mut self) -> EF_KEY_SLOT_0_W0_W<0> { + EF_KEY_SLOT_0_W0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for EF_KEY_SLOT_0_W0_SPEC { #[doc = "`write(|w| ..)` method takes [ef_key_slot_0_w0::W](W) writer structure"] impl crate::Writable for EF_KEY_SLOT_0_W0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_key_slot_0_w0 to value 0"] impl crate::Resettable for EF_KEY_SLOT_0_W0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_0/ef_key_slot_0_w1.rs b/src/ef_data_0/ef_key_slot_0_w1.rs index e69f491..f919c4d 100644 --- a/src/ef_data_0/ef_key_slot_0_w1.rs +++ b/src/ef_data_0/ef_key_slot_0_w1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `ef_key_slot_0_w1` reader - "] -pub struct EF_KEY_SLOT_0_W1_R(crate::FieldReader); -impl EF_KEY_SLOT_0_W1_R { - pub(crate) fn new(bits: u32) -> Self { - EF_KEY_SLOT_0_W1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_KEY_SLOT_0_W1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_KEY_SLOT_0_W1_R = crate::FieldReader; #[doc = "Field `ef_key_slot_0_w1` writer - "] -pub struct EF_KEY_SLOT_0_W1_W<'a> { - w: &'a mut W, -} -impl<'a> EF_KEY_SLOT_0_W1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type EF_KEY_SLOT_0_W1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_KEY_SLOT_0_W1_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_key_slot_0_w1(&self) -> EF_KEY_SLOT_0_W1_R { - EF_KEY_SLOT_0_W1_R::new((self.bits & 0xffff_ffff) as u32) + EF_KEY_SLOT_0_W1_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn ef_key_slot_0_w1(&mut self) -> EF_KEY_SLOT_0_W1_W { - EF_KEY_SLOT_0_W1_W { w: self } + #[must_use] + pub fn ef_key_slot_0_w1(&mut self) -> EF_KEY_SLOT_0_W1_W<0> { + EF_KEY_SLOT_0_W1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for EF_KEY_SLOT_0_W1_SPEC { #[doc = "`write(|w| ..)` method takes [ef_key_slot_0_w1::W](W) writer structure"] impl crate::Writable for EF_KEY_SLOT_0_W1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_key_slot_0_w1 to value 0"] impl crate::Resettable for EF_KEY_SLOT_0_W1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_0/ef_key_slot_0_w2.rs b/src/ef_data_0/ef_key_slot_0_w2.rs index 5410d6d..d486728 100644 --- a/src/ef_data_0/ef_key_slot_0_w2.rs +++ b/src/ef_data_0/ef_key_slot_0_w2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `ef_key_slot_0_w2` reader - "] -pub struct EF_KEY_SLOT_0_W2_R(crate::FieldReader); -impl EF_KEY_SLOT_0_W2_R { - pub(crate) fn new(bits: u32) -> Self { - EF_KEY_SLOT_0_W2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_KEY_SLOT_0_W2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_KEY_SLOT_0_W2_R = crate::FieldReader; #[doc = "Field `ef_key_slot_0_w2` writer - "] -pub struct EF_KEY_SLOT_0_W2_W<'a> { - w: &'a mut W, -} -impl<'a> EF_KEY_SLOT_0_W2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type EF_KEY_SLOT_0_W2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_KEY_SLOT_0_W2_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_key_slot_0_w2(&self) -> EF_KEY_SLOT_0_W2_R { - EF_KEY_SLOT_0_W2_R::new((self.bits & 0xffff_ffff) as u32) + EF_KEY_SLOT_0_W2_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn ef_key_slot_0_w2(&mut self) -> EF_KEY_SLOT_0_W2_W { - EF_KEY_SLOT_0_W2_W { w: self } + #[must_use] + pub fn ef_key_slot_0_w2(&mut self) -> EF_KEY_SLOT_0_W2_W<0> { + EF_KEY_SLOT_0_W2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for EF_KEY_SLOT_0_W2_SPEC { #[doc = "`write(|w| ..)` method takes [ef_key_slot_0_w2::W](W) writer structure"] impl crate::Writable for EF_KEY_SLOT_0_W2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_key_slot_0_w2 to value 0"] impl crate::Resettable for EF_KEY_SLOT_0_W2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_0/ef_key_slot_0_w3.rs b/src/ef_data_0/ef_key_slot_0_w3.rs index 9651d74..a52218a 100644 --- a/src/ef_data_0/ef_key_slot_0_w3.rs +++ b/src/ef_data_0/ef_key_slot_0_w3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `ef_key_slot_0_w3` reader - "] -pub struct EF_KEY_SLOT_0_W3_R(crate::FieldReader); -impl EF_KEY_SLOT_0_W3_R { - pub(crate) fn new(bits: u32) -> Self { - EF_KEY_SLOT_0_W3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_KEY_SLOT_0_W3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_KEY_SLOT_0_W3_R = crate::FieldReader; #[doc = "Field `ef_key_slot_0_w3` writer - "] -pub struct EF_KEY_SLOT_0_W3_W<'a> { - w: &'a mut W, -} -impl<'a> EF_KEY_SLOT_0_W3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type EF_KEY_SLOT_0_W3_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_KEY_SLOT_0_W3_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_key_slot_0_w3(&self) -> EF_KEY_SLOT_0_W3_R { - EF_KEY_SLOT_0_W3_R::new((self.bits & 0xffff_ffff) as u32) + EF_KEY_SLOT_0_W3_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn ef_key_slot_0_w3(&mut self) -> EF_KEY_SLOT_0_W3_W { - EF_KEY_SLOT_0_W3_W { w: self } + #[must_use] + pub fn ef_key_slot_0_w3(&mut self) -> EF_KEY_SLOT_0_W3_W<0> { + EF_KEY_SLOT_0_W3_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for EF_KEY_SLOT_0_W3_SPEC { #[doc = "`write(|w| ..)` method takes [ef_key_slot_0_w3::W](W) writer structure"] impl crate::Writable for EF_KEY_SLOT_0_W3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_key_slot_0_w3 to value 0"] impl crate::Resettable for EF_KEY_SLOT_0_W3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_0/ef_key_slot_1_w0.rs b/src/ef_data_0/ef_key_slot_1_w0.rs index 98e8e76..57849ba 100644 --- a/src/ef_data_0/ef_key_slot_1_w0.rs +++ b/src/ef_data_0/ef_key_slot_1_w0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `ef_key_slot_1_w0` reader - "] -pub struct EF_KEY_SLOT_1_W0_R(crate::FieldReader); -impl EF_KEY_SLOT_1_W0_R { - pub(crate) fn new(bits: u32) -> Self { - EF_KEY_SLOT_1_W0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_KEY_SLOT_1_W0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_KEY_SLOT_1_W0_R = crate::FieldReader; #[doc = "Field `ef_key_slot_1_w0` writer - "] -pub struct EF_KEY_SLOT_1_W0_W<'a> { - w: &'a mut W, -} -impl<'a> EF_KEY_SLOT_1_W0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type EF_KEY_SLOT_1_W0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_KEY_SLOT_1_W0_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_key_slot_1_w0(&self) -> EF_KEY_SLOT_1_W0_R { - EF_KEY_SLOT_1_W0_R::new((self.bits & 0xffff_ffff) as u32) + EF_KEY_SLOT_1_W0_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn ef_key_slot_1_w0(&mut self) -> EF_KEY_SLOT_1_W0_W { - EF_KEY_SLOT_1_W0_W { w: self } + #[must_use] + pub fn ef_key_slot_1_w0(&mut self) -> EF_KEY_SLOT_1_W0_W<0> { + EF_KEY_SLOT_1_W0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for EF_KEY_SLOT_1_W0_SPEC { #[doc = "`write(|w| ..)` method takes [ef_key_slot_1_w0::W](W) writer structure"] impl crate::Writable for EF_KEY_SLOT_1_W0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_key_slot_1_w0 to value 0"] impl crate::Resettable for EF_KEY_SLOT_1_W0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_0/ef_key_slot_1_w1.rs b/src/ef_data_0/ef_key_slot_1_w1.rs index 4cfe33d..41b1752 100644 --- a/src/ef_data_0/ef_key_slot_1_w1.rs +++ b/src/ef_data_0/ef_key_slot_1_w1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `ef_key_slot_1_w1` reader - "] -pub struct EF_KEY_SLOT_1_W1_R(crate::FieldReader); -impl EF_KEY_SLOT_1_W1_R { - pub(crate) fn new(bits: u32) -> Self { - EF_KEY_SLOT_1_W1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_KEY_SLOT_1_W1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_KEY_SLOT_1_W1_R = crate::FieldReader; #[doc = "Field `ef_key_slot_1_w1` writer - "] -pub struct EF_KEY_SLOT_1_W1_W<'a> { - w: &'a mut W, -} -impl<'a> EF_KEY_SLOT_1_W1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type EF_KEY_SLOT_1_W1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_KEY_SLOT_1_W1_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_key_slot_1_w1(&self) -> EF_KEY_SLOT_1_W1_R { - EF_KEY_SLOT_1_W1_R::new((self.bits & 0xffff_ffff) as u32) + EF_KEY_SLOT_1_W1_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn ef_key_slot_1_w1(&mut self) -> EF_KEY_SLOT_1_W1_W { - EF_KEY_SLOT_1_W1_W { w: self } + #[must_use] + pub fn ef_key_slot_1_w1(&mut self) -> EF_KEY_SLOT_1_W1_W<0> { + EF_KEY_SLOT_1_W1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for EF_KEY_SLOT_1_W1_SPEC { #[doc = "`write(|w| ..)` method takes [ef_key_slot_1_w1::W](W) writer structure"] impl crate::Writable for EF_KEY_SLOT_1_W1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_key_slot_1_w1 to value 0"] impl crate::Resettable for EF_KEY_SLOT_1_W1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_0/ef_key_slot_1_w2.rs b/src/ef_data_0/ef_key_slot_1_w2.rs index b938e4b..2cc0121 100644 --- a/src/ef_data_0/ef_key_slot_1_w2.rs +++ b/src/ef_data_0/ef_key_slot_1_w2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `ef_key_slot_1_w2` reader - "] -pub struct EF_KEY_SLOT_1_W2_R(crate::FieldReader); -impl EF_KEY_SLOT_1_W2_R { - pub(crate) fn new(bits: u32) -> Self { - EF_KEY_SLOT_1_W2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_KEY_SLOT_1_W2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_KEY_SLOT_1_W2_R = crate::FieldReader; #[doc = "Field `ef_key_slot_1_w2` writer - "] -pub struct EF_KEY_SLOT_1_W2_W<'a> { - w: &'a mut W, -} -impl<'a> EF_KEY_SLOT_1_W2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type EF_KEY_SLOT_1_W2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_KEY_SLOT_1_W2_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_key_slot_1_w2(&self) -> EF_KEY_SLOT_1_W2_R { - EF_KEY_SLOT_1_W2_R::new((self.bits & 0xffff_ffff) as u32) + EF_KEY_SLOT_1_W2_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn ef_key_slot_1_w2(&mut self) -> EF_KEY_SLOT_1_W2_W { - EF_KEY_SLOT_1_W2_W { w: self } + #[must_use] + pub fn ef_key_slot_1_w2(&mut self) -> EF_KEY_SLOT_1_W2_W<0> { + EF_KEY_SLOT_1_W2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for EF_KEY_SLOT_1_W2_SPEC { #[doc = "`write(|w| ..)` method takes [ef_key_slot_1_w2::W](W) writer structure"] impl crate::Writable for EF_KEY_SLOT_1_W2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_key_slot_1_w2 to value 0"] impl crate::Resettable for EF_KEY_SLOT_1_W2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_0/ef_key_slot_1_w3.rs b/src/ef_data_0/ef_key_slot_1_w3.rs index 0ee6e62..2be5332 100644 --- a/src/ef_data_0/ef_key_slot_1_w3.rs +++ b/src/ef_data_0/ef_key_slot_1_w3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `ef_key_slot_1_w3` reader - "] -pub struct EF_KEY_SLOT_1_W3_R(crate::FieldReader); -impl EF_KEY_SLOT_1_W3_R { - pub(crate) fn new(bits: u32) -> Self { - EF_KEY_SLOT_1_W3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_KEY_SLOT_1_W3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_KEY_SLOT_1_W3_R = crate::FieldReader; #[doc = "Field `ef_key_slot_1_w3` writer - "] -pub struct EF_KEY_SLOT_1_W3_W<'a> { - w: &'a mut W, -} -impl<'a> EF_KEY_SLOT_1_W3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type EF_KEY_SLOT_1_W3_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_KEY_SLOT_1_W3_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_key_slot_1_w3(&self) -> EF_KEY_SLOT_1_W3_R { - EF_KEY_SLOT_1_W3_R::new((self.bits & 0xffff_ffff) as u32) + EF_KEY_SLOT_1_W3_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn ef_key_slot_1_w3(&mut self) -> EF_KEY_SLOT_1_W3_W { - EF_KEY_SLOT_1_W3_W { w: self } + #[must_use] + pub fn ef_key_slot_1_w3(&mut self) -> EF_KEY_SLOT_1_W3_W<0> { + EF_KEY_SLOT_1_W3_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for EF_KEY_SLOT_1_W3_SPEC { #[doc = "`write(|w| ..)` method takes [ef_key_slot_1_w3::W](W) writer structure"] impl crate::Writable for EF_KEY_SLOT_1_W3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_key_slot_1_w3 to value 0"] impl crate::Resettable for EF_KEY_SLOT_1_W3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_0/ef_key_slot_2_w0.rs b/src/ef_data_0/ef_key_slot_2_w0.rs index b60873b..1a29960 100644 --- a/src/ef_data_0/ef_key_slot_2_w0.rs +++ b/src/ef_data_0/ef_key_slot_2_w0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `ef_key_slot_2_w0` reader - "] -pub struct EF_KEY_SLOT_2_W0_R(crate::FieldReader); -impl EF_KEY_SLOT_2_W0_R { - pub(crate) fn new(bits: u32) -> Self { - EF_KEY_SLOT_2_W0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_KEY_SLOT_2_W0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_KEY_SLOT_2_W0_R = crate::FieldReader; #[doc = "Field `ef_key_slot_2_w0` writer - "] -pub struct EF_KEY_SLOT_2_W0_W<'a> { - w: &'a mut W, -} -impl<'a> EF_KEY_SLOT_2_W0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type EF_KEY_SLOT_2_W0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_KEY_SLOT_2_W0_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_key_slot_2_w0(&self) -> EF_KEY_SLOT_2_W0_R { - EF_KEY_SLOT_2_W0_R::new((self.bits & 0xffff_ffff) as u32) + EF_KEY_SLOT_2_W0_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn ef_key_slot_2_w0(&mut self) -> EF_KEY_SLOT_2_W0_W { - EF_KEY_SLOT_2_W0_W { w: self } + #[must_use] + pub fn ef_key_slot_2_w0(&mut self) -> EF_KEY_SLOT_2_W0_W<0> { + EF_KEY_SLOT_2_W0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for EF_KEY_SLOT_2_W0_SPEC { #[doc = "`write(|w| ..)` method takes [ef_key_slot_2_w0::W](W) writer structure"] impl crate::Writable for EF_KEY_SLOT_2_W0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_key_slot_2_w0 to value 0"] impl crate::Resettable for EF_KEY_SLOT_2_W0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_0/ef_key_slot_2_w1.rs b/src/ef_data_0/ef_key_slot_2_w1.rs index 9443889..d4802b0 100644 --- a/src/ef_data_0/ef_key_slot_2_w1.rs +++ b/src/ef_data_0/ef_key_slot_2_w1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `ef_key_slot_2_w1` reader - "] -pub struct EF_KEY_SLOT_2_W1_R(crate::FieldReader); -impl EF_KEY_SLOT_2_W1_R { - pub(crate) fn new(bits: u32) -> Self { - EF_KEY_SLOT_2_W1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_KEY_SLOT_2_W1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_KEY_SLOT_2_W1_R = crate::FieldReader; #[doc = "Field `ef_key_slot_2_w1` writer - "] -pub struct EF_KEY_SLOT_2_W1_W<'a> { - w: &'a mut W, -} -impl<'a> EF_KEY_SLOT_2_W1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type EF_KEY_SLOT_2_W1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_KEY_SLOT_2_W1_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_key_slot_2_w1(&self) -> EF_KEY_SLOT_2_W1_R { - EF_KEY_SLOT_2_W1_R::new((self.bits & 0xffff_ffff) as u32) + EF_KEY_SLOT_2_W1_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn ef_key_slot_2_w1(&mut self) -> EF_KEY_SLOT_2_W1_W { - EF_KEY_SLOT_2_W1_W { w: self } + #[must_use] + pub fn ef_key_slot_2_w1(&mut self) -> EF_KEY_SLOT_2_W1_W<0> { + EF_KEY_SLOT_2_W1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for EF_KEY_SLOT_2_W1_SPEC { #[doc = "`write(|w| ..)` method takes [ef_key_slot_2_w1::W](W) writer structure"] impl crate::Writable for EF_KEY_SLOT_2_W1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_key_slot_2_w1 to value 0"] impl crate::Resettable for EF_KEY_SLOT_2_W1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_0/ef_key_slot_2_w2.rs b/src/ef_data_0/ef_key_slot_2_w2.rs index de4a71a..e47a71c 100644 --- a/src/ef_data_0/ef_key_slot_2_w2.rs +++ b/src/ef_data_0/ef_key_slot_2_w2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `ef_key_slot_2_w2` reader - "] -pub struct EF_KEY_SLOT_2_W2_R(crate::FieldReader); -impl EF_KEY_SLOT_2_W2_R { - pub(crate) fn new(bits: u32) -> Self { - EF_KEY_SLOT_2_W2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_KEY_SLOT_2_W2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_KEY_SLOT_2_W2_R = crate::FieldReader; #[doc = "Field `ef_key_slot_2_w2` writer - "] -pub struct EF_KEY_SLOT_2_W2_W<'a> { - w: &'a mut W, -} -impl<'a> EF_KEY_SLOT_2_W2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type EF_KEY_SLOT_2_W2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_KEY_SLOT_2_W2_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_key_slot_2_w2(&self) -> EF_KEY_SLOT_2_W2_R { - EF_KEY_SLOT_2_W2_R::new((self.bits & 0xffff_ffff) as u32) + EF_KEY_SLOT_2_W2_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn ef_key_slot_2_w2(&mut self) -> EF_KEY_SLOT_2_W2_W { - EF_KEY_SLOT_2_W2_W { w: self } + #[must_use] + pub fn ef_key_slot_2_w2(&mut self) -> EF_KEY_SLOT_2_W2_W<0> { + EF_KEY_SLOT_2_W2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for EF_KEY_SLOT_2_W2_SPEC { #[doc = "`write(|w| ..)` method takes [ef_key_slot_2_w2::W](W) writer structure"] impl crate::Writable for EF_KEY_SLOT_2_W2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_key_slot_2_w2 to value 0"] impl crate::Resettable for EF_KEY_SLOT_2_W2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_0/ef_key_slot_2_w3.rs b/src/ef_data_0/ef_key_slot_2_w3.rs index 380dd74..884c4f0 100644 --- a/src/ef_data_0/ef_key_slot_2_w3.rs +++ b/src/ef_data_0/ef_key_slot_2_w3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `ef_key_slot_2_w3` reader - "] -pub struct EF_KEY_SLOT_2_W3_R(crate::FieldReader); -impl EF_KEY_SLOT_2_W3_R { - pub(crate) fn new(bits: u32) -> Self { - EF_KEY_SLOT_2_W3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_KEY_SLOT_2_W3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_KEY_SLOT_2_W3_R = crate::FieldReader; #[doc = "Field `ef_key_slot_2_w3` writer - "] -pub struct EF_KEY_SLOT_2_W3_W<'a> { - w: &'a mut W, -} -impl<'a> EF_KEY_SLOT_2_W3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type EF_KEY_SLOT_2_W3_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_KEY_SLOT_2_W3_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_key_slot_2_w3(&self) -> EF_KEY_SLOT_2_W3_R { - EF_KEY_SLOT_2_W3_R::new((self.bits & 0xffff_ffff) as u32) + EF_KEY_SLOT_2_W3_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn ef_key_slot_2_w3(&mut self) -> EF_KEY_SLOT_2_W3_W { - EF_KEY_SLOT_2_W3_W { w: self } + #[must_use] + pub fn ef_key_slot_2_w3(&mut self) -> EF_KEY_SLOT_2_W3_W<0> { + EF_KEY_SLOT_2_W3_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for EF_KEY_SLOT_2_W3_SPEC { #[doc = "`write(|w| ..)` method takes [ef_key_slot_2_w3::W](W) writer structure"] impl crate::Writable for EF_KEY_SLOT_2_W3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_key_slot_2_w3 to value 0"] impl crate::Resettable for EF_KEY_SLOT_2_W3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_0/ef_key_slot_3_w0.rs b/src/ef_data_0/ef_key_slot_3_w0.rs index 22fa620..9ebd37f 100644 --- a/src/ef_data_0/ef_key_slot_3_w0.rs +++ b/src/ef_data_0/ef_key_slot_3_w0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `ef_key_slot_3_w0` reader - "] -pub struct EF_KEY_SLOT_3_W0_R(crate::FieldReader); -impl EF_KEY_SLOT_3_W0_R { - pub(crate) fn new(bits: u32) -> Self { - EF_KEY_SLOT_3_W0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_KEY_SLOT_3_W0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_KEY_SLOT_3_W0_R = crate::FieldReader; #[doc = "Field `ef_key_slot_3_w0` writer - "] -pub struct EF_KEY_SLOT_3_W0_W<'a> { - w: &'a mut W, -} -impl<'a> EF_KEY_SLOT_3_W0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type EF_KEY_SLOT_3_W0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_KEY_SLOT_3_W0_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_key_slot_3_w0(&self) -> EF_KEY_SLOT_3_W0_R { - EF_KEY_SLOT_3_W0_R::new((self.bits & 0xffff_ffff) as u32) + EF_KEY_SLOT_3_W0_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn ef_key_slot_3_w0(&mut self) -> EF_KEY_SLOT_3_W0_W { - EF_KEY_SLOT_3_W0_W { w: self } + #[must_use] + pub fn ef_key_slot_3_w0(&mut self) -> EF_KEY_SLOT_3_W0_W<0> { + EF_KEY_SLOT_3_W0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for EF_KEY_SLOT_3_W0_SPEC { #[doc = "`write(|w| ..)` method takes [ef_key_slot_3_w0::W](W) writer structure"] impl crate::Writable for EF_KEY_SLOT_3_W0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_key_slot_3_w0 to value 0"] impl crate::Resettable for EF_KEY_SLOT_3_W0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_0/ef_key_slot_3_w1.rs b/src/ef_data_0/ef_key_slot_3_w1.rs index 2ce4c88..bbe3864 100644 --- a/src/ef_data_0/ef_key_slot_3_w1.rs +++ b/src/ef_data_0/ef_key_slot_3_w1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `ef_key_slot_3_w1` reader - "] -pub struct EF_KEY_SLOT_3_W1_R(crate::FieldReader); -impl EF_KEY_SLOT_3_W1_R { - pub(crate) fn new(bits: u32) -> Self { - EF_KEY_SLOT_3_W1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_KEY_SLOT_3_W1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_KEY_SLOT_3_W1_R = crate::FieldReader; #[doc = "Field `ef_key_slot_3_w1` writer - "] -pub struct EF_KEY_SLOT_3_W1_W<'a> { - w: &'a mut W, -} -impl<'a> EF_KEY_SLOT_3_W1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type EF_KEY_SLOT_3_W1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_KEY_SLOT_3_W1_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_key_slot_3_w1(&self) -> EF_KEY_SLOT_3_W1_R { - EF_KEY_SLOT_3_W1_R::new((self.bits & 0xffff_ffff) as u32) + EF_KEY_SLOT_3_W1_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn ef_key_slot_3_w1(&mut self) -> EF_KEY_SLOT_3_W1_W { - EF_KEY_SLOT_3_W1_W { w: self } + #[must_use] + pub fn ef_key_slot_3_w1(&mut self) -> EF_KEY_SLOT_3_W1_W<0> { + EF_KEY_SLOT_3_W1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for EF_KEY_SLOT_3_W1_SPEC { #[doc = "`write(|w| ..)` method takes [ef_key_slot_3_w1::W](W) writer structure"] impl crate::Writable for EF_KEY_SLOT_3_W1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_key_slot_3_w1 to value 0"] impl crate::Resettable for EF_KEY_SLOT_3_W1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_0/ef_key_slot_3_w2.rs b/src/ef_data_0/ef_key_slot_3_w2.rs index 5f40a4f..5348e24 100644 --- a/src/ef_data_0/ef_key_slot_3_w2.rs +++ b/src/ef_data_0/ef_key_slot_3_w2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `ef_key_slot_3_w2` reader - "] -pub struct EF_KEY_SLOT_3_W2_R(crate::FieldReader); -impl EF_KEY_SLOT_3_W2_R { - pub(crate) fn new(bits: u32) -> Self { - EF_KEY_SLOT_3_W2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_KEY_SLOT_3_W2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_KEY_SLOT_3_W2_R = crate::FieldReader; #[doc = "Field `ef_key_slot_3_w2` writer - "] -pub struct EF_KEY_SLOT_3_W2_W<'a> { - w: &'a mut W, -} -impl<'a> EF_KEY_SLOT_3_W2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type EF_KEY_SLOT_3_W2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_KEY_SLOT_3_W2_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_key_slot_3_w2(&self) -> EF_KEY_SLOT_3_W2_R { - EF_KEY_SLOT_3_W2_R::new((self.bits & 0xffff_ffff) as u32) + EF_KEY_SLOT_3_W2_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn ef_key_slot_3_w2(&mut self) -> EF_KEY_SLOT_3_W2_W { - EF_KEY_SLOT_3_W2_W { w: self } + #[must_use] + pub fn ef_key_slot_3_w2(&mut self) -> EF_KEY_SLOT_3_W2_W<0> { + EF_KEY_SLOT_3_W2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for EF_KEY_SLOT_3_W2_SPEC { #[doc = "`write(|w| ..)` method takes [ef_key_slot_3_w2::W](W) writer structure"] impl crate::Writable for EF_KEY_SLOT_3_W2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_key_slot_3_w2 to value 0"] impl crate::Resettable for EF_KEY_SLOT_3_W2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_0/ef_key_slot_3_w3.rs b/src/ef_data_0/ef_key_slot_3_w3.rs index 6ca58c0..d89c170 100644 --- a/src/ef_data_0/ef_key_slot_3_w3.rs +++ b/src/ef_data_0/ef_key_slot_3_w3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `ef_key_slot_3_w3` reader - "] -pub struct EF_KEY_SLOT_3_W3_R(crate::FieldReader); -impl EF_KEY_SLOT_3_W3_R { - pub(crate) fn new(bits: u32) -> Self { - EF_KEY_SLOT_3_W3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_KEY_SLOT_3_W3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_KEY_SLOT_3_W3_R = crate::FieldReader; #[doc = "Field `ef_key_slot_3_w3` writer - "] -pub struct EF_KEY_SLOT_3_W3_W<'a> { - w: &'a mut W, -} -impl<'a> EF_KEY_SLOT_3_W3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type EF_KEY_SLOT_3_W3_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_KEY_SLOT_3_W3_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_key_slot_3_w3(&self) -> EF_KEY_SLOT_3_W3_R { - EF_KEY_SLOT_3_W3_R::new((self.bits & 0xffff_ffff) as u32) + EF_KEY_SLOT_3_W3_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn ef_key_slot_3_w3(&mut self) -> EF_KEY_SLOT_3_W3_W { - EF_KEY_SLOT_3_W3_W { w: self } + #[must_use] + pub fn ef_key_slot_3_w3(&mut self) -> EF_KEY_SLOT_3_W3_W<0> { + EF_KEY_SLOT_3_W3_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for EF_KEY_SLOT_3_W3_SPEC { #[doc = "`write(|w| ..)` method takes [ef_key_slot_3_w3::W](W) writer structure"] impl crate::Writable for EF_KEY_SLOT_3_W3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_key_slot_3_w3 to value 0"] impl crate::Resettable for EF_KEY_SLOT_3_W3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_0/ef_key_slot_4_w0.rs b/src/ef_data_0/ef_key_slot_4_w0.rs index 3cecca6..95ce6dd 100644 --- a/src/ef_data_0/ef_key_slot_4_w0.rs +++ b/src/ef_data_0/ef_key_slot_4_w0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `ef_key_slot_4_w0` reader - "] -pub struct EF_KEY_SLOT_4_W0_R(crate::FieldReader); -impl EF_KEY_SLOT_4_W0_R { - pub(crate) fn new(bits: u32) -> Self { - EF_KEY_SLOT_4_W0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_KEY_SLOT_4_W0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_KEY_SLOT_4_W0_R = crate::FieldReader; #[doc = "Field `ef_key_slot_4_w0` writer - "] -pub struct EF_KEY_SLOT_4_W0_W<'a> { - w: &'a mut W, -} -impl<'a> EF_KEY_SLOT_4_W0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type EF_KEY_SLOT_4_W0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_KEY_SLOT_4_W0_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_key_slot_4_w0(&self) -> EF_KEY_SLOT_4_W0_R { - EF_KEY_SLOT_4_W0_R::new((self.bits & 0xffff_ffff) as u32) + EF_KEY_SLOT_4_W0_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn ef_key_slot_4_w0(&mut self) -> EF_KEY_SLOT_4_W0_W { - EF_KEY_SLOT_4_W0_W { w: self } + #[must_use] + pub fn ef_key_slot_4_w0(&mut self) -> EF_KEY_SLOT_4_W0_W<0> { + EF_KEY_SLOT_4_W0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for EF_KEY_SLOT_4_W0_SPEC { #[doc = "`write(|w| ..)` method takes [ef_key_slot_4_w0::W](W) writer structure"] impl crate::Writable for EF_KEY_SLOT_4_W0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_key_slot_4_w0 to value 0"] impl crate::Resettable for EF_KEY_SLOT_4_W0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_0/ef_key_slot_4_w1.rs b/src/ef_data_0/ef_key_slot_4_w1.rs index 838ab13..9e02ee9 100644 --- a/src/ef_data_0/ef_key_slot_4_w1.rs +++ b/src/ef_data_0/ef_key_slot_4_w1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `ef_key_slot_4_w1` reader - "] -pub struct EF_KEY_SLOT_4_W1_R(crate::FieldReader); -impl EF_KEY_SLOT_4_W1_R { - pub(crate) fn new(bits: u32) -> Self { - EF_KEY_SLOT_4_W1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_KEY_SLOT_4_W1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_KEY_SLOT_4_W1_R = crate::FieldReader; #[doc = "Field `ef_key_slot_4_w1` writer - "] -pub struct EF_KEY_SLOT_4_W1_W<'a> { - w: &'a mut W, -} -impl<'a> EF_KEY_SLOT_4_W1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type EF_KEY_SLOT_4_W1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_KEY_SLOT_4_W1_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_key_slot_4_w1(&self) -> EF_KEY_SLOT_4_W1_R { - EF_KEY_SLOT_4_W1_R::new((self.bits & 0xffff_ffff) as u32) + EF_KEY_SLOT_4_W1_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn ef_key_slot_4_w1(&mut self) -> EF_KEY_SLOT_4_W1_W { - EF_KEY_SLOT_4_W1_W { w: self } + #[must_use] + pub fn ef_key_slot_4_w1(&mut self) -> EF_KEY_SLOT_4_W1_W<0> { + EF_KEY_SLOT_4_W1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for EF_KEY_SLOT_4_W1_SPEC { #[doc = "`write(|w| ..)` method takes [ef_key_slot_4_w1::W](W) writer structure"] impl crate::Writable for EF_KEY_SLOT_4_W1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_key_slot_4_w1 to value 0"] impl crate::Resettable for EF_KEY_SLOT_4_W1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_0/ef_key_slot_4_w2.rs b/src/ef_data_0/ef_key_slot_4_w2.rs index b79ab00..2a42b1f 100644 --- a/src/ef_data_0/ef_key_slot_4_w2.rs +++ b/src/ef_data_0/ef_key_slot_4_w2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `ef_key_slot_4_w2` reader - "] -pub struct EF_KEY_SLOT_4_W2_R(crate::FieldReader); -impl EF_KEY_SLOT_4_W2_R { - pub(crate) fn new(bits: u32) -> Self { - EF_KEY_SLOT_4_W2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_KEY_SLOT_4_W2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_KEY_SLOT_4_W2_R = crate::FieldReader; #[doc = "Field `ef_key_slot_4_w2` writer - "] -pub struct EF_KEY_SLOT_4_W2_W<'a> { - w: &'a mut W, -} -impl<'a> EF_KEY_SLOT_4_W2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type EF_KEY_SLOT_4_W2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_KEY_SLOT_4_W2_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_key_slot_4_w2(&self) -> EF_KEY_SLOT_4_W2_R { - EF_KEY_SLOT_4_W2_R::new((self.bits & 0xffff_ffff) as u32) + EF_KEY_SLOT_4_W2_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn ef_key_slot_4_w2(&mut self) -> EF_KEY_SLOT_4_W2_W { - EF_KEY_SLOT_4_W2_W { w: self } + #[must_use] + pub fn ef_key_slot_4_w2(&mut self) -> EF_KEY_SLOT_4_W2_W<0> { + EF_KEY_SLOT_4_W2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for EF_KEY_SLOT_4_W2_SPEC { #[doc = "`write(|w| ..)` method takes [ef_key_slot_4_w2::W](W) writer structure"] impl crate::Writable for EF_KEY_SLOT_4_W2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_key_slot_4_w2 to value 0"] impl crate::Resettable for EF_KEY_SLOT_4_W2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_0/ef_key_slot_4_w3.rs b/src/ef_data_0/ef_key_slot_4_w3.rs index 24eca58..44543b4 100644 --- a/src/ef_data_0/ef_key_slot_4_w3.rs +++ b/src/ef_data_0/ef_key_slot_4_w3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `ef_key_slot_4_w3` reader - "] -pub struct EF_KEY_SLOT_4_W3_R(crate::FieldReader); -impl EF_KEY_SLOT_4_W3_R { - pub(crate) fn new(bits: u32) -> Self { - EF_KEY_SLOT_4_W3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_KEY_SLOT_4_W3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_KEY_SLOT_4_W3_R = crate::FieldReader; #[doc = "Field `ef_key_slot_4_w3` writer - "] -pub struct EF_KEY_SLOT_4_W3_W<'a> { - w: &'a mut W, -} -impl<'a> EF_KEY_SLOT_4_W3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type EF_KEY_SLOT_4_W3_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_KEY_SLOT_4_W3_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_key_slot_4_w3(&self) -> EF_KEY_SLOT_4_W3_R { - EF_KEY_SLOT_4_W3_R::new((self.bits & 0xffff_ffff) as u32) + EF_KEY_SLOT_4_W3_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn ef_key_slot_4_w3(&mut self) -> EF_KEY_SLOT_4_W3_W { - EF_KEY_SLOT_4_W3_W { w: self } + #[must_use] + pub fn ef_key_slot_4_w3(&mut self) -> EF_KEY_SLOT_4_W3_W<0> { + EF_KEY_SLOT_4_W3_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for EF_KEY_SLOT_4_W3_SPEC { #[doc = "`write(|w| ..)` method takes [ef_key_slot_4_w3::W](W) writer structure"] impl crate::Writable for EF_KEY_SLOT_4_W3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_key_slot_4_w3 to value 0"] impl crate::Resettable for EF_KEY_SLOT_4_W3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_0/ef_key_slot_5_w0.rs b/src/ef_data_0/ef_key_slot_5_w0.rs index 607b163..170a88f 100644 --- a/src/ef_data_0/ef_key_slot_5_w0.rs +++ b/src/ef_data_0/ef_key_slot_5_w0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `ef_key_slot_5_w0` reader - "] -pub struct EF_KEY_SLOT_5_W0_R(crate::FieldReader); -impl EF_KEY_SLOT_5_W0_R { - pub(crate) fn new(bits: u32) -> Self { - EF_KEY_SLOT_5_W0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_KEY_SLOT_5_W0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_KEY_SLOT_5_W0_R = crate::FieldReader; #[doc = "Field `ef_key_slot_5_w0` writer - "] -pub struct EF_KEY_SLOT_5_W0_W<'a> { - w: &'a mut W, -} -impl<'a> EF_KEY_SLOT_5_W0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type EF_KEY_SLOT_5_W0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_KEY_SLOT_5_W0_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_key_slot_5_w0(&self) -> EF_KEY_SLOT_5_W0_R { - EF_KEY_SLOT_5_W0_R::new((self.bits & 0xffff_ffff) as u32) + EF_KEY_SLOT_5_W0_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn ef_key_slot_5_w0(&mut self) -> EF_KEY_SLOT_5_W0_W { - EF_KEY_SLOT_5_W0_W { w: self } + #[must_use] + pub fn ef_key_slot_5_w0(&mut self) -> EF_KEY_SLOT_5_W0_W<0> { + EF_KEY_SLOT_5_W0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for EF_KEY_SLOT_5_W0_SPEC { #[doc = "`write(|w| ..)` method takes [ef_key_slot_5_w0::W](W) writer structure"] impl crate::Writable for EF_KEY_SLOT_5_W0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_key_slot_5_w0 to value 0"] impl crate::Resettable for EF_KEY_SLOT_5_W0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_0/ef_key_slot_5_w1.rs b/src/ef_data_0/ef_key_slot_5_w1.rs index 74a578c..48daec0 100644 --- a/src/ef_data_0/ef_key_slot_5_w1.rs +++ b/src/ef_data_0/ef_key_slot_5_w1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `ef_key_slot_5_w1` reader - "] -pub struct EF_KEY_SLOT_5_W1_R(crate::FieldReader); -impl EF_KEY_SLOT_5_W1_R { - pub(crate) fn new(bits: u32) -> Self { - EF_KEY_SLOT_5_W1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_KEY_SLOT_5_W1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_KEY_SLOT_5_W1_R = crate::FieldReader; #[doc = "Field `ef_key_slot_5_w1` writer - "] -pub struct EF_KEY_SLOT_5_W1_W<'a> { - w: &'a mut W, -} -impl<'a> EF_KEY_SLOT_5_W1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type EF_KEY_SLOT_5_W1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_KEY_SLOT_5_W1_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_key_slot_5_w1(&self) -> EF_KEY_SLOT_5_W1_R { - EF_KEY_SLOT_5_W1_R::new((self.bits & 0xffff_ffff) as u32) + EF_KEY_SLOT_5_W1_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn ef_key_slot_5_w1(&mut self) -> EF_KEY_SLOT_5_W1_W { - EF_KEY_SLOT_5_W1_W { w: self } + #[must_use] + pub fn ef_key_slot_5_w1(&mut self) -> EF_KEY_SLOT_5_W1_W<0> { + EF_KEY_SLOT_5_W1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for EF_KEY_SLOT_5_W1_SPEC { #[doc = "`write(|w| ..)` method takes [ef_key_slot_5_w1::W](W) writer structure"] impl crate::Writable for EF_KEY_SLOT_5_W1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_key_slot_5_w1 to value 0"] impl crate::Resettable for EF_KEY_SLOT_5_W1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_0/ef_key_slot_5_w2.rs b/src/ef_data_0/ef_key_slot_5_w2.rs index 8124686..eb31928 100644 --- a/src/ef_data_0/ef_key_slot_5_w2.rs +++ b/src/ef_data_0/ef_key_slot_5_w2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `ef_key_slot_5_w2` reader - "] -pub struct EF_KEY_SLOT_5_W2_R(crate::FieldReader); -impl EF_KEY_SLOT_5_W2_R { - pub(crate) fn new(bits: u32) -> Self { - EF_KEY_SLOT_5_W2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_KEY_SLOT_5_W2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_KEY_SLOT_5_W2_R = crate::FieldReader; #[doc = "Field `ef_key_slot_5_w2` writer - "] -pub struct EF_KEY_SLOT_5_W2_W<'a> { - w: &'a mut W, -} -impl<'a> EF_KEY_SLOT_5_W2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type EF_KEY_SLOT_5_W2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_KEY_SLOT_5_W2_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_key_slot_5_w2(&self) -> EF_KEY_SLOT_5_W2_R { - EF_KEY_SLOT_5_W2_R::new((self.bits & 0xffff_ffff) as u32) + EF_KEY_SLOT_5_W2_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn ef_key_slot_5_w2(&mut self) -> EF_KEY_SLOT_5_W2_W { - EF_KEY_SLOT_5_W2_W { w: self } + #[must_use] + pub fn ef_key_slot_5_w2(&mut self) -> EF_KEY_SLOT_5_W2_W<0> { + EF_KEY_SLOT_5_W2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for EF_KEY_SLOT_5_W2_SPEC { #[doc = "`write(|w| ..)` method takes [ef_key_slot_5_w2::W](W) writer structure"] impl crate::Writable for EF_KEY_SLOT_5_W2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_key_slot_5_w2 to value 0"] impl crate::Resettable for EF_KEY_SLOT_5_W2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_0/ef_key_slot_5_w3.rs b/src/ef_data_0/ef_key_slot_5_w3.rs index 8c5d71e..da7d3fe 100644 --- a/src/ef_data_0/ef_key_slot_5_w3.rs +++ b/src/ef_data_0/ef_key_slot_5_w3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `ef_key_slot_5_w3` reader - "] -pub struct EF_KEY_SLOT_5_W3_R(crate::FieldReader); -impl EF_KEY_SLOT_5_W3_R { - pub(crate) fn new(bits: u32) -> Self { - EF_KEY_SLOT_5_W3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_KEY_SLOT_5_W3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_KEY_SLOT_5_W3_R = crate::FieldReader; #[doc = "Field `ef_key_slot_5_w3` writer - "] -pub struct EF_KEY_SLOT_5_W3_W<'a> { - w: &'a mut W, -} -impl<'a> EF_KEY_SLOT_5_W3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type EF_KEY_SLOT_5_W3_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_KEY_SLOT_5_W3_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_key_slot_5_w3(&self) -> EF_KEY_SLOT_5_W3_R { - EF_KEY_SLOT_5_W3_R::new((self.bits & 0xffff_ffff) as u32) + EF_KEY_SLOT_5_W3_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn ef_key_slot_5_w3(&mut self) -> EF_KEY_SLOT_5_W3_W { - EF_KEY_SLOT_5_W3_W { w: self } + #[must_use] + pub fn ef_key_slot_5_w3(&mut self) -> EF_KEY_SLOT_5_W3_W<0> { + EF_KEY_SLOT_5_W3_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for EF_KEY_SLOT_5_W3_SPEC { #[doc = "`write(|w| ..)` method takes [ef_key_slot_5_w3::W](W) writer structure"] impl crate::Writable for EF_KEY_SLOT_5_W3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_key_slot_5_w3 to value 0"] impl crate::Resettable for EF_KEY_SLOT_5_W3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_0/ef_sw_usage_0.rs b/src/ef_data_0/ef_sw_usage_0.rs index ee2bca6..03e54f5 100644 --- a/src/ef_data_0/ef_sw_usage_0.rs +++ b/src/ef_data_0/ef_sw_usage_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `ef_sw_usage_0` reader - "] -pub struct EF_SW_USAGE_0_R(crate::FieldReader); -impl EF_SW_USAGE_0_R { - pub(crate) fn new(bits: u32) -> Self { - EF_SW_USAGE_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_SW_USAGE_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_SW_USAGE_0_R = crate::FieldReader; #[doc = "Field `ef_sw_usage_0` writer - "] -pub struct EF_SW_USAGE_0_W<'a> { - w: &'a mut W, -} -impl<'a> EF_SW_USAGE_0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type EF_SW_USAGE_0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_SW_USAGE_0_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_sw_usage_0(&self) -> EF_SW_USAGE_0_R { - EF_SW_USAGE_0_R::new((self.bits & 0xffff_ffff) as u32) + EF_SW_USAGE_0_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn ef_sw_usage_0(&mut self) -> EF_SW_USAGE_0_W { - EF_SW_USAGE_0_W { w: self } + #[must_use] + pub fn ef_sw_usage_0(&mut self) -> EF_SW_USAGE_0_W<0> { + EF_SW_USAGE_0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for EF_SW_USAGE_0_SPEC { #[doc = "`write(|w| ..)` method takes [ef_sw_usage_0::W](W) writer structure"] impl crate::Writable for EF_SW_USAGE_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_sw_usage_0 to value 0"] impl crate::Resettable for EF_SW_USAGE_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_0/ef_wifi_mac_high.rs b/src/ef_data_0/ef_wifi_mac_high.rs index a768908..ef71af1 100644 --- a/src/ef_data_0/ef_wifi_mac_high.rs +++ b/src/ef_data_0/ef_wifi_mac_high.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `ef_wifi_mac_high` reader - "] -pub struct EF_WIFI_MAC_HIGH_R(crate::FieldReader); -impl EF_WIFI_MAC_HIGH_R { - pub(crate) fn new(bits: u32) -> Self { - EF_WIFI_MAC_HIGH_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_WIFI_MAC_HIGH_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_WIFI_MAC_HIGH_R = crate::FieldReader; #[doc = "Field `ef_wifi_mac_high` writer - "] -pub struct EF_WIFI_MAC_HIGH_W<'a> { - w: &'a mut W, -} -impl<'a> EF_WIFI_MAC_HIGH_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type EF_WIFI_MAC_HIGH_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_WIFI_MAC_HIGH_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_wifi_mac_high(&self) -> EF_WIFI_MAC_HIGH_R { - EF_WIFI_MAC_HIGH_R::new((self.bits & 0xffff_ffff) as u32) + EF_WIFI_MAC_HIGH_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn ef_wifi_mac_high(&mut self) -> EF_WIFI_MAC_HIGH_W { - EF_WIFI_MAC_HIGH_W { w: self } + #[must_use] + pub fn ef_wifi_mac_high(&mut self) -> EF_WIFI_MAC_HIGH_W<0> { + EF_WIFI_MAC_HIGH_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for EF_WIFI_MAC_HIGH_SPEC { #[doc = "`write(|w| ..)` method takes [ef_wifi_mac_high::W](W) writer structure"] impl crate::Writable for EF_WIFI_MAC_HIGH_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_wifi_mac_high to value 0"] impl crate::Resettable for EF_WIFI_MAC_HIGH_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_0/ef_wifi_mac_low.rs b/src/ef_data_0/ef_wifi_mac_low.rs index 35a3273..760e26d 100644 --- a/src/ef_data_0/ef_wifi_mac_low.rs +++ b/src/ef_data_0/ef_wifi_mac_low.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `ef_wifi_mac_low` reader - "] -pub struct EF_WIFI_MAC_LOW_R(crate::FieldReader); -impl EF_WIFI_MAC_LOW_R { - pub(crate) fn new(bits: u32) -> Self { - EF_WIFI_MAC_LOW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EF_WIFI_MAC_LOW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EF_WIFI_MAC_LOW_R = crate::FieldReader; #[doc = "Field `ef_wifi_mac_low` writer - "] -pub struct EF_WIFI_MAC_LOW_W<'a> { - w: &'a mut W, -} -impl<'a> EF_WIFI_MAC_LOW_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type EF_WIFI_MAC_LOW_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, EF_WIFI_MAC_LOW_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn ef_wifi_mac_low(&self) -> EF_WIFI_MAC_LOW_R { - EF_WIFI_MAC_LOW_R::new((self.bits & 0xffff_ffff) as u32) + EF_WIFI_MAC_LOW_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn ef_wifi_mac_low(&mut self) -> EF_WIFI_MAC_LOW_W { - EF_WIFI_MAC_LOW_W { w: self } + #[must_use] + pub fn ef_wifi_mac_low(&mut self) -> EF_WIFI_MAC_LOW_W<0> { + EF_WIFI_MAC_LOW_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for EF_WIFI_MAC_LOW_SPEC { #[doc = "`write(|w| ..)` method takes [ef_wifi_mac_low::W](W) writer structure"] impl crate::Writable for EF_WIFI_MAC_LOW_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ef_wifi_mac_low to value 0"] impl crate::Resettable for EF_WIFI_MAC_LOW_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_1.rs b/src/ef_data_1.rs index 440558b..41f3da5 100644 --- a/src/ef_data_1.rs +++ b/src/ef_data_1.rs @@ -2,153 +2,153 @@ #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - reg_key_slot_6_w0."] - pub reg_key_slot_6_w0: crate::Reg, + pub reg_key_slot_6_w0: REG_KEY_SLOT_6_W0, #[doc = "0x04 - reg_key_slot_6_w1."] - pub reg_key_slot_6_w1: crate::Reg, + pub reg_key_slot_6_w1: REG_KEY_SLOT_6_W1, #[doc = "0x08 - reg_key_slot_6_w2."] - pub reg_key_slot_6_w2: crate::Reg, + pub reg_key_slot_6_w2: REG_KEY_SLOT_6_W2, #[doc = "0x0c - reg_key_slot_6_w3."] - pub reg_key_slot_6_w3: crate::Reg, + pub reg_key_slot_6_w3: REG_KEY_SLOT_6_W3, #[doc = "0x10 - reg_key_slot_7_w0."] - pub reg_key_slot_7_w0: crate::Reg, + pub reg_key_slot_7_w0: REG_KEY_SLOT_7_W0, #[doc = "0x14 - reg_key_slot_7_w1."] - pub reg_key_slot_7_w1: crate::Reg, + pub reg_key_slot_7_w1: REG_KEY_SLOT_7_W1, #[doc = "0x18 - reg_key_slot_7_w2."] - pub reg_key_slot_7_w2: crate::Reg, + pub reg_key_slot_7_w2: REG_KEY_SLOT_7_W2, #[doc = "0x1c - reg_key_slot_7_w3."] - pub reg_key_slot_7_w3: crate::Reg, + pub reg_key_slot_7_w3: REG_KEY_SLOT_7_W3, #[doc = "0x20 - reg_key_slot_8_w0."] - pub reg_key_slot_8_w0: crate::Reg, + pub reg_key_slot_8_w0: REG_KEY_SLOT_8_W0, #[doc = "0x24 - reg_key_slot_8_w1."] - pub reg_key_slot_8_w1: crate::Reg, + pub reg_key_slot_8_w1: REG_KEY_SLOT_8_W1, #[doc = "0x28 - reg_key_slot_8_w2."] - pub reg_key_slot_8_w2: crate::Reg, + pub reg_key_slot_8_w2: REG_KEY_SLOT_8_W2, #[doc = "0x2c - reg_key_slot_8_w3."] - pub reg_key_slot_8_w3: crate::Reg, + pub reg_key_slot_8_w3: REG_KEY_SLOT_8_W3, #[doc = "0x30 - reg_key_slot_9_w0."] - pub reg_key_slot_9_w0: crate::Reg, + pub reg_key_slot_9_w0: REG_KEY_SLOT_9_W0, #[doc = "0x34 - reg_key_slot_9_w1."] - pub reg_key_slot_9_w1: crate::Reg, + pub reg_key_slot_9_w1: REG_KEY_SLOT_9_W1, #[doc = "0x38 - reg_key_slot_9_w2."] - pub reg_key_slot_9_w2: crate::Reg, + pub reg_key_slot_9_w2: REG_KEY_SLOT_9_W2, #[doc = "0x3c - reg_key_slot_9_w3."] - pub reg_key_slot_9_w3: crate::Reg, + pub reg_key_slot_9_w3: REG_KEY_SLOT_9_W3, #[doc = "0x40 - reg_key_slot_10_w0."] - pub reg_key_slot_10_w0: crate::Reg, + pub reg_key_slot_10_w0: REG_KEY_SLOT_10_W0, #[doc = "0x44 - reg_key_slot_10_w1."] - pub reg_key_slot_10_w1: crate::Reg, + pub reg_key_slot_10_w1: REG_KEY_SLOT_10_W1, #[doc = "0x48 - reg_key_slot_10_w2."] - pub reg_key_slot_10_w2: crate::Reg, + pub reg_key_slot_10_w2: REG_KEY_SLOT_10_W2, #[doc = "0x4c - reg_key_slot_10_w3."] - pub reg_key_slot_10_w3: crate::Reg, + pub reg_key_slot_10_w3: REG_KEY_SLOT_10_W3, #[doc = "0x50 - reg_key_slot_11_w0."] - pub reg_key_slot_11_w0: crate::Reg, + pub reg_key_slot_11_w0: REG_KEY_SLOT_11_W0, #[doc = "0x54 - reg_key_slot_11_w1."] - pub reg_key_slot_11_w1: crate::Reg, + pub reg_key_slot_11_w1: REG_KEY_SLOT_11_W1, #[doc = "0x58 - reg_key_slot_11_w2."] - pub reg_key_slot_11_w2: crate::Reg, + pub reg_key_slot_11_w2: REG_KEY_SLOT_11_W2, #[doc = "0x5c - reg_key_slot_11_w3."] - pub reg_key_slot_11_w3: crate::Reg, + pub reg_key_slot_11_w3: REG_KEY_SLOT_11_W3, #[doc = "0x60 - reg_data_1_lock."] - pub reg_data_1_lock: crate::Reg, + pub reg_data_1_lock: REG_DATA_1_LOCK, } -#[doc = "reg_key_slot_6_w0 register accessor: an alias for `Reg`"] +#[doc = "reg_key_slot_6_w0 (rw) register accessor: an alias for `Reg`"] pub type REG_KEY_SLOT_6_W0 = crate::Reg; #[doc = "reg_key_slot_6_w0."] pub mod reg_key_slot_6_w0; -#[doc = "reg_key_slot_6_w1 register accessor: an alias for `Reg`"] +#[doc = "reg_key_slot_6_w1 (rw) register accessor: an alias for `Reg`"] pub type REG_KEY_SLOT_6_W1 = crate::Reg; #[doc = "reg_key_slot_6_w1."] pub mod reg_key_slot_6_w1; -#[doc = "reg_key_slot_6_w2 register accessor: an alias for `Reg`"] +#[doc = "reg_key_slot_6_w2 (rw) register accessor: an alias for `Reg`"] pub type REG_KEY_SLOT_6_W2 = crate::Reg; #[doc = "reg_key_slot_6_w2."] pub mod reg_key_slot_6_w2; -#[doc = "reg_key_slot_6_w3 register accessor: an alias for `Reg`"] +#[doc = "reg_key_slot_6_w3 (rw) register accessor: an alias for `Reg`"] pub type REG_KEY_SLOT_6_W3 = crate::Reg; #[doc = "reg_key_slot_6_w3."] pub mod reg_key_slot_6_w3; -#[doc = "reg_key_slot_7_w0 register accessor: an alias for `Reg`"] +#[doc = "reg_key_slot_7_w0 (rw) register accessor: an alias for `Reg`"] pub type REG_KEY_SLOT_7_W0 = crate::Reg; #[doc = "reg_key_slot_7_w0."] pub mod reg_key_slot_7_w0; -#[doc = "reg_key_slot_7_w1 register accessor: an alias for `Reg`"] +#[doc = "reg_key_slot_7_w1 (rw) register accessor: an alias for `Reg`"] pub type REG_KEY_SLOT_7_W1 = crate::Reg; #[doc = "reg_key_slot_7_w1."] pub mod reg_key_slot_7_w1; -#[doc = "reg_key_slot_7_w2 register accessor: an alias for `Reg`"] +#[doc = "reg_key_slot_7_w2 (rw) register accessor: an alias for `Reg`"] pub type REG_KEY_SLOT_7_W2 = crate::Reg; #[doc = "reg_key_slot_7_w2."] pub mod reg_key_slot_7_w2; -#[doc = "reg_key_slot_7_w3 register accessor: an alias for `Reg`"] +#[doc = "reg_key_slot_7_w3 (rw) register accessor: an alias for `Reg`"] pub type REG_KEY_SLOT_7_W3 = crate::Reg; #[doc = "reg_key_slot_7_w3."] pub mod reg_key_slot_7_w3; -#[doc = "reg_key_slot_8_w0 register accessor: an alias for `Reg`"] +#[doc = "reg_key_slot_8_w0 (rw) register accessor: an alias for `Reg`"] pub type REG_KEY_SLOT_8_W0 = crate::Reg; #[doc = "reg_key_slot_8_w0."] pub mod reg_key_slot_8_w0; -#[doc = "reg_key_slot_8_w1 register accessor: an alias for `Reg`"] +#[doc = "reg_key_slot_8_w1 (rw) register accessor: an alias for `Reg`"] pub type REG_KEY_SLOT_8_W1 = crate::Reg; #[doc = "reg_key_slot_8_w1."] pub mod reg_key_slot_8_w1; -#[doc = "reg_key_slot_8_w2 register accessor: an alias for `Reg`"] +#[doc = "reg_key_slot_8_w2 (rw) register accessor: an alias for `Reg`"] pub type REG_KEY_SLOT_8_W2 = crate::Reg; #[doc = "reg_key_slot_8_w2."] pub mod reg_key_slot_8_w2; -#[doc = "reg_key_slot_8_w3 register accessor: an alias for `Reg`"] +#[doc = "reg_key_slot_8_w3 (rw) register accessor: an alias for `Reg`"] pub type REG_KEY_SLOT_8_W3 = crate::Reg; #[doc = "reg_key_slot_8_w3."] pub mod reg_key_slot_8_w3; -#[doc = "reg_key_slot_9_w0 register accessor: an alias for `Reg`"] +#[doc = "reg_key_slot_9_w0 (rw) register accessor: an alias for `Reg`"] pub type REG_KEY_SLOT_9_W0 = crate::Reg; #[doc = "reg_key_slot_9_w0."] pub mod reg_key_slot_9_w0; -#[doc = "reg_key_slot_9_w1 register accessor: an alias for `Reg`"] +#[doc = "reg_key_slot_9_w1 (rw) register accessor: an alias for `Reg`"] pub type REG_KEY_SLOT_9_W1 = crate::Reg; #[doc = "reg_key_slot_9_w1."] pub mod reg_key_slot_9_w1; -#[doc = "reg_key_slot_9_w2 register accessor: an alias for `Reg`"] +#[doc = "reg_key_slot_9_w2 (rw) register accessor: an alias for `Reg`"] pub type REG_KEY_SLOT_9_W2 = crate::Reg; #[doc = "reg_key_slot_9_w2."] pub mod reg_key_slot_9_w2; -#[doc = "reg_key_slot_9_w3 register accessor: an alias for `Reg`"] +#[doc = "reg_key_slot_9_w3 (rw) register accessor: an alias for `Reg`"] pub type REG_KEY_SLOT_9_W3 = crate::Reg; #[doc = "reg_key_slot_9_w3."] pub mod reg_key_slot_9_w3; -#[doc = "reg_key_slot_10_w0 register accessor: an alias for `Reg`"] +#[doc = "reg_key_slot_10_w0 (rw) register accessor: an alias for `Reg`"] pub type REG_KEY_SLOT_10_W0 = crate::Reg; #[doc = "reg_key_slot_10_w0."] pub mod reg_key_slot_10_w0; -#[doc = "reg_key_slot_10_w1 register accessor: an alias for `Reg`"] +#[doc = "reg_key_slot_10_w1 (rw) register accessor: an alias for `Reg`"] pub type REG_KEY_SLOT_10_W1 = crate::Reg; #[doc = "reg_key_slot_10_w1."] pub mod reg_key_slot_10_w1; -#[doc = "reg_key_slot_10_w2 register accessor: an alias for `Reg`"] +#[doc = "reg_key_slot_10_w2 (rw) register accessor: an alias for `Reg`"] pub type REG_KEY_SLOT_10_W2 = crate::Reg; #[doc = "reg_key_slot_10_w2."] pub mod reg_key_slot_10_w2; -#[doc = "reg_key_slot_10_w3 register accessor: an alias for `Reg`"] +#[doc = "reg_key_slot_10_w3 (rw) register accessor: an alias for `Reg`"] pub type REG_KEY_SLOT_10_W3 = crate::Reg; #[doc = "reg_key_slot_10_w3."] pub mod reg_key_slot_10_w3; -#[doc = "reg_key_slot_11_w0 register accessor: an alias for `Reg`"] +#[doc = "reg_key_slot_11_w0 (rw) register accessor: an alias for `Reg`"] pub type REG_KEY_SLOT_11_W0 = crate::Reg; #[doc = "reg_key_slot_11_w0."] pub mod reg_key_slot_11_w0; -#[doc = "reg_key_slot_11_w1 register accessor: an alias for `Reg`"] +#[doc = "reg_key_slot_11_w1 (rw) register accessor: an alias for `Reg`"] pub type REG_KEY_SLOT_11_W1 = crate::Reg; #[doc = "reg_key_slot_11_w1."] pub mod reg_key_slot_11_w1; -#[doc = "reg_key_slot_11_w2 register accessor: an alias for `Reg`"] +#[doc = "reg_key_slot_11_w2 (rw) register accessor: an alias for `Reg`"] pub type REG_KEY_SLOT_11_W2 = crate::Reg; #[doc = "reg_key_slot_11_w2."] pub mod reg_key_slot_11_w2; -#[doc = "reg_key_slot_11_w3 register accessor: an alias for `Reg`"] +#[doc = "reg_key_slot_11_w3 (rw) register accessor: an alias for `Reg`"] pub type REG_KEY_SLOT_11_W3 = crate::Reg; #[doc = "reg_key_slot_11_w3."] pub mod reg_key_slot_11_w3; -#[doc = "reg_data_1_lock register accessor: an alias for `Reg`"] +#[doc = "reg_data_1_lock (rw) register accessor: an alias for `Reg`"] pub type REG_DATA_1_LOCK = crate::Reg; #[doc = "reg_data_1_lock."] pub mod reg_data_1_lock; diff --git a/src/ef_data_1/reg_data_1_lock.rs b/src/ef_data_1/reg_data_1_lock.rs index d56d620..ec4a5ae 100644 --- a/src/ef_data_1/reg_data_1_lock.rs +++ b/src/ef_data_1/reg_data_1_lock.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,455 +28,177 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rd_lock_key_slot_9` reader - "] -pub struct RD_LOCK_KEY_SLOT_9_R(crate::FieldReader); -impl RD_LOCK_KEY_SLOT_9_R { - pub(crate) fn new(bits: bool) -> Self { - RD_LOCK_KEY_SLOT_9_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RD_LOCK_KEY_SLOT_9_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rd_lock_key_slot_9` writer - "] -pub struct RD_LOCK_KEY_SLOT_9_W<'a> { - w: &'a mut W, -} -impl<'a> RD_LOCK_KEY_SLOT_9_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 29)) | ((value as u32 & 0x01) << 29); - self.w - } -} -#[doc = "Field `rd_lock_key_slot_8` reader - "] -pub struct RD_LOCK_KEY_SLOT_8_R(crate::FieldReader); -impl RD_LOCK_KEY_SLOT_8_R { - pub(crate) fn new(bits: bool) -> Self { - RD_LOCK_KEY_SLOT_8_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RD_LOCK_KEY_SLOT_8_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rd_lock_key_slot_8` writer - "] -pub struct RD_LOCK_KEY_SLOT_8_W<'a> { - w: &'a mut W, -} -impl<'a> RD_LOCK_KEY_SLOT_8_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 28)) | ((value as u32 & 0x01) << 28); - self.w - } -} -#[doc = "Field `rd_lock_key_slot_7` reader - "] -pub struct RD_LOCK_KEY_SLOT_7_R(crate::FieldReader); -impl RD_LOCK_KEY_SLOT_7_R { - pub(crate) fn new(bits: bool) -> Self { - RD_LOCK_KEY_SLOT_7_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RD_LOCK_KEY_SLOT_7_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rd_lock_key_slot_7` writer - "] -pub struct RD_LOCK_KEY_SLOT_7_W<'a> { - w: &'a mut W, -} -impl<'a> RD_LOCK_KEY_SLOT_7_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 27)) | ((value as u32 & 0x01) << 27); - self.w - } -} -#[doc = "Field `rd_lock_key_slot_6` reader - "] -pub struct RD_LOCK_KEY_SLOT_6_R(crate::FieldReader); -impl RD_LOCK_KEY_SLOT_6_R { - pub(crate) fn new(bits: bool) -> Self { - RD_LOCK_KEY_SLOT_6_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RD_LOCK_KEY_SLOT_6_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rd_lock_key_slot_6` writer - "] -pub struct RD_LOCK_KEY_SLOT_6_W<'a> { - w: &'a mut W, -} -impl<'a> RD_LOCK_KEY_SLOT_6_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 26)) | ((value as u32 & 0x01) << 26); - self.w - } -} -#[doc = "Field `RESERVED_25_16` reader - "] -pub struct RESERVED_25_16_R(crate::FieldReader); -impl RESERVED_25_16_R { - pub(crate) fn new(bits: u16) -> Self { - RESERVED_25_16_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RESERVED_25_16_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `RESERVED_25_16` writer - "] -pub struct RESERVED_25_16_W<'a> { - w: &'a mut W, -} -impl<'a> RESERVED_25_16_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03ff << 16)) | ((value as u32 & 0x03ff) << 16); - self.w - } -} -#[doc = "Field `wr_lock_key_slot_9` reader - "] -pub struct WR_LOCK_KEY_SLOT_9_R(crate::FieldReader); -impl WR_LOCK_KEY_SLOT_9_R { - pub(crate) fn new(bits: bool) -> Self { - WR_LOCK_KEY_SLOT_9_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for WR_LOCK_KEY_SLOT_9_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `wr_lock_key_slot_9` writer - "] -pub struct WR_LOCK_KEY_SLOT_9_W<'a> { - w: &'a mut W, -} -impl<'a> WR_LOCK_KEY_SLOT_9_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13); - self.w - } -} -#[doc = "Field `wr_lock_key_slot_8` reader - "] -pub struct WR_LOCK_KEY_SLOT_8_R(crate::FieldReader); -impl WR_LOCK_KEY_SLOT_8_R { - pub(crate) fn new(bits: bool) -> Self { - WR_LOCK_KEY_SLOT_8_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for WR_LOCK_KEY_SLOT_8_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `wr_lock_key_slot_8` writer - "] -pub struct WR_LOCK_KEY_SLOT_8_W<'a> { - w: &'a mut W, -} -impl<'a> WR_LOCK_KEY_SLOT_8_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} -#[doc = "Field `wr_lock_key_slot_7` reader - "] -pub struct WR_LOCK_KEY_SLOT_7_R(crate::FieldReader); -impl WR_LOCK_KEY_SLOT_7_R { - pub(crate) fn new(bits: bool) -> Self { - WR_LOCK_KEY_SLOT_7_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for WR_LOCK_KEY_SLOT_7_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `wr_lock_key_slot_7` writer - "] -pub struct WR_LOCK_KEY_SLOT_7_W<'a> { - w: &'a mut W, -} -impl<'a> WR_LOCK_KEY_SLOT_7_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w - } -} -#[doc = "Field `wr_lock_key_slot_6` reader - "] -pub struct WR_LOCK_KEY_SLOT_6_R(crate::FieldReader); -impl WR_LOCK_KEY_SLOT_6_R { - pub(crate) fn new(bits: bool) -> Self { - WR_LOCK_KEY_SLOT_6_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for WR_LOCK_KEY_SLOT_6_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `wr_lock_key_slot_6` writer - "] -pub struct WR_LOCK_KEY_SLOT_6_W<'a> { - w: &'a mut W, -} -impl<'a> WR_LOCK_KEY_SLOT_6_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); - self.w - } -} #[doc = "Field `RESERVED_9_0` reader - "] -pub struct RESERVED_9_0_R(crate::FieldReader); -impl RESERVED_9_0_R { - pub(crate) fn new(bits: u16) -> Self { - RESERVED_9_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RESERVED_9_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RESERVED_9_0_R = crate::FieldReader; #[doc = "Field `RESERVED_9_0` writer - "] -pub struct RESERVED_9_0_W<'a> { - w: &'a mut W, -} -impl<'a> RESERVED_9_0_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type RESERVED_9_0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, REG_DATA_1_LOCK_SPEC, u16, u16, 10, O>; +#[doc = "Field `wr_lock_key_slot_6` reader - "] +pub type WR_LOCK_KEY_SLOT_6_R = crate::BitReader; +#[doc = "Field `wr_lock_key_slot_6` writer - "] +pub type WR_LOCK_KEY_SLOT_6_W<'a, const O: u8> = + crate::BitWriter<'a, u32, REG_DATA_1_LOCK_SPEC, bool, O>; +#[doc = "Field `wr_lock_key_slot_7` reader - "] +pub type WR_LOCK_KEY_SLOT_7_R = crate::BitReader; +#[doc = "Field `wr_lock_key_slot_7` writer - "] +pub type WR_LOCK_KEY_SLOT_7_W<'a, const O: u8> = + crate::BitWriter<'a, u32, REG_DATA_1_LOCK_SPEC, bool, O>; +#[doc = "Field `wr_lock_key_slot_8` reader - "] +pub type WR_LOCK_KEY_SLOT_8_R = crate::BitReader; +#[doc = "Field `wr_lock_key_slot_8` writer - "] +pub type WR_LOCK_KEY_SLOT_8_W<'a, const O: u8> = + crate::BitWriter<'a, u32, REG_DATA_1_LOCK_SPEC, bool, O>; +#[doc = "Field `wr_lock_key_slot_9` reader - "] +pub type WR_LOCK_KEY_SLOT_9_R = crate::BitReader; +#[doc = "Field `wr_lock_key_slot_9` writer - "] +pub type WR_LOCK_KEY_SLOT_9_W<'a, const O: u8> = + crate::BitWriter<'a, u32, REG_DATA_1_LOCK_SPEC, bool, O>; +#[doc = "Field `RESERVED_25_16` reader - "] +pub type RESERVED_25_16_R = crate::FieldReader; +#[doc = "Field `RESERVED_25_16` writer - "] +pub type RESERVED_25_16_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, REG_DATA_1_LOCK_SPEC, u16, u16, 10, O>; +#[doc = "Field `rd_lock_key_slot_6` reader - "] +pub type RD_LOCK_KEY_SLOT_6_R = crate::BitReader; +#[doc = "Field `rd_lock_key_slot_6` writer - "] +pub type RD_LOCK_KEY_SLOT_6_W<'a, const O: u8> = + crate::BitWriter<'a, u32, REG_DATA_1_LOCK_SPEC, bool, O>; +#[doc = "Field `rd_lock_key_slot_7` reader - "] +pub type RD_LOCK_KEY_SLOT_7_R = crate::BitReader; +#[doc = "Field `rd_lock_key_slot_7` writer - "] +pub type RD_LOCK_KEY_SLOT_7_W<'a, const O: u8> = + crate::BitWriter<'a, u32, REG_DATA_1_LOCK_SPEC, bool, O>; +#[doc = "Field `rd_lock_key_slot_8` reader - "] +pub type RD_LOCK_KEY_SLOT_8_R = crate::BitReader; +#[doc = "Field `rd_lock_key_slot_8` writer - "] +pub type RD_LOCK_KEY_SLOT_8_W<'a, const O: u8> = + crate::BitWriter<'a, u32, REG_DATA_1_LOCK_SPEC, bool, O>; +#[doc = "Field `rd_lock_key_slot_9` reader - "] +pub type RD_LOCK_KEY_SLOT_9_R = crate::BitReader; +#[doc = "Field `rd_lock_key_slot_9` writer - "] +pub type RD_LOCK_KEY_SLOT_9_W<'a, const O: u8> = + crate::BitWriter<'a, u32, REG_DATA_1_LOCK_SPEC, bool, O>; +impl R { + #[doc = "Bits 0:9"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03ff) | (value as u32 & 0x03ff); - self.w + pub fn reserved_9_0(&self) -> RESERVED_9_0_R { + RESERVED_9_0_R::new((self.bits & 0x03ff) as u16) } -} -impl R { - #[doc = "Bit 29"] + #[doc = "Bit 10"] #[inline(always)] - pub fn rd_lock_key_slot_9(&self) -> RD_LOCK_KEY_SLOT_9_R { - RD_LOCK_KEY_SLOT_9_R::new(((self.bits >> 29) & 0x01) != 0) + pub fn wr_lock_key_slot_6(&self) -> WR_LOCK_KEY_SLOT_6_R { + WR_LOCK_KEY_SLOT_6_R::new(((self.bits >> 10) & 1) != 0) } - #[doc = "Bit 28"] + #[doc = "Bit 11"] #[inline(always)] - pub fn rd_lock_key_slot_8(&self) -> RD_LOCK_KEY_SLOT_8_R { - RD_LOCK_KEY_SLOT_8_R::new(((self.bits >> 28) & 0x01) != 0) + pub fn wr_lock_key_slot_7(&self) -> WR_LOCK_KEY_SLOT_7_R { + WR_LOCK_KEY_SLOT_7_R::new(((self.bits >> 11) & 1) != 0) } - #[doc = "Bit 27"] + #[doc = "Bit 12"] #[inline(always)] - pub fn rd_lock_key_slot_7(&self) -> RD_LOCK_KEY_SLOT_7_R { - RD_LOCK_KEY_SLOT_7_R::new(((self.bits >> 27) & 0x01) != 0) + pub fn wr_lock_key_slot_8(&self) -> WR_LOCK_KEY_SLOT_8_R { + WR_LOCK_KEY_SLOT_8_R::new(((self.bits >> 12) & 1) != 0) } - #[doc = "Bit 26"] + #[doc = "Bit 13"] #[inline(always)] - pub fn rd_lock_key_slot_6(&self) -> RD_LOCK_KEY_SLOT_6_R { - RD_LOCK_KEY_SLOT_6_R::new(((self.bits >> 26) & 0x01) != 0) + pub fn wr_lock_key_slot_9(&self) -> WR_LOCK_KEY_SLOT_9_R { + WR_LOCK_KEY_SLOT_9_R::new(((self.bits >> 13) & 1) != 0) } #[doc = "Bits 16:25"] #[inline(always)] pub fn reserved_25_16(&self) -> RESERVED_25_16_R { RESERVED_25_16_R::new(((self.bits >> 16) & 0x03ff) as u16) } - #[doc = "Bit 13"] - #[inline(always)] - pub fn wr_lock_key_slot_9(&self) -> WR_LOCK_KEY_SLOT_9_R { - WR_LOCK_KEY_SLOT_9_R::new(((self.bits >> 13) & 0x01) != 0) - } - #[doc = "Bit 12"] + #[doc = "Bit 26"] #[inline(always)] - pub fn wr_lock_key_slot_8(&self) -> WR_LOCK_KEY_SLOT_8_R { - WR_LOCK_KEY_SLOT_8_R::new(((self.bits >> 12) & 0x01) != 0) + pub fn rd_lock_key_slot_6(&self) -> RD_LOCK_KEY_SLOT_6_R { + RD_LOCK_KEY_SLOT_6_R::new(((self.bits >> 26) & 1) != 0) } - #[doc = "Bit 11"] + #[doc = "Bit 27"] #[inline(always)] - pub fn wr_lock_key_slot_7(&self) -> WR_LOCK_KEY_SLOT_7_R { - WR_LOCK_KEY_SLOT_7_R::new(((self.bits >> 11) & 0x01) != 0) + pub fn rd_lock_key_slot_7(&self) -> RD_LOCK_KEY_SLOT_7_R { + RD_LOCK_KEY_SLOT_7_R::new(((self.bits >> 27) & 1) != 0) } - #[doc = "Bit 10"] + #[doc = "Bit 28"] #[inline(always)] - pub fn wr_lock_key_slot_6(&self) -> WR_LOCK_KEY_SLOT_6_R { - WR_LOCK_KEY_SLOT_6_R::new(((self.bits >> 10) & 0x01) != 0) + pub fn rd_lock_key_slot_8(&self) -> RD_LOCK_KEY_SLOT_8_R { + RD_LOCK_KEY_SLOT_8_R::new(((self.bits >> 28) & 1) != 0) } - #[doc = "Bits 0:9"] + #[doc = "Bit 29"] #[inline(always)] - pub fn reserved_9_0(&self) -> RESERVED_9_0_R { - RESERVED_9_0_R::new((self.bits & 0x03ff) as u16) + pub fn rd_lock_key_slot_9(&self) -> RD_LOCK_KEY_SLOT_9_R { + RD_LOCK_KEY_SLOT_9_R::new(((self.bits >> 29) & 1) != 0) } } impl W { - #[doc = "Bit 29"] + #[doc = "Bits 0:9"] #[inline(always)] - pub fn rd_lock_key_slot_9(&mut self) -> RD_LOCK_KEY_SLOT_9_W { - RD_LOCK_KEY_SLOT_9_W { w: self } + #[must_use] + pub fn reserved_9_0(&mut self) -> RESERVED_9_0_W<0> { + RESERVED_9_0_W::new(self) } - #[doc = "Bit 28"] + #[doc = "Bit 10"] #[inline(always)] - pub fn rd_lock_key_slot_8(&mut self) -> RD_LOCK_KEY_SLOT_8_W { - RD_LOCK_KEY_SLOT_8_W { w: self } + #[must_use] + pub fn wr_lock_key_slot_6(&mut self) -> WR_LOCK_KEY_SLOT_6_W<10> { + WR_LOCK_KEY_SLOT_6_W::new(self) } - #[doc = "Bit 27"] + #[doc = "Bit 11"] #[inline(always)] - pub fn rd_lock_key_slot_7(&mut self) -> RD_LOCK_KEY_SLOT_7_W { - RD_LOCK_KEY_SLOT_7_W { w: self } + #[must_use] + pub fn wr_lock_key_slot_7(&mut self) -> WR_LOCK_KEY_SLOT_7_W<11> { + WR_LOCK_KEY_SLOT_7_W::new(self) } - #[doc = "Bit 26"] + #[doc = "Bit 12"] #[inline(always)] - pub fn rd_lock_key_slot_6(&mut self) -> RD_LOCK_KEY_SLOT_6_W { - RD_LOCK_KEY_SLOT_6_W { w: self } + #[must_use] + pub fn wr_lock_key_slot_8(&mut self) -> WR_LOCK_KEY_SLOT_8_W<12> { + WR_LOCK_KEY_SLOT_8_W::new(self) } - #[doc = "Bits 16:25"] + #[doc = "Bit 13"] #[inline(always)] - pub fn reserved_25_16(&mut self) -> RESERVED_25_16_W { - RESERVED_25_16_W { w: self } + #[must_use] + pub fn wr_lock_key_slot_9(&mut self) -> WR_LOCK_KEY_SLOT_9_W<13> { + WR_LOCK_KEY_SLOT_9_W::new(self) } - #[doc = "Bit 13"] + #[doc = "Bits 16:25"] #[inline(always)] - pub fn wr_lock_key_slot_9(&mut self) -> WR_LOCK_KEY_SLOT_9_W { - WR_LOCK_KEY_SLOT_9_W { w: self } + #[must_use] + pub fn reserved_25_16(&mut self) -> RESERVED_25_16_W<16> { + RESERVED_25_16_W::new(self) } - #[doc = "Bit 12"] + #[doc = "Bit 26"] #[inline(always)] - pub fn wr_lock_key_slot_8(&mut self) -> WR_LOCK_KEY_SLOT_8_W { - WR_LOCK_KEY_SLOT_8_W { w: self } + #[must_use] + pub fn rd_lock_key_slot_6(&mut self) -> RD_LOCK_KEY_SLOT_6_W<26> { + RD_LOCK_KEY_SLOT_6_W::new(self) } - #[doc = "Bit 11"] + #[doc = "Bit 27"] #[inline(always)] - pub fn wr_lock_key_slot_7(&mut self) -> WR_LOCK_KEY_SLOT_7_W { - WR_LOCK_KEY_SLOT_7_W { w: self } + #[must_use] + pub fn rd_lock_key_slot_7(&mut self) -> RD_LOCK_KEY_SLOT_7_W<27> { + RD_LOCK_KEY_SLOT_7_W::new(self) } - #[doc = "Bit 10"] + #[doc = "Bit 28"] #[inline(always)] - pub fn wr_lock_key_slot_6(&mut self) -> WR_LOCK_KEY_SLOT_6_W { - WR_LOCK_KEY_SLOT_6_W { w: self } + #[must_use] + pub fn rd_lock_key_slot_8(&mut self) -> RD_LOCK_KEY_SLOT_8_W<28> { + RD_LOCK_KEY_SLOT_8_W::new(self) } - #[doc = "Bits 0:9"] + #[doc = "Bit 29"] #[inline(always)] - pub fn reserved_9_0(&mut self) -> RESERVED_9_0_W { - RESERVED_9_0_W { w: self } + #[must_use] + pub fn rd_lock_key_slot_9(&mut self) -> RD_LOCK_KEY_SLOT_9_W<29> { + RD_LOCK_KEY_SLOT_9_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -493,11 +216,10 @@ impl crate::Readable for REG_DATA_1_LOCK_SPEC { #[doc = "`write(|w| ..)` method takes [reg_data_1_lock::W](W) writer structure"] impl crate::Writable for REG_DATA_1_LOCK_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets reg_data_1_lock to value 0"] impl crate::Resettable for REG_DATA_1_LOCK_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_1/reg_key_slot_10_w0.rs b/src/ef_data_1/reg_key_slot_10_w0.rs index 1aa31b2..300db61 100644 --- a/src/ef_data_1/reg_key_slot_10_w0.rs +++ b/src/ef_data_1/reg_key_slot_10_w0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,13 +28,15 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } impl W { #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -51,11 +54,10 @@ impl crate::Readable for REG_KEY_SLOT_10_W0_SPEC { #[doc = "`write(|w| ..)` method takes [reg_key_slot_10_w0::W](W) writer structure"] impl crate::Writable for REG_KEY_SLOT_10_W0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets reg_key_slot_10_w0 to value 0"] impl crate::Resettable for REG_KEY_SLOT_10_W0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_1/reg_key_slot_10_w1.rs b/src/ef_data_1/reg_key_slot_10_w1.rs index 9824a39..a748fe8 100644 --- a/src/ef_data_1/reg_key_slot_10_w1.rs +++ b/src/ef_data_1/reg_key_slot_10_w1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,13 +28,15 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } impl W { #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -51,11 +54,10 @@ impl crate::Readable for REG_KEY_SLOT_10_W1_SPEC { #[doc = "`write(|w| ..)` method takes [reg_key_slot_10_w1::W](W) writer structure"] impl crate::Writable for REG_KEY_SLOT_10_W1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets reg_key_slot_10_w1 to value 0"] impl crate::Resettable for REG_KEY_SLOT_10_W1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_1/reg_key_slot_10_w2.rs b/src/ef_data_1/reg_key_slot_10_w2.rs index 6930f3d..91d7438 100644 --- a/src/ef_data_1/reg_key_slot_10_w2.rs +++ b/src/ef_data_1/reg_key_slot_10_w2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,13 +28,15 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } impl W { #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -51,11 +54,10 @@ impl crate::Readable for REG_KEY_SLOT_10_W2_SPEC { #[doc = "`write(|w| ..)` method takes [reg_key_slot_10_w2::W](W) writer structure"] impl crate::Writable for REG_KEY_SLOT_10_W2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets reg_key_slot_10_w2 to value 0"] impl crate::Resettable for REG_KEY_SLOT_10_W2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_1/reg_key_slot_10_w3.rs b/src/ef_data_1/reg_key_slot_10_w3.rs index af43b72..001978b 100644 --- a/src/ef_data_1/reg_key_slot_10_w3.rs +++ b/src/ef_data_1/reg_key_slot_10_w3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,13 +28,15 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } impl W { #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -51,11 +54,10 @@ impl crate::Readable for REG_KEY_SLOT_10_W3_SPEC { #[doc = "`write(|w| ..)` method takes [reg_key_slot_10_w3::W](W) writer structure"] impl crate::Writable for REG_KEY_SLOT_10_W3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets reg_key_slot_10_w3 to value 0"] impl crate::Resettable for REG_KEY_SLOT_10_W3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_1/reg_key_slot_11_w0.rs b/src/ef_data_1/reg_key_slot_11_w0.rs index 3e6b631..25bdc22 100644 --- a/src/ef_data_1/reg_key_slot_11_w0.rs +++ b/src/ef_data_1/reg_key_slot_11_w0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,13 +28,15 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } impl W { #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -51,11 +54,10 @@ impl crate::Readable for REG_KEY_SLOT_11_W0_SPEC { #[doc = "`write(|w| ..)` method takes [reg_key_slot_11_w0::W](W) writer structure"] impl crate::Writable for REG_KEY_SLOT_11_W0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets reg_key_slot_11_w0 to value 0"] impl crate::Resettable for REG_KEY_SLOT_11_W0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_1/reg_key_slot_11_w1.rs b/src/ef_data_1/reg_key_slot_11_w1.rs index e139abf..ca7771b 100644 --- a/src/ef_data_1/reg_key_slot_11_w1.rs +++ b/src/ef_data_1/reg_key_slot_11_w1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,13 +28,15 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } impl W { #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -51,11 +54,10 @@ impl crate::Readable for REG_KEY_SLOT_11_W1_SPEC { #[doc = "`write(|w| ..)` method takes [reg_key_slot_11_w1::W](W) writer structure"] impl crate::Writable for REG_KEY_SLOT_11_W1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets reg_key_slot_11_w1 to value 0"] impl crate::Resettable for REG_KEY_SLOT_11_W1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_1/reg_key_slot_11_w2.rs b/src/ef_data_1/reg_key_slot_11_w2.rs index 3152c31..00c868d 100644 --- a/src/ef_data_1/reg_key_slot_11_w2.rs +++ b/src/ef_data_1/reg_key_slot_11_w2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,13 +28,15 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } impl W { #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -51,11 +54,10 @@ impl crate::Readable for REG_KEY_SLOT_11_W2_SPEC { #[doc = "`write(|w| ..)` method takes [reg_key_slot_11_w2::W](W) writer structure"] impl crate::Writable for REG_KEY_SLOT_11_W2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets reg_key_slot_11_w2 to value 0"] impl crate::Resettable for REG_KEY_SLOT_11_W2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_1/reg_key_slot_11_w3.rs b/src/ef_data_1/reg_key_slot_11_w3.rs index a88787e..ea167d5 100644 --- a/src/ef_data_1/reg_key_slot_11_w3.rs +++ b/src/ef_data_1/reg_key_slot_11_w3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,13 +28,15 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } impl W { #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -51,11 +54,10 @@ impl crate::Readable for REG_KEY_SLOT_11_W3_SPEC { #[doc = "`write(|w| ..)` method takes [reg_key_slot_11_w3::W](W) writer structure"] impl crate::Writable for REG_KEY_SLOT_11_W3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets reg_key_slot_11_w3 to value 0"] impl crate::Resettable for REG_KEY_SLOT_11_W3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_1/reg_key_slot_6_w0.rs b/src/ef_data_1/reg_key_slot_6_w0.rs index 80d1054..ed5602d 100644 --- a/src/ef_data_1/reg_key_slot_6_w0.rs +++ b/src/ef_data_1/reg_key_slot_6_w0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `reg_key_slot_6_w0` reader - "] -pub struct REG_KEY_SLOT_6_W0_R(crate::FieldReader); -impl REG_KEY_SLOT_6_W0_R { - pub(crate) fn new(bits: u32) -> Self { - REG_KEY_SLOT_6_W0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_KEY_SLOT_6_W0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type REG_KEY_SLOT_6_W0_R = crate::FieldReader; #[doc = "Field `reg_key_slot_6_w0` writer - "] -pub struct REG_KEY_SLOT_6_W0_W<'a> { - w: &'a mut W, -} -impl<'a> REG_KEY_SLOT_6_W0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type REG_KEY_SLOT_6_W0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, REG_KEY_SLOT_6_W0_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn reg_key_slot_6_w0(&self) -> REG_KEY_SLOT_6_W0_R { - REG_KEY_SLOT_6_W0_R::new((self.bits & 0xffff_ffff) as u32) + REG_KEY_SLOT_6_W0_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn reg_key_slot_6_w0(&mut self) -> REG_KEY_SLOT_6_W0_W { - REG_KEY_SLOT_6_W0_W { w: self } + #[must_use] + pub fn reg_key_slot_6_w0(&mut self) -> REG_KEY_SLOT_6_W0_W<0> { + REG_KEY_SLOT_6_W0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for REG_KEY_SLOT_6_W0_SPEC { #[doc = "`write(|w| ..)` method takes [reg_key_slot_6_w0::W](W) writer structure"] impl crate::Writable for REG_KEY_SLOT_6_W0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets reg_key_slot_6_w0 to value 0"] impl crate::Resettable for REG_KEY_SLOT_6_W0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_1/reg_key_slot_6_w1.rs b/src/ef_data_1/reg_key_slot_6_w1.rs index 9b06b2f..dcbbb3e 100644 --- a/src/ef_data_1/reg_key_slot_6_w1.rs +++ b/src/ef_data_1/reg_key_slot_6_w1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `reg_key_slot_6_w1` reader - "] -pub struct REG_KEY_SLOT_6_W1_R(crate::FieldReader); -impl REG_KEY_SLOT_6_W1_R { - pub(crate) fn new(bits: u32) -> Self { - REG_KEY_SLOT_6_W1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_KEY_SLOT_6_W1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type REG_KEY_SLOT_6_W1_R = crate::FieldReader; #[doc = "Field `reg_key_slot_6_w1` writer - "] -pub struct REG_KEY_SLOT_6_W1_W<'a> { - w: &'a mut W, -} -impl<'a> REG_KEY_SLOT_6_W1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type REG_KEY_SLOT_6_W1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, REG_KEY_SLOT_6_W1_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn reg_key_slot_6_w1(&self) -> REG_KEY_SLOT_6_W1_R { - REG_KEY_SLOT_6_W1_R::new((self.bits & 0xffff_ffff) as u32) + REG_KEY_SLOT_6_W1_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn reg_key_slot_6_w1(&mut self) -> REG_KEY_SLOT_6_W1_W { - REG_KEY_SLOT_6_W1_W { w: self } + #[must_use] + pub fn reg_key_slot_6_w1(&mut self) -> REG_KEY_SLOT_6_W1_W<0> { + REG_KEY_SLOT_6_W1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for REG_KEY_SLOT_6_W1_SPEC { #[doc = "`write(|w| ..)` method takes [reg_key_slot_6_w1::W](W) writer structure"] impl crate::Writable for REG_KEY_SLOT_6_W1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets reg_key_slot_6_w1 to value 0"] impl crate::Resettable for REG_KEY_SLOT_6_W1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_1/reg_key_slot_6_w2.rs b/src/ef_data_1/reg_key_slot_6_w2.rs index d03039d..4afd1df 100644 --- a/src/ef_data_1/reg_key_slot_6_w2.rs +++ b/src/ef_data_1/reg_key_slot_6_w2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `reg_key_slot_6_w2` reader - "] -pub struct REG_KEY_SLOT_6_W2_R(crate::FieldReader); -impl REG_KEY_SLOT_6_W2_R { - pub(crate) fn new(bits: u32) -> Self { - REG_KEY_SLOT_6_W2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_KEY_SLOT_6_W2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type REG_KEY_SLOT_6_W2_R = crate::FieldReader; #[doc = "Field `reg_key_slot_6_w2` writer - "] -pub struct REG_KEY_SLOT_6_W2_W<'a> { - w: &'a mut W, -} -impl<'a> REG_KEY_SLOT_6_W2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type REG_KEY_SLOT_6_W2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, REG_KEY_SLOT_6_W2_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn reg_key_slot_6_w2(&self) -> REG_KEY_SLOT_6_W2_R { - REG_KEY_SLOT_6_W2_R::new((self.bits & 0xffff_ffff) as u32) + REG_KEY_SLOT_6_W2_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn reg_key_slot_6_w2(&mut self) -> REG_KEY_SLOT_6_W2_W { - REG_KEY_SLOT_6_W2_W { w: self } + #[must_use] + pub fn reg_key_slot_6_w2(&mut self) -> REG_KEY_SLOT_6_W2_W<0> { + REG_KEY_SLOT_6_W2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for REG_KEY_SLOT_6_W2_SPEC { #[doc = "`write(|w| ..)` method takes [reg_key_slot_6_w2::W](W) writer structure"] impl crate::Writable for REG_KEY_SLOT_6_W2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets reg_key_slot_6_w2 to value 0"] impl crate::Resettable for REG_KEY_SLOT_6_W2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_1/reg_key_slot_6_w3.rs b/src/ef_data_1/reg_key_slot_6_w3.rs index 6f99832..6607494 100644 --- a/src/ef_data_1/reg_key_slot_6_w3.rs +++ b/src/ef_data_1/reg_key_slot_6_w3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `reg_key_slot_6_w3` reader - "] -pub struct REG_KEY_SLOT_6_W3_R(crate::FieldReader); -impl REG_KEY_SLOT_6_W3_R { - pub(crate) fn new(bits: u32) -> Self { - REG_KEY_SLOT_6_W3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_KEY_SLOT_6_W3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type REG_KEY_SLOT_6_W3_R = crate::FieldReader; #[doc = "Field `reg_key_slot_6_w3` writer - "] -pub struct REG_KEY_SLOT_6_W3_W<'a> { - w: &'a mut W, -} -impl<'a> REG_KEY_SLOT_6_W3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type REG_KEY_SLOT_6_W3_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, REG_KEY_SLOT_6_W3_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn reg_key_slot_6_w3(&self) -> REG_KEY_SLOT_6_W3_R { - REG_KEY_SLOT_6_W3_R::new((self.bits & 0xffff_ffff) as u32) + REG_KEY_SLOT_6_W3_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn reg_key_slot_6_w3(&mut self) -> REG_KEY_SLOT_6_W3_W { - REG_KEY_SLOT_6_W3_W { w: self } + #[must_use] + pub fn reg_key_slot_6_w3(&mut self) -> REG_KEY_SLOT_6_W3_W<0> { + REG_KEY_SLOT_6_W3_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for REG_KEY_SLOT_6_W3_SPEC { #[doc = "`write(|w| ..)` method takes [reg_key_slot_6_w3::W](W) writer structure"] impl crate::Writable for REG_KEY_SLOT_6_W3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets reg_key_slot_6_w3 to value 0"] impl crate::Resettable for REG_KEY_SLOT_6_W3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_1/reg_key_slot_7_w0.rs b/src/ef_data_1/reg_key_slot_7_w0.rs index 0e41b08..d4d9fe8 100644 --- a/src/ef_data_1/reg_key_slot_7_w0.rs +++ b/src/ef_data_1/reg_key_slot_7_w0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `reg_key_slot_7_w0` reader - "] -pub struct REG_KEY_SLOT_7_W0_R(crate::FieldReader); -impl REG_KEY_SLOT_7_W0_R { - pub(crate) fn new(bits: u32) -> Self { - REG_KEY_SLOT_7_W0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_KEY_SLOT_7_W0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type REG_KEY_SLOT_7_W0_R = crate::FieldReader; #[doc = "Field `reg_key_slot_7_w0` writer - "] -pub struct REG_KEY_SLOT_7_W0_W<'a> { - w: &'a mut W, -} -impl<'a> REG_KEY_SLOT_7_W0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type REG_KEY_SLOT_7_W0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, REG_KEY_SLOT_7_W0_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn reg_key_slot_7_w0(&self) -> REG_KEY_SLOT_7_W0_R { - REG_KEY_SLOT_7_W0_R::new((self.bits & 0xffff_ffff) as u32) + REG_KEY_SLOT_7_W0_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn reg_key_slot_7_w0(&mut self) -> REG_KEY_SLOT_7_W0_W { - REG_KEY_SLOT_7_W0_W { w: self } + #[must_use] + pub fn reg_key_slot_7_w0(&mut self) -> REG_KEY_SLOT_7_W0_W<0> { + REG_KEY_SLOT_7_W0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for REG_KEY_SLOT_7_W0_SPEC { #[doc = "`write(|w| ..)` method takes [reg_key_slot_7_w0::W](W) writer structure"] impl crate::Writable for REG_KEY_SLOT_7_W0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets reg_key_slot_7_w0 to value 0"] impl crate::Resettable for REG_KEY_SLOT_7_W0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_1/reg_key_slot_7_w1.rs b/src/ef_data_1/reg_key_slot_7_w1.rs index 8bb6c4b..6754e75 100644 --- a/src/ef_data_1/reg_key_slot_7_w1.rs +++ b/src/ef_data_1/reg_key_slot_7_w1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `reg_key_slot_7_w1` reader - "] -pub struct REG_KEY_SLOT_7_W1_R(crate::FieldReader); -impl REG_KEY_SLOT_7_W1_R { - pub(crate) fn new(bits: u32) -> Self { - REG_KEY_SLOT_7_W1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_KEY_SLOT_7_W1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type REG_KEY_SLOT_7_W1_R = crate::FieldReader; #[doc = "Field `reg_key_slot_7_w1` writer - "] -pub struct REG_KEY_SLOT_7_W1_W<'a> { - w: &'a mut W, -} -impl<'a> REG_KEY_SLOT_7_W1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type REG_KEY_SLOT_7_W1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, REG_KEY_SLOT_7_W1_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn reg_key_slot_7_w1(&self) -> REG_KEY_SLOT_7_W1_R { - REG_KEY_SLOT_7_W1_R::new((self.bits & 0xffff_ffff) as u32) + REG_KEY_SLOT_7_W1_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn reg_key_slot_7_w1(&mut self) -> REG_KEY_SLOT_7_W1_W { - REG_KEY_SLOT_7_W1_W { w: self } + #[must_use] + pub fn reg_key_slot_7_w1(&mut self) -> REG_KEY_SLOT_7_W1_W<0> { + REG_KEY_SLOT_7_W1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for REG_KEY_SLOT_7_W1_SPEC { #[doc = "`write(|w| ..)` method takes [reg_key_slot_7_w1::W](W) writer structure"] impl crate::Writable for REG_KEY_SLOT_7_W1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets reg_key_slot_7_w1 to value 0"] impl crate::Resettable for REG_KEY_SLOT_7_W1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_1/reg_key_slot_7_w2.rs b/src/ef_data_1/reg_key_slot_7_w2.rs index 2d2a856..b0e498d 100644 --- a/src/ef_data_1/reg_key_slot_7_w2.rs +++ b/src/ef_data_1/reg_key_slot_7_w2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `reg_key_slot_7_w2` reader - "] -pub struct REG_KEY_SLOT_7_W2_R(crate::FieldReader); -impl REG_KEY_SLOT_7_W2_R { - pub(crate) fn new(bits: u32) -> Self { - REG_KEY_SLOT_7_W2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_KEY_SLOT_7_W2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type REG_KEY_SLOT_7_W2_R = crate::FieldReader; #[doc = "Field `reg_key_slot_7_w2` writer - "] -pub struct REG_KEY_SLOT_7_W2_W<'a> { - w: &'a mut W, -} -impl<'a> REG_KEY_SLOT_7_W2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type REG_KEY_SLOT_7_W2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, REG_KEY_SLOT_7_W2_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn reg_key_slot_7_w2(&self) -> REG_KEY_SLOT_7_W2_R { - REG_KEY_SLOT_7_W2_R::new((self.bits & 0xffff_ffff) as u32) + REG_KEY_SLOT_7_W2_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn reg_key_slot_7_w2(&mut self) -> REG_KEY_SLOT_7_W2_W { - REG_KEY_SLOT_7_W2_W { w: self } + #[must_use] + pub fn reg_key_slot_7_w2(&mut self) -> REG_KEY_SLOT_7_W2_W<0> { + REG_KEY_SLOT_7_W2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for REG_KEY_SLOT_7_W2_SPEC { #[doc = "`write(|w| ..)` method takes [reg_key_slot_7_w2::W](W) writer structure"] impl crate::Writable for REG_KEY_SLOT_7_W2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets reg_key_slot_7_w2 to value 0"] impl crate::Resettable for REG_KEY_SLOT_7_W2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_1/reg_key_slot_7_w3.rs b/src/ef_data_1/reg_key_slot_7_w3.rs index e3a4fdb..982446e 100644 --- a/src/ef_data_1/reg_key_slot_7_w3.rs +++ b/src/ef_data_1/reg_key_slot_7_w3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `reg_key_slot_7_w3` reader - "] -pub struct REG_KEY_SLOT_7_W3_R(crate::FieldReader); -impl REG_KEY_SLOT_7_W3_R { - pub(crate) fn new(bits: u32) -> Self { - REG_KEY_SLOT_7_W3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_KEY_SLOT_7_W3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type REG_KEY_SLOT_7_W3_R = crate::FieldReader; #[doc = "Field `reg_key_slot_7_w3` writer - "] -pub struct REG_KEY_SLOT_7_W3_W<'a> { - w: &'a mut W, -} -impl<'a> REG_KEY_SLOT_7_W3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type REG_KEY_SLOT_7_W3_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, REG_KEY_SLOT_7_W3_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn reg_key_slot_7_w3(&self) -> REG_KEY_SLOT_7_W3_R { - REG_KEY_SLOT_7_W3_R::new((self.bits & 0xffff_ffff) as u32) + REG_KEY_SLOT_7_W3_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn reg_key_slot_7_w3(&mut self) -> REG_KEY_SLOT_7_W3_W { - REG_KEY_SLOT_7_W3_W { w: self } + #[must_use] + pub fn reg_key_slot_7_w3(&mut self) -> REG_KEY_SLOT_7_W3_W<0> { + REG_KEY_SLOT_7_W3_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for REG_KEY_SLOT_7_W3_SPEC { #[doc = "`write(|w| ..)` method takes [reg_key_slot_7_w3::W](W) writer structure"] impl crate::Writable for REG_KEY_SLOT_7_W3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets reg_key_slot_7_w3 to value 0"] impl crate::Resettable for REG_KEY_SLOT_7_W3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_1/reg_key_slot_8_w0.rs b/src/ef_data_1/reg_key_slot_8_w0.rs index 06e9dba..2d6d7e6 100644 --- a/src/ef_data_1/reg_key_slot_8_w0.rs +++ b/src/ef_data_1/reg_key_slot_8_w0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `reg_key_slot_8_w0` reader - "] -pub struct REG_KEY_SLOT_8_W0_R(crate::FieldReader); -impl REG_KEY_SLOT_8_W0_R { - pub(crate) fn new(bits: u32) -> Self { - REG_KEY_SLOT_8_W0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_KEY_SLOT_8_W0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type REG_KEY_SLOT_8_W0_R = crate::FieldReader; #[doc = "Field `reg_key_slot_8_w0` writer - "] -pub struct REG_KEY_SLOT_8_W0_W<'a> { - w: &'a mut W, -} -impl<'a> REG_KEY_SLOT_8_W0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type REG_KEY_SLOT_8_W0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, REG_KEY_SLOT_8_W0_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn reg_key_slot_8_w0(&self) -> REG_KEY_SLOT_8_W0_R { - REG_KEY_SLOT_8_W0_R::new((self.bits & 0xffff_ffff) as u32) + REG_KEY_SLOT_8_W0_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn reg_key_slot_8_w0(&mut self) -> REG_KEY_SLOT_8_W0_W { - REG_KEY_SLOT_8_W0_W { w: self } + #[must_use] + pub fn reg_key_slot_8_w0(&mut self) -> REG_KEY_SLOT_8_W0_W<0> { + REG_KEY_SLOT_8_W0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for REG_KEY_SLOT_8_W0_SPEC { #[doc = "`write(|w| ..)` method takes [reg_key_slot_8_w0::W](W) writer structure"] impl crate::Writable for REG_KEY_SLOT_8_W0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets reg_key_slot_8_w0 to value 0"] impl crate::Resettable for REG_KEY_SLOT_8_W0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_1/reg_key_slot_8_w1.rs b/src/ef_data_1/reg_key_slot_8_w1.rs index efab6f2..c6a603b 100644 --- a/src/ef_data_1/reg_key_slot_8_w1.rs +++ b/src/ef_data_1/reg_key_slot_8_w1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `reg_key_slot_8_w1` reader - "] -pub struct REG_KEY_SLOT_8_W1_R(crate::FieldReader); -impl REG_KEY_SLOT_8_W1_R { - pub(crate) fn new(bits: u32) -> Self { - REG_KEY_SLOT_8_W1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_KEY_SLOT_8_W1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type REG_KEY_SLOT_8_W1_R = crate::FieldReader; #[doc = "Field `reg_key_slot_8_w1` writer - "] -pub struct REG_KEY_SLOT_8_W1_W<'a> { - w: &'a mut W, -} -impl<'a> REG_KEY_SLOT_8_W1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type REG_KEY_SLOT_8_W1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, REG_KEY_SLOT_8_W1_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn reg_key_slot_8_w1(&self) -> REG_KEY_SLOT_8_W1_R { - REG_KEY_SLOT_8_W1_R::new((self.bits & 0xffff_ffff) as u32) + REG_KEY_SLOT_8_W1_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn reg_key_slot_8_w1(&mut self) -> REG_KEY_SLOT_8_W1_W { - REG_KEY_SLOT_8_W1_W { w: self } + #[must_use] + pub fn reg_key_slot_8_w1(&mut self) -> REG_KEY_SLOT_8_W1_W<0> { + REG_KEY_SLOT_8_W1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for REG_KEY_SLOT_8_W1_SPEC { #[doc = "`write(|w| ..)` method takes [reg_key_slot_8_w1::W](W) writer structure"] impl crate::Writable for REG_KEY_SLOT_8_W1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets reg_key_slot_8_w1 to value 0"] impl crate::Resettable for REG_KEY_SLOT_8_W1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_1/reg_key_slot_8_w2.rs b/src/ef_data_1/reg_key_slot_8_w2.rs index 105a030..2bed428 100644 --- a/src/ef_data_1/reg_key_slot_8_w2.rs +++ b/src/ef_data_1/reg_key_slot_8_w2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `reg_key_slot_8_w2` reader - "] -pub struct REG_KEY_SLOT_8_W2_R(crate::FieldReader); -impl REG_KEY_SLOT_8_W2_R { - pub(crate) fn new(bits: u32) -> Self { - REG_KEY_SLOT_8_W2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_KEY_SLOT_8_W2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type REG_KEY_SLOT_8_W2_R = crate::FieldReader; #[doc = "Field `reg_key_slot_8_w2` writer - "] -pub struct REG_KEY_SLOT_8_W2_W<'a> { - w: &'a mut W, -} -impl<'a> REG_KEY_SLOT_8_W2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type REG_KEY_SLOT_8_W2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, REG_KEY_SLOT_8_W2_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn reg_key_slot_8_w2(&self) -> REG_KEY_SLOT_8_W2_R { - REG_KEY_SLOT_8_W2_R::new((self.bits & 0xffff_ffff) as u32) + REG_KEY_SLOT_8_W2_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn reg_key_slot_8_w2(&mut self) -> REG_KEY_SLOT_8_W2_W { - REG_KEY_SLOT_8_W2_W { w: self } + #[must_use] + pub fn reg_key_slot_8_w2(&mut self) -> REG_KEY_SLOT_8_W2_W<0> { + REG_KEY_SLOT_8_W2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for REG_KEY_SLOT_8_W2_SPEC { #[doc = "`write(|w| ..)` method takes [reg_key_slot_8_w2::W](W) writer structure"] impl crate::Writable for REG_KEY_SLOT_8_W2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets reg_key_slot_8_w2 to value 0"] impl crate::Resettable for REG_KEY_SLOT_8_W2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_1/reg_key_slot_8_w3.rs b/src/ef_data_1/reg_key_slot_8_w3.rs index 7af75e6..01613be 100644 --- a/src/ef_data_1/reg_key_slot_8_w3.rs +++ b/src/ef_data_1/reg_key_slot_8_w3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `reg_key_slot_8_w3` reader - "] -pub struct REG_KEY_SLOT_8_W3_R(crate::FieldReader); -impl REG_KEY_SLOT_8_W3_R { - pub(crate) fn new(bits: u32) -> Self { - REG_KEY_SLOT_8_W3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_KEY_SLOT_8_W3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type REG_KEY_SLOT_8_W3_R = crate::FieldReader; #[doc = "Field `reg_key_slot_8_w3` writer - "] -pub struct REG_KEY_SLOT_8_W3_W<'a> { - w: &'a mut W, -} -impl<'a> REG_KEY_SLOT_8_W3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type REG_KEY_SLOT_8_W3_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, REG_KEY_SLOT_8_W3_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn reg_key_slot_8_w3(&self) -> REG_KEY_SLOT_8_W3_R { - REG_KEY_SLOT_8_W3_R::new((self.bits & 0xffff_ffff) as u32) + REG_KEY_SLOT_8_W3_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn reg_key_slot_8_w3(&mut self) -> REG_KEY_SLOT_8_W3_W { - REG_KEY_SLOT_8_W3_W { w: self } + #[must_use] + pub fn reg_key_slot_8_w3(&mut self) -> REG_KEY_SLOT_8_W3_W<0> { + REG_KEY_SLOT_8_W3_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for REG_KEY_SLOT_8_W3_SPEC { #[doc = "`write(|w| ..)` method takes [reg_key_slot_8_w3::W](W) writer structure"] impl crate::Writable for REG_KEY_SLOT_8_W3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets reg_key_slot_8_w3 to value 0"] impl crate::Resettable for REG_KEY_SLOT_8_W3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_1/reg_key_slot_9_w0.rs b/src/ef_data_1/reg_key_slot_9_w0.rs index 3e42b00..7b4201f 100644 --- a/src/ef_data_1/reg_key_slot_9_w0.rs +++ b/src/ef_data_1/reg_key_slot_9_w0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `reg_key_slot_9_w0` reader - "] -pub struct REG_KEY_SLOT_9_W0_R(crate::FieldReader); -impl REG_KEY_SLOT_9_W0_R { - pub(crate) fn new(bits: u32) -> Self { - REG_KEY_SLOT_9_W0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_KEY_SLOT_9_W0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type REG_KEY_SLOT_9_W0_R = crate::FieldReader; #[doc = "Field `reg_key_slot_9_w0` writer - "] -pub struct REG_KEY_SLOT_9_W0_W<'a> { - w: &'a mut W, -} -impl<'a> REG_KEY_SLOT_9_W0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type REG_KEY_SLOT_9_W0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, REG_KEY_SLOT_9_W0_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn reg_key_slot_9_w0(&self) -> REG_KEY_SLOT_9_W0_R { - REG_KEY_SLOT_9_W0_R::new((self.bits & 0xffff_ffff) as u32) + REG_KEY_SLOT_9_W0_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn reg_key_slot_9_w0(&mut self) -> REG_KEY_SLOT_9_W0_W { - REG_KEY_SLOT_9_W0_W { w: self } + #[must_use] + pub fn reg_key_slot_9_w0(&mut self) -> REG_KEY_SLOT_9_W0_W<0> { + REG_KEY_SLOT_9_W0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for REG_KEY_SLOT_9_W0_SPEC { #[doc = "`write(|w| ..)` method takes [reg_key_slot_9_w0::W](W) writer structure"] impl crate::Writable for REG_KEY_SLOT_9_W0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets reg_key_slot_9_w0 to value 0"] impl crate::Resettable for REG_KEY_SLOT_9_W0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_1/reg_key_slot_9_w1.rs b/src/ef_data_1/reg_key_slot_9_w1.rs index 84af830..5154d90 100644 --- a/src/ef_data_1/reg_key_slot_9_w1.rs +++ b/src/ef_data_1/reg_key_slot_9_w1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `reg_key_slot_9_w1` reader - "] -pub struct REG_KEY_SLOT_9_W1_R(crate::FieldReader); -impl REG_KEY_SLOT_9_W1_R { - pub(crate) fn new(bits: u32) -> Self { - REG_KEY_SLOT_9_W1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_KEY_SLOT_9_W1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type REG_KEY_SLOT_9_W1_R = crate::FieldReader; #[doc = "Field `reg_key_slot_9_w1` writer - "] -pub struct REG_KEY_SLOT_9_W1_W<'a> { - w: &'a mut W, -} -impl<'a> REG_KEY_SLOT_9_W1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type REG_KEY_SLOT_9_W1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, REG_KEY_SLOT_9_W1_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn reg_key_slot_9_w1(&self) -> REG_KEY_SLOT_9_W1_R { - REG_KEY_SLOT_9_W1_R::new((self.bits & 0xffff_ffff) as u32) + REG_KEY_SLOT_9_W1_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn reg_key_slot_9_w1(&mut self) -> REG_KEY_SLOT_9_W1_W { - REG_KEY_SLOT_9_W1_W { w: self } + #[must_use] + pub fn reg_key_slot_9_w1(&mut self) -> REG_KEY_SLOT_9_W1_W<0> { + REG_KEY_SLOT_9_W1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for REG_KEY_SLOT_9_W1_SPEC { #[doc = "`write(|w| ..)` method takes [reg_key_slot_9_w1::W](W) writer structure"] impl crate::Writable for REG_KEY_SLOT_9_W1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets reg_key_slot_9_w1 to value 0"] impl crate::Resettable for REG_KEY_SLOT_9_W1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_1/reg_key_slot_9_w2.rs b/src/ef_data_1/reg_key_slot_9_w2.rs index 7e8e439..0d7295d 100644 --- a/src/ef_data_1/reg_key_slot_9_w2.rs +++ b/src/ef_data_1/reg_key_slot_9_w2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `reg_key_slot_9_w2` reader - "] -pub struct REG_KEY_SLOT_9_W2_R(crate::FieldReader); -impl REG_KEY_SLOT_9_W2_R { - pub(crate) fn new(bits: u32) -> Self { - REG_KEY_SLOT_9_W2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_KEY_SLOT_9_W2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type REG_KEY_SLOT_9_W2_R = crate::FieldReader; #[doc = "Field `reg_key_slot_9_w2` writer - "] -pub struct REG_KEY_SLOT_9_W2_W<'a> { - w: &'a mut W, -} -impl<'a> REG_KEY_SLOT_9_W2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type REG_KEY_SLOT_9_W2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, REG_KEY_SLOT_9_W2_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn reg_key_slot_9_w2(&self) -> REG_KEY_SLOT_9_W2_R { - REG_KEY_SLOT_9_W2_R::new((self.bits & 0xffff_ffff) as u32) + REG_KEY_SLOT_9_W2_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn reg_key_slot_9_w2(&mut self) -> REG_KEY_SLOT_9_W2_W { - REG_KEY_SLOT_9_W2_W { w: self } + #[must_use] + pub fn reg_key_slot_9_w2(&mut self) -> REG_KEY_SLOT_9_W2_W<0> { + REG_KEY_SLOT_9_W2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for REG_KEY_SLOT_9_W2_SPEC { #[doc = "`write(|w| ..)` method takes [reg_key_slot_9_w2::W](W) writer structure"] impl crate::Writable for REG_KEY_SLOT_9_W2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets reg_key_slot_9_w2 to value 0"] impl crate::Resettable for REG_KEY_SLOT_9_W2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ef_data_1/reg_key_slot_9_w3.rs b/src/ef_data_1/reg_key_slot_9_w3.rs index 0339d8c..bb8ab3f 100644 --- a/src/ef_data_1/reg_key_slot_9_w3.rs +++ b/src/ef_data_1/reg_key_slot_9_w3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `reg_key_slot_9_w3` reader - "] -pub struct REG_KEY_SLOT_9_W3_R(crate::FieldReader); -impl REG_KEY_SLOT_9_W3_R { - pub(crate) fn new(bits: u32) -> Self { - REG_KEY_SLOT_9_W3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_KEY_SLOT_9_W3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type REG_KEY_SLOT_9_W3_R = crate::FieldReader; #[doc = "Field `reg_key_slot_9_w3` writer - "] -pub struct REG_KEY_SLOT_9_W3_W<'a> { - w: &'a mut W, -} -impl<'a> REG_KEY_SLOT_9_W3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type REG_KEY_SLOT_9_W3_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, REG_KEY_SLOT_9_W3_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn reg_key_slot_9_w3(&self) -> REG_KEY_SLOT_9_W3_R { - REG_KEY_SLOT_9_W3_R::new((self.bits & 0xffff_ffff) as u32) + REG_KEY_SLOT_9_W3_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn reg_key_slot_9_w3(&mut self) -> REG_KEY_SLOT_9_W3_W { - REG_KEY_SLOT_9_W3_W { w: self } + #[must_use] + pub fn reg_key_slot_9_w3(&mut self) -> REG_KEY_SLOT_9_W3_W<0> { + REG_KEY_SLOT_9_W3_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for REG_KEY_SLOT_9_W3_SPEC { #[doc = "`write(|w| ..)` method takes [reg_key_slot_9_w3::W](W) writer structure"] impl crate::Writable for REG_KEY_SLOT_9_W3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets reg_key_slot_9_w3 to value 0"] impl crate::Resettable for REG_KEY_SLOT_9_W3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/generic.rs b/src/generic.rs index 718002c..da9c619 100644 --- a/src/generic.rs +++ b/src/generic.rs @@ -1,24 +1,66 @@ use core::marker; +#[doc = " Raw register type (`u8`, `u16`, `u32`, ...)"] +pub trait RawReg: + Copy + + Default + + From + + core::ops::BitOr + + core::ops::BitAnd + + core::ops::BitOrAssign + + core::ops::BitAndAssign + + core::ops::Not + + core::ops::Shl +{ + #[doc = " Mask for bits of width `WI`"] + fn mask() -> Self; + #[doc = " Mask for bits of width 1"] + fn one() -> Self; +} +macro_rules! raw_reg { + ($ U : ty , $ size : literal , $ mask : ident) => { + impl RawReg for $U { + #[inline(always)] + fn mask() -> Self { + $mask::() + } + #[inline(always)] + fn one() -> Self { + 1 + } + } + const fn $mask() -> $U { + <$U>::MAX >> ($size - WI) + } + }; +} +raw_reg!(u8, 8, mask_u8); +raw_reg!(u16, 16, mask_u16); +raw_reg!(u32, 32, mask_u32); +raw_reg!(u64, 64, mask_u64); #[doc = " Raw register type"] pub trait RegisterSpec { #[doc = " Raw register type (`u8`, `u16`, `u32`, ...)."] - type Ux: Copy; + type Ux: RawReg; } #[doc = " Trait implemented by readable registers to enable the `read` method."] #[doc = ""] -#[doc = " Registers marked with `Writable` can be also `modify`'ed."] +#[doc = " Registers marked with `Writable` can be also be `modify`'ed."] pub trait Readable: RegisterSpec { #[doc = " Result from a call to `read` and argument to `modify`."] - type Reader: core::convert::From> + core::ops::Deref>; + type Reader: From> + core::ops::Deref>; } #[doc = " Trait implemented by writeable registers."] #[doc = ""] #[doc = " This enables the `write`, `write_with_zero` and `reset` methods."] #[doc = ""] -#[doc = " Registers marked with `Readable` can be also `modify`'ed."] +#[doc = " Registers marked with `Readable` can be also be `modify`'ed."] pub trait Writable: RegisterSpec { #[doc = " Writer type argument to `write`, et al."] - type Writer: core::convert::From> + core::ops::DerefMut>; + type Writer: From> + core::ops::DerefMut>; + #[doc = " Specifies the register bits that are not changed if you pass `1` and are changed if you pass `0`"] + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux; + #[doc = " Specifies the register bits that are not changed if you pass `0` and are changed if you pass `1`"] + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux; } #[doc = " Reset value of the register."] #[doc = ""] @@ -26,7 +68,12 @@ pub trait Writable: RegisterSpec { #[doc = " register by using the `reset` method."] pub trait Resettable: RegisterSpec { #[doc = " Reset value of the register."] - fn reset_value() -> Self::Ux; + const RESET_VALUE: Self::Ux; + #[doc = " Reset value of the register."] + #[inline(always)] + fn reset_value() -> Self::Ux { + Self::RESET_VALUE + } } #[doc = " This structure provides volatile access to registers."] #[repr(transparent)] @@ -73,7 +120,7 @@ impl Reg { #[doc = " Resets the register to its initial state."] #[inline(always)] pub fn reset(&self) { - self.register.set(REG::reset_value()) + self.register.set(REG::RESET_VALUE) } #[doc = " Writes bits to a `Writable` register."] #[doc = ""] @@ -89,6 +136,14 @@ impl Reg { #[doc = " .field3().variant(VARIANT)"] #[doc = " );"] #[doc = " ```"] + #[doc = " or an alternative way of saying the same:"] + #[doc = " ```ignore"] + #[doc = " periph.reg.write(|w| {"] + #[doc = " w.field1().bits(newfield1bits);"] + #[doc = " w.field2().set_bit();"] + #[doc = " w.field3().variant(VARIANT)"] + #[doc = " });"] + #[doc = " ```"] #[doc = " In the latter case, other fields will be set to their reset value."] #[inline(always)] pub fn write(&self, f: F) @@ -97,30 +152,32 @@ impl Reg { { self.register.set( f(&mut REG::Writer::from(W { - bits: REG::reset_value(), + bits: REG::RESET_VALUE & !REG::ONE_TO_MODIFY_FIELDS_BITMAP + | REG::ZERO_TO_MODIFY_FIELDS_BITMAP, _reg: marker::PhantomData, })) .bits, ); } } -impl Reg -where - REG::Ux: Default, -{ +impl Reg { #[doc = " Writes 0 to a `Writable` register."] #[doc = ""] #[doc = " Similar to `write`, but unused bits will contain 0."] + #[doc = ""] + #[doc = " # Safety"] + #[doc = ""] + #[doc = " Unsafe to use with registers which don't allow to write 0."] #[inline(always)] pub unsafe fn write_with_zero(&self, f: F) where F: FnOnce(&mut REG::Writer) -> &mut W, { self.register.set( - (*f(&mut REG::Writer::from(W { + f(&mut REG::Writer::from(W { bits: REG::Ux::default(), _reg: marker::PhantomData, - }))) + })) .bits, ); } @@ -142,6 +199,14 @@ impl Reg { #[doc = " .field3().variant(VARIANT)"] #[doc = " );"] #[doc = " ```"] + #[doc = " or an alternative way of saying the same:"] + #[doc = " ```ignore"] + #[doc = " periph.reg.modify(|_, w| {"] + #[doc = " w.field1().bits(newfield1bits);"] + #[doc = " w.field2().set_bit();"] + #[doc = " w.field3().variant(VARIANT)"] + #[doc = " });"] + #[doc = " ```"] #[doc = " Other fields will have the value they had before the call to `modify`."] #[inline(always)] pub fn modify(&self, f: F) @@ -156,7 +221,8 @@ impl Reg { _reg: marker::PhantomData, }), &mut REG::Writer::from(W { - bits, + bits: bits & !REG::ONE_TO_MODIFY_FIELDS_BITMAP + | REG::ZERO_TO_MODIFY_FIELDS_BITMAP, _reg: marker::PhantomData, }), ) @@ -182,11 +248,12 @@ impl R { impl PartialEq for R where REG::Ux: PartialEq, - FI: Copy + Into, + FI: Copy, + REG::Ux: From, { #[inline(always)] fn eq(&self, other: &FI) -> bool { - self.bits.eq(&(*other).into()) + self.bits.eq(®::Ux::from(*other)) } } #[doc = " Register writer."] @@ -199,20 +266,22 @@ pub struct W { } impl W { #[doc = " Writes raw bits to the register."] + #[doc = ""] + #[doc = " # Safety"] + #[doc = ""] + #[doc = " Read datasheet or reference manual to find what values are allowed to pass."] #[inline(always)] pub unsafe fn bits(&mut self, bits: REG::Ux) -> &mut Self { self.bits = bits; self } } -#[doc = " Field reader."] -#[doc = ""] -#[doc = " Result of the `read` methods of fields."] -pub struct FieldReader { +#[doc(hidden)] +pub struct FieldReaderRaw { pub(crate) bits: U, _reg: marker::PhantomData, } -impl FieldReader +impl FieldReaderRaw where U: Copy, { @@ -225,23 +294,61 @@ where _reg: marker::PhantomData, } } +} +#[doc(hidden)] +pub struct BitReaderRaw { + pub(crate) bits: bool, + _reg: marker::PhantomData, +} +impl BitReaderRaw { + #[doc = " Creates a new instance of the reader."] + #[allow(unused)] + #[inline(always)] + pub(crate) fn new(bits: bool) -> Self { + Self { + bits, + _reg: marker::PhantomData, + } + } +} +#[doc = " Field reader."] +#[doc = ""] +#[doc = " Result of the `read` methods of fields."] +pub type FieldReader = FieldReaderRaw; +#[doc = " Bit-wise field reader"] +pub type BitReader = BitReaderRaw; +impl FieldReader +where + U: Copy, +{ #[doc = " Reads raw bits from field."] #[inline(always)] pub fn bits(&self) -> U { self.bits } } -impl PartialEq for FieldReader +impl PartialEq for FieldReader where U: PartialEq, - FI: Copy + Into, + FI: Copy, + U: From, { #[inline(always)] fn eq(&self, other: &FI) -> bool { - self.bits.eq(&(*other).into()) + self.bits.eq(&U::from(*other)) } } -impl FieldReader { +impl PartialEq for BitReader +where + FI: Copy, + bool: From, +{ + #[inline(always)] + fn eq(&self, other: &FI) -> bool { + self.bits.eq(&bool::from(*other)) + } +} +impl BitReader { #[doc = " Value of the field as raw bits."] #[inline(always)] pub fn bit(&self) -> bool { @@ -258,3 +365,270 @@ impl FieldReader { self.bit() } } +#[doc(hidden)] +pub struct Safe; +#[doc(hidden)] +pub struct Unsafe; +#[doc(hidden)] +pub struct FieldWriterRaw<'a, U, REG, N, FI, Safety, const WI: u8, const O: u8> +where + REG: Writable + RegisterSpec, + N: From, +{ + pub(crate) w: &'a mut REG::Writer, + _field: marker::PhantomData<(N, FI, Safety)>, +} +impl<'a, U, REG, N, FI, Safety, const WI: u8, const O: u8> + FieldWriterRaw<'a, U, REG, N, FI, Safety, WI, O> +where + REG: Writable + RegisterSpec, + N: From, +{ + #[doc = " Creates a new instance of the writer"] + #[allow(unused)] + #[inline(always)] + pub(crate) fn new(w: &'a mut REG::Writer) -> Self { + Self { + w, + _field: marker::PhantomData, + } + } +} +#[doc(hidden)] +pub struct BitWriterRaw<'a, U, REG, FI, M, const O: u8> +where + REG: Writable + RegisterSpec, + bool: From, +{ + pub(crate) w: &'a mut REG::Writer, + _field: marker::PhantomData<(FI, M)>, +} +impl<'a, U, REG, FI, M, const O: u8> BitWriterRaw<'a, U, REG, FI, M, O> +where + REG: Writable + RegisterSpec, + bool: From, +{ + #[doc = " Creates a new instance of the writer"] + #[allow(unused)] + #[inline(always)] + pub(crate) fn new(w: &'a mut REG::Writer) -> Self { + Self { + w, + _field: marker::PhantomData, + } + } +} +#[doc = " Write field Proxy with unsafe `bits`"] +pub type FieldWriter<'a, U, REG, N, FI, const WI: u8, const O: u8> = + FieldWriterRaw<'a, U, REG, N, FI, Unsafe, WI, O>; +#[doc = " Write field Proxy with safe `bits`"] +pub type FieldWriterSafe<'a, U, REG, N, FI, const WI: u8, const O: u8> = + FieldWriterRaw<'a, U, REG, N, FI, Safe, WI, O>; +impl<'a, U, REG, N, FI, const WI: u8, const OF: u8> FieldWriter<'a, U, REG, N, FI, WI, OF> +where + REG: Writable + RegisterSpec, + N: From, +{ + #[doc = " Field width"] + pub const WIDTH: u8 = WI; +} +impl<'a, U, REG, N, FI, const WI: u8, const OF: u8> FieldWriterSafe<'a, U, REG, N, FI, WI, OF> +where + REG: Writable + RegisterSpec, + N: From, +{ + #[doc = " Field width"] + pub const WIDTH: u8 = WI; +} +macro_rules! bit_proxy { + ($ writer : ident , $ mwv : ident) => { + #[doc(hidden)] + pub struct $mwv; + #[doc = " Bit-wise write field proxy"] + pub type $writer<'a, U, REG, FI, const O: u8> = BitWriterRaw<'a, U, REG, FI, $mwv, O>; + impl<'a, U, REG, FI, const OF: u8> $writer<'a, U, REG, FI, OF> + where + REG: Writable + RegisterSpec, + bool: From, + { + #[doc = " Field width"] + pub const WIDTH: u8 = 1; + } + }; +} +macro_rules! impl_bit_proxy { + ($ writer : ident) => { + impl<'a, U, REG, FI, const OF: u8> $writer<'a, U, REG, FI, OF> + where + REG: Writable + RegisterSpec, + U: RawReg, + bool: From, + { + #[doc = " Writes bit to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut REG::Writer { + self.w.bits &= !(U::one() << OF); + self.w.bits |= (U::from(value) & U::one()) << OF; + self.w + } + #[doc = " Writes `variant` to the field"] + #[inline(always)] + pub fn variant(self, variant: FI) -> &'a mut REG::Writer { + self.bit(bool::from(variant)) + } + } + }; +} +bit_proxy!(BitWriter, BitM); +bit_proxy!(BitWriter1S, Bit1S); +bit_proxy!(BitWriter0C, Bit0C); +bit_proxy!(BitWriter1C, Bit1C); +bit_proxy!(BitWriter0S, Bit0S); +bit_proxy!(BitWriter1T, Bit1T); +bit_proxy!(BitWriter0T, Bit0T); +impl<'a, U, REG, N, FI, const WI: u8, const OF: u8> FieldWriter<'a, U, REG, N, FI, WI, OF> +where + REG: Writable + RegisterSpec, + U: RawReg + From, + N: From, +{ + #[doc = " Writes raw bits to the field"] + #[doc = ""] + #[doc = " # Safety"] + #[doc = ""] + #[doc = " Passing incorrect value can cause undefined behaviour. See reference manual"] + #[inline(always)] + pub unsafe fn bits(self, value: N) -> &'a mut REG::Writer { + self.w.bits &= !(U::mask::() << OF); + self.w.bits |= (U::from(value) & U::mask::()) << OF; + self.w + } + #[doc = " Writes `variant` to the field"] + #[inline(always)] + pub fn variant(self, variant: FI) -> &'a mut REG::Writer { + unsafe { self.bits(N::from(variant)) } + } +} +impl<'a, U, REG, N, FI, const WI: u8, const OF: u8> FieldWriterSafe<'a, U, REG, N, FI, WI, OF> +where + REG: Writable + RegisterSpec, + U: RawReg + From, + N: From, +{ + #[doc = " Writes raw bits to the field"] + #[inline(always)] + pub fn bits(self, value: N) -> &'a mut REG::Writer { + self.w.bits &= !(U::mask::() << OF); + self.w.bits |= (U::from(value) & U::mask::()) << OF; + self.w + } + #[doc = " Writes `variant` to the field"] + #[inline(always)] + pub fn variant(self, variant: FI) -> &'a mut REG::Writer { + self.bits(N::from(variant)) + } +} +impl_bit_proxy!(BitWriter); +impl_bit_proxy!(BitWriter1S); +impl_bit_proxy!(BitWriter0C); +impl_bit_proxy!(BitWriter1C); +impl_bit_proxy!(BitWriter0S); +impl_bit_proxy!(BitWriter1T); +impl_bit_proxy!(BitWriter0T); +impl<'a, U, REG, FI, const OF: u8> BitWriter<'a, U, REG, FI, OF> +where + REG: Writable + RegisterSpec, + U: RawReg, + bool: From, +{ + #[doc = " Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut REG::Writer { + self.w.bits |= U::one() << OF; + self.w + } + #[doc = " Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut REG::Writer { + self.w.bits &= !(U::one() << OF); + self.w + } +} +impl<'a, U, REG, FI, const OF: u8> BitWriter1S<'a, U, REG, FI, OF> +where + REG: Writable + RegisterSpec, + U: RawReg, + bool: From, +{ + #[doc = " Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut REG::Writer { + self.w.bits |= U::one() << OF; + self.w + } +} +impl<'a, U, REG, FI, const OF: u8> BitWriter0C<'a, U, REG, FI, OF> +where + REG: Writable + RegisterSpec, + U: RawReg, + bool: From, +{ + #[doc = " Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut REG::Writer { + self.w.bits &= !(U::one() << OF); + self.w + } +} +impl<'a, U, REG, FI, const OF: u8> BitWriter1C<'a, U, REG, FI, OF> +where + REG: Writable + RegisterSpec, + U: RawReg, + bool: From, +{ + #[doc = "Clears the field bit by passing one"] + #[inline(always)] + pub fn clear_bit_by_one(self) -> &'a mut REG::Writer { + self.w.bits |= U::one() << OF; + self.w + } +} +impl<'a, U, REG, FI, const OF: u8> BitWriter0S<'a, U, REG, FI, OF> +where + REG: Writable + RegisterSpec, + U: RawReg, + bool: From, +{ + #[doc = "Sets the field bit by passing zero"] + #[inline(always)] + pub fn set_bit_by_zero(self) -> &'a mut REG::Writer { + self.w.bits &= !(U::one() << OF); + self.w + } +} +impl<'a, U, REG, FI, const OF: u8> BitWriter1T<'a, U, REG, FI, OF> +where + REG: Writable + RegisterSpec, + U: RawReg, + bool: From, +{ + #[doc = "Toggle the field bit by passing one"] + #[inline(always)] + pub fn toggle_bit(self) -> &'a mut REG::Writer { + self.w.bits |= U::one() << OF; + self.w + } +} +impl<'a, U, REG, FI, const OF: u8> BitWriter0T<'a, U, REG, FI, OF> +where + REG: Writable + RegisterSpec, + U: RawReg, + bool: From, +{ + #[doc = "Toggle the field bit by passing zero"] + #[inline(always)] + pub fn toggle_bit(self) -> &'a mut REG::Writer { + self.w.bits &= !(U::one() << OF); + self.w + } +} diff --git a/src/glb.rs b/src/glb.rs index 51b59b5..e9e3b3e 100644 --- a/src/glb.rs +++ b/src/glb.rs @@ -2,455 +2,455 @@ #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - Clock configuration for processor and bus"] - pub clk_cfg0: crate::Reg, + pub clk_cfg0: CLK_CFG0, #[doc = "0x04 - clk_cfg1."] - pub clk_cfg1: crate::Reg, + pub clk_cfg1: CLK_CFG1, #[doc = "0x08 - Clock configuration for UART and Flash"] - pub clk_cfg2: crate::Reg, + pub clk_cfg2: CLK_CFG2, #[doc = "0x0c - Clock configuration for I2C and SPI"] - pub clk_cfg3: crate::Reg, + pub clk_cfg3: CLK_CFG3, #[doc = "0x10 - swrst_cfg0."] - pub swrst_cfg0: crate::Reg, + pub swrst_cfg0: SWRST_CFG0, #[doc = "0x14 - swrst_cfg1."] - pub swrst_cfg1: crate::Reg, + pub swrst_cfg1: SWRST_CFG1, #[doc = "0x18 - swrst_cfg2."] - pub swrst_cfg2: crate::Reg, + pub swrst_cfg2: SWRST_CFG2, #[doc = "0x1c - swrst_cfg3."] - pub swrst_cfg3: crate::Reg, + pub swrst_cfg3: SWRST_CFG3, #[doc = "0x20 - cgen_cfg0."] - pub cgen_cfg0: crate::Reg, + pub cgen_cfg0: CGEN_CFG0, #[doc = "0x24 - cgen_cfg1."] - pub cgen_cfg1: crate::Reg, + pub cgen_cfg1: CGEN_CFG1, #[doc = "0x28 - cgen_cfg2."] - pub cgen_cfg2: crate::Reg, + pub cgen_cfg2: CGEN_CFG2, #[doc = "0x2c - cgen_cfg3."] - pub cgen_cfg3: crate::Reg, + pub cgen_cfg3: CGEN_CFG3, #[doc = "0x30 - MBIST_CTL."] - pub mbist_ctl: crate::Reg, + pub mbist_ctl: MBIST_CTL, #[doc = "0x34 - MBIST_STAT."] - pub mbist_stat: crate::Reg, - _reserved14: [u8; 24usize], + pub mbist_stat: MBIST_STAT, + _reserved14: [u8; 0x18], #[doc = "0x50 - bmx_cfg1."] - pub bmx_cfg1: crate::Reg, + pub bmx_cfg1: BMX_CFG1, #[doc = "0x54 - bmx_cfg2."] - pub bmx_cfg2: crate::Reg, + pub bmx_cfg2: BMX_CFG2, #[doc = "0x58 - bmx_err_addr."] - pub bmx_err_addr: crate::Reg, + pub bmx_err_addr: BMX_ERR_ADDR, #[doc = "0x5c - bmx_dbg_out."] - pub bmx_dbg_out: crate::Reg, + pub bmx_dbg_out: BMX_DBG_OUT, #[doc = "0x60 - rsv0."] - pub rsv0: crate::Reg, + pub rsv0: RSV0, #[doc = "0x64 - rsv1."] - pub rsv1: crate::Reg, + pub rsv1: RSV1, #[doc = "0x68 - rsv2."] - pub rsv2: crate::Reg, + pub rsv2: RSV2, #[doc = "0x6c - rsv3."] - pub rsv3: crate::Reg, + pub rsv3: RSV3, #[doc = "0x70 - sram_ret."] - pub sram_ret: crate::Reg, + pub sram_ret: SRAM_RET, #[doc = "0x74 - sram_slp."] - pub sram_slp: crate::Reg, + pub sram_slp: SRAM_SLP, #[doc = "0x78 - sram_parm."] - pub sram_parm: crate::Reg, + pub sram_parm: SRAM_PARM, #[doc = "0x7c - seam_misc."] - pub seam_misc: crate::Reg, + pub seam_misc: SEAM_MISC, #[doc = "0x80 - glb_parm."] - pub glb_parm: crate::Reg, - _reserved27: [u8; 12usize], + pub glb_parm: GLB_PARM, + _reserved27: [u8; 0x0c], #[doc = "0x90 - CPU_CLK_CFG."] - pub cpu_clk_cfg: crate::Reg, - _reserved28: [u8; 16usize], + pub cpu_clk_cfg: CPU_CLK_CFG, + _reserved28: [u8; 0x10], #[doc = "0xa4 - Clock configuration for GPADC"] - pub gpadc_32m_src_ctrl: crate::Reg, + pub gpadc_32m_src_ctrl: GPADC_32M_SRC_CTRL, #[doc = "0xa8 - DIG32K_WAKEUP_CTRL."] - pub dig32k_wakeup_ctrl: crate::Reg, + pub dig32k_wakeup_ctrl: DIG32K_WAKEUP_CTRL, #[doc = "0xac - WIFI_BT_COEX_CTRL."] - pub wifi_bt_coex_ctrl: crate::Reg, - _reserved31: [u8; 16usize], + pub wifi_bt_coex_ctrl: WIFI_BT_COEX_CTRL, + _reserved31: [u8; 0x10], #[doc = "0xc0 - UART_SIG_SEL_0."] - pub uart_sig_sel_0: crate::Reg, - _reserved32: [u8; 12usize], + pub uart_sig_sel_0: UART_SIG_SEL_0, + _reserved32: [u8; 0x0c], #[doc = "0xd0 - DBG_SEL_LL."] - pub dbg_sel_ll: crate::Reg, + pub dbg_sel_ll: DBG_SEL_LL, #[doc = "0xd4 - DBG_SEL_LH."] - pub dbg_sel_lh: crate::Reg, + pub dbg_sel_lh: DBG_SEL_LH, #[doc = "0xd8 - DBG_SEL_HL."] - pub dbg_sel_hl: crate::Reg, + pub dbg_sel_hl: DBG_SEL_HL, #[doc = "0xdc - DBG_SEL_HH."] - pub dbg_sel_hh: crate::Reg, + pub dbg_sel_hh: DBG_SEL_HH, #[doc = "0xe0 - debug."] - pub debug: crate::Reg, - _reserved37: [u8; 28usize], + pub debug: DEBUG, + _reserved37: [u8; 0x1c], #[doc = "0x100 - GPIO0, GPIO1 configuration"] - pub gpio_cfgctl0: crate::Reg, + pub gpio_cfgctl0: GPIO_CFGCTL0, #[doc = "0x104 - GPIO2, GPIO3 configuration"] - pub gpio_cfgctl1: crate::Reg, + pub gpio_cfgctl1: GPIO_CFGCTL1, #[doc = "0x108 - GPIO4, GPIO5 configuration"] - pub gpio_cfgctl2: crate::Reg, + pub gpio_cfgctl2: GPIO_CFGCTL2, #[doc = "0x10c - GPIO6, GPIO7 configuration"] - pub gpio_cfgctl3: crate::Reg, + pub gpio_cfgctl3: GPIO_CFGCTL3, #[doc = "0x110 - GPIO8, GPIO9 configuration"] - pub gpio_cfgctl4: crate::Reg, + pub gpio_cfgctl4: GPIO_CFGCTL4, #[doc = "0x114 - GPIO10, GPIO11 configuration"] - pub gpio_cfgctl5: crate::Reg, + pub gpio_cfgctl5: GPIO_CFGCTL5, #[doc = "0x118 - GPIO12, GPIO13 configuration"] - pub gpio_cfgctl6: crate::Reg, + pub gpio_cfgctl6: GPIO_CFGCTL6, #[doc = "0x11c - GPIO14, GPIO15 configuration"] - pub gpio_cfgctl7: crate::Reg, + pub gpio_cfgctl7: GPIO_CFGCTL7, #[doc = "0x120 - GPIO16, GPIO17 configuration"] - pub gpio_cfgctl8: crate::Reg, + pub gpio_cfgctl8: GPIO_CFGCTL8, #[doc = "0x124 - GPIO18, GPIO19 configuration"] - pub gpio_cfgctl9: crate::Reg, + pub gpio_cfgctl9: GPIO_CFGCTL9, #[doc = "0x128 - GPIO20, GPIO21 configuration"] - pub gpio_cfgctl10: crate::Reg, + pub gpio_cfgctl10: GPIO_CFGCTL10, #[doc = "0x12c - GPIO22, GPIO23 configuration"] - pub gpio_cfgctl11: crate::Reg, + pub gpio_cfgctl11: GPIO_CFGCTL11, #[doc = "0x130 - GPIO24, GPIO25 configuration"] - pub gpio_cfgctl12: crate::Reg, + pub gpio_cfgctl12: GPIO_CFGCTL12, #[doc = "0x134 - GPIO26, GPIO27 configuration"] - pub gpio_cfgctl13: crate::Reg, + pub gpio_cfgctl13: GPIO_CFGCTL13, #[doc = "0x138 - GPIO28 configuration"] - pub gpio_cfgctl14: crate::Reg, - _reserved52: [u8; 68usize], + pub gpio_cfgctl14: GPIO_CFGCTL14, + _reserved52: [u8; 0x44], #[doc = "0x180 - Input register for all GPIO pins. Input Enabled bit must be set in configuration register to work."] - pub gpio_cfgctl30: crate::Reg, + pub gpio_cfgctl30: GPIO_CFGCTL30, #[doc = "0x184 - Reserved according to SDK."] - pub gpio_cfgctl31: crate::Reg, + pub gpio_cfgctl31: GPIO_CFGCTL31, #[doc = "0x188 - Output register for all GPIO pins. Output Enabled bit must be set in Output Enable register to work."] - pub gpio_cfgctl32: crate::Reg, + pub gpio_cfgctl32: GPIO_CFGCTL32, #[doc = "0x18c - Reserved according to SDK."] - pub gpio_cfgctl33: crate::Reg, + pub gpio_cfgctl33: GPIO_CFGCTL33, #[doc = "0x190 - Output enable register for GPIO."] - pub gpio_cfgctl34: crate::Reg, + pub gpio_cfgctl34: GPIO_CFGCTL34, #[doc = "0x194 - Reserved according to SDK."] - pub gpio_cfgctl35: crate::Reg, - _reserved58: [u8; 8usize], + pub gpio_cfgctl35: GPIO_CFGCTL35, + _reserved58: [u8; 0x08], #[doc = "0x1a0 - Interrupt masking register. The SDK limits the GPIO pins to < 32 although the docs do not mention more than 28 GPIO pins."] - pub gpio_int_mask1: crate::Reg, - _reserved59: [u8; 4usize], + pub gpio_int_mask1: GPIO_INT_MASK1, + _reserved59: [u8; 0x04], #[doc = "0x1a8 - Interrupt status register. The SDK limits the GPIO pins to < 32 although the docs do not mention more than 28 GPIO pins."] - pub gpio_int_stat1: crate::Reg, - _reserved60: [u8; 4usize], + pub gpio_int_stat1: GPIO_INT_STAT1, + _reserved60: [u8; 0x04], #[doc = "0x1b0 - Interrupt clearing register."] - pub gpio_int_clr1: crate::Reg, - _reserved61: [u8; 12usize], + pub gpio_int_clr1: GPIO_INT_CLR1, + _reserved61: [u8; 0x0c], #[doc = "0x1c0 - GPIO interrupt trigger and control register for GPIO0-GPIO9."] - pub gpio_int_mode_set1: crate::Reg, + pub gpio_int_mode_set1: GPIO_INT_MODE_SET1, #[doc = "0x1c4 - GPIO interrupt trigger and control register for GPIO10-GPIO19."] - pub gpio_int_mode_set2: crate::Reg, + pub gpio_int_mode_set2: GPIO_INT_MODE_SET2, #[doc = "0x1c8 - GPIO interrupt trigger and control register for GPIO20-GPIO29."] - pub gpio_int_mode_set3: crate::Reg, - _reserved64: [u8; 88usize], + pub gpio_int_mode_set3: GPIO_INT_MODE_SET3, + _reserved64: [u8; 0x58], #[doc = "0x224 - led_driver."] - pub led_driver: crate::Reg, - _reserved65: [u8; 224usize], + pub led_driver: LED_DRIVER, + _reserved65: [u8; 0xe0], #[doc = "0x308 - gpdac_ctrl."] - pub gpdac_ctrl: crate::Reg, + pub gpdac_ctrl: GPDAC_CTRL, #[doc = "0x30c - gpdac_actrl."] - pub gpdac_actrl: crate::Reg, + pub gpdac_actrl: GPDAC_ACTRL, #[doc = "0x310 - gpdac_bctrl."] - pub gpdac_bctrl: crate::Reg, + pub gpdac_bctrl: GPDAC_BCTRL, #[doc = "0x314 - gpdac_data."] - pub gpdac_data: crate::Reg, - _reserved69: [u8; 3048usize], + pub gpdac_data: GPDAC_DATA, + _reserved69: [u8; 0x0be8], #[doc = "0xf00 - tzc_glb_ctrl_0."] - pub tzc_glb_ctrl_0: crate::Reg, + pub tzc_glb_ctrl_0: TZC_GLB_CTRL_0, #[doc = "0xf04 - tzc_glb_ctrl_1."] - pub tzc_glb_ctrl_1: crate::Reg, + pub tzc_glb_ctrl_1: TZC_GLB_CTRL_1, #[doc = "0xf08 - tzc_glb_ctrl_2."] - pub tzc_glb_ctrl_2: crate::Reg, + pub tzc_glb_ctrl_2: TZC_GLB_CTRL_2, #[doc = "0xf0c - Reserved according to SDK."] - pub tzc_glb_ctrl_3: crate::Reg, + pub tzc_glb_ctrl_3: TZC_GLB_CTRL_3, } -#[doc = "clk_cfg0 register accessor: an alias for `Reg`"] +#[doc = "clk_cfg0 (rw) register accessor: an alias for `Reg`"] pub type CLK_CFG0 = crate::Reg; #[doc = "Clock configuration for processor and bus"] pub mod clk_cfg0; -#[doc = "clk_cfg1 register accessor: an alias for `Reg`"] +#[doc = "clk_cfg1 (rw) register accessor: an alias for `Reg`"] pub type CLK_CFG1 = crate::Reg; #[doc = "clk_cfg1."] pub mod clk_cfg1; -#[doc = "clk_cfg2 register accessor: an alias for `Reg`"] +#[doc = "clk_cfg2 (rw) register accessor: an alias for `Reg`"] pub type CLK_CFG2 = crate::Reg; #[doc = "Clock configuration for UART and Flash"] pub mod clk_cfg2; -#[doc = "clk_cfg3 register accessor: an alias for `Reg`"] +#[doc = "clk_cfg3 (rw) register accessor: an alias for `Reg`"] pub type CLK_CFG3 = crate::Reg; #[doc = "Clock configuration for I2C and SPI"] pub mod clk_cfg3; -#[doc = "swrst_cfg0 register accessor: an alias for `Reg`"] +#[doc = "swrst_cfg0 (rw) register accessor: an alias for `Reg`"] pub type SWRST_CFG0 = crate::Reg; #[doc = "swrst_cfg0."] pub mod swrst_cfg0; -#[doc = "swrst_cfg1 register accessor: an alias for `Reg`"] +#[doc = "swrst_cfg1 (rw) register accessor: an alias for `Reg`"] pub type SWRST_CFG1 = crate::Reg; #[doc = "swrst_cfg1."] pub mod swrst_cfg1; -#[doc = "swrst_cfg2 register accessor: an alias for `Reg`"] +#[doc = "swrst_cfg2 (rw) register accessor: an alias for `Reg`"] pub type SWRST_CFG2 = crate::Reg; #[doc = "swrst_cfg2."] pub mod swrst_cfg2; -#[doc = "swrst_cfg3 register accessor: an alias for `Reg`"] +#[doc = "swrst_cfg3 (rw) register accessor: an alias for `Reg`"] pub type SWRST_CFG3 = crate::Reg; #[doc = "swrst_cfg3."] pub mod swrst_cfg3; -#[doc = "cgen_cfg0 register accessor: an alias for `Reg`"] +#[doc = "cgen_cfg0 (rw) register accessor: an alias for `Reg`"] pub type CGEN_CFG0 = crate::Reg; #[doc = "cgen_cfg0."] pub mod cgen_cfg0; -#[doc = "cgen_cfg1 register accessor: an alias for `Reg`"] +#[doc = "cgen_cfg1 (rw) register accessor: an alias for `Reg`"] pub type CGEN_CFG1 = crate::Reg; #[doc = "cgen_cfg1."] pub mod cgen_cfg1; -#[doc = "cgen_cfg2 register accessor: an alias for `Reg`"] +#[doc = "cgen_cfg2 (rw) register accessor: an alias for `Reg`"] pub type CGEN_CFG2 = crate::Reg; #[doc = "cgen_cfg2."] pub mod cgen_cfg2; -#[doc = "cgen_cfg3 register accessor: an alias for `Reg`"] +#[doc = "cgen_cfg3 (rw) register accessor: an alias for `Reg`"] pub type CGEN_CFG3 = crate::Reg; #[doc = "cgen_cfg3."] pub mod cgen_cfg3; -#[doc = "MBIST_CTL register accessor: an alias for `Reg`"] +#[doc = "MBIST_CTL (rw) register accessor: an alias for `Reg`"] pub type MBIST_CTL = crate::Reg; #[doc = "MBIST_CTL."] pub mod mbist_ctl; -#[doc = "MBIST_STAT register accessor: an alias for `Reg`"] +#[doc = "MBIST_STAT (r) register accessor: an alias for `Reg`"] pub type MBIST_STAT = crate::Reg; #[doc = "MBIST_STAT."] pub mod mbist_stat; -#[doc = "bmx_cfg1 register accessor: an alias for `Reg`"] +#[doc = "bmx_cfg1 (rw) register accessor: an alias for `Reg`"] pub type BMX_CFG1 = crate::Reg; #[doc = "bmx_cfg1."] pub mod bmx_cfg1; -#[doc = "bmx_cfg2 register accessor: an alias for `Reg`"] +#[doc = "bmx_cfg2 (rw) register accessor: an alias for `Reg`"] pub type BMX_CFG2 = crate::Reg; #[doc = "bmx_cfg2."] pub mod bmx_cfg2; -#[doc = "bmx_err_addr register accessor: an alias for `Reg`"] +#[doc = "bmx_err_addr (r) register accessor: an alias for `Reg`"] pub type BMX_ERR_ADDR = crate::Reg; #[doc = "bmx_err_addr."] pub mod bmx_err_addr; -#[doc = "bmx_dbg_out register accessor: an alias for `Reg`"] +#[doc = "bmx_dbg_out (r) register accessor: an alias for `Reg`"] pub type BMX_DBG_OUT = crate::Reg; #[doc = "bmx_dbg_out."] pub mod bmx_dbg_out; -#[doc = "rsv0 register accessor: an alias for `Reg`"] +#[doc = "rsv0 (rw) register accessor: an alias for `Reg`"] pub type RSV0 = crate::Reg; #[doc = "rsv0."] pub mod rsv0; -#[doc = "rsv1 register accessor: an alias for `Reg`"] +#[doc = "rsv1 (rw) register accessor: an alias for `Reg`"] pub type RSV1 = crate::Reg; #[doc = "rsv1."] pub mod rsv1; -#[doc = "rsv2 register accessor: an alias for `Reg`"] +#[doc = "rsv2 (rw) register accessor: an alias for `Reg`"] pub type RSV2 = crate::Reg; #[doc = "rsv2."] pub mod rsv2; -#[doc = "rsv3 register accessor: an alias for `Reg`"] +#[doc = "rsv3 (rw) register accessor: an alias for `Reg`"] pub type RSV3 = crate::Reg; #[doc = "rsv3."] pub mod rsv3; -#[doc = "sram_ret register accessor: an alias for `Reg`"] +#[doc = "sram_ret (rw) register accessor: an alias for `Reg`"] pub type SRAM_RET = crate::Reg; #[doc = "sram_ret."] pub mod sram_ret; -#[doc = "sram_slp register accessor: an alias for `Reg`"] +#[doc = "sram_slp (rw) register accessor: an alias for `Reg`"] pub type SRAM_SLP = crate::Reg; #[doc = "sram_slp."] pub mod sram_slp; -#[doc = "sram_parm register accessor: an alias for `Reg`"] +#[doc = "sram_parm (rw) register accessor: an alias for `Reg`"] pub type SRAM_PARM = crate::Reg; #[doc = "sram_parm."] pub mod sram_parm; -#[doc = "seam_misc register accessor: an alias for `Reg`"] +#[doc = "seam_misc (rw) register accessor: an alias for `Reg`"] pub type SEAM_MISC = crate::Reg; #[doc = "seam_misc."] pub mod seam_misc; -#[doc = "glb_parm register accessor: an alias for `Reg`"] +#[doc = "glb_parm (rw) register accessor: an alias for `Reg`"] pub type GLB_PARM = crate::Reg; #[doc = "glb_parm."] pub mod glb_parm; -#[doc = "CPU_CLK_CFG register accessor: an alias for `Reg`"] +#[doc = "CPU_CLK_CFG (rw) register accessor: an alias for `Reg`"] pub type CPU_CLK_CFG = crate::Reg; #[doc = "CPU_CLK_CFG."] pub mod cpu_clk_cfg; -#[doc = "GPADC_32M_SRC_CTRL register accessor: an alias for `Reg`"] +#[doc = "GPADC_32M_SRC_CTRL (rw) register accessor: an alias for `Reg`"] pub type GPADC_32M_SRC_CTRL = crate::Reg; #[doc = "Clock configuration for GPADC"] pub mod gpadc_32m_src_ctrl; -#[doc = "DIG32K_WAKEUP_CTRL register accessor: an alias for `Reg`"] +#[doc = "DIG32K_WAKEUP_CTRL (rw) register accessor: an alias for `Reg`"] pub type DIG32K_WAKEUP_CTRL = crate::Reg; #[doc = "DIG32K_WAKEUP_CTRL."] pub mod dig32k_wakeup_ctrl; -#[doc = "WIFI_BT_COEX_CTRL register accessor: an alias for `Reg`"] +#[doc = "WIFI_BT_COEX_CTRL (rw) register accessor: an alias for `Reg`"] pub type WIFI_BT_COEX_CTRL = crate::Reg; #[doc = "WIFI_BT_COEX_CTRL."] pub mod wifi_bt_coex_ctrl; -#[doc = "UART_SIG_SEL_0 register accessor: an alias for `Reg`"] +#[doc = "UART_SIG_SEL_0 (rw) register accessor: an alias for `Reg`"] pub type UART_SIG_SEL_0 = crate::Reg; #[doc = "UART_SIG_SEL_0."] pub mod uart_sig_sel_0; -#[doc = "DBG_SEL_LL register accessor: an alias for `Reg`"] +#[doc = "DBG_SEL_LL (rw) register accessor: an alias for `Reg`"] pub type DBG_SEL_LL = crate::Reg; #[doc = "DBG_SEL_LL."] pub mod dbg_sel_ll; -#[doc = "DBG_SEL_LH register accessor: an alias for `Reg`"] +#[doc = "DBG_SEL_LH (rw) register accessor: an alias for `Reg`"] pub type DBG_SEL_LH = crate::Reg; #[doc = "DBG_SEL_LH."] pub mod dbg_sel_lh; -#[doc = "DBG_SEL_HL register accessor: an alias for `Reg`"] +#[doc = "DBG_SEL_HL (rw) register accessor: an alias for `Reg`"] pub type DBG_SEL_HL = crate::Reg; #[doc = "DBG_SEL_HL."] pub mod dbg_sel_hl; -#[doc = "DBG_SEL_HH register accessor: an alias for `Reg`"] +#[doc = "DBG_SEL_HH (rw) register accessor: an alias for `Reg`"] pub type DBG_SEL_HH = crate::Reg; #[doc = "DBG_SEL_HH."] pub mod dbg_sel_hh; -#[doc = "debug register accessor: an alias for `Reg`"] +#[doc = "debug (rw) register accessor: an alias for `Reg`"] pub type DEBUG = crate::Reg; #[doc = "debug."] pub mod debug; -#[doc = "GPIO_CFGCTL0 register accessor: an alias for `Reg`"] +#[doc = "GPIO_CFGCTL0 (rw) register accessor: an alias for `Reg`"] pub type GPIO_CFGCTL0 = crate::Reg; #[doc = "GPIO0, GPIO1 configuration"] pub mod gpio_cfgctl0; -#[doc = "GPIO_CFGCTL1 register accessor: an alias for `Reg`"] +#[doc = "GPIO_CFGCTL1 (rw) register accessor: an alias for `Reg`"] pub type GPIO_CFGCTL1 = crate::Reg; #[doc = "GPIO2, GPIO3 configuration"] pub mod gpio_cfgctl1; -#[doc = "GPIO_CFGCTL2 register accessor: an alias for `Reg`"] +#[doc = "GPIO_CFGCTL2 (rw) register accessor: an alias for `Reg`"] pub type GPIO_CFGCTL2 = crate::Reg; #[doc = "GPIO4, GPIO5 configuration"] pub mod gpio_cfgctl2; -#[doc = "GPIO_CFGCTL3 register accessor: an alias for `Reg`"] +#[doc = "GPIO_CFGCTL3 (rw) register accessor: an alias for `Reg`"] pub type GPIO_CFGCTL3 = crate::Reg; #[doc = "GPIO6, GPIO7 configuration"] pub mod gpio_cfgctl3; -#[doc = "GPIO_CFGCTL4 register accessor: an alias for `Reg`"] +#[doc = "GPIO_CFGCTL4 (rw) register accessor: an alias for `Reg`"] pub type GPIO_CFGCTL4 = crate::Reg; #[doc = "GPIO8, GPIO9 configuration"] pub mod gpio_cfgctl4; -#[doc = "GPIO_CFGCTL5 register accessor: an alias for `Reg`"] +#[doc = "GPIO_CFGCTL5 (rw) register accessor: an alias for `Reg`"] pub type GPIO_CFGCTL5 = crate::Reg; #[doc = "GPIO10, GPIO11 configuration"] pub mod gpio_cfgctl5; -#[doc = "GPIO_CFGCTL6 register accessor: an alias for `Reg`"] +#[doc = "GPIO_CFGCTL6 (rw) register accessor: an alias for `Reg`"] pub type GPIO_CFGCTL6 = crate::Reg; #[doc = "GPIO12, GPIO13 configuration"] pub mod gpio_cfgctl6; -#[doc = "GPIO_CFGCTL7 register accessor: an alias for `Reg`"] +#[doc = "GPIO_CFGCTL7 (rw) register accessor: an alias for `Reg`"] pub type GPIO_CFGCTL7 = crate::Reg; #[doc = "GPIO14, GPIO15 configuration"] pub mod gpio_cfgctl7; -#[doc = "GPIO_CFGCTL8 register accessor: an alias for `Reg`"] +#[doc = "GPIO_CFGCTL8 (rw) register accessor: an alias for `Reg`"] pub type GPIO_CFGCTL8 = crate::Reg; #[doc = "GPIO16, GPIO17 configuration"] pub mod gpio_cfgctl8; -#[doc = "GPIO_CFGCTL9 register accessor: an alias for `Reg`"] +#[doc = "GPIO_CFGCTL9 (rw) register accessor: an alias for `Reg`"] pub type GPIO_CFGCTL9 = crate::Reg; #[doc = "GPIO18, GPIO19 configuration"] pub mod gpio_cfgctl9; -#[doc = "GPIO_CFGCTL10 register accessor: an alias for `Reg`"] +#[doc = "GPIO_CFGCTL10 (rw) register accessor: an alias for `Reg`"] pub type GPIO_CFGCTL10 = crate::Reg; #[doc = "GPIO20, GPIO21 configuration"] pub mod gpio_cfgctl10; -#[doc = "GPIO_CFGCTL11 register accessor: an alias for `Reg`"] +#[doc = "GPIO_CFGCTL11 (rw) register accessor: an alias for `Reg`"] pub type GPIO_CFGCTL11 = crate::Reg; #[doc = "GPIO22, GPIO23 configuration"] pub mod gpio_cfgctl11; -#[doc = "GPIO_CFGCTL12 register accessor: an alias for `Reg`"] +#[doc = "GPIO_CFGCTL12 (rw) register accessor: an alias for `Reg`"] pub type GPIO_CFGCTL12 = crate::Reg; #[doc = "GPIO24, GPIO25 configuration"] pub mod gpio_cfgctl12; -#[doc = "GPIO_CFGCTL13 register accessor: an alias for `Reg`"] +#[doc = "GPIO_CFGCTL13 (rw) register accessor: an alias for `Reg`"] pub type GPIO_CFGCTL13 = crate::Reg; #[doc = "GPIO26, GPIO27 configuration"] pub mod gpio_cfgctl13; -#[doc = "GPIO_CFGCTL14 register accessor: an alias for `Reg`"] +#[doc = "GPIO_CFGCTL14 (rw) register accessor: an alias for `Reg`"] pub type GPIO_CFGCTL14 = crate::Reg; #[doc = "GPIO28 configuration"] pub mod gpio_cfgctl14; -#[doc = "GPIO_CFGCTL30 register accessor: an alias for `Reg`"] +#[doc = "GPIO_CFGCTL30 (r) register accessor: an alias for `Reg`"] pub type GPIO_CFGCTL30 = crate::Reg; #[doc = "Input register for all GPIO pins. Input Enabled bit must be set in configuration register to work."] pub mod gpio_cfgctl30; -#[doc = "GPIO_CFGCTL31 register accessor: an alias for `Reg`"] +#[doc = "GPIO_CFGCTL31 (rw) register accessor: an alias for `Reg`"] pub type GPIO_CFGCTL31 = crate::Reg; #[doc = "Reserved according to SDK."] pub mod gpio_cfgctl31; -#[doc = "GPIO_CFGCTL32 register accessor: an alias for `Reg`"] +#[doc = "GPIO_CFGCTL32 (rw) register accessor: an alias for `Reg`"] pub type GPIO_CFGCTL32 = crate::Reg; #[doc = "Output register for all GPIO pins. Output Enabled bit must be set in Output Enable register to work."] pub mod gpio_cfgctl32; -#[doc = "GPIO_CFGCTL33 register accessor: an alias for `Reg`"] +#[doc = "GPIO_CFGCTL33 (rw) register accessor: an alias for `Reg`"] pub type GPIO_CFGCTL33 = crate::Reg; #[doc = "Reserved according to SDK."] pub mod gpio_cfgctl33; -#[doc = "GPIO_CFGCTL34 register accessor: an alias for `Reg`"] +#[doc = "GPIO_CFGCTL34 (rw) register accessor: an alias for `Reg`"] pub type GPIO_CFGCTL34 = crate::Reg; #[doc = "Output enable register for GPIO."] pub mod gpio_cfgctl34; -#[doc = "GPIO_CFGCTL35 register accessor: an alias for `Reg`"] +#[doc = "GPIO_CFGCTL35 (rw) register accessor: an alias for `Reg`"] pub type GPIO_CFGCTL35 = crate::Reg; #[doc = "Reserved according to SDK."] pub mod gpio_cfgctl35; -#[doc = "GPIO_INT_MASK1 register accessor: an alias for `Reg`"] +#[doc = "GPIO_INT_MASK1 (rw) register accessor: an alias for `Reg`"] pub type GPIO_INT_MASK1 = crate::Reg; #[doc = "Interrupt masking register. The SDK limits the GPIO pins to < 32 although the docs do not mention more than 28 GPIO pins."] pub mod gpio_int_mask1; -#[doc = "GPIO_INT_STAT1 register accessor: an alias for `Reg`"] +#[doc = "GPIO_INT_STAT1 (r) register accessor: an alias for `Reg`"] pub type GPIO_INT_STAT1 = crate::Reg; #[doc = "Interrupt status register. The SDK limits the GPIO pins to < 32 although the docs do not mention more than 28 GPIO pins."] pub mod gpio_int_stat1; -#[doc = "GPIO_INT_CLR1 register accessor: an alias for `Reg`"] +#[doc = "GPIO_INT_CLR1 (rw) register accessor: an alias for `Reg`"] pub type GPIO_INT_CLR1 = crate::Reg; #[doc = "Interrupt clearing register."] pub mod gpio_int_clr1; -#[doc = "GPIO_INT_MODE_SET1 register accessor: an alias for `Reg`"] +#[doc = "GPIO_INT_MODE_SET1 (rw) register accessor: an alias for `Reg`"] pub type GPIO_INT_MODE_SET1 = crate::Reg; #[doc = "GPIO interrupt trigger and control register for GPIO0-GPIO9."] pub mod gpio_int_mode_set1; -#[doc = "GPIO_INT_MODE_SET2 register accessor: an alias for `Reg`"] +#[doc = "GPIO_INT_MODE_SET2 (rw) register accessor: an alias for `Reg`"] pub type GPIO_INT_MODE_SET2 = crate::Reg; #[doc = "GPIO interrupt trigger and control register for GPIO10-GPIO19."] pub mod gpio_int_mode_set2; -#[doc = "GPIO_INT_MODE_SET3 register accessor: an alias for `Reg`"] +#[doc = "GPIO_INT_MODE_SET3 (rw) register accessor: an alias for `Reg`"] pub type GPIO_INT_MODE_SET3 = crate::Reg; #[doc = "GPIO interrupt trigger and control register for GPIO20-GPIO29."] pub mod gpio_int_mode_set3; -#[doc = "led_driver register accessor: an alias for `Reg`"] +#[doc = "led_driver (rw) register accessor: an alias for `Reg`"] pub type LED_DRIVER = crate::Reg; #[doc = "led_driver."] pub mod led_driver; -#[doc = "gpdac_ctrl register accessor: an alias for `Reg`"] +#[doc = "gpdac_ctrl (rw) register accessor: an alias for `Reg`"] pub type GPDAC_CTRL = crate::Reg; #[doc = "gpdac_ctrl."] pub mod gpdac_ctrl; -#[doc = "gpdac_actrl register accessor: an alias for `Reg`"] +#[doc = "gpdac_actrl (rw) register accessor: an alias for `Reg`"] pub type GPDAC_ACTRL = crate::Reg; #[doc = "gpdac_actrl."] pub mod gpdac_actrl; -#[doc = "gpdac_bctrl register accessor: an alias for `Reg`"] +#[doc = "gpdac_bctrl (rw) register accessor: an alias for `Reg`"] pub type GPDAC_BCTRL = crate::Reg; #[doc = "gpdac_bctrl."] pub mod gpdac_bctrl; -#[doc = "gpdac_data register accessor: an alias for `Reg`"] +#[doc = "gpdac_data (rw) register accessor: an alias for `Reg`"] pub type GPDAC_DATA = crate::Reg; #[doc = "gpdac_data."] pub mod gpdac_data; -#[doc = "tzc_glb_ctrl_0 register accessor: an alias for `Reg`"] +#[doc = "tzc_glb_ctrl_0 (r) register accessor: an alias for `Reg`"] pub type TZC_GLB_CTRL_0 = crate::Reg; #[doc = "tzc_glb_ctrl_0."] pub mod tzc_glb_ctrl_0; -#[doc = "tzc_glb_ctrl_1 register accessor: an alias for `Reg`"] +#[doc = "tzc_glb_ctrl_1 (r) register accessor: an alias for `Reg`"] pub type TZC_GLB_CTRL_1 = crate::Reg; #[doc = "tzc_glb_ctrl_1."] pub mod tzc_glb_ctrl_1; -#[doc = "tzc_glb_ctrl_2 register accessor: an alias for `Reg`"] +#[doc = "tzc_glb_ctrl_2 (r) register accessor: an alias for `Reg`"] pub type TZC_GLB_CTRL_2 = crate::Reg; #[doc = "tzc_glb_ctrl_2."] pub mod tzc_glb_ctrl_2; -#[doc = "tzc_glb_ctrl_3 register accessor: an alias for `Reg`"] +#[doc = "tzc_glb_ctrl_3 (rw) register accessor: an alias for `Reg`"] pub type TZC_GLB_CTRL_3 = crate::Reg; #[doc = "Reserved according to SDK."] pub mod tzc_glb_ctrl_3; diff --git a/src/glb/bmx_cfg1.rs b/src/glb/bmx_cfg1.rs index 9dca09c..0f17a6a 100644 --- a/src/glb/bmx_cfg1.rs +++ b/src/glb/bmx_cfg1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,333 +28,138 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `hbn_apb_cfg` reader - "] -pub struct HBN_APB_CFG_R(crate::FieldReader); -impl HBN_APB_CFG_R { - pub(crate) fn new(bits: u8) -> Self { - HBN_APB_CFG_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for HBN_APB_CFG_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `hbn_apb_cfg` writer - "] -pub struct HBN_APB_CFG_W<'a> { - w: &'a mut W, -} -impl<'a> HBN_APB_CFG_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 24)) | ((value as u32 & 0xff) << 24); - self.w - } -} -#[doc = "Field `pds_apb_cfg` reader - "] -pub struct PDS_APB_CFG_R(crate::FieldReader); -impl PDS_APB_CFG_R { - pub(crate) fn new(bits: u8) -> Self { - PDS_APB_CFG_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PDS_APB_CFG_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pds_apb_cfg` writer - "] -pub struct PDS_APB_CFG_W<'a> { - w: &'a mut W, -} -impl<'a> PDS_APB_CFG_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 16)) | ((value as u32 & 0xff) << 16); - self.w - } -} -#[doc = "Field `hsel_option` reader - "] -pub struct HSEL_OPTION_R(crate::FieldReader); -impl HSEL_OPTION_R { - pub(crate) fn new(bits: u8) -> Self { - HSEL_OPTION_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for HSEL_OPTION_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `hsel_option` writer - "] -pub struct HSEL_OPTION_W<'a> { - w: &'a mut W, -} -impl<'a> HSEL_OPTION_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 12)) | ((value as u32 & 0x0f) << 12); - self.w - } -} -#[doc = "Field `bmx_gating_dis` reader - "] -pub struct BMX_GATING_DIS_R(crate::FieldReader); -impl BMX_GATING_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - BMX_GATING_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for BMX_GATING_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `bmx_gating_dis` writer - "] -pub struct BMX_GATING_DIS_W<'a> { - w: &'a mut W, -} -impl<'a> BMX_GATING_DIS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); - self.w - } -} -#[doc = "Field `bmx_busy_option_dis` reader - "] -pub struct BMX_BUSY_OPTION_DIS_R(crate::FieldReader); -impl BMX_BUSY_OPTION_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - BMX_BUSY_OPTION_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for BMX_BUSY_OPTION_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `bmx_busy_option_dis` writer - "] -pub struct BMX_BUSY_OPTION_DIS_W<'a> { - w: &'a mut W, -} -impl<'a> BMX_BUSY_OPTION_DIS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w - } -} -#[doc = "Field `bmx_err_en` reader - "] -pub struct BMX_ERR_EN_R(crate::FieldReader); -impl BMX_ERR_EN_R { - pub(crate) fn new(bits: bool) -> Self { - BMX_ERR_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for BMX_ERR_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `bmx_err_en` writer - "] -pub struct BMX_ERR_EN_W<'a> { - w: &'a mut W, -} -impl<'a> BMX_ERR_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} +#[doc = "Field `bmx_timeout_en` reader - "] +pub type BMX_TIMEOUT_EN_R = crate::FieldReader; +#[doc = "Field `bmx_timeout_en` writer - "] +pub type BMX_TIMEOUT_EN_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, BMX_CFG1_SPEC, u8, u8, 4, O>; #[doc = "Field `bmx_arb_mode` reader - "] -pub struct BMX_ARB_MODE_R(crate::FieldReader); -impl BMX_ARB_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - BMX_ARB_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for BMX_ARB_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type BMX_ARB_MODE_R = crate::FieldReader; #[doc = "Field `bmx_arb_mode` writer - "] -pub struct BMX_ARB_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> BMX_ARB_MODE_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type BMX_ARB_MODE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, BMX_CFG1_SPEC, u8, u8, 2, O>; +#[doc = "Field `bmx_err_en` reader - "] +pub type BMX_ERR_EN_R = crate::BitReader; +#[doc = "Field `bmx_err_en` writer - "] +pub type BMX_ERR_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, BMX_CFG1_SPEC, bool, O>; +#[doc = "Field `bmx_busy_option_dis` reader - "] +pub type BMX_BUSY_OPTION_DIS_R = crate::BitReader; +#[doc = "Field `bmx_busy_option_dis` writer - "] +pub type BMX_BUSY_OPTION_DIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, BMX_CFG1_SPEC, bool, O>; +#[doc = "Field `bmx_gating_dis` reader - "] +pub type BMX_GATING_DIS_R = crate::BitReader; +#[doc = "Field `bmx_gating_dis` writer - "] +pub type BMX_GATING_DIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, BMX_CFG1_SPEC, bool, O>; +#[doc = "Field `hsel_option` reader - "] +pub type HSEL_OPTION_R = crate::FieldReader; +#[doc = "Field `hsel_option` writer - "] +pub type HSEL_OPTION_W<'a, const O: u8> = crate::FieldWriter<'a, u32, BMX_CFG1_SPEC, u8, u8, 4, O>; +#[doc = "Field `pds_apb_cfg` reader - "] +pub type PDS_APB_CFG_R = crate::FieldReader; +#[doc = "Field `pds_apb_cfg` writer - "] +pub type PDS_APB_CFG_W<'a, const O: u8> = crate::FieldWriter<'a, u32, BMX_CFG1_SPEC, u8, u8, 8, O>; +#[doc = "Field `hbn_apb_cfg` reader - "] +pub type HBN_APB_CFG_R = crate::FieldReader; +#[doc = "Field `hbn_apb_cfg` writer - "] +pub type HBN_APB_CFG_W<'a, const O: u8> = crate::FieldWriter<'a, u32, BMX_CFG1_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:3"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 4)) | ((value as u32 & 0x03) << 4); - self.w - } -} -#[doc = "Field `bmx_timeout_en` reader - "] -pub struct BMX_TIMEOUT_EN_R(crate::FieldReader); -impl BMX_TIMEOUT_EN_R { - pub(crate) fn new(bits: u8) -> Self { - BMX_TIMEOUT_EN_R(crate::FieldReader::new(bits)) + pub fn bmx_timeout_en(&self) -> BMX_TIMEOUT_EN_R { + BMX_TIMEOUT_EN_R::new((self.bits & 0x0f) as u8) } -} -impl core::ops::Deref for BMX_TIMEOUT_EN_R { - type Target = crate::FieldReader; + #[doc = "Bits 4:5"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn bmx_arb_mode(&self) -> BMX_ARB_MODE_R { + BMX_ARB_MODE_R::new(((self.bits >> 4) & 3) as u8) } -} -#[doc = "Field `bmx_timeout_en` writer - "] -pub struct BMX_TIMEOUT_EN_W<'a> { - w: &'a mut W, -} -impl<'a> BMX_TIMEOUT_EN_W<'a> { - #[doc = r"Writes raw bits to the field"] + #[doc = "Bit 8"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x0f) | (value as u32 & 0x0f); - self.w + pub fn bmx_err_en(&self) -> BMX_ERR_EN_R { + BMX_ERR_EN_R::new(((self.bits >> 8) & 1) != 0) } -} -impl R { - #[doc = "Bits 24:31"] + #[doc = "Bit 9"] #[inline(always)] - pub fn hbn_apb_cfg(&self) -> HBN_APB_CFG_R { - HBN_APB_CFG_R::new(((self.bits >> 24) & 0xff) as u8) + pub fn bmx_busy_option_dis(&self) -> BMX_BUSY_OPTION_DIS_R { + BMX_BUSY_OPTION_DIS_R::new(((self.bits >> 9) & 1) != 0) } - #[doc = "Bits 16:23"] + #[doc = "Bit 10"] #[inline(always)] - pub fn pds_apb_cfg(&self) -> PDS_APB_CFG_R { - PDS_APB_CFG_R::new(((self.bits >> 16) & 0xff) as u8) + pub fn bmx_gating_dis(&self) -> BMX_GATING_DIS_R { + BMX_GATING_DIS_R::new(((self.bits >> 10) & 1) != 0) } #[doc = "Bits 12:15"] #[inline(always)] pub fn hsel_option(&self) -> HSEL_OPTION_R { HSEL_OPTION_R::new(((self.bits >> 12) & 0x0f) as u8) } - #[doc = "Bit 10"] - #[inline(always)] - pub fn bmx_gating_dis(&self) -> BMX_GATING_DIS_R { - BMX_GATING_DIS_R::new(((self.bits >> 10) & 0x01) != 0) - } - #[doc = "Bit 9"] - #[inline(always)] - pub fn bmx_busy_option_dis(&self) -> BMX_BUSY_OPTION_DIS_R { - BMX_BUSY_OPTION_DIS_R::new(((self.bits >> 9) & 0x01) != 0) - } - #[doc = "Bit 8"] - #[inline(always)] - pub fn bmx_err_en(&self) -> BMX_ERR_EN_R { - BMX_ERR_EN_R::new(((self.bits >> 8) & 0x01) != 0) - } - #[doc = "Bits 4:5"] + #[doc = "Bits 16:23"] #[inline(always)] - pub fn bmx_arb_mode(&self) -> BMX_ARB_MODE_R { - BMX_ARB_MODE_R::new(((self.bits >> 4) & 0x03) as u8) + pub fn pds_apb_cfg(&self) -> PDS_APB_CFG_R { + PDS_APB_CFG_R::new(((self.bits >> 16) & 0xff) as u8) } - #[doc = "Bits 0:3"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn bmx_timeout_en(&self) -> BMX_TIMEOUT_EN_R { - BMX_TIMEOUT_EN_R::new((self.bits & 0x0f) as u8) + pub fn hbn_apb_cfg(&self) -> HBN_APB_CFG_R { + HBN_APB_CFG_R::new(((self.bits >> 24) & 0xff) as u8) } } impl W { - #[doc = "Bits 24:31"] + #[doc = "Bits 0:3"] #[inline(always)] - pub fn hbn_apb_cfg(&mut self) -> HBN_APB_CFG_W { - HBN_APB_CFG_W { w: self } + #[must_use] + pub fn bmx_timeout_en(&mut self) -> BMX_TIMEOUT_EN_W<0> { + BMX_TIMEOUT_EN_W::new(self) } - #[doc = "Bits 16:23"] + #[doc = "Bits 4:5"] #[inline(always)] - pub fn pds_apb_cfg(&mut self) -> PDS_APB_CFG_W { - PDS_APB_CFG_W { w: self } + #[must_use] + pub fn bmx_arb_mode(&mut self) -> BMX_ARB_MODE_W<4> { + BMX_ARB_MODE_W::new(self) } - #[doc = "Bits 12:15"] + #[doc = "Bit 8"] #[inline(always)] - pub fn hsel_option(&mut self) -> HSEL_OPTION_W { - HSEL_OPTION_W { w: self } + #[must_use] + pub fn bmx_err_en(&mut self) -> BMX_ERR_EN_W<8> { + BMX_ERR_EN_W::new(self) } - #[doc = "Bit 10"] + #[doc = "Bit 9"] #[inline(always)] - pub fn bmx_gating_dis(&mut self) -> BMX_GATING_DIS_W { - BMX_GATING_DIS_W { w: self } + #[must_use] + pub fn bmx_busy_option_dis(&mut self) -> BMX_BUSY_OPTION_DIS_W<9> { + BMX_BUSY_OPTION_DIS_W::new(self) } - #[doc = "Bit 9"] + #[doc = "Bit 10"] #[inline(always)] - pub fn bmx_busy_option_dis(&mut self) -> BMX_BUSY_OPTION_DIS_W { - BMX_BUSY_OPTION_DIS_W { w: self } + #[must_use] + pub fn bmx_gating_dis(&mut self) -> BMX_GATING_DIS_W<10> { + BMX_GATING_DIS_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bits 12:15"] #[inline(always)] - pub fn bmx_err_en(&mut self) -> BMX_ERR_EN_W { - BMX_ERR_EN_W { w: self } + #[must_use] + pub fn hsel_option(&mut self) -> HSEL_OPTION_W<12> { + HSEL_OPTION_W::new(self) } - #[doc = "Bits 4:5"] + #[doc = "Bits 16:23"] #[inline(always)] - pub fn bmx_arb_mode(&mut self) -> BMX_ARB_MODE_W { - BMX_ARB_MODE_W { w: self } + #[must_use] + pub fn pds_apb_cfg(&mut self) -> PDS_APB_CFG_W<16> { + PDS_APB_CFG_W::new(self) } - #[doc = "Bits 0:3"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn bmx_timeout_en(&mut self) -> BMX_TIMEOUT_EN_W { - BMX_TIMEOUT_EN_W { w: self } + #[must_use] + pub fn hbn_apb_cfg(&mut self) -> HBN_APB_CFG_W<24> { + HBN_APB_CFG_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -371,11 +177,10 @@ impl crate::Readable for BMX_CFG1_SPEC { #[doc = "`write(|w| ..)` method takes [bmx_cfg1::W](W) writer structure"] impl crate::Writable for BMX_CFG1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets bmx_cfg1 to value 0"] impl crate::Resettable for BMX_CFG1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/bmx_cfg2.rs b/src/glb/bmx_cfg2.rs index 95ef907..f55de0d 100644 --- a/src/glb/bmx_cfg2.rs +++ b/src/glb/bmx_cfg2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,135 +28,61 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `bmx_dbg_sel` reader - "] -pub struct BMX_DBG_SEL_R(crate::FieldReader); -impl BMX_DBG_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - BMX_DBG_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for BMX_DBG_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `bmx_dbg_sel` writer - "] -pub struct BMX_DBG_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> BMX_DBG_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 28)) | ((value as u32 & 0x0f) << 28); - self.w - } -} -#[doc = "Field `bmx_err_tz` reader - "] -pub struct BMX_ERR_TZ_R(crate::FieldReader); -impl BMX_ERR_TZ_R { - pub(crate) fn new(bits: bool) -> Self { - BMX_ERR_TZ_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for BMX_ERR_TZ_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `bmx_err_dec` reader - "] -pub struct BMX_ERR_DEC_R(crate::FieldReader); -impl BMX_ERR_DEC_R { - pub(crate) fn new(bits: bool) -> Self { - BMX_ERR_DEC_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for BMX_ERR_DEC_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} #[doc = "Field `bmx_err_addr_dis` reader - BMX address monitor disable"] -pub struct BMX_ERR_ADDR_DIS_R(crate::FieldReader); -impl BMX_ERR_ADDR_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - BMX_ERR_ADDR_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for BMX_ERR_ADDR_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type BMX_ERR_ADDR_DIS_R = crate::BitReader; #[doc = "Field `bmx_err_addr_dis` writer - BMX address monitor disable"] -pub struct BMX_ERR_ADDR_DIS_W<'a> { - w: &'a mut W, -} -impl<'a> BMX_ERR_ADDR_DIS_W<'a> { - #[doc = r"Sets the field bit"] +pub type BMX_ERR_ADDR_DIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, BMX_CFG2_SPEC, bool, O>; +#[doc = "Field `bmx_err_dec` reader - "] +pub type BMX_ERR_DEC_R = crate::BitReader; +#[doc = "Field `bmx_err_tz` reader - "] +pub type BMX_ERR_TZ_R = crate::BitReader; +#[doc = "Field `bmx_dbg_sel` reader - "] +pub type BMX_DBG_SEL_R = crate::FieldReader; +#[doc = "Field `bmx_dbg_sel` writer - "] +pub type BMX_DBG_SEL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, BMX_CFG2_SPEC, u8, u8, 4, O>; +impl R { + #[doc = "Bit 0 - BMX address monitor disable"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn bmx_err_addr_dis(&self) -> BMX_ERR_ADDR_DIS_R { + BMX_ERR_ADDR_DIS_R::new((self.bits & 1) != 0) } - #[doc = r"Clears the field bit"] + #[doc = "Bit 4"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn bmx_err_dec(&self) -> BMX_ERR_DEC_R { + BMX_ERR_DEC_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = r"Writes raw bits to the field"] + #[doc = "Bit 5"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn bmx_err_tz(&self) -> BMX_ERR_TZ_R { + BMX_ERR_TZ_R::new(((self.bits >> 5) & 1) != 0) } -} -impl R { #[doc = "Bits 28:31"] #[inline(always)] pub fn bmx_dbg_sel(&self) -> BMX_DBG_SEL_R { BMX_DBG_SEL_R::new(((self.bits >> 28) & 0x0f) as u8) } - #[doc = "Bit 5"] - #[inline(always)] - pub fn bmx_err_tz(&self) -> BMX_ERR_TZ_R { - BMX_ERR_TZ_R::new(((self.bits >> 5) & 0x01) != 0) - } - #[doc = "Bit 4"] - #[inline(always)] - pub fn bmx_err_dec(&self) -> BMX_ERR_DEC_R { - BMX_ERR_DEC_R::new(((self.bits >> 4) & 0x01) != 0) - } - #[doc = "Bit 0 - BMX address monitor disable"] - #[inline(always)] - pub fn bmx_err_addr_dis(&self) -> BMX_ERR_ADDR_DIS_R { - BMX_ERR_ADDR_DIS_R::new((self.bits & 0x01) != 0) - } } impl W { - #[doc = "Bits 28:31"] + #[doc = "Bit 0 - BMX address monitor disable"] #[inline(always)] - pub fn bmx_dbg_sel(&mut self) -> BMX_DBG_SEL_W { - BMX_DBG_SEL_W { w: self } + #[must_use] + pub fn bmx_err_addr_dis(&mut self) -> BMX_ERR_ADDR_DIS_W<0> { + BMX_ERR_ADDR_DIS_W::new(self) } - #[doc = "Bit 0 - BMX address monitor disable"] + #[doc = "Bits 28:31"] #[inline(always)] - pub fn bmx_err_addr_dis(&mut self) -> BMX_ERR_ADDR_DIS_W { - BMX_ERR_ADDR_DIS_W { w: self } + #[must_use] + pub fn bmx_dbg_sel(&mut self) -> BMX_DBG_SEL_W<28> { + BMX_DBG_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -173,11 +100,10 @@ impl crate::Readable for BMX_CFG2_SPEC { #[doc = "`write(|w| ..)` method takes [bmx_cfg2::W](W) writer structure"] impl crate::Writable for BMX_CFG2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets bmx_cfg2 to value 0"] impl crate::Resettable for BMX_CFG2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/bmx_dbg_out.rs b/src/glb/bmx_dbg_out.rs index 4ade38e..99c60bb 100644 --- a/src/glb/bmx_dbg_out.rs +++ b/src/glb/bmx_dbg_out.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `bmx_dbg_out` reader - "] -pub struct BMX_DBG_OUT_R(crate::FieldReader); -impl BMX_DBG_OUT_R { - pub(crate) fn new(bits: u32) -> Self { - BMX_DBG_OUT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for BMX_DBG_OUT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type BMX_DBG_OUT_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn bmx_dbg_out(&self) -> BMX_DBG_OUT_R { - BMX_DBG_OUT_R::new((self.bits & 0xffff_ffff) as u32) + BMX_DBG_OUT_R::new(self.bits) } } #[doc = "bmx_dbg_out.\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 [bmx_dbg_out](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for BMX_DBG_OUT_SPEC { } #[doc = "`reset()` method sets bmx_dbg_out to value 0"] impl crate::Resettable for BMX_DBG_OUT_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/bmx_err_addr.rs b/src/glb/bmx_err_addr.rs index 84c4d12..75cc4c3 100644 --- a/src/glb/bmx_err_addr.rs +++ b/src/glb/bmx_err_addr.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `bmx_err_addr` reader - "] -pub struct BMX_ERR_ADDR_R(crate::FieldReader); -impl BMX_ERR_ADDR_R { - pub(crate) fn new(bits: u32) -> Self { - BMX_ERR_ADDR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for BMX_ERR_ADDR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type BMX_ERR_ADDR_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn bmx_err_addr(&self) -> BMX_ERR_ADDR_R { - BMX_ERR_ADDR_R::new((self.bits & 0xffff_ffff) as u32) + BMX_ERR_ADDR_R::new(self.bits) } } #[doc = "bmx_err_addr.\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 [bmx_err_addr](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for BMX_ERR_ADDR_SPEC { } #[doc = "`reset()` method sets bmx_err_addr to value 0"] impl crate::Resettable for BMX_ERR_ADDR_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/cgen_cfg0.rs b/src/glb/cgen_cfg0.rs index 7ead2f4..aa0d7f7 100644 --- a/src/glb/cgen_cfg0.rs +++ b/src/glb/cgen_cfg0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,37 +28,16 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `cgen_m` reader - "] -pub struct CGEN_M_R(crate::FieldReader); -impl CGEN_M_R { - pub(crate) fn new(bits: u8) -> Self { - CGEN_M_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CGEN_M_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CGEN_M_R = crate::FieldReader; #[doc = "Field `cgen_m` writer - "] -pub struct CGEN_M_W<'a> { - w: &'a mut W, -} -impl<'a> CGEN_M_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff); - self.w - } -} +pub type CGEN_M_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CGEN_CFG0_SPEC, u8, u8, 8, O>; impl R { #[doc = "Bits 0:7"] #[inline(always)] @@ -68,10 +48,12 @@ impl R { impl W { #[doc = "Bits 0:7"] #[inline(always)] - pub fn cgen_m(&mut self) -> CGEN_M_W { - CGEN_M_W { w: self } + #[must_use] + pub fn cgen_m(&mut self) -> CGEN_M_W<0> { + CGEN_M_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +71,10 @@ impl crate::Readable for CGEN_CFG0_SPEC { #[doc = "`write(|w| ..)` method takes [cgen_cfg0::W](W) writer structure"] impl crate::Writable for CGEN_CFG0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets cgen_cfg0 to value 0xff"] impl crate::Resettable for CGEN_CFG0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xff - } + const RESET_VALUE: Self::Ux = 0xff; } diff --git a/src/glb/cgen_cfg1.rs b/src/glb/cgen_cfg1.rs index d732ee7..ccbb07e 100644 --- a/src/glb/cgen_cfg1.rs +++ b/src/glb/cgen_cfg1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,87 +28,47 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `cgen_s1a` reader - "] -pub struct CGEN_S1A_R(crate::FieldReader); -impl CGEN_S1A_R { - pub(crate) fn new(bits: u8) -> Self { - CGEN_S1A_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CGEN_S1A_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cgen_s1a` writer - "] -pub struct CGEN_S1A_W<'a> { - w: &'a mut W, -} -impl<'a> CGEN_S1A_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 16)) | ((value as u32 & 0xff) << 16); - self.w - } -} #[doc = "Field `cgen_s1` reader - "] -pub struct CGEN_S1_R(crate::FieldReader); -impl CGEN_S1_R { - pub(crate) fn new(bits: u16) -> Self { - CGEN_S1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CGEN_S1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CGEN_S1_R = crate::FieldReader; #[doc = "Field `cgen_s1` writer - "] -pub struct CGEN_S1_W<'a> { - w: &'a mut W, -} -impl<'a> CGEN_S1_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type CGEN_S1_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CGEN_CFG1_SPEC, u16, u16, 16, O>; +#[doc = "Field `cgen_s1a` reader - "] +pub type CGEN_S1A_R = crate::FieldReader; +#[doc = "Field `cgen_s1a` writer - "] +pub type CGEN_S1A_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CGEN_CFG1_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:15"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w + pub fn cgen_s1(&self) -> CGEN_S1_R { + CGEN_S1_R::new((self.bits & 0xffff) as u16) } -} -impl R { #[doc = "Bits 16:23"] #[inline(always)] pub fn cgen_s1a(&self) -> CGEN_S1A_R { CGEN_S1A_R::new(((self.bits >> 16) & 0xff) as u8) } - #[doc = "Bits 0:15"] - #[inline(always)] - pub fn cgen_s1(&self) -> CGEN_S1_R { - CGEN_S1_R::new((self.bits & 0xffff) as u16) - } } impl W { - #[doc = "Bits 16:23"] + #[doc = "Bits 0:15"] #[inline(always)] - pub fn cgen_s1a(&mut self) -> CGEN_S1A_W { - CGEN_S1A_W { w: self } + #[must_use] + pub fn cgen_s1(&mut self) -> CGEN_S1_W<0> { + CGEN_S1_W::new(self) } - #[doc = "Bits 0:15"] + #[doc = "Bits 16:23"] #[inline(always)] - pub fn cgen_s1(&mut self) -> CGEN_S1_W { - CGEN_S1_W { w: self } + #[must_use] + pub fn cgen_s1a(&mut self) -> CGEN_S1A_W<16> { + CGEN_S1A_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -125,11 +86,10 @@ impl crate::Readable for CGEN_CFG1_SPEC { #[doc = "`write(|w| ..)` method takes [cgen_cfg1::W](W) writer structure"] impl crate::Writable for CGEN_CFG1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets cgen_cfg1 to value 0x00ff_ffff"] impl crate::Resettable for CGEN_CFG1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x00ff_ffff - } + const RESET_VALUE: Self::Ux = 0x00ff_ffff; } diff --git a/src/glb/cgen_cfg2.rs b/src/glb/cgen_cfg2.rs index b05045a..f738ac9 100644 --- a/src/glb/cgen_cfg2.rs +++ b/src/glb/cgen_cfg2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,107 +28,47 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `cgen_s3` reader - "] -pub struct CGEN_S3_R(crate::FieldReader); -impl CGEN_S3_R { - pub(crate) fn new(bits: bool) -> Self { - CGEN_S3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CGEN_S3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cgen_s3` writer - "] -pub struct CGEN_S3_W<'a> { - w: &'a mut W, -} -impl<'a> CGEN_S3_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} #[doc = "Field `cgen_s2` reader - "] -pub struct CGEN_S2_R(crate::FieldReader); -impl CGEN_S2_R { - pub(crate) fn new(bits: bool) -> Self { - CGEN_S2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CGEN_S2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CGEN_S2_R = crate::BitReader; #[doc = "Field `cgen_s2` writer - "] -pub struct CGEN_S2_W<'a> { - w: &'a mut W, -} -impl<'a> CGEN_S2_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type CGEN_S2_W<'a, const O: u8> = crate::BitWriter<'a, u32, CGEN_CFG2_SPEC, bool, O>; +#[doc = "Field `cgen_s3` reader - "] +pub type CGEN_S3_R = crate::BitReader; +#[doc = "Field `cgen_s3` writer - "] +pub type CGEN_S3_W<'a, const O: u8> = crate::BitWriter<'a, u32, CGEN_CFG2_SPEC, bool, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn cgen_s2(&self) -> CGEN_S2_R { + CGEN_S2_R::new((self.bits & 1) != 0) } -} -impl R { #[doc = "Bit 4"] #[inline(always)] pub fn cgen_s3(&self) -> CGEN_S3_R { - CGEN_S3_R::new(((self.bits >> 4) & 0x01) != 0) - } - #[doc = "Bit 0"] - #[inline(always)] - pub fn cgen_s2(&self) -> CGEN_S2_R { - CGEN_S2_R::new((self.bits & 0x01) != 0) + CGEN_S3_R::new(((self.bits >> 4) & 1) != 0) } } impl W { - #[doc = "Bit 4"] + #[doc = "Bit 0"] #[inline(always)] - pub fn cgen_s3(&mut self) -> CGEN_S3_W { - CGEN_S3_W { w: self } + #[must_use] + pub fn cgen_s2(&mut self) -> CGEN_S2_W<0> { + CGEN_S2_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 4"] #[inline(always)] - pub fn cgen_s2(&mut self) -> CGEN_S2_W { - CGEN_S2_W { w: self } + #[must_use] + pub fn cgen_s3(&mut self) -> CGEN_S3_W<4> { + CGEN_S3_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -145,11 +86,10 @@ impl crate::Readable for CGEN_CFG2_SPEC { #[doc = "`write(|w| ..)` method takes [cgen_cfg2::W](W) writer structure"] impl crate::Writable for CGEN_CFG2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets cgen_cfg2 to value 0x11"] impl crate::Resettable for CGEN_CFG2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x11 - } + const RESET_VALUE: Self::Ux = 0x11; } diff --git a/src/glb/cgen_cfg3.rs b/src/glb/cgen_cfg3.rs index b3fa380..49fb510 100644 --- a/src/glb/cgen_cfg3.rs +++ b/src/glb/cgen_cfg3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,13 +28,15 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } impl W { #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -51,11 +54,10 @@ impl crate::Readable for CGEN_CFG3_SPEC { #[doc = "`write(|w| ..)` method takes [cgen_cfg3::W](W) writer structure"] impl crate::Writable for CGEN_CFG3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets cgen_cfg3 to value 0"] impl crate::Resettable for CGEN_CFG3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/clk_cfg0.rs b/src/glb/clk_cfg0.rs index 5fa0e6c..b7b0d7c 100644 --- a/src/glb/clk_cfg0.rs +++ b/src/glb/clk_cfg0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,383 +28,150 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `glb_id` reader - "] -pub struct GLB_ID_R(crate::FieldReader); -impl GLB_ID_R { - pub(crate) fn new(bits: u8) -> Self { - GLB_ID_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GLB_ID_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `chip_rdy` reader - "] -pub struct CHIP_RDY_R(crate::FieldReader); -impl CHIP_RDY_R { - pub(crate) fn new(bits: bool) -> Self { - CHIP_RDY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CHIP_RDY_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `fclk_sw_state` reader - "] -pub struct FCLK_SW_STATE_R(crate::FieldReader); -impl FCLK_SW_STATE_R { - pub(crate) fn new(bits: u8) -> Self { - FCLK_SW_STATE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for FCLK_SW_STATE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_bclk_div` reader - Base clock divider"] -pub struct REG_BCLK_DIV_R(crate::FieldReader); -impl REG_BCLK_DIV_R { - pub(crate) fn new(bits: u8) -> Self { - REG_BCLK_DIV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_BCLK_DIV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_bclk_div` writer - Base clock divider"] -pub struct REG_BCLK_DIV_W<'a> { - w: &'a mut W, -} -impl<'a> REG_BCLK_DIV_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 16)) | ((value as u32 & 0xff) << 16); - self.w - } -} -#[doc = "Field `reg_hclk_div` reader - MCU clock divider"] -pub struct REG_HCLK_DIV_R(crate::FieldReader); -impl REG_HCLK_DIV_R { - pub(crate) fn new(bits: u8) -> Self { - REG_HCLK_DIV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_HCLK_DIV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_hclk_div` writer - MCU clock divider"] -pub struct REG_HCLK_DIV_W<'a> { - w: &'a mut W, -} -impl<'a> REG_HCLK_DIV_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8); - self.w - } -} -#[doc = "Field `hbn_root_clk_sel` reader - "] -pub struct HBN_ROOT_CLK_SEL_R(crate::FieldReader); -impl HBN_ROOT_CLK_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - HBN_ROOT_CLK_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for HBN_ROOT_CLK_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_pll_sel` reader - PLL clock selection (0: 48MHz, 1: 120MHz, 2: 160MHz and 3: 192MHz)"] -pub struct REG_PLL_SEL_R(crate::FieldReader); -impl REG_PLL_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - REG_PLL_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_PLL_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_pll_sel` writer - PLL clock selection (0: 48MHz, 1: 120MHz, 2: 160MHz and 3: 192MHz)"] -pub struct REG_PLL_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> REG_PLL_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 4)) | ((value as u32 & 0x03) << 4); - self.w - } -} -#[doc = "Field `reg_bclk_en` reader - Base clock enable"] -pub struct REG_BCLK_EN_R(crate::FieldReader); -impl REG_BCLK_EN_R { - pub(crate) fn new(bits: bool) -> Self { - REG_BCLK_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_BCLK_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_bclk_en` writer - Base clock enable"] -pub struct REG_BCLK_EN_W<'a> { - w: &'a mut W, -} -impl<'a> REG_BCLK_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `reg_hclk_en` reader - MCU clock enable"] -pub struct REG_HCLK_EN_R(crate::FieldReader); -impl REG_HCLK_EN_R { - pub(crate) fn new(bits: bool) -> Self { - REG_HCLK_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_HCLK_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_hclk_en` writer - MCU clock enable"] -pub struct REG_HCLK_EN_W<'a> { - w: &'a mut W, -} -impl<'a> REG_HCLK_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `reg_fclk_en` reader - "] -pub struct REG_FCLK_EN_R(crate::FieldReader); -impl REG_FCLK_EN_R { - pub(crate) fn new(bits: bool) -> Self { - REG_FCLK_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_FCLK_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_fclk_en` writer - "] -pub struct REG_FCLK_EN_W<'a> { - w: &'a mut W, -} -impl<'a> REG_FCLK_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `reg_pll_en` reader - PLL enable"] -pub struct REG_PLL_EN_R(crate::FieldReader); -impl REG_PLL_EN_R { - pub(crate) fn new(bits: bool) -> Self { - REG_PLL_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_PLL_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type REG_PLL_EN_R = crate::BitReader; #[doc = "Field `reg_pll_en` writer - PLL enable"] -pub struct REG_PLL_EN_W<'a> { - w: &'a mut W, -} -impl<'a> REG_PLL_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type REG_PLL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, CLK_CFG0_SPEC, bool, O>; +#[doc = "Field `reg_fclk_en` reader - "] +pub type REG_FCLK_EN_R = crate::BitReader; +#[doc = "Field `reg_fclk_en` writer - "] +pub type REG_FCLK_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, CLK_CFG0_SPEC, bool, O>; +#[doc = "Field `reg_hclk_en` reader - MCU clock enable"] +pub type REG_HCLK_EN_R = crate::BitReader; +#[doc = "Field `reg_hclk_en` writer - MCU clock enable"] +pub type REG_HCLK_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, CLK_CFG0_SPEC, bool, O>; +#[doc = "Field `reg_bclk_en` reader - Base clock enable"] +pub type REG_BCLK_EN_R = crate::BitReader; +#[doc = "Field `reg_bclk_en` writer - Base clock enable"] +pub type REG_BCLK_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, CLK_CFG0_SPEC, bool, O>; +#[doc = "Field `reg_pll_sel` reader - PLL clock selection (0: 48MHz, 1: 120MHz, 2: 160MHz and 3: 192MHz)"] +pub type REG_PLL_SEL_R = crate::FieldReader; +#[doc = "Field `reg_pll_sel` writer - PLL clock selection (0: 48MHz, 1: 120MHz, 2: 160MHz and 3: 192MHz)"] +pub type REG_PLL_SEL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CLK_CFG0_SPEC, u8, u8, 2, O>; +#[doc = "Field `hbn_root_clk_sel` reader - "] +pub type HBN_ROOT_CLK_SEL_R = crate::FieldReader; +#[doc = "Field `reg_hclk_div` reader - MCU clock divider"] +pub type REG_HCLK_DIV_R = crate::FieldReader; +#[doc = "Field `reg_hclk_div` writer - MCU clock divider"] +pub type REG_HCLK_DIV_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CLK_CFG0_SPEC, u8, u8, 8, O>; +#[doc = "Field `reg_bclk_div` reader - Base clock divider"] +pub type REG_BCLK_DIV_R = crate::FieldReader; +#[doc = "Field `reg_bclk_div` writer - Base clock divider"] +pub type REG_BCLK_DIV_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CLK_CFG0_SPEC, u8, u8, 8, O>; +#[doc = "Field `fclk_sw_state` reader - "] +pub type FCLK_SW_STATE_R = crate::FieldReader; +#[doc = "Field `chip_rdy` reader - "] +pub type CHIP_RDY_R = crate::BitReader; +#[doc = "Field `glb_id` reader - "] +pub type GLB_ID_R = crate::FieldReader; impl R { - #[doc = "Bits 28:31"] + #[doc = "Bit 0 - PLL enable"] #[inline(always)] - pub fn glb_id(&self) -> GLB_ID_R { - GLB_ID_R::new(((self.bits >> 28) & 0x0f) as u8) + pub fn reg_pll_en(&self) -> REG_PLL_EN_R { + REG_PLL_EN_R::new((self.bits & 1) != 0) } - #[doc = "Bit 27"] + #[doc = "Bit 1"] #[inline(always)] - pub fn chip_rdy(&self) -> CHIP_RDY_R { - CHIP_RDY_R::new(((self.bits >> 27) & 0x01) != 0) + pub fn reg_fclk_en(&self) -> REG_FCLK_EN_R { + REG_FCLK_EN_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bits 24:26"] + #[doc = "Bit 2 - MCU clock enable"] #[inline(always)] - pub fn fclk_sw_state(&self) -> FCLK_SW_STATE_R { - FCLK_SW_STATE_R::new(((self.bits >> 24) & 0x07) as u8) + pub fn reg_hclk_en(&self) -> REG_HCLK_EN_R { + REG_HCLK_EN_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bits 16:23 - Base clock divider"] + #[doc = "Bit 3 - Base clock enable"] #[inline(always)] - pub fn reg_bclk_div(&self) -> REG_BCLK_DIV_R { - REG_BCLK_DIV_R::new(((self.bits >> 16) & 0xff) as u8) + pub fn reg_bclk_en(&self) -> REG_BCLK_EN_R { + REG_BCLK_EN_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bits 8:15 - MCU clock divider"] + #[doc = "Bits 4:5 - PLL clock selection (0: 48MHz, 1: 120MHz, 2: 160MHz and 3: 192MHz)"] #[inline(always)] - pub fn reg_hclk_div(&self) -> REG_HCLK_DIV_R { - REG_HCLK_DIV_R::new(((self.bits >> 8) & 0xff) as u8) + pub fn reg_pll_sel(&self) -> REG_PLL_SEL_R { + REG_PLL_SEL_R::new(((self.bits >> 4) & 3) as u8) } #[doc = "Bits 6:7"] #[inline(always)] pub fn hbn_root_clk_sel(&self) -> HBN_ROOT_CLK_SEL_R { - HBN_ROOT_CLK_SEL_R::new(((self.bits >> 6) & 0x03) as u8) + HBN_ROOT_CLK_SEL_R::new(((self.bits >> 6) & 3) as u8) } - #[doc = "Bits 4:5 - PLL clock selection (0: 48MHz, 1: 120MHz, 2: 160MHz and 3: 192MHz)"] + #[doc = "Bits 8:15 - MCU clock divider"] #[inline(always)] - pub fn reg_pll_sel(&self) -> REG_PLL_SEL_R { - REG_PLL_SEL_R::new(((self.bits >> 4) & 0x03) as u8) + pub fn reg_hclk_div(&self) -> REG_HCLK_DIV_R { + REG_HCLK_DIV_R::new(((self.bits >> 8) & 0xff) as u8) } - #[doc = "Bit 3 - Base clock enable"] + #[doc = "Bits 16:23 - Base clock divider"] #[inline(always)] - pub fn reg_bclk_en(&self) -> REG_BCLK_EN_R { - REG_BCLK_EN_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn reg_bclk_div(&self) -> REG_BCLK_DIV_R { + REG_BCLK_DIV_R::new(((self.bits >> 16) & 0xff) as u8) } - #[doc = "Bit 2 - MCU clock enable"] + #[doc = "Bits 24:26"] #[inline(always)] - pub fn reg_hclk_en(&self) -> REG_HCLK_EN_R { - REG_HCLK_EN_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn fclk_sw_state(&self) -> FCLK_SW_STATE_R { + FCLK_SW_STATE_R::new(((self.bits >> 24) & 7) as u8) } - #[doc = "Bit 1"] + #[doc = "Bit 27"] #[inline(always)] - pub fn reg_fclk_en(&self) -> REG_FCLK_EN_R { - REG_FCLK_EN_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn chip_rdy(&self) -> CHIP_RDY_R { + CHIP_RDY_R::new(((self.bits >> 27) & 1) != 0) } - #[doc = "Bit 0 - PLL enable"] + #[doc = "Bits 28:31"] #[inline(always)] - pub fn reg_pll_en(&self) -> REG_PLL_EN_R { - REG_PLL_EN_R::new((self.bits & 0x01) != 0) + pub fn glb_id(&self) -> GLB_ID_R { + GLB_ID_R::new(((self.bits >> 28) & 0x0f) as u8) } } impl W { - #[doc = "Bits 16:23 - Base clock divider"] + #[doc = "Bit 0 - PLL enable"] #[inline(always)] - pub fn reg_bclk_div(&mut self) -> REG_BCLK_DIV_W { - REG_BCLK_DIV_W { w: self } + #[must_use] + pub fn reg_pll_en(&mut self) -> REG_PLL_EN_W<0> { + REG_PLL_EN_W::new(self) } - #[doc = "Bits 8:15 - MCU clock divider"] + #[doc = "Bit 1"] #[inline(always)] - pub fn reg_hclk_div(&mut self) -> REG_HCLK_DIV_W { - REG_HCLK_DIV_W { w: self } + #[must_use] + pub fn reg_fclk_en(&mut self) -> REG_FCLK_EN_W<1> { + REG_FCLK_EN_W::new(self) } - #[doc = "Bits 4:5 - PLL clock selection (0: 48MHz, 1: 120MHz, 2: 160MHz and 3: 192MHz)"] + #[doc = "Bit 2 - MCU clock enable"] #[inline(always)] - pub fn reg_pll_sel(&mut self) -> REG_PLL_SEL_W { - REG_PLL_SEL_W { w: self } + #[must_use] + pub fn reg_hclk_en(&mut self) -> REG_HCLK_EN_W<2> { + REG_HCLK_EN_W::new(self) } #[doc = "Bit 3 - Base clock enable"] #[inline(always)] - pub fn reg_bclk_en(&mut self) -> REG_BCLK_EN_W { - REG_BCLK_EN_W { w: self } + #[must_use] + pub fn reg_bclk_en(&mut self) -> REG_BCLK_EN_W<3> { + REG_BCLK_EN_W::new(self) } - #[doc = "Bit 2 - MCU clock enable"] + #[doc = "Bits 4:5 - PLL clock selection (0: 48MHz, 1: 120MHz, 2: 160MHz and 3: 192MHz)"] #[inline(always)] - pub fn reg_hclk_en(&mut self) -> REG_HCLK_EN_W { - REG_HCLK_EN_W { w: self } + #[must_use] + pub fn reg_pll_sel(&mut self) -> REG_PLL_SEL_W<4> { + REG_PLL_SEL_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bits 8:15 - MCU clock divider"] #[inline(always)] - pub fn reg_fclk_en(&mut self) -> REG_FCLK_EN_W { - REG_FCLK_EN_W { w: self } + #[must_use] + pub fn reg_hclk_div(&mut self) -> REG_HCLK_DIV_W<8> { + REG_HCLK_DIV_W::new(self) } - #[doc = "Bit 0 - PLL enable"] + #[doc = "Bits 16:23 - Base clock divider"] #[inline(always)] - pub fn reg_pll_en(&mut self) -> REG_PLL_EN_W { - REG_PLL_EN_W { w: self } + #[must_use] + pub fn reg_bclk_div(&mut self) -> REG_BCLK_DIV_W<16> { + REG_BCLK_DIV_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -421,11 +189,10 @@ impl crate::Readable for CLK_CFG0_SPEC { #[doc = "`write(|w| ..)` method takes [clk_cfg0::W](W) writer structure"] impl crate::Writable for CLK_CFG0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets clk_cfg0 to value 0x6000_000f"] impl crate::Resettable for CLK_CFG0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x6000_000f - } + const RESET_VALUE: Self::Ux = 0x6000_000f; } diff --git a/src/glb/clk_cfg1.rs b/src/glb/clk_cfg1.rs index c692eca..270c777 100644 --- a/src/glb/clk_cfg1.rs +++ b/src/glb/clk_cfg1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,169 +28,79 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `ble_en` reader - Bluetooth clock enable"] -pub struct BLE_EN_R(crate::FieldReader); -impl BLE_EN_R { - pub(crate) fn new(bits: bool) -> Self { - BLE_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for BLE_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ble_en` writer - Bluetooth clock enable"] -pub struct BLE_EN_W<'a> { - w: &'a mut W, -} -impl<'a> BLE_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24); - self.w - } -} -#[doc = "Field `ble_clk_sel` reader - "] -pub struct BLE_CLK_SEL_R(crate::FieldReader); -impl BLE_CLK_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - BLE_CLK_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for BLE_CLK_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ble_clk_sel` writer - "] -pub struct BLE_CLK_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> BLE_CLK_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 16)) | ((value as u32 & 0x3f) << 16); - self.w - } -} -#[doc = "Field `wifi_mac_wt_div` reader - WiFi encryption clock divider"] -pub struct WIFI_MAC_WT_DIV_R(crate::FieldReader); -impl WIFI_MAC_WT_DIV_R { - pub(crate) fn new(bits: u8) -> Self { - WIFI_MAC_WT_DIV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for WIFI_MAC_WT_DIV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `wifi_mac_wt_div` writer - WiFi encryption clock divider"] -pub struct WIFI_MAC_WT_DIV_W<'a> { - w: &'a mut W, -} -impl<'a> WIFI_MAC_WT_DIV_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 4)) | ((value as u32 & 0x0f) << 4); - self.w - } -} #[doc = "Field `wifi_mac_core_div` reader - WiFi core clock divider (0: 80MHz, 1: 40MHz)"] -pub struct WIFI_MAC_CORE_DIV_R(crate::FieldReader); -impl WIFI_MAC_CORE_DIV_R { - pub(crate) fn new(bits: u8) -> Self { - WIFI_MAC_CORE_DIV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for WIFI_MAC_CORE_DIV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type WIFI_MAC_CORE_DIV_R = crate::FieldReader; #[doc = "Field `wifi_mac_core_div` writer - WiFi core clock divider (0: 80MHz, 1: 40MHz)"] -pub struct WIFI_MAC_CORE_DIV_W<'a> { - w: &'a mut W, -} -impl<'a> WIFI_MAC_CORE_DIV_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type WIFI_MAC_CORE_DIV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, CLK_CFG1_SPEC, u8, u8, 4, O>; +#[doc = "Field `wifi_mac_wt_div` reader - WiFi encryption clock divider"] +pub type WIFI_MAC_WT_DIV_R = crate::FieldReader; +#[doc = "Field `wifi_mac_wt_div` writer - WiFi encryption clock divider"] +pub type WIFI_MAC_WT_DIV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, CLK_CFG1_SPEC, u8, u8, 4, O>; +#[doc = "Field `ble_clk_sel` reader - "] +pub type BLE_CLK_SEL_R = crate::FieldReader; +#[doc = "Field `ble_clk_sel` writer - "] +pub type BLE_CLK_SEL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CLK_CFG1_SPEC, u8, u8, 6, O>; +#[doc = "Field `ble_en` reader - Bluetooth clock enable"] +pub type BLE_EN_R = crate::BitReader; +#[doc = "Field `ble_en` writer - Bluetooth clock enable"] +pub type BLE_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, CLK_CFG1_SPEC, bool, O>; +impl R { + #[doc = "Bits 0:3 - WiFi core clock divider (0: 80MHz, 1: 40MHz)"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x0f) | (value as u32 & 0x0f); - self.w + pub fn wifi_mac_core_div(&self) -> WIFI_MAC_CORE_DIV_R { + WIFI_MAC_CORE_DIV_R::new((self.bits & 0x0f) as u8) } -} -impl R { - #[doc = "Bit 24 - Bluetooth clock enable"] + #[doc = "Bits 4:7 - WiFi encryption clock divider"] #[inline(always)] - pub fn ble_en(&self) -> BLE_EN_R { - BLE_EN_R::new(((self.bits >> 24) & 0x01) != 0) + pub fn wifi_mac_wt_div(&self) -> WIFI_MAC_WT_DIV_R { + WIFI_MAC_WT_DIV_R::new(((self.bits >> 4) & 0x0f) as u8) } #[doc = "Bits 16:21"] #[inline(always)] pub fn ble_clk_sel(&self) -> BLE_CLK_SEL_R { BLE_CLK_SEL_R::new(((self.bits >> 16) & 0x3f) as u8) } - #[doc = "Bits 4:7 - WiFi encryption clock divider"] - #[inline(always)] - pub fn wifi_mac_wt_div(&self) -> WIFI_MAC_WT_DIV_R { - WIFI_MAC_WT_DIV_R::new(((self.bits >> 4) & 0x0f) as u8) - } - #[doc = "Bits 0:3 - WiFi core clock divider (0: 80MHz, 1: 40MHz)"] + #[doc = "Bit 24 - Bluetooth clock enable"] #[inline(always)] - pub fn wifi_mac_core_div(&self) -> WIFI_MAC_CORE_DIV_R { - WIFI_MAC_CORE_DIV_R::new((self.bits & 0x0f) as u8) + pub fn ble_en(&self) -> BLE_EN_R { + BLE_EN_R::new(((self.bits >> 24) & 1) != 0) } } impl W { - #[doc = "Bit 24 - Bluetooth clock enable"] + #[doc = "Bits 0:3 - WiFi core clock divider (0: 80MHz, 1: 40MHz)"] #[inline(always)] - pub fn ble_en(&mut self) -> BLE_EN_W { - BLE_EN_W { w: self } + #[must_use] + pub fn wifi_mac_core_div(&mut self) -> WIFI_MAC_CORE_DIV_W<0> { + WIFI_MAC_CORE_DIV_W::new(self) } - #[doc = "Bits 16:21"] + #[doc = "Bits 4:7 - WiFi encryption clock divider"] #[inline(always)] - pub fn ble_clk_sel(&mut self) -> BLE_CLK_SEL_W { - BLE_CLK_SEL_W { w: self } + #[must_use] + pub fn wifi_mac_wt_div(&mut self) -> WIFI_MAC_WT_DIV_W<4> { + WIFI_MAC_WT_DIV_W::new(self) } - #[doc = "Bits 4:7 - WiFi encryption clock divider"] + #[doc = "Bits 16:21"] #[inline(always)] - pub fn wifi_mac_wt_div(&mut self) -> WIFI_MAC_WT_DIV_W { - WIFI_MAC_WT_DIV_W { w: self } + #[must_use] + pub fn ble_clk_sel(&mut self) -> BLE_CLK_SEL_W<16> { + BLE_CLK_SEL_W::new(self) } - #[doc = "Bits 0:3 - WiFi core clock divider (0: 80MHz, 1: 40MHz)"] + #[doc = "Bit 24 - Bluetooth clock enable"] #[inline(always)] - pub fn wifi_mac_core_div(&mut self) -> WIFI_MAC_CORE_DIV_W { - WIFI_MAC_CORE_DIV_W { w: self } + #[must_use] + pub fn ble_en(&mut self) -> BLE_EN_W<24> { + BLE_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -207,11 +118,10 @@ impl crate::Readable for CLK_CFG1_SPEC { #[doc = "`write(|w| ..)` method takes [clk_cfg1::W](W) writer structure"] impl crate::Writable for CLK_CFG1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets clk_cfg1 to value 0x0110_0001"] impl crate::Resettable for CLK_CFG1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0110_0001 - } + const RESET_VALUE: Self::Ux = 0x0110_0001; } diff --git a/src/glb/clk_cfg2.rs b/src/glb/clk_cfg2.rs index 732d4a4..fb68766 100644 --- a/src/glb/clk_cfg2.rs +++ b/src/glb/clk_cfg2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,388 +28,159 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `dma_clk_en` reader - "] -pub struct DMA_CLK_EN_R(crate::FieldReader); -impl DMA_CLK_EN_R { - pub(crate) fn new(bits: u8) -> Self { - DMA_CLK_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DMA_CLK_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dma_clk_en` writer - "] -pub struct DMA_CLK_EN_W<'a> { - w: &'a mut W, -} -impl<'a> DMA_CLK_EN_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 24)) | ((value as u32 & 0xff) << 24); - self.w - } -} -#[doc = "Field `ir_clk_en` reader - "] -pub struct IR_CLK_EN_R(crate::FieldReader); -impl IR_CLK_EN_R { - pub(crate) fn new(bits: bool) -> Self { - IR_CLK_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for IR_CLK_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ir_clk_en` writer - "] -pub struct IR_CLK_EN_W<'a> { - w: &'a mut W, -} -impl<'a> IR_CLK_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23); - self.w - } -} -#[doc = "Field `ir_clk_div` reader - "] -pub struct IR_CLK_DIV_R(crate::FieldReader); -impl IR_CLK_DIV_R { - pub(crate) fn new(bits: u8) -> Self { - IR_CLK_DIV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for IR_CLK_DIV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ir_clk_div` writer - "] -pub struct IR_CLK_DIV_W<'a> { - w: &'a mut W, -} -impl<'a> IR_CLK_DIV_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 16)) | ((value as u32 & 0x3f) << 16); - self.w - } -} -#[doc = "Field `sf_clk_sel2` reader - "] -pub struct SF_CLK_SEL2_R(crate::FieldReader); -impl SF_CLK_SEL2_R { - pub(crate) fn new(bits: u8) -> Self { - SF_CLK_SEL2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_CLK_SEL2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_clk_sel2` writer - "] -pub struct SF_CLK_SEL2_W<'a> { - w: &'a mut W, -} -impl<'a> SF_CLK_SEL2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 14)) | ((value as u32 & 0x03) << 14); - self.w - } -} -#[doc = "Field `sf_clk_sel` reader - "] -pub struct SF_CLK_SEL_R(crate::FieldReader); -impl SF_CLK_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF_CLK_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_CLK_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_clk_sel` writer - "] -pub struct SF_CLK_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF_CLK_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 12)) | ((value as u32 & 0x03) << 12); - self.w - } -} -#[doc = "Field `sf_clk_en` reader - "] -pub struct SF_CLK_EN_R(crate::FieldReader); -impl SF_CLK_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_CLK_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_CLK_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_clk_en` writer - "] -pub struct SF_CLK_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_CLK_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w - } -} -#[doc = "Field `sf_clk_div` reader - "] -pub struct SF_CLK_DIV_R(crate::FieldReader); -impl SF_CLK_DIV_R { - pub(crate) fn new(bits: u8) -> Self { - SF_CLK_DIV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_CLK_DIV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_clk_div` writer - "] -pub struct SF_CLK_DIV_W<'a> { - w: &'a mut W, -} -impl<'a> SF_CLK_DIV_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 8)) | ((value as u32 & 0x07) << 8); - self.w - } -} -#[doc = "Field `hbn_uart_clk_sel` reader - "] -pub struct HBN_UART_CLK_SEL_R(crate::FieldReader); -impl HBN_UART_CLK_SEL_R { - pub(crate) fn new(bits: bool) -> Self { - HBN_UART_CLK_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for HBN_UART_CLK_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +#[doc = "Field `uart_clk_div` reader - "] +pub type UART_CLK_DIV_R = crate::FieldReader; +#[doc = "Field `uart_clk_div` writer - "] +pub type UART_CLK_DIV_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CLK_CFG2_SPEC, u8, u8, 3, O>; #[doc = "Field `uart_clk_en` reader - "] -pub struct UART_CLK_EN_R(crate::FieldReader); -impl UART_CLK_EN_R { - pub(crate) fn new(bits: bool) -> Self { - UART_CLK_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for UART_CLK_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type UART_CLK_EN_R = crate::BitReader; #[doc = "Field `uart_clk_en` writer - "] -pub struct UART_CLK_EN_W<'a> { - w: &'a mut W, -} -impl<'a> UART_CLK_EN_W<'a> { - #[doc = r"Sets the field bit"] +pub type UART_CLK_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, CLK_CFG2_SPEC, bool, O>; +#[doc = "Field `hbn_uart_clk_sel` reader - "] +pub type HBN_UART_CLK_SEL_R = crate::BitReader; +#[doc = "Field `sf_clk_div` reader - "] +pub type SF_CLK_DIV_R = crate::FieldReader; +#[doc = "Field `sf_clk_div` writer - "] +pub type SF_CLK_DIV_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CLK_CFG2_SPEC, u8, u8, 3, O>; +#[doc = "Field `sf_clk_en` reader - "] +pub type SF_CLK_EN_R = crate::BitReader; +#[doc = "Field `sf_clk_en` writer - "] +pub type SF_CLK_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, CLK_CFG2_SPEC, bool, O>; +#[doc = "Field `sf_clk_sel` reader - "] +pub type SF_CLK_SEL_R = crate::FieldReader; +#[doc = "Field `sf_clk_sel` writer - "] +pub type SF_CLK_SEL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CLK_CFG2_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf_clk_sel2` reader - "] +pub type SF_CLK_SEL2_R = crate::FieldReader; +#[doc = "Field `sf_clk_sel2` writer - "] +pub type SF_CLK_SEL2_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CLK_CFG2_SPEC, u8, u8, 2, O>; +#[doc = "Field `ir_clk_div` reader - "] +pub type IR_CLK_DIV_R = crate::FieldReader; +#[doc = "Field `ir_clk_div` writer - "] +pub type IR_CLK_DIV_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CLK_CFG2_SPEC, u8, u8, 6, O>; +#[doc = "Field `ir_clk_en` reader - "] +pub type IR_CLK_EN_R = crate::BitReader; +#[doc = "Field `ir_clk_en` writer - "] +pub type IR_CLK_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, CLK_CFG2_SPEC, bool, O>; +#[doc = "Field `dma_clk_en` reader - "] +pub type DMA_CLK_EN_R = crate::FieldReader; +#[doc = "Field `dma_clk_en` writer - "] +pub type DMA_CLK_EN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CLK_CFG2_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:2"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn uart_clk_div(&self) -> UART_CLK_DIV_R { + UART_CLK_DIV_R::new((self.bits & 7) as u8) } - #[doc = r"Clears the field bit"] + #[doc = "Bit 4"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn uart_clk_en(&self) -> UART_CLK_EN_R { + UART_CLK_EN_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = r"Writes raw bits to the field"] + #[doc = "Bit 7"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} -#[doc = "Field `uart_clk_div` reader - "] -pub struct UART_CLK_DIV_R(crate::FieldReader); -impl UART_CLK_DIV_R { - pub(crate) fn new(bits: u8) -> Self { - UART_CLK_DIV_R(crate::FieldReader::new(bits)) + pub fn hbn_uart_clk_sel(&self) -> HBN_UART_CLK_SEL_R { + HBN_UART_CLK_SEL_R::new(((self.bits >> 7) & 1) != 0) } -} -impl core::ops::Deref for UART_CLK_DIV_R { - type Target = crate::FieldReader; + #[doc = "Bits 8:10"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn sf_clk_div(&self) -> SF_CLK_DIV_R { + SF_CLK_DIV_R::new(((self.bits >> 8) & 7) as u8) } -} -#[doc = "Field `uart_clk_div` writer - "] -pub struct UART_CLK_DIV_W<'a> { - w: &'a mut W, -} -impl<'a> UART_CLK_DIV_W<'a> { - #[doc = r"Writes raw bits to the field"] + #[doc = "Bit 11"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x07) | (value as u32 & 0x07); - self.w + pub fn sf_clk_en(&self) -> SF_CLK_EN_R { + SF_CLK_EN_R::new(((self.bits >> 11) & 1) != 0) } -} -impl R { - #[doc = "Bits 24:31"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn dma_clk_en(&self) -> DMA_CLK_EN_R { - DMA_CLK_EN_R::new(((self.bits >> 24) & 0xff) as u8) + pub fn sf_clk_sel(&self) -> SF_CLK_SEL_R { + SF_CLK_SEL_R::new(((self.bits >> 12) & 3) as u8) } - #[doc = "Bit 23"] + #[doc = "Bits 14:15"] #[inline(always)] - pub fn ir_clk_en(&self) -> IR_CLK_EN_R { - IR_CLK_EN_R::new(((self.bits >> 23) & 0x01) != 0) + pub fn sf_clk_sel2(&self) -> SF_CLK_SEL2_R { + SF_CLK_SEL2_R::new(((self.bits >> 14) & 3) as u8) } #[doc = "Bits 16:21"] #[inline(always)] pub fn ir_clk_div(&self) -> IR_CLK_DIV_R { IR_CLK_DIV_R::new(((self.bits >> 16) & 0x3f) as u8) } - #[doc = "Bits 14:15"] - #[inline(always)] - pub fn sf_clk_sel2(&self) -> SF_CLK_SEL2_R { - SF_CLK_SEL2_R::new(((self.bits >> 14) & 0x03) as u8) - } - #[doc = "Bits 12:13"] - #[inline(always)] - pub fn sf_clk_sel(&self) -> SF_CLK_SEL_R { - SF_CLK_SEL_R::new(((self.bits >> 12) & 0x03) as u8) - } - #[doc = "Bit 11"] - #[inline(always)] - pub fn sf_clk_en(&self) -> SF_CLK_EN_R { - SF_CLK_EN_R::new(((self.bits >> 11) & 0x01) != 0) - } - #[doc = "Bits 8:10"] - #[inline(always)] - pub fn sf_clk_div(&self) -> SF_CLK_DIV_R { - SF_CLK_DIV_R::new(((self.bits >> 8) & 0x07) as u8) - } - #[doc = "Bit 7"] - #[inline(always)] - pub fn hbn_uart_clk_sel(&self) -> HBN_UART_CLK_SEL_R { - HBN_UART_CLK_SEL_R::new(((self.bits >> 7) & 0x01) != 0) - } - #[doc = "Bit 4"] + #[doc = "Bit 23"] #[inline(always)] - pub fn uart_clk_en(&self) -> UART_CLK_EN_R { - UART_CLK_EN_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn ir_clk_en(&self) -> IR_CLK_EN_R { + IR_CLK_EN_R::new(((self.bits >> 23) & 1) != 0) } - #[doc = "Bits 0:2"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn uart_clk_div(&self) -> UART_CLK_DIV_R { - UART_CLK_DIV_R::new((self.bits & 0x07) as u8) + pub fn dma_clk_en(&self) -> DMA_CLK_EN_R { + DMA_CLK_EN_R::new(((self.bits >> 24) & 0xff) as u8) } } impl W { - #[doc = "Bits 24:31"] + #[doc = "Bits 0:2"] #[inline(always)] - pub fn dma_clk_en(&mut self) -> DMA_CLK_EN_W { - DMA_CLK_EN_W { w: self } + #[must_use] + pub fn uart_clk_div(&mut self) -> UART_CLK_DIV_W<0> { + UART_CLK_DIV_W::new(self) } - #[doc = "Bit 23"] + #[doc = "Bit 4"] #[inline(always)] - pub fn ir_clk_en(&mut self) -> IR_CLK_EN_W { - IR_CLK_EN_W { w: self } + #[must_use] + pub fn uart_clk_en(&mut self) -> UART_CLK_EN_W<4> { + UART_CLK_EN_W::new(self) } - #[doc = "Bits 16:21"] + #[doc = "Bits 8:10"] #[inline(always)] - pub fn ir_clk_div(&mut self) -> IR_CLK_DIV_W { - IR_CLK_DIV_W { w: self } + #[must_use] + pub fn sf_clk_div(&mut self) -> SF_CLK_DIV_W<8> { + SF_CLK_DIV_W::new(self) } - #[doc = "Bits 14:15"] + #[doc = "Bit 11"] #[inline(always)] - pub fn sf_clk_sel2(&mut self) -> SF_CLK_SEL2_W { - SF_CLK_SEL2_W { w: self } + #[must_use] + pub fn sf_clk_en(&mut self) -> SF_CLK_EN_W<11> { + SF_CLK_EN_W::new(self) } #[doc = "Bits 12:13"] #[inline(always)] - pub fn sf_clk_sel(&mut self) -> SF_CLK_SEL_W { - SF_CLK_SEL_W { w: self } + #[must_use] + pub fn sf_clk_sel(&mut self) -> SF_CLK_SEL_W<12> { + SF_CLK_SEL_W::new(self) } - #[doc = "Bit 11"] + #[doc = "Bits 14:15"] #[inline(always)] - pub fn sf_clk_en(&mut self) -> SF_CLK_EN_W { - SF_CLK_EN_W { w: self } + #[must_use] + pub fn sf_clk_sel2(&mut self) -> SF_CLK_SEL2_W<14> { + SF_CLK_SEL2_W::new(self) } - #[doc = "Bits 8:10"] + #[doc = "Bits 16:21"] #[inline(always)] - pub fn sf_clk_div(&mut self) -> SF_CLK_DIV_W { - SF_CLK_DIV_W { w: self } + #[must_use] + pub fn ir_clk_div(&mut self) -> IR_CLK_DIV_W<16> { + IR_CLK_DIV_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 23"] #[inline(always)] - pub fn uart_clk_en(&mut self) -> UART_CLK_EN_W { - UART_CLK_EN_W { w: self } + #[must_use] + pub fn ir_clk_en(&mut self) -> IR_CLK_EN_W<23> { + IR_CLK_EN_W::new(self) } - #[doc = "Bits 0:2"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn uart_clk_div(&mut self) -> UART_CLK_DIV_W { - UART_CLK_DIV_W { w: self } + #[must_use] + pub fn dma_clk_en(&mut self) -> DMA_CLK_EN_W<24> { + DMA_CLK_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -426,11 +198,10 @@ impl crate::Readable for CLK_CFG2_SPEC { #[doc = "`write(|w| ..)` method takes [clk_cfg2::W](W) writer structure"] impl crate::Writable for CLK_CFG2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets clk_cfg2 to value 0xff8f_2b17"] impl crate::Resettable for CLK_CFG2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xff8f_2b17 - } + const RESET_VALUE: Self::Ux = 0xff8f_2b17; } diff --git a/src/glb/clk_cfg3.rs b/src/glb/clk_cfg3.rs index 5f57093..2e1bde2 100644 --- a/src/glb/clk_cfg3.rs +++ b/src/glb/clk_cfg3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,179 +28,77 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `i2c_clk_en` reader - "] -pub struct I2C_CLK_EN_R(crate::FieldReader); -impl I2C_CLK_EN_R { - pub(crate) fn new(bits: bool) -> Self { - I2C_CLK_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for I2C_CLK_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `i2c_clk_en` writer - "] -pub struct I2C_CLK_EN_W<'a> { - w: &'a mut W, -} -impl<'a> I2C_CLK_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24); - self.w - } -} -#[doc = "Field `i2c_clk_div` reader - "] -pub struct I2C_CLK_DIV_R(crate::FieldReader); -impl I2C_CLK_DIV_R { - pub(crate) fn new(bits: u8) -> Self { - I2C_CLK_DIV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for I2C_CLK_DIV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `i2c_clk_div` writer - "] -pub struct I2C_CLK_DIV_W<'a> { - w: &'a mut W, -} -impl<'a> I2C_CLK_DIV_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 16)) | ((value as u32 & 0xff) << 16); - self.w - } -} -#[doc = "Field `spi_clk_en` reader - "] -pub struct SPI_CLK_EN_R(crate::FieldReader); -impl SPI_CLK_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SPI_CLK_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SPI_CLK_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `spi_clk_en` writer - "] -pub struct SPI_CLK_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SPI_CLK_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} #[doc = "Field `spi_clk_div` reader - "] -pub struct SPI_CLK_DIV_R(crate::FieldReader); -impl SPI_CLK_DIV_R { - pub(crate) fn new(bits: u8) -> Self { - SPI_CLK_DIV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SPI_CLK_DIV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SPI_CLK_DIV_R = crate::FieldReader; #[doc = "Field `spi_clk_div` writer - "] -pub struct SPI_CLK_DIV_W<'a> { - w: &'a mut W, -} -impl<'a> SPI_CLK_DIV_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type SPI_CLK_DIV_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CLK_CFG3_SPEC, u8, u8, 5, O>; +#[doc = "Field `spi_clk_en` reader - "] +pub type SPI_CLK_EN_R = crate::BitReader; +#[doc = "Field `spi_clk_en` writer - "] +pub type SPI_CLK_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, CLK_CFG3_SPEC, bool, O>; +#[doc = "Field `i2c_clk_div` reader - "] +pub type I2C_CLK_DIV_R = crate::FieldReader; +#[doc = "Field `i2c_clk_div` writer - "] +pub type I2C_CLK_DIV_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CLK_CFG3_SPEC, u8, u8, 8, O>; +#[doc = "Field `i2c_clk_en` reader - "] +pub type I2C_CLK_EN_R = crate::BitReader; +#[doc = "Field `i2c_clk_en` writer - "] +pub type I2C_CLK_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, CLK_CFG3_SPEC, bool, O>; +impl R { + #[doc = "Bits 0:4"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x1f) | (value as u32 & 0x1f); - self.w + pub fn spi_clk_div(&self) -> SPI_CLK_DIV_R { + SPI_CLK_DIV_R::new((self.bits & 0x1f) as u8) } -} -impl R { - #[doc = "Bit 24"] + #[doc = "Bit 8"] #[inline(always)] - pub fn i2c_clk_en(&self) -> I2C_CLK_EN_R { - I2C_CLK_EN_R::new(((self.bits >> 24) & 0x01) != 0) + pub fn spi_clk_en(&self) -> SPI_CLK_EN_R { + SPI_CLK_EN_R::new(((self.bits >> 8) & 1) != 0) } #[doc = "Bits 16:23"] #[inline(always)] pub fn i2c_clk_div(&self) -> I2C_CLK_DIV_R { I2C_CLK_DIV_R::new(((self.bits >> 16) & 0xff) as u8) } - #[doc = "Bit 8"] - #[inline(always)] - pub fn spi_clk_en(&self) -> SPI_CLK_EN_R { - SPI_CLK_EN_R::new(((self.bits >> 8) & 0x01) != 0) - } - #[doc = "Bits 0:4"] + #[doc = "Bit 24"] #[inline(always)] - pub fn spi_clk_div(&self) -> SPI_CLK_DIV_R { - SPI_CLK_DIV_R::new((self.bits & 0x1f) as u8) + pub fn i2c_clk_en(&self) -> I2C_CLK_EN_R { + I2C_CLK_EN_R::new(((self.bits >> 24) & 1) != 0) } } impl W { - #[doc = "Bit 24"] + #[doc = "Bits 0:4"] #[inline(always)] - pub fn i2c_clk_en(&mut self) -> I2C_CLK_EN_W { - I2C_CLK_EN_W { w: self } + #[must_use] + pub fn spi_clk_div(&mut self) -> SPI_CLK_DIV_W<0> { + SPI_CLK_DIV_W::new(self) } - #[doc = "Bits 16:23"] + #[doc = "Bit 8"] #[inline(always)] - pub fn i2c_clk_div(&mut self) -> I2C_CLK_DIV_W { - I2C_CLK_DIV_W { w: self } + #[must_use] + pub fn spi_clk_en(&mut self) -> SPI_CLK_EN_W<8> { + SPI_CLK_EN_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bits 16:23"] #[inline(always)] - pub fn spi_clk_en(&mut self) -> SPI_CLK_EN_W { - SPI_CLK_EN_W { w: self } + #[must_use] + pub fn i2c_clk_div(&mut self) -> I2C_CLK_DIV_W<16> { + I2C_CLK_DIV_W::new(self) } - #[doc = "Bits 0:4"] + #[doc = "Bit 24"] #[inline(always)] - pub fn spi_clk_div(&mut self) -> SPI_CLK_DIV_W { - SPI_CLK_DIV_W { w: self } + #[must_use] + pub fn i2c_clk_en(&mut self) -> I2C_CLK_EN_W<24> { + I2C_CLK_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -217,11 +116,10 @@ impl crate::Readable for CLK_CFG3_SPEC { #[doc = "`write(|w| ..)` method takes [clk_cfg3::W](W) writer structure"] impl crate::Writable for CLK_CFG3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets clk_cfg3 to value 0x01ff_0103"] impl crate::Resettable for CLK_CFG3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x01ff_0103 - } + const RESET_VALUE: Self::Ux = 0x01ff_0103; } diff --git a/src/glb/cpu_clk_cfg.rs b/src/glb/cpu_clk_cfg.rs index 68f7352..a1a0e04 100644 --- a/src/glb/cpu_clk_cfg.rs +++ b/src/glb/cpu_clk_cfg.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,189 +28,79 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `debug_ndreset_gate` reader - "] -pub struct DEBUG_NDRESET_GATE_R(crate::FieldReader); -impl DEBUG_NDRESET_GATE_R { - pub(crate) fn new(bits: bool) -> Self { - DEBUG_NDRESET_GATE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DEBUG_NDRESET_GATE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `debug_ndreset_gate` writer - "] -pub struct DEBUG_NDRESET_GATE_W<'a> { - w: &'a mut W, -} -impl<'a> DEBUG_NDRESET_GATE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w - } -} -#[doc = "Field `cpu_rtc_sel` reader - "] -pub struct CPU_RTC_SEL_R(crate::FieldReader); -impl CPU_RTC_SEL_R { - pub(crate) fn new(bits: bool) -> Self { - CPU_RTC_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CPU_RTC_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cpu_rtc_sel` writer - "] -pub struct CPU_RTC_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> CPU_RTC_SEL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 19)) | ((value as u32 & 0x01) << 19); - self.w - } -} -#[doc = "Field `cpu_rtc_en` reader - "] -pub struct CPU_RTC_EN_R(crate::FieldReader); -impl CPU_RTC_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CPU_RTC_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CPU_RTC_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cpu_rtc_en` writer - "] -pub struct CPU_RTC_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CPU_RTC_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18); - self.w - } -} #[doc = "Field `cpu_rtc_div` reader - "] -pub struct CPU_RTC_DIV_R(crate::FieldReader); -impl CPU_RTC_DIV_R { - pub(crate) fn new(bits: u32) -> Self { - CPU_RTC_DIV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CPU_RTC_DIV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CPU_RTC_DIV_R = crate::FieldReader; #[doc = "Field `cpu_rtc_div` writer - "] -pub struct CPU_RTC_DIV_W<'a> { - w: &'a mut W, -} -impl<'a> CPU_RTC_DIV_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type CPU_RTC_DIV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, CPU_CLK_CFG_SPEC, u32, u32, 17, O>; +#[doc = "Field `cpu_rtc_en` reader - "] +pub type CPU_RTC_EN_R = crate::BitReader; +#[doc = "Field `cpu_rtc_en` writer - "] +pub type CPU_RTC_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, CPU_CLK_CFG_SPEC, bool, O>; +#[doc = "Field `cpu_rtc_sel` reader - "] +pub type CPU_RTC_SEL_R = crate::BitReader; +#[doc = "Field `cpu_rtc_sel` writer - "] +pub type CPU_RTC_SEL_W<'a, const O: u8> = crate::BitWriter<'a, u32, CPU_CLK_CFG_SPEC, bool, O>; +#[doc = "Field `debug_ndreset_gate` reader - "] +pub type DEBUG_NDRESET_GATE_R = crate::BitReader; +#[doc = "Field `debug_ndreset_gate` writer - "] +pub type DEBUG_NDRESET_GATE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, CPU_CLK_CFG_SPEC, bool, O>; +impl R { + #[doc = "Bits 0:16"] #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0x0001_ffff) | (value as u32 & 0x0001_ffff); - self.w + pub fn cpu_rtc_div(&self) -> CPU_RTC_DIV_R { + CPU_RTC_DIV_R::new(self.bits & 0x0001_ffff) } -} -impl R { - #[doc = "Bit 20"] + #[doc = "Bit 18"] #[inline(always)] - pub fn debug_ndreset_gate(&self) -> DEBUG_NDRESET_GATE_R { - DEBUG_NDRESET_GATE_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn cpu_rtc_en(&self) -> CPU_RTC_EN_R { + CPU_RTC_EN_R::new(((self.bits >> 18) & 1) != 0) } #[doc = "Bit 19"] #[inline(always)] pub fn cpu_rtc_sel(&self) -> CPU_RTC_SEL_R { - CPU_RTC_SEL_R::new(((self.bits >> 19) & 0x01) != 0) - } - #[doc = "Bit 18"] - #[inline(always)] - pub fn cpu_rtc_en(&self) -> CPU_RTC_EN_R { - CPU_RTC_EN_R::new(((self.bits >> 18) & 0x01) != 0) + CPU_RTC_SEL_R::new(((self.bits >> 19) & 1) != 0) } - #[doc = "Bits 0:16"] + #[doc = "Bit 20"] #[inline(always)] - pub fn cpu_rtc_div(&self) -> CPU_RTC_DIV_R { - CPU_RTC_DIV_R::new((self.bits & 0x0001_ffff) as u32) + pub fn debug_ndreset_gate(&self) -> DEBUG_NDRESET_GATE_R { + DEBUG_NDRESET_GATE_R::new(((self.bits >> 20) & 1) != 0) } } impl W { - #[doc = "Bit 20"] + #[doc = "Bits 0:16"] #[inline(always)] - pub fn debug_ndreset_gate(&mut self) -> DEBUG_NDRESET_GATE_W { - DEBUG_NDRESET_GATE_W { w: self } + #[must_use] + pub fn cpu_rtc_div(&mut self) -> CPU_RTC_DIV_W<0> { + CPU_RTC_DIV_W::new(self) } - #[doc = "Bit 19"] + #[doc = "Bit 18"] #[inline(always)] - pub fn cpu_rtc_sel(&mut self) -> CPU_RTC_SEL_W { - CPU_RTC_SEL_W { w: self } + #[must_use] + pub fn cpu_rtc_en(&mut self) -> CPU_RTC_EN_W<18> { + CPU_RTC_EN_W::new(self) } - #[doc = "Bit 18"] + #[doc = "Bit 19"] #[inline(always)] - pub fn cpu_rtc_en(&mut self) -> CPU_RTC_EN_W { - CPU_RTC_EN_W { w: self } + #[must_use] + pub fn cpu_rtc_sel(&mut self) -> CPU_RTC_SEL_W<19> { + CPU_RTC_SEL_W::new(self) } - #[doc = "Bits 0:16"] + #[doc = "Bit 20"] #[inline(always)] - pub fn cpu_rtc_div(&mut self) -> CPU_RTC_DIV_W { - CPU_RTC_DIV_W { w: self } + #[must_use] + pub fn debug_ndreset_gate(&mut self) -> DEBUG_NDRESET_GATE_W<20> { + DEBUG_NDRESET_GATE_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -227,11 +118,10 @@ impl crate::Readable for CPU_CLK_CFG_SPEC { #[doc = "`write(|w| ..)` method takes [cpu_clk_cfg::W](W) writer structure"] impl crate::Writable for CPU_CLK_CFG_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets CPU_CLK_CFG to value 0x0008_0010"] impl crate::Resettable for CPU_CLK_CFG_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0008_0010 - } + const RESET_VALUE: Self::Ux = 0x0008_0010; } diff --git a/src/glb/dbg_sel_hh.rs b/src/glb/dbg_sel_hh.rs index 06ad539..8793975 100644 --- a/src/glb/dbg_sel_hh.rs +++ b/src/glb/dbg_sel_hh.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `reg_dbg_hh_ctrl` reader - "] -pub struct REG_DBG_HH_CTRL_R(crate::FieldReader); -impl REG_DBG_HH_CTRL_R { - pub(crate) fn new(bits: u32) -> Self { - REG_DBG_HH_CTRL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_DBG_HH_CTRL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type REG_DBG_HH_CTRL_R = crate::FieldReader; #[doc = "Field `reg_dbg_hh_ctrl` writer - "] -pub struct REG_DBG_HH_CTRL_W<'a> { - w: &'a mut W, -} -impl<'a> REG_DBG_HH_CTRL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type REG_DBG_HH_CTRL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DBG_SEL_HH_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn reg_dbg_hh_ctrl(&self) -> REG_DBG_HH_CTRL_R { - REG_DBG_HH_CTRL_R::new((self.bits & 0xffff_ffff) as u32) + REG_DBG_HH_CTRL_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn reg_dbg_hh_ctrl(&mut self) -> REG_DBG_HH_CTRL_W { - REG_DBG_HH_CTRL_W { w: self } + #[must_use] + pub fn reg_dbg_hh_ctrl(&mut self) -> REG_DBG_HH_CTRL_W<0> { + REG_DBG_HH_CTRL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for DBG_SEL_HH_SPEC { #[doc = "`write(|w| ..)` method takes [dbg_sel_hh::W](W) writer structure"] impl crate::Writable for DBG_SEL_HH_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets DBG_SEL_HH to value 0"] impl crate::Resettable for DBG_SEL_HH_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/dbg_sel_hl.rs b/src/glb/dbg_sel_hl.rs index 1df8b51..0dfbd5c 100644 --- a/src/glb/dbg_sel_hl.rs +++ b/src/glb/dbg_sel_hl.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `reg_dbg_hl_ctrl` reader - "] -pub struct REG_DBG_HL_CTRL_R(crate::FieldReader); -impl REG_DBG_HL_CTRL_R { - pub(crate) fn new(bits: u32) -> Self { - REG_DBG_HL_CTRL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_DBG_HL_CTRL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type REG_DBG_HL_CTRL_R = crate::FieldReader; #[doc = "Field `reg_dbg_hl_ctrl` writer - "] -pub struct REG_DBG_HL_CTRL_W<'a> { - w: &'a mut W, -} -impl<'a> REG_DBG_HL_CTRL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type REG_DBG_HL_CTRL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DBG_SEL_HL_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn reg_dbg_hl_ctrl(&self) -> REG_DBG_HL_CTRL_R { - REG_DBG_HL_CTRL_R::new((self.bits & 0xffff_ffff) as u32) + REG_DBG_HL_CTRL_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn reg_dbg_hl_ctrl(&mut self) -> REG_DBG_HL_CTRL_W { - REG_DBG_HL_CTRL_W { w: self } + #[must_use] + pub fn reg_dbg_hl_ctrl(&mut self) -> REG_DBG_HL_CTRL_W<0> { + REG_DBG_HL_CTRL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for DBG_SEL_HL_SPEC { #[doc = "`write(|w| ..)` method takes [dbg_sel_hl::W](W) writer structure"] impl crate::Writable for DBG_SEL_HL_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets DBG_SEL_HL to value 0"] impl crate::Resettable for DBG_SEL_HL_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/dbg_sel_lh.rs b/src/glb/dbg_sel_lh.rs index 9c71b07..73d07b3 100644 --- a/src/glb/dbg_sel_lh.rs +++ b/src/glb/dbg_sel_lh.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `reg_dbg_lh_ctrl` reader - "] -pub struct REG_DBG_LH_CTRL_R(crate::FieldReader); -impl REG_DBG_LH_CTRL_R { - pub(crate) fn new(bits: u32) -> Self { - REG_DBG_LH_CTRL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_DBG_LH_CTRL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type REG_DBG_LH_CTRL_R = crate::FieldReader; #[doc = "Field `reg_dbg_lh_ctrl` writer - "] -pub struct REG_DBG_LH_CTRL_W<'a> { - w: &'a mut W, -} -impl<'a> REG_DBG_LH_CTRL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type REG_DBG_LH_CTRL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DBG_SEL_LH_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn reg_dbg_lh_ctrl(&self) -> REG_DBG_LH_CTRL_R { - REG_DBG_LH_CTRL_R::new((self.bits & 0xffff_ffff) as u32) + REG_DBG_LH_CTRL_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn reg_dbg_lh_ctrl(&mut self) -> REG_DBG_LH_CTRL_W { - REG_DBG_LH_CTRL_W { w: self } + #[must_use] + pub fn reg_dbg_lh_ctrl(&mut self) -> REG_DBG_LH_CTRL_W<0> { + REG_DBG_LH_CTRL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for DBG_SEL_LH_SPEC { #[doc = "`write(|w| ..)` method takes [dbg_sel_lh::W](W) writer structure"] impl crate::Writable for DBG_SEL_LH_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets DBG_SEL_LH to value 0"] impl crate::Resettable for DBG_SEL_LH_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/dbg_sel_ll.rs b/src/glb/dbg_sel_ll.rs index eefd420..3ab2026 100644 --- a/src/glb/dbg_sel_ll.rs +++ b/src/glb/dbg_sel_ll.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `reg_dbg_ll_ctrl` reader - "] -pub struct REG_DBG_LL_CTRL_R(crate::FieldReader); -impl REG_DBG_LL_CTRL_R { - pub(crate) fn new(bits: u32) -> Self { - REG_DBG_LL_CTRL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_DBG_LL_CTRL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type REG_DBG_LL_CTRL_R = crate::FieldReader; #[doc = "Field `reg_dbg_ll_ctrl` writer - "] -pub struct REG_DBG_LL_CTRL_W<'a> { - w: &'a mut W, -} -impl<'a> REG_DBG_LL_CTRL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type REG_DBG_LL_CTRL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DBG_SEL_LL_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn reg_dbg_ll_ctrl(&self) -> REG_DBG_LL_CTRL_R { - REG_DBG_LL_CTRL_R::new((self.bits & 0xffff_ffff) as u32) + REG_DBG_LL_CTRL_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn reg_dbg_ll_ctrl(&mut self) -> REG_DBG_LL_CTRL_W { - REG_DBG_LL_CTRL_W { w: self } + #[must_use] + pub fn reg_dbg_ll_ctrl(&mut self) -> REG_DBG_LL_CTRL_W<0> { + REG_DBG_LL_CTRL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for DBG_SEL_LL_SPEC { #[doc = "`write(|w| ..)` method takes [dbg_sel_ll::W](W) writer structure"] impl crate::Writable for DBG_SEL_LL_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets DBG_SEL_LL to value 0"] impl crate::Resettable for DBG_SEL_LL_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/debug.rs b/src/glb/debug.rs index f385278..99fa7a3 100644 --- a/src/glb/debug.rs +++ b/src/glb/debug.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,80 +28,39 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `debug_i` reader - "] -pub struct DEBUG_I_R(crate::FieldReader); -impl DEBUG_I_R { - pub(crate) fn new(bits: u32) -> Self { - DEBUG_I_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DEBUG_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} #[doc = "Field `debug_oe` reader - "] -pub struct DEBUG_OE_R(crate::FieldReader); -impl DEBUG_OE_R { - pub(crate) fn new(bits: bool) -> Self { - DEBUG_OE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DEBUG_OE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type DEBUG_OE_R = crate::BitReader; #[doc = "Field `debug_oe` writer - "] -pub struct DEBUG_OE_W<'a> { - w: &'a mut W, -} -impl<'a> DEBUG_OE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type DEBUG_OE_W<'a, const O: u8> = crate::BitWriter<'a, u32, DEBUG_SPEC, bool, O>; +#[doc = "Field `debug_i` reader - "] +pub type DEBUG_I_R = crate::FieldReader; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn debug_oe(&self) -> DEBUG_OE_R { + DEBUG_OE_R::new((self.bits & 1) != 0) } -} -impl R { #[doc = "Bits 1:31"] #[inline(always)] pub fn debug_i(&self) -> DEBUG_I_R { - DEBUG_I_R::new(((self.bits >> 1) & 0x7fff_ffff) as u32) - } - #[doc = "Bit 0"] - #[inline(always)] - pub fn debug_oe(&self) -> DEBUG_OE_R { - DEBUG_OE_R::new((self.bits & 0x01) != 0) + DEBUG_I_R::new((self.bits >> 1) & 0x7fff_ffff) } } impl W { #[doc = "Bit 0"] #[inline(always)] - pub fn debug_oe(&mut self) -> DEBUG_OE_W { - DEBUG_OE_W { w: self } + #[must_use] + pub fn debug_oe(&mut self) -> DEBUG_OE_W<0> { + DEBUG_OE_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -118,11 +78,10 @@ impl crate::Readable for DEBUG_SPEC { #[doc = "`write(|w| ..)` method takes [debug::W](W) writer structure"] impl crate::Writable for DEBUG_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets debug to value 0"] impl crate::Resettable for DEBUG_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/dig32k_wakeup_ctrl.rs b/src/glb/dig32k_wakeup_ctrl.rs index 1fd6330..fd2b606 100644 --- a/src/glb/dig32k_wakeup_ctrl.rs +++ b/src/glb/dig32k_wakeup_ctrl.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,363 +28,145 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `reg_en_platform_wakeup` reader - "] -pub struct REG_EN_PLATFORM_WAKEUP_R(crate::FieldReader); -impl REG_EN_PLATFORM_WAKEUP_R { - pub(crate) fn new(bits: bool) -> Self { - REG_EN_PLATFORM_WAKEUP_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_EN_PLATFORM_WAKEUP_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_en_platform_wakeup` writer - "] -pub struct REG_EN_PLATFORM_WAKEUP_W<'a> { - w: &'a mut W, -} -impl<'a> REG_EN_PLATFORM_WAKEUP_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 31)) | ((value as u32 & 0x01) << 31); - self.w - } -} -#[doc = "Field `dig_clk_src_sel` reader - "] -pub struct DIG_CLK_SRC_SEL_R(crate::FieldReader); -impl DIG_CLK_SRC_SEL_R { - pub(crate) fn new(bits: bool) -> Self { - DIG_CLK_SRC_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DIG_CLK_SRC_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dig_clk_src_sel` writer - "] -pub struct DIG_CLK_SRC_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> DIG_CLK_SRC_SEL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 28)) | ((value as u32 & 0x01) << 28); - self.w - } -} -#[doc = "Field `dig_512k_comp` reader - "] -pub struct DIG_512K_COMP_R(crate::FieldReader); -impl DIG_512K_COMP_R { - pub(crate) fn new(bits: bool) -> Self { - DIG_512K_COMP_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DIG_512K_COMP_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dig_512k_comp` writer - "] -pub struct DIG_512K_COMP_W<'a> { - w: &'a mut W, -} -impl<'a> DIG_512K_COMP_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 25)) | ((value as u32 & 0x01) << 25); - self.w - } -} -#[doc = "Field `dig_512k_en` reader - "] -pub struct DIG_512K_EN_R(crate::FieldReader); -impl DIG_512K_EN_R { - pub(crate) fn new(bits: bool) -> Self { - DIG_512K_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DIG_512K_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dig_512k_en` writer - "] -pub struct DIG_512K_EN_W<'a> { - w: &'a mut W, -} -impl<'a> DIG_512K_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24); - self.w - } -} -#[doc = "Field `dig_512k_div` reader - "] -pub struct DIG_512K_DIV_R(crate::FieldReader); -impl DIG_512K_DIV_R { - pub(crate) fn new(bits: u8) -> Self { - DIG_512K_DIV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DIG_512K_DIV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dig_512k_div` writer - "] -pub struct DIG_512K_DIV_W<'a> { - w: &'a mut W, -} -impl<'a> DIG_512K_DIV_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x7f << 16)) | ((value as u32 & 0x7f) << 16); - self.w - } -} -#[doc = "Field `dig_32k_comp` reader - "] -pub struct DIG_32K_COMP_R(crate::FieldReader); -impl DIG_32K_COMP_R { - pub(crate) fn new(bits: bool) -> Self { - DIG_32K_COMP_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DIG_32K_COMP_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dig_32k_comp` writer - "] -pub struct DIG_32K_COMP_W<'a> { - w: &'a mut W, -} -impl<'a> DIG_32K_COMP_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13); - self.w - } -} -#[doc = "Field `dig_32k_en` reader - "] -pub struct DIG_32K_EN_R(crate::FieldReader); -impl DIG_32K_EN_R { - pub(crate) fn new(bits: bool) -> Self { - DIG_32K_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DIG_32K_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dig_32k_en` writer - "] -pub struct DIG_32K_EN_W<'a> { - w: &'a mut W, -} -impl<'a> DIG_32K_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} #[doc = "Field `dig_32k_div` reader - "] -pub struct DIG_32K_DIV_R(crate::FieldReader); -impl DIG_32K_DIV_R { - pub(crate) fn new(bits: u16) -> Self { - DIG_32K_DIV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DIG_32K_DIV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type DIG_32K_DIV_R = crate::FieldReader; #[doc = "Field `dig_32k_div` writer - "] -pub struct DIG_32K_DIV_W<'a> { - w: &'a mut W, -} -impl<'a> DIG_32K_DIV_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x07ff) | (value as u32 & 0x07ff); - self.w - } -} +pub type DIG_32K_DIV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DIG32K_WAKEUP_CTRL_SPEC, u16, u16, 11, O>; +#[doc = "Field `dig_32k_en` reader - "] +pub type DIG_32K_EN_R = crate::BitReader; +#[doc = "Field `dig_32k_en` writer - "] +pub type DIG_32K_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, DIG32K_WAKEUP_CTRL_SPEC, bool, O>; +#[doc = "Field `dig_32k_comp` reader - "] +pub type DIG_32K_COMP_R = crate::BitReader; +#[doc = "Field `dig_32k_comp` writer - "] +pub type DIG_32K_COMP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, DIG32K_WAKEUP_CTRL_SPEC, bool, O>; +#[doc = "Field `dig_512k_div` reader - "] +pub type DIG_512K_DIV_R = crate::FieldReader; +#[doc = "Field `dig_512k_div` writer - "] +pub type DIG_512K_DIV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DIG32K_WAKEUP_CTRL_SPEC, u8, u8, 7, O>; +#[doc = "Field `dig_512k_en` reader - "] +pub type DIG_512K_EN_R = crate::BitReader; +#[doc = "Field `dig_512k_en` writer - "] +pub type DIG_512K_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, DIG32K_WAKEUP_CTRL_SPEC, bool, O>; +#[doc = "Field `dig_512k_comp` reader - "] +pub type DIG_512K_COMP_R = crate::BitReader; +#[doc = "Field `dig_512k_comp` writer - "] +pub type DIG_512K_COMP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, DIG32K_WAKEUP_CTRL_SPEC, bool, O>; +#[doc = "Field `dig_clk_src_sel` reader - "] +pub type DIG_CLK_SRC_SEL_R = crate::BitReader; +#[doc = "Field `dig_clk_src_sel` writer - "] +pub type DIG_CLK_SRC_SEL_W<'a, const O: u8> = + crate::BitWriter<'a, u32, DIG32K_WAKEUP_CTRL_SPEC, bool, O>; +#[doc = "Field `reg_en_platform_wakeup` reader - "] +pub type REG_EN_PLATFORM_WAKEUP_R = crate::BitReader; +#[doc = "Field `reg_en_platform_wakeup` writer - "] +pub type REG_EN_PLATFORM_WAKEUP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, DIG32K_WAKEUP_CTRL_SPEC, bool, O>; impl R { - #[doc = "Bit 31"] - #[inline(always)] - pub fn reg_en_platform_wakeup(&self) -> REG_EN_PLATFORM_WAKEUP_R { - REG_EN_PLATFORM_WAKEUP_R::new(((self.bits >> 31) & 0x01) != 0) - } - #[doc = "Bit 28"] + #[doc = "Bits 0:10"] #[inline(always)] - pub fn dig_clk_src_sel(&self) -> DIG_CLK_SRC_SEL_R { - DIG_CLK_SRC_SEL_R::new(((self.bits >> 28) & 0x01) != 0) + pub fn dig_32k_div(&self) -> DIG_32K_DIV_R { + DIG_32K_DIV_R::new((self.bits & 0x07ff) as u16) } - #[doc = "Bit 25"] + #[doc = "Bit 12"] #[inline(always)] - pub fn dig_512k_comp(&self) -> DIG_512K_COMP_R { - DIG_512K_COMP_R::new(((self.bits >> 25) & 0x01) != 0) + pub fn dig_32k_en(&self) -> DIG_32K_EN_R { + DIG_32K_EN_R::new(((self.bits >> 12) & 1) != 0) } - #[doc = "Bit 24"] + #[doc = "Bit 13"] #[inline(always)] - pub fn dig_512k_en(&self) -> DIG_512K_EN_R { - DIG_512K_EN_R::new(((self.bits >> 24) & 0x01) != 0) + pub fn dig_32k_comp(&self) -> DIG_32K_COMP_R { + DIG_32K_COMP_R::new(((self.bits >> 13) & 1) != 0) } #[doc = "Bits 16:22"] #[inline(always)] pub fn dig_512k_div(&self) -> DIG_512K_DIV_R { DIG_512K_DIV_R::new(((self.bits >> 16) & 0x7f) as u8) } - #[doc = "Bit 13"] + #[doc = "Bit 24"] #[inline(always)] - pub fn dig_32k_comp(&self) -> DIG_32K_COMP_R { - DIG_32K_COMP_R::new(((self.bits >> 13) & 0x01) != 0) + pub fn dig_512k_en(&self) -> DIG_512K_EN_R { + DIG_512K_EN_R::new(((self.bits >> 24) & 1) != 0) } - #[doc = "Bit 12"] + #[doc = "Bit 25"] #[inline(always)] - pub fn dig_32k_en(&self) -> DIG_32K_EN_R { - DIG_32K_EN_R::new(((self.bits >> 12) & 0x01) != 0) + pub fn dig_512k_comp(&self) -> DIG_512K_COMP_R { + DIG_512K_COMP_R::new(((self.bits >> 25) & 1) != 0) } - #[doc = "Bits 0:10"] + #[doc = "Bit 28"] #[inline(always)] - pub fn dig_32k_div(&self) -> DIG_32K_DIV_R { - DIG_32K_DIV_R::new((self.bits & 0x07ff) as u16) + pub fn dig_clk_src_sel(&self) -> DIG_CLK_SRC_SEL_R { + DIG_CLK_SRC_SEL_R::new(((self.bits >> 28) & 1) != 0) } -} -impl W { #[doc = "Bit 31"] #[inline(always)] - pub fn reg_en_platform_wakeup(&mut self) -> REG_EN_PLATFORM_WAKEUP_W { - REG_EN_PLATFORM_WAKEUP_W { w: self } + pub fn reg_en_platform_wakeup(&self) -> REG_EN_PLATFORM_WAKEUP_R { + REG_EN_PLATFORM_WAKEUP_R::new(((self.bits >> 31) & 1) != 0) } - #[doc = "Bit 28"] +} +impl W { + #[doc = "Bits 0:10"] #[inline(always)] - pub fn dig_clk_src_sel(&mut self) -> DIG_CLK_SRC_SEL_W { - DIG_CLK_SRC_SEL_W { w: self } + #[must_use] + pub fn dig_32k_div(&mut self) -> DIG_32K_DIV_W<0> { + DIG_32K_DIV_W::new(self) } - #[doc = "Bit 25"] + #[doc = "Bit 12"] #[inline(always)] - pub fn dig_512k_comp(&mut self) -> DIG_512K_COMP_W { - DIG_512K_COMP_W { w: self } + #[must_use] + pub fn dig_32k_en(&mut self) -> DIG_32K_EN_W<12> { + DIG_32K_EN_W::new(self) } - #[doc = "Bit 24"] + #[doc = "Bit 13"] #[inline(always)] - pub fn dig_512k_en(&mut self) -> DIG_512K_EN_W { - DIG_512K_EN_W { w: self } + #[must_use] + pub fn dig_32k_comp(&mut self) -> DIG_32K_COMP_W<13> { + DIG_32K_COMP_W::new(self) } #[doc = "Bits 16:22"] #[inline(always)] - pub fn dig_512k_div(&mut self) -> DIG_512K_DIV_W { - DIG_512K_DIV_W { w: self } + #[must_use] + pub fn dig_512k_div(&mut self) -> DIG_512K_DIV_W<16> { + DIG_512K_DIV_W::new(self) } - #[doc = "Bit 13"] + #[doc = "Bit 24"] #[inline(always)] - pub fn dig_32k_comp(&mut self) -> DIG_32K_COMP_W { - DIG_32K_COMP_W { w: self } + #[must_use] + pub fn dig_512k_en(&mut self) -> DIG_512K_EN_W<24> { + DIG_512K_EN_W::new(self) } - #[doc = "Bit 12"] + #[doc = "Bit 25"] #[inline(always)] - pub fn dig_32k_en(&mut self) -> DIG_32K_EN_W { - DIG_32K_EN_W { w: self } + #[must_use] + pub fn dig_512k_comp(&mut self) -> DIG_512K_COMP_W<25> { + DIG_512K_COMP_W::new(self) } - #[doc = "Bits 0:10"] + #[doc = "Bit 28"] #[inline(always)] - pub fn dig_32k_div(&mut self) -> DIG_32K_DIV_W { - DIG_32K_DIV_W { w: self } + #[must_use] + pub fn dig_clk_src_sel(&mut self) -> DIG_CLK_SRC_SEL_W<28> { + DIG_CLK_SRC_SEL_W::new(self) + } + #[doc = "Bit 31"] + #[inline(always)] + #[must_use] + pub fn reg_en_platform_wakeup(&mut self) -> REG_EN_PLATFORM_WAKEUP_W<31> { + REG_EN_PLATFORM_WAKEUP_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -401,11 +184,10 @@ impl crate::Readable for DIG32K_WAKEUP_CTRL_SPEC { #[doc = "`write(|w| ..)` method takes [dig32k_wakeup_ctrl::W](W) writer structure"] impl crate::Writable for DIG32K_WAKEUP_CTRL_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets DIG32K_WAKEUP_CTRL to value 0x033e_13e8"] impl crate::Resettable for DIG32K_WAKEUP_CTRL_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x033e_13e8 - } + const RESET_VALUE: Self::Ux = 0x033e_13e8; } diff --git a/src/glb/glb_parm.rs b/src/glb/glb_parm.rs index b75c400..7192eb8 100644 --- a/src/glb/glb_parm.rs +++ b/src/glb/glb_parm.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,777 +28,282 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `uart_swap_set` reader - "] -pub struct UART_SWAP_SET_R(crate::FieldReader); -impl UART_SWAP_SET_R { - pub(crate) fn new(bits: u8) -> Self { - UART_SWAP_SET_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for UART_SWAP_SET_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `uart_swap_set` writer - "] -pub struct UART_SWAP_SET_W<'a> { - w: &'a mut W, -} -impl<'a> UART_SWAP_SET_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 24)) | ((value as u32 & 0x07) << 24); - self.w - } -} -#[doc = "Field `p7_jtag_use_io_2_5` reader - "] -pub struct P7_JTAG_USE_IO_2_5_R(crate::FieldReader); -impl P7_JTAG_USE_IO_2_5_R { - pub(crate) fn new(bits: bool) -> Self { - P7_JTAG_USE_IO_2_5_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for P7_JTAG_USE_IO_2_5_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `p7_jtag_use_io_2_5` writer - "] -pub struct P7_JTAG_USE_IO_2_5_W<'a> { - w: &'a mut W, -} -impl<'a> P7_JTAG_USE_IO_2_5_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23); - self.w - } -} -#[doc = "Field `p6_sdio_use_io_0_5` reader - "] -pub struct P6_SDIO_USE_IO_0_5_R(crate::FieldReader); -impl P6_SDIO_USE_IO_0_5_R { - pub(crate) fn new(bits: bool) -> Self { - P6_SDIO_USE_IO_0_5_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for P6_SDIO_USE_IO_0_5_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `p6_sdio_use_io_0_5` writer - "] -pub struct P6_SDIO_USE_IO_0_5_W<'a> { - w: &'a mut W, -} -impl<'a> P6_SDIO_USE_IO_0_5_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 22)) | ((value as u32 & 0x01) << 22); - self.w - } -} -#[doc = "Field `p5_dac_test_with_jtag` reader - "] -pub struct P5_DAC_TEST_WITH_JTAG_R(crate::FieldReader); -impl P5_DAC_TEST_WITH_JTAG_R { - pub(crate) fn new(bits: bool) -> Self { - P5_DAC_TEST_WITH_JTAG_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for P5_DAC_TEST_WITH_JTAG_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `p5_dac_test_with_jtag` writer - "] -pub struct P5_DAC_TEST_WITH_JTAG_W<'a> { - w: &'a mut W, -} -impl<'a> P5_DAC_TEST_WITH_JTAG_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); - self.w - } -} -#[doc = "Field `p4_adc_test_with_jtag` reader - "] -pub struct P4_ADC_TEST_WITH_JTAG_R(crate::FieldReader); -impl P4_ADC_TEST_WITH_JTAG_R { - pub(crate) fn new(bits: bool) -> Self { - P4_ADC_TEST_WITH_JTAG_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for P4_ADC_TEST_WITH_JTAG_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `p4_adc_test_with_jtag` writer - "] -pub struct P4_ADC_TEST_WITH_JTAG_W<'a> { - w: &'a mut W, -} -impl<'a> P4_ADC_TEST_WITH_JTAG_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w - } -} -#[doc = "Field `p3_cci_use_io_2_5` reader - "] -pub struct P3_CCI_USE_IO_2_5_R(crate::FieldReader); -impl P3_CCI_USE_IO_2_5_R { - pub(crate) fn new(bits: bool) -> Self { - P3_CCI_USE_IO_2_5_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for P3_CCI_USE_IO_2_5_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `p3_cci_use_io_2_5` writer - "] -pub struct P3_CCI_USE_IO_2_5_W<'a> { - w: &'a mut W, -} -impl<'a> P3_CCI_USE_IO_2_5_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 19)) | ((value as u32 & 0x01) << 19); - self.w - } -} -#[doc = "Field `p2_dac_test_with_cci` reader - "] -pub struct P2_DAC_TEST_WITH_CCI_R(crate::FieldReader); -impl P2_DAC_TEST_WITH_CCI_R { - pub(crate) fn new(bits: bool) -> Self { - P2_DAC_TEST_WITH_CCI_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for P2_DAC_TEST_WITH_CCI_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `p2_dac_test_with_cci` writer - "] -pub struct P2_DAC_TEST_WITH_CCI_W<'a> { - w: &'a mut W, -} -impl<'a> P2_DAC_TEST_WITH_CCI_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18); - self.w - } -} -#[doc = "Field `p1_adc_test_with_cci` reader - "] -pub struct P1_ADC_TEST_WITH_CCI_R(crate::FieldReader); -impl P1_ADC_TEST_WITH_CCI_R { - pub(crate) fn new(bits: bool) -> Self { - P1_ADC_TEST_WITH_CCI_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for P1_ADC_TEST_WITH_CCI_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `p1_adc_test_with_cci` writer - "] -pub struct P1_ADC_TEST_WITH_CCI_W<'a> { - w: &'a mut W, -} -impl<'a> P1_ADC_TEST_WITH_CCI_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w - } -} -#[doc = "Field `reg_cci_use_sdio_pin` reader - "] -pub struct REG_CCI_USE_SDIO_PIN_R(crate::FieldReader); -impl REG_CCI_USE_SDIO_PIN_R { - pub(crate) fn new(bits: bool) -> Self { - REG_CCI_USE_SDIO_PIN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_CCI_USE_SDIO_PIN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_cci_use_sdio_pin` writer - "] -pub struct REG_CCI_USE_SDIO_PIN_W<'a> { - w: &'a mut W, -} -impl<'a> REG_CCI_USE_SDIO_PIN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `reg_cci_use_jtag_pin` reader - "] -pub struct REG_CCI_USE_JTAG_PIN_R(crate::FieldReader); -impl REG_CCI_USE_JTAG_PIN_R { - pub(crate) fn new(bits: bool) -> Self { - REG_CCI_USE_JTAG_PIN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_CCI_USE_JTAG_PIN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_cci_use_jtag_pin` writer - "] -pub struct REG_CCI_USE_JTAG_PIN_W<'a> { - w: &'a mut W, -} -impl<'a> REG_CCI_USE_JTAG_PIN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15); - self.w - } -} -#[doc = "Field `reg_spi_0_swap` reader - "] -pub struct REG_SPI_0_SWAP_R(crate::FieldReader); -impl REG_SPI_0_SWAP_R { - pub(crate) fn new(bits: bool) -> Self { - REG_SPI_0_SWAP_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_SPI_0_SWAP_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_spi_0_swap` writer - "] -pub struct REG_SPI_0_SWAP_W<'a> { - w: &'a mut W, -} -impl<'a> REG_SPI_0_SWAP_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13); - self.w - } -} -#[doc = "Field `reg_spi_0_master_mode` reader - "] -pub struct REG_SPI_0_MASTER_MODE_R(crate::FieldReader); -impl REG_SPI_0_MASTER_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_SPI_0_MASTER_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_SPI_0_MASTER_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_spi_0_master_mode` writer - "] -pub struct REG_SPI_0_MASTER_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_SPI_0_MASTER_MODE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} -#[doc = "Field `sel_embedded_sflash` reader - "] -pub struct SEL_EMBEDDED_SFLASH_R(crate::FieldReader); -impl SEL_EMBEDDED_SFLASH_R { - pub(crate) fn new(bits: bool) -> Self { - SEL_EMBEDDED_SFLASH_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SEL_EMBEDDED_SFLASH_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sel_embedded_sflash` writer - "] -pub struct SEL_EMBEDDED_SFLASH_W<'a> { - w: &'a mut W, -} -impl<'a> SEL_EMBEDDED_SFLASH_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w - } -} -#[doc = "Field `swap_sflash_io_3_io_0` reader - "] -pub struct SWAP_SFLASH_IO_3_IO_0_R(crate::FieldReader); -impl SWAP_SFLASH_IO_3_IO_0_R { - pub(crate) fn new(bits: bool) -> Self { - SWAP_SFLASH_IO_3_IO_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SWAP_SFLASH_IO_3_IO_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `swap_sflash_io_3_io_0` writer - "] -pub struct SWAP_SFLASH_IO_3_IO_0_W<'a> { - w: &'a mut W, -} -impl<'a> SWAP_SFLASH_IO_3_IO_0_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `jtag_swap_set` reader - "] -pub struct JTAG_SWAP_SET_R(crate::FieldReader); -impl JTAG_SWAP_SET_R { - pub(crate) fn new(bits: u8) -> Self { - JTAG_SWAP_SET_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for JTAG_SWAP_SET_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `jtag_swap_set` writer - "] -pub struct JTAG_SWAP_SET_W<'a> { - w: &'a mut W, -} -impl<'a> JTAG_SWAP_SET_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 2)) | ((value as u32 & 0x3f) << 2); - self.w - } -} -#[doc = "Field `reg_ext_rst_smt` reader - "] -pub struct REG_EXT_RST_SMT_R(crate::FieldReader); -impl REG_EXT_RST_SMT_R { - pub(crate) fn new(bits: bool) -> Self { - REG_EXT_RST_SMT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_EXT_RST_SMT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_ext_rst_smt` writer - "] -pub struct REG_EXT_RST_SMT_W<'a> { - w: &'a mut W, -} -impl<'a> REG_EXT_RST_SMT_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `reg_bd_en` reader - "] -pub struct REG_BD_EN_R(crate::FieldReader); -impl REG_BD_EN_R { - pub(crate) fn new(bits: bool) -> Self { - REG_BD_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_BD_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type REG_BD_EN_R = crate::BitReader; #[doc = "Field `reg_bd_en` writer - "] -pub struct REG_BD_EN_W<'a> { - w: &'a mut W, -} -impl<'a> REG_BD_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type REG_BD_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, GLB_PARM_SPEC, bool, O>; +#[doc = "Field `reg_ext_rst_smt` reader - "] +pub type REG_EXT_RST_SMT_R = crate::BitReader; +#[doc = "Field `reg_ext_rst_smt` writer - "] +pub type REG_EXT_RST_SMT_W<'a, const O: u8> = crate::BitWriter<'a, u32, GLB_PARM_SPEC, bool, O>; +#[doc = "Field `jtag_swap_set` reader - "] +pub type JTAG_SWAP_SET_R = crate::FieldReader; +#[doc = "Field `jtag_swap_set` writer - "] +pub type JTAG_SWAP_SET_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GLB_PARM_SPEC, u8, u8, 6, O>; +#[doc = "Field `swap_sflash_io_3_io_0` reader - "] +pub type SWAP_SFLASH_IO_3_IO_0_R = crate::BitReader; +#[doc = "Field `swap_sflash_io_3_io_0` writer - "] +pub type SWAP_SFLASH_IO_3_IO_0_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GLB_PARM_SPEC, bool, O>; +#[doc = "Field `sel_embedded_sflash` reader - "] +pub type SEL_EMBEDDED_SFLASH_R = crate::BitReader; +#[doc = "Field `sel_embedded_sflash` writer - "] +pub type SEL_EMBEDDED_SFLASH_W<'a, const O: u8> = crate::BitWriter<'a, u32, GLB_PARM_SPEC, bool, O>; +#[doc = "Field `reg_spi_0_master_mode` reader - "] +pub type REG_SPI_0_MASTER_MODE_R = crate::BitReader; +#[doc = "Field `reg_spi_0_master_mode` writer - "] +pub type REG_SPI_0_MASTER_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GLB_PARM_SPEC, bool, O>; +#[doc = "Field `reg_spi_0_swap` reader - "] +pub type REG_SPI_0_SWAP_R = crate::BitReader; +#[doc = "Field `reg_spi_0_swap` writer - "] +pub type REG_SPI_0_SWAP_W<'a, const O: u8> = crate::BitWriter<'a, u32, GLB_PARM_SPEC, bool, O>; +#[doc = "Field `reg_cci_use_jtag_pin` reader - "] +pub type REG_CCI_USE_JTAG_PIN_R = crate::BitReader; +#[doc = "Field `reg_cci_use_jtag_pin` writer - "] +pub type REG_CCI_USE_JTAG_PIN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GLB_PARM_SPEC, bool, O>; +#[doc = "Field `reg_cci_use_sdio_pin` reader - "] +pub type REG_CCI_USE_SDIO_PIN_R = crate::BitReader; +#[doc = "Field `reg_cci_use_sdio_pin` writer - "] +pub type REG_CCI_USE_SDIO_PIN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GLB_PARM_SPEC, bool, O>; +#[doc = "Field `p1_adc_test_with_cci` reader - "] +pub type P1_ADC_TEST_WITH_CCI_R = crate::BitReader; +#[doc = "Field `p1_adc_test_with_cci` writer - "] +pub type P1_ADC_TEST_WITH_CCI_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GLB_PARM_SPEC, bool, O>; +#[doc = "Field `p2_dac_test_with_cci` reader - "] +pub type P2_DAC_TEST_WITH_CCI_R = crate::BitReader; +#[doc = "Field `p2_dac_test_with_cci` writer - "] +pub type P2_DAC_TEST_WITH_CCI_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GLB_PARM_SPEC, bool, O>; +#[doc = "Field `p3_cci_use_io_2_5` reader - "] +pub type P3_CCI_USE_IO_2_5_R = crate::BitReader; +#[doc = "Field `p3_cci_use_io_2_5` writer - "] +pub type P3_CCI_USE_IO_2_5_W<'a, const O: u8> = crate::BitWriter<'a, u32, GLB_PARM_SPEC, bool, O>; +#[doc = "Field `p4_adc_test_with_jtag` reader - "] +pub type P4_ADC_TEST_WITH_JTAG_R = crate::BitReader; +#[doc = "Field `p4_adc_test_with_jtag` writer - "] +pub type P4_ADC_TEST_WITH_JTAG_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GLB_PARM_SPEC, bool, O>; +#[doc = "Field `p5_dac_test_with_jtag` reader - "] +pub type P5_DAC_TEST_WITH_JTAG_R = crate::BitReader; +#[doc = "Field `p5_dac_test_with_jtag` writer - "] +pub type P5_DAC_TEST_WITH_JTAG_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GLB_PARM_SPEC, bool, O>; +#[doc = "Field `p6_sdio_use_io_0_5` reader - "] +pub type P6_SDIO_USE_IO_0_5_R = crate::BitReader; +#[doc = "Field `p6_sdio_use_io_0_5` writer - "] +pub type P6_SDIO_USE_IO_0_5_W<'a, const O: u8> = crate::BitWriter<'a, u32, GLB_PARM_SPEC, bool, O>; +#[doc = "Field `p7_jtag_use_io_2_5` reader - "] +pub type P7_JTAG_USE_IO_2_5_R = crate::BitReader; +#[doc = "Field `p7_jtag_use_io_2_5` writer - "] +pub type P7_JTAG_USE_IO_2_5_W<'a, const O: u8> = crate::BitWriter<'a, u32, GLB_PARM_SPEC, bool, O>; +#[doc = "Field `uart_swap_set` reader - "] +pub type UART_SWAP_SET_R = crate::FieldReader; +#[doc = "Field `uart_swap_set` writer - "] +pub type UART_SWAP_SET_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GLB_PARM_SPEC, u8, u8, 3, O>; impl R { - #[doc = "Bits 24:26"] + #[doc = "Bit 0"] #[inline(always)] - pub fn uart_swap_set(&self) -> UART_SWAP_SET_R { - UART_SWAP_SET_R::new(((self.bits >> 24) & 0x07) as u8) + pub fn reg_bd_en(&self) -> REG_BD_EN_R { + REG_BD_EN_R::new((self.bits & 1) != 0) } - #[doc = "Bit 23"] + #[doc = "Bit 1"] #[inline(always)] - pub fn p7_jtag_use_io_2_5(&self) -> P7_JTAG_USE_IO_2_5_R { - P7_JTAG_USE_IO_2_5_R::new(((self.bits >> 23) & 0x01) != 0) + pub fn reg_ext_rst_smt(&self) -> REG_EXT_RST_SMT_R { + REG_EXT_RST_SMT_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 22"] + #[doc = "Bits 2:7"] #[inline(always)] - pub fn p6_sdio_use_io_0_5(&self) -> P6_SDIO_USE_IO_0_5_R { - P6_SDIO_USE_IO_0_5_R::new(((self.bits >> 22) & 0x01) != 0) + pub fn jtag_swap_set(&self) -> JTAG_SWAP_SET_R { + JTAG_SWAP_SET_R::new(((self.bits >> 2) & 0x3f) as u8) } - #[doc = "Bit 21"] + #[doc = "Bit 8"] #[inline(always)] - pub fn p5_dac_test_with_jtag(&self) -> P5_DAC_TEST_WITH_JTAG_R { - P5_DAC_TEST_WITH_JTAG_R::new(((self.bits >> 21) & 0x01) != 0) + pub fn swap_sflash_io_3_io_0(&self) -> SWAP_SFLASH_IO_3_IO_0_R { + SWAP_SFLASH_IO_3_IO_0_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bit 20"] + #[doc = "Bit 9"] #[inline(always)] - pub fn p4_adc_test_with_jtag(&self) -> P4_ADC_TEST_WITH_JTAG_R { - P4_ADC_TEST_WITH_JTAG_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn sel_embedded_sflash(&self) -> SEL_EMBEDDED_SFLASH_R { + SEL_EMBEDDED_SFLASH_R::new(((self.bits >> 9) & 1) != 0) } - #[doc = "Bit 19"] + #[doc = "Bit 12"] #[inline(always)] - pub fn p3_cci_use_io_2_5(&self) -> P3_CCI_USE_IO_2_5_R { - P3_CCI_USE_IO_2_5_R::new(((self.bits >> 19) & 0x01) != 0) + pub fn reg_spi_0_master_mode(&self) -> REG_SPI_0_MASTER_MODE_R { + REG_SPI_0_MASTER_MODE_R::new(((self.bits >> 12) & 1) != 0) } - #[doc = "Bit 18"] + #[doc = "Bit 13"] #[inline(always)] - pub fn p2_dac_test_with_cci(&self) -> P2_DAC_TEST_WITH_CCI_R { - P2_DAC_TEST_WITH_CCI_R::new(((self.bits >> 18) & 0x01) != 0) + pub fn reg_spi_0_swap(&self) -> REG_SPI_0_SWAP_R { + REG_SPI_0_SWAP_R::new(((self.bits >> 13) & 1) != 0) } - #[doc = "Bit 17"] + #[doc = "Bit 15"] #[inline(always)] - pub fn p1_adc_test_with_cci(&self) -> P1_ADC_TEST_WITH_CCI_R { - P1_ADC_TEST_WITH_CCI_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn reg_cci_use_jtag_pin(&self) -> REG_CCI_USE_JTAG_PIN_R { + REG_CCI_USE_JTAG_PIN_R::new(((self.bits >> 15) & 1) != 0) } #[doc = "Bit 16"] #[inline(always)] pub fn reg_cci_use_sdio_pin(&self) -> REG_CCI_USE_SDIO_PIN_R { - REG_CCI_USE_SDIO_PIN_R::new(((self.bits >> 16) & 0x01) != 0) + REG_CCI_USE_SDIO_PIN_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 15"] + #[doc = "Bit 17"] #[inline(always)] - pub fn reg_cci_use_jtag_pin(&self) -> REG_CCI_USE_JTAG_PIN_R { - REG_CCI_USE_JTAG_PIN_R::new(((self.bits >> 15) & 0x01) != 0) + pub fn p1_adc_test_with_cci(&self) -> P1_ADC_TEST_WITH_CCI_R { + P1_ADC_TEST_WITH_CCI_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bit 13"] + #[doc = "Bit 18"] #[inline(always)] - pub fn reg_spi_0_swap(&self) -> REG_SPI_0_SWAP_R { - REG_SPI_0_SWAP_R::new(((self.bits >> 13) & 0x01) != 0) + pub fn p2_dac_test_with_cci(&self) -> P2_DAC_TEST_WITH_CCI_R { + P2_DAC_TEST_WITH_CCI_R::new(((self.bits >> 18) & 1) != 0) } - #[doc = "Bit 12"] + #[doc = "Bit 19"] #[inline(always)] - pub fn reg_spi_0_master_mode(&self) -> REG_SPI_0_MASTER_MODE_R { - REG_SPI_0_MASTER_MODE_R::new(((self.bits >> 12) & 0x01) != 0) + pub fn p3_cci_use_io_2_5(&self) -> P3_CCI_USE_IO_2_5_R { + P3_CCI_USE_IO_2_5_R::new(((self.bits >> 19) & 1) != 0) } - #[doc = "Bit 9"] + #[doc = "Bit 20"] #[inline(always)] - pub fn sel_embedded_sflash(&self) -> SEL_EMBEDDED_SFLASH_R { - SEL_EMBEDDED_SFLASH_R::new(((self.bits >> 9) & 0x01) != 0) + pub fn p4_adc_test_with_jtag(&self) -> P4_ADC_TEST_WITH_JTAG_R { + P4_ADC_TEST_WITH_JTAG_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bit 8"] + #[doc = "Bit 21"] #[inline(always)] - pub fn swap_sflash_io_3_io_0(&self) -> SWAP_SFLASH_IO_3_IO_0_R { - SWAP_SFLASH_IO_3_IO_0_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn p5_dac_test_with_jtag(&self) -> P5_DAC_TEST_WITH_JTAG_R { + P5_DAC_TEST_WITH_JTAG_R::new(((self.bits >> 21) & 1) != 0) } - #[doc = "Bits 2:7"] + #[doc = "Bit 22"] #[inline(always)] - pub fn jtag_swap_set(&self) -> JTAG_SWAP_SET_R { - JTAG_SWAP_SET_R::new(((self.bits >> 2) & 0x3f) as u8) + pub fn p6_sdio_use_io_0_5(&self) -> P6_SDIO_USE_IO_0_5_R { + P6_SDIO_USE_IO_0_5_R::new(((self.bits >> 22) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 23"] #[inline(always)] - pub fn reg_ext_rst_smt(&self) -> REG_EXT_RST_SMT_R { - REG_EXT_RST_SMT_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn p7_jtag_use_io_2_5(&self) -> P7_JTAG_USE_IO_2_5_R { + P7_JTAG_USE_IO_2_5_R::new(((self.bits >> 23) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bits 24:26"] #[inline(always)] - pub fn reg_bd_en(&self) -> REG_BD_EN_R { - REG_BD_EN_R::new((self.bits & 0x01) != 0) + pub fn uart_swap_set(&self) -> UART_SWAP_SET_R { + UART_SWAP_SET_R::new(((self.bits >> 24) & 7) as u8) } } impl W { - #[doc = "Bits 24:26"] + #[doc = "Bit 0"] #[inline(always)] - pub fn uart_swap_set(&mut self) -> UART_SWAP_SET_W { - UART_SWAP_SET_W { w: self } + #[must_use] + pub fn reg_bd_en(&mut self) -> REG_BD_EN_W<0> { + REG_BD_EN_W::new(self) } - #[doc = "Bit 23"] + #[doc = "Bit 1"] #[inline(always)] - pub fn p7_jtag_use_io_2_5(&mut self) -> P7_JTAG_USE_IO_2_5_W { - P7_JTAG_USE_IO_2_5_W { w: self } + #[must_use] + pub fn reg_ext_rst_smt(&mut self) -> REG_EXT_RST_SMT_W<1> { + REG_EXT_RST_SMT_W::new(self) } - #[doc = "Bit 22"] + #[doc = "Bits 2:7"] #[inline(always)] - pub fn p6_sdio_use_io_0_5(&mut self) -> P6_SDIO_USE_IO_0_5_W { - P6_SDIO_USE_IO_0_5_W { w: self } + #[must_use] + pub fn jtag_swap_set(&mut self) -> JTAG_SWAP_SET_W<2> { + JTAG_SWAP_SET_W::new(self) } - #[doc = "Bit 21"] + #[doc = "Bit 8"] #[inline(always)] - pub fn p5_dac_test_with_jtag(&mut self) -> P5_DAC_TEST_WITH_JTAG_W { - P5_DAC_TEST_WITH_JTAG_W { w: self } + #[must_use] + pub fn swap_sflash_io_3_io_0(&mut self) -> SWAP_SFLASH_IO_3_IO_0_W<8> { + SWAP_SFLASH_IO_3_IO_0_W::new(self) } - #[doc = "Bit 20"] + #[doc = "Bit 9"] #[inline(always)] - pub fn p4_adc_test_with_jtag(&mut self) -> P4_ADC_TEST_WITH_JTAG_W { - P4_ADC_TEST_WITH_JTAG_W { w: self } + #[must_use] + pub fn sel_embedded_sflash(&mut self) -> SEL_EMBEDDED_SFLASH_W<9> { + SEL_EMBEDDED_SFLASH_W::new(self) } - #[doc = "Bit 19"] + #[doc = "Bit 12"] #[inline(always)] - pub fn p3_cci_use_io_2_5(&mut self) -> P3_CCI_USE_IO_2_5_W { - P3_CCI_USE_IO_2_5_W { w: self } + #[must_use] + pub fn reg_spi_0_master_mode(&mut self) -> REG_SPI_0_MASTER_MODE_W<12> { + REG_SPI_0_MASTER_MODE_W::new(self) } - #[doc = "Bit 18"] + #[doc = "Bit 13"] #[inline(always)] - pub fn p2_dac_test_with_cci(&mut self) -> P2_DAC_TEST_WITH_CCI_W { - P2_DAC_TEST_WITH_CCI_W { w: self } + #[must_use] + pub fn reg_spi_0_swap(&mut self) -> REG_SPI_0_SWAP_W<13> { + REG_SPI_0_SWAP_W::new(self) } - #[doc = "Bit 17"] + #[doc = "Bit 15"] #[inline(always)] - pub fn p1_adc_test_with_cci(&mut self) -> P1_ADC_TEST_WITH_CCI_W { - P1_ADC_TEST_WITH_CCI_W { w: self } + #[must_use] + pub fn reg_cci_use_jtag_pin(&mut self) -> REG_CCI_USE_JTAG_PIN_W<15> { + REG_CCI_USE_JTAG_PIN_W::new(self) } #[doc = "Bit 16"] #[inline(always)] - pub fn reg_cci_use_sdio_pin(&mut self) -> REG_CCI_USE_SDIO_PIN_W { - REG_CCI_USE_SDIO_PIN_W { w: self } + #[must_use] + pub fn reg_cci_use_sdio_pin(&mut self) -> REG_CCI_USE_SDIO_PIN_W<16> { + REG_CCI_USE_SDIO_PIN_W::new(self) } - #[doc = "Bit 15"] + #[doc = "Bit 17"] #[inline(always)] - pub fn reg_cci_use_jtag_pin(&mut self) -> REG_CCI_USE_JTAG_PIN_W { - REG_CCI_USE_JTAG_PIN_W { w: self } + #[must_use] + pub fn p1_adc_test_with_cci(&mut self) -> P1_ADC_TEST_WITH_CCI_W<17> { + P1_ADC_TEST_WITH_CCI_W::new(self) } - #[doc = "Bit 13"] + #[doc = "Bit 18"] #[inline(always)] - pub fn reg_spi_0_swap(&mut self) -> REG_SPI_0_SWAP_W { - REG_SPI_0_SWAP_W { w: self } + #[must_use] + pub fn p2_dac_test_with_cci(&mut self) -> P2_DAC_TEST_WITH_CCI_W<18> { + P2_DAC_TEST_WITH_CCI_W::new(self) } - #[doc = "Bit 12"] + #[doc = "Bit 19"] #[inline(always)] - pub fn reg_spi_0_master_mode(&mut self) -> REG_SPI_0_MASTER_MODE_W { - REG_SPI_0_MASTER_MODE_W { w: self } + #[must_use] + pub fn p3_cci_use_io_2_5(&mut self) -> P3_CCI_USE_IO_2_5_W<19> { + P3_CCI_USE_IO_2_5_W::new(self) } - #[doc = "Bit 9"] + #[doc = "Bit 20"] #[inline(always)] - pub fn sel_embedded_sflash(&mut self) -> SEL_EMBEDDED_SFLASH_W { - SEL_EMBEDDED_SFLASH_W { w: self } + #[must_use] + pub fn p4_adc_test_with_jtag(&mut self) -> P4_ADC_TEST_WITH_JTAG_W<20> { + P4_ADC_TEST_WITH_JTAG_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bit 21"] #[inline(always)] - pub fn swap_sflash_io_3_io_0(&mut self) -> SWAP_SFLASH_IO_3_IO_0_W { - SWAP_SFLASH_IO_3_IO_0_W { w: self } + #[must_use] + pub fn p5_dac_test_with_jtag(&mut self) -> P5_DAC_TEST_WITH_JTAG_W<21> { + P5_DAC_TEST_WITH_JTAG_W::new(self) } - #[doc = "Bits 2:7"] + #[doc = "Bit 22"] #[inline(always)] - pub fn jtag_swap_set(&mut self) -> JTAG_SWAP_SET_W { - JTAG_SWAP_SET_W { w: self } + #[must_use] + pub fn p6_sdio_use_io_0_5(&mut self) -> P6_SDIO_USE_IO_0_5_W<22> { + P6_SDIO_USE_IO_0_5_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 23"] #[inline(always)] - pub fn reg_ext_rst_smt(&mut self) -> REG_EXT_RST_SMT_W { - REG_EXT_RST_SMT_W { w: self } + #[must_use] + pub fn p7_jtag_use_io_2_5(&mut self) -> P7_JTAG_USE_IO_2_5_W<23> { + P7_JTAG_USE_IO_2_5_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bits 24:26"] #[inline(always)] - pub fn reg_bd_en(&mut self) -> REG_BD_EN_W { - REG_BD_EN_W { w: self } + #[must_use] + pub fn uart_swap_set(&mut self) -> UART_SWAP_SET_W<24> { + UART_SWAP_SET_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -815,11 +321,10 @@ impl crate::Readable for GLB_PARM_SPEC { #[doc = "`write(|w| ..)` method takes [glb_parm::W](W) writer structure"] impl crate::Writable for GLB_PARM_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets glb_parm to value 0x0001_8300"] impl crate::Resettable for GLB_PARM_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0001_8300 - } + const RESET_VALUE: Self::Ux = 0x0001_8300; } diff --git a/src/glb/gpadc_32m_src_ctrl.rs b/src/glb/gpadc_32m_src_ctrl.rs index 21db8ca..23e788c 100644 --- a/src/glb/gpadc_32m_src_ctrl.rs +++ b/src/glb/gpadc_32m_src_ctrl.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,143 +28,65 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `gpadc_32m_div_en` reader - "] -pub struct GPADC_32M_DIV_EN_R(crate::FieldReader); -impl GPADC_32M_DIV_EN_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_32M_DIV_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_32M_DIV_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_32m_div_en` writer - "] -pub struct GPADC_32M_DIV_EN_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_32M_DIV_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `gpadc_32m_clk_sel` reader - "] -pub struct GPADC_32M_CLK_SEL_R(crate::FieldReader); -impl GPADC_32M_CLK_SEL_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_32M_CLK_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_32M_CLK_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_32m_clk_sel` writer - "] -pub struct GPADC_32M_CLK_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_32M_CLK_SEL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7); - self.w - } -} #[doc = "Field `gpadc_32m_clk_div` reader - "] -pub struct GPADC_32M_CLK_DIV_R(crate::FieldReader); -impl GPADC_32M_CLK_DIV_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_32M_CLK_DIV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_32M_CLK_DIV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type GPADC_32M_CLK_DIV_R = crate::FieldReader; #[doc = "Field `gpadc_32m_clk_div` writer - "] -pub struct GPADC_32M_CLK_DIV_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_32M_CLK_DIV_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x3f) | (value as u32 & 0x3f); - self.w - } -} +pub type GPADC_32M_CLK_DIV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_32M_SRC_CTRL_SPEC, u8, u8, 6, O>; +#[doc = "Field `gpadc_32m_clk_sel` reader - "] +pub type GPADC_32M_CLK_SEL_R = crate::BitReader; +#[doc = "Field `gpadc_32m_clk_sel` writer - "] +pub type GPADC_32M_CLK_SEL_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPADC_32M_SRC_CTRL_SPEC, bool, O>; +#[doc = "Field `gpadc_32m_div_en` reader - "] +pub type GPADC_32M_DIV_EN_R = crate::BitReader; +#[doc = "Field `gpadc_32m_div_en` writer - "] +pub type GPADC_32M_DIV_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPADC_32M_SRC_CTRL_SPEC, bool, O>; impl R { - #[doc = "Bit 8"] + #[doc = "Bits 0:5"] #[inline(always)] - pub fn gpadc_32m_div_en(&self) -> GPADC_32M_DIV_EN_R { - GPADC_32M_DIV_EN_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn gpadc_32m_clk_div(&self) -> GPADC_32M_CLK_DIV_R { + GPADC_32M_CLK_DIV_R::new((self.bits & 0x3f) as u8) } #[doc = "Bit 7"] #[inline(always)] pub fn gpadc_32m_clk_sel(&self) -> GPADC_32M_CLK_SEL_R { - GPADC_32M_CLK_SEL_R::new(((self.bits >> 7) & 0x01) != 0) + GPADC_32M_CLK_SEL_R::new(((self.bits >> 7) & 1) != 0) } - #[doc = "Bits 0:5"] + #[doc = "Bit 8"] #[inline(always)] - pub fn gpadc_32m_clk_div(&self) -> GPADC_32M_CLK_DIV_R { - GPADC_32M_CLK_DIV_R::new((self.bits & 0x3f) as u8) + pub fn gpadc_32m_div_en(&self) -> GPADC_32M_DIV_EN_R { + GPADC_32M_DIV_EN_R::new(((self.bits >> 8) & 1) != 0) } } impl W { - #[doc = "Bit 8"] + #[doc = "Bits 0:5"] #[inline(always)] - pub fn gpadc_32m_div_en(&mut self) -> GPADC_32M_DIV_EN_W { - GPADC_32M_DIV_EN_W { w: self } + #[must_use] + pub fn gpadc_32m_clk_div(&mut self) -> GPADC_32M_CLK_DIV_W<0> { + GPADC_32M_CLK_DIV_W::new(self) } #[doc = "Bit 7"] #[inline(always)] - pub fn gpadc_32m_clk_sel(&mut self) -> GPADC_32M_CLK_SEL_W { - GPADC_32M_CLK_SEL_W { w: self } + #[must_use] + pub fn gpadc_32m_clk_sel(&mut self) -> GPADC_32M_CLK_SEL_W<7> { + GPADC_32M_CLK_SEL_W::new(self) } - #[doc = "Bits 0:5"] + #[doc = "Bit 8"] #[inline(always)] - pub fn gpadc_32m_clk_div(&mut self) -> GPADC_32M_CLK_DIV_W { - GPADC_32M_CLK_DIV_W { w: self } + #[must_use] + pub fn gpadc_32m_div_en(&mut self) -> GPADC_32M_DIV_EN_W<8> { + GPADC_32M_DIV_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -181,11 +104,10 @@ impl crate::Readable for GPADC_32M_SRC_CTRL_SPEC { #[doc = "`write(|w| ..)` method takes [gpadc_32m_src_ctrl::W](W) writer structure"] impl crate::Writable for GPADC_32M_SRC_CTRL_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets GPADC_32M_SRC_CTRL to value 0x0102"] impl crate::Resettable for GPADC_32M_SRC_CTRL_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0102 - } + const RESET_VALUE: Self::Ux = 0x0102; } diff --git a/src/glb/gpdac_actrl.rs b/src/glb/gpdac_actrl.rs index 9b26551..d3f7536 100644 --- a/src/glb/gpdac_actrl.rs +++ b/src/glb/gpdac_actrl.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,179 +28,79 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `gpdac_a_outmux` reader - "] -pub struct GPDAC_A_OUTMUX_R(crate::FieldReader); -impl GPDAC_A_OUTMUX_R { - pub(crate) fn new(bits: u8) -> Self { - GPDAC_A_OUTMUX_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPDAC_A_OUTMUX_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpdac_a_outmux` writer - "] -pub struct GPDAC_A_OUTMUX_W<'a> { - w: &'a mut W, -} -impl<'a> GPDAC_A_OUTMUX_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 20)) | ((value as u32 & 0x07) << 20); - self.w - } -} -#[doc = "Field `gpdac_a_rng` reader - "] -pub struct GPDAC_A_RNG_R(crate::FieldReader); -impl GPDAC_A_RNG_R { - pub(crate) fn new(bits: u8) -> Self { - GPDAC_A_RNG_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPDAC_A_RNG_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpdac_a_rng` writer - "] -pub struct GPDAC_A_RNG_W<'a> { - w: &'a mut W, -} -impl<'a> GPDAC_A_RNG_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 18)) | ((value as u32 & 0x03) << 18); - self.w - } -} -#[doc = "Field `gpdac_ioa_en` reader - "] -pub struct GPDAC_IOA_EN_R(crate::FieldReader); -impl GPDAC_IOA_EN_R { - pub(crate) fn new(bits: bool) -> Self { - GPDAC_IOA_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPDAC_IOA_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpdac_ioa_en` writer - "] -pub struct GPDAC_IOA_EN_W<'a> { - w: &'a mut W, -} -impl<'a> GPDAC_IOA_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `gpdac_a_en` reader - "] -pub struct GPDAC_A_EN_R(crate::FieldReader); -impl GPDAC_A_EN_R { - pub(crate) fn new(bits: bool) -> Self { - GPDAC_A_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPDAC_A_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type GPDAC_A_EN_R = crate::BitReader; #[doc = "Field `gpdac_a_en` writer - "] -pub struct GPDAC_A_EN_W<'a> { - w: &'a mut W, -} -impl<'a> GPDAC_A_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type GPDAC_A_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, GPDAC_ACTRL_SPEC, bool, O>; +#[doc = "Field `gpdac_ioa_en` reader - "] +pub type GPDAC_IOA_EN_R = crate::BitReader; +#[doc = "Field `gpdac_ioa_en` writer - "] +pub type GPDAC_IOA_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, GPDAC_ACTRL_SPEC, bool, O>; +#[doc = "Field `gpdac_a_rng` reader - "] +pub type GPDAC_A_RNG_R = crate::FieldReader; +#[doc = "Field `gpdac_a_rng` writer - "] +pub type GPDAC_A_RNG_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPDAC_ACTRL_SPEC, u8, u8, 2, O>; +#[doc = "Field `gpdac_a_outmux` reader - "] +pub type GPDAC_A_OUTMUX_R = crate::FieldReader; +#[doc = "Field `gpdac_a_outmux` writer - "] +pub type GPDAC_A_OUTMUX_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPDAC_ACTRL_SPEC, u8, u8, 3, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn gpdac_a_en(&self) -> GPDAC_A_EN_R { + GPDAC_A_EN_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bits 20:22"] + #[doc = "Bit 1"] #[inline(always)] - pub fn gpdac_a_outmux(&self) -> GPDAC_A_OUTMUX_R { - GPDAC_A_OUTMUX_R::new(((self.bits >> 20) & 0x07) as u8) + pub fn gpdac_ioa_en(&self) -> GPDAC_IOA_EN_R { + GPDAC_IOA_EN_R::new(((self.bits >> 1) & 1) != 0) } #[doc = "Bits 18:19"] #[inline(always)] pub fn gpdac_a_rng(&self) -> GPDAC_A_RNG_R { - GPDAC_A_RNG_R::new(((self.bits >> 18) & 0x03) as u8) + GPDAC_A_RNG_R::new(((self.bits >> 18) & 3) as u8) } - #[doc = "Bit 1"] - #[inline(always)] - pub fn gpdac_ioa_en(&self) -> GPDAC_IOA_EN_R { - GPDAC_IOA_EN_R::new(((self.bits >> 1) & 0x01) != 0) - } - #[doc = "Bit 0"] + #[doc = "Bits 20:22"] #[inline(always)] - pub fn gpdac_a_en(&self) -> GPDAC_A_EN_R { - GPDAC_A_EN_R::new((self.bits & 0x01) != 0) + pub fn gpdac_a_outmux(&self) -> GPDAC_A_OUTMUX_R { + GPDAC_A_OUTMUX_R::new(((self.bits >> 20) & 7) as u8) } } impl W { - #[doc = "Bits 20:22"] + #[doc = "Bit 0"] #[inline(always)] - pub fn gpdac_a_outmux(&mut self) -> GPDAC_A_OUTMUX_W { - GPDAC_A_OUTMUX_W { w: self } + #[must_use] + pub fn gpdac_a_en(&mut self) -> GPDAC_A_EN_W<0> { + GPDAC_A_EN_W::new(self) } - #[doc = "Bits 18:19"] + #[doc = "Bit 1"] #[inline(always)] - pub fn gpdac_a_rng(&mut self) -> GPDAC_A_RNG_W { - GPDAC_A_RNG_W { w: self } + #[must_use] + pub fn gpdac_ioa_en(&mut self) -> GPDAC_IOA_EN_W<1> { + GPDAC_IOA_EN_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bits 18:19"] #[inline(always)] - pub fn gpdac_ioa_en(&mut self) -> GPDAC_IOA_EN_W { - GPDAC_IOA_EN_W { w: self } + #[must_use] + pub fn gpdac_a_rng(&mut self) -> GPDAC_A_RNG_W<18> { + GPDAC_A_RNG_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bits 20:22"] #[inline(always)] - pub fn gpdac_a_en(&mut self) -> GPDAC_A_EN_W { - GPDAC_A_EN_W { w: self } + #[must_use] + pub fn gpdac_a_outmux(&mut self) -> GPDAC_A_OUTMUX_W<20> { + GPDAC_A_OUTMUX_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -217,11 +118,10 @@ impl crate::Readable for GPDAC_ACTRL_SPEC { #[doc = "`write(|w| ..)` method takes [gpdac_actrl::W](W) writer structure"] impl crate::Writable for GPDAC_ACTRL_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets gpdac_actrl to value 0x000c_0000"] impl crate::Resettable for GPDAC_ACTRL_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x000c_0000 - } + const RESET_VALUE: Self::Ux = 0x000c_0000; } diff --git a/src/glb/gpdac_bctrl.rs b/src/glb/gpdac_bctrl.rs index 3f2dbc4..b10ca6d 100644 --- a/src/glb/gpdac_bctrl.rs +++ b/src/glb/gpdac_bctrl.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,179 +28,79 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `gpdac_b_outmux` reader - "] -pub struct GPDAC_B_OUTMUX_R(crate::FieldReader); -impl GPDAC_B_OUTMUX_R { - pub(crate) fn new(bits: u8) -> Self { - GPDAC_B_OUTMUX_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPDAC_B_OUTMUX_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpdac_b_outmux` writer - "] -pub struct GPDAC_B_OUTMUX_W<'a> { - w: &'a mut W, -} -impl<'a> GPDAC_B_OUTMUX_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 20)) | ((value as u32 & 0x07) << 20); - self.w - } -} -#[doc = "Field `gpdac_b_rng` reader - "] -pub struct GPDAC_B_RNG_R(crate::FieldReader); -impl GPDAC_B_RNG_R { - pub(crate) fn new(bits: u8) -> Self { - GPDAC_B_RNG_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPDAC_B_RNG_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpdac_b_rng` writer - "] -pub struct GPDAC_B_RNG_W<'a> { - w: &'a mut W, -} -impl<'a> GPDAC_B_RNG_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 18)) | ((value as u32 & 0x03) << 18); - self.w - } -} -#[doc = "Field `gpdac_iob_en` reader - "] -pub struct GPDAC_IOB_EN_R(crate::FieldReader); -impl GPDAC_IOB_EN_R { - pub(crate) fn new(bits: bool) -> Self { - GPDAC_IOB_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPDAC_IOB_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpdac_iob_en` writer - "] -pub struct GPDAC_IOB_EN_W<'a> { - w: &'a mut W, -} -impl<'a> GPDAC_IOB_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `gpdac_b_en` reader - "] -pub struct GPDAC_B_EN_R(crate::FieldReader); -impl GPDAC_B_EN_R { - pub(crate) fn new(bits: bool) -> Self { - GPDAC_B_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPDAC_B_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type GPDAC_B_EN_R = crate::BitReader; #[doc = "Field `gpdac_b_en` writer - "] -pub struct GPDAC_B_EN_W<'a> { - w: &'a mut W, -} -impl<'a> GPDAC_B_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type GPDAC_B_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, GPDAC_BCTRL_SPEC, bool, O>; +#[doc = "Field `gpdac_iob_en` reader - "] +pub type GPDAC_IOB_EN_R = crate::BitReader; +#[doc = "Field `gpdac_iob_en` writer - "] +pub type GPDAC_IOB_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, GPDAC_BCTRL_SPEC, bool, O>; +#[doc = "Field `gpdac_b_rng` reader - "] +pub type GPDAC_B_RNG_R = crate::FieldReader; +#[doc = "Field `gpdac_b_rng` writer - "] +pub type GPDAC_B_RNG_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPDAC_BCTRL_SPEC, u8, u8, 2, O>; +#[doc = "Field `gpdac_b_outmux` reader - "] +pub type GPDAC_B_OUTMUX_R = crate::FieldReader; +#[doc = "Field `gpdac_b_outmux` writer - "] +pub type GPDAC_B_OUTMUX_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPDAC_BCTRL_SPEC, u8, u8, 3, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn gpdac_b_en(&self) -> GPDAC_B_EN_R { + GPDAC_B_EN_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bits 20:22"] + #[doc = "Bit 1"] #[inline(always)] - pub fn gpdac_b_outmux(&self) -> GPDAC_B_OUTMUX_R { - GPDAC_B_OUTMUX_R::new(((self.bits >> 20) & 0x07) as u8) + pub fn gpdac_iob_en(&self) -> GPDAC_IOB_EN_R { + GPDAC_IOB_EN_R::new(((self.bits >> 1) & 1) != 0) } #[doc = "Bits 18:19"] #[inline(always)] pub fn gpdac_b_rng(&self) -> GPDAC_B_RNG_R { - GPDAC_B_RNG_R::new(((self.bits >> 18) & 0x03) as u8) + GPDAC_B_RNG_R::new(((self.bits >> 18) & 3) as u8) } - #[doc = "Bit 1"] - #[inline(always)] - pub fn gpdac_iob_en(&self) -> GPDAC_IOB_EN_R { - GPDAC_IOB_EN_R::new(((self.bits >> 1) & 0x01) != 0) - } - #[doc = "Bit 0"] + #[doc = "Bits 20:22"] #[inline(always)] - pub fn gpdac_b_en(&self) -> GPDAC_B_EN_R { - GPDAC_B_EN_R::new((self.bits & 0x01) != 0) + pub fn gpdac_b_outmux(&self) -> GPDAC_B_OUTMUX_R { + GPDAC_B_OUTMUX_R::new(((self.bits >> 20) & 7) as u8) } } impl W { - #[doc = "Bits 20:22"] + #[doc = "Bit 0"] #[inline(always)] - pub fn gpdac_b_outmux(&mut self) -> GPDAC_B_OUTMUX_W { - GPDAC_B_OUTMUX_W { w: self } + #[must_use] + pub fn gpdac_b_en(&mut self) -> GPDAC_B_EN_W<0> { + GPDAC_B_EN_W::new(self) } - #[doc = "Bits 18:19"] + #[doc = "Bit 1"] #[inline(always)] - pub fn gpdac_b_rng(&mut self) -> GPDAC_B_RNG_W { - GPDAC_B_RNG_W { w: self } + #[must_use] + pub fn gpdac_iob_en(&mut self) -> GPDAC_IOB_EN_W<1> { + GPDAC_IOB_EN_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bits 18:19"] #[inline(always)] - pub fn gpdac_iob_en(&mut self) -> GPDAC_IOB_EN_W { - GPDAC_IOB_EN_W { w: self } + #[must_use] + pub fn gpdac_b_rng(&mut self) -> GPDAC_B_RNG_W<18> { + GPDAC_B_RNG_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bits 20:22"] #[inline(always)] - pub fn gpdac_b_en(&mut self) -> GPDAC_B_EN_W { - GPDAC_B_EN_W { w: self } + #[must_use] + pub fn gpdac_b_outmux(&mut self) -> GPDAC_B_OUTMUX_W<20> { + GPDAC_B_OUTMUX_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -217,11 +118,10 @@ impl crate::Readable for GPDAC_BCTRL_SPEC { #[doc = "`write(|w| ..)` method takes [gpdac_bctrl::W](W) writer structure"] impl crate::Writable for GPDAC_BCTRL_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets gpdac_bctrl to value 0x000c_0000"] impl crate::Resettable for GPDAC_BCTRL_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x000c_0000 - } + const RESET_VALUE: Self::Ux = 0x000c_0000; } diff --git a/src/glb/gpdac_ctrl.rs b/src/glb/gpdac_ctrl.rs index 6a169cd..392c631 100644 --- a/src/glb/gpdac_ctrl.rs +++ b/src/glb/gpdac_ctrl.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,271 +28,109 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `gpdac_reserved` reader - "] -pub struct GPDAC_RESERVED_R(crate::FieldReader); -impl GPDAC_RESERVED_R { - pub(crate) fn new(bits: u8) -> Self { - GPDAC_RESERVED_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPDAC_RESERVED_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpdac_reserved` writer - "] -pub struct GPDAC_RESERVED_W<'a> { - w: &'a mut W, -} -impl<'a> GPDAC_RESERVED_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 24)) | ((value as u32 & 0xff) << 24); - self.w - } -} -#[doc = "Field `gpdac_test_sel` reader - "] -pub struct GPDAC_TEST_SEL_R(crate::FieldReader); -impl GPDAC_TEST_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - GPDAC_TEST_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPDAC_TEST_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpdac_test_sel` writer - "] -pub struct GPDAC_TEST_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> GPDAC_TEST_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 9)) | ((value as u32 & 0x07) << 9); - self.w - } -} -#[doc = "Field `gpdac_ref_sel` reader - "] -pub struct GPDAC_REF_SEL_R(crate::FieldReader); -impl GPDAC_REF_SEL_R { - pub(crate) fn new(bits: bool) -> Self { - GPDAC_REF_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPDAC_REF_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpdac_ref_sel` writer - "] -pub struct GPDAC_REF_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> GPDAC_REF_SEL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `gpdac_test_en` reader - "] -pub struct GPDAC_TEST_EN_R(crate::FieldReader); -impl GPDAC_TEST_EN_R { - pub(crate) fn new(bits: bool) -> Self { - GPDAC_TEST_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPDAC_TEST_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpdac_test_en` writer - "] -pub struct GPDAC_TEST_EN_W<'a> { - w: &'a mut W, -} -impl<'a> GPDAC_TEST_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7); - self.w - } -} +#[doc = "Field `gpdaca_rstn_ana` reader - "] +pub type GPDACA_RSTN_ANA_R = crate::BitReader; +#[doc = "Field `gpdaca_rstn_ana` writer - "] +pub type GPDACA_RSTN_ANA_W<'a, const O: u8> = crate::BitWriter<'a, u32, GPDAC_CTRL_SPEC, bool, O>; #[doc = "Field `gpdacb_rstn_ana` reader - "] -pub struct GPDACB_RSTN_ANA_R(crate::FieldReader); -impl GPDACB_RSTN_ANA_R { - pub(crate) fn new(bits: bool) -> Self { - GPDACB_RSTN_ANA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPDACB_RSTN_ANA_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type GPDACB_RSTN_ANA_R = crate::BitReader; #[doc = "Field `gpdacb_rstn_ana` writer - "] -pub struct GPDACB_RSTN_ANA_W<'a> { - w: &'a mut W, -} -impl<'a> GPDACB_RSTN_ANA_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type GPDACB_RSTN_ANA_W<'a, const O: u8> = crate::BitWriter<'a, u32, GPDAC_CTRL_SPEC, bool, O>; +#[doc = "Field `gpdac_test_en` reader - "] +pub type GPDAC_TEST_EN_R = crate::BitReader; +#[doc = "Field `gpdac_test_en` writer - "] +pub type GPDAC_TEST_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, GPDAC_CTRL_SPEC, bool, O>; +#[doc = "Field `gpdac_ref_sel` reader - "] +pub type GPDAC_REF_SEL_R = crate::BitReader; +#[doc = "Field `gpdac_ref_sel` writer - "] +pub type GPDAC_REF_SEL_W<'a, const O: u8> = crate::BitWriter<'a, u32, GPDAC_CTRL_SPEC, bool, O>; +#[doc = "Field `gpdac_test_sel` reader - "] +pub type GPDAC_TEST_SEL_R = crate::FieldReader; +#[doc = "Field `gpdac_test_sel` writer - "] +pub type GPDAC_TEST_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPDAC_CTRL_SPEC, u8, u8, 3, O>; +#[doc = "Field `gpdac_reserved` reader - "] +pub type GPDAC_RESERVED_R = crate::FieldReader; +#[doc = "Field `gpdac_reserved` writer - "] +pub type GPDAC_RESERVED_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPDAC_CTRL_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} -#[doc = "Field `gpdaca_rstn_ana` reader - "] -pub struct GPDACA_RSTN_ANA_R(crate::FieldReader); -impl GPDACA_RSTN_ANA_R { - pub(crate) fn new(bits: bool) -> Self { - GPDACA_RSTN_ANA_R(crate::FieldReader::new(bits)) + pub fn gpdaca_rstn_ana(&self) -> GPDACA_RSTN_ANA_R { + GPDACA_RSTN_ANA_R::new((self.bits & 1) != 0) } -} -impl core::ops::Deref for GPDACA_RSTN_ANA_R { - type Target = crate::FieldReader; + #[doc = "Bit 1"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn gpdacb_rstn_ana(&self) -> GPDACB_RSTN_ANA_R { + GPDACB_RSTN_ANA_R::new(((self.bits >> 1) & 1) != 0) } -} -#[doc = "Field `gpdaca_rstn_ana` writer - "] -pub struct GPDACA_RSTN_ANA_W<'a> { - w: &'a mut W, -} -impl<'a> GPDACA_RSTN_ANA_W<'a> { - #[doc = r"Sets the field bit"] + #[doc = "Bit 7"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn gpdac_test_en(&self) -> GPDAC_TEST_EN_R { + GPDAC_TEST_EN_R::new(((self.bits >> 7) & 1) != 0) } - #[doc = r"Clears the field bit"] + #[doc = "Bit 8"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn gpdac_ref_sel(&self) -> GPDAC_REF_SEL_R { + GPDAC_REF_SEL_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = r"Writes raw bits to the field"] + #[doc = "Bits 9:11"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn gpdac_test_sel(&self) -> GPDAC_TEST_SEL_R { + GPDAC_TEST_SEL_R::new(((self.bits >> 9) & 7) as u8) } -} -impl R { #[doc = "Bits 24:31"] #[inline(always)] pub fn gpdac_reserved(&self) -> GPDAC_RESERVED_R { GPDAC_RESERVED_R::new(((self.bits >> 24) & 0xff) as u8) } - #[doc = "Bits 9:11"] - #[inline(always)] - pub fn gpdac_test_sel(&self) -> GPDAC_TEST_SEL_R { - GPDAC_TEST_SEL_R::new(((self.bits >> 9) & 0x07) as u8) - } - #[doc = "Bit 8"] - #[inline(always)] - pub fn gpdac_ref_sel(&self) -> GPDAC_REF_SEL_R { - GPDAC_REF_SEL_R::new(((self.bits >> 8) & 0x01) != 0) - } - #[doc = "Bit 7"] - #[inline(always)] - pub fn gpdac_test_en(&self) -> GPDAC_TEST_EN_R { - GPDAC_TEST_EN_R::new(((self.bits >> 7) & 0x01) != 0) - } - #[doc = "Bit 1"] - #[inline(always)] - pub fn gpdacb_rstn_ana(&self) -> GPDACB_RSTN_ANA_R { - GPDACB_RSTN_ANA_R::new(((self.bits >> 1) & 0x01) != 0) - } - #[doc = "Bit 0"] - #[inline(always)] - pub fn gpdaca_rstn_ana(&self) -> GPDACA_RSTN_ANA_R { - GPDACA_RSTN_ANA_R::new((self.bits & 0x01) != 0) - } } impl W { - #[doc = "Bits 24:31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn gpdac_reserved(&mut self) -> GPDAC_RESERVED_W { - GPDAC_RESERVED_W { w: self } + #[must_use] + pub fn gpdaca_rstn_ana(&mut self) -> GPDACA_RSTN_ANA_W<0> { + GPDACA_RSTN_ANA_W::new(self) } - #[doc = "Bits 9:11"] + #[doc = "Bit 1"] #[inline(always)] - pub fn gpdac_test_sel(&mut self) -> GPDAC_TEST_SEL_W { - GPDAC_TEST_SEL_W { w: self } + #[must_use] + pub fn gpdacb_rstn_ana(&mut self) -> GPDACB_RSTN_ANA_W<1> { + GPDACB_RSTN_ANA_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bit 7"] #[inline(always)] - pub fn gpdac_ref_sel(&mut self) -> GPDAC_REF_SEL_W { - GPDAC_REF_SEL_W { w: self } + #[must_use] + pub fn gpdac_test_en(&mut self) -> GPDAC_TEST_EN_W<7> { + GPDAC_TEST_EN_W::new(self) } - #[doc = "Bit 7"] + #[doc = "Bit 8"] #[inline(always)] - pub fn gpdac_test_en(&mut self) -> GPDAC_TEST_EN_W { - GPDAC_TEST_EN_W { w: self } + #[must_use] + pub fn gpdac_ref_sel(&mut self) -> GPDAC_REF_SEL_W<8> { + GPDAC_REF_SEL_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bits 9:11"] #[inline(always)] - pub fn gpdacb_rstn_ana(&mut self) -> GPDACB_RSTN_ANA_W { - GPDACB_RSTN_ANA_W { w: self } + #[must_use] + pub fn gpdac_test_sel(&mut self) -> GPDAC_TEST_SEL_W<9> { + GPDAC_TEST_SEL_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn gpdaca_rstn_ana(&mut self) -> GPDACA_RSTN_ANA_W { - GPDACA_RSTN_ANA_W { w: self } + #[must_use] + pub fn gpdac_reserved(&mut self) -> GPDAC_RESERVED_W<24> { + GPDAC_RESERVED_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -309,11 +148,10 @@ impl crate::Readable for GPDAC_CTRL_SPEC { #[doc = "`write(|w| ..)` method takes [gpdac_ctrl::W](W) writer structure"] impl crate::Writable for GPDAC_CTRL_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets gpdac_ctrl to value 0x03"] impl crate::Resettable for GPDAC_CTRL_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x03 - } + const RESET_VALUE: Self::Ux = 0x03; } diff --git a/src/glb/gpdac_data.rs b/src/glb/gpdac_data.rs index 1fd8885..1cf6f1e 100644 --- a/src/glb/gpdac_data.rs +++ b/src/glb/gpdac_data.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,87 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `gpdac_a_data` reader - "] -pub struct GPDAC_A_DATA_R(crate::FieldReader); -impl GPDAC_A_DATA_R { - pub(crate) fn new(bits: u16) -> Self { - GPDAC_A_DATA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPDAC_A_DATA_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpdac_a_data` writer - "] -pub struct GPDAC_A_DATA_W<'a> { - w: &'a mut W, -} -impl<'a> GPDAC_A_DATA_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03ff << 16)) | ((value as u32 & 0x03ff) << 16); - self.w - } -} #[doc = "Field `gpdac_b_data` reader - "] -pub struct GPDAC_B_DATA_R(crate::FieldReader); -impl GPDAC_B_DATA_R { - pub(crate) fn new(bits: u16) -> Self { - GPDAC_B_DATA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPDAC_B_DATA_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type GPDAC_B_DATA_R = crate::FieldReader; #[doc = "Field `gpdac_b_data` writer - "] -pub struct GPDAC_B_DATA_W<'a> { - w: &'a mut W, -} -impl<'a> GPDAC_B_DATA_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type GPDAC_B_DATA_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPDAC_DATA_SPEC, u16, u16, 10, O>; +#[doc = "Field `gpdac_a_data` reader - "] +pub type GPDAC_A_DATA_R = crate::FieldReader; +#[doc = "Field `gpdac_a_data` writer - "] +pub type GPDAC_A_DATA_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPDAC_DATA_SPEC, u16, u16, 10, O>; +impl R { + #[doc = "Bits 0:9"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03ff) | (value as u32 & 0x03ff); - self.w + pub fn gpdac_b_data(&self) -> GPDAC_B_DATA_R { + GPDAC_B_DATA_R::new((self.bits & 0x03ff) as u16) } -} -impl R { #[doc = "Bits 16:25"] #[inline(always)] pub fn gpdac_a_data(&self) -> GPDAC_A_DATA_R { GPDAC_A_DATA_R::new(((self.bits >> 16) & 0x03ff) as u16) } - #[doc = "Bits 0:9"] - #[inline(always)] - pub fn gpdac_b_data(&self) -> GPDAC_B_DATA_R { - GPDAC_B_DATA_R::new((self.bits & 0x03ff) as u16) - } } impl W { - #[doc = "Bits 16:25"] + #[doc = "Bits 0:9"] #[inline(always)] - pub fn gpdac_a_data(&mut self) -> GPDAC_A_DATA_W { - GPDAC_A_DATA_W { w: self } + #[must_use] + pub fn gpdac_b_data(&mut self) -> GPDAC_B_DATA_W<0> { + GPDAC_B_DATA_W::new(self) } - #[doc = "Bits 0:9"] + #[doc = "Bits 16:25"] #[inline(always)] - pub fn gpdac_b_data(&mut self) -> GPDAC_B_DATA_W { - GPDAC_B_DATA_W { w: self } + #[must_use] + pub fn gpdac_a_data(&mut self) -> GPDAC_A_DATA_W<16> { + GPDAC_A_DATA_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -125,11 +88,10 @@ impl crate::Readable for GPDAC_DATA_SPEC { #[doc = "`write(|w| ..)` method takes [gpdac_data::W](W) writer structure"] impl crate::Writable for GPDAC_DATA_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets gpdac_data to value 0"] impl crate::Resettable for GPDAC_DATA_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/gpio_cfgctl0.rs b/src/glb/gpio_cfgctl0.rs index b8e1756..1e47377 100644 --- a/src/glb/gpio_cfgctl0.rs +++ b/src/glb/gpio_cfgctl0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,745 +28,275 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -#[repr(u8)] -pub enum REAL_GPIO_1_FUNC_SEL_A { - #[doc = "0: Function select is reg_gpio_1_func_sel"] - GLB_GPIO_REAL_MODE_REG = 0, - #[doc = "1: `1`"] - GLB_GPIO_REAL_MODE_SDIO = 1, - #[doc = "12: `1100`"] - GLB_GPIO_REAL_MODE_RF = 12, - #[doc = "14: `1110`"] - GLB_GPIO_REAL_MODE_JTAG = 14, - #[doc = "15: `1111`"] - GLB_GPIO_REAL_MODE_CCI = 15, -} -impl From for u8 { - #[inline(always)] - fn from(variant: REAL_GPIO_1_FUNC_SEL_A) -> Self { - variant as _ - } -} -#[doc = "Field `real_gpio_1_func_sel` reader - "] -pub struct REAL_GPIO_1_FUNC_SEL_R(crate::FieldReader); -impl REAL_GPIO_1_FUNC_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - REAL_GPIO_1_FUNC_SEL_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(REAL_GPIO_1_FUNC_SEL_A::GLB_GPIO_REAL_MODE_REG), - 1 => Some(REAL_GPIO_1_FUNC_SEL_A::GLB_GPIO_REAL_MODE_SDIO), - 12 => Some(REAL_GPIO_1_FUNC_SEL_A::GLB_GPIO_REAL_MODE_RF), - 14 => Some(REAL_GPIO_1_FUNC_SEL_A::GLB_GPIO_REAL_MODE_JTAG), - 15 => Some(REAL_GPIO_1_FUNC_SEL_A::GLB_GPIO_REAL_MODE_CCI), - _ => None, - } - } - #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_REG`"] - #[inline(always)] - pub fn is_glb_gpio_real_mode_reg(&self) -> bool { - **self == REAL_GPIO_1_FUNC_SEL_A::GLB_GPIO_REAL_MODE_REG - } - #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_SDIO`"] - #[inline(always)] - pub fn is_glb_gpio_real_mode_sdio(&self) -> bool { - **self == REAL_GPIO_1_FUNC_SEL_A::GLB_GPIO_REAL_MODE_SDIO - } - #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_RF`"] - #[inline(always)] - pub fn is_glb_gpio_real_mode_rf(&self) -> bool { - **self == REAL_GPIO_1_FUNC_SEL_A::GLB_GPIO_REAL_MODE_RF - } - #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_JTAG`"] - #[inline(always)] - pub fn is_glb_gpio_real_mode_jtag(&self) -> bool { - **self == REAL_GPIO_1_FUNC_SEL_A::GLB_GPIO_REAL_MODE_JTAG - } - #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_CCI`"] - #[inline(always)] - pub fn is_glb_gpio_real_mode_cci(&self) -> bool { - **self == REAL_GPIO_1_FUNC_SEL_A::GLB_GPIO_REAL_MODE_CCI - } -} -impl core::ops::Deref for REAL_GPIO_1_FUNC_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Function select for GPIO1.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -#[repr(u8)] -pub enum REG_GPIO_1_FUNC_SEL_A { +#[doc = "Field `reg_gpio_0_ie` reader - GPIO0 input enable."] +pub type REG_GPIO_0_IE_R = crate::BitReader; +#[doc = "GPIO0 input enable.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO0INPUT_ENABLED_A { + #[doc = "0: `0`"] + DISABLED = 0, #[doc = "1: `1`"] - SDIO_CMD = 1, - #[doc = "2: `10`"] - SF_D2 = 2, - #[doc = "4: `100`"] - SPI_MOSI_SPI_MISO = 4, - #[doc = "6: `110`"] - I2C_SDA = 6, - #[doc = "7: `111`"] - UART_SIG1 = 7, - #[doc = "8: `1000`"] - PWM_CH1 = 8, - #[doc = "9: `1001`"] - FEM_GPIO_1 = 9, - #[doc = "10: `1010`"] - ATEST_IP = 10, - #[doc = "11: `1011`"] - SWGPIO_1 = 11, - #[doc = "14: `1110`"] - E21_TDI = 14, + ENABLED = 1, } -impl From for u8 { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_1_FUNC_SEL_A) -> Self { - variant as _ + fn from(variant: GPIO0INPUT_ENABLED_A) -> Self { + variant as u8 != 0 } } -#[doc = "Field `reg_gpio_1_func_sel` reader - Function select for GPIO1."] -pub struct REG_GPIO_1_FUNC_SEL_R(crate::FieldReader); -impl REG_GPIO_1_FUNC_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_1_FUNC_SEL_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_0_IE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> GPIO0INPUT_ENABLED_A { match self.bits { - 1 => Some(REG_GPIO_1_FUNC_SEL_A::SDIO_CMD), - 2 => Some(REG_GPIO_1_FUNC_SEL_A::SF_D2), - 4 => Some(REG_GPIO_1_FUNC_SEL_A::SPI_MOSI_SPI_MISO), - 6 => Some(REG_GPIO_1_FUNC_SEL_A::I2C_SDA), - 7 => Some(REG_GPIO_1_FUNC_SEL_A::UART_SIG1), - 8 => Some(REG_GPIO_1_FUNC_SEL_A::PWM_CH1), - 9 => Some(REG_GPIO_1_FUNC_SEL_A::FEM_GPIO_1), - 10 => Some(REG_GPIO_1_FUNC_SEL_A::ATEST_IP), - 11 => Some(REG_GPIO_1_FUNC_SEL_A::SWGPIO_1), - 14 => Some(REG_GPIO_1_FUNC_SEL_A::E21_TDI), - _ => None, + false => GPIO0INPUT_ENABLED_A::DISABLED, + true => GPIO0INPUT_ENABLED_A::ENABLED, } } - #[doc = "Checks if the value of the field is `SDIO_CMD`"] - #[inline(always)] - pub fn is_sdio_cmd(&self) -> bool { - **self == REG_GPIO_1_FUNC_SEL_A::SDIO_CMD - } - #[doc = "Checks if the value of the field is `SF_D2`"] - #[inline(always)] - pub fn is_sf_d2(&self) -> bool { - **self == REG_GPIO_1_FUNC_SEL_A::SF_D2 - } - #[doc = "Checks if the value of the field is `SPI_MOSI_SPI_MISO`"] - #[inline(always)] - pub fn is_spi_mosi_spi_miso(&self) -> bool { - **self == REG_GPIO_1_FUNC_SEL_A::SPI_MOSI_SPI_MISO - } - #[doc = "Checks if the value of the field is `I2C_SDA`"] - #[inline(always)] - pub fn is_i2c_sda(&self) -> bool { - **self == REG_GPIO_1_FUNC_SEL_A::I2C_SDA - } - #[doc = "Checks if the value of the field is `UART_SIG1`"] - #[inline(always)] - pub fn is_uart_sig1(&self) -> bool { - **self == REG_GPIO_1_FUNC_SEL_A::UART_SIG1 - } - #[doc = "Checks if the value of the field is `PWM_CH1`"] - #[inline(always)] - pub fn is_pwm_ch1(&self) -> bool { - **self == REG_GPIO_1_FUNC_SEL_A::PWM_CH1 - } - #[doc = "Checks if the value of the field is `FEM_GPIO_1`"] - #[inline(always)] - pub fn is_fem_gpio_1(&self) -> bool { - **self == REG_GPIO_1_FUNC_SEL_A::FEM_GPIO_1 - } - #[doc = "Checks if the value of the field is `ATEST_IP`"] - #[inline(always)] - pub fn is_atest_ip(&self) -> bool { - **self == REG_GPIO_1_FUNC_SEL_A::ATEST_IP - } - #[doc = "Checks if the value of the field is `SWGPIO_1`"] - #[inline(always)] - pub fn is_swgpio_1(&self) -> bool { - **self == REG_GPIO_1_FUNC_SEL_A::SWGPIO_1 - } - #[doc = "Checks if the value of the field is `E21_TDI`"] + #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] - pub fn is_e21_tdi(&self) -> bool { - **self == REG_GPIO_1_FUNC_SEL_A::E21_TDI + pub fn is_disabled(&self) -> bool { + *self == GPIO0INPUT_ENABLED_A::DISABLED } -} -impl core::ops::Deref for REG_GPIO_1_FUNC_SEL_R { - type Target = crate::FieldReader; + #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn is_enabled(&self) -> bool { + *self == GPIO0INPUT_ENABLED_A::ENABLED } } -#[doc = "Field `reg_gpio_1_func_sel` writer - Function select for GPIO1."] -pub struct REG_GPIO_1_FUNC_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_1_FUNC_SEL_W<'a> { - #[doc = r"Writes `variant` to the field"] +#[doc = "Field `reg_gpio_0_ie` writer - GPIO0 input enable."] +pub type REG_GPIO_0_IE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL0_SPEC, GPIO0INPUT_ENABLED_A, O>; +impl<'a, const O: u8> REG_GPIO_0_IE_W<'a, O> { + #[doc = "`0`"] #[inline(always)] - pub fn variant(self, variant: REG_GPIO_1_FUNC_SEL_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } + pub fn disabled(self) -> &'a mut W { + self.variant(GPIO0INPUT_ENABLED_A::DISABLED) } #[doc = "`1`"] #[inline(always)] - pub fn sdio_cmd(self) -> &'a mut W { - self.variant(REG_GPIO_1_FUNC_SEL_A::SDIO_CMD) - } - #[doc = "`10`"] - #[inline(always)] - pub fn sf_d2(self) -> &'a mut W { - self.variant(REG_GPIO_1_FUNC_SEL_A::SF_D2) - } - #[doc = "`100`"] - #[inline(always)] - pub fn spi_mosi_spi_miso(self) -> &'a mut W { - self.variant(REG_GPIO_1_FUNC_SEL_A::SPI_MOSI_SPI_MISO) - } - #[doc = "`110`"] - #[inline(always)] - pub fn i2c_sda(self) -> &'a mut W { - self.variant(REG_GPIO_1_FUNC_SEL_A::I2C_SDA) - } - #[doc = "`111`"] - #[inline(always)] - pub fn uart_sig1(self) -> &'a mut W { - self.variant(REG_GPIO_1_FUNC_SEL_A::UART_SIG1) - } - #[doc = "`1000`"] - #[inline(always)] - pub fn pwm_ch1(self) -> &'a mut W { - self.variant(REG_GPIO_1_FUNC_SEL_A::PWM_CH1) - } - #[doc = "`1001`"] - #[inline(always)] - pub fn fem_gpio_1(self) -> &'a mut W { - self.variant(REG_GPIO_1_FUNC_SEL_A::FEM_GPIO_1) - } - #[doc = "`1010`"] - #[inline(always)] - pub fn atest_ip(self) -> &'a mut W { - self.variant(REG_GPIO_1_FUNC_SEL_A::ATEST_IP) - } - #[doc = "`1011`"] - #[inline(always)] - pub fn swgpio_1(self) -> &'a mut W { - self.variant(REG_GPIO_1_FUNC_SEL_A::SWGPIO_1) - } - #[doc = "`1110`"] - #[inline(always)] - pub fn e21_tdi(self) -> &'a mut W { - self.variant(REG_GPIO_1_FUNC_SEL_A::E21_TDI) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 24)) | ((value as u32 & 0x0f) << 24); - self.w + pub fn enabled(self) -> &'a mut W { + self.variant(GPIO0INPUT_ENABLED_A::ENABLED) } } -#[doc = "Pull Down Resistor for GPIO1.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_1_PD_A { +#[doc = "Field `reg_gpio_0_smt` reader - Schmitt trigger enabled for GPIO0."] +pub type REG_GPIO_0_SMT_R = crate::BitReader; +#[doc = "Schmitt trigger enabled for GPIO0.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO0SCHMITT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_1_PD_A) -> Self { + fn from(variant: GPIO0SCHMITT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_1_pd` reader - Pull Down Resistor for GPIO1."] -pub struct REG_GPIO_1_PD_R(crate::FieldReader); -impl REG_GPIO_1_PD_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_1_PD_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_0_SMT_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_1_PD_A { + pub fn variant(&self) -> GPIO0SCHMITT_A { match self.bits { - false => REG_GPIO_1_PD_A::DISABLED, - true => REG_GPIO_1_PD_A::ENABLED, + false => GPIO0SCHMITT_A::DISABLED, + true => GPIO0SCHMITT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_1_PD_A::DISABLED + *self == GPIO0SCHMITT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_1_PD_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_1_PD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO0SCHMITT_A::ENABLED } } -#[doc = "Field `reg_gpio_1_pd` writer - Pull Down Resistor for GPIO1."] -pub struct REG_GPIO_1_PD_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_1_PD_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_1_PD_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_0_smt` writer - Schmitt trigger enabled for GPIO0."] +pub type REG_GPIO_0_SMT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL0_SPEC, GPIO0SCHMITT_A, O>; +impl<'a, const O: u8> REG_GPIO_0_SMT_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_1_PD_A::DISABLED) + self.variant(GPIO0SCHMITT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_1_PD_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); - self.w + self.variant(GPIO0SCHMITT_A::ENABLED) } } -#[doc = "Pull Up Resistor for GPIO1.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_1_PU_A { +#[doc = "Field `reg_gpio_0_drv` reader - Driving control for GPIO0."] +pub type REG_GPIO_0_DRV_R = crate::FieldReader; +#[doc = "Driving control for GPIO0.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum GPIO0DRIVING_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_1_PU_A) -> Self { - variant as u8 != 0 + fn from(variant: GPIO0DRIVING_A) -> Self { + variant as _ } } -#[doc = "Field `reg_gpio_1_pu` reader - Pull Up Resistor for GPIO1."] -pub struct REG_GPIO_1_PU_R(crate::FieldReader); -impl REG_GPIO_1_PU_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_1_PU_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_0_DRV_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_1_PU_A { + pub fn variant(&self) -> Option { match self.bits { - false => REG_GPIO_1_PU_A::DISABLED, - true => REG_GPIO_1_PU_A::ENABLED, + 0 => Some(GPIO0DRIVING_A::DISABLED), + 1 => Some(GPIO0DRIVING_A::ENABLED), + _ => None, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_1_PU_A::DISABLED + *self == GPIO0DRIVING_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_1_PU_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_1_PU_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO0DRIVING_A::ENABLED } } -#[doc = "Field `reg_gpio_1_pu` writer - Pull Up Resistor for GPIO1."] -pub struct REG_GPIO_1_PU_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_1_PU_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_1_PU_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_0_drv` writer - Driving control for GPIO0."] +pub type REG_GPIO_0_DRV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL0_SPEC, u8, GPIO0DRIVING_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_0_DRV_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_1_PU_A::DISABLED) + self.variant(GPIO0DRIVING_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_1_PU_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w + self.variant(GPIO0DRIVING_A::ENABLED) } } -#[doc = "Driving control enabled for GPIO1.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -#[repr(u8)] -pub enum REG_GPIO_1_DRV_A { +#[doc = "Field `reg_gpio_0_pu` reader - Pull Up Resistor for GPIO0."] +pub type REG_GPIO_0_PU_R = crate::BitReader; +#[doc = "Pull Up Resistor for GPIO0.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO0PULL_UP_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for u8 { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_1_DRV_A) -> Self { - variant as _ + fn from(variant: GPIO0PULL_UP_RESISTOR_A) -> Self { + variant as u8 != 0 } } -#[doc = "Field `reg_gpio_1_drv` reader - Driving control enabled for GPIO1."] -pub struct REG_GPIO_1_DRV_R(crate::FieldReader); -impl REG_GPIO_1_DRV_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_1_DRV_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_0_PU_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> GPIO0PULL_UP_RESISTOR_A { match self.bits { - 0 => Some(REG_GPIO_1_DRV_A::DISABLED), - 1 => Some(REG_GPIO_1_DRV_A::ENABLED), - _ => None, + false => GPIO0PULL_UP_RESISTOR_A::DISABLED, + true => GPIO0PULL_UP_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_1_DRV_A::DISABLED + *self == GPIO0PULL_UP_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_1_DRV_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_1_DRV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO0PULL_UP_RESISTOR_A::ENABLED } } -#[doc = "Field `reg_gpio_1_drv` writer - Driving control enabled for GPIO1."] -pub struct REG_GPIO_1_DRV_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_1_DRV_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_1_DRV_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +#[doc = "Field `reg_gpio_0_pu` writer - Pull Up Resistor for GPIO0."] +pub type REG_GPIO_0_PU_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL0_SPEC, GPIO0PULL_UP_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_0_PU_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_1_DRV_A::DISABLED) + self.variant(GPIO0PULL_UP_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_1_DRV_A::ENABLED) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 18)) | ((value as u32 & 0x03) << 18); - self.w + self.variant(GPIO0PULL_UP_RESISTOR_A::ENABLED) } } -#[doc = "Schmitt trigger enabled for GPIO1.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_1_SMT_A { +#[doc = "Field `reg_gpio_0_pd` reader - Pull Down Resistor for GPIO0."] +pub type REG_GPIO_0_PD_R = crate::BitReader; +#[doc = "Pull Down Resistor for GPIO0.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO0PULL_DOWN_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_1_SMT_A) -> Self { + fn from(variant: GPIO0PULL_DOWN_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_1_smt` reader - Schmitt trigger enabled for GPIO1."] -pub struct REG_GPIO_1_SMT_R(crate::FieldReader); -impl REG_GPIO_1_SMT_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_1_SMT_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_0_PD_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_1_SMT_A { + pub fn variant(&self) -> GPIO0PULL_DOWN_RESISTOR_A { match self.bits { - false => REG_GPIO_1_SMT_A::DISABLED, - true => REG_GPIO_1_SMT_A::ENABLED, + false => GPIO0PULL_DOWN_RESISTOR_A::DISABLED, + true => GPIO0PULL_DOWN_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_1_SMT_A::DISABLED + *self == GPIO0PULL_DOWN_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_1_SMT_A::ENABLED + *self == GPIO0PULL_DOWN_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_1_SMT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_1_smt` writer - Schmitt trigger enabled for GPIO1."] -pub struct REG_GPIO_1_SMT_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_1_SMT_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_1_SMT_A) -> &'a mut W { - self.bit(variant.into()) - } - #[doc = "`0`"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_1_SMT_A::DISABLED) - } - #[doc = "`1`"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_1_SMT_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w - } -} -#[doc = "Input enable for GPIO1.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_1_IE_A { - #[doc = "0: `0`"] - DISABLED = 0, - #[doc = "1: `1`"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REG_GPIO_1_IE_A) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `reg_gpio_1_ie` reader - Input enable for GPIO1."] -pub struct REG_GPIO_1_IE_R(crate::FieldReader); -impl REG_GPIO_1_IE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_1_IE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REG_GPIO_1_IE_A { - match self.bits { - false => REG_GPIO_1_IE_A::DISABLED, - true => REG_GPIO_1_IE_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_1_IE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_1_IE_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_1_IE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_1_ie` writer - Input enable for GPIO1."] -pub struct REG_GPIO_1_IE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_1_IE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_1_IE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_0_pd` writer - Pull Down Resistor for GPIO0."] +pub type REG_GPIO_0_PD_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL0_SPEC, GPIO0PULL_DOWN_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_0_PD_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_1_IE_A::DISABLED) + self.variant(GPIO0PULL_DOWN_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_1_IE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -#[repr(u8)] -pub enum REAL_GPIO_0_FUNC_SEL_A { - #[doc = "0: Function select is reg_gpio_0_func_sel"] - GLB_GPIO_REAL_MODE_REG = 0, - #[doc = "1: `1`"] - GLB_GPIO_REAL_MODE_SDIO = 1, - #[doc = "12: `1100`"] - GLB_GPIO_REAL_MODE_RF = 12, - #[doc = "14: `1110`"] - GLB_GPIO_REAL_MODE_JTAG = 14, - #[doc = "15: `1111`"] - GLB_GPIO_REAL_MODE_CCI = 15, -} -impl From for u8 { - #[inline(always)] - fn from(variant: REAL_GPIO_0_FUNC_SEL_A) -> Self { - variant as _ - } -} -#[doc = "Field `real_gpio_0_func_sel` reader - "] -pub struct REAL_GPIO_0_FUNC_SEL_R(crate::FieldReader); -impl REAL_GPIO_0_FUNC_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - REAL_GPIO_0_FUNC_SEL_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(REAL_GPIO_0_FUNC_SEL_A::GLB_GPIO_REAL_MODE_REG), - 1 => Some(REAL_GPIO_0_FUNC_SEL_A::GLB_GPIO_REAL_MODE_SDIO), - 12 => Some(REAL_GPIO_0_FUNC_SEL_A::GLB_GPIO_REAL_MODE_RF), - 14 => Some(REAL_GPIO_0_FUNC_SEL_A::GLB_GPIO_REAL_MODE_JTAG), - 15 => Some(REAL_GPIO_0_FUNC_SEL_A::GLB_GPIO_REAL_MODE_CCI), - _ => None, - } - } - #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_REG`"] - #[inline(always)] - pub fn is_glb_gpio_real_mode_reg(&self) -> bool { - **self == REAL_GPIO_0_FUNC_SEL_A::GLB_GPIO_REAL_MODE_REG - } - #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_SDIO`"] - #[inline(always)] - pub fn is_glb_gpio_real_mode_sdio(&self) -> bool { - **self == REAL_GPIO_0_FUNC_SEL_A::GLB_GPIO_REAL_MODE_SDIO - } - #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_RF`"] - #[inline(always)] - pub fn is_glb_gpio_real_mode_rf(&self) -> bool { - **self == REAL_GPIO_0_FUNC_SEL_A::GLB_GPIO_REAL_MODE_RF - } - #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_JTAG`"] - #[inline(always)] - pub fn is_glb_gpio_real_mode_jtag(&self) -> bool { - **self == REAL_GPIO_0_FUNC_SEL_A::GLB_GPIO_REAL_MODE_JTAG - } - #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_CCI`"] - #[inline(always)] - pub fn is_glb_gpio_real_mode_cci(&self) -> bool { - **self == REAL_GPIO_0_FUNC_SEL_A::GLB_GPIO_REAL_MODE_CCI - } -} -impl core::ops::Deref for REAL_GPIO_0_FUNC_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + self.variant(GPIO0PULL_DOWN_RESISTOR_A::ENABLED) } } +#[doc = "Field `reg_gpio_0_func_sel` reader - Function select for GPIO0."] +pub type REG_GPIO_0_FUNC_SEL_R = crate::FieldReader; #[doc = "Function select for GPIO0.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_0_FUNC_SEL_A { +pub enum GPIO0FUNCTION_SELECT_A { #[doc = "1: `1`"] SDIO_CLK = 1, #[doc = "2: `10`"] @@ -787,701 +318,821 @@ pub enum REG_GPIO_0_FUNC_SEL_A { #[doc = "14: `1110`"] E21_TMS = 14, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_0_FUNC_SEL_A) -> Self { + fn from(variant: GPIO0FUNCTION_SELECT_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_0_func_sel` reader - Function select for GPIO0."] -pub struct REG_GPIO_0_FUNC_SEL_R(crate::FieldReader); impl REG_GPIO_0_FUNC_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_0_FUNC_SEL_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 1 => Some(REG_GPIO_0_FUNC_SEL_A::SDIO_CLK), - 2 => Some(REG_GPIO_0_FUNC_SEL_A::SF_D1), - 4 => Some(REG_GPIO_0_FUNC_SEL_A::SPI_MOSI_SPI_MISO), - 6 => Some(REG_GPIO_0_FUNC_SEL_A::I2C_SCL), - 7 => Some(REG_GPIO_0_FUNC_SEL_A::UART_SIG0), - 8 => Some(REG_GPIO_0_FUNC_SEL_A::PWM_CH0), - 9 => Some(REG_GPIO_0_FUNC_SEL_A::FEM_GPIO_0), - 10 => Some(REG_GPIO_0_FUNC_SEL_A::ATEST_IN), - 11 => Some(REG_GPIO_0_FUNC_SEL_A::SWGPIO_0), - 14 => Some(REG_GPIO_0_FUNC_SEL_A::E21_TMS), + 1 => Some(GPIO0FUNCTION_SELECT_A::SDIO_CLK), + 2 => Some(GPIO0FUNCTION_SELECT_A::SF_D1), + 4 => Some(GPIO0FUNCTION_SELECT_A::SPI_MOSI_SPI_MISO), + 6 => Some(GPIO0FUNCTION_SELECT_A::I2C_SCL), + 7 => Some(GPIO0FUNCTION_SELECT_A::UART_SIG0), + 8 => Some(GPIO0FUNCTION_SELECT_A::PWM_CH0), + 9 => Some(GPIO0FUNCTION_SELECT_A::FEM_GPIO_0), + 10 => Some(GPIO0FUNCTION_SELECT_A::ATEST_IN), + 11 => Some(GPIO0FUNCTION_SELECT_A::SWGPIO_0), + 14 => Some(GPIO0FUNCTION_SELECT_A::E21_TMS), _ => None, } } #[doc = "Checks if the value of the field is `SDIO_CLK`"] #[inline(always)] pub fn is_sdio_clk(&self) -> bool { - **self == REG_GPIO_0_FUNC_SEL_A::SDIO_CLK + *self == GPIO0FUNCTION_SELECT_A::SDIO_CLK } #[doc = "Checks if the value of the field is `SF_D1`"] #[inline(always)] pub fn is_sf_d1(&self) -> bool { - **self == REG_GPIO_0_FUNC_SEL_A::SF_D1 + *self == GPIO0FUNCTION_SELECT_A::SF_D1 } #[doc = "Checks if the value of the field is `SPI_MOSI_SPI_MISO`"] #[inline(always)] pub fn is_spi_mosi_spi_miso(&self) -> bool { - **self == REG_GPIO_0_FUNC_SEL_A::SPI_MOSI_SPI_MISO + *self == GPIO0FUNCTION_SELECT_A::SPI_MOSI_SPI_MISO } #[doc = "Checks if the value of the field is `I2C_SCL`"] #[inline(always)] pub fn is_i2c_scl(&self) -> bool { - **self == REG_GPIO_0_FUNC_SEL_A::I2C_SCL + *self == GPIO0FUNCTION_SELECT_A::I2C_SCL } #[doc = "Checks if the value of the field is `UART_SIG0`"] #[inline(always)] pub fn is_uart_sig0(&self) -> bool { - **self == REG_GPIO_0_FUNC_SEL_A::UART_SIG0 + *self == GPIO0FUNCTION_SELECT_A::UART_SIG0 } #[doc = "Checks if the value of the field is `PWM_CH0`"] #[inline(always)] pub fn is_pwm_ch0(&self) -> bool { - **self == REG_GPIO_0_FUNC_SEL_A::PWM_CH0 + *self == GPIO0FUNCTION_SELECT_A::PWM_CH0 } #[doc = "Checks if the value of the field is `FEM_GPIO_0`"] #[inline(always)] pub fn is_fem_gpio_0(&self) -> bool { - **self == REG_GPIO_0_FUNC_SEL_A::FEM_GPIO_0 + *self == GPIO0FUNCTION_SELECT_A::FEM_GPIO_0 } #[doc = "Checks if the value of the field is `ATEST_IN`"] #[inline(always)] pub fn is_atest_in(&self) -> bool { - **self == REG_GPIO_0_FUNC_SEL_A::ATEST_IN + *self == GPIO0FUNCTION_SELECT_A::ATEST_IN } #[doc = "Checks if the value of the field is `SWGPIO_0`"] #[inline(always)] pub fn is_swgpio_0(&self) -> bool { - **self == REG_GPIO_0_FUNC_SEL_A::SWGPIO_0 + *self == GPIO0FUNCTION_SELECT_A::SWGPIO_0 } #[doc = "Checks if the value of the field is `E21_TMS`"] #[inline(always)] pub fn is_e21_tms(&self) -> bool { - **self == REG_GPIO_0_FUNC_SEL_A::E21_TMS - } -} -impl core::ops::Deref for REG_GPIO_0_FUNC_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO0FUNCTION_SELECT_A::E21_TMS } } #[doc = "Field `reg_gpio_0_func_sel` writer - Function select for GPIO0."] -pub struct REG_GPIO_0_FUNC_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_0_FUNC_SEL_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_0_FUNC_SEL_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +pub type REG_GPIO_0_FUNC_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL0_SPEC, u8, GPIO0FUNCTION_SELECT_A, 4, O>; +impl<'a, const O: u8> REG_GPIO_0_FUNC_SEL_W<'a, O> { #[doc = "`1`"] #[inline(always)] pub fn sdio_clk(self) -> &'a mut W { - self.variant(REG_GPIO_0_FUNC_SEL_A::SDIO_CLK) + self.variant(GPIO0FUNCTION_SELECT_A::SDIO_CLK) } #[doc = "`10`"] #[inline(always)] pub fn sf_d1(self) -> &'a mut W { - self.variant(REG_GPIO_0_FUNC_SEL_A::SF_D1) + self.variant(GPIO0FUNCTION_SELECT_A::SF_D1) } #[doc = "`100`"] #[inline(always)] pub fn spi_mosi_spi_miso(self) -> &'a mut W { - self.variant(REG_GPIO_0_FUNC_SEL_A::SPI_MOSI_SPI_MISO) + self.variant(GPIO0FUNCTION_SELECT_A::SPI_MOSI_SPI_MISO) } #[doc = "`110`"] #[inline(always)] pub fn i2c_scl(self) -> &'a mut W { - self.variant(REG_GPIO_0_FUNC_SEL_A::I2C_SCL) + self.variant(GPIO0FUNCTION_SELECT_A::I2C_SCL) } #[doc = "`111`"] #[inline(always)] pub fn uart_sig0(self) -> &'a mut W { - self.variant(REG_GPIO_0_FUNC_SEL_A::UART_SIG0) + self.variant(GPIO0FUNCTION_SELECT_A::UART_SIG0) } #[doc = "`1000`"] #[inline(always)] pub fn pwm_ch0(self) -> &'a mut W { - self.variant(REG_GPIO_0_FUNC_SEL_A::PWM_CH0) + self.variant(GPIO0FUNCTION_SELECT_A::PWM_CH0) } #[doc = "`1001`"] #[inline(always)] pub fn fem_gpio_0(self) -> &'a mut W { - self.variant(REG_GPIO_0_FUNC_SEL_A::FEM_GPIO_0) + self.variant(GPIO0FUNCTION_SELECT_A::FEM_GPIO_0) } #[doc = "`1010`"] #[inline(always)] pub fn atest_in(self) -> &'a mut W { - self.variant(REG_GPIO_0_FUNC_SEL_A::ATEST_IN) + self.variant(GPIO0FUNCTION_SELECT_A::ATEST_IN) } #[doc = "`1011`"] #[inline(always)] pub fn swgpio_0(self) -> &'a mut W { - self.variant(REG_GPIO_0_FUNC_SEL_A::SWGPIO_0) + self.variant(GPIO0FUNCTION_SELECT_A::SWGPIO_0) } #[doc = "`1110`"] #[inline(always)] pub fn e21_tms(self) -> &'a mut W { - self.variant(REG_GPIO_0_FUNC_SEL_A::E21_TMS) + self.variant(GPIO0FUNCTION_SELECT_A::E21_TMS) } - #[doc = r"Writes raw bits to the field"] +} +#[doc = "Field `real_gpio_0_func_sel` reader - "] +pub type REAL_GPIO_0_FUNC_SEL_R = crate::FieldReader; +#[doc = "\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum GPIO0REAL_FUNCTION_SELECT_A { + #[doc = "0: Function select is reg_gpio_0_func_sel"] + GLB_GPIO_REAL_MODE_REG = 0, + #[doc = "1: `1`"] + GLB_GPIO_REAL_MODE_SDIO = 1, + #[doc = "12: `1100`"] + GLB_GPIO_REAL_MODE_RF = 12, + #[doc = "14: `1110`"] + GLB_GPIO_REAL_MODE_JTAG = 14, + #[doc = "15: `1111`"] + GLB_GPIO_REAL_MODE_CCI = 15, +} +impl From for u8 { #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 8)) | ((value as u32 & 0x0f) << 8); - self.w + fn from(variant: GPIO0REAL_FUNCTION_SELECT_A) -> Self { + variant as _ } } -#[doc = "Pull Down Resistor for GPIO0.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_0_PD_A { +impl REAL_GPIO_0_FUNC_SEL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(GPIO0REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_REG), + 1 => Some(GPIO0REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_SDIO), + 12 => Some(GPIO0REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_RF), + 14 => Some(GPIO0REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_JTAG), + 15 => Some(GPIO0REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_CCI), + _ => None, + } + } + #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_REG`"] + #[inline(always)] + pub fn is_glb_gpio_real_mode_reg(&self) -> bool { + *self == GPIO0REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_REG + } + #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_SDIO`"] + #[inline(always)] + pub fn is_glb_gpio_real_mode_sdio(&self) -> bool { + *self == GPIO0REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_SDIO + } + #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_RF`"] + #[inline(always)] + pub fn is_glb_gpio_real_mode_rf(&self) -> bool { + *self == GPIO0REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_RF + } + #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_JTAG`"] + #[inline(always)] + pub fn is_glb_gpio_real_mode_jtag(&self) -> bool { + *self == GPIO0REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_JTAG + } + #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_CCI`"] + #[inline(always)] + pub fn is_glb_gpio_real_mode_cci(&self) -> bool { + *self == GPIO0REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_CCI + } +} +#[doc = "Field `reg_gpio_1_ie` reader - Input enable for GPIO1."] +pub type REG_GPIO_1_IE_R = crate::BitReader; +#[doc = "Input enable for GPIO1.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO1INPUT_ENABLED_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_0_PD_A) -> Self { + fn from(variant: GPIO1INPUT_ENABLED_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_0_pd` reader - Pull Down Resistor for GPIO0."] -pub struct REG_GPIO_0_PD_R(crate::FieldReader); -impl REG_GPIO_0_PD_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_0_PD_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_1_IE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_0_PD_A { + pub fn variant(&self) -> GPIO1INPUT_ENABLED_A { match self.bits { - false => REG_GPIO_0_PD_A::DISABLED, - true => REG_GPIO_0_PD_A::ENABLED, + false => GPIO1INPUT_ENABLED_A::DISABLED, + true => GPIO1INPUT_ENABLED_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_0_PD_A::DISABLED + *self == GPIO1INPUT_ENABLED_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_0_PD_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_0_PD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO1INPUT_ENABLED_A::ENABLED } } -#[doc = "Field `reg_gpio_0_pd` writer - Pull Down Resistor for GPIO0."] -pub struct REG_GPIO_0_PD_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_0_PD_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_0_PD_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_1_ie` writer - Input enable for GPIO1."] +pub type REG_GPIO_1_IE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL0_SPEC, GPIO1INPUT_ENABLED_A, O>; +impl<'a, const O: u8> REG_GPIO_1_IE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_0_PD_A::DISABLED) + self.variant(GPIO1INPUT_ENABLED_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_0_PD_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w + self.variant(GPIO1INPUT_ENABLED_A::ENABLED) } } -#[doc = "Pull Up Resistor for GPIO0.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_0_PU_A { +#[doc = "Field `reg_gpio_1_smt` reader - Schmitt trigger enabled for GPIO1."] +pub type REG_GPIO_1_SMT_R = crate::BitReader; +#[doc = "Schmitt trigger enabled for GPIO1.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO1SCHMITT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_0_PU_A) -> Self { + fn from(variant: GPIO1SCHMITT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_0_pu` reader - Pull Up Resistor for GPIO0."] -pub struct REG_GPIO_0_PU_R(crate::FieldReader); -impl REG_GPIO_0_PU_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_0_PU_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_1_SMT_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_0_PU_A { + pub fn variant(&self) -> GPIO1SCHMITT_A { match self.bits { - false => REG_GPIO_0_PU_A::DISABLED, - true => REG_GPIO_0_PU_A::ENABLED, + false => GPIO1SCHMITT_A::DISABLED, + true => GPIO1SCHMITT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_0_PU_A::DISABLED + *self == GPIO1SCHMITT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_0_PU_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_0_PU_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO1SCHMITT_A::ENABLED } } -#[doc = "Field `reg_gpio_0_pu` writer - Pull Up Resistor for GPIO0."] -pub struct REG_GPIO_0_PU_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_0_PU_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_0_PU_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_1_smt` writer - Schmitt trigger enabled for GPIO1."] +pub type REG_GPIO_1_SMT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL0_SPEC, GPIO1SCHMITT_A, O>; +impl<'a, const O: u8> REG_GPIO_1_SMT_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_0_PU_A::DISABLED) + self.variant(GPIO1SCHMITT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_0_PU_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w + self.variant(GPIO1SCHMITT_A::ENABLED) } } -#[doc = "Driving control for GPIO0.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[doc = "Field `reg_gpio_1_drv` reader - Driving control enabled for GPIO1."] +pub type REG_GPIO_1_DRV_R = crate::FieldReader; +#[doc = "Driving control enabled for GPIO1.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_0_DRV_A { +pub enum GPIO1DRIVING_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_0_DRV_A) -> Self { + fn from(variant: GPIO1DRIVING_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_0_drv` reader - Driving control for GPIO0."] -pub struct REG_GPIO_0_DRV_R(crate::FieldReader); -impl REG_GPIO_0_DRV_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_0_DRV_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_1_DRV_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 0 => Some(REG_GPIO_0_DRV_A::DISABLED), - 1 => Some(REG_GPIO_0_DRV_A::ENABLED), + 0 => Some(GPIO1DRIVING_A::DISABLED), + 1 => Some(GPIO1DRIVING_A::ENABLED), _ => None, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_0_DRV_A::DISABLED + *self == GPIO1DRIVING_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_0_DRV_A::ENABLED + *self == GPIO1DRIVING_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_0_DRV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_0_drv` writer - Driving control for GPIO0."] -pub struct REG_GPIO_0_DRV_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_0_DRV_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_0_DRV_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +#[doc = "Field `reg_gpio_1_drv` writer - Driving control enabled for GPIO1."] +pub type REG_GPIO_1_DRV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL0_SPEC, u8, GPIO1DRIVING_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_1_DRV_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_0_DRV_A::DISABLED) + self.variant(GPIO1DRIVING_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_0_DRV_A::ENABLED) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 2)) | ((value as u32 & 0x03) << 2); - self.w + self.variant(GPIO1DRIVING_A::ENABLED) } } -#[doc = "Schmitt trigger enabled for GPIO0.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_0_SMT_A { +#[doc = "Field `reg_gpio_1_pu` reader - Pull Up Resistor for GPIO1."] +pub type REG_GPIO_1_PU_R = crate::BitReader; +#[doc = "Pull Up Resistor for GPIO1.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO1PULL_UP_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_0_SMT_A) -> Self { + fn from(variant: GPIO1PULL_UP_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_0_smt` reader - Schmitt trigger enabled for GPIO0."] -pub struct REG_GPIO_0_SMT_R(crate::FieldReader); -impl REG_GPIO_0_SMT_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_0_SMT_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_1_PU_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_0_SMT_A { + pub fn variant(&self) -> GPIO1PULL_UP_RESISTOR_A { match self.bits { - false => REG_GPIO_0_SMT_A::DISABLED, - true => REG_GPIO_0_SMT_A::ENABLED, + false => GPIO1PULL_UP_RESISTOR_A::DISABLED, + true => GPIO1PULL_UP_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_0_SMT_A::DISABLED + *self == GPIO1PULL_UP_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_0_SMT_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_0_SMT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO1PULL_UP_RESISTOR_A::ENABLED } } -#[doc = "Field `reg_gpio_0_smt` writer - Schmitt trigger enabled for GPIO0."] -pub struct REG_GPIO_0_SMT_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_0_SMT_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_0_SMT_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_1_pu` writer - Pull Up Resistor for GPIO1."] +pub type REG_GPIO_1_PU_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL0_SPEC, GPIO1PULL_UP_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_1_PU_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_0_SMT_A::DISABLED) + self.variant(GPIO1PULL_UP_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_0_SMT_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w + self.variant(GPIO1PULL_UP_RESISTOR_A::ENABLED) } } -#[doc = "GPIO0 input enable.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_0_IE_A { +#[doc = "Field `reg_gpio_1_pd` reader - Pull Down Resistor for GPIO1."] +pub type REG_GPIO_1_PD_R = crate::BitReader; +#[doc = "Pull Down Resistor for GPIO1.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO1PULL_DOWN_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_0_IE_A) -> Self { + fn from(variant: GPIO1PULL_DOWN_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_0_ie` reader - GPIO0 input enable."] -pub struct REG_GPIO_0_IE_R(crate::FieldReader); -impl REG_GPIO_0_IE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_0_IE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_1_PD_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_0_IE_A { + pub fn variant(&self) -> GPIO1PULL_DOWN_RESISTOR_A { match self.bits { - false => REG_GPIO_0_IE_A::DISABLED, - true => REG_GPIO_0_IE_A::ENABLED, + false => GPIO1PULL_DOWN_RESISTOR_A::DISABLED, + true => GPIO1PULL_DOWN_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_0_IE_A::DISABLED + *self == GPIO1PULL_DOWN_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_0_IE_A::ENABLED + *self == GPIO1PULL_DOWN_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_0_IE_R { - type Target = crate::FieldReader; +#[doc = "Field `reg_gpio_1_pd` writer - Pull Down Resistor for GPIO1."] +pub type REG_GPIO_1_PD_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL0_SPEC, GPIO1PULL_DOWN_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_1_PD_W<'a, O> { + #[doc = "`0`"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn disabled(self) -> &'a mut W { + self.variant(GPIO1PULL_DOWN_RESISTOR_A::DISABLED) + } + #[doc = "`1`"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(GPIO1PULL_DOWN_RESISTOR_A::ENABLED) } } -#[doc = "Field `reg_gpio_0_ie` writer - GPIO0 input enable."] -pub struct REG_GPIO_0_IE_W<'a> { - w: &'a mut W, +#[doc = "Field `reg_gpio_1_func_sel` reader - Function select for GPIO1."] +pub type REG_GPIO_1_FUNC_SEL_R = crate::FieldReader; +#[doc = "Function select for GPIO1.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum GPIO1FUNCTION_SELECT_A { + #[doc = "1: `1`"] + SDIO_CMD = 1, + #[doc = "2: `10`"] + SF_D2 = 2, + #[doc = "4: `100`"] + SPI_MOSI_SPI_MISO = 4, + #[doc = "6: `110`"] + I2C_SDA = 6, + #[doc = "7: `111`"] + UART_SIG1 = 7, + #[doc = "8: `1000`"] + PWM_CH1 = 8, + #[doc = "9: `1001`"] + FEM_GPIO_1 = 9, + #[doc = "10: `1010`"] + ATEST_IP = 10, + #[doc = "11: `1011`"] + SWGPIO_1 = 11, + #[doc = "14: `1110`"] + E21_TDI = 14, } -impl<'a> REG_GPIO_0_IE_W<'a> { - #[doc = r"Writes `variant` to the field"] +impl From for u8 { #[inline(always)] - pub fn variant(self, variant: REG_GPIO_0_IE_A) -> &'a mut W { - self.bit(variant.into()) + fn from(variant: GPIO1FUNCTION_SELECT_A) -> Self { + variant as _ } - #[doc = "`0`"] +} +impl REG_GPIO_1_FUNC_SEL_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_0_IE_A::DISABLED) + pub fn variant(&self) -> Option { + match self.bits { + 1 => Some(GPIO1FUNCTION_SELECT_A::SDIO_CMD), + 2 => Some(GPIO1FUNCTION_SELECT_A::SF_D2), + 4 => Some(GPIO1FUNCTION_SELECT_A::SPI_MOSI_SPI_MISO), + 6 => Some(GPIO1FUNCTION_SELECT_A::I2C_SDA), + 7 => Some(GPIO1FUNCTION_SELECT_A::UART_SIG1), + 8 => Some(GPIO1FUNCTION_SELECT_A::PWM_CH1), + 9 => Some(GPIO1FUNCTION_SELECT_A::FEM_GPIO_1), + 10 => Some(GPIO1FUNCTION_SELECT_A::ATEST_IP), + 11 => Some(GPIO1FUNCTION_SELECT_A::SWGPIO_1), + 14 => Some(GPIO1FUNCTION_SELECT_A::E21_TDI), + _ => None, + } + } + #[doc = "Checks if the value of the field is `SDIO_CMD`"] + #[inline(always)] + pub fn is_sdio_cmd(&self) -> bool { + *self == GPIO1FUNCTION_SELECT_A::SDIO_CMD + } + #[doc = "Checks if the value of the field is `SF_D2`"] + #[inline(always)] + pub fn is_sf_d2(&self) -> bool { + *self == GPIO1FUNCTION_SELECT_A::SF_D2 + } + #[doc = "Checks if the value of the field is `SPI_MOSI_SPI_MISO`"] + #[inline(always)] + pub fn is_spi_mosi_spi_miso(&self) -> bool { + *self == GPIO1FUNCTION_SELECT_A::SPI_MOSI_SPI_MISO } + #[doc = "Checks if the value of the field is `I2C_SDA`"] + #[inline(always)] + pub fn is_i2c_sda(&self) -> bool { + *self == GPIO1FUNCTION_SELECT_A::I2C_SDA + } + #[doc = "Checks if the value of the field is `UART_SIG1`"] + #[inline(always)] + pub fn is_uart_sig1(&self) -> bool { + *self == GPIO1FUNCTION_SELECT_A::UART_SIG1 + } + #[doc = "Checks if the value of the field is `PWM_CH1`"] + #[inline(always)] + pub fn is_pwm_ch1(&self) -> bool { + *self == GPIO1FUNCTION_SELECT_A::PWM_CH1 + } + #[doc = "Checks if the value of the field is `FEM_GPIO_1`"] + #[inline(always)] + pub fn is_fem_gpio_1(&self) -> bool { + *self == GPIO1FUNCTION_SELECT_A::FEM_GPIO_1 + } + #[doc = "Checks if the value of the field is `ATEST_IP`"] + #[inline(always)] + pub fn is_atest_ip(&self) -> bool { + *self == GPIO1FUNCTION_SELECT_A::ATEST_IP + } + #[doc = "Checks if the value of the field is `SWGPIO_1`"] + #[inline(always)] + pub fn is_swgpio_1(&self) -> bool { + *self == GPIO1FUNCTION_SELECT_A::SWGPIO_1 + } + #[doc = "Checks if the value of the field is `E21_TDI`"] + #[inline(always)] + pub fn is_e21_tdi(&self) -> bool { + *self == GPIO1FUNCTION_SELECT_A::E21_TDI + } +} +#[doc = "Field `reg_gpio_1_func_sel` writer - Function select for GPIO1."] +pub type REG_GPIO_1_FUNC_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL0_SPEC, u8, GPIO1FUNCTION_SELECT_A, 4, O>; +impl<'a, const O: u8> REG_GPIO_1_FUNC_SEL_W<'a, O> { #[doc = "`1`"] #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_0_IE_A::ENABLED) + pub fn sdio_cmd(self) -> &'a mut W { + self.variant(GPIO1FUNCTION_SELECT_A::SDIO_CMD) + } + #[doc = "`10`"] + #[inline(always)] + pub fn sf_d2(self) -> &'a mut W { + self.variant(GPIO1FUNCTION_SELECT_A::SF_D2) + } + #[doc = "`100`"] + #[inline(always)] + pub fn spi_mosi_spi_miso(self) -> &'a mut W { + self.variant(GPIO1FUNCTION_SELECT_A::SPI_MOSI_SPI_MISO) + } + #[doc = "`110`"] + #[inline(always)] + pub fn i2c_sda(self) -> &'a mut W { + self.variant(GPIO1FUNCTION_SELECT_A::I2C_SDA) + } + #[doc = "`111`"] + #[inline(always)] + pub fn uart_sig1(self) -> &'a mut W { + self.variant(GPIO1FUNCTION_SELECT_A::UART_SIG1) + } + #[doc = "`1000`"] + #[inline(always)] + pub fn pwm_ch1(self) -> &'a mut W { + self.variant(GPIO1FUNCTION_SELECT_A::PWM_CH1) + } + #[doc = "`1001`"] + #[inline(always)] + pub fn fem_gpio_1(self) -> &'a mut W { + self.variant(GPIO1FUNCTION_SELECT_A::FEM_GPIO_1) } - #[doc = r"Sets the field bit"] + #[doc = "`1010`"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn atest_ip(self) -> &'a mut W { + self.variant(GPIO1FUNCTION_SELECT_A::ATEST_IP) } - #[doc = r"Clears the field bit"] + #[doc = "`1011`"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn swgpio_1(self) -> &'a mut W { + self.variant(GPIO1FUNCTION_SELECT_A::SWGPIO_1) } - #[doc = r"Writes raw bits to the field"] + #[doc = "`1110`"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn e21_tdi(self) -> &'a mut W { + self.variant(GPIO1FUNCTION_SELECT_A::E21_TDI) } } -impl R { - #[doc = "Bits 28:31"] +#[doc = "Field `real_gpio_1_func_sel` reader - "] +pub type REAL_GPIO_1_FUNC_SEL_R = crate::FieldReader; +#[doc = "\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum GPIO1REAL_FUNCTION_SELECT_A { + #[doc = "0: Function select is reg_gpio_1_func_sel"] + GLB_GPIO_REAL_MODE_REG = 0, + #[doc = "1: `1`"] + GLB_GPIO_REAL_MODE_SDIO = 1, + #[doc = "12: `1100`"] + GLB_GPIO_REAL_MODE_RF = 12, + #[doc = "14: `1110`"] + GLB_GPIO_REAL_MODE_JTAG = 14, + #[doc = "15: `1111`"] + GLB_GPIO_REAL_MODE_CCI = 15, +} +impl From for u8 { #[inline(always)] - pub fn real_gpio_1_func_sel(&self) -> REAL_GPIO_1_FUNC_SEL_R { - REAL_GPIO_1_FUNC_SEL_R::new(((self.bits >> 28) & 0x0f) as u8) + fn from(variant: GPIO1REAL_FUNCTION_SELECT_A) -> Self { + variant as _ } - #[doc = "Bits 24:27 - Function select for GPIO1."] +} +impl REAL_GPIO_1_FUNC_SEL_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn reg_gpio_1_func_sel(&self) -> REG_GPIO_1_FUNC_SEL_R { - REG_GPIO_1_FUNC_SEL_R::new(((self.bits >> 24) & 0x0f) as u8) + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(GPIO1REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_REG), + 1 => Some(GPIO1REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_SDIO), + 12 => Some(GPIO1REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_RF), + 14 => Some(GPIO1REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_JTAG), + 15 => Some(GPIO1REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_CCI), + _ => None, + } } - #[doc = "Bit 21 - Pull Down Resistor for GPIO1."] + #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_REG`"] #[inline(always)] - pub fn reg_gpio_1_pd(&self) -> REG_GPIO_1_PD_R { - REG_GPIO_1_PD_R::new(((self.bits >> 21) & 0x01) != 0) + pub fn is_glb_gpio_real_mode_reg(&self) -> bool { + *self == GPIO1REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_REG } - #[doc = "Bit 20 - Pull Up Resistor for GPIO1."] + #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_SDIO`"] #[inline(always)] - pub fn reg_gpio_1_pu(&self) -> REG_GPIO_1_PU_R { - REG_GPIO_1_PU_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn is_glb_gpio_real_mode_sdio(&self) -> bool { + *self == GPIO1REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_SDIO } - #[doc = "Bits 18:19 - Driving control enabled for GPIO1."] + #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_RF`"] #[inline(always)] - pub fn reg_gpio_1_drv(&self) -> REG_GPIO_1_DRV_R { - REG_GPIO_1_DRV_R::new(((self.bits >> 18) & 0x03) as u8) + pub fn is_glb_gpio_real_mode_rf(&self) -> bool { + *self == GPIO1REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_RF } - #[doc = "Bit 17 - Schmitt trigger enabled for GPIO1."] + #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_JTAG`"] #[inline(always)] - pub fn reg_gpio_1_smt(&self) -> REG_GPIO_1_SMT_R { - REG_GPIO_1_SMT_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn is_glb_gpio_real_mode_jtag(&self) -> bool { + *self == GPIO1REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_JTAG } - #[doc = "Bit 16 - Input enable for GPIO1."] + #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_CCI`"] #[inline(always)] - pub fn reg_gpio_1_ie(&self) -> REG_GPIO_1_IE_R { - REG_GPIO_1_IE_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn is_glb_gpio_real_mode_cci(&self) -> bool { + *self == GPIO1REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_CCI } - #[doc = "Bits 12:15"] +} +impl R { + #[doc = "Bit 0 - GPIO0 input enable."] #[inline(always)] - pub fn real_gpio_0_func_sel(&self) -> REAL_GPIO_0_FUNC_SEL_R { - REAL_GPIO_0_FUNC_SEL_R::new(((self.bits >> 12) & 0x0f) as u8) + pub fn reg_gpio_0_ie(&self) -> REG_GPIO_0_IE_R { + REG_GPIO_0_IE_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Schmitt trigger enabled for GPIO0."] + #[inline(always)] + pub fn reg_gpio_0_smt(&self) -> REG_GPIO_0_SMT_R { + REG_GPIO_0_SMT_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bits 2:3 - Driving control for GPIO0."] + #[inline(always)] + pub fn reg_gpio_0_drv(&self) -> REG_GPIO_0_DRV_R { + REG_GPIO_0_DRV_R::new(((self.bits >> 2) & 3) as u8) + } + #[doc = "Bit 4 - Pull Up Resistor for GPIO0."] + #[inline(always)] + pub fn reg_gpio_0_pu(&self) -> REG_GPIO_0_PU_R { + REG_GPIO_0_PU_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Pull Down Resistor for GPIO0."] + #[inline(always)] + pub fn reg_gpio_0_pd(&self) -> REG_GPIO_0_PD_R { + REG_GPIO_0_PD_R::new(((self.bits >> 5) & 1) != 0) } #[doc = "Bits 8:11 - Function select for GPIO0."] #[inline(always)] pub fn reg_gpio_0_func_sel(&self) -> REG_GPIO_0_FUNC_SEL_R { REG_GPIO_0_FUNC_SEL_R::new(((self.bits >> 8) & 0x0f) as u8) } - #[doc = "Bit 5 - Pull Down Resistor for GPIO0."] + #[doc = "Bits 12:15"] #[inline(always)] - pub fn reg_gpio_0_pd(&self) -> REG_GPIO_0_PD_R { - REG_GPIO_0_PD_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn real_gpio_0_func_sel(&self) -> REAL_GPIO_0_FUNC_SEL_R { + REAL_GPIO_0_FUNC_SEL_R::new(((self.bits >> 12) & 0x0f) as u8) } - #[doc = "Bit 4 - Pull Up Resistor for GPIO0."] + #[doc = "Bit 16 - Input enable for GPIO1."] #[inline(always)] - pub fn reg_gpio_0_pu(&self) -> REG_GPIO_0_PU_R { - REG_GPIO_0_PU_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn reg_gpio_1_ie(&self) -> REG_GPIO_1_IE_R { + REG_GPIO_1_IE_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bits 2:3 - Driving control for GPIO0."] + #[doc = "Bit 17 - Schmitt trigger enabled for GPIO1."] #[inline(always)] - pub fn reg_gpio_0_drv(&self) -> REG_GPIO_0_DRV_R { - REG_GPIO_0_DRV_R::new(((self.bits >> 2) & 0x03) as u8) + pub fn reg_gpio_1_smt(&self) -> REG_GPIO_1_SMT_R { + REG_GPIO_1_SMT_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bit 1 - Schmitt trigger enabled for GPIO0."] + #[doc = "Bits 18:19 - Driving control enabled for GPIO1."] #[inline(always)] - pub fn reg_gpio_0_smt(&self) -> REG_GPIO_0_SMT_R { - REG_GPIO_0_SMT_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn reg_gpio_1_drv(&self) -> REG_GPIO_1_DRV_R { + REG_GPIO_1_DRV_R::new(((self.bits >> 18) & 3) as u8) } - #[doc = "Bit 0 - GPIO0 input enable."] + #[doc = "Bit 20 - Pull Up Resistor for GPIO1."] #[inline(always)] - pub fn reg_gpio_0_ie(&self) -> REG_GPIO_0_IE_R { - REG_GPIO_0_IE_R::new((self.bits & 0x01) != 0) + pub fn reg_gpio_1_pu(&self) -> REG_GPIO_1_PU_R { + REG_GPIO_1_PU_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 21 - Pull Down Resistor for GPIO1."] + #[inline(always)] + pub fn reg_gpio_1_pd(&self) -> REG_GPIO_1_PD_R { + REG_GPIO_1_PD_R::new(((self.bits >> 21) & 1) != 0) } -} -impl W { #[doc = "Bits 24:27 - Function select for GPIO1."] #[inline(always)] - pub fn reg_gpio_1_func_sel(&mut self) -> REG_GPIO_1_FUNC_SEL_W { - REG_GPIO_1_FUNC_SEL_W { w: self } + pub fn reg_gpio_1_func_sel(&self) -> REG_GPIO_1_FUNC_SEL_R { + REG_GPIO_1_FUNC_SEL_R::new(((self.bits >> 24) & 0x0f) as u8) } - #[doc = "Bit 21 - Pull Down Resistor for GPIO1."] + #[doc = "Bits 28:31"] #[inline(always)] - pub fn reg_gpio_1_pd(&mut self) -> REG_GPIO_1_PD_W { - REG_GPIO_1_PD_W { w: self } + pub fn real_gpio_1_func_sel(&self) -> REAL_GPIO_1_FUNC_SEL_R { + REAL_GPIO_1_FUNC_SEL_R::new(((self.bits >> 28) & 0x0f) as u8) } - #[doc = "Bit 20 - Pull Up Resistor for GPIO1."] +} +impl W { + #[doc = "Bit 0 - GPIO0 input enable."] #[inline(always)] - pub fn reg_gpio_1_pu(&mut self) -> REG_GPIO_1_PU_W { - REG_GPIO_1_PU_W { w: self } + #[must_use] + pub fn reg_gpio_0_ie(&mut self) -> REG_GPIO_0_IE_W<0> { + REG_GPIO_0_IE_W::new(self) } - #[doc = "Bits 18:19 - Driving control enabled for GPIO1."] + #[doc = "Bit 1 - Schmitt trigger enabled for GPIO0."] #[inline(always)] - pub fn reg_gpio_1_drv(&mut self) -> REG_GPIO_1_DRV_W { - REG_GPIO_1_DRV_W { w: self } + #[must_use] + pub fn reg_gpio_0_smt(&mut self) -> REG_GPIO_0_SMT_W<1> { + REG_GPIO_0_SMT_W::new(self) } - #[doc = "Bit 17 - Schmitt trigger enabled for GPIO1."] + #[doc = "Bits 2:3 - Driving control for GPIO0."] #[inline(always)] - pub fn reg_gpio_1_smt(&mut self) -> REG_GPIO_1_SMT_W { - REG_GPIO_1_SMT_W { w: self } + #[must_use] + pub fn reg_gpio_0_drv(&mut self) -> REG_GPIO_0_DRV_W<2> { + REG_GPIO_0_DRV_W::new(self) } - #[doc = "Bit 16 - Input enable for GPIO1."] + #[doc = "Bit 4 - Pull Up Resistor for GPIO0."] + #[inline(always)] + #[must_use] + pub fn reg_gpio_0_pu(&mut self) -> REG_GPIO_0_PU_W<4> { + REG_GPIO_0_PU_W::new(self) + } + #[doc = "Bit 5 - Pull Down Resistor for GPIO0."] #[inline(always)] - pub fn reg_gpio_1_ie(&mut self) -> REG_GPIO_1_IE_W { - REG_GPIO_1_IE_W { w: self } + #[must_use] + pub fn reg_gpio_0_pd(&mut self) -> REG_GPIO_0_PD_W<5> { + REG_GPIO_0_PD_W::new(self) } #[doc = "Bits 8:11 - Function select for GPIO0."] #[inline(always)] - pub fn reg_gpio_0_func_sel(&mut self) -> REG_GPIO_0_FUNC_SEL_W { - REG_GPIO_0_FUNC_SEL_W { w: self } + #[must_use] + pub fn reg_gpio_0_func_sel(&mut self) -> REG_GPIO_0_FUNC_SEL_W<8> { + REG_GPIO_0_FUNC_SEL_W::new(self) } - #[doc = "Bit 5 - Pull Down Resistor for GPIO0."] + #[doc = "Bit 16 - Input enable for GPIO1."] #[inline(always)] - pub fn reg_gpio_0_pd(&mut self) -> REG_GPIO_0_PD_W { - REG_GPIO_0_PD_W { w: self } + #[must_use] + pub fn reg_gpio_1_ie(&mut self) -> REG_GPIO_1_IE_W<16> { + REG_GPIO_1_IE_W::new(self) } - #[doc = "Bit 4 - Pull Up Resistor for GPIO0."] + #[doc = "Bit 17 - Schmitt trigger enabled for GPIO1."] #[inline(always)] - pub fn reg_gpio_0_pu(&mut self) -> REG_GPIO_0_PU_W { - REG_GPIO_0_PU_W { w: self } + #[must_use] + pub fn reg_gpio_1_smt(&mut self) -> REG_GPIO_1_SMT_W<17> { + REG_GPIO_1_SMT_W::new(self) } - #[doc = "Bits 2:3 - Driving control for GPIO0."] + #[doc = "Bits 18:19 - Driving control enabled for GPIO1."] #[inline(always)] - pub fn reg_gpio_0_drv(&mut self) -> REG_GPIO_0_DRV_W { - REG_GPIO_0_DRV_W { w: self } + #[must_use] + pub fn reg_gpio_1_drv(&mut self) -> REG_GPIO_1_DRV_W<18> { + REG_GPIO_1_DRV_W::new(self) } - #[doc = "Bit 1 - Schmitt trigger enabled for GPIO0."] + #[doc = "Bit 20 - Pull Up Resistor for GPIO1."] #[inline(always)] - pub fn reg_gpio_0_smt(&mut self) -> REG_GPIO_0_SMT_W { - REG_GPIO_0_SMT_W { w: self } + #[must_use] + pub fn reg_gpio_1_pu(&mut self) -> REG_GPIO_1_PU_W<20> { + REG_GPIO_1_PU_W::new(self) } - #[doc = "Bit 0 - GPIO0 input enable."] + #[doc = "Bit 21 - Pull Down Resistor for GPIO1."] + #[inline(always)] + #[must_use] + pub fn reg_gpio_1_pd(&mut self) -> REG_GPIO_1_PD_W<21> { + REG_GPIO_1_PD_W::new(self) + } + #[doc = "Bits 24:27 - Function select for GPIO1."] #[inline(always)] - pub fn reg_gpio_0_ie(&mut self) -> REG_GPIO_0_IE_W { - REG_GPIO_0_IE_W { w: self } + #[must_use] + pub fn reg_gpio_1_func_sel(&mut self) -> REG_GPIO_1_FUNC_SEL_W<24> { + REG_GPIO_1_FUNC_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -1499,11 +1150,10 @@ impl crate::Readable for GPIO_CFGCTL0_SPEC { #[doc = "`write(|w| ..)` method takes [gpio_cfgctl0::W](W) writer structure"] impl crate::Writable for GPIO_CFGCTL0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets GPIO_CFGCTL0 to value 0x1103_1103"] impl crate::Resettable for GPIO_CFGCTL0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x1103_1103 - } + const RESET_VALUE: Self::Ux = 0x1103_1103; } diff --git a/src/glb/gpio_cfgctl1.rs b/src/glb/gpio_cfgctl1.rs index 18522e2..f6b5f61 100644 --- a/src/glb/gpio_cfgctl1.rs +++ b/src/glb/gpio_cfgctl1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,732 +28,275 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -#[repr(u8)] -pub enum REAL_GPIO_3_FUNC_SEL_A { - #[doc = "0: Function select is reg_gpio_3_func_sel"] - GLB_GPIO_REAL_MODE_REG = 0, - #[doc = "1: `1`"] - GLB_GPIO_REAL_MODE_SDIO = 1, - #[doc = "12: `1100`"] - GLB_GPIO_REAL_MODE_RF = 12, - #[doc = "14: `1110`"] - GLB_GPIO_REAL_MODE_JTAG = 14, - #[doc = "15: `1111`"] - GLB_GPIO_REAL_MODE_CCI = 15, -} -impl From for u8 { - #[inline(always)] - fn from(variant: REAL_GPIO_3_FUNC_SEL_A) -> Self { - variant as _ - } -} -#[doc = "Field `real_gpio_3_func_sel` reader - "] -pub struct REAL_GPIO_3_FUNC_SEL_R(crate::FieldReader); -impl REAL_GPIO_3_FUNC_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - REAL_GPIO_3_FUNC_SEL_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(REAL_GPIO_3_FUNC_SEL_A::GLB_GPIO_REAL_MODE_REG), - 1 => Some(REAL_GPIO_3_FUNC_SEL_A::GLB_GPIO_REAL_MODE_SDIO), - 12 => Some(REAL_GPIO_3_FUNC_SEL_A::GLB_GPIO_REAL_MODE_RF), - 14 => Some(REAL_GPIO_3_FUNC_SEL_A::GLB_GPIO_REAL_MODE_JTAG), - 15 => Some(REAL_GPIO_3_FUNC_SEL_A::GLB_GPIO_REAL_MODE_CCI), - _ => None, - } - } - #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_REG`"] - #[inline(always)] - pub fn is_glb_gpio_real_mode_reg(&self) -> bool { - **self == REAL_GPIO_3_FUNC_SEL_A::GLB_GPIO_REAL_MODE_REG - } - #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_SDIO`"] - #[inline(always)] - pub fn is_glb_gpio_real_mode_sdio(&self) -> bool { - **self == REAL_GPIO_3_FUNC_SEL_A::GLB_GPIO_REAL_MODE_SDIO - } - #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_RF`"] - #[inline(always)] - pub fn is_glb_gpio_real_mode_rf(&self) -> bool { - **self == REAL_GPIO_3_FUNC_SEL_A::GLB_GPIO_REAL_MODE_RF - } - #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_JTAG`"] - #[inline(always)] - pub fn is_glb_gpio_real_mode_jtag(&self) -> bool { - **self == REAL_GPIO_3_FUNC_SEL_A::GLB_GPIO_REAL_MODE_JTAG - } - #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_CCI`"] - #[inline(always)] - pub fn is_glb_gpio_real_mode_cci(&self) -> bool { - **self == REAL_GPIO_3_FUNC_SEL_A::GLB_GPIO_REAL_MODE_CCI - } -} -impl core::ops::Deref for REAL_GPIO_3_FUNC_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Function select for GPIO3.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -#[repr(u8)] -pub enum REG_GPIO_3_FUNC_SEL_A { +#[doc = "Field `reg_gpio_2_ie` reader - Input enable for GPIO2."] +pub type REG_GPIO_2_IE_R = crate::BitReader; +#[doc = "Input enable for GPIO2.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO2INPUT_ENABLED_A { + #[doc = "0: `0`"] + DISABLED = 0, #[doc = "1: `1`"] - SDIO_DAT1 = 1, - #[doc = "4: `100`"] - SPI_SCLK = 4, - #[doc = "6: `110`"] - I2C_SDA = 6, - #[doc = "7: `111`"] - UART_SIG3 = 7, - #[doc = "8: `1000`"] - PWM_CH3 = 8, - #[doc = "9: `1001`"] - FEM_GPIO_3 = 9, - #[doc = "10: `1010`"] - ATEST_QP = 10, - #[doc = "11: `1011`"] - SWGPIO_3 = 11, - #[doc = "14: `1110`"] - E21_TDO = 14, + ENABLED = 1, } -impl From for u8 { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_3_FUNC_SEL_A) -> Self { - variant as _ + fn from(variant: GPIO2INPUT_ENABLED_A) -> Self { + variant as u8 != 0 } } -#[doc = "Field `reg_gpio_3_func_sel` reader - Function select for GPIO3."] -pub struct REG_GPIO_3_FUNC_SEL_R(crate::FieldReader); -impl REG_GPIO_3_FUNC_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_3_FUNC_SEL_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_2_IE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> GPIO2INPUT_ENABLED_A { match self.bits { - 1 => Some(REG_GPIO_3_FUNC_SEL_A::SDIO_DAT1), - 4 => Some(REG_GPIO_3_FUNC_SEL_A::SPI_SCLK), - 6 => Some(REG_GPIO_3_FUNC_SEL_A::I2C_SDA), - 7 => Some(REG_GPIO_3_FUNC_SEL_A::UART_SIG3), - 8 => Some(REG_GPIO_3_FUNC_SEL_A::PWM_CH3), - 9 => Some(REG_GPIO_3_FUNC_SEL_A::FEM_GPIO_3), - 10 => Some(REG_GPIO_3_FUNC_SEL_A::ATEST_QP), - 11 => Some(REG_GPIO_3_FUNC_SEL_A::SWGPIO_3), - 14 => Some(REG_GPIO_3_FUNC_SEL_A::E21_TDO), - _ => None, + false => GPIO2INPUT_ENABLED_A::DISABLED, + true => GPIO2INPUT_ENABLED_A::ENABLED, } } - #[doc = "Checks if the value of the field is `SDIO_DAT1`"] - #[inline(always)] - pub fn is_sdio_dat1(&self) -> bool { - **self == REG_GPIO_3_FUNC_SEL_A::SDIO_DAT1 - } - #[doc = "Checks if the value of the field is `SPI_SCLK`"] - #[inline(always)] - pub fn is_spi_sclk(&self) -> bool { - **self == REG_GPIO_3_FUNC_SEL_A::SPI_SCLK - } - #[doc = "Checks if the value of the field is `I2C_SDA`"] - #[inline(always)] - pub fn is_i2c_sda(&self) -> bool { - **self == REG_GPIO_3_FUNC_SEL_A::I2C_SDA - } - #[doc = "Checks if the value of the field is `UART_SIG3`"] - #[inline(always)] - pub fn is_uart_sig3(&self) -> bool { - **self == REG_GPIO_3_FUNC_SEL_A::UART_SIG3 - } - #[doc = "Checks if the value of the field is `PWM_CH3`"] - #[inline(always)] - pub fn is_pwm_ch3(&self) -> bool { - **self == REG_GPIO_3_FUNC_SEL_A::PWM_CH3 - } - #[doc = "Checks if the value of the field is `FEM_GPIO_3`"] - #[inline(always)] - pub fn is_fem_gpio_3(&self) -> bool { - **self == REG_GPIO_3_FUNC_SEL_A::FEM_GPIO_3 - } - #[doc = "Checks if the value of the field is `ATEST_QP`"] - #[inline(always)] - pub fn is_atest_qp(&self) -> bool { - **self == REG_GPIO_3_FUNC_SEL_A::ATEST_QP - } - #[doc = "Checks if the value of the field is `SWGPIO_3`"] - #[inline(always)] - pub fn is_swgpio_3(&self) -> bool { - **self == REG_GPIO_3_FUNC_SEL_A::SWGPIO_3 - } - #[doc = "Checks if the value of the field is `E21_TDO`"] + #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] - pub fn is_e21_tdo(&self) -> bool { - **self == REG_GPIO_3_FUNC_SEL_A::E21_TDO + pub fn is_disabled(&self) -> bool { + *self == GPIO2INPUT_ENABLED_A::DISABLED } -} -impl core::ops::Deref for REG_GPIO_3_FUNC_SEL_R { - type Target = crate::FieldReader; + #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn is_enabled(&self) -> bool { + *self == GPIO2INPUT_ENABLED_A::ENABLED } } -#[doc = "Field `reg_gpio_3_func_sel` writer - Function select for GPIO3."] -pub struct REG_GPIO_3_FUNC_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_3_FUNC_SEL_W<'a> { - #[doc = r"Writes `variant` to the field"] +#[doc = "Field `reg_gpio_2_ie` writer - Input enable for GPIO2."] +pub type REG_GPIO_2_IE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL1_SPEC, GPIO2INPUT_ENABLED_A, O>; +impl<'a, const O: u8> REG_GPIO_2_IE_W<'a, O> { + #[doc = "`0`"] #[inline(always)] - pub fn variant(self, variant: REG_GPIO_3_FUNC_SEL_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } + pub fn disabled(self) -> &'a mut W { + self.variant(GPIO2INPUT_ENABLED_A::DISABLED) } #[doc = "`1`"] #[inline(always)] - pub fn sdio_dat1(self) -> &'a mut W { - self.variant(REG_GPIO_3_FUNC_SEL_A::SDIO_DAT1) - } - #[doc = "`100`"] - #[inline(always)] - pub fn spi_sclk(self) -> &'a mut W { - self.variant(REG_GPIO_3_FUNC_SEL_A::SPI_SCLK) - } - #[doc = "`110`"] - #[inline(always)] - pub fn i2c_sda(self) -> &'a mut W { - self.variant(REG_GPIO_3_FUNC_SEL_A::I2C_SDA) - } - #[doc = "`111`"] - #[inline(always)] - pub fn uart_sig3(self) -> &'a mut W { - self.variant(REG_GPIO_3_FUNC_SEL_A::UART_SIG3) - } - #[doc = "`1000`"] - #[inline(always)] - pub fn pwm_ch3(self) -> &'a mut W { - self.variant(REG_GPIO_3_FUNC_SEL_A::PWM_CH3) - } - #[doc = "`1001`"] - #[inline(always)] - pub fn fem_gpio_3(self) -> &'a mut W { - self.variant(REG_GPIO_3_FUNC_SEL_A::FEM_GPIO_3) - } - #[doc = "`1010`"] - #[inline(always)] - pub fn atest_qp(self) -> &'a mut W { - self.variant(REG_GPIO_3_FUNC_SEL_A::ATEST_QP) - } - #[doc = "`1011`"] - #[inline(always)] - pub fn swgpio_3(self) -> &'a mut W { - self.variant(REG_GPIO_3_FUNC_SEL_A::SWGPIO_3) - } - #[doc = "`1110`"] - #[inline(always)] - pub fn e21_tdo(self) -> &'a mut W { - self.variant(REG_GPIO_3_FUNC_SEL_A::E21_TDO) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 24)) | ((value as u32 & 0x0f) << 24); - self.w + pub fn enabled(self) -> &'a mut W { + self.variant(GPIO2INPUT_ENABLED_A::ENABLED) } } -#[doc = "Pull Down Resistor for GPIO3.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_3_PD_A { +#[doc = "Field `reg_gpio_2_smt` reader - Schmitt trigger enabled for GPIO2."] +pub type REG_GPIO_2_SMT_R = crate::BitReader; +#[doc = "Schmitt trigger enabled for GPIO2.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO2SCHMITT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_3_PD_A) -> Self { + fn from(variant: GPIO2SCHMITT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_3_pd` reader - Pull Down Resistor for GPIO3."] -pub struct REG_GPIO_3_PD_R(crate::FieldReader); -impl REG_GPIO_3_PD_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_3_PD_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_2_SMT_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_3_PD_A { + pub fn variant(&self) -> GPIO2SCHMITT_A { match self.bits { - false => REG_GPIO_3_PD_A::DISABLED, - true => REG_GPIO_3_PD_A::ENABLED, + false => GPIO2SCHMITT_A::DISABLED, + true => GPIO2SCHMITT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_3_PD_A::DISABLED + *self == GPIO2SCHMITT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_3_PD_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_3_PD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO2SCHMITT_A::ENABLED } } -#[doc = "Field `reg_gpio_3_pd` writer - Pull Down Resistor for GPIO3."] -pub struct REG_GPIO_3_PD_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_3_PD_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_3_PD_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_2_smt` writer - Schmitt trigger enabled for GPIO2."] +pub type REG_GPIO_2_SMT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL1_SPEC, GPIO2SCHMITT_A, O>; +impl<'a, const O: u8> REG_GPIO_2_SMT_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_3_PD_A::DISABLED) + self.variant(GPIO2SCHMITT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_3_PD_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); - self.w + self.variant(GPIO2SCHMITT_A::ENABLED) } } -#[doc = "Pull Up Resistor for GPIO3.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_3_PU_A { +#[doc = "Field `reg_gpio_2_drv` reader - Driving control enabled for GPIO2."] +pub type REG_GPIO_2_DRV_R = crate::FieldReader; +#[doc = "Driving control enabled for GPIO2.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum GPIO2DRIVING_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_3_PU_A) -> Self { - variant as u8 != 0 + fn from(variant: GPIO2DRIVING_A) -> Self { + variant as _ } } -#[doc = "Field `reg_gpio_3_pu` reader - Pull Up Resistor for GPIO3."] -pub struct REG_GPIO_3_PU_R(crate::FieldReader); -impl REG_GPIO_3_PU_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_3_PU_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_2_DRV_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_3_PU_A { + pub fn variant(&self) -> Option { match self.bits { - false => REG_GPIO_3_PU_A::DISABLED, - true => REG_GPIO_3_PU_A::ENABLED, + 0 => Some(GPIO2DRIVING_A::DISABLED), + 1 => Some(GPIO2DRIVING_A::ENABLED), + _ => None, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_3_PU_A::DISABLED + *self == GPIO2DRIVING_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_3_PU_A::ENABLED + *self == GPIO2DRIVING_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_3_PU_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_3_pu` writer - Pull Up Resistor for GPIO3."] -pub struct REG_GPIO_3_PU_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_3_PU_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_3_PU_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_2_drv` writer - Driving control enabled for GPIO2."] +pub type REG_GPIO_2_DRV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL1_SPEC, u8, GPIO2DRIVING_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_2_DRV_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_3_PU_A::DISABLED) + self.variant(GPIO2DRIVING_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_3_PU_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w + self.variant(GPIO2DRIVING_A::ENABLED) } } -#[doc = "Driving control enabled for GPIO3.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -#[repr(u8)] -pub enum REG_GPIO_3_DRV_A { +#[doc = "Field `reg_gpio_2_pu` reader - Pull Up Resistor for GPIO2."] +pub type REG_GPIO_2_PU_R = crate::BitReader; +#[doc = "Pull Up Resistor for GPIO2.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO2PULL_UP_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for u8 { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_3_DRV_A) -> Self { - variant as _ + fn from(variant: GPIO2PULL_UP_RESISTOR_A) -> Self { + variant as u8 != 0 } } -#[doc = "Field `reg_gpio_3_drv` reader - Driving control enabled for GPIO3."] -pub struct REG_GPIO_3_DRV_R(crate::FieldReader); -impl REG_GPIO_3_DRV_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_3_DRV_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_2_PU_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> GPIO2PULL_UP_RESISTOR_A { match self.bits { - 0 => Some(REG_GPIO_3_DRV_A::DISABLED), - 1 => Some(REG_GPIO_3_DRV_A::ENABLED), - _ => None, + false => GPIO2PULL_UP_RESISTOR_A::DISABLED, + true => GPIO2PULL_UP_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_3_DRV_A::DISABLED + *self == GPIO2PULL_UP_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_3_DRV_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_3_DRV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO2PULL_UP_RESISTOR_A::ENABLED } } -#[doc = "Field `reg_gpio_3_drv` writer - Driving control enabled for GPIO3."] -pub struct REG_GPIO_3_DRV_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_3_DRV_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_3_DRV_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +#[doc = "Field `reg_gpio_2_pu` writer - Pull Up Resistor for GPIO2."] +pub type REG_GPIO_2_PU_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL1_SPEC, GPIO2PULL_UP_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_2_PU_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_3_DRV_A::DISABLED) + self.variant(GPIO2PULL_UP_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_3_DRV_A::ENABLED) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 18)) | ((value as u32 & 0x03) << 18); - self.w + self.variant(GPIO2PULL_UP_RESISTOR_A::ENABLED) } } -#[doc = "Schmitt trigger enabled for GPIO3.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_3_SMT_A { +#[doc = "Field `reg_gpio_2_pd` reader - Pull Down Resistor for GPIO2."] +pub type REG_GPIO_2_PD_R = crate::BitReader; +#[doc = "Pull Down Resistor for GPIO2.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO2PULL_DOWN_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_3_SMT_A) -> Self { + fn from(variant: GPIO2PULL_DOWN_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_3_smt` reader - Schmitt trigger enabled for GPIO3."] -pub struct REG_GPIO_3_SMT_R(crate::FieldReader); -impl REG_GPIO_3_SMT_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_3_SMT_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_2_PD_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_3_SMT_A { + pub fn variant(&self) -> GPIO2PULL_DOWN_RESISTOR_A { match self.bits { - false => REG_GPIO_3_SMT_A::DISABLED, - true => REG_GPIO_3_SMT_A::ENABLED, + false => GPIO2PULL_DOWN_RESISTOR_A::DISABLED, + true => GPIO2PULL_DOWN_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_3_SMT_A::DISABLED + *self == GPIO2PULL_DOWN_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_3_SMT_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_3_SMT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO2PULL_DOWN_RESISTOR_A::ENABLED } } -#[doc = "Field `reg_gpio_3_smt` writer - Schmitt trigger enabled for GPIO3."] -pub struct REG_GPIO_3_SMT_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_3_SMT_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_3_SMT_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_2_pd` writer - Pull Down Resistor for GPIO2."] +pub type REG_GPIO_2_PD_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL1_SPEC, GPIO2PULL_DOWN_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_2_PD_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_3_SMT_A::DISABLED) + self.variant(GPIO2PULL_DOWN_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_3_SMT_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w - } -} -#[doc = "Input enable for GPIO3.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_3_IE_A { - #[doc = "0: `0`"] - DISABLED = 0, - #[doc = "1: `1`"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REG_GPIO_3_IE_A) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `reg_gpio_3_ie` reader - Input enable for GPIO3."] -pub struct REG_GPIO_3_IE_R(crate::FieldReader); -impl REG_GPIO_3_IE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_3_IE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REG_GPIO_3_IE_A { - match self.bits { - false => REG_GPIO_3_IE_A::DISABLED, - true => REG_GPIO_3_IE_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_3_IE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_3_IE_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_3_IE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_3_ie` writer - Input enable for GPIO3."] -pub struct REG_GPIO_3_IE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_3_IE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_3_IE_A) -> &'a mut W { - self.bit(variant.into()) - } - #[doc = "`0`"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_3_IE_A::DISABLED) - } - #[doc = "`1`"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_3_IE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -#[repr(u8)] -pub enum REAL_GPIO_2_FUNC_SEL_A { - #[doc = "0: Function select is reg_gpio_2_func_sel"] - GLB_GPIO_REAL_MODE_REG = 0, - #[doc = "1: `1`"] - GLB_GPIO_REAL_MODE_SDIO = 1, - #[doc = "12: `1100`"] - GLB_GPIO_REAL_MODE_RF = 12, - #[doc = "14: `1110`"] - GLB_GPIO_REAL_MODE_JTAG = 14, - #[doc = "15: `1111`"] - GLB_GPIO_REAL_MODE_CCI = 15, -} -impl From for u8 { - #[inline(always)] - fn from(variant: REAL_GPIO_2_FUNC_SEL_A) -> Self { - variant as _ - } -} -#[doc = "Field `real_gpio_2_func_sel` reader - "] -pub struct REAL_GPIO_2_FUNC_SEL_R(crate::FieldReader); -impl REAL_GPIO_2_FUNC_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - REAL_GPIO_2_FUNC_SEL_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(REAL_GPIO_2_FUNC_SEL_A::GLB_GPIO_REAL_MODE_REG), - 1 => Some(REAL_GPIO_2_FUNC_SEL_A::GLB_GPIO_REAL_MODE_SDIO), - 12 => Some(REAL_GPIO_2_FUNC_SEL_A::GLB_GPIO_REAL_MODE_RF), - 14 => Some(REAL_GPIO_2_FUNC_SEL_A::GLB_GPIO_REAL_MODE_JTAG), - 15 => Some(REAL_GPIO_2_FUNC_SEL_A::GLB_GPIO_REAL_MODE_CCI), - _ => None, - } - } - #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_REG`"] - #[inline(always)] - pub fn is_glb_gpio_real_mode_reg(&self) -> bool { - **self == REAL_GPIO_2_FUNC_SEL_A::GLB_GPIO_REAL_MODE_REG - } - #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_SDIO`"] - #[inline(always)] - pub fn is_glb_gpio_real_mode_sdio(&self) -> bool { - **self == REAL_GPIO_2_FUNC_SEL_A::GLB_GPIO_REAL_MODE_SDIO - } - #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_RF`"] - #[inline(always)] - pub fn is_glb_gpio_real_mode_rf(&self) -> bool { - **self == REAL_GPIO_2_FUNC_SEL_A::GLB_GPIO_REAL_MODE_RF - } - #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_JTAG`"] - #[inline(always)] - pub fn is_glb_gpio_real_mode_jtag(&self) -> bool { - **self == REAL_GPIO_2_FUNC_SEL_A::GLB_GPIO_REAL_MODE_JTAG - } - #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_CCI`"] - #[inline(always)] - pub fn is_glb_gpio_real_mode_cci(&self) -> bool { - **self == REAL_GPIO_2_FUNC_SEL_A::GLB_GPIO_REAL_MODE_CCI - } -} -impl core::ops::Deref for REAL_GPIO_2_FUNC_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + self.variant(GPIO2PULL_DOWN_RESISTOR_A::ENABLED) } } +#[doc = "Field `reg_gpio_2_func_sel` reader - Function select for GPIO2."] +pub type REG_GPIO_2_FUNC_SEL_R = crate::FieldReader; #[doc = "Function select for GPIO2.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_2_FUNC_SEL_A { +pub enum GPIO2FUNCTION_SELECT_A { #[doc = "1: `1`"] SDIO_DAT0 = 1, #[doc = "2: `10`"] @@ -774,701 +318,808 @@ pub enum REG_GPIO_2_FUNC_SEL_A { #[doc = "14: `1110`"] E21_TCK = 14, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_2_FUNC_SEL_A) -> Self { + fn from(variant: GPIO2FUNCTION_SELECT_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_2_func_sel` reader - Function select for GPIO2."] -pub struct REG_GPIO_2_FUNC_SEL_R(crate::FieldReader); impl REG_GPIO_2_FUNC_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_2_FUNC_SEL_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 1 => Some(REG_GPIO_2_FUNC_SEL_A::SDIO_DAT0), - 2 => Some(REG_GPIO_2_FUNC_SEL_A::SF_D3), - 4 => Some(REG_GPIO_2_FUNC_SEL_A::SPI_SS), - 6 => Some(REG_GPIO_2_FUNC_SEL_A::I2C_SCL), - 7 => Some(REG_GPIO_2_FUNC_SEL_A::UART_SIG2), - 8 => Some(REG_GPIO_2_FUNC_SEL_A::PWM_CH2), - 9 => Some(REG_GPIO_2_FUNC_SEL_A::FEM_GPIO_2), - 10 => Some(REG_GPIO_2_FUNC_SEL_A::ATEST_QN), - 11 => Some(REG_GPIO_2_FUNC_SEL_A::SWGPIO_2), - 14 => Some(REG_GPIO_2_FUNC_SEL_A::E21_TCK), + 1 => Some(GPIO2FUNCTION_SELECT_A::SDIO_DAT0), + 2 => Some(GPIO2FUNCTION_SELECT_A::SF_D3), + 4 => Some(GPIO2FUNCTION_SELECT_A::SPI_SS), + 6 => Some(GPIO2FUNCTION_SELECT_A::I2C_SCL), + 7 => Some(GPIO2FUNCTION_SELECT_A::UART_SIG2), + 8 => Some(GPIO2FUNCTION_SELECT_A::PWM_CH2), + 9 => Some(GPIO2FUNCTION_SELECT_A::FEM_GPIO_2), + 10 => Some(GPIO2FUNCTION_SELECT_A::ATEST_QN), + 11 => Some(GPIO2FUNCTION_SELECT_A::SWGPIO_2), + 14 => Some(GPIO2FUNCTION_SELECT_A::E21_TCK), _ => None, } } #[doc = "Checks if the value of the field is `SDIO_DAT0`"] #[inline(always)] pub fn is_sdio_dat0(&self) -> bool { - **self == REG_GPIO_2_FUNC_SEL_A::SDIO_DAT0 + *self == GPIO2FUNCTION_SELECT_A::SDIO_DAT0 } #[doc = "Checks if the value of the field is `SF_D3`"] #[inline(always)] pub fn is_sf_d3(&self) -> bool { - **self == REG_GPIO_2_FUNC_SEL_A::SF_D3 + *self == GPIO2FUNCTION_SELECT_A::SF_D3 } #[doc = "Checks if the value of the field is `SPI_SS`"] #[inline(always)] pub fn is_spi_ss(&self) -> bool { - **self == REG_GPIO_2_FUNC_SEL_A::SPI_SS + *self == GPIO2FUNCTION_SELECT_A::SPI_SS } #[doc = "Checks if the value of the field is `I2C_SCL`"] #[inline(always)] pub fn is_i2c_scl(&self) -> bool { - **self == REG_GPIO_2_FUNC_SEL_A::I2C_SCL + *self == GPIO2FUNCTION_SELECT_A::I2C_SCL } #[doc = "Checks if the value of the field is `UART_SIG2`"] #[inline(always)] pub fn is_uart_sig2(&self) -> bool { - **self == REG_GPIO_2_FUNC_SEL_A::UART_SIG2 + *self == GPIO2FUNCTION_SELECT_A::UART_SIG2 } #[doc = "Checks if the value of the field is `PWM_CH2`"] #[inline(always)] pub fn is_pwm_ch2(&self) -> bool { - **self == REG_GPIO_2_FUNC_SEL_A::PWM_CH2 + *self == GPIO2FUNCTION_SELECT_A::PWM_CH2 } #[doc = "Checks if the value of the field is `FEM_GPIO_2`"] #[inline(always)] pub fn is_fem_gpio_2(&self) -> bool { - **self == REG_GPIO_2_FUNC_SEL_A::FEM_GPIO_2 + *self == GPIO2FUNCTION_SELECT_A::FEM_GPIO_2 } #[doc = "Checks if the value of the field is `ATEST_QN`"] #[inline(always)] pub fn is_atest_qn(&self) -> bool { - **self == REG_GPIO_2_FUNC_SEL_A::ATEST_QN + *self == GPIO2FUNCTION_SELECT_A::ATEST_QN } #[doc = "Checks if the value of the field is `SWGPIO_2`"] #[inline(always)] pub fn is_swgpio_2(&self) -> bool { - **self == REG_GPIO_2_FUNC_SEL_A::SWGPIO_2 + *self == GPIO2FUNCTION_SELECT_A::SWGPIO_2 } #[doc = "Checks if the value of the field is `E21_TCK`"] #[inline(always)] pub fn is_e21_tck(&self) -> bool { - **self == REG_GPIO_2_FUNC_SEL_A::E21_TCK - } -} -impl core::ops::Deref for REG_GPIO_2_FUNC_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO2FUNCTION_SELECT_A::E21_TCK } } #[doc = "Field `reg_gpio_2_func_sel` writer - Function select for GPIO2."] -pub struct REG_GPIO_2_FUNC_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_2_FUNC_SEL_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_2_FUNC_SEL_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +pub type REG_GPIO_2_FUNC_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL1_SPEC, u8, GPIO2FUNCTION_SELECT_A, 4, O>; +impl<'a, const O: u8> REG_GPIO_2_FUNC_SEL_W<'a, O> { #[doc = "`1`"] #[inline(always)] pub fn sdio_dat0(self) -> &'a mut W { - self.variant(REG_GPIO_2_FUNC_SEL_A::SDIO_DAT0) + self.variant(GPIO2FUNCTION_SELECT_A::SDIO_DAT0) } #[doc = "`10`"] #[inline(always)] pub fn sf_d3(self) -> &'a mut W { - self.variant(REG_GPIO_2_FUNC_SEL_A::SF_D3) + self.variant(GPIO2FUNCTION_SELECT_A::SF_D3) } #[doc = "`100`"] #[inline(always)] pub fn spi_ss(self) -> &'a mut W { - self.variant(REG_GPIO_2_FUNC_SEL_A::SPI_SS) + self.variant(GPIO2FUNCTION_SELECT_A::SPI_SS) } #[doc = "`110`"] #[inline(always)] pub fn i2c_scl(self) -> &'a mut W { - self.variant(REG_GPIO_2_FUNC_SEL_A::I2C_SCL) + self.variant(GPIO2FUNCTION_SELECT_A::I2C_SCL) } #[doc = "`111`"] #[inline(always)] pub fn uart_sig2(self) -> &'a mut W { - self.variant(REG_GPIO_2_FUNC_SEL_A::UART_SIG2) + self.variant(GPIO2FUNCTION_SELECT_A::UART_SIG2) } #[doc = "`1000`"] #[inline(always)] pub fn pwm_ch2(self) -> &'a mut W { - self.variant(REG_GPIO_2_FUNC_SEL_A::PWM_CH2) + self.variant(GPIO2FUNCTION_SELECT_A::PWM_CH2) } #[doc = "`1001`"] #[inline(always)] pub fn fem_gpio_2(self) -> &'a mut W { - self.variant(REG_GPIO_2_FUNC_SEL_A::FEM_GPIO_2) + self.variant(GPIO2FUNCTION_SELECT_A::FEM_GPIO_2) } #[doc = "`1010`"] #[inline(always)] pub fn atest_qn(self) -> &'a mut W { - self.variant(REG_GPIO_2_FUNC_SEL_A::ATEST_QN) + self.variant(GPIO2FUNCTION_SELECT_A::ATEST_QN) } #[doc = "`1011`"] #[inline(always)] pub fn swgpio_2(self) -> &'a mut W { - self.variant(REG_GPIO_2_FUNC_SEL_A::SWGPIO_2) + self.variant(GPIO2FUNCTION_SELECT_A::SWGPIO_2) } #[doc = "`1110`"] #[inline(always)] pub fn e21_tck(self) -> &'a mut W { - self.variant(REG_GPIO_2_FUNC_SEL_A::E21_TCK) + self.variant(GPIO2FUNCTION_SELECT_A::E21_TCK) } - #[doc = r"Writes raw bits to the field"] +} +#[doc = "Field `real_gpio_2_func_sel` reader - "] +pub type REAL_GPIO_2_FUNC_SEL_R = crate::FieldReader; +#[doc = "\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum GPIO2REAL_FUNCTION_SELECT_A { + #[doc = "0: Function select is reg_gpio_2_func_sel"] + GLB_GPIO_REAL_MODE_REG = 0, + #[doc = "1: `1`"] + GLB_GPIO_REAL_MODE_SDIO = 1, + #[doc = "12: `1100`"] + GLB_GPIO_REAL_MODE_RF = 12, + #[doc = "14: `1110`"] + GLB_GPIO_REAL_MODE_JTAG = 14, + #[doc = "15: `1111`"] + GLB_GPIO_REAL_MODE_CCI = 15, +} +impl From for u8 { #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 8)) | ((value as u32 & 0x0f) << 8); - self.w + fn from(variant: GPIO2REAL_FUNCTION_SELECT_A) -> Self { + variant as _ } } -#[doc = "Pull Down Resistor for GPIO2.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_2_PD_A { +impl REAL_GPIO_2_FUNC_SEL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(GPIO2REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_REG), + 1 => Some(GPIO2REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_SDIO), + 12 => Some(GPIO2REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_RF), + 14 => Some(GPIO2REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_JTAG), + 15 => Some(GPIO2REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_CCI), + _ => None, + } + } + #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_REG`"] + #[inline(always)] + pub fn is_glb_gpio_real_mode_reg(&self) -> bool { + *self == GPIO2REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_REG + } + #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_SDIO`"] + #[inline(always)] + pub fn is_glb_gpio_real_mode_sdio(&self) -> bool { + *self == GPIO2REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_SDIO + } + #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_RF`"] + #[inline(always)] + pub fn is_glb_gpio_real_mode_rf(&self) -> bool { + *self == GPIO2REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_RF + } + #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_JTAG`"] + #[inline(always)] + pub fn is_glb_gpio_real_mode_jtag(&self) -> bool { + *self == GPIO2REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_JTAG + } + #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_CCI`"] + #[inline(always)] + pub fn is_glb_gpio_real_mode_cci(&self) -> bool { + *self == GPIO2REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_CCI + } +} +#[doc = "Field `reg_gpio_3_ie` reader - Input enable for GPIO3."] +pub type REG_GPIO_3_IE_R = crate::BitReader; +#[doc = "Input enable for GPIO3.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO3INPUT_ENABLED_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_2_PD_A) -> Self { + fn from(variant: GPIO3INPUT_ENABLED_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_2_pd` reader - Pull Down Resistor for GPIO2."] -pub struct REG_GPIO_2_PD_R(crate::FieldReader); -impl REG_GPIO_2_PD_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_2_PD_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_3_IE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_2_PD_A { + pub fn variant(&self) -> GPIO3INPUT_ENABLED_A { match self.bits { - false => REG_GPIO_2_PD_A::DISABLED, - true => REG_GPIO_2_PD_A::ENABLED, + false => GPIO3INPUT_ENABLED_A::DISABLED, + true => GPIO3INPUT_ENABLED_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_2_PD_A::DISABLED + *self == GPIO3INPUT_ENABLED_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_2_PD_A::ENABLED + *self == GPIO3INPUT_ENABLED_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_2_PD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_2_pd` writer - Pull Down Resistor for GPIO2."] -pub struct REG_GPIO_2_PD_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_2_PD_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_2_PD_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_3_ie` writer - Input enable for GPIO3."] +pub type REG_GPIO_3_IE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL1_SPEC, GPIO3INPUT_ENABLED_A, O>; +impl<'a, const O: u8> REG_GPIO_3_IE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_2_PD_A::DISABLED) + self.variant(GPIO3INPUT_ENABLED_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_2_PD_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w + self.variant(GPIO3INPUT_ENABLED_A::ENABLED) } } -#[doc = "Pull Up Resistor for GPIO2.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_2_PU_A { +#[doc = "Field `reg_gpio_3_smt` reader - Schmitt trigger enabled for GPIO3."] +pub type REG_GPIO_3_SMT_R = crate::BitReader; +#[doc = "Schmitt trigger enabled for GPIO3.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO3SCHMITT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_2_PU_A) -> Self { + fn from(variant: GPIO3SCHMITT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_2_pu` reader - Pull Up Resistor for GPIO2."] -pub struct REG_GPIO_2_PU_R(crate::FieldReader); -impl REG_GPIO_2_PU_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_2_PU_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_3_SMT_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_2_PU_A { + pub fn variant(&self) -> GPIO3SCHMITT_A { match self.bits { - false => REG_GPIO_2_PU_A::DISABLED, - true => REG_GPIO_2_PU_A::ENABLED, + false => GPIO3SCHMITT_A::DISABLED, + true => GPIO3SCHMITT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_2_PU_A::DISABLED + *self == GPIO3SCHMITT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_2_PU_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_2_PU_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO3SCHMITT_A::ENABLED } } -#[doc = "Field `reg_gpio_2_pu` writer - Pull Up Resistor for GPIO2."] -pub struct REG_GPIO_2_PU_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_2_PU_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_2_PU_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_3_smt` writer - Schmitt trigger enabled for GPIO3."] +pub type REG_GPIO_3_SMT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL1_SPEC, GPIO3SCHMITT_A, O>; +impl<'a, const O: u8> REG_GPIO_3_SMT_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_2_PU_A::DISABLED) + self.variant(GPIO3SCHMITT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_2_PU_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w + self.variant(GPIO3SCHMITT_A::ENABLED) } } -#[doc = "Driving control enabled for GPIO2.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[doc = "Field `reg_gpio_3_drv` reader - Driving control enabled for GPIO3."] +pub type REG_GPIO_3_DRV_R = crate::FieldReader; +#[doc = "Driving control enabled for GPIO3.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_2_DRV_A { +pub enum GPIO3DRIVING_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_2_DRV_A) -> Self { + fn from(variant: GPIO3DRIVING_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_2_drv` reader - Driving control enabled for GPIO2."] -pub struct REG_GPIO_2_DRV_R(crate::FieldReader); -impl REG_GPIO_2_DRV_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_2_DRV_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_3_DRV_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 0 => Some(REG_GPIO_2_DRV_A::DISABLED), - 1 => Some(REG_GPIO_2_DRV_A::ENABLED), + 0 => Some(GPIO3DRIVING_A::DISABLED), + 1 => Some(GPIO3DRIVING_A::ENABLED), _ => None, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_2_DRV_A::DISABLED + *self == GPIO3DRIVING_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_2_DRV_A::ENABLED + *self == GPIO3DRIVING_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_2_DRV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_2_drv` writer - Driving control enabled for GPIO2."] -pub struct REG_GPIO_2_DRV_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_2_DRV_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_2_DRV_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +#[doc = "Field `reg_gpio_3_drv` writer - Driving control enabled for GPIO3."] +pub type REG_GPIO_3_DRV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL1_SPEC, u8, GPIO3DRIVING_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_3_DRV_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_2_DRV_A::DISABLED) + self.variant(GPIO3DRIVING_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_2_DRV_A::ENABLED) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 2)) | ((value as u32 & 0x03) << 2); - self.w + self.variant(GPIO3DRIVING_A::ENABLED) } } -#[doc = "Schmitt trigger enabled for GPIO2.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_2_SMT_A { +#[doc = "Field `reg_gpio_3_pu` reader - Pull Up Resistor for GPIO3."] +pub type REG_GPIO_3_PU_R = crate::BitReader; +#[doc = "Pull Up Resistor for GPIO3.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO3PULL_UP_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_2_SMT_A) -> Self { + fn from(variant: GPIO3PULL_UP_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_2_smt` reader - Schmitt trigger enabled for GPIO2."] -pub struct REG_GPIO_2_SMT_R(crate::FieldReader); -impl REG_GPIO_2_SMT_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_2_SMT_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_3_PU_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_2_SMT_A { + pub fn variant(&self) -> GPIO3PULL_UP_RESISTOR_A { match self.bits { - false => REG_GPIO_2_SMT_A::DISABLED, - true => REG_GPIO_2_SMT_A::ENABLED, + false => GPIO3PULL_UP_RESISTOR_A::DISABLED, + true => GPIO3PULL_UP_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_2_SMT_A::DISABLED + *self == GPIO3PULL_UP_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_2_SMT_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_2_SMT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO3PULL_UP_RESISTOR_A::ENABLED } } -#[doc = "Field `reg_gpio_2_smt` writer - Schmitt trigger enabled for GPIO2."] -pub struct REG_GPIO_2_SMT_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_2_SMT_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_2_SMT_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_3_pu` writer - Pull Up Resistor for GPIO3."] +pub type REG_GPIO_3_PU_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL1_SPEC, GPIO3PULL_UP_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_3_PU_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_2_SMT_A::DISABLED) + self.variant(GPIO3PULL_UP_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_2_SMT_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w + self.variant(GPIO3PULL_UP_RESISTOR_A::ENABLED) } } -#[doc = "Input enable for GPIO2.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_2_IE_A { +#[doc = "Field `reg_gpio_3_pd` reader - Pull Down Resistor for GPIO3."] +pub type REG_GPIO_3_PD_R = crate::BitReader; +#[doc = "Pull Down Resistor for GPIO3.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO3PULL_DOWN_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_2_IE_A) -> Self { + fn from(variant: GPIO3PULL_DOWN_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_2_ie` reader - Input enable for GPIO2."] -pub struct REG_GPIO_2_IE_R(crate::FieldReader); -impl REG_GPIO_2_IE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_2_IE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_3_PD_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_2_IE_A { + pub fn variant(&self) -> GPIO3PULL_DOWN_RESISTOR_A { match self.bits { - false => REG_GPIO_2_IE_A::DISABLED, - true => REG_GPIO_2_IE_A::ENABLED, + false => GPIO3PULL_DOWN_RESISTOR_A::DISABLED, + true => GPIO3PULL_DOWN_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_2_IE_A::DISABLED + *self == GPIO3PULL_DOWN_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_2_IE_A::ENABLED + *self == GPIO3PULL_DOWN_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_2_IE_R { - type Target = crate::FieldReader; +#[doc = "Field `reg_gpio_3_pd` writer - Pull Down Resistor for GPIO3."] +pub type REG_GPIO_3_PD_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL1_SPEC, GPIO3PULL_DOWN_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_3_PD_W<'a, O> { + #[doc = "`0`"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn disabled(self) -> &'a mut W { + self.variant(GPIO3PULL_DOWN_RESISTOR_A::DISABLED) + } + #[doc = "`1`"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(GPIO3PULL_DOWN_RESISTOR_A::ENABLED) } } -#[doc = "Field `reg_gpio_2_ie` writer - Input enable for GPIO2."] -pub struct REG_GPIO_2_IE_W<'a> { - w: &'a mut W, +#[doc = "Field `reg_gpio_3_func_sel` reader - Function select for GPIO3."] +pub type REG_GPIO_3_FUNC_SEL_R = crate::FieldReader; +#[doc = "Function select for GPIO3.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum GPIO3FUNCTION_SELECT_A { + #[doc = "1: `1`"] + SDIO_DAT1 = 1, + #[doc = "4: `100`"] + SPI_SCLK = 4, + #[doc = "6: `110`"] + I2C_SDA = 6, + #[doc = "7: `111`"] + UART_SIG3 = 7, + #[doc = "8: `1000`"] + PWM_CH3 = 8, + #[doc = "9: `1001`"] + FEM_GPIO_3 = 9, + #[doc = "10: `1010`"] + ATEST_QP = 10, + #[doc = "11: `1011`"] + SWGPIO_3 = 11, + #[doc = "14: `1110`"] + E21_TDO = 14, } -impl<'a> REG_GPIO_2_IE_W<'a> { - #[doc = r"Writes `variant` to the field"] +impl From for u8 { #[inline(always)] - pub fn variant(self, variant: REG_GPIO_2_IE_A) -> &'a mut W { - self.bit(variant.into()) + fn from(variant: GPIO3FUNCTION_SELECT_A) -> Self { + variant as _ } - #[doc = "`0`"] +} +impl REG_GPIO_3_FUNC_SEL_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_2_IE_A::DISABLED) + pub fn variant(&self) -> Option { + match self.bits { + 1 => Some(GPIO3FUNCTION_SELECT_A::SDIO_DAT1), + 4 => Some(GPIO3FUNCTION_SELECT_A::SPI_SCLK), + 6 => Some(GPIO3FUNCTION_SELECT_A::I2C_SDA), + 7 => Some(GPIO3FUNCTION_SELECT_A::UART_SIG3), + 8 => Some(GPIO3FUNCTION_SELECT_A::PWM_CH3), + 9 => Some(GPIO3FUNCTION_SELECT_A::FEM_GPIO_3), + 10 => Some(GPIO3FUNCTION_SELECT_A::ATEST_QP), + 11 => Some(GPIO3FUNCTION_SELECT_A::SWGPIO_3), + 14 => Some(GPIO3FUNCTION_SELECT_A::E21_TDO), + _ => None, + } + } + #[doc = "Checks if the value of the field is `SDIO_DAT1`"] + #[inline(always)] + pub fn is_sdio_dat1(&self) -> bool { + *self == GPIO3FUNCTION_SELECT_A::SDIO_DAT1 } + #[doc = "Checks if the value of the field is `SPI_SCLK`"] + #[inline(always)] + pub fn is_spi_sclk(&self) -> bool { + *self == GPIO3FUNCTION_SELECT_A::SPI_SCLK + } + #[doc = "Checks if the value of the field is `I2C_SDA`"] + #[inline(always)] + pub fn is_i2c_sda(&self) -> bool { + *self == GPIO3FUNCTION_SELECT_A::I2C_SDA + } + #[doc = "Checks if the value of the field is `UART_SIG3`"] + #[inline(always)] + pub fn is_uart_sig3(&self) -> bool { + *self == GPIO3FUNCTION_SELECT_A::UART_SIG3 + } + #[doc = "Checks if the value of the field is `PWM_CH3`"] + #[inline(always)] + pub fn is_pwm_ch3(&self) -> bool { + *self == GPIO3FUNCTION_SELECT_A::PWM_CH3 + } + #[doc = "Checks if the value of the field is `FEM_GPIO_3`"] + #[inline(always)] + pub fn is_fem_gpio_3(&self) -> bool { + *self == GPIO3FUNCTION_SELECT_A::FEM_GPIO_3 + } + #[doc = "Checks if the value of the field is `ATEST_QP`"] + #[inline(always)] + pub fn is_atest_qp(&self) -> bool { + *self == GPIO3FUNCTION_SELECT_A::ATEST_QP + } + #[doc = "Checks if the value of the field is `SWGPIO_3`"] + #[inline(always)] + pub fn is_swgpio_3(&self) -> bool { + *self == GPIO3FUNCTION_SELECT_A::SWGPIO_3 + } + #[doc = "Checks if the value of the field is `E21_TDO`"] + #[inline(always)] + pub fn is_e21_tdo(&self) -> bool { + *self == GPIO3FUNCTION_SELECT_A::E21_TDO + } +} +#[doc = "Field `reg_gpio_3_func_sel` writer - Function select for GPIO3."] +pub type REG_GPIO_3_FUNC_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL1_SPEC, u8, GPIO3FUNCTION_SELECT_A, 4, O>; +impl<'a, const O: u8> REG_GPIO_3_FUNC_SEL_W<'a, O> { #[doc = "`1`"] #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_2_IE_A::ENABLED) + pub fn sdio_dat1(self) -> &'a mut W { + self.variant(GPIO3FUNCTION_SELECT_A::SDIO_DAT1) } - #[doc = r"Sets the field bit"] + #[doc = "`100`"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn spi_sclk(self) -> &'a mut W { + self.variant(GPIO3FUNCTION_SELECT_A::SPI_SCLK) } - #[doc = r"Clears the field bit"] + #[doc = "`110`"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn i2c_sda(self) -> &'a mut W { + self.variant(GPIO3FUNCTION_SELECT_A::I2C_SDA) } - #[doc = r"Writes raw bits to the field"] + #[doc = "`111`"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn uart_sig3(self) -> &'a mut W { + self.variant(GPIO3FUNCTION_SELECT_A::UART_SIG3) + } + #[doc = "`1000`"] + #[inline(always)] + pub fn pwm_ch3(self) -> &'a mut W { + self.variant(GPIO3FUNCTION_SELECT_A::PWM_CH3) + } + #[doc = "`1001`"] + #[inline(always)] + pub fn fem_gpio_3(self) -> &'a mut W { + self.variant(GPIO3FUNCTION_SELECT_A::FEM_GPIO_3) + } + #[doc = "`1010`"] + #[inline(always)] + pub fn atest_qp(self) -> &'a mut W { + self.variant(GPIO3FUNCTION_SELECT_A::ATEST_QP) + } + #[doc = "`1011`"] + #[inline(always)] + pub fn swgpio_3(self) -> &'a mut W { + self.variant(GPIO3FUNCTION_SELECT_A::SWGPIO_3) + } + #[doc = "`1110`"] + #[inline(always)] + pub fn e21_tdo(self) -> &'a mut W { + self.variant(GPIO3FUNCTION_SELECT_A::E21_TDO) } } -impl R { - #[doc = "Bits 28:31"] +#[doc = "Field `real_gpio_3_func_sel` reader - "] +pub type REAL_GPIO_3_FUNC_SEL_R = crate::FieldReader; +#[doc = "\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum GPIO3REAL_FUNCTION_SELECT_A { + #[doc = "0: Function select is reg_gpio_3_func_sel"] + GLB_GPIO_REAL_MODE_REG = 0, + #[doc = "1: `1`"] + GLB_GPIO_REAL_MODE_SDIO = 1, + #[doc = "12: `1100`"] + GLB_GPIO_REAL_MODE_RF = 12, + #[doc = "14: `1110`"] + GLB_GPIO_REAL_MODE_JTAG = 14, + #[doc = "15: `1111`"] + GLB_GPIO_REAL_MODE_CCI = 15, +} +impl From for u8 { #[inline(always)] - pub fn real_gpio_3_func_sel(&self) -> REAL_GPIO_3_FUNC_SEL_R { - REAL_GPIO_3_FUNC_SEL_R::new(((self.bits >> 28) & 0x0f) as u8) + fn from(variant: GPIO3REAL_FUNCTION_SELECT_A) -> Self { + variant as _ } - #[doc = "Bits 24:27 - Function select for GPIO3."] +} +impl REAL_GPIO_3_FUNC_SEL_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn reg_gpio_3_func_sel(&self) -> REG_GPIO_3_FUNC_SEL_R { - REG_GPIO_3_FUNC_SEL_R::new(((self.bits >> 24) & 0x0f) as u8) + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(GPIO3REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_REG), + 1 => Some(GPIO3REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_SDIO), + 12 => Some(GPIO3REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_RF), + 14 => Some(GPIO3REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_JTAG), + 15 => Some(GPIO3REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_CCI), + _ => None, + } } - #[doc = "Bit 21 - Pull Down Resistor for GPIO3."] + #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_REG`"] #[inline(always)] - pub fn reg_gpio_3_pd(&self) -> REG_GPIO_3_PD_R { - REG_GPIO_3_PD_R::new(((self.bits >> 21) & 0x01) != 0) + pub fn is_glb_gpio_real_mode_reg(&self) -> bool { + *self == GPIO3REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_REG } - #[doc = "Bit 20 - Pull Up Resistor for GPIO3."] + #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_SDIO`"] #[inline(always)] - pub fn reg_gpio_3_pu(&self) -> REG_GPIO_3_PU_R { - REG_GPIO_3_PU_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn is_glb_gpio_real_mode_sdio(&self) -> bool { + *self == GPIO3REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_SDIO } - #[doc = "Bits 18:19 - Driving control enabled for GPIO3."] + #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_RF`"] #[inline(always)] - pub fn reg_gpio_3_drv(&self) -> REG_GPIO_3_DRV_R { - REG_GPIO_3_DRV_R::new(((self.bits >> 18) & 0x03) as u8) + pub fn is_glb_gpio_real_mode_rf(&self) -> bool { + *self == GPIO3REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_RF } - #[doc = "Bit 17 - Schmitt trigger enabled for GPIO3."] + #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_JTAG`"] #[inline(always)] - pub fn reg_gpio_3_smt(&self) -> REG_GPIO_3_SMT_R { - REG_GPIO_3_SMT_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn is_glb_gpio_real_mode_jtag(&self) -> bool { + *self == GPIO3REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_JTAG } - #[doc = "Bit 16 - Input enable for GPIO3."] + #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_CCI`"] #[inline(always)] - pub fn reg_gpio_3_ie(&self) -> REG_GPIO_3_IE_R { - REG_GPIO_3_IE_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn is_glb_gpio_real_mode_cci(&self) -> bool { + *self == GPIO3REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_CCI } - #[doc = "Bits 12:15"] +} +impl R { + #[doc = "Bit 0 - Input enable for GPIO2."] #[inline(always)] - pub fn real_gpio_2_func_sel(&self) -> REAL_GPIO_2_FUNC_SEL_R { - REAL_GPIO_2_FUNC_SEL_R::new(((self.bits >> 12) & 0x0f) as u8) + pub fn reg_gpio_2_ie(&self) -> REG_GPIO_2_IE_R { + REG_GPIO_2_IE_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Schmitt trigger enabled for GPIO2."] + #[inline(always)] + pub fn reg_gpio_2_smt(&self) -> REG_GPIO_2_SMT_R { + REG_GPIO_2_SMT_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bits 2:3 - Driving control enabled for GPIO2."] + #[inline(always)] + pub fn reg_gpio_2_drv(&self) -> REG_GPIO_2_DRV_R { + REG_GPIO_2_DRV_R::new(((self.bits >> 2) & 3) as u8) + } + #[doc = "Bit 4 - Pull Up Resistor for GPIO2."] + #[inline(always)] + pub fn reg_gpio_2_pu(&self) -> REG_GPIO_2_PU_R { + REG_GPIO_2_PU_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Pull Down Resistor for GPIO2."] + #[inline(always)] + pub fn reg_gpio_2_pd(&self) -> REG_GPIO_2_PD_R { + REG_GPIO_2_PD_R::new(((self.bits >> 5) & 1) != 0) } #[doc = "Bits 8:11 - Function select for GPIO2."] #[inline(always)] pub fn reg_gpio_2_func_sel(&self) -> REG_GPIO_2_FUNC_SEL_R { REG_GPIO_2_FUNC_SEL_R::new(((self.bits >> 8) & 0x0f) as u8) } - #[doc = "Bit 5 - Pull Down Resistor for GPIO2."] + #[doc = "Bits 12:15"] #[inline(always)] - pub fn reg_gpio_2_pd(&self) -> REG_GPIO_2_PD_R { - REG_GPIO_2_PD_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn real_gpio_2_func_sel(&self) -> REAL_GPIO_2_FUNC_SEL_R { + REAL_GPIO_2_FUNC_SEL_R::new(((self.bits >> 12) & 0x0f) as u8) } - #[doc = "Bit 4 - Pull Up Resistor for GPIO2."] + #[doc = "Bit 16 - Input enable for GPIO3."] #[inline(always)] - pub fn reg_gpio_2_pu(&self) -> REG_GPIO_2_PU_R { - REG_GPIO_2_PU_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn reg_gpio_3_ie(&self) -> REG_GPIO_3_IE_R { + REG_GPIO_3_IE_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bits 2:3 - Driving control enabled for GPIO2."] + #[doc = "Bit 17 - Schmitt trigger enabled for GPIO3."] #[inline(always)] - pub fn reg_gpio_2_drv(&self) -> REG_GPIO_2_DRV_R { - REG_GPIO_2_DRV_R::new(((self.bits >> 2) & 0x03) as u8) + pub fn reg_gpio_3_smt(&self) -> REG_GPIO_3_SMT_R { + REG_GPIO_3_SMT_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bit 1 - Schmitt trigger enabled for GPIO2."] + #[doc = "Bits 18:19 - Driving control enabled for GPIO3."] #[inline(always)] - pub fn reg_gpio_2_smt(&self) -> REG_GPIO_2_SMT_R { - REG_GPIO_2_SMT_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn reg_gpio_3_drv(&self) -> REG_GPIO_3_DRV_R { + REG_GPIO_3_DRV_R::new(((self.bits >> 18) & 3) as u8) } - #[doc = "Bit 0 - Input enable for GPIO2."] + #[doc = "Bit 20 - Pull Up Resistor for GPIO3."] #[inline(always)] - pub fn reg_gpio_2_ie(&self) -> REG_GPIO_2_IE_R { - REG_GPIO_2_IE_R::new((self.bits & 0x01) != 0) + pub fn reg_gpio_3_pu(&self) -> REG_GPIO_3_PU_R { + REG_GPIO_3_PU_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 21 - Pull Down Resistor for GPIO3."] + #[inline(always)] + pub fn reg_gpio_3_pd(&self) -> REG_GPIO_3_PD_R { + REG_GPIO_3_PD_R::new(((self.bits >> 21) & 1) != 0) } -} -impl W { #[doc = "Bits 24:27 - Function select for GPIO3."] #[inline(always)] - pub fn reg_gpio_3_func_sel(&mut self) -> REG_GPIO_3_FUNC_SEL_W { - REG_GPIO_3_FUNC_SEL_W { w: self } + pub fn reg_gpio_3_func_sel(&self) -> REG_GPIO_3_FUNC_SEL_R { + REG_GPIO_3_FUNC_SEL_R::new(((self.bits >> 24) & 0x0f) as u8) } - #[doc = "Bit 21 - Pull Down Resistor for GPIO3."] + #[doc = "Bits 28:31"] #[inline(always)] - pub fn reg_gpio_3_pd(&mut self) -> REG_GPIO_3_PD_W { - REG_GPIO_3_PD_W { w: self } + pub fn real_gpio_3_func_sel(&self) -> REAL_GPIO_3_FUNC_SEL_R { + REAL_GPIO_3_FUNC_SEL_R::new(((self.bits >> 28) & 0x0f) as u8) } - #[doc = "Bit 20 - Pull Up Resistor for GPIO3."] +} +impl W { + #[doc = "Bit 0 - Input enable for GPIO2."] #[inline(always)] - pub fn reg_gpio_3_pu(&mut self) -> REG_GPIO_3_PU_W { - REG_GPIO_3_PU_W { w: self } + #[must_use] + pub fn reg_gpio_2_ie(&mut self) -> REG_GPIO_2_IE_W<0> { + REG_GPIO_2_IE_W::new(self) } - #[doc = "Bits 18:19 - Driving control enabled for GPIO3."] + #[doc = "Bit 1 - Schmitt trigger enabled for GPIO2."] #[inline(always)] - pub fn reg_gpio_3_drv(&mut self) -> REG_GPIO_3_DRV_W { - REG_GPIO_3_DRV_W { w: self } + #[must_use] + pub fn reg_gpio_2_smt(&mut self) -> REG_GPIO_2_SMT_W<1> { + REG_GPIO_2_SMT_W::new(self) } - #[doc = "Bit 17 - Schmitt trigger enabled for GPIO3."] + #[doc = "Bits 2:3 - Driving control enabled for GPIO2."] #[inline(always)] - pub fn reg_gpio_3_smt(&mut self) -> REG_GPIO_3_SMT_W { - REG_GPIO_3_SMT_W { w: self } + #[must_use] + pub fn reg_gpio_2_drv(&mut self) -> REG_GPIO_2_DRV_W<2> { + REG_GPIO_2_DRV_W::new(self) } - #[doc = "Bit 16 - Input enable for GPIO3."] + #[doc = "Bit 4 - Pull Up Resistor for GPIO2."] #[inline(always)] - pub fn reg_gpio_3_ie(&mut self) -> REG_GPIO_3_IE_W { - REG_GPIO_3_IE_W { w: self } + #[must_use] + pub fn reg_gpio_2_pu(&mut self) -> REG_GPIO_2_PU_W<4> { + REG_GPIO_2_PU_W::new(self) + } + #[doc = "Bit 5 - Pull Down Resistor for GPIO2."] + #[inline(always)] + #[must_use] + pub fn reg_gpio_2_pd(&mut self) -> REG_GPIO_2_PD_W<5> { + REG_GPIO_2_PD_W::new(self) } #[doc = "Bits 8:11 - Function select for GPIO2."] #[inline(always)] - pub fn reg_gpio_2_func_sel(&mut self) -> REG_GPIO_2_FUNC_SEL_W { - REG_GPIO_2_FUNC_SEL_W { w: self } + #[must_use] + pub fn reg_gpio_2_func_sel(&mut self) -> REG_GPIO_2_FUNC_SEL_W<8> { + REG_GPIO_2_FUNC_SEL_W::new(self) } - #[doc = "Bit 5 - Pull Down Resistor for GPIO2."] + #[doc = "Bit 16 - Input enable for GPIO3."] #[inline(always)] - pub fn reg_gpio_2_pd(&mut self) -> REG_GPIO_2_PD_W { - REG_GPIO_2_PD_W { w: self } + #[must_use] + pub fn reg_gpio_3_ie(&mut self) -> REG_GPIO_3_IE_W<16> { + REG_GPIO_3_IE_W::new(self) } - #[doc = "Bit 4 - Pull Up Resistor for GPIO2."] + #[doc = "Bit 17 - Schmitt trigger enabled for GPIO3."] #[inline(always)] - pub fn reg_gpio_2_pu(&mut self) -> REG_GPIO_2_PU_W { - REG_GPIO_2_PU_W { w: self } + #[must_use] + pub fn reg_gpio_3_smt(&mut self) -> REG_GPIO_3_SMT_W<17> { + REG_GPIO_3_SMT_W::new(self) } - #[doc = "Bits 2:3 - Driving control enabled for GPIO2."] + #[doc = "Bits 18:19 - Driving control enabled for GPIO3."] #[inline(always)] - pub fn reg_gpio_2_drv(&mut self) -> REG_GPIO_2_DRV_W { - REG_GPIO_2_DRV_W { w: self } + #[must_use] + pub fn reg_gpio_3_drv(&mut self) -> REG_GPIO_3_DRV_W<18> { + REG_GPIO_3_DRV_W::new(self) } - #[doc = "Bit 1 - Schmitt trigger enabled for GPIO2."] + #[doc = "Bit 20 - Pull Up Resistor for GPIO3."] #[inline(always)] - pub fn reg_gpio_2_smt(&mut self) -> REG_GPIO_2_SMT_W { - REG_GPIO_2_SMT_W { w: self } + #[must_use] + pub fn reg_gpio_3_pu(&mut self) -> REG_GPIO_3_PU_W<20> { + REG_GPIO_3_PU_W::new(self) } - #[doc = "Bit 0 - Input enable for GPIO2."] + #[doc = "Bit 21 - Pull Down Resistor for GPIO3."] + #[inline(always)] + #[must_use] + pub fn reg_gpio_3_pd(&mut self) -> REG_GPIO_3_PD_W<21> { + REG_GPIO_3_PD_W::new(self) + } + #[doc = "Bits 24:27 - Function select for GPIO3."] #[inline(always)] - pub fn reg_gpio_2_ie(&mut self) -> REG_GPIO_2_IE_W { - REG_GPIO_2_IE_W { w: self } + #[must_use] + pub fn reg_gpio_3_func_sel(&mut self) -> REG_GPIO_3_FUNC_SEL_W<24> { + REG_GPIO_3_FUNC_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -1486,11 +1137,10 @@ impl crate::Readable for GPIO_CFGCTL1_SPEC { #[doc = "`write(|w| ..)` method takes [gpio_cfgctl1::W](W) writer structure"] impl crate::Writable for GPIO_CFGCTL1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets GPIO_CFGCTL1 to value 0x1103_1103"] impl crate::Resettable for GPIO_CFGCTL1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x1103_1103 - } + const RESET_VALUE: Self::Ux = 0x1103_1103; } diff --git a/src/glb/gpio_cfgctl10.rs b/src/glb/gpio_cfgctl10.rs index 9632339..1444ce3 100644 --- a/src/glb/gpio_cfgctl10.rs +++ b/src/glb/gpio_cfgctl10.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,575 +28,275 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Function select for GPIO21.\n\nValue on reset: 11"] -#[derive(Clone, Copy, Debug, PartialEq)] -#[repr(u8)] -pub enum REG_GPIO_21_FUNC_SEL_A { - #[doc = "2: `10`"] - SF_CS = 2, - #[doc = "4: `100`"] - SPI_MOSI_SPI_MISO = 4, - #[doc = "6: `110`"] - I2C_SDA = 6, - #[doc = "7: `111`"] - UART_SIG5 = 7, - #[doc = "8: `1000`"] - PWM_CH1 = 8, - #[doc = "9: `1001`"] - FEM_GPIO_1 = 9, - #[doc = "11: `1011`"] - SWGPIO_21 = 11, - #[doc = "14: `1110`"] - E21_TDI = 14, -} -impl From for u8 { - #[inline(always)] - fn from(variant: REG_GPIO_21_FUNC_SEL_A) -> Self { - variant as _ - } -} -#[doc = "Field `reg_gpio_21_func_sel` reader - Function select for GPIO21."] -pub struct REG_GPIO_21_FUNC_SEL_R(crate::FieldReader); -impl REG_GPIO_21_FUNC_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_21_FUNC_SEL_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 2 => Some(REG_GPIO_21_FUNC_SEL_A::SF_CS), - 4 => Some(REG_GPIO_21_FUNC_SEL_A::SPI_MOSI_SPI_MISO), - 6 => Some(REG_GPIO_21_FUNC_SEL_A::I2C_SDA), - 7 => Some(REG_GPIO_21_FUNC_SEL_A::UART_SIG5), - 8 => Some(REG_GPIO_21_FUNC_SEL_A::PWM_CH1), - 9 => Some(REG_GPIO_21_FUNC_SEL_A::FEM_GPIO_1), - 11 => Some(REG_GPIO_21_FUNC_SEL_A::SWGPIO_21), - 14 => Some(REG_GPIO_21_FUNC_SEL_A::E21_TDI), - _ => None, - } - } - #[doc = "Checks if the value of the field is `SF_CS`"] - #[inline(always)] - pub fn is_sf_cs(&self) -> bool { - **self == REG_GPIO_21_FUNC_SEL_A::SF_CS - } - #[doc = "Checks if the value of the field is `SPI_MOSI_SPI_MISO`"] - #[inline(always)] - pub fn is_spi_mosi_spi_miso(&self) -> bool { - **self == REG_GPIO_21_FUNC_SEL_A::SPI_MOSI_SPI_MISO - } - #[doc = "Checks if the value of the field is `I2C_SDA`"] - #[inline(always)] - pub fn is_i2c_sda(&self) -> bool { - **self == REG_GPIO_21_FUNC_SEL_A::I2C_SDA - } - #[doc = "Checks if the value of the field is `UART_SIG5`"] - #[inline(always)] - pub fn is_uart_sig5(&self) -> bool { - **self == REG_GPIO_21_FUNC_SEL_A::UART_SIG5 - } - #[doc = "Checks if the value of the field is `PWM_CH1`"] - #[inline(always)] - pub fn is_pwm_ch1(&self) -> bool { - **self == REG_GPIO_21_FUNC_SEL_A::PWM_CH1 - } - #[doc = "Checks if the value of the field is `FEM_GPIO_1`"] - #[inline(always)] - pub fn is_fem_gpio_1(&self) -> bool { - **self == REG_GPIO_21_FUNC_SEL_A::FEM_GPIO_1 - } - #[doc = "Checks if the value of the field is `SWGPIO_21`"] - #[inline(always)] - pub fn is_swgpio_21(&self) -> bool { - **self == REG_GPIO_21_FUNC_SEL_A::SWGPIO_21 - } - #[doc = "Checks if the value of the field is `E21_TDI`"] - #[inline(always)] - pub fn is_e21_tdi(&self) -> bool { - **self == REG_GPIO_21_FUNC_SEL_A::E21_TDI - } -} -impl core::ops::Deref for REG_GPIO_21_FUNC_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_21_func_sel` writer - Function select for GPIO21."] -pub struct REG_GPIO_21_FUNC_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_21_FUNC_SEL_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_21_FUNC_SEL_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } - #[doc = "`10`"] - #[inline(always)] - pub fn sf_cs(self) -> &'a mut W { - self.variant(REG_GPIO_21_FUNC_SEL_A::SF_CS) - } - #[doc = "`100`"] - #[inline(always)] - pub fn spi_mosi_spi_miso(self) -> &'a mut W { - self.variant(REG_GPIO_21_FUNC_SEL_A::SPI_MOSI_SPI_MISO) - } - #[doc = "`110`"] - #[inline(always)] - pub fn i2c_sda(self) -> &'a mut W { - self.variant(REG_GPIO_21_FUNC_SEL_A::I2C_SDA) - } - #[doc = "`111`"] - #[inline(always)] - pub fn uart_sig5(self) -> &'a mut W { - self.variant(REG_GPIO_21_FUNC_SEL_A::UART_SIG5) - } - #[doc = "`1000`"] - #[inline(always)] - pub fn pwm_ch1(self) -> &'a mut W { - self.variant(REG_GPIO_21_FUNC_SEL_A::PWM_CH1) - } - #[doc = "`1001`"] - #[inline(always)] - pub fn fem_gpio_1(self) -> &'a mut W { - self.variant(REG_GPIO_21_FUNC_SEL_A::FEM_GPIO_1) - } - #[doc = "`1011`"] - #[inline(always)] - pub fn swgpio_21(self) -> &'a mut W { - self.variant(REG_GPIO_21_FUNC_SEL_A::SWGPIO_21) - } - #[doc = "`1110`"] - #[inline(always)] - pub fn e21_tdi(self) -> &'a mut W { - self.variant(REG_GPIO_21_FUNC_SEL_A::E21_TDI) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 24)) | ((value as u32 & 0x0f) << 24); - self.w - } -} -#[doc = "Pull Down Resistor for GPIO21.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_21_PD_A { +#[doc = "Field `reg_gpio_20_ie` reader - Input enable for GPIO20."] +pub type REG_GPIO_20_IE_R = crate::BitReader; +#[doc = "Input enable for GPIO20.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO20INPUT_ENABLED_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_21_PD_A) -> Self { + fn from(variant: GPIO20INPUT_ENABLED_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_21_pd` reader - Pull Down Resistor for GPIO21."] -pub struct REG_GPIO_21_PD_R(crate::FieldReader); -impl REG_GPIO_21_PD_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_21_PD_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_20_IE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_21_PD_A { + pub fn variant(&self) -> GPIO20INPUT_ENABLED_A { match self.bits { - false => REG_GPIO_21_PD_A::DISABLED, - true => REG_GPIO_21_PD_A::ENABLED, + false => GPIO20INPUT_ENABLED_A::DISABLED, + true => GPIO20INPUT_ENABLED_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_21_PD_A::DISABLED + *self == GPIO20INPUT_ENABLED_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_21_PD_A::ENABLED + *self == GPIO20INPUT_ENABLED_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_21_PD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_21_pd` writer - Pull Down Resistor for GPIO21."] -pub struct REG_GPIO_21_PD_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_21_PD_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_21_PD_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_20_ie` writer - Input enable for GPIO20."] +pub type REG_GPIO_20_IE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL10_SPEC, GPIO20INPUT_ENABLED_A, O>; +impl<'a, const O: u8> REG_GPIO_20_IE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_21_PD_A::DISABLED) + self.variant(GPIO20INPUT_ENABLED_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_21_PD_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); - self.w + self.variant(GPIO20INPUT_ENABLED_A::ENABLED) } } -#[doc = "Pull Up Resistor for GPIO21.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_21_PU_A { +#[doc = "Field `reg_gpio_20_smt` reader - Schmitt trigger enabled for GPIO20."] +pub type REG_GPIO_20_SMT_R = crate::BitReader; +#[doc = "Schmitt trigger enabled for GPIO20.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO20SCHMITT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_21_PU_A) -> Self { + fn from(variant: GPIO20SCHMITT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_21_pu` reader - Pull Up Resistor for GPIO21."] -pub struct REG_GPIO_21_PU_R(crate::FieldReader); -impl REG_GPIO_21_PU_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_21_PU_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_20_SMT_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_21_PU_A { + pub fn variant(&self) -> GPIO20SCHMITT_A { match self.bits { - false => REG_GPIO_21_PU_A::DISABLED, - true => REG_GPIO_21_PU_A::ENABLED, + false => GPIO20SCHMITT_A::DISABLED, + true => GPIO20SCHMITT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_21_PU_A::DISABLED + *self == GPIO20SCHMITT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_21_PU_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_21_PU_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO20SCHMITT_A::ENABLED } } -#[doc = "Field `reg_gpio_21_pu` writer - Pull Up Resistor for GPIO21."] -pub struct REG_GPIO_21_PU_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_21_PU_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_21_PU_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_20_smt` writer - Schmitt trigger enabled for GPIO20."] +pub type REG_GPIO_20_SMT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL10_SPEC, GPIO20SCHMITT_A, O>; +impl<'a, const O: u8> REG_GPIO_20_SMT_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_21_PU_A::DISABLED) + self.variant(GPIO20SCHMITT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_21_PU_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w + self.variant(GPIO20SCHMITT_A::ENABLED) } } -#[doc = "Driving control enabled for GPIO21.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[doc = "Field `reg_gpio_20_drv` reader - Driving control enabled for GPIO20."] +pub type REG_GPIO_20_DRV_R = crate::FieldReader; +#[doc = "Driving control enabled for GPIO20.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_21_DRV_A { +pub enum GPIO20DRIVING_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_21_DRV_A) -> Self { + fn from(variant: GPIO20DRIVING_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_21_drv` reader - Driving control enabled for GPIO21."] -pub struct REG_GPIO_21_DRV_R(crate::FieldReader); -impl REG_GPIO_21_DRV_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_21_DRV_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_20_DRV_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 0 => Some(REG_GPIO_21_DRV_A::DISABLED), - 1 => Some(REG_GPIO_21_DRV_A::ENABLED), + 0 => Some(GPIO20DRIVING_A::DISABLED), + 1 => Some(GPIO20DRIVING_A::ENABLED), _ => None, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_21_DRV_A::DISABLED + *self == GPIO20DRIVING_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_21_DRV_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_21_DRV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO20DRIVING_A::ENABLED } } -#[doc = "Field `reg_gpio_21_drv` writer - Driving control enabled for GPIO21."] -pub struct REG_GPIO_21_DRV_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_21_DRV_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_21_DRV_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +#[doc = "Field `reg_gpio_20_drv` writer - Driving control enabled for GPIO20."] +pub type REG_GPIO_20_DRV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL10_SPEC, u8, GPIO20DRIVING_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_20_DRV_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_21_DRV_A::DISABLED) + self.variant(GPIO20DRIVING_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_21_DRV_A::ENABLED) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 18)) | ((value as u32 & 0x03) << 18); - self.w + self.variant(GPIO20DRIVING_A::ENABLED) } } -#[doc = "Schmitt trigger enabled for GPIO21.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_21_SMT_A { +#[doc = "Field `reg_gpio_20_pu` reader - Pull Up Resistor for GPIO20."] +pub type REG_GPIO_20_PU_R = crate::BitReader; +#[doc = "Pull Up Resistor for GPIO20.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO20PULL_UP_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_21_SMT_A) -> Self { + fn from(variant: GPIO20PULL_UP_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_21_smt` reader - Schmitt trigger enabled for GPIO21."] -pub struct REG_GPIO_21_SMT_R(crate::FieldReader); -impl REG_GPIO_21_SMT_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_21_SMT_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_20_PU_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_21_SMT_A { + pub fn variant(&self) -> GPIO20PULL_UP_RESISTOR_A { match self.bits { - false => REG_GPIO_21_SMT_A::DISABLED, - true => REG_GPIO_21_SMT_A::ENABLED, + false => GPIO20PULL_UP_RESISTOR_A::DISABLED, + true => GPIO20PULL_UP_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_21_SMT_A::DISABLED + *self == GPIO20PULL_UP_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_21_SMT_A::ENABLED + *self == GPIO20PULL_UP_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_21_SMT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_21_smt` writer - Schmitt trigger enabled for GPIO21."] -pub struct REG_GPIO_21_SMT_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_21_SMT_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_21_SMT_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_20_pu` writer - Pull Up Resistor for GPIO20."] +pub type REG_GPIO_20_PU_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL10_SPEC, GPIO20PULL_UP_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_20_PU_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_21_SMT_A::DISABLED) + self.variant(GPIO20PULL_UP_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_21_SMT_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w + self.variant(GPIO20PULL_UP_RESISTOR_A::ENABLED) } } -#[doc = "Input enable for GPIO21.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_21_IE_A { +#[doc = "Field `reg_gpio_20_pd` reader - Pull Down Resistor for GPIO20."] +pub type REG_GPIO_20_PD_R = crate::BitReader; +#[doc = "Pull Down Resistor for GPIO20.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO20PULL_DOWN_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_21_IE_A) -> Self { + fn from(variant: GPIO20PULL_DOWN_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_21_ie` reader - Input enable for GPIO21."] -pub struct REG_GPIO_21_IE_R(crate::FieldReader); -impl REG_GPIO_21_IE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_21_IE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_20_PD_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_21_IE_A { + pub fn variant(&self) -> GPIO20PULL_DOWN_RESISTOR_A { match self.bits { - false => REG_GPIO_21_IE_A::DISABLED, - true => REG_GPIO_21_IE_A::ENABLED, + false => GPIO20PULL_DOWN_RESISTOR_A::DISABLED, + true => GPIO20PULL_DOWN_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_21_IE_A::DISABLED + *self == GPIO20PULL_DOWN_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_21_IE_A::ENABLED + *self == GPIO20PULL_DOWN_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_21_IE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_21_ie` writer - Input enable for GPIO21."] -pub struct REG_GPIO_21_IE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_21_IE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_21_IE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_20_pd` writer - Pull Down Resistor for GPIO20."] +pub type REG_GPIO_20_PD_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL10_SPEC, GPIO20PULL_DOWN_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_20_PD_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_21_IE_A::DISABLED) + self.variant(GPIO20PULL_DOWN_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_21_IE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w + self.variant(GPIO20PULL_DOWN_RESISTOR_A::ENABLED) } } +#[doc = "Field `reg_gpio_20_func_sel` reader - Function select for GPIO20."] +pub type REG_GPIO_20_FUNC_SEL_R = crate::FieldReader; #[doc = "Function select for GPIO20.\n\nValue on reset: 11"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_20_FUNC_SEL_A { +pub enum GPIO20FUNCTION_SELECT_A { #[doc = "2: `10`"] SF_D0 = 2, #[doc = "4: `100`"] @@ -613,669 +314,639 @@ pub enum REG_GPIO_20_FUNC_SEL_A { #[doc = "14: `1110`"] E21_TMS = 14, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_20_FUNC_SEL_A) -> Self { + fn from(variant: GPIO20FUNCTION_SELECT_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_20_func_sel` reader - Function select for GPIO20."] -pub struct REG_GPIO_20_FUNC_SEL_R(crate::FieldReader); impl REG_GPIO_20_FUNC_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_20_FUNC_SEL_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 2 => Some(REG_GPIO_20_FUNC_SEL_A::SF_D0), - 4 => Some(REG_GPIO_20_FUNC_SEL_A::SPI_MISO_SPI_MOSI), - 6 => Some(REG_GPIO_20_FUNC_SEL_A::I2C_SCL), - 7 => Some(REG_GPIO_20_FUNC_SEL_A::UART_SIG4), - 8 => Some(REG_GPIO_20_FUNC_SEL_A::PWM_CH0), - 9 => Some(REG_GPIO_20_FUNC_SEL_A::FEM_GPIO_0), - 11 => Some(REG_GPIO_20_FUNC_SEL_A::SWGPIO_20), - 14 => Some(REG_GPIO_20_FUNC_SEL_A::E21_TMS), + 2 => Some(GPIO20FUNCTION_SELECT_A::SF_D0), + 4 => Some(GPIO20FUNCTION_SELECT_A::SPI_MISO_SPI_MOSI), + 6 => Some(GPIO20FUNCTION_SELECT_A::I2C_SCL), + 7 => Some(GPIO20FUNCTION_SELECT_A::UART_SIG4), + 8 => Some(GPIO20FUNCTION_SELECT_A::PWM_CH0), + 9 => Some(GPIO20FUNCTION_SELECT_A::FEM_GPIO_0), + 11 => Some(GPIO20FUNCTION_SELECT_A::SWGPIO_20), + 14 => Some(GPIO20FUNCTION_SELECT_A::E21_TMS), _ => None, } } #[doc = "Checks if the value of the field is `SF_D0`"] #[inline(always)] pub fn is_sf_d0(&self) -> bool { - **self == REG_GPIO_20_FUNC_SEL_A::SF_D0 + *self == GPIO20FUNCTION_SELECT_A::SF_D0 } #[doc = "Checks if the value of the field is `SPI_MISO_SPI_MOSI`"] #[inline(always)] pub fn is_spi_miso_spi_mosi(&self) -> bool { - **self == REG_GPIO_20_FUNC_SEL_A::SPI_MISO_SPI_MOSI + *self == GPIO20FUNCTION_SELECT_A::SPI_MISO_SPI_MOSI } #[doc = "Checks if the value of the field is `I2C_SCL`"] #[inline(always)] pub fn is_i2c_scl(&self) -> bool { - **self == REG_GPIO_20_FUNC_SEL_A::I2C_SCL + *self == GPIO20FUNCTION_SELECT_A::I2C_SCL } #[doc = "Checks if the value of the field is `UART_SIG4`"] #[inline(always)] pub fn is_uart_sig4(&self) -> bool { - **self == REG_GPIO_20_FUNC_SEL_A::UART_SIG4 + *self == GPIO20FUNCTION_SELECT_A::UART_SIG4 } #[doc = "Checks if the value of the field is `PWM_CH0`"] #[inline(always)] pub fn is_pwm_ch0(&self) -> bool { - **self == REG_GPIO_20_FUNC_SEL_A::PWM_CH0 + *self == GPIO20FUNCTION_SELECT_A::PWM_CH0 } #[doc = "Checks if the value of the field is `FEM_GPIO_0`"] #[inline(always)] pub fn is_fem_gpio_0(&self) -> bool { - **self == REG_GPIO_20_FUNC_SEL_A::FEM_GPIO_0 + *self == GPIO20FUNCTION_SELECT_A::FEM_GPIO_0 } #[doc = "Checks if the value of the field is `SWGPIO_20`"] #[inline(always)] pub fn is_swgpio_20(&self) -> bool { - **self == REG_GPIO_20_FUNC_SEL_A::SWGPIO_20 + *self == GPIO20FUNCTION_SELECT_A::SWGPIO_20 } #[doc = "Checks if the value of the field is `E21_TMS`"] #[inline(always)] pub fn is_e21_tms(&self) -> bool { - **self == REG_GPIO_20_FUNC_SEL_A::E21_TMS - } -} -impl core::ops::Deref for REG_GPIO_20_FUNC_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO20FUNCTION_SELECT_A::E21_TMS } } #[doc = "Field `reg_gpio_20_func_sel` writer - Function select for GPIO20."] -pub struct REG_GPIO_20_FUNC_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_20_FUNC_SEL_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_20_FUNC_SEL_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +pub type REG_GPIO_20_FUNC_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL10_SPEC, u8, GPIO20FUNCTION_SELECT_A, 4, O>; +impl<'a, const O: u8> REG_GPIO_20_FUNC_SEL_W<'a, O> { #[doc = "`10`"] #[inline(always)] pub fn sf_d0(self) -> &'a mut W { - self.variant(REG_GPIO_20_FUNC_SEL_A::SF_D0) + self.variant(GPIO20FUNCTION_SELECT_A::SF_D0) } #[doc = "`100`"] #[inline(always)] pub fn spi_miso_spi_mosi(self) -> &'a mut W { - self.variant(REG_GPIO_20_FUNC_SEL_A::SPI_MISO_SPI_MOSI) + self.variant(GPIO20FUNCTION_SELECT_A::SPI_MISO_SPI_MOSI) } #[doc = "`110`"] #[inline(always)] pub fn i2c_scl(self) -> &'a mut W { - self.variant(REG_GPIO_20_FUNC_SEL_A::I2C_SCL) + self.variant(GPIO20FUNCTION_SELECT_A::I2C_SCL) } #[doc = "`111`"] #[inline(always)] pub fn uart_sig4(self) -> &'a mut W { - self.variant(REG_GPIO_20_FUNC_SEL_A::UART_SIG4) + self.variant(GPIO20FUNCTION_SELECT_A::UART_SIG4) } #[doc = "`1000`"] #[inline(always)] pub fn pwm_ch0(self) -> &'a mut W { - self.variant(REG_GPIO_20_FUNC_SEL_A::PWM_CH0) + self.variant(GPIO20FUNCTION_SELECT_A::PWM_CH0) } #[doc = "`1001`"] #[inline(always)] pub fn fem_gpio_0(self) -> &'a mut W { - self.variant(REG_GPIO_20_FUNC_SEL_A::FEM_GPIO_0) + self.variant(GPIO20FUNCTION_SELECT_A::FEM_GPIO_0) } #[doc = "`1011`"] #[inline(always)] pub fn swgpio_20(self) -> &'a mut W { - self.variant(REG_GPIO_20_FUNC_SEL_A::SWGPIO_20) + self.variant(GPIO20FUNCTION_SELECT_A::SWGPIO_20) } #[doc = "`1110`"] #[inline(always)] pub fn e21_tms(self) -> &'a mut W { - self.variant(REG_GPIO_20_FUNC_SEL_A::E21_TMS) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 8)) | ((value as u32 & 0x0f) << 8); - self.w + self.variant(GPIO20FUNCTION_SELECT_A::E21_TMS) } } -#[doc = "Pull Down Resistor for GPIO20.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_20_PD_A { +#[doc = "Field `reg_gpio_21_ie` reader - Input enable for GPIO21."] +pub type REG_GPIO_21_IE_R = crate::BitReader; +#[doc = "Input enable for GPIO21.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO21INPUT_ENABLED_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_20_PD_A) -> Self { + fn from(variant: GPIO21INPUT_ENABLED_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_20_pd` reader - Pull Down Resistor for GPIO20."] -pub struct REG_GPIO_20_PD_R(crate::FieldReader); -impl REG_GPIO_20_PD_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_20_PD_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_21_IE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_20_PD_A { + pub fn variant(&self) -> GPIO21INPUT_ENABLED_A { match self.bits { - false => REG_GPIO_20_PD_A::DISABLED, - true => REG_GPIO_20_PD_A::ENABLED, + false => GPIO21INPUT_ENABLED_A::DISABLED, + true => GPIO21INPUT_ENABLED_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_20_PD_A::DISABLED + *self == GPIO21INPUT_ENABLED_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_20_PD_A::ENABLED + *self == GPIO21INPUT_ENABLED_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_20_PD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_20_pd` writer - Pull Down Resistor for GPIO20."] -pub struct REG_GPIO_20_PD_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_20_PD_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_20_PD_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_21_ie` writer - Input enable for GPIO21."] +pub type REG_GPIO_21_IE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL10_SPEC, GPIO21INPUT_ENABLED_A, O>; +impl<'a, const O: u8> REG_GPIO_21_IE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_20_PD_A::DISABLED) + self.variant(GPIO21INPUT_ENABLED_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_20_PD_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w + self.variant(GPIO21INPUT_ENABLED_A::ENABLED) } } -#[doc = "Pull Up Resistor for GPIO20.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_20_PU_A { +#[doc = "Field `reg_gpio_21_smt` reader - Schmitt trigger enabled for GPIO21."] +pub type REG_GPIO_21_SMT_R = crate::BitReader; +#[doc = "Schmitt trigger enabled for GPIO21.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO21SCHMITT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_20_PU_A) -> Self { + fn from(variant: GPIO21SCHMITT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_20_pu` reader - Pull Up Resistor for GPIO20."] -pub struct REG_GPIO_20_PU_R(crate::FieldReader); -impl REG_GPIO_20_PU_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_20_PU_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_21_SMT_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_20_PU_A { + pub fn variant(&self) -> GPIO21SCHMITT_A { match self.bits { - false => REG_GPIO_20_PU_A::DISABLED, - true => REG_GPIO_20_PU_A::ENABLED, + false => GPIO21SCHMITT_A::DISABLED, + true => GPIO21SCHMITT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_20_PU_A::DISABLED + *self == GPIO21SCHMITT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_20_PU_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_20_PU_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO21SCHMITT_A::ENABLED } } -#[doc = "Field `reg_gpio_20_pu` writer - Pull Up Resistor for GPIO20."] -pub struct REG_GPIO_20_PU_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_20_PU_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_20_PU_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_21_smt` writer - Schmitt trigger enabled for GPIO21."] +pub type REG_GPIO_21_SMT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL10_SPEC, GPIO21SCHMITT_A, O>; +impl<'a, const O: u8> REG_GPIO_21_SMT_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_20_PU_A::DISABLED) + self.variant(GPIO21SCHMITT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_20_PU_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w + self.variant(GPIO21SCHMITT_A::ENABLED) } } -#[doc = "Driving control enabled for GPIO20.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[doc = "Field `reg_gpio_21_drv` reader - Driving control enabled for GPIO21."] +pub type REG_GPIO_21_DRV_R = crate::FieldReader; +#[doc = "Driving control enabled for GPIO21.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_20_DRV_A { +pub enum GPIO21DRIVING_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_20_DRV_A) -> Self { + fn from(variant: GPIO21DRIVING_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_20_drv` reader - Driving control enabled for GPIO20."] -pub struct REG_GPIO_20_DRV_R(crate::FieldReader); -impl REG_GPIO_20_DRV_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_20_DRV_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_21_DRV_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 0 => Some(REG_GPIO_20_DRV_A::DISABLED), - 1 => Some(REG_GPIO_20_DRV_A::ENABLED), + 0 => Some(GPIO21DRIVING_A::DISABLED), + 1 => Some(GPIO21DRIVING_A::ENABLED), _ => None, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_20_DRV_A::DISABLED + *self == GPIO21DRIVING_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_20_DRV_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_20_DRV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO21DRIVING_A::ENABLED } } -#[doc = "Field `reg_gpio_20_drv` writer - Driving control enabled for GPIO20."] -pub struct REG_GPIO_20_DRV_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_20_DRV_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_20_DRV_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +#[doc = "Field `reg_gpio_21_drv` writer - Driving control enabled for GPIO21."] +pub type REG_GPIO_21_DRV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL10_SPEC, u8, GPIO21DRIVING_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_21_DRV_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_20_DRV_A::DISABLED) + self.variant(GPIO21DRIVING_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_20_DRV_A::ENABLED) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 2)) | ((value as u32 & 0x03) << 2); - self.w + self.variant(GPIO21DRIVING_A::ENABLED) } } -#[doc = "Schmitt trigger enabled for GPIO20.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_20_SMT_A { +#[doc = "Field `reg_gpio_21_pu` reader - Pull Up Resistor for GPIO21."] +pub type REG_GPIO_21_PU_R = crate::BitReader; +#[doc = "Pull Up Resistor for GPIO21.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO21PULL_UP_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_20_SMT_A) -> Self { + fn from(variant: GPIO21PULL_UP_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_20_smt` reader - Schmitt trigger enabled for GPIO20."] -pub struct REG_GPIO_20_SMT_R(crate::FieldReader); -impl REG_GPIO_20_SMT_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_20_SMT_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_21_PU_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_20_SMT_A { + pub fn variant(&self) -> GPIO21PULL_UP_RESISTOR_A { match self.bits { - false => REG_GPIO_20_SMT_A::DISABLED, - true => REG_GPIO_20_SMT_A::ENABLED, + false => GPIO21PULL_UP_RESISTOR_A::DISABLED, + true => GPIO21PULL_UP_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_20_SMT_A::DISABLED + *self == GPIO21PULL_UP_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_20_SMT_A::ENABLED + *self == GPIO21PULL_UP_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_20_SMT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_20_smt` writer - Schmitt trigger enabled for GPIO20."] -pub struct REG_GPIO_20_SMT_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_20_SMT_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_20_SMT_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_21_pu` writer - Pull Up Resistor for GPIO21."] +pub type REG_GPIO_21_PU_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL10_SPEC, GPIO21PULL_UP_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_21_PU_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_20_SMT_A::DISABLED) + self.variant(GPIO21PULL_UP_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_20_SMT_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w + self.variant(GPIO21PULL_UP_RESISTOR_A::ENABLED) } } -#[doc = "Input enable for GPIO20.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_20_IE_A { +#[doc = "Field `reg_gpio_21_pd` reader - Pull Down Resistor for GPIO21."] +pub type REG_GPIO_21_PD_R = crate::BitReader; +#[doc = "Pull Down Resistor for GPIO21.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO21PULL_DOWN_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_20_IE_A) -> Self { + fn from(variant: GPIO21PULL_DOWN_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_20_ie` reader - Input enable for GPIO20."] -pub struct REG_GPIO_20_IE_R(crate::FieldReader); -impl REG_GPIO_20_IE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_20_IE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_21_PD_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_20_IE_A { + pub fn variant(&self) -> GPIO21PULL_DOWN_RESISTOR_A { match self.bits { - false => REG_GPIO_20_IE_A::DISABLED, - true => REG_GPIO_20_IE_A::ENABLED, + false => GPIO21PULL_DOWN_RESISTOR_A::DISABLED, + true => GPIO21PULL_DOWN_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_20_IE_A::DISABLED + *self == GPIO21PULL_DOWN_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_20_IE_A::ENABLED + *self == GPIO21PULL_DOWN_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_20_IE_R { - type Target = crate::FieldReader; +#[doc = "Field `reg_gpio_21_pd` writer - Pull Down Resistor for GPIO21."] +pub type REG_GPIO_21_PD_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL10_SPEC, GPIO21PULL_DOWN_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_21_PD_W<'a, O> { + #[doc = "`0`"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn disabled(self) -> &'a mut W { + self.variant(GPIO21PULL_DOWN_RESISTOR_A::DISABLED) + } + #[doc = "`1`"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(GPIO21PULL_DOWN_RESISTOR_A::ENABLED) } } -#[doc = "Field `reg_gpio_20_ie` writer - Input enable for GPIO20."] -pub struct REG_GPIO_20_IE_W<'a> { - w: &'a mut W, +#[doc = "Field `reg_gpio_21_func_sel` reader - Function select for GPIO21."] +pub type REG_GPIO_21_FUNC_SEL_R = crate::FieldReader; +#[doc = "Function select for GPIO21.\n\nValue on reset: 11"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum GPIO21FUNCTION_SELECT_A { + #[doc = "2: `10`"] + SF_CS = 2, + #[doc = "4: `100`"] + SPI_MOSI_SPI_MISO = 4, + #[doc = "6: `110`"] + I2C_SDA = 6, + #[doc = "7: `111`"] + UART_SIG5 = 7, + #[doc = "8: `1000`"] + PWM_CH1 = 8, + #[doc = "9: `1001`"] + FEM_GPIO_1 = 9, + #[doc = "11: `1011`"] + SWGPIO_21 = 11, + #[doc = "14: `1110`"] + E21_TDI = 14, } -impl<'a> REG_GPIO_20_IE_W<'a> { - #[doc = r"Writes `variant` to the field"] +impl From for u8 { #[inline(always)] - pub fn variant(self, variant: REG_GPIO_20_IE_A) -> &'a mut W { - self.bit(variant.into()) + fn from(variant: GPIO21FUNCTION_SELECT_A) -> Self { + variant as _ } - #[doc = "`0`"] +} +impl REG_GPIO_21_FUNC_SEL_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_20_IE_A::DISABLED) + pub fn variant(&self) -> Option { + match self.bits { + 2 => Some(GPIO21FUNCTION_SELECT_A::SF_CS), + 4 => Some(GPIO21FUNCTION_SELECT_A::SPI_MOSI_SPI_MISO), + 6 => Some(GPIO21FUNCTION_SELECT_A::I2C_SDA), + 7 => Some(GPIO21FUNCTION_SELECT_A::UART_SIG5), + 8 => Some(GPIO21FUNCTION_SELECT_A::PWM_CH1), + 9 => Some(GPIO21FUNCTION_SELECT_A::FEM_GPIO_1), + 11 => Some(GPIO21FUNCTION_SELECT_A::SWGPIO_21), + 14 => Some(GPIO21FUNCTION_SELECT_A::E21_TDI), + _ => None, + } } - #[doc = "`1`"] + #[doc = "Checks if the value of the field is `SF_CS`"] #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_20_IE_A::ENABLED) + pub fn is_sf_cs(&self) -> bool { + *self == GPIO21FUNCTION_SELECT_A::SF_CS + } + #[doc = "Checks if the value of the field is `SPI_MOSI_SPI_MISO`"] + #[inline(always)] + pub fn is_spi_mosi_spi_miso(&self) -> bool { + *self == GPIO21FUNCTION_SELECT_A::SPI_MOSI_SPI_MISO + } + #[doc = "Checks if the value of the field is `I2C_SDA`"] + #[inline(always)] + pub fn is_i2c_sda(&self) -> bool { + *self == GPIO21FUNCTION_SELECT_A::I2C_SDA + } + #[doc = "Checks if the value of the field is `UART_SIG5`"] + #[inline(always)] + pub fn is_uart_sig5(&self) -> bool { + *self == GPIO21FUNCTION_SELECT_A::UART_SIG5 + } + #[doc = "Checks if the value of the field is `PWM_CH1`"] + #[inline(always)] + pub fn is_pwm_ch1(&self) -> bool { + *self == GPIO21FUNCTION_SELECT_A::PWM_CH1 } - #[doc = r"Sets the field bit"] + #[doc = "Checks if the value of the field is `FEM_GPIO_1`"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn is_fem_gpio_1(&self) -> bool { + *self == GPIO21FUNCTION_SELECT_A::FEM_GPIO_1 } - #[doc = r"Clears the field bit"] + #[doc = "Checks if the value of the field is `SWGPIO_21`"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn is_swgpio_21(&self) -> bool { + *self == GPIO21FUNCTION_SELECT_A::SWGPIO_21 } - #[doc = r"Writes raw bits to the field"] + #[doc = "Checks if the value of the field is `E21_TDI`"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn is_e21_tdi(&self) -> bool { + *self == GPIO21FUNCTION_SELECT_A::E21_TDI } } -impl R { - #[doc = "Bits 24:27 - Function select for GPIO21."] +#[doc = "Field `reg_gpio_21_func_sel` writer - Function select for GPIO21."] +pub type REG_GPIO_21_FUNC_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL10_SPEC, u8, GPIO21FUNCTION_SELECT_A, 4, O>; +impl<'a, const O: u8> REG_GPIO_21_FUNC_SEL_W<'a, O> { + #[doc = "`10`"] #[inline(always)] - pub fn reg_gpio_21_func_sel(&self) -> REG_GPIO_21_FUNC_SEL_R { - REG_GPIO_21_FUNC_SEL_R::new(((self.bits >> 24) & 0x0f) as u8) + pub fn sf_cs(self) -> &'a mut W { + self.variant(GPIO21FUNCTION_SELECT_A::SF_CS) } - #[doc = "Bit 21 - Pull Down Resistor for GPIO21."] + #[doc = "`100`"] #[inline(always)] - pub fn reg_gpio_21_pd(&self) -> REG_GPIO_21_PD_R { - REG_GPIO_21_PD_R::new(((self.bits >> 21) & 0x01) != 0) + pub fn spi_mosi_spi_miso(self) -> &'a mut W { + self.variant(GPIO21FUNCTION_SELECT_A::SPI_MOSI_SPI_MISO) } - #[doc = "Bit 20 - Pull Up Resistor for GPIO21."] + #[doc = "`110`"] #[inline(always)] - pub fn reg_gpio_21_pu(&self) -> REG_GPIO_21_PU_R { - REG_GPIO_21_PU_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn i2c_sda(self) -> &'a mut W { + self.variant(GPIO21FUNCTION_SELECT_A::I2C_SDA) } - #[doc = "Bits 18:19 - Driving control enabled for GPIO21."] + #[doc = "`111`"] #[inline(always)] - pub fn reg_gpio_21_drv(&self) -> REG_GPIO_21_DRV_R { - REG_GPIO_21_DRV_R::new(((self.bits >> 18) & 0x03) as u8) + pub fn uart_sig5(self) -> &'a mut W { + self.variant(GPIO21FUNCTION_SELECT_A::UART_SIG5) } - #[doc = "Bit 17 - Schmitt trigger enabled for GPIO21."] + #[doc = "`1000`"] #[inline(always)] - pub fn reg_gpio_21_smt(&self) -> REG_GPIO_21_SMT_R { - REG_GPIO_21_SMT_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn pwm_ch1(self) -> &'a mut W { + self.variant(GPIO21FUNCTION_SELECT_A::PWM_CH1) } - #[doc = "Bit 16 - Input enable for GPIO21."] + #[doc = "`1001`"] #[inline(always)] - pub fn reg_gpio_21_ie(&self) -> REG_GPIO_21_IE_R { - REG_GPIO_21_IE_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn fem_gpio_1(self) -> &'a mut W { + self.variant(GPIO21FUNCTION_SELECT_A::FEM_GPIO_1) + } + #[doc = "`1011`"] + #[inline(always)] + pub fn swgpio_21(self) -> &'a mut W { + self.variant(GPIO21FUNCTION_SELECT_A::SWGPIO_21) + } + #[doc = "`1110`"] + #[inline(always)] + pub fn e21_tdi(self) -> &'a mut W { + self.variant(GPIO21FUNCTION_SELECT_A::E21_TDI) + } +} +impl R { + #[doc = "Bit 0 - Input enable for GPIO20."] + #[inline(always)] + pub fn reg_gpio_20_ie(&self) -> REG_GPIO_20_IE_R { + REG_GPIO_20_IE_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Schmitt trigger enabled for GPIO20."] + #[inline(always)] + pub fn reg_gpio_20_smt(&self) -> REG_GPIO_20_SMT_R { + REG_GPIO_20_SMT_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bits 2:3 - Driving control enabled for GPIO20."] + #[inline(always)] + pub fn reg_gpio_20_drv(&self) -> REG_GPIO_20_DRV_R { + REG_GPIO_20_DRV_R::new(((self.bits >> 2) & 3) as u8) + } + #[doc = "Bit 4 - Pull Up Resistor for GPIO20."] + #[inline(always)] + pub fn reg_gpio_20_pu(&self) -> REG_GPIO_20_PU_R { + REG_GPIO_20_PU_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Pull Down Resistor for GPIO20."] + #[inline(always)] + pub fn reg_gpio_20_pd(&self) -> REG_GPIO_20_PD_R { + REG_GPIO_20_PD_R::new(((self.bits >> 5) & 1) != 0) } #[doc = "Bits 8:11 - Function select for GPIO20."] #[inline(always)] pub fn reg_gpio_20_func_sel(&self) -> REG_GPIO_20_FUNC_SEL_R { REG_GPIO_20_FUNC_SEL_R::new(((self.bits >> 8) & 0x0f) as u8) } - #[doc = "Bit 5 - Pull Down Resistor for GPIO20."] + #[doc = "Bit 16 - Input enable for GPIO21."] #[inline(always)] - pub fn reg_gpio_20_pd(&self) -> REG_GPIO_20_PD_R { - REG_GPIO_20_PD_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn reg_gpio_21_ie(&self) -> REG_GPIO_21_IE_R { + REG_GPIO_21_IE_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 4 - Pull Up Resistor for GPIO20."] + #[doc = "Bit 17 - Schmitt trigger enabled for GPIO21."] #[inline(always)] - pub fn reg_gpio_20_pu(&self) -> REG_GPIO_20_PU_R { - REG_GPIO_20_PU_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn reg_gpio_21_smt(&self) -> REG_GPIO_21_SMT_R { + REG_GPIO_21_SMT_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bits 2:3 - Driving control enabled for GPIO20."] + #[doc = "Bits 18:19 - Driving control enabled for GPIO21."] #[inline(always)] - pub fn reg_gpio_20_drv(&self) -> REG_GPIO_20_DRV_R { - REG_GPIO_20_DRV_R::new(((self.bits >> 2) & 0x03) as u8) + pub fn reg_gpio_21_drv(&self) -> REG_GPIO_21_DRV_R { + REG_GPIO_21_DRV_R::new(((self.bits >> 18) & 3) as u8) } - #[doc = "Bit 1 - Schmitt trigger enabled for GPIO20."] + #[doc = "Bit 20 - Pull Up Resistor for GPIO21."] #[inline(always)] - pub fn reg_gpio_20_smt(&self) -> REG_GPIO_20_SMT_R { - REG_GPIO_20_SMT_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn reg_gpio_21_pu(&self) -> REG_GPIO_21_PU_R { + REG_GPIO_21_PU_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bit 0 - Input enable for GPIO20."] + #[doc = "Bit 21 - Pull Down Resistor for GPIO21."] #[inline(always)] - pub fn reg_gpio_20_ie(&self) -> REG_GPIO_20_IE_R { - REG_GPIO_20_IE_R::new((self.bits & 0x01) != 0) + pub fn reg_gpio_21_pd(&self) -> REG_GPIO_21_PD_R { + REG_GPIO_21_PD_R::new(((self.bits >> 21) & 1) != 0) } -} -impl W { #[doc = "Bits 24:27 - Function select for GPIO21."] #[inline(always)] - pub fn reg_gpio_21_func_sel(&mut self) -> REG_GPIO_21_FUNC_SEL_W { - REG_GPIO_21_FUNC_SEL_W { w: self } + pub fn reg_gpio_21_func_sel(&self) -> REG_GPIO_21_FUNC_SEL_R { + REG_GPIO_21_FUNC_SEL_R::new(((self.bits >> 24) & 0x0f) as u8) } - #[doc = "Bit 21 - Pull Down Resistor for GPIO21."] +} +impl W { + #[doc = "Bit 0 - Input enable for GPIO20."] #[inline(always)] - pub fn reg_gpio_21_pd(&mut self) -> REG_GPIO_21_PD_W { - REG_GPIO_21_PD_W { w: self } + #[must_use] + pub fn reg_gpio_20_ie(&mut self) -> REG_GPIO_20_IE_W<0> { + REG_GPIO_20_IE_W::new(self) } - #[doc = "Bit 20 - Pull Up Resistor for GPIO21."] + #[doc = "Bit 1 - Schmitt trigger enabled for GPIO20."] #[inline(always)] - pub fn reg_gpio_21_pu(&mut self) -> REG_GPIO_21_PU_W { - REG_GPIO_21_PU_W { w: self } + #[must_use] + pub fn reg_gpio_20_smt(&mut self) -> REG_GPIO_20_SMT_W<1> { + REG_GPIO_20_SMT_W::new(self) } - #[doc = "Bits 18:19 - Driving control enabled for GPIO21."] + #[doc = "Bits 2:3 - Driving control enabled for GPIO20."] #[inline(always)] - pub fn reg_gpio_21_drv(&mut self) -> REG_GPIO_21_DRV_W { - REG_GPIO_21_DRV_W { w: self } + #[must_use] + pub fn reg_gpio_20_drv(&mut self) -> REG_GPIO_20_DRV_W<2> { + REG_GPIO_20_DRV_W::new(self) } - #[doc = "Bit 17 - Schmitt trigger enabled for GPIO21."] + #[doc = "Bit 4 - Pull Up Resistor for GPIO20."] #[inline(always)] - pub fn reg_gpio_21_smt(&mut self) -> REG_GPIO_21_SMT_W { - REG_GPIO_21_SMT_W { w: self } + #[must_use] + pub fn reg_gpio_20_pu(&mut self) -> REG_GPIO_20_PU_W<4> { + REG_GPIO_20_PU_W::new(self) } - #[doc = "Bit 16 - Input enable for GPIO21."] + #[doc = "Bit 5 - Pull Down Resistor for GPIO20."] #[inline(always)] - pub fn reg_gpio_21_ie(&mut self) -> REG_GPIO_21_IE_W { - REG_GPIO_21_IE_W { w: self } + #[must_use] + pub fn reg_gpio_20_pd(&mut self) -> REG_GPIO_20_PD_W<5> { + REG_GPIO_20_PD_W::new(self) } #[doc = "Bits 8:11 - Function select for GPIO20."] #[inline(always)] - pub fn reg_gpio_20_func_sel(&mut self) -> REG_GPIO_20_FUNC_SEL_W { - REG_GPIO_20_FUNC_SEL_W { w: self } + #[must_use] + pub fn reg_gpio_20_func_sel(&mut self) -> REG_GPIO_20_FUNC_SEL_W<8> { + REG_GPIO_20_FUNC_SEL_W::new(self) } - #[doc = "Bit 5 - Pull Down Resistor for GPIO20."] + #[doc = "Bit 16 - Input enable for GPIO21."] #[inline(always)] - pub fn reg_gpio_20_pd(&mut self) -> REG_GPIO_20_PD_W { - REG_GPIO_20_PD_W { w: self } + #[must_use] + pub fn reg_gpio_21_ie(&mut self) -> REG_GPIO_21_IE_W<16> { + REG_GPIO_21_IE_W::new(self) } - #[doc = "Bit 4 - Pull Up Resistor for GPIO20."] + #[doc = "Bit 17 - Schmitt trigger enabled for GPIO21."] #[inline(always)] - pub fn reg_gpio_20_pu(&mut self) -> REG_GPIO_20_PU_W { - REG_GPIO_20_PU_W { w: self } + #[must_use] + pub fn reg_gpio_21_smt(&mut self) -> REG_GPIO_21_SMT_W<17> { + REG_GPIO_21_SMT_W::new(self) } - #[doc = "Bits 2:3 - Driving control enabled for GPIO20."] + #[doc = "Bits 18:19 - Driving control enabled for GPIO21."] #[inline(always)] - pub fn reg_gpio_20_drv(&mut self) -> REG_GPIO_20_DRV_W { - REG_GPIO_20_DRV_W { w: self } + #[must_use] + pub fn reg_gpio_21_drv(&mut self) -> REG_GPIO_21_DRV_W<18> { + REG_GPIO_21_DRV_W::new(self) } - #[doc = "Bit 1 - Schmitt trigger enabled for GPIO20."] + #[doc = "Bit 20 - Pull Up Resistor for GPIO21."] #[inline(always)] - pub fn reg_gpio_20_smt(&mut self) -> REG_GPIO_20_SMT_W { - REG_GPIO_20_SMT_W { w: self } + #[must_use] + pub fn reg_gpio_21_pu(&mut self) -> REG_GPIO_21_PU_W<20> { + REG_GPIO_21_PU_W::new(self) } - #[doc = "Bit 0 - Input enable for GPIO20."] + #[doc = "Bit 21 - Pull Down Resistor for GPIO21."] + #[inline(always)] + #[must_use] + pub fn reg_gpio_21_pd(&mut self) -> REG_GPIO_21_PD_W<21> { + REG_GPIO_21_PD_W::new(self) + } + #[doc = "Bits 24:27 - Function select for GPIO21."] #[inline(always)] - pub fn reg_gpio_20_ie(&mut self) -> REG_GPIO_20_IE_W { - REG_GPIO_20_IE_W { w: self } + #[must_use] + pub fn reg_gpio_21_func_sel(&mut self) -> REG_GPIO_21_FUNC_SEL_W<24> { + REG_GPIO_21_FUNC_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -1293,11 +964,10 @@ impl crate::Readable for GPIO_CFGCTL10_SPEC { #[doc = "`write(|w| ..)` method takes [gpio_cfgctl10::W](W) writer structure"] impl crate::Writable for GPIO_CFGCTL10_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets GPIO_CFGCTL10 to value 0x0b03_0b03"] impl crate::Resettable for GPIO_CFGCTL10_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0b03_0b03 - } + const RESET_VALUE: Self::Ux = 0x0b03_0b03; } diff --git a/src/glb/gpio_cfgctl11.rs b/src/glb/gpio_cfgctl11.rs index 9be3600..636363c 100644 --- a/src/glb/gpio_cfgctl11.rs +++ b/src/glb/gpio_cfgctl11.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,422 +28,275 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Pull Down Resistor for GPIO23.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_23_PD_A { +#[doc = "Field `reg_gpio_22_ie` reader - Input enable for GPIO22."] +pub type REG_GPIO_22_IE_R = crate::BitReader; +#[doc = "Input enable for GPIO22.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO22INPUT_ENABLED_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_23_PD_A) -> Self { + fn from(variant: GPIO22INPUT_ENABLED_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_23_pd` reader - Pull Down Resistor for GPIO23."] -pub struct REG_GPIO_23_PD_R(crate::FieldReader); -impl REG_GPIO_23_PD_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_23_PD_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_22_IE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_23_PD_A { + pub fn variant(&self) -> GPIO22INPUT_ENABLED_A { match self.bits { - false => REG_GPIO_23_PD_A::DISABLED, - true => REG_GPIO_23_PD_A::ENABLED, + false => GPIO22INPUT_ENABLED_A::DISABLED, + true => GPIO22INPUT_ENABLED_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_23_PD_A::DISABLED + *self == GPIO22INPUT_ENABLED_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_23_PD_A::ENABLED + *self == GPIO22INPUT_ENABLED_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_23_PD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_23_pd` writer - Pull Down Resistor for GPIO23."] -pub struct REG_GPIO_23_PD_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_23_PD_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_23_PD_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_22_ie` writer - Input enable for GPIO22."] +pub type REG_GPIO_22_IE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL11_SPEC, GPIO22INPUT_ENABLED_A, O>; +impl<'a, const O: u8> REG_GPIO_22_IE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_23_PD_A::DISABLED) + self.variant(GPIO22INPUT_ENABLED_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_23_PD_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); - self.w + self.variant(GPIO22INPUT_ENABLED_A::ENABLED) } } -#[doc = "Pull Up Resistor for GPIO23.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_23_PU_A { +#[doc = "Field `reg_gpio_22_smt` reader - Schmitt trigger enabled for GPIO22."] +pub type REG_GPIO_22_SMT_R = crate::BitReader; +#[doc = "Schmitt trigger enabled for GPIO22.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO22SCHMITT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_23_PU_A) -> Self { + fn from(variant: GPIO22SCHMITT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_23_pu` reader - Pull Up Resistor for GPIO23."] -pub struct REG_GPIO_23_PU_R(crate::FieldReader); -impl REG_GPIO_23_PU_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_23_PU_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_22_SMT_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_23_PU_A { + pub fn variant(&self) -> GPIO22SCHMITT_A { match self.bits { - false => REG_GPIO_23_PU_A::DISABLED, - true => REG_GPIO_23_PU_A::ENABLED, + false => GPIO22SCHMITT_A::DISABLED, + true => GPIO22SCHMITT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_23_PU_A::DISABLED + *self == GPIO22SCHMITT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_23_PU_A::ENABLED + *self == GPIO22SCHMITT_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_23_PU_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_23_pu` writer - Pull Up Resistor for GPIO23."] -pub struct REG_GPIO_23_PU_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_23_PU_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_23_PU_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_22_smt` writer - Schmitt trigger enabled for GPIO22."] +pub type REG_GPIO_22_SMT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL11_SPEC, GPIO22SCHMITT_A, O>; +impl<'a, const O: u8> REG_GPIO_22_SMT_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_23_PU_A::DISABLED) + self.variant(GPIO22SCHMITT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_23_PU_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w + self.variant(GPIO22SCHMITT_A::ENABLED) } } -#[doc = "Driving control enabled for GPIO23.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[doc = "Field `reg_gpio_22_drv` reader - Driving control enabled for GPIO22."] +pub type REG_GPIO_22_DRV_R = crate::FieldReader; +#[doc = "Driving control enabled for GPIO22.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_23_DRV_A { +pub enum GPIO22DRIVING_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_23_DRV_A) -> Self { + fn from(variant: GPIO22DRIVING_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_23_drv` reader - Driving control enabled for GPIO23."] -pub struct REG_GPIO_23_DRV_R(crate::FieldReader); -impl REG_GPIO_23_DRV_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_23_DRV_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_22_DRV_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 0 => Some(REG_GPIO_23_DRV_A::DISABLED), - 1 => Some(REG_GPIO_23_DRV_A::ENABLED), + 0 => Some(GPIO22DRIVING_A::DISABLED), + 1 => Some(GPIO22DRIVING_A::ENABLED), _ => None, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_23_DRV_A::DISABLED + *self == GPIO22DRIVING_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_23_DRV_A::ENABLED + *self == GPIO22DRIVING_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_23_DRV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_23_drv` writer - Driving control enabled for GPIO23."] -pub struct REG_GPIO_23_DRV_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_23_DRV_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_23_DRV_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +#[doc = "Field `reg_gpio_22_drv` writer - Driving control enabled for GPIO22."] +pub type REG_GPIO_22_DRV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL11_SPEC, u8, GPIO22DRIVING_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_22_DRV_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_23_DRV_A::DISABLED) + self.variant(GPIO22DRIVING_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_23_DRV_A::ENABLED) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 18)) | ((value as u32 & 0x03) << 18); - self.w + self.variant(GPIO22DRIVING_A::ENABLED) } } -#[doc = "Schmitt trigger enabled for GPIO23.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_23_SMT_A { +#[doc = "Field `reg_gpio_22_pu` reader - Pull Up Resistor for GPIO22."] +pub type REG_GPIO_22_PU_R = crate::BitReader; +#[doc = "Pull Up Resistor for GPIO22.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO22PULL_UP_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_23_SMT_A) -> Self { + fn from(variant: GPIO22PULL_UP_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_23_smt` reader - Schmitt trigger enabled for GPIO23."] -pub struct REG_GPIO_23_SMT_R(crate::FieldReader); -impl REG_GPIO_23_SMT_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_23_SMT_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_22_PU_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_23_SMT_A { + pub fn variant(&self) -> GPIO22PULL_UP_RESISTOR_A { match self.bits { - false => REG_GPIO_23_SMT_A::DISABLED, - true => REG_GPIO_23_SMT_A::ENABLED, + false => GPIO22PULL_UP_RESISTOR_A::DISABLED, + true => GPIO22PULL_UP_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_23_SMT_A::DISABLED + *self == GPIO22PULL_UP_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_23_SMT_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_23_SMT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO22PULL_UP_RESISTOR_A::ENABLED } } -#[doc = "Field `reg_gpio_23_smt` writer - Schmitt trigger enabled for GPIO23."] -pub struct REG_GPIO_23_SMT_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_23_SMT_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_23_SMT_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_22_pu` writer - Pull Up Resistor for GPIO22."] +pub type REG_GPIO_22_PU_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL11_SPEC, GPIO22PULL_UP_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_22_PU_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_23_SMT_A::DISABLED) + self.variant(GPIO22PULL_UP_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_23_SMT_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w + self.variant(GPIO22PULL_UP_RESISTOR_A::ENABLED) } } -#[doc = "Input enable for GPIO23.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_23_IE_A { +#[doc = "Field `reg_gpio_22_pd` reader - Pull Down Resistor for GPIO22."] +pub type REG_GPIO_22_PD_R = crate::BitReader; +#[doc = "Pull Down Resistor for GPIO22.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO22PULL_DOWN_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_23_IE_A) -> Self { + fn from(variant: GPIO22PULL_DOWN_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_23_ie` reader - Input enable for GPIO23."] -pub struct REG_GPIO_23_IE_R(crate::FieldReader); -impl REG_GPIO_23_IE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_23_IE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_22_PD_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_23_IE_A { + pub fn variant(&self) -> GPIO22PULL_DOWN_RESISTOR_A { match self.bits { - false => REG_GPIO_23_IE_A::DISABLED, - true => REG_GPIO_23_IE_A::ENABLED, + false => GPIO22PULL_DOWN_RESISTOR_A::DISABLED, + true => GPIO22PULL_DOWN_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_23_IE_A::DISABLED + *self == GPIO22PULL_DOWN_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_23_IE_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_23_IE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO22PULL_DOWN_RESISTOR_A::ENABLED } } -#[doc = "Field `reg_gpio_23_ie` writer - Input enable for GPIO23."] -pub struct REG_GPIO_23_IE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_23_IE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_23_IE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_22_pd` writer - Pull Down Resistor for GPIO22."] +pub type REG_GPIO_22_PD_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL11_SPEC, GPIO22PULL_DOWN_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_22_PD_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_23_IE_A::DISABLED) + self.variant(GPIO22PULL_DOWN_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_23_IE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w + self.variant(GPIO22PULL_DOWN_RESISTOR_A::ENABLED) } } +#[doc = "Field `reg_gpio_22_func_sel` reader - Function select for GPIO22."] +pub type REG_GPIO_22_FUNC_SEL_R = crate::FieldReader; #[doc = "Function select for GPIO22.\n\nValue on reset: 11"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_22_FUNC_SEL_A { +pub enum GPIO22FUNCTION_SELECT_A { #[doc = "2: `10`"] SF_CLK_OUT = 2, #[doc = "4: `100`"] @@ -460,659 +314,497 @@ pub enum REG_GPIO_22_FUNC_SEL_A { #[doc = "14: `1110`"] E21_TCK = 14, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_22_FUNC_SEL_A) -> Self { + fn from(variant: GPIO22FUNCTION_SELECT_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_22_func_sel` reader - Function select for GPIO22."] -pub struct REG_GPIO_22_FUNC_SEL_R(crate::FieldReader); impl REG_GPIO_22_FUNC_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_22_FUNC_SEL_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 2 => Some(REG_GPIO_22_FUNC_SEL_A::SF_CLK_OUT), - 4 => Some(REG_GPIO_22_FUNC_SEL_A::SPI_SS), - 6 => Some(REG_GPIO_22_FUNC_SEL_A::I2C_SCL), - 7 => Some(REG_GPIO_22_FUNC_SEL_A::UART_SIG6), - 8 => Some(REG_GPIO_22_FUNC_SEL_A::PWM_CH2), - 9 => Some(REG_GPIO_22_FUNC_SEL_A::FEM_GPIO_2), - 11 => Some(REG_GPIO_22_FUNC_SEL_A::SWGPIO_22), - 14 => Some(REG_GPIO_22_FUNC_SEL_A::E21_TCK), + 2 => Some(GPIO22FUNCTION_SELECT_A::SF_CLK_OUT), + 4 => Some(GPIO22FUNCTION_SELECT_A::SPI_SS), + 6 => Some(GPIO22FUNCTION_SELECT_A::I2C_SCL), + 7 => Some(GPIO22FUNCTION_SELECT_A::UART_SIG6), + 8 => Some(GPIO22FUNCTION_SELECT_A::PWM_CH2), + 9 => Some(GPIO22FUNCTION_SELECT_A::FEM_GPIO_2), + 11 => Some(GPIO22FUNCTION_SELECT_A::SWGPIO_22), + 14 => Some(GPIO22FUNCTION_SELECT_A::E21_TCK), _ => None, } } #[doc = "Checks if the value of the field is `SF_CLK_OUT`"] #[inline(always)] pub fn is_sf_clk_out(&self) -> bool { - **self == REG_GPIO_22_FUNC_SEL_A::SF_CLK_OUT + *self == GPIO22FUNCTION_SELECT_A::SF_CLK_OUT } #[doc = "Checks if the value of the field is `SPI_SS`"] #[inline(always)] pub fn is_spi_ss(&self) -> bool { - **self == REG_GPIO_22_FUNC_SEL_A::SPI_SS + *self == GPIO22FUNCTION_SELECT_A::SPI_SS } #[doc = "Checks if the value of the field is `I2C_SCL`"] #[inline(always)] pub fn is_i2c_scl(&self) -> bool { - **self == REG_GPIO_22_FUNC_SEL_A::I2C_SCL + *self == GPIO22FUNCTION_SELECT_A::I2C_SCL } #[doc = "Checks if the value of the field is `UART_SIG6`"] #[inline(always)] pub fn is_uart_sig6(&self) -> bool { - **self == REG_GPIO_22_FUNC_SEL_A::UART_SIG6 + *self == GPIO22FUNCTION_SELECT_A::UART_SIG6 } #[doc = "Checks if the value of the field is `PWM_CH2`"] #[inline(always)] pub fn is_pwm_ch2(&self) -> bool { - **self == REG_GPIO_22_FUNC_SEL_A::PWM_CH2 + *self == GPIO22FUNCTION_SELECT_A::PWM_CH2 } #[doc = "Checks if the value of the field is `FEM_GPIO_2`"] #[inline(always)] pub fn is_fem_gpio_2(&self) -> bool { - **self == REG_GPIO_22_FUNC_SEL_A::FEM_GPIO_2 + *self == GPIO22FUNCTION_SELECT_A::FEM_GPIO_2 } #[doc = "Checks if the value of the field is `SWGPIO_22`"] #[inline(always)] pub fn is_swgpio_22(&self) -> bool { - **self == REG_GPIO_22_FUNC_SEL_A::SWGPIO_22 + *self == GPIO22FUNCTION_SELECT_A::SWGPIO_22 } #[doc = "Checks if the value of the field is `E21_TCK`"] #[inline(always)] pub fn is_e21_tck(&self) -> bool { - **self == REG_GPIO_22_FUNC_SEL_A::E21_TCK - } -} -impl core::ops::Deref for REG_GPIO_22_FUNC_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO22FUNCTION_SELECT_A::E21_TCK } } #[doc = "Field `reg_gpio_22_func_sel` writer - Function select for GPIO22."] -pub struct REG_GPIO_22_FUNC_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_22_FUNC_SEL_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_22_FUNC_SEL_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +pub type REG_GPIO_22_FUNC_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL11_SPEC, u8, GPIO22FUNCTION_SELECT_A, 4, O>; +impl<'a, const O: u8> REG_GPIO_22_FUNC_SEL_W<'a, O> { #[doc = "`10`"] #[inline(always)] pub fn sf_clk_out(self) -> &'a mut W { - self.variant(REG_GPIO_22_FUNC_SEL_A::SF_CLK_OUT) + self.variant(GPIO22FUNCTION_SELECT_A::SF_CLK_OUT) } #[doc = "`100`"] #[inline(always)] pub fn spi_ss(self) -> &'a mut W { - self.variant(REG_GPIO_22_FUNC_SEL_A::SPI_SS) + self.variant(GPIO22FUNCTION_SELECT_A::SPI_SS) } #[doc = "`110`"] #[inline(always)] pub fn i2c_scl(self) -> &'a mut W { - self.variant(REG_GPIO_22_FUNC_SEL_A::I2C_SCL) + self.variant(GPIO22FUNCTION_SELECT_A::I2C_SCL) } #[doc = "`111`"] #[inline(always)] pub fn uart_sig6(self) -> &'a mut W { - self.variant(REG_GPIO_22_FUNC_SEL_A::UART_SIG6) + self.variant(GPIO22FUNCTION_SELECT_A::UART_SIG6) } #[doc = "`1000`"] #[inline(always)] pub fn pwm_ch2(self) -> &'a mut W { - self.variant(REG_GPIO_22_FUNC_SEL_A::PWM_CH2) + self.variant(GPIO22FUNCTION_SELECT_A::PWM_CH2) } #[doc = "`1001`"] #[inline(always)] pub fn fem_gpio_2(self) -> &'a mut W { - self.variant(REG_GPIO_22_FUNC_SEL_A::FEM_GPIO_2) + self.variant(GPIO22FUNCTION_SELECT_A::FEM_GPIO_2) } #[doc = "`1011`"] #[inline(always)] pub fn swgpio_22(self) -> &'a mut W { - self.variant(REG_GPIO_22_FUNC_SEL_A::SWGPIO_22) + self.variant(GPIO22FUNCTION_SELECT_A::SWGPIO_22) } #[doc = "`1110`"] #[inline(always)] pub fn e21_tck(self) -> &'a mut W { - self.variant(REG_GPIO_22_FUNC_SEL_A::E21_TCK) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 8)) | ((value as u32 & 0x0f) << 8); - self.w + self.variant(GPIO22FUNCTION_SELECT_A::E21_TCK) } } -#[doc = "Pull Down Resistor for GPIO22.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_22_PD_A { +#[doc = "Field `reg_gpio_23_ie` reader - Input enable for GPIO23."] +pub type REG_GPIO_23_IE_R = crate::BitReader; +#[doc = "Input enable for GPIO23.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO23INPUT_ENABLED_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_22_PD_A) -> Self { + fn from(variant: GPIO23INPUT_ENABLED_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_22_pd` reader - Pull Down Resistor for GPIO22."] -pub struct REG_GPIO_22_PD_R(crate::FieldReader); -impl REG_GPIO_22_PD_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_22_PD_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_23_IE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_22_PD_A { + pub fn variant(&self) -> GPIO23INPUT_ENABLED_A { match self.bits { - false => REG_GPIO_22_PD_A::DISABLED, - true => REG_GPIO_22_PD_A::ENABLED, + false => GPIO23INPUT_ENABLED_A::DISABLED, + true => GPIO23INPUT_ENABLED_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_22_PD_A::DISABLED + *self == GPIO23INPUT_ENABLED_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_22_PD_A::ENABLED + *self == GPIO23INPUT_ENABLED_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_22_PD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_22_pd` writer - Pull Down Resistor for GPIO22."] -pub struct REG_GPIO_22_PD_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_22_PD_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_22_PD_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_23_ie` writer - Input enable for GPIO23."] +pub type REG_GPIO_23_IE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL11_SPEC, GPIO23INPUT_ENABLED_A, O>; +impl<'a, const O: u8> REG_GPIO_23_IE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_22_PD_A::DISABLED) + self.variant(GPIO23INPUT_ENABLED_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_22_PD_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w + self.variant(GPIO23INPUT_ENABLED_A::ENABLED) } } -#[doc = "Pull Up Resistor for GPIO22.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_22_PU_A { +#[doc = "Field `reg_gpio_23_smt` reader - Schmitt trigger enabled for GPIO23."] +pub type REG_GPIO_23_SMT_R = crate::BitReader; +#[doc = "Schmitt trigger enabled for GPIO23.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO23SCHMITT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_22_PU_A) -> Self { + fn from(variant: GPIO23SCHMITT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_22_pu` reader - Pull Up Resistor for GPIO22."] -pub struct REG_GPIO_22_PU_R(crate::FieldReader); -impl REG_GPIO_22_PU_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_22_PU_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_23_SMT_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_22_PU_A { + pub fn variant(&self) -> GPIO23SCHMITT_A { match self.bits { - false => REG_GPIO_22_PU_A::DISABLED, - true => REG_GPIO_22_PU_A::ENABLED, + false => GPIO23SCHMITT_A::DISABLED, + true => GPIO23SCHMITT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_22_PU_A::DISABLED + *self == GPIO23SCHMITT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_22_PU_A::ENABLED + *self == GPIO23SCHMITT_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_22_PU_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_22_pu` writer - Pull Up Resistor for GPIO22."] -pub struct REG_GPIO_22_PU_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_22_PU_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_22_PU_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_23_smt` writer - Schmitt trigger enabled for GPIO23."] +pub type REG_GPIO_23_SMT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL11_SPEC, GPIO23SCHMITT_A, O>; +impl<'a, const O: u8> REG_GPIO_23_SMT_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_22_PU_A::DISABLED) + self.variant(GPIO23SCHMITT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_22_PU_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w + self.variant(GPIO23SCHMITT_A::ENABLED) } } -#[doc = "Driving control enabled for GPIO22.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[doc = "Field `reg_gpio_23_drv` reader - Driving control enabled for GPIO23."] +pub type REG_GPIO_23_DRV_R = crate::FieldReader; +#[doc = "Driving control enabled for GPIO23.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_22_DRV_A { +pub enum GPIO23DRIVING_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_22_DRV_A) -> Self { + fn from(variant: GPIO23DRIVING_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_22_drv` reader - Driving control enabled for GPIO22."] -pub struct REG_GPIO_22_DRV_R(crate::FieldReader); -impl REG_GPIO_22_DRV_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_22_DRV_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_23_DRV_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 0 => Some(REG_GPIO_22_DRV_A::DISABLED), - 1 => Some(REG_GPIO_22_DRV_A::ENABLED), + 0 => Some(GPIO23DRIVING_A::DISABLED), + 1 => Some(GPIO23DRIVING_A::ENABLED), _ => None, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_22_DRV_A::DISABLED + *self == GPIO23DRIVING_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_22_DRV_A::ENABLED + *self == GPIO23DRIVING_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_22_DRV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_22_drv` writer - Driving control enabled for GPIO22."] -pub struct REG_GPIO_22_DRV_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_22_DRV_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_22_DRV_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +#[doc = "Field `reg_gpio_23_drv` writer - Driving control enabled for GPIO23."] +pub type REG_GPIO_23_DRV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL11_SPEC, u8, GPIO23DRIVING_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_23_DRV_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_22_DRV_A::DISABLED) + self.variant(GPIO23DRIVING_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_22_DRV_A::ENABLED) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 2)) | ((value as u32 & 0x03) << 2); - self.w + self.variant(GPIO23DRIVING_A::ENABLED) } } -#[doc = "Schmitt trigger enabled for GPIO22.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_22_SMT_A { +#[doc = "Field `reg_gpio_23_pu` reader - Pull Up Resistor for GPIO23."] +pub type REG_GPIO_23_PU_R = crate::BitReader; +#[doc = "Pull Up Resistor for GPIO23.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO23PULL_UP_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_22_SMT_A) -> Self { + fn from(variant: GPIO23PULL_UP_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_22_smt` reader - Schmitt trigger enabled for GPIO22."] -pub struct REG_GPIO_22_SMT_R(crate::FieldReader); -impl REG_GPIO_22_SMT_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_22_SMT_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_23_PU_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_22_SMT_A { + pub fn variant(&self) -> GPIO23PULL_UP_RESISTOR_A { match self.bits { - false => REG_GPIO_22_SMT_A::DISABLED, - true => REG_GPIO_22_SMT_A::ENABLED, + false => GPIO23PULL_UP_RESISTOR_A::DISABLED, + true => GPIO23PULL_UP_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_22_SMT_A::DISABLED + *self == GPIO23PULL_UP_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_22_SMT_A::ENABLED + *self == GPIO23PULL_UP_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_22_SMT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_22_smt` writer - Schmitt trigger enabled for GPIO22."] -pub struct REG_GPIO_22_SMT_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_22_SMT_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_22_SMT_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_23_pu` writer - Pull Up Resistor for GPIO23."] +pub type REG_GPIO_23_PU_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL11_SPEC, GPIO23PULL_UP_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_23_PU_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_22_SMT_A::DISABLED) + self.variant(GPIO23PULL_UP_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_22_SMT_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w + self.variant(GPIO23PULL_UP_RESISTOR_A::ENABLED) } } -#[doc = "Input enable for GPIO22.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_22_IE_A { +#[doc = "Field `reg_gpio_23_pd` reader - Pull Down Resistor for GPIO23."] +pub type REG_GPIO_23_PD_R = crate::BitReader; +#[doc = "Pull Down Resistor for GPIO23.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO23PULL_DOWN_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_22_IE_A) -> Self { + fn from(variant: GPIO23PULL_DOWN_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_22_ie` reader - Input enable for GPIO22."] -pub struct REG_GPIO_22_IE_R(crate::FieldReader); -impl REG_GPIO_22_IE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_22_IE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_23_PD_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_22_IE_A { + pub fn variant(&self) -> GPIO23PULL_DOWN_RESISTOR_A { match self.bits { - false => REG_GPIO_22_IE_A::DISABLED, - true => REG_GPIO_22_IE_A::ENABLED, + false => GPIO23PULL_DOWN_RESISTOR_A::DISABLED, + true => GPIO23PULL_DOWN_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_22_IE_A::DISABLED + *self == GPIO23PULL_DOWN_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_22_IE_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_22_IE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO23PULL_DOWN_RESISTOR_A::ENABLED } } -#[doc = "Field `reg_gpio_22_ie` writer - Input enable for GPIO22."] -pub struct REG_GPIO_22_IE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_22_IE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_22_IE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_23_pd` writer - Pull Down Resistor for GPIO23."] +pub type REG_GPIO_23_PD_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL11_SPEC, GPIO23PULL_DOWN_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_23_PD_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_22_IE_A::DISABLED) + self.variant(GPIO23PULL_DOWN_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_22_IE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + self.variant(GPIO23PULL_DOWN_RESISTOR_A::ENABLED) } } impl R { - #[doc = "Bit 21 - Pull Down Resistor for GPIO23."] + #[doc = "Bit 0 - Input enable for GPIO22."] #[inline(always)] - pub fn reg_gpio_23_pd(&self) -> REG_GPIO_23_PD_R { - REG_GPIO_23_PD_R::new(((self.bits >> 21) & 0x01) != 0) + pub fn reg_gpio_22_ie(&self) -> REG_GPIO_22_IE_R { + REG_GPIO_22_IE_R::new((self.bits & 1) != 0) } - #[doc = "Bit 20 - Pull Up Resistor for GPIO23."] + #[doc = "Bit 1 - Schmitt trigger enabled for GPIO22."] #[inline(always)] - pub fn reg_gpio_23_pu(&self) -> REG_GPIO_23_PU_R { - REG_GPIO_23_PU_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn reg_gpio_22_smt(&self) -> REG_GPIO_22_SMT_R { + REG_GPIO_22_SMT_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bits 18:19 - Driving control enabled for GPIO23."] + #[doc = "Bits 2:3 - Driving control enabled for GPIO22."] #[inline(always)] - pub fn reg_gpio_23_drv(&self) -> REG_GPIO_23_DRV_R { - REG_GPIO_23_DRV_R::new(((self.bits >> 18) & 0x03) as u8) + pub fn reg_gpio_22_drv(&self) -> REG_GPIO_22_DRV_R { + REG_GPIO_22_DRV_R::new(((self.bits >> 2) & 3) as u8) } - #[doc = "Bit 17 - Schmitt trigger enabled for GPIO23."] + #[doc = "Bit 4 - Pull Up Resistor for GPIO22."] #[inline(always)] - pub fn reg_gpio_23_smt(&self) -> REG_GPIO_23_SMT_R { - REG_GPIO_23_SMT_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn reg_gpio_22_pu(&self) -> REG_GPIO_22_PU_R { + REG_GPIO_22_PU_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 16 - Input enable for GPIO23."] + #[doc = "Bit 5 - Pull Down Resistor for GPIO22."] #[inline(always)] - pub fn reg_gpio_23_ie(&self) -> REG_GPIO_23_IE_R { - REG_GPIO_23_IE_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn reg_gpio_22_pd(&self) -> REG_GPIO_22_PD_R { + REG_GPIO_22_PD_R::new(((self.bits >> 5) & 1) != 0) } #[doc = "Bits 8:11 - Function select for GPIO22."] #[inline(always)] pub fn reg_gpio_22_func_sel(&self) -> REG_GPIO_22_FUNC_SEL_R { REG_GPIO_22_FUNC_SEL_R::new(((self.bits >> 8) & 0x0f) as u8) } - #[doc = "Bit 5 - Pull Down Resistor for GPIO22."] + #[doc = "Bit 16 - Input enable for GPIO23."] #[inline(always)] - pub fn reg_gpio_22_pd(&self) -> REG_GPIO_22_PD_R { - REG_GPIO_22_PD_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn reg_gpio_23_ie(&self) -> REG_GPIO_23_IE_R { + REG_GPIO_23_IE_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 4 - Pull Up Resistor for GPIO22."] + #[doc = "Bit 17 - Schmitt trigger enabled for GPIO23."] #[inline(always)] - pub fn reg_gpio_22_pu(&self) -> REG_GPIO_22_PU_R { - REG_GPIO_22_PU_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn reg_gpio_23_smt(&self) -> REG_GPIO_23_SMT_R { + REG_GPIO_23_SMT_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bits 2:3 - Driving control enabled for GPIO22."] + #[doc = "Bits 18:19 - Driving control enabled for GPIO23."] #[inline(always)] - pub fn reg_gpio_22_drv(&self) -> REG_GPIO_22_DRV_R { - REG_GPIO_22_DRV_R::new(((self.bits >> 2) & 0x03) as u8) + pub fn reg_gpio_23_drv(&self) -> REG_GPIO_23_DRV_R { + REG_GPIO_23_DRV_R::new(((self.bits >> 18) & 3) as u8) } - #[doc = "Bit 1 - Schmitt trigger enabled for GPIO22."] + #[doc = "Bit 20 - Pull Up Resistor for GPIO23."] #[inline(always)] - pub fn reg_gpio_22_smt(&self) -> REG_GPIO_22_SMT_R { - REG_GPIO_22_SMT_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn reg_gpio_23_pu(&self) -> REG_GPIO_23_PU_R { + REG_GPIO_23_PU_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bit 0 - Input enable for GPIO22."] + #[doc = "Bit 21 - Pull Down Resistor for GPIO23."] #[inline(always)] - pub fn reg_gpio_22_ie(&self) -> REG_GPIO_22_IE_R { - REG_GPIO_22_IE_R::new((self.bits & 0x01) != 0) + pub fn reg_gpio_23_pd(&self) -> REG_GPIO_23_PD_R { + REG_GPIO_23_PD_R::new(((self.bits >> 21) & 1) != 0) } } impl W { - #[doc = "Bit 21 - Pull Down Resistor for GPIO23."] + #[doc = "Bit 0 - Input enable for GPIO22."] #[inline(always)] - pub fn reg_gpio_23_pd(&mut self) -> REG_GPIO_23_PD_W { - REG_GPIO_23_PD_W { w: self } + #[must_use] + pub fn reg_gpio_22_ie(&mut self) -> REG_GPIO_22_IE_W<0> { + REG_GPIO_22_IE_W::new(self) } - #[doc = "Bit 20 - Pull Up Resistor for GPIO23."] + #[doc = "Bit 1 - Schmitt trigger enabled for GPIO22."] #[inline(always)] - pub fn reg_gpio_23_pu(&mut self) -> REG_GPIO_23_PU_W { - REG_GPIO_23_PU_W { w: self } + #[must_use] + pub fn reg_gpio_22_smt(&mut self) -> REG_GPIO_22_SMT_W<1> { + REG_GPIO_22_SMT_W::new(self) } - #[doc = "Bits 18:19 - Driving control enabled for GPIO23."] + #[doc = "Bits 2:3 - Driving control enabled for GPIO22."] #[inline(always)] - pub fn reg_gpio_23_drv(&mut self) -> REG_GPIO_23_DRV_W { - REG_GPIO_23_DRV_W { w: self } + #[must_use] + pub fn reg_gpio_22_drv(&mut self) -> REG_GPIO_22_DRV_W<2> { + REG_GPIO_22_DRV_W::new(self) } - #[doc = "Bit 17 - Schmitt trigger enabled for GPIO23."] + #[doc = "Bit 4 - Pull Up Resistor for GPIO22."] #[inline(always)] - pub fn reg_gpio_23_smt(&mut self) -> REG_GPIO_23_SMT_W { - REG_GPIO_23_SMT_W { w: self } + #[must_use] + pub fn reg_gpio_22_pu(&mut self) -> REG_GPIO_22_PU_W<4> { + REG_GPIO_22_PU_W::new(self) } - #[doc = "Bit 16 - Input enable for GPIO23."] + #[doc = "Bit 5 - Pull Down Resistor for GPIO22."] #[inline(always)] - pub fn reg_gpio_23_ie(&mut self) -> REG_GPIO_23_IE_W { - REG_GPIO_23_IE_W { w: self } + #[must_use] + pub fn reg_gpio_22_pd(&mut self) -> REG_GPIO_22_PD_W<5> { + REG_GPIO_22_PD_W::new(self) } #[doc = "Bits 8:11 - Function select for GPIO22."] #[inline(always)] - pub fn reg_gpio_22_func_sel(&mut self) -> REG_GPIO_22_FUNC_SEL_W { - REG_GPIO_22_FUNC_SEL_W { w: self } + #[must_use] + pub fn reg_gpio_22_func_sel(&mut self) -> REG_GPIO_22_FUNC_SEL_W<8> { + REG_GPIO_22_FUNC_SEL_W::new(self) } - #[doc = "Bit 5 - Pull Down Resistor for GPIO22."] + #[doc = "Bit 16 - Input enable for GPIO23."] #[inline(always)] - pub fn reg_gpio_22_pd(&mut self) -> REG_GPIO_22_PD_W { - REG_GPIO_22_PD_W { w: self } + #[must_use] + pub fn reg_gpio_23_ie(&mut self) -> REG_GPIO_23_IE_W<16> { + REG_GPIO_23_IE_W::new(self) } - #[doc = "Bit 4 - Pull Up Resistor for GPIO22."] + #[doc = "Bit 17 - Schmitt trigger enabled for GPIO23."] #[inline(always)] - pub fn reg_gpio_22_pu(&mut self) -> REG_GPIO_22_PU_W { - REG_GPIO_22_PU_W { w: self } + #[must_use] + pub fn reg_gpio_23_smt(&mut self) -> REG_GPIO_23_SMT_W<17> { + REG_GPIO_23_SMT_W::new(self) } - #[doc = "Bits 2:3 - Driving control enabled for GPIO22."] + #[doc = "Bits 18:19 - Driving control enabled for GPIO23."] #[inline(always)] - pub fn reg_gpio_22_drv(&mut self) -> REG_GPIO_22_DRV_W { - REG_GPIO_22_DRV_W { w: self } + #[must_use] + pub fn reg_gpio_23_drv(&mut self) -> REG_GPIO_23_DRV_W<18> { + REG_GPIO_23_DRV_W::new(self) } - #[doc = "Bit 1 - Schmitt trigger enabled for GPIO22."] + #[doc = "Bit 20 - Pull Up Resistor for GPIO23."] #[inline(always)] - pub fn reg_gpio_22_smt(&mut self) -> REG_GPIO_22_SMT_W { - REG_GPIO_22_SMT_W { w: self } + #[must_use] + pub fn reg_gpio_23_pu(&mut self) -> REG_GPIO_23_PU_W<20> { + REG_GPIO_23_PU_W::new(self) } - #[doc = "Bit 0 - Input enable for GPIO22."] + #[doc = "Bit 21 - Pull Down Resistor for GPIO23."] #[inline(always)] - pub fn reg_gpio_22_ie(&mut self) -> REG_GPIO_22_IE_W { - REG_GPIO_22_IE_W { w: self } + #[must_use] + pub fn reg_gpio_23_pd(&mut self) -> REG_GPIO_23_PD_W<21> { + REG_GPIO_23_PD_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -1130,11 +822,10 @@ impl crate::Readable for GPIO_CFGCTL11_SPEC { #[doc = "`write(|w| ..)` method takes [gpio_cfgctl11::W](W) writer structure"] impl crate::Writable for GPIO_CFGCTL11_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets GPIO_CFGCTL11 to value 0x0003_0b03"] impl crate::Resettable for GPIO_CFGCTL11_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0003_0b03 - } + const RESET_VALUE: Self::Ux = 0x0003_0b03; } diff --git a/src/glb/gpio_cfgctl12.rs b/src/glb/gpio_cfgctl12.rs index a56b953..ca25228 100644 --- a/src/glb/gpio_cfgctl12.rs +++ b/src/glb/gpio_cfgctl12.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,929 +28,641 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Pull Down Resistor for GPIO25.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_25_PD_A { +#[doc = "Field `reg_gpio_24_ie` reader - Input enable for GPIO24."] +pub type REG_GPIO_24_IE_R = crate::BitReader; +#[doc = "Input enable for GPIO24.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO24INPUT_ENABLED_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_25_PD_A) -> Self { + fn from(variant: GPIO24INPUT_ENABLED_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_25_pd` reader - Pull Down Resistor for GPIO25."] -pub struct REG_GPIO_25_PD_R(crate::FieldReader); -impl REG_GPIO_25_PD_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_25_PD_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_24_IE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_25_PD_A { + pub fn variant(&self) -> GPIO24INPUT_ENABLED_A { match self.bits { - false => REG_GPIO_25_PD_A::DISABLED, - true => REG_GPIO_25_PD_A::ENABLED, + false => GPIO24INPUT_ENABLED_A::DISABLED, + true => GPIO24INPUT_ENABLED_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_25_PD_A::DISABLED + *self == GPIO24INPUT_ENABLED_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_25_PD_A::ENABLED + *self == GPIO24INPUT_ENABLED_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_25_PD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_25_pd` writer - Pull Down Resistor for GPIO25."] -pub struct REG_GPIO_25_PD_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_25_PD_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_25_PD_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_24_ie` writer - Input enable for GPIO24."] +pub type REG_GPIO_24_IE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL12_SPEC, GPIO24INPUT_ENABLED_A, O>; +impl<'a, const O: u8> REG_GPIO_24_IE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_25_PD_A::DISABLED) + self.variant(GPIO24INPUT_ENABLED_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_25_PD_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); - self.w + self.variant(GPIO24INPUT_ENABLED_A::ENABLED) } } -#[doc = "Pull Up Resistor for GPIO25.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_25_PU_A { +#[doc = "Field `reg_gpio_24_smt` reader - Schmitt trigger enabled for GPIO24."] +pub type REG_GPIO_24_SMT_R = crate::BitReader; +#[doc = "Schmitt trigger enabled for GPIO24.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO24SCHMITT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_25_PU_A) -> Self { + fn from(variant: GPIO24SCHMITT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_25_pu` reader - Pull Up Resistor for GPIO25."] -pub struct REG_GPIO_25_PU_R(crate::FieldReader); -impl REG_GPIO_25_PU_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_25_PU_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_24_SMT_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_25_PU_A { + pub fn variant(&self) -> GPIO24SCHMITT_A { match self.bits { - false => REG_GPIO_25_PU_A::DISABLED, - true => REG_GPIO_25_PU_A::ENABLED, + false => GPIO24SCHMITT_A::DISABLED, + true => GPIO24SCHMITT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_25_PU_A::DISABLED + *self == GPIO24SCHMITT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_25_PU_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_25_PU_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO24SCHMITT_A::ENABLED } } -#[doc = "Field `reg_gpio_25_pu` writer - Pull Up Resistor for GPIO25."] -pub struct REG_GPIO_25_PU_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_25_PU_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_25_PU_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_24_smt` writer - Schmitt trigger enabled for GPIO24."] +pub type REG_GPIO_24_SMT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL12_SPEC, GPIO24SCHMITT_A, O>; +impl<'a, const O: u8> REG_GPIO_24_SMT_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_25_PU_A::DISABLED) + self.variant(GPIO24SCHMITT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_25_PU_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w + self.variant(GPIO24SCHMITT_A::ENABLED) } } -#[doc = "Driving control enabled for GPIO25.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[doc = "Field `reg_gpio_24_drv` reader - Driving control enabled for GPIO24."] +pub type REG_GPIO_24_DRV_R = crate::FieldReader; +#[doc = "Driving control enabled for GPIO24.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_25_DRV_A { +pub enum GPIO24DRIVING_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_25_DRV_A) -> Self { + fn from(variant: GPIO24DRIVING_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_25_drv` reader - Driving control enabled for GPIO25."] -pub struct REG_GPIO_25_DRV_R(crate::FieldReader); -impl REG_GPIO_25_DRV_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_25_DRV_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_24_DRV_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 0 => Some(REG_GPIO_25_DRV_A::DISABLED), - 1 => Some(REG_GPIO_25_DRV_A::ENABLED), + 0 => Some(GPIO24DRIVING_A::DISABLED), + 1 => Some(GPIO24DRIVING_A::ENABLED), _ => None, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_25_DRV_A::DISABLED + *self == GPIO24DRIVING_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_25_DRV_A::ENABLED + *self == GPIO24DRIVING_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_25_DRV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_25_drv` writer - Driving control enabled for GPIO25."] -pub struct REG_GPIO_25_DRV_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_25_DRV_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_25_DRV_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +#[doc = "Field `reg_gpio_24_drv` writer - Driving control enabled for GPIO24."] +pub type REG_GPIO_24_DRV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL12_SPEC, u8, GPIO24DRIVING_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_24_DRV_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_25_DRV_A::DISABLED) + self.variant(GPIO24DRIVING_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_25_DRV_A::ENABLED) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 18)) | ((value as u32 & 0x03) << 18); - self.w + self.variant(GPIO24DRIVING_A::ENABLED) } } -#[doc = "Schmitt trigger enabled for GPIO25.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_25_SMT_A { +#[doc = "Field `reg_gpio_24_pu` reader - Pull Up Resistor for GPIO24."] +pub type REG_GPIO_24_PU_R = crate::BitReader; +#[doc = "Pull Up Resistor for GPIO24.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO24PULL_UP_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_25_SMT_A) -> Self { + fn from(variant: GPIO24PULL_UP_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_25_smt` reader - Schmitt trigger enabled for GPIO25."] -pub struct REG_GPIO_25_SMT_R(crate::FieldReader); -impl REG_GPIO_25_SMT_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_25_SMT_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_24_PU_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_25_SMT_A { + pub fn variant(&self) -> GPIO24PULL_UP_RESISTOR_A { match self.bits { - false => REG_GPIO_25_SMT_A::DISABLED, - true => REG_GPIO_25_SMT_A::ENABLED, + false => GPIO24PULL_UP_RESISTOR_A::DISABLED, + true => GPIO24PULL_UP_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_25_SMT_A::DISABLED + *self == GPIO24PULL_UP_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_25_SMT_A::ENABLED + *self == GPIO24PULL_UP_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_25_SMT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_25_smt` writer - Schmitt trigger enabled for GPIO25."] -pub struct REG_GPIO_25_SMT_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_25_SMT_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_25_SMT_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_24_pu` writer - Pull Up Resistor for GPIO24."] +pub type REG_GPIO_24_PU_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL12_SPEC, GPIO24PULL_UP_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_24_PU_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_25_SMT_A::DISABLED) + self.variant(GPIO24PULL_UP_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_25_SMT_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w + self.variant(GPIO24PULL_UP_RESISTOR_A::ENABLED) } } -#[doc = "Input enable for GPIO25.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_25_IE_A { +#[doc = "Field `reg_gpio_24_pd` reader - Pull Down Resistor for GPIO24."] +pub type REG_GPIO_24_PD_R = crate::BitReader; +#[doc = "Pull Down Resistor for GPIO24.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO24PULL_DOWN_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_25_IE_A) -> Self { + fn from(variant: GPIO24PULL_DOWN_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_25_ie` reader - Input enable for GPIO25."] -pub struct REG_GPIO_25_IE_R(crate::FieldReader); -impl REG_GPIO_25_IE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_25_IE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_24_PD_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_25_IE_A { + pub fn variant(&self) -> GPIO24PULL_DOWN_RESISTOR_A { match self.bits { - false => REG_GPIO_25_IE_A::DISABLED, - true => REG_GPIO_25_IE_A::ENABLED, + false => GPIO24PULL_DOWN_RESISTOR_A::DISABLED, + true => GPIO24PULL_DOWN_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_25_IE_A::DISABLED + *self == GPIO24PULL_DOWN_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_25_IE_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_25_IE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO24PULL_DOWN_RESISTOR_A::ENABLED } } -#[doc = "Field `reg_gpio_25_ie` writer - Input enable for GPIO25."] -pub struct REG_GPIO_25_IE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_25_IE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_25_IE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_24_pd` writer - Pull Down Resistor for GPIO24."] +pub type REG_GPIO_24_PD_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL12_SPEC, GPIO24PULL_DOWN_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_24_PD_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_25_IE_A::DISABLED) + self.variant(GPIO24PULL_DOWN_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_25_IE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w + self.variant(GPIO24PULL_DOWN_RESISTOR_A::ENABLED) } } -#[doc = "Pull Down Resistor for GPIO24.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_24_PD_A { +#[doc = "Field `reg_gpio_25_ie` reader - Input enable for GPIO25."] +pub type REG_GPIO_25_IE_R = crate::BitReader; +#[doc = "Input enable for GPIO25.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO25INPUT_ENABLED_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_24_PD_A) -> Self { + fn from(variant: GPIO25INPUT_ENABLED_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_24_pd` reader - Pull Down Resistor for GPIO24."] -pub struct REG_GPIO_24_PD_R(crate::FieldReader); -impl REG_GPIO_24_PD_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_24_PD_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_25_IE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_24_PD_A { + pub fn variant(&self) -> GPIO25INPUT_ENABLED_A { match self.bits { - false => REG_GPIO_24_PD_A::DISABLED, - true => REG_GPIO_24_PD_A::ENABLED, + false => GPIO25INPUT_ENABLED_A::DISABLED, + true => GPIO25INPUT_ENABLED_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_24_PD_A::DISABLED + *self == GPIO25INPUT_ENABLED_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_24_PD_A::ENABLED + *self == GPIO25INPUT_ENABLED_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_24_PD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_24_pd` writer - Pull Down Resistor for GPIO24."] -pub struct REG_GPIO_24_PD_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_24_PD_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_24_PD_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_25_ie` writer - Input enable for GPIO25."] +pub type REG_GPIO_25_IE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL12_SPEC, GPIO25INPUT_ENABLED_A, O>; +impl<'a, const O: u8> REG_GPIO_25_IE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_24_PD_A::DISABLED) + self.variant(GPIO25INPUT_ENABLED_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_24_PD_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w + self.variant(GPIO25INPUT_ENABLED_A::ENABLED) } } -#[doc = "Pull Up Resistor for GPIO24.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_24_PU_A { +#[doc = "Field `reg_gpio_25_smt` reader - Schmitt trigger enabled for GPIO25."] +pub type REG_GPIO_25_SMT_R = crate::BitReader; +#[doc = "Schmitt trigger enabled for GPIO25.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO25SCHMITT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_24_PU_A) -> Self { + fn from(variant: GPIO25SCHMITT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_24_pu` reader - Pull Up Resistor for GPIO24."] -pub struct REG_GPIO_24_PU_R(crate::FieldReader); -impl REG_GPIO_24_PU_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_24_PU_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_25_SMT_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_24_PU_A { + pub fn variant(&self) -> GPIO25SCHMITT_A { match self.bits { - false => REG_GPIO_24_PU_A::DISABLED, - true => REG_GPIO_24_PU_A::ENABLED, + false => GPIO25SCHMITT_A::DISABLED, + true => GPIO25SCHMITT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_24_PU_A::DISABLED + *self == GPIO25SCHMITT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_24_PU_A::ENABLED + *self == GPIO25SCHMITT_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_24_PU_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_24_pu` writer - Pull Up Resistor for GPIO24."] -pub struct REG_GPIO_24_PU_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_24_PU_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_24_PU_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_25_smt` writer - Schmitt trigger enabled for GPIO25."] +pub type REG_GPIO_25_SMT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL12_SPEC, GPIO25SCHMITT_A, O>; +impl<'a, const O: u8> REG_GPIO_25_SMT_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_24_PU_A::DISABLED) + self.variant(GPIO25SCHMITT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_24_PU_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w + self.variant(GPIO25SCHMITT_A::ENABLED) } } -#[doc = "Driving control enabled for GPIO24.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[doc = "Field `reg_gpio_25_drv` reader - Driving control enabled for GPIO25."] +pub type REG_GPIO_25_DRV_R = crate::FieldReader; +#[doc = "Driving control enabled for GPIO25.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_24_DRV_A { +pub enum GPIO25DRIVING_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_24_DRV_A) -> Self { + fn from(variant: GPIO25DRIVING_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_24_drv` reader - Driving control enabled for GPIO24."] -pub struct REG_GPIO_24_DRV_R(crate::FieldReader); -impl REG_GPIO_24_DRV_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_24_DRV_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_25_DRV_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 0 => Some(REG_GPIO_24_DRV_A::DISABLED), - 1 => Some(REG_GPIO_24_DRV_A::ENABLED), + 0 => Some(GPIO25DRIVING_A::DISABLED), + 1 => Some(GPIO25DRIVING_A::ENABLED), _ => None, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_24_DRV_A::DISABLED + *self == GPIO25DRIVING_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_24_DRV_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_24_DRV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO25DRIVING_A::ENABLED } } -#[doc = "Field `reg_gpio_24_drv` writer - Driving control enabled for GPIO24."] -pub struct REG_GPIO_24_DRV_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_24_DRV_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_24_DRV_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +#[doc = "Field `reg_gpio_25_drv` writer - Driving control enabled for GPIO25."] +pub type REG_GPIO_25_DRV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL12_SPEC, u8, GPIO25DRIVING_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_25_DRV_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_24_DRV_A::DISABLED) + self.variant(GPIO25DRIVING_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_24_DRV_A::ENABLED) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 2)) | ((value as u32 & 0x03) << 2); - self.w + self.variant(GPIO25DRIVING_A::ENABLED) } } -#[doc = "Schmitt trigger enabled for GPIO24.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_24_SMT_A { +#[doc = "Field `reg_gpio_25_pu` reader - Pull Up Resistor for GPIO25."] +pub type REG_GPIO_25_PU_R = crate::BitReader; +#[doc = "Pull Up Resistor for GPIO25.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO25PULL_UP_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_24_SMT_A) -> Self { + fn from(variant: GPIO25PULL_UP_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_24_smt` reader - Schmitt trigger enabled for GPIO24."] -pub struct REG_GPIO_24_SMT_R(crate::FieldReader); -impl REG_GPIO_24_SMT_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_24_SMT_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_25_PU_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_24_SMT_A { + pub fn variant(&self) -> GPIO25PULL_UP_RESISTOR_A { match self.bits { - false => REG_GPIO_24_SMT_A::DISABLED, - true => REG_GPIO_24_SMT_A::ENABLED, + false => GPIO25PULL_UP_RESISTOR_A::DISABLED, + true => GPIO25PULL_UP_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_24_SMT_A::DISABLED + *self == GPIO25PULL_UP_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_24_SMT_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_24_SMT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO25PULL_UP_RESISTOR_A::ENABLED } } -#[doc = "Field `reg_gpio_24_smt` writer - Schmitt trigger enabled for GPIO24."] -pub struct REG_GPIO_24_SMT_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_24_SMT_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_24_SMT_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_25_pu` writer - Pull Up Resistor for GPIO25."] +pub type REG_GPIO_25_PU_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL12_SPEC, GPIO25PULL_UP_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_25_PU_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_24_SMT_A::DISABLED) + self.variant(GPIO25PULL_UP_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_24_SMT_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w + self.variant(GPIO25PULL_UP_RESISTOR_A::ENABLED) } } -#[doc = "Input enable for GPIO24.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_24_IE_A { +#[doc = "Field `reg_gpio_25_pd` reader - Pull Down Resistor for GPIO25."] +pub type REG_GPIO_25_PD_R = crate::BitReader; +#[doc = "Pull Down Resistor for GPIO25.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO25PULL_DOWN_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_24_IE_A) -> Self { + fn from(variant: GPIO25PULL_DOWN_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_24_ie` reader - Input enable for GPIO24."] -pub struct REG_GPIO_24_IE_R(crate::FieldReader); -impl REG_GPIO_24_IE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_24_IE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_25_PD_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_24_IE_A { + pub fn variant(&self) -> GPIO25PULL_DOWN_RESISTOR_A { match self.bits { - false => REG_GPIO_24_IE_A::DISABLED, - true => REG_GPIO_24_IE_A::ENABLED, + false => GPIO25PULL_DOWN_RESISTOR_A::DISABLED, + true => GPIO25PULL_DOWN_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_24_IE_A::DISABLED + *self == GPIO25PULL_DOWN_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_24_IE_A::ENABLED + *self == GPIO25PULL_DOWN_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_24_IE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_24_ie` writer - Input enable for GPIO24."] -pub struct REG_GPIO_24_IE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_24_IE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_24_IE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_25_pd` writer - Pull Down Resistor for GPIO25."] +pub type REG_GPIO_25_PD_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL12_SPEC, GPIO25PULL_DOWN_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_25_PD_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_24_IE_A::DISABLED) + self.variant(GPIO25PULL_DOWN_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_24_IE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + self.variant(GPIO25PULL_DOWN_RESISTOR_A::ENABLED) } } impl R { - #[doc = "Bit 21 - Pull Down Resistor for GPIO25."] - #[inline(always)] - pub fn reg_gpio_25_pd(&self) -> REG_GPIO_25_PD_R { - REG_GPIO_25_PD_R::new(((self.bits >> 21) & 0x01) != 0) - } - #[doc = "Bit 20 - Pull Up Resistor for GPIO25."] + #[doc = "Bit 0 - Input enable for GPIO24."] #[inline(always)] - pub fn reg_gpio_25_pu(&self) -> REG_GPIO_25_PU_R { - REG_GPIO_25_PU_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn reg_gpio_24_ie(&self) -> REG_GPIO_24_IE_R { + REG_GPIO_24_IE_R::new((self.bits & 1) != 0) } - #[doc = "Bits 18:19 - Driving control enabled for GPIO25."] + #[doc = "Bit 1 - Schmitt trigger enabled for GPIO24."] #[inline(always)] - pub fn reg_gpio_25_drv(&self) -> REG_GPIO_25_DRV_R { - REG_GPIO_25_DRV_R::new(((self.bits >> 18) & 0x03) as u8) + pub fn reg_gpio_24_smt(&self) -> REG_GPIO_24_SMT_R { + REG_GPIO_24_SMT_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 17 - Schmitt trigger enabled for GPIO25."] + #[doc = "Bits 2:3 - Driving control enabled for GPIO24."] #[inline(always)] - pub fn reg_gpio_25_smt(&self) -> REG_GPIO_25_SMT_R { - REG_GPIO_25_SMT_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn reg_gpio_24_drv(&self) -> REG_GPIO_24_DRV_R { + REG_GPIO_24_DRV_R::new(((self.bits >> 2) & 3) as u8) } - #[doc = "Bit 16 - Input enable for GPIO25."] + #[doc = "Bit 4 - Pull Up Resistor for GPIO24."] #[inline(always)] - pub fn reg_gpio_25_ie(&self) -> REG_GPIO_25_IE_R { - REG_GPIO_25_IE_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn reg_gpio_24_pu(&self) -> REG_GPIO_24_PU_R { + REG_GPIO_24_PU_R::new(((self.bits >> 4) & 1) != 0) } #[doc = "Bit 5 - Pull Down Resistor for GPIO24."] #[inline(always)] pub fn reg_gpio_24_pd(&self) -> REG_GPIO_24_PD_R { - REG_GPIO_24_PD_R::new(((self.bits >> 5) & 0x01) != 0) + REG_GPIO_24_PD_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 4 - Pull Up Resistor for GPIO24."] + #[doc = "Bit 16 - Input enable for GPIO25."] #[inline(always)] - pub fn reg_gpio_24_pu(&self) -> REG_GPIO_24_PU_R { - REG_GPIO_24_PU_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn reg_gpio_25_ie(&self) -> REG_GPIO_25_IE_R { + REG_GPIO_25_IE_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bits 2:3 - Driving control enabled for GPIO24."] + #[doc = "Bit 17 - Schmitt trigger enabled for GPIO25."] #[inline(always)] - pub fn reg_gpio_24_drv(&self) -> REG_GPIO_24_DRV_R { - REG_GPIO_24_DRV_R::new(((self.bits >> 2) & 0x03) as u8) + pub fn reg_gpio_25_smt(&self) -> REG_GPIO_25_SMT_R { + REG_GPIO_25_SMT_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bit 1 - Schmitt trigger enabled for GPIO24."] + #[doc = "Bits 18:19 - Driving control enabled for GPIO25."] #[inline(always)] - pub fn reg_gpio_24_smt(&self) -> REG_GPIO_24_SMT_R { - REG_GPIO_24_SMT_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn reg_gpio_25_drv(&self) -> REG_GPIO_25_DRV_R { + REG_GPIO_25_DRV_R::new(((self.bits >> 18) & 3) as u8) } - #[doc = "Bit 0 - Input enable for GPIO24."] + #[doc = "Bit 20 - Pull Up Resistor for GPIO25."] #[inline(always)] - pub fn reg_gpio_24_ie(&self) -> REG_GPIO_24_IE_R { - REG_GPIO_24_IE_R::new((self.bits & 0x01) != 0) + pub fn reg_gpio_25_pu(&self) -> REG_GPIO_25_PU_R { + REG_GPIO_25_PU_R::new(((self.bits >> 20) & 1) != 0) } -} -impl W { #[doc = "Bit 21 - Pull Down Resistor for GPIO25."] #[inline(always)] - pub fn reg_gpio_25_pd(&mut self) -> REG_GPIO_25_PD_W { - REG_GPIO_25_PD_W { w: self } + pub fn reg_gpio_25_pd(&self) -> REG_GPIO_25_PD_R { + REG_GPIO_25_PD_R::new(((self.bits >> 21) & 1) != 0) } - #[doc = "Bit 20 - Pull Up Resistor for GPIO25."] +} +impl W { + #[doc = "Bit 0 - Input enable for GPIO24."] #[inline(always)] - pub fn reg_gpio_25_pu(&mut self) -> REG_GPIO_25_PU_W { - REG_GPIO_25_PU_W { w: self } + #[must_use] + pub fn reg_gpio_24_ie(&mut self) -> REG_GPIO_24_IE_W<0> { + REG_GPIO_24_IE_W::new(self) } - #[doc = "Bits 18:19 - Driving control enabled for GPIO25."] + #[doc = "Bit 1 - Schmitt trigger enabled for GPIO24."] #[inline(always)] - pub fn reg_gpio_25_drv(&mut self) -> REG_GPIO_25_DRV_W { - REG_GPIO_25_DRV_W { w: self } + #[must_use] + pub fn reg_gpio_24_smt(&mut self) -> REG_GPIO_24_SMT_W<1> { + REG_GPIO_24_SMT_W::new(self) } - #[doc = "Bit 17 - Schmitt trigger enabled for GPIO25."] + #[doc = "Bits 2:3 - Driving control enabled for GPIO24."] #[inline(always)] - pub fn reg_gpio_25_smt(&mut self) -> REG_GPIO_25_SMT_W { - REG_GPIO_25_SMT_W { w: self } + #[must_use] + pub fn reg_gpio_24_drv(&mut self) -> REG_GPIO_24_DRV_W<2> { + REG_GPIO_24_DRV_W::new(self) } - #[doc = "Bit 16 - Input enable for GPIO25."] + #[doc = "Bit 4 - Pull Up Resistor for GPIO24."] #[inline(always)] - pub fn reg_gpio_25_ie(&mut self) -> REG_GPIO_25_IE_W { - REG_GPIO_25_IE_W { w: self } + #[must_use] + pub fn reg_gpio_24_pu(&mut self) -> REG_GPIO_24_PU_W<4> { + REG_GPIO_24_PU_W::new(self) } #[doc = "Bit 5 - Pull Down Resistor for GPIO24."] #[inline(always)] - pub fn reg_gpio_24_pd(&mut self) -> REG_GPIO_24_PD_W { - REG_GPIO_24_PD_W { w: self } + #[must_use] + pub fn reg_gpio_24_pd(&mut self) -> REG_GPIO_24_PD_W<5> { + REG_GPIO_24_PD_W::new(self) } - #[doc = "Bit 4 - Pull Up Resistor for GPIO24."] + #[doc = "Bit 16 - Input enable for GPIO25."] #[inline(always)] - pub fn reg_gpio_24_pu(&mut self) -> REG_GPIO_24_PU_W { - REG_GPIO_24_PU_W { w: self } + #[must_use] + pub fn reg_gpio_25_ie(&mut self) -> REG_GPIO_25_IE_W<16> { + REG_GPIO_25_IE_W::new(self) } - #[doc = "Bits 2:3 - Driving control enabled for GPIO24."] + #[doc = "Bit 17 - Schmitt trigger enabled for GPIO25."] #[inline(always)] - pub fn reg_gpio_24_drv(&mut self) -> REG_GPIO_24_DRV_W { - REG_GPIO_24_DRV_W { w: self } + #[must_use] + pub fn reg_gpio_25_smt(&mut self) -> REG_GPIO_25_SMT_W<17> { + REG_GPIO_25_SMT_W::new(self) } - #[doc = "Bit 1 - Schmitt trigger enabled for GPIO24."] + #[doc = "Bits 18:19 - Driving control enabled for GPIO25."] #[inline(always)] - pub fn reg_gpio_24_smt(&mut self) -> REG_GPIO_24_SMT_W { - REG_GPIO_24_SMT_W { w: self } + #[must_use] + pub fn reg_gpio_25_drv(&mut self) -> REG_GPIO_25_DRV_W<18> { + REG_GPIO_25_DRV_W::new(self) } - #[doc = "Bit 0 - Input enable for GPIO24."] + #[doc = "Bit 20 - Pull Up Resistor for GPIO25."] + #[inline(always)] + #[must_use] + pub fn reg_gpio_25_pu(&mut self) -> REG_GPIO_25_PU_W<20> { + REG_GPIO_25_PU_W::new(self) + } + #[doc = "Bit 21 - Pull Down Resistor for GPIO25."] #[inline(always)] - pub fn reg_gpio_24_ie(&mut self) -> REG_GPIO_24_IE_W { - REG_GPIO_24_IE_W { w: self } + #[must_use] + pub fn reg_gpio_25_pd(&mut self) -> REG_GPIO_25_PD_W<21> { + REG_GPIO_25_PD_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -967,11 +680,10 @@ impl crate::Readable for GPIO_CFGCTL12_SPEC { #[doc = "`write(|w| ..)` method takes [gpio_cfgctl12::W](W) writer structure"] impl crate::Writable for GPIO_CFGCTL12_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets GPIO_CFGCTL12 to value 0x0003_0023"] impl crate::Resettable for GPIO_CFGCTL12_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0003_0023 - } + const RESET_VALUE: Self::Ux = 0x0003_0023; } diff --git a/src/glb/gpio_cfgctl13.rs b/src/glb/gpio_cfgctl13.rs index b94f085..a592390 100644 --- a/src/glb/gpio_cfgctl13.rs +++ b/src/glb/gpio_cfgctl13.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,929 +28,641 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Pull Down Resistor for GPIO27.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_27_PD_A { +#[doc = "Field `reg_gpio_26_ie` reader - Input enable for GPIO26."] +pub type REG_GPIO_26_IE_R = crate::BitReader; +#[doc = "Input enable for GPIO26.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO26INPUT_ENABLED_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_27_PD_A) -> Self { + fn from(variant: GPIO26INPUT_ENABLED_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_27_pd` reader - Pull Down Resistor for GPIO27."] -pub struct REG_GPIO_27_PD_R(crate::FieldReader); -impl REG_GPIO_27_PD_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_27_PD_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_26_IE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_27_PD_A { + pub fn variant(&self) -> GPIO26INPUT_ENABLED_A { match self.bits { - false => REG_GPIO_27_PD_A::DISABLED, - true => REG_GPIO_27_PD_A::ENABLED, + false => GPIO26INPUT_ENABLED_A::DISABLED, + true => GPIO26INPUT_ENABLED_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_27_PD_A::DISABLED + *self == GPIO26INPUT_ENABLED_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_27_PD_A::ENABLED + *self == GPIO26INPUT_ENABLED_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_27_PD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_27_pd` writer - Pull Down Resistor for GPIO27."] -pub struct REG_GPIO_27_PD_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_27_PD_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_27_PD_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_26_ie` writer - Input enable for GPIO26."] +pub type REG_GPIO_26_IE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL13_SPEC, GPIO26INPUT_ENABLED_A, O>; +impl<'a, const O: u8> REG_GPIO_26_IE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_27_PD_A::DISABLED) + self.variant(GPIO26INPUT_ENABLED_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_27_PD_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); - self.w + self.variant(GPIO26INPUT_ENABLED_A::ENABLED) } } -#[doc = "Pull Up Resistor for GPIO27.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_27_PU_A { +#[doc = "Field `reg_gpio_26_smt` reader - Schmitt trigger enabled for GPIO26."] +pub type REG_GPIO_26_SMT_R = crate::BitReader; +#[doc = "Schmitt trigger enabled for GPIO26.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO26SCHMITT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_27_PU_A) -> Self { + fn from(variant: GPIO26SCHMITT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_27_pu` reader - Pull Up Resistor for GPIO27."] -pub struct REG_GPIO_27_PU_R(crate::FieldReader); -impl REG_GPIO_27_PU_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_27_PU_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_26_SMT_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_27_PU_A { + pub fn variant(&self) -> GPIO26SCHMITT_A { match self.bits { - false => REG_GPIO_27_PU_A::DISABLED, - true => REG_GPIO_27_PU_A::ENABLED, + false => GPIO26SCHMITT_A::DISABLED, + true => GPIO26SCHMITT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_27_PU_A::DISABLED + *self == GPIO26SCHMITT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_27_PU_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_27_PU_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO26SCHMITT_A::ENABLED } } -#[doc = "Field `reg_gpio_27_pu` writer - Pull Up Resistor for GPIO27."] -pub struct REG_GPIO_27_PU_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_27_PU_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_27_PU_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_26_smt` writer - Schmitt trigger enabled for GPIO26."] +pub type REG_GPIO_26_SMT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL13_SPEC, GPIO26SCHMITT_A, O>; +impl<'a, const O: u8> REG_GPIO_26_SMT_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_27_PU_A::DISABLED) + self.variant(GPIO26SCHMITT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_27_PU_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w + self.variant(GPIO26SCHMITT_A::ENABLED) } } -#[doc = "Driving control enabled for GPIO27.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[doc = "Field `reg_gpio_26_drv` reader - Driving control enabled for GPIO26."] +pub type REG_GPIO_26_DRV_R = crate::FieldReader; +#[doc = "Driving control enabled for GPIO26.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_27_DRV_A { +pub enum GPIO26DRIVING_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_27_DRV_A) -> Self { + fn from(variant: GPIO26DRIVING_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_27_drv` reader - Driving control enabled for GPIO27."] -pub struct REG_GPIO_27_DRV_R(crate::FieldReader); -impl REG_GPIO_27_DRV_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_27_DRV_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_26_DRV_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 0 => Some(REG_GPIO_27_DRV_A::DISABLED), - 1 => Some(REG_GPIO_27_DRV_A::ENABLED), + 0 => Some(GPIO26DRIVING_A::DISABLED), + 1 => Some(GPIO26DRIVING_A::ENABLED), _ => None, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_27_DRV_A::DISABLED + *self == GPIO26DRIVING_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_27_DRV_A::ENABLED + *self == GPIO26DRIVING_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_27_DRV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_27_drv` writer - Driving control enabled for GPIO27."] -pub struct REG_GPIO_27_DRV_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_27_DRV_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_27_DRV_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +#[doc = "Field `reg_gpio_26_drv` writer - Driving control enabled for GPIO26."] +pub type REG_GPIO_26_DRV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL13_SPEC, u8, GPIO26DRIVING_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_26_DRV_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_27_DRV_A::DISABLED) + self.variant(GPIO26DRIVING_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_27_DRV_A::ENABLED) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 18)) | ((value as u32 & 0x03) << 18); - self.w + self.variant(GPIO26DRIVING_A::ENABLED) } } -#[doc = "Schmitt trigger enabled for GPIO27.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_27_SMT_A { +#[doc = "Field `reg_gpio_26_pu` reader - Pull Up Resistor for GPIO26."] +pub type REG_GPIO_26_PU_R = crate::BitReader; +#[doc = "Pull Up Resistor for GPIO26.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO26PULL_UP_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_27_SMT_A) -> Self { + fn from(variant: GPIO26PULL_UP_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_27_smt` reader - Schmitt trigger enabled for GPIO27."] -pub struct REG_GPIO_27_SMT_R(crate::FieldReader); -impl REG_GPIO_27_SMT_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_27_SMT_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_26_PU_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_27_SMT_A { + pub fn variant(&self) -> GPIO26PULL_UP_RESISTOR_A { match self.bits { - false => REG_GPIO_27_SMT_A::DISABLED, - true => REG_GPIO_27_SMT_A::ENABLED, + false => GPIO26PULL_UP_RESISTOR_A::DISABLED, + true => GPIO26PULL_UP_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_27_SMT_A::DISABLED + *self == GPIO26PULL_UP_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_27_SMT_A::ENABLED + *self == GPIO26PULL_UP_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_27_SMT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_27_smt` writer - Schmitt trigger enabled for GPIO27."] -pub struct REG_GPIO_27_SMT_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_27_SMT_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_27_SMT_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_26_pu` writer - Pull Up Resistor for GPIO26."] +pub type REG_GPIO_26_PU_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL13_SPEC, GPIO26PULL_UP_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_26_PU_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_27_SMT_A::DISABLED) + self.variant(GPIO26PULL_UP_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_27_SMT_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w + self.variant(GPIO26PULL_UP_RESISTOR_A::ENABLED) } } -#[doc = "Input enable for GPIO27.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_27_IE_A { +#[doc = "Field `reg_gpio_26_pd` reader - Pull Down Resistor for GPIO26."] +pub type REG_GPIO_26_PD_R = crate::BitReader; +#[doc = "Pull Down Resistor for GPIO26.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO26PULL_DOWN_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_27_IE_A) -> Self { + fn from(variant: GPIO26PULL_DOWN_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_27_ie` reader - Input enable for GPIO27."] -pub struct REG_GPIO_27_IE_R(crate::FieldReader); -impl REG_GPIO_27_IE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_27_IE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_26_PD_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_27_IE_A { + pub fn variant(&self) -> GPIO26PULL_DOWN_RESISTOR_A { match self.bits { - false => REG_GPIO_27_IE_A::DISABLED, - true => REG_GPIO_27_IE_A::ENABLED, + false => GPIO26PULL_DOWN_RESISTOR_A::DISABLED, + true => GPIO26PULL_DOWN_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_27_IE_A::DISABLED + *self == GPIO26PULL_DOWN_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_27_IE_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_27_IE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO26PULL_DOWN_RESISTOR_A::ENABLED } } -#[doc = "Field `reg_gpio_27_ie` writer - Input enable for GPIO27."] -pub struct REG_GPIO_27_IE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_27_IE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_27_IE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_26_pd` writer - Pull Down Resistor for GPIO26."] +pub type REG_GPIO_26_PD_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL13_SPEC, GPIO26PULL_DOWN_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_26_PD_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_27_IE_A::DISABLED) + self.variant(GPIO26PULL_DOWN_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_27_IE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w + self.variant(GPIO26PULL_DOWN_RESISTOR_A::ENABLED) } } -#[doc = "Pull Down Resistor for GPIO26.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_26_PD_A { +#[doc = "Field `reg_gpio_27_ie` reader - Input enable for GPIO27."] +pub type REG_GPIO_27_IE_R = crate::BitReader; +#[doc = "Input enable for GPIO27.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO27INPUT_ENABLED_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_26_PD_A) -> Self { + fn from(variant: GPIO27INPUT_ENABLED_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_26_pd` reader - Pull Down Resistor for GPIO26."] -pub struct REG_GPIO_26_PD_R(crate::FieldReader); -impl REG_GPIO_26_PD_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_26_PD_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_27_IE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_26_PD_A { + pub fn variant(&self) -> GPIO27INPUT_ENABLED_A { match self.bits { - false => REG_GPIO_26_PD_A::DISABLED, - true => REG_GPIO_26_PD_A::ENABLED, + false => GPIO27INPUT_ENABLED_A::DISABLED, + true => GPIO27INPUT_ENABLED_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_26_PD_A::DISABLED + *self == GPIO27INPUT_ENABLED_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_26_PD_A::ENABLED + *self == GPIO27INPUT_ENABLED_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_26_PD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_26_pd` writer - Pull Down Resistor for GPIO26."] -pub struct REG_GPIO_26_PD_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_26_PD_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_26_PD_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_27_ie` writer - Input enable for GPIO27."] +pub type REG_GPIO_27_IE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL13_SPEC, GPIO27INPUT_ENABLED_A, O>; +impl<'a, const O: u8> REG_GPIO_27_IE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_26_PD_A::DISABLED) + self.variant(GPIO27INPUT_ENABLED_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_26_PD_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w + self.variant(GPIO27INPUT_ENABLED_A::ENABLED) } } -#[doc = "Pull Up Resistor for GPIO26.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_26_PU_A { +#[doc = "Field `reg_gpio_27_smt` reader - Schmitt trigger enabled for GPIO27."] +pub type REG_GPIO_27_SMT_R = crate::BitReader; +#[doc = "Schmitt trigger enabled for GPIO27.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO27SCHMITT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_26_PU_A) -> Self { + fn from(variant: GPIO27SCHMITT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_26_pu` reader - Pull Up Resistor for GPIO26."] -pub struct REG_GPIO_26_PU_R(crate::FieldReader); -impl REG_GPIO_26_PU_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_26_PU_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_27_SMT_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_26_PU_A { + pub fn variant(&self) -> GPIO27SCHMITT_A { match self.bits { - false => REG_GPIO_26_PU_A::DISABLED, - true => REG_GPIO_26_PU_A::ENABLED, + false => GPIO27SCHMITT_A::DISABLED, + true => GPIO27SCHMITT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_26_PU_A::DISABLED + *self == GPIO27SCHMITT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_26_PU_A::ENABLED + *self == GPIO27SCHMITT_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_26_PU_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_26_pu` writer - Pull Up Resistor for GPIO26."] -pub struct REG_GPIO_26_PU_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_26_PU_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_26_PU_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_27_smt` writer - Schmitt trigger enabled for GPIO27."] +pub type REG_GPIO_27_SMT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL13_SPEC, GPIO27SCHMITT_A, O>; +impl<'a, const O: u8> REG_GPIO_27_SMT_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_26_PU_A::DISABLED) + self.variant(GPIO27SCHMITT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_26_PU_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w + self.variant(GPIO27SCHMITT_A::ENABLED) } } -#[doc = "Driving control enabled for GPIO26.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[doc = "Field `reg_gpio_27_drv` reader - Driving control enabled for GPIO27."] +pub type REG_GPIO_27_DRV_R = crate::FieldReader; +#[doc = "Driving control enabled for GPIO27.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_26_DRV_A { +pub enum GPIO27DRIVING_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_26_DRV_A) -> Self { + fn from(variant: GPIO27DRIVING_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_26_drv` reader - Driving control enabled for GPIO26."] -pub struct REG_GPIO_26_DRV_R(crate::FieldReader); -impl REG_GPIO_26_DRV_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_26_DRV_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_27_DRV_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 0 => Some(REG_GPIO_26_DRV_A::DISABLED), - 1 => Some(REG_GPIO_26_DRV_A::ENABLED), + 0 => Some(GPIO27DRIVING_A::DISABLED), + 1 => Some(GPIO27DRIVING_A::ENABLED), _ => None, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_26_DRV_A::DISABLED + *self == GPIO27DRIVING_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_26_DRV_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_26_DRV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO27DRIVING_A::ENABLED } } -#[doc = "Field `reg_gpio_26_drv` writer - Driving control enabled for GPIO26."] -pub struct REG_GPIO_26_DRV_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_26_DRV_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_26_DRV_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +#[doc = "Field `reg_gpio_27_drv` writer - Driving control enabled for GPIO27."] +pub type REG_GPIO_27_DRV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL13_SPEC, u8, GPIO27DRIVING_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_27_DRV_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_26_DRV_A::DISABLED) + self.variant(GPIO27DRIVING_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_26_DRV_A::ENABLED) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 2)) | ((value as u32 & 0x03) << 2); - self.w + self.variant(GPIO27DRIVING_A::ENABLED) } } -#[doc = "Schmitt trigger enabled for GPIO26.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_26_SMT_A { +#[doc = "Field `reg_gpio_27_pu` reader - Pull Up Resistor for GPIO27."] +pub type REG_GPIO_27_PU_R = crate::BitReader; +#[doc = "Pull Up Resistor for GPIO27.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO27PULL_UP_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_26_SMT_A) -> Self { + fn from(variant: GPIO27PULL_UP_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_26_smt` reader - Schmitt trigger enabled for GPIO26."] -pub struct REG_GPIO_26_SMT_R(crate::FieldReader); -impl REG_GPIO_26_SMT_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_26_SMT_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_27_PU_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_26_SMT_A { + pub fn variant(&self) -> GPIO27PULL_UP_RESISTOR_A { match self.bits { - false => REG_GPIO_26_SMT_A::DISABLED, - true => REG_GPIO_26_SMT_A::ENABLED, + false => GPIO27PULL_UP_RESISTOR_A::DISABLED, + true => GPIO27PULL_UP_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_26_SMT_A::DISABLED + *self == GPIO27PULL_UP_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_26_SMT_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_26_SMT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO27PULL_UP_RESISTOR_A::ENABLED } } -#[doc = "Field `reg_gpio_26_smt` writer - Schmitt trigger enabled for GPIO26."] -pub struct REG_GPIO_26_SMT_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_26_SMT_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_26_SMT_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_27_pu` writer - Pull Up Resistor for GPIO27."] +pub type REG_GPIO_27_PU_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL13_SPEC, GPIO27PULL_UP_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_27_PU_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_26_SMT_A::DISABLED) + self.variant(GPIO27PULL_UP_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_26_SMT_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w + self.variant(GPIO27PULL_UP_RESISTOR_A::ENABLED) } } -#[doc = "Input enable for GPIO26.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_26_IE_A { +#[doc = "Field `reg_gpio_27_pd` reader - Pull Down Resistor for GPIO27."] +pub type REG_GPIO_27_PD_R = crate::BitReader; +#[doc = "Pull Down Resistor for GPIO27.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO27PULL_DOWN_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_26_IE_A) -> Self { + fn from(variant: GPIO27PULL_DOWN_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_26_ie` reader - Input enable for GPIO26."] -pub struct REG_GPIO_26_IE_R(crate::FieldReader); -impl REG_GPIO_26_IE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_26_IE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_27_PD_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_26_IE_A { + pub fn variant(&self) -> GPIO27PULL_DOWN_RESISTOR_A { match self.bits { - false => REG_GPIO_26_IE_A::DISABLED, - true => REG_GPIO_26_IE_A::ENABLED, + false => GPIO27PULL_DOWN_RESISTOR_A::DISABLED, + true => GPIO27PULL_DOWN_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_26_IE_A::DISABLED + *self == GPIO27PULL_DOWN_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_26_IE_A::ENABLED + *self == GPIO27PULL_DOWN_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_26_IE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_26_ie` writer - Input enable for GPIO26."] -pub struct REG_GPIO_26_IE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_26_IE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_26_IE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_27_pd` writer - Pull Down Resistor for GPIO27."] +pub type REG_GPIO_27_PD_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL13_SPEC, GPIO27PULL_DOWN_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_27_PD_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_26_IE_A::DISABLED) + self.variant(GPIO27PULL_DOWN_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_26_IE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + self.variant(GPIO27PULL_DOWN_RESISTOR_A::ENABLED) } } impl R { - #[doc = "Bit 21 - Pull Down Resistor for GPIO27."] - #[inline(always)] - pub fn reg_gpio_27_pd(&self) -> REG_GPIO_27_PD_R { - REG_GPIO_27_PD_R::new(((self.bits >> 21) & 0x01) != 0) - } - #[doc = "Bit 20 - Pull Up Resistor for GPIO27."] + #[doc = "Bit 0 - Input enable for GPIO26."] #[inline(always)] - pub fn reg_gpio_27_pu(&self) -> REG_GPIO_27_PU_R { - REG_GPIO_27_PU_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn reg_gpio_26_ie(&self) -> REG_GPIO_26_IE_R { + REG_GPIO_26_IE_R::new((self.bits & 1) != 0) } - #[doc = "Bits 18:19 - Driving control enabled for GPIO27."] + #[doc = "Bit 1 - Schmitt trigger enabled for GPIO26."] #[inline(always)] - pub fn reg_gpio_27_drv(&self) -> REG_GPIO_27_DRV_R { - REG_GPIO_27_DRV_R::new(((self.bits >> 18) & 0x03) as u8) + pub fn reg_gpio_26_smt(&self) -> REG_GPIO_26_SMT_R { + REG_GPIO_26_SMT_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 17 - Schmitt trigger enabled for GPIO27."] + #[doc = "Bits 2:3 - Driving control enabled for GPIO26."] #[inline(always)] - pub fn reg_gpio_27_smt(&self) -> REG_GPIO_27_SMT_R { - REG_GPIO_27_SMT_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn reg_gpio_26_drv(&self) -> REG_GPIO_26_DRV_R { + REG_GPIO_26_DRV_R::new(((self.bits >> 2) & 3) as u8) } - #[doc = "Bit 16 - Input enable for GPIO27."] + #[doc = "Bit 4 - Pull Up Resistor for GPIO26."] #[inline(always)] - pub fn reg_gpio_27_ie(&self) -> REG_GPIO_27_IE_R { - REG_GPIO_27_IE_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn reg_gpio_26_pu(&self) -> REG_GPIO_26_PU_R { + REG_GPIO_26_PU_R::new(((self.bits >> 4) & 1) != 0) } #[doc = "Bit 5 - Pull Down Resistor for GPIO26."] #[inline(always)] pub fn reg_gpio_26_pd(&self) -> REG_GPIO_26_PD_R { - REG_GPIO_26_PD_R::new(((self.bits >> 5) & 0x01) != 0) + REG_GPIO_26_PD_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 4 - Pull Up Resistor for GPIO26."] + #[doc = "Bit 16 - Input enable for GPIO27."] #[inline(always)] - pub fn reg_gpio_26_pu(&self) -> REG_GPIO_26_PU_R { - REG_GPIO_26_PU_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn reg_gpio_27_ie(&self) -> REG_GPIO_27_IE_R { + REG_GPIO_27_IE_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bits 2:3 - Driving control enabled for GPIO26."] + #[doc = "Bit 17 - Schmitt trigger enabled for GPIO27."] #[inline(always)] - pub fn reg_gpio_26_drv(&self) -> REG_GPIO_26_DRV_R { - REG_GPIO_26_DRV_R::new(((self.bits >> 2) & 0x03) as u8) + pub fn reg_gpio_27_smt(&self) -> REG_GPIO_27_SMT_R { + REG_GPIO_27_SMT_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bit 1 - Schmitt trigger enabled for GPIO26."] + #[doc = "Bits 18:19 - Driving control enabled for GPIO27."] #[inline(always)] - pub fn reg_gpio_26_smt(&self) -> REG_GPIO_26_SMT_R { - REG_GPIO_26_SMT_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn reg_gpio_27_drv(&self) -> REG_GPIO_27_DRV_R { + REG_GPIO_27_DRV_R::new(((self.bits >> 18) & 3) as u8) } - #[doc = "Bit 0 - Input enable for GPIO26."] + #[doc = "Bit 20 - Pull Up Resistor for GPIO27."] #[inline(always)] - pub fn reg_gpio_26_ie(&self) -> REG_GPIO_26_IE_R { - REG_GPIO_26_IE_R::new((self.bits & 0x01) != 0) + pub fn reg_gpio_27_pu(&self) -> REG_GPIO_27_PU_R { + REG_GPIO_27_PU_R::new(((self.bits >> 20) & 1) != 0) } -} -impl W { #[doc = "Bit 21 - Pull Down Resistor for GPIO27."] #[inline(always)] - pub fn reg_gpio_27_pd(&mut self) -> REG_GPIO_27_PD_W { - REG_GPIO_27_PD_W { w: self } + pub fn reg_gpio_27_pd(&self) -> REG_GPIO_27_PD_R { + REG_GPIO_27_PD_R::new(((self.bits >> 21) & 1) != 0) } - #[doc = "Bit 20 - Pull Up Resistor for GPIO27."] +} +impl W { + #[doc = "Bit 0 - Input enable for GPIO26."] #[inline(always)] - pub fn reg_gpio_27_pu(&mut self) -> REG_GPIO_27_PU_W { - REG_GPIO_27_PU_W { w: self } + #[must_use] + pub fn reg_gpio_26_ie(&mut self) -> REG_GPIO_26_IE_W<0> { + REG_GPIO_26_IE_W::new(self) } - #[doc = "Bits 18:19 - Driving control enabled for GPIO27."] + #[doc = "Bit 1 - Schmitt trigger enabled for GPIO26."] #[inline(always)] - pub fn reg_gpio_27_drv(&mut self) -> REG_GPIO_27_DRV_W { - REG_GPIO_27_DRV_W { w: self } + #[must_use] + pub fn reg_gpio_26_smt(&mut self) -> REG_GPIO_26_SMT_W<1> { + REG_GPIO_26_SMT_W::new(self) } - #[doc = "Bit 17 - Schmitt trigger enabled for GPIO27."] + #[doc = "Bits 2:3 - Driving control enabled for GPIO26."] #[inline(always)] - pub fn reg_gpio_27_smt(&mut self) -> REG_GPIO_27_SMT_W { - REG_GPIO_27_SMT_W { w: self } + #[must_use] + pub fn reg_gpio_26_drv(&mut self) -> REG_GPIO_26_DRV_W<2> { + REG_GPIO_26_DRV_W::new(self) } - #[doc = "Bit 16 - Input enable for GPIO27."] + #[doc = "Bit 4 - Pull Up Resistor for GPIO26."] #[inline(always)] - pub fn reg_gpio_27_ie(&mut self) -> REG_GPIO_27_IE_W { - REG_GPIO_27_IE_W { w: self } + #[must_use] + pub fn reg_gpio_26_pu(&mut self) -> REG_GPIO_26_PU_W<4> { + REG_GPIO_26_PU_W::new(self) } #[doc = "Bit 5 - Pull Down Resistor for GPIO26."] #[inline(always)] - pub fn reg_gpio_26_pd(&mut self) -> REG_GPIO_26_PD_W { - REG_GPIO_26_PD_W { w: self } + #[must_use] + pub fn reg_gpio_26_pd(&mut self) -> REG_GPIO_26_PD_W<5> { + REG_GPIO_26_PD_W::new(self) } - #[doc = "Bit 4 - Pull Up Resistor for GPIO26."] + #[doc = "Bit 16 - Input enable for GPIO27."] #[inline(always)] - pub fn reg_gpio_26_pu(&mut self) -> REG_GPIO_26_PU_W { - REG_GPIO_26_PU_W { w: self } + #[must_use] + pub fn reg_gpio_27_ie(&mut self) -> REG_GPIO_27_IE_W<16> { + REG_GPIO_27_IE_W::new(self) } - #[doc = "Bits 2:3 - Driving control enabled for GPIO26."] + #[doc = "Bit 17 - Schmitt trigger enabled for GPIO27."] #[inline(always)] - pub fn reg_gpio_26_drv(&mut self) -> REG_GPIO_26_DRV_W { - REG_GPIO_26_DRV_W { w: self } + #[must_use] + pub fn reg_gpio_27_smt(&mut self) -> REG_GPIO_27_SMT_W<17> { + REG_GPIO_27_SMT_W::new(self) } - #[doc = "Bit 1 - Schmitt trigger enabled for GPIO26."] + #[doc = "Bits 18:19 - Driving control enabled for GPIO27."] #[inline(always)] - pub fn reg_gpio_26_smt(&mut self) -> REG_GPIO_26_SMT_W { - REG_GPIO_26_SMT_W { w: self } + #[must_use] + pub fn reg_gpio_27_drv(&mut self) -> REG_GPIO_27_DRV_W<18> { + REG_GPIO_27_DRV_W::new(self) } - #[doc = "Bit 0 - Input enable for GPIO26."] + #[doc = "Bit 20 - Pull Up Resistor for GPIO27."] + #[inline(always)] + #[must_use] + pub fn reg_gpio_27_pu(&mut self) -> REG_GPIO_27_PU_W<20> { + REG_GPIO_27_PU_W::new(self) + } + #[doc = "Bit 21 - Pull Down Resistor for GPIO27."] #[inline(always)] - pub fn reg_gpio_26_ie(&mut self) -> REG_GPIO_26_IE_W { - REG_GPIO_26_IE_W { w: self } + #[must_use] + pub fn reg_gpio_27_pd(&mut self) -> REG_GPIO_27_PD_W<21> { + REG_GPIO_27_PD_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -967,11 +680,10 @@ impl crate::Readable for GPIO_CFGCTL13_SPEC { #[doc = "`write(|w| ..)` method takes [gpio_cfgctl13::W](W) writer structure"] impl crate::Writable for GPIO_CFGCTL13_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets GPIO_CFGCTL13 to value 0x0003_0003"] impl crate::Resettable for GPIO_CFGCTL13_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0003_0003 - } + const RESET_VALUE: Self::Ux = 0x0003_0003; } diff --git a/src/glb/gpio_cfgctl14.rs b/src/glb/gpio_cfgctl14.rs index b0f8755..19ac10e 100644 --- a/src/glb/gpio_cfgctl14.rs +++ b/src/glb/gpio_cfgctl14.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,472 +28,329 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Pull Down Resistor for GPIO28.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_28_PD_A { +#[doc = "Field `reg_gpio_28_ie` reader - Input enable for GPIO28."] +pub type REG_GPIO_28_IE_R = crate::BitReader; +#[doc = "Input enable for GPIO28.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO28INPUT_ENABLED_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_28_PD_A) -> Self { + fn from(variant: GPIO28INPUT_ENABLED_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_28_pd` reader - Pull Down Resistor for GPIO28."] -pub struct REG_GPIO_28_PD_R(crate::FieldReader); -impl REG_GPIO_28_PD_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_28_PD_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_28_IE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_28_PD_A { + pub fn variant(&self) -> GPIO28INPUT_ENABLED_A { match self.bits { - false => REG_GPIO_28_PD_A::DISABLED, - true => REG_GPIO_28_PD_A::ENABLED, + false => GPIO28INPUT_ENABLED_A::DISABLED, + true => GPIO28INPUT_ENABLED_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_28_PD_A::DISABLED + *self == GPIO28INPUT_ENABLED_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_28_PD_A::ENABLED + *self == GPIO28INPUT_ENABLED_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_28_PD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_28_pd` writer - Pull Down Resistor for GPIO28."] -pub struct REG_GPIO_28_PD_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_28_PD_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_28_PD_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_28_ie` writer - Input enable for GPIO28."] +pub type REG_GPIO_28_IE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL14_SPEC, GPIO28INPUT_ENABLED_A, O>; +impl<'a, const O: u8> REG_GPIO_28_IE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_28_PD_A::DISABLED) + self.variant(GPIO28INPUT_ENABLED_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_28_PD_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w + self.variant(GPIO28INPUT_ENABLED_A::ENABLED) } } -#[doc = "Pull Up Resistor for GPIO28.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_28_PU_A { +#[doc = "Field `reg_gpio_28_smt` reader - Schmitt trigger enabled for GPIO28."] +pub type REG_GPIO_28_SMT_R = crate::BitReader; +#[doc = "Schmitt trigger enabled for GPIO28.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO28SCHMITT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_28_PU_A) -> Self { + fn from(variant: GPIO28SCHMITT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_28_pu` reader - Pull Up Resistor for GPIO28."] -pub struct REG_GPIO_28_PU_R(crate::FieldReader); -impl REG_GPIO_28_PU_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_28_PU_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_28_SMT_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_28_PU_A { + pub fn variant(&self) -> GPIO28SCHMITT_A { match self.bits { - false => REG_GPIO_28_PU_A::DISABLED, - true => REG_GPIO_28_PU_A::ENABLED, + false => GPIO28SCHMITT_A::DISABLED, + true => GPIO28SCHMITT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_28_PU_A::DISABLED + *self == GPIO28SCHMITT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_28_PU_A::ENABLED + *self == GPIO28SCHMITT_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_28_PU_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_28_pu` writer - Pull Up Resistor for GPIO28."] -pub struct REG_GPIO_28_PU_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_28_PU_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_28_PU_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_28_smt` writer - Schmitt trigger enabled for GPIO28."] +pub type REG_GPIO_28_SMT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL14_SPEC, GPIO28SCHMITT_A, O>; +impl<'a, const O: u8> REG_GPIO_28_SMT_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_28_PU_A::DISABLED) + self.variant(GPIO28SCHMITT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_28_PU_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w + self.variant(GPIO28SCHMITT_A::ENABLED) } } +#[doc = "Field `reg_gpio_28_drv` reader - Driving control enabled for GPIO28."] +pub type REG_GPIO_28_DRV_R = crate::FieldReader; #[doc = "Driving control enabled for GPIO28.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_28_DRV_A { +pub enum GPIO28DRIVING_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_28_DRV_A) -> Self { + fn from(variant: GPIO28DRIVING_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_28_drv` reader - Driving control enabled for GPIO28."] -pub struct REG_GPIO_28_DRV_R(crate::FieldReader); impl REG_GPIO_28_DRV_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_28_DRV_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 0 => Some(REG_GPIO_28_DRV_A::DISABLED), - 1 => Some(REG_GPIO_28_DRV_A::ENABLED), + 0 => Some(GPIO28DRIVING_A::DISABLED), + 1 => Some(GPIO28DRIVING_A::ENABLED), _ => None, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_28_DRV_A::DISABLED + *self == GPIO28DRIVING_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_28_DRV_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_28_DRV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO28DRIVING_A::ENABLED } } #[doc = "Field `reg_gpio_28_drv` writer - Driving control enabled for GPIO28."] -pub struct REG_GPIO_28_DRV_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_28_DRV_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_28_DRV_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +pub type REG_GPIO_28_DRV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL14_SPEC, u8, GPIO28DRIVING_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_28_DRV_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_28_DRV_A::DISABLED) + self.variant(GPIO28DRIVING_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_28_DRV_A::ENABLED) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 2)) | ((value as u32 & 0x03) << 2); - self.w + self.variant(GPIO28DRIVING_A::ENABLED) } } -#[doc = "Schmitt trigger enabled for GPIO28.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_28_SMT_A { +#[doc = "Field `reg_gpio_28_pu` reader - Pull Up Resistor for GPIO28."] +pub type REG_GPIO_28_PU_R = crate::BitReader; +#[doc = "Pull Up Resistor for GPIO28.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO28PULL_UP_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_28_SMT_A) -> Self { + fn from(variant: GPIO28PULL_UP_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_28_smt` reader - Schmitt trigger enabled for GPIO28."] -pub struct REG_GPIO_28_SMT_R(crate::FieldReader); -impl REG_GPIO_28_SMT_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_28_SMT_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_28_PU_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_28_SMT_A { + pub fn variant(&self) -> GPIO28PULL_UP_RESISTOR_A { match self.bits { - false => REG_GPIO_28_SMT_A::DISABLED, - true => REG_GPIO_28_SMT_A::ENABLED, + false => GPIO28PULL_UP_RESISTOR_A::DISABLED, + true => GPIO28PULL_UP_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_28_SMT_A::DISABLED + *self == GPIO28PULL_UP_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_28_SMT_A::ENABLED + *self == GPIO28PULL_UP_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_28_SMT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_28_smt` writer - Schmitt trigger enabled for GPIO28."] -pub struct REG_GPIO_28_SMT_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_28_SMT_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_28_SMT_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_28_pu` writer - Pull Up Resistor for GPIO28."] +pub type REG_GPIO_28_PU_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL14_SPEC, GPIO28PULL_UP_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_28_PU_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_28_SMT_A::DISABLED) + self.variant(GPIO28PULL_UP_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_28_SMT_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w + self.variant(GPIO28PULL_UP_RESISTOR_A::ENABLED) } } -#[doc = "Input enable for GPIO28.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_28_IE_A { +#[doc = "Field `reg_gpio_28_pd` reader - Pull Down Resistor for GPIO28."] +pub type REG_GPIO_28_PD_R = crate::BitReader; +#[doc = "Pull Down Resistor for GPIO28.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO28PULL_DOWN_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_28_IE_A) -> Self { + fn from(variant: GPIO28PULL_DOWN_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_28_ie` reader - Input enable for GPIO28."] -pub struct REG_GPIO_28_IE_R(crate::FieldReader); -impl REG_GPIO_28_IE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_28_IE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_28_PD_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_28_IE_A { + pub fn variant(&self) -> GPIO28PULL_DOWN_RESISTOR_A { match self.bits { - false => REG_GPIO_28_IE_A::DISABLED, - true => REG_GPIO_28_IE_A::ENABLED, + false => GPIO28PULL_DOWN_RESISTOR_A::DISABLED, + true => GPIO28PULL_DOWN_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_28_IE_A::DISABLED + *self == GPIO28PULL_DOWN_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_28_IE_A::ENABLED + *self == GPIO28PULL_DOWN_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_28_IE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_28_ie` writer - Input enable for GPIO28."] -pub struct REG_GPIO_28_IE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_28_IE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_28_IE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_28_pd` writer - Pull Down Resistor for GPIO28."] +pub type REG_GPIO_28_PD_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL14_SPEC, GPIO28PULL_DOWN_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_28_PD_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_28_IE_A::DISABLED) + self.variant(GPIO28PULL_DOWN_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_28_IE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + self.variant(GPIO28PULL_DOWN_RESISTOR_A::ENABLED) } } impl R { - #[doc = "Bit 5 - Pull Down Resistor for GPIO28."] + #[doc = "Bit 0 - Input enable for GPIO28."] #[inline(always)] - pub fn reg_gpio_28_pd(&self) -> REG_GPIO_28_PD_R { - REG_GPIO_28_PD_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn reg_gpio_28_ie(&self) -> REG_GPIO_28_IE_R { + REG_GPIO_28_IE_R::new((self.bits & 1) != 0) } - #[doc = "Bit 4 - Pull Up Resistor for GPIO28."] + #[doc = "Bit 1 - Schmitt trigger enabled for GPIO28."] #[inline(always)] - pub fn reg_gpio_28_pu(&self) -> REG_GPIO_28_PU_R { - REG_GPIO_28_PU_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn reg_gpio_28_smt(&self) -> REG_GPIO_28_SMT_R { + REG_GPIO_28_SMT_R::new(((self.bits >> 1) & 1) != 0) } #[doc = "Bits 2:3 - Driving control enabled for GPIO28."] #[inline(always)] pub fn reg_gpio_28_drv(&self) -> REG_GPIO_28_DRV_R { - REG_GPIO_28_DRV_R::new(((self.bits >> 2) & 0x03) as u8) + REG_GPIO_28_DRV_R::new(((self.bits >> 2) & 3) as u8) } - #[doc = "Bit 1 - Schmitt trigger enabled for GPIO28."] + #[doc = "Bit 4 - Pull Up Resistor for GPIO28."] #[inline(always)] - pub fn reg_gpio_28_smt(&self) -> REG_GPIO_28_SMT_R { - REG_GPIO_28_SMT_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn reg_gpio_28_pu(&self) -> REG_GPIO_28_PU_R { + REG_GPIO_28_PU_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 0 - Input enable for GPIO28."] + #[doc = "Bit 5 - Pull Down Resistor for GPIO28."] #[inline(always)] - pub fn reg_gpio_28_ie(&self) -> REG_GPIO_28_IE_R { - REG_GPIO_28_IE_R::new((self.bits & 0x01) != 0) + pub fn reg_gpio_28_pd(&self) -> REG_GPIO_28_PD_R { + REG_GPIO_28_PD_R::new(((self.bits >> 5) & 1) != 0) } } impl W { - #[doc = "Bit 5 - Pull Down Resistor for GPIO28."] + #[doc = "Bit 0 - Input enable for GPIO28."] #[inline(always)] - pub fn reg_gpio_28_pd(&mut self) -> REG_GPIO_28_PD_W { - REG_GPIO_28_PD_W { w: self } + #[must_use] + pub fn reg_gpio_28_ie(&mut self) -> REG_GPIO_28_IE_W<0> { + REG_GPIO_28_IE_W::new(self) } - #[doc = "Bit 4 - Pull Up Resistor for GPIO28."] + #[doc = "Bit 1 - Schmitt trigger enabled for GPIO28."] #[inline(always)] - pub fn reg_gpio_28_pu(&mut self) -> REG_GPIO_28_PU_W { - REG_GPIO_28_PU_W { w: self } + #[must_use] + pub fn reg_gpio_28_smt(&mut self) -> REG_GPIO_28_SMT_W<1> { + REG_GPIO_28_SMT_W::new(self) } #[doc = "Bits 2:3 - Driving control enabled for GPIO28."] #[inline(always)] - pub fn reg_gpio_28_drv(&mut self) -> REG_GPIO_28_DRV_W { - REG_GPIO_28_DRV_W { w: self } + #[must_use] + pub fn reg_gpio_28_drv(&mut self) -> REG_GPIO_28_DRV_W<2> { + REG_GPIO_28_DRV_W::new(self) } - #[doc = "Bit 1 - Schmitt trigger enabled for GPIO28."] + #[doc = "Bit 4 - Pull Up Resistor for GPIO28."] #[inline(always)] - pub fn reg_gpio_28_smt(&mut self) -> REG_GPIO_28_SMT_W { - REG_GPIO_28_SMT_W { w: self } + #[must_use] + pub fn reg_gpio_28_pu(&mut self) -> REG_GPIO_28_PU_W<4> { + REG_GPIO_28_PU_W::new(self) } - #[doc = "Bit 0 - Input enable for GPIO28."] + #[doc = "Bit 5 - Pull Down Resistor for GPIO28."] #[inline(always)] - pub fn reg_gpio_28_ie(&mut self) -> REG_GPIO_28_IE_W { - REG_GPIO_28_IE_W { w: self } + #[must_use] + pub fn reg_gpio_28_pd(&mut self) -> REG_GPIO_28_PD_W<5> { + REG_GPIO_28_PD_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -510,11 +368,10 @@ impl crate::Readable for GPIO_CFGCTL14_SPEC { #[doc = "`write(|w| ..)` method takes [gpio_cfgctl14::W](W) writer structure"] impl crate::Writable for GPIO_CFGCTL14_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets GPIO_CFGCTL14 to value 0x03"] impl crate::Resettable for GPIO_CFGCTL14_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x03 - } + const RESET_VALUE: Self::Ux = 0x03; } diff --git a/src/glb/gpio_cfgctl2.rs b/src/glb/gpio_cfgctl2.rs index 66f9571..f0eb22e 100644 --- a/src/glb/gpio_cfgctl2.rs +++ b/src/glb/gpio_cfgctl2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,732 +28,275 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -#[repr(u8)] -pub enum REAL_GPIO_5_FUNC_SEL_A { - #[doc = "0: Function select is reg_gpio_5_func_sel"] - GLB_GPIO_REAL_MODE_REG = 0, - #[doc = "1: `1`"] - GLB_GPIO_REAL_MODE_SDIO = 1, - #[doc = "12: `1100`"] - GLB_GPIO_REAL_MODE_RF = 12, - #[doc = "14: `1110`"] - GLB_GPIO_REAL_MODE_JTAG = 14, - #[doc = "15: `1111`"] - GLB_GPIO_REAL_MODE_CCI = 15, -} -impl From for u8 { - #[inline(always)] - fn from(variant: REAL_GPIO_5_FUNC_SEL_A) -> Self { - variant as _ - } -} -#[doc = "Field `real_gpio_5_func_sel` reader - "] -pub struct REAL_GPIO_5_FUNC_SEL_R(crate::FieldReader); -impl REAL_GPIO_5_FUNC_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - REAL_GPIO_5_FUNC_SEL_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(REAL_GPIO_5_FUNC_SEL_A::GLB_GPIO_REAL_MODE_REG), - 1 => Some(REAL_GPIO_5_FUNC_SEL_A::GLB_GPIO_REAL_MODE_SDIO), - 12 => Some(REAL_GPIO_5_FUNC_SEL_A::GLB_GPIO_REAL_MODE_RF), - 14 => Some(REAL_GPIO_5_FUNC_SEL_A::GLB_GPIO_REAL_MODE_JTAG), - 15 => Some(REAL_GPIO_5_FUNC_SEL_A::GLB_GPIO_REAL_MODE_CCI), - _ => None, - } - } - #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_REG`"] - #[inline(always)] - pub fn is_glb_gpio_real_mode_reg(&self) -> bool { - **self == REAL_GPIO_5_FUNC_SEL_A::GLB_GPIO_REAL_MODE_REG - } - #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_SDIO`"] - #[inline(always)] - pub fn is_glb_gpio_real_mode_sdio(&self) -> bool { - **self == REAL_GPIO_5_FUNC_SEL_A::GLB_GPIO_REAL_MODE_SDIO - } - #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_RF`"] - #[inline(always)] - pub fn is_glb_gpio_real_mode_rf(&self) -> bool { - **self == REAL_GPIO_5_FUNC_SEL_A::GLB_GPIO_REAL_MODE_RF - } - #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_JTAG`"] - #[inline(always)] - pub fn is_glb_gpio_real_mode_jtag(&self) -> bool { - **self == REAL_GPIO_5_FUNC_SEL_A::GLB_GPIO_REAL_MODE_JTAG - } - #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_CCI`"] - #[inline(always)] - pub fn is_glb_gpio_real_mode_cci(&self) -> bool { - **self == REAL_GPIO_5_FUNC_SEL_A::GLB_GPIO_REAL_MODE_CCI - } -} -impl core::ops::Deref for REAL_GPIO_5_FUNC_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Function select for GPIO5.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -#[repr(u8)] -pub enum REG_GPIO_5_FUNC_SEL_A { +#[doc = "Field `reg_gpio_4_ie` reader - Input enable for GPIO4."] +pub type REG_GPIO_4_IE_R = crate::BitReader; +#[doc = "Input enable for GPIO4.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO4INPUT_ENABLED_A { + #[doc = "0: `0`"] + DISABLED = 0, #[doc = "1: `1`"] - SDIO_DAT3 = 1, - #[doc = "4: `100`"] - SPI_MOSI_SPI_MISO = 4, - #[doc = "6: `110`"] - I2C_SDA = 6, - #[doc = "7: `111`"] - UART_SIG5 = 7, - #[doc = "8: `1000`"] - PWM_CH0 = 8, - #[doc = "9: `1001`"] - FEM_GPIO_1 = 9, - #[doc = "10: `1010`"] - GPIP_CH4 = 10, - #[doc = "11: `1011`"] - SWGPIO_5 = 11, - #[doc = "14: `1110`"] - E21_TDI = 14, + ENABLED = 1, } -impl From for u8 { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_5_FUNC_SEL_A) -> Self { - variant as _ + fn from(variant: GPIO4INPUT_ENABLED_A) -> Self { + variant as u8 != 0 } } -#[doc = "Field `reg_gpio_5_func_sel` reader - Function select for GPIO5."] -pub struct REG_GPIO_5_FUNC_SEL_R(crate::FieldReader); -impl REG_GPIO_5_FUNC_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_5_FUNC_SEL_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_4_IE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> GPIO4INPUT_ENABLED_A { match self.bits { - 1 => Some(REG_GPIO_5_FUNC_SEL_A::SDIO_DAT3), - 4 => Some(REG_GPIO_5_FUNC_SEL_A::SPI_MOSI_SPI_MISO), - 6 => Some(REG_GPIO_5_FUNC_SEL_A::I2C_SDA), - 7 => Some(REG_GPIO_5_FUNC_SEL_A::UART_SIG5), - 8 => Some(REG_GPIO_5_FUNC_SEL_A::PWM_CH0), - 9 => Some(REG_GPIO_5_FUNC_SEL_A::FEM_GPIO_1), - 10 => Some(REG_GPIO_5_FUNC_SEL_A::GPIP_CH4), - 11 => Some(REG_GPIO_5_FUNC_SEL_A::SWGPIO_5), - 14 => Some(REG_GPIO_5_FUNC_SEL_A::E21_TDI), - _ => None, + false => GPIO4INPUT_ENABLED_A::DISABLED, + true => GPIO4INPUT_ENABLED_A::ENABLED, } } - #[doc = "Checks if the value of the field is `SDIO_DAT3`"] - #[inline(always)] - pub fn is_sdio_dat3(&self) -> bool { - **self == REG_GPIO_5_FUNC_SEL_A::SDIO_DAT3 - } - #[doc = "Checks if the value of the field is `SPI_MOSI_SPI_MISO`"] - #[inline(always)] - pub fn is_spi_mosi_spi_miso(&self) -> bool { - **self == REG_GPIO_5_FUNC_SEL_A::SPI_MOSI_SPI_MISO - } - #[doc = "Checks if the value of the field is `I2C_SDA`"] - #[inline(always)] - pub fn is_i2c_sda(&self) -> bool { - **self == REG_GPIO_5_FUNC_SEL_A::I2C_SDA - } - #[doc = "Checks if the value of the field is `UART_SIG5`"] - #[inline(always)] - pub fn is_uart_sig5(&self) -> bool { - **self == REG_GPIO_5_FUNC_SEL_A::UART_SIG5 - } - #[doc = "Checks if the value of the field is `PWM_CH0`"] - #[inline(always)] - pub fn is_pwm_ch0(&self) -> bool { - **self == REG_GPIO_5_FUNC_SEL_A::PWM_CH0 - } - #[doc = "Checks if the value of the field is `FEM_GPIO_1`"] - #[inline(always)] - pub fn is_fem_gpio_1(&self) -> bool { - **self == REG_GPIO_5_FUNC_SEL_A::FEM_GPIO_1 - } - #[doc = "Checks if the value of the field is `GPIP_CH4`"] - #[inline(always)] - pub fn is_gpip_ch4(&self) -> bool { - **self == REG_GPIO_5_FUNC_SEL_A::GPIP_CH4 - } - #[doc = "Checks if the value of the field is `SWGPIO_5`"] - #[inline(always)] - pub fn is_swgpio_5(&self) -> bool { - **self == REG_GPIO_5_FUNC_SEL_A::SWGPIO_5 - } - #[doc = "Checks if the value of the field is `E21_TDI`"] + #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] - pub fn is_e21_tdi(&self) -> bool { - **self == REG_GPIO_5_FUNC_SEL_A::E21_TDI + pub fn is_disabled(&self) -> bool { + *self == GPIO4INPUT_ENABLED_A::DISABLED } -} -impl core::ops::Deref for REG_GPIO_5_FUNC_SEL_R { - type Target = crate::FieldReader; + #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn is_enabled(&self) -> bool { + *self == GPIO4INPUT_ENABLED_A::ENABLED } } -#[doc = "Field `reg_gpio_5_func_sel` writer - Function select for GPIO5."] -pub struct REG_GPIO_5_FUNC_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_5_FUNC_SEL_W<'a> { - #[doc = r"Writes `variant` to the field"] +#[doc = "Field `reg_gpio_4_ie` writer - Input enable for GPIO4."] +pub type REG_GPIO_4_IE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL2_SPEC, GPIO4INPUT_ENABLED_A, O>; +impl<'a, const O: u8> REG_GPIO_4_IE_W<'a, O> { + #[doc = "`0`"] #[inline(always)] - pub fn variant(self, variant: REG_GPIO_5_FUNC_SEL_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } + pub fn disabled(self) -> &'a mut W { + self.variant(GPIO4INPUT_ENABLED_A::DISABLED) } #[doc = "`1`"] #[inline(always)] - pub fn sdio_dat3(self) -> &'a mut W { - self.variant(REG_GPIO_5_FUNC_SEL_A::SDIO_DAT3) - } - #[doc = "`100`"] - #[inline(always)] - pub fn spi_mosi_spi_miso(self) -> &'a mut W { - self.variant(REG_GPIO_5_FUNC_SEL_A::SPI_MOSI_SPI_MISO) - } - #[doc = "`110`"] - #[inline(always)] - pub fn i2c_sda(self) -> &'a mut W { - self.variant(REG_GPIO_5_FUNC_SEL_A::I2C_SDA) - } - #[doc = "`111`"] - #[inline(always)] - pub fn uart_sig5(self) -> &'a mut W { - self.variant(REG_GPIO_5_FUNC_SEL_A::UART_SIG5) - } - #[doc = "`1000`"] - #[inline(always)] - pub fn pwm_ch0(self) -> &'a mut W { - self.variant(REG_GPIO_5_FUNC_SEL_A::PWM_CH0) - } - #[doc = "`1001`"] - #[inline(always)] - pub fn fem_gpio_1(self) -> &'a mut W { - self.variant(REG_GPIO_5_FUNC_SEL_A::FEM_GPIO_1) - } - #[doc = "`1010`"] - #[inline(always)] - pub fn gpip_ch4(self) -> &'a mut W { - self.variant(REG_GPIO_5_FUNC_SEL_A::GPIP_CH4) - } - #[doc = "`1011`"] - #[inline(always)] - pub fn swgpio_5(self) -> &'a mut W { - self.variant(REG_GPIO_5_FUNC_SEL_A::SWGPIO_5) - } - #[doc = "`1110`"] - #[inline(always)] - pub fn e21_tdi(self) -> &'a mut W { - self.variant(REG_GPIO_5_FUNC_SEL_A::E21_TDI) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 24)) | ((value as u32 & 0x0f) << 24); - self.w + pub fn enabled(self) -> &'a mut W { + self.variant(GPIO4INPUT_ENABLED_A::ENABLED) } } -#[doc = "Pull Down Resistor for GPIO5.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_5_PD_A { +#[doc = "Field `reg_gpio_4_smt` reader - Schmitt trigger enabled for GPIO4."] +pub type REG_GPIO_4_SMT_R = crate::BitReader; +#[doc = "Schmitt trigger enabled for GPIO4.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO4SCHMITT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_5_PD_A) -> Self { + fn from(variant: GPIO4SCHMITT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_5_pd` reader - Pull Down Resistor for GPIO5."] -pub struct REG_GPIO_5_PD_R(crate::FieldReader); -impl REG_GPIO_5_PD_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_5_PD_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_4_SMT_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_5_PD_A { + pub fn variant(&self) -> GPIO4SCHMITT_A { match self.bits { - false => REG_GPIO_5_PD_A::DISABLED, - true => REG_GPIO_5_PD_A::ENABLED, + false => GPIO4SCHMITT_A::DISABLED, + true => GPIO4SCHMITT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_5_PD_A::DISABLED + *self == GPIO4SCHMITT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_5_PD_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_5_PD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO4SCHMITT_A::ENABLED } } -#[doc = "Field `reg_gpio_5_pd` writer - Pull Down Resistor for GPIO5."] -pub struct REG_GPIO_5_PD_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_5_PD_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_5_PD_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_4_smt` writer - Schmitt trigger enabled for GPIO4."] +pub type REG_GPIO_4_SMT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL2_SPEC, GPIO4SCHMITT_A, O>; +impl<'a, const O: u8> REG_GPIO_4_SMT_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_5_PD_A::DISABLED) + self.variant(GPIO4SCHMITT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_5_PD_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); - self.w + self.variant(GPIO4SCHMITT_A::ENABLED) } } -#[doc = "Pull Up Resistor for GPIO5.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_5_PU_A { +#[doc = "Field `reg_gpio_4_drv` reader - Driving control enabled for GPIO4."] +pub type REG_GPIO_4_DRV_R = crate::FieldReader; +#[doc = "Driving control enabled for GPIO4.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum GPIO4DRIVING_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_5_PU_A) -> Self { - variant as u8 != 0 + fn from(variant: GPIO4DRIVING_A) -> Self { + variant as _ } } -#[doc = "Field `reg_gpio_5_pu` reader - Pull Up Resistor for GPIO5."] -pub struct REG_GPIO_5_PU_R(crate::FieldReader); -impl REG_GPIO_5_PU_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_5_PU_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_4_DRV_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_5_PU_A { + pub fn variant(&self) -> Option { match self.bits { - false => REG_GPIO_5_PU_A::DISABLED, - true => REG_GPIO_5_PU_A::ENABLED, + 0 => Some(GPIO4DRIVING_A::DISABLED), + 1 => Some(GPIO4DRIVING_A::ENABLED), + _ => None, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_5_PU_A::DISABLED + *self == GPIO4DRIVING_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_5_PU_A::ENABLED + *self == GPIO4DRIVING_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_5_PU_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_5_pu` writer - Pull Up Resistor for GPIO5."] -pub struct REG_GPIO_5_PU_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_5_PU_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_5_PU_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_4_drv` writer - Driving control enabled for GPIO4."] +pub type REG_GPIO_4_DRV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL2_SPEC, u8, GPIO4DRIVING_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_4_DRV_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_5_PU_A::DISABLED) + self.variant(GPIO4DRIVING_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_5_PU_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w + self.variant(GPIO4DRIVING_A::ENABLED) } } -#[doc = "Driving control enabled for GPIO5.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -#[repr(u8)] -pub enum REG_GPIO_5_DRV_A { +#[doc = "Field `reg_gpio_4_pu` reader - Pull Up Resistor for GPIO4."] +pub type REG_GPIO_4_PU_R = crate::BitReader; +#[doc = "Pull Up Resistor for GPIO4.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO4PULL_UP_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for u8 { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_5_DRV_A) -> Self { - variant as _ + fn from(variant: GPIO4PULL_UP_RESISTOR_A) -> Self { + variant as u8 != 0 } } -#[doc = "Field `reg_gpio_5_drv` reader - Driving control enabled for GPIO5."] -pub struct REG_GPIO_5_DRV_R(crate::FieldReader); -impl REG_GPIO_5_DRV_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_5_DRV_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_4_PU_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> GPIO4PULL_UP_RESISTOR_A { match self.bits { - 0 => Some(REG_GPIO_5_DRV_A::DISABLED), - 1 => Some(REG_GPIO_5_DRV_A::ENABLED), - _ => None, + false => GPIO4PULL_UP_RESISTOR_A::DISABLED, + true => GPIO4PULL_UP_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_5_DRV_A::DISABLED + *self == GPIO4PULL_UP_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_5_DRV_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_5_DRV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO4PULL_UP_RESISTOR_A::ENABLED } } -#[doc = "Field `reg_gpio_5_drv` writer - Driving control enabled for GPIO5."] -pub struct REG_GPIO_5_DRV_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_5_DRV_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_5_DRV_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +#[doc = "Field `reg_gpio_4_pu` writer - Pull Up Resistor for GPIO4."] +pub type REG_GPIO_4_PU_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL2_SPEC, GPIO4PULL_UP_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_4_PU_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_5_DRV_A::DISABLED) + self.variant(GPIO4PULL_UP_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_5_DRV_A::ENABLED) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 18)) | ((value as u32 & 0x03) << 18); - self.w + self.variant(GPIO4PULL_UP_RESISTOR_A::ENABLED) } } -#[doc = "Schmitt trigger enabled for GPIO5.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_5_SMT_A { +#[doc = "Field `reg_gpio_4_pd` reader - Pull Down Resistor for GPIO4."] +pub type REG_GPIO_4_PD_R = crate::BitReader; +#[doc = "Pull Down Resistor for GPIO4.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO4PULL_DOWN_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_5_SMT_A) -> Self { + fn from(variant: GPIO4PULL_DOWN_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_5_smt` reader - Schmitt trigger enabled for GPIO5."] -pub struct REG_GPIO_5_SMT_R(crate::FieldReader); -impl REG_GPIO_5_SMT_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_5_SMT_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_4_PD_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_5_SMT_A { + pub fn variant(&self) -> GPIO4PULL_DOWN_RESISTOR_A { match self.bits { - false => REG_GPIO_5_SMT_A::DISABLED, - true => REG_GPIO_5_SMT_A::ENABLED, + false => GPIO4PULL_DOWN_RESISTOR_A::DISABLED, + true => GPIO4PULL_DOWN_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_5_SMT_A::DISABLED + *self == GPIO4PULL_DOWN_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_5_SMT_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_5_SMT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO4PULL_DOWN_RESISTOR_A::ENABLED } } -#[doc = "Field `reg_gpio_5_smt` writer - Schmitt trigger enabled for GPIO5."] -pub struct REG_GPIO_5_SMT_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_5_SMT_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_5_SMT_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_4_pd` writer - Pull Down Resistor for GPIO4."] +pub type REG_GPIO_4_PD_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL2_SPEC, GPIO4PULL_DOWN_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_4_PD_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_5_SMT_A::DISABLED) + self.variant(GPIO4PULL_DOWN_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_5_SMT_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w - } -} -#[doc = "Input enable for GPIO5.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_5_IE_A { - #[doc = "0: `0`"] - DISABLED = 0, - #[doc = "1: `1`"] - ENABLED = 1, -} -impl From for bool { - #[inline(always)] - fn from(variant: REG_GPIO_5_IE_A) -> Self { - variant as u8 != 0 - } -} -#[doc = "Field `reg_gpio_5_ie` reader - Input enable for GPIO5."] -pub struct REG_GPIO_5_IE_R(crate::FieldReader); -impl REG_GPIO_5_IE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_5_IE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> REG_GPIO_5_IE_A { - match self.bits { - false => REG_GPIO_5_IE_A::DISABLED, - true => REG_GPIO_5_IE_A::ENABLED, - } - } - #[doc = "Checks if the value of the field is `DISABLED`"] - #[inline(always)] - pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_5_IE_A::DISABLED - } - #[doc = "Checks if the value of the field is `ENABLED`"] - #[inline(always)] - pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_5_IE_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_5_IE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_5_ie` writer - Input enable for GPIO5."] -pub struct REG_GPIO_5_IE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_5_IE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_5_IE_A) -> &'a mut W { - self.bit(variant.into()) - } - #[doc = "`0`"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_5_IE_A::DISABLED) - } - #[doc = "`1`"] - #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_5_IE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -#[repr(u8)] -pub enum REAL_GPIO_4_FUNC_SEL_A { - #[doc = "0: Function select is reg_gpio_4_func_sel"] - GLB_GPIO_REAL_MODE_REG = 0, - #[doc = "1: `1`"] - GLB_GPIO_REAL_MODE_SDIO = 1, - #[doc = "12: `1100`"] - GLB_GPIO_REAL_MODE_RF = 12, - #[doc = "14: `1110`"] - GLB_GPIO_REAL_MODE_JTAG = 14, - #[doc = "15: `1111`"] - GLB_GPIO_REAL_MODE_CCI = 15, -} -impl From for u8 { - #[inline(always)] - fn from(variant: REAL_GPIO_4_FUNC_SEL_A) -> Self { - variant as _ - } -} -#[doc = "Field `real_gpio_4_func_sel` reader - "] -pub struct REAL_GPIO_4_FUNC_SEL_R(crate::FieldReader); -impl REAL_GPIO_4_FUNC_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - REAL_GPIO_4_FUNC_SEL_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 0 => Some(REAL_GPIO_4_FUNC_SEL_A::GLB_GPIO_REAL_MODE_REG), - 1 => Some(REAL_GPIO_4_FUNC_SEL_A::GLB_GPIO_REAL_MODE_SDIO), - 12 => Some(REAL_GPIO_4_FUNC_SEL_A::GLB_GPIO_REAL_MODE_RF), - 14 => Some(REAL_GPIO_4_FUNC_SEL_A::GLB_GPIO_REAL_MODE_JTAG), - 15 => Some(REAL_GPIO_4_FUNC_SEL_A::GLB_GPIO_REAL_MODE_CCI), - _ => None, - } - } - #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_REG`"] - #[inline(always)] - pub fn is_glb_gpio_real_mode_reg(&self) -> bool { - **self == REAL_GPIO_4_FUNC_SEL_A::GLB_GPIO_REAL_MODE_REG - } - #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_SDIO`"] - #[inline(always)] - pub fn is_glb_gpio_real_mode_sdio(&self) -> bool { - **self == REAL_GPIO_4_FUNC_SEL_A::GLB_GPIO_REAL_MODE_SDIO - } - #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_RF`"] - #[inline(always)] - pub fn is_glb_gpio_real_mode_rf(&self) -> bool { - **self == REAL_GPIO_4_FUNC_SEL_A::GLB_GPIO_REAL_MODE_RF - } - #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_JTAG`"] - #[inline(always)] - pub fn is_glb_gpio_real_mode_jtag(&self) -> bool { - **self == REAL_GPIO_4_FUNC_SEL_A::GLB_GPIO_REAL_MODE_JTAG - } - #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_CCI`"] - #[inline(always)] - pub fn is_glb_gpio_real_mode_cci(&self) -> bool { - **self == REAL_GPIO_4_FUNC_SEL_A::GLB_GPIO_REAL_MODE_CCI - } -} -impl core::ops::Deref for REAL_GPIO_4_FUNC_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + self.variant(GPIO4PULL_DOWN_RESISTOR_A::ENABLED) } } +#[doc = "Field `reg_gpio_4_func_sel` reader - Function select for GPIO4."] +pub type REG_GPIO_4_FUNC_SEL_R = crate::FieldReader; #[doc = "Function select for GPIO4.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_4_FUNC_SEL_A { +pub enum GPIO4FUNCTION_SELECT_A { #[doc = "1: `1`"] SDIO_DAT2 = 1, #[doc = "4: `100`"] @@ -772,690 +316,797 @@ pub enum REG_GPIO_4_FUNC_SEL_A { #[doc = "14: `1110`"] E21_TMS = 14, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_4_FUNC_SEL_A) -> Self { + fn from(variant: GPIO4FUNCTION_SELECT_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_4_func_sel` reader - Function select for GPIO4."] -pub struct REG_GPIO_4_FUNC_SEL_R(crate::FieldReader); impl REG_GPIO_4_FUNC_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_4_FUNC_SEL_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 1 => Some(REG_GPIO_4_FUNC_SEL_A::SDIO_DAT2), - 4 => Some(REG_GPIO_4_FUNC_SEL_A::SPI_MISO_SPI_MOSI), - 6 => Some(REG_GPIO_4_FUNC_SEL_A::I2C_SCL), - 7 => Some(REG_GPIO_4_FUNC_SEL_A::UART_SIG4), - 8 => Some(REG_GPIO_4_FUNC_SEL_A::PWM_CH4), - 9 => Some(REG_GPIO_4_FUNC_SEL_A::FEM_GPIO_0), - 10 => Some(REG_GPIO_4_FUNC_SEL_A::GPIP_CH1), - 11 => Some(REG_GPIO_4_FUNC_SEL_A::SWGPIO_4), - 14 => Some(REG_GPIO_4_FUNC_SEL_A::E21_TMS), + 1 => Some(GPIO4FUNCTION_SELECT_A::SDIO_DAT2), + 4 => Some(GPIO4FUNCTION_SELECT_A::SPI_MISO_SPI_MOSI), + 6 => Some(GPIO4FUNCTION_SELECT_A::I2C_SCL), + 7 => Some(GPIO4FUNCTION_SELECT_A::UART_SIG4), + 8 => Some(GPIO4FUNCTION_SELECT_A::PWM_CH4), + 9 => Some(GPIO4FUNCTION_SELECT_A::FEM_GPIO_0), + 10 => Some(GPIO4FUNCTION_SELECT_A::GPIP_CH1), + 11 => Some(GPIO4FUNCTION_SELECT_A::SWGPIO_4), + 14 => Some(GPIO4FUNCTION_SELECT_A::E21_TMS), _ => None, } } #[doc = "Checks if the value of the field is `SDIO_DAT2`"] #[inline(always)] pub fn is_sdio_dat2(&self) -> bool { - **self == REG_GPIO_4_FUNC_SEL_A::SDIO_DAT2 + *self == GPIO4FUNCTION_SELECT_A::SDIO_DAT2 } #[doc = "Checks if the value of the field is `SPI_MISO_SPI_MOSI`"] #[inline(always)] pub fn is_spi_miso_spi_mosi(&self) -> bool { - **self == REG_GPIO_4_FUNC_SEL_A::SPI_MISO_SPI_MOSI + *self == GPIO4FUNCTION_SELECT_A::SPI_MISO_SPI_MOSI } #[doc = "Checks if the value of the field is `I2C_SCL`"] #[inline(always)] pub fn is_i2c_scl(&self) -> bool { - **self == REG_GPIO_4_FUNC_SEL_A::I2C_SCL + *self == GPIO4FUNCTION_SELECT_A::I2C_SCL } #[doc = "Checks if the value of the field is `UART_SIG4`"] #[inline(always)] pub fn is_uart_sig4(&self) -> bool { - **self == REG_GPIO_4_FUNC_SEL_A::UART_SIG4 + *self == GPIO4FUNCTION_SELECT_A::UART_SIG4 } #[doc = "Checks if the value of the field is `PWM_CH4`"] #[inline(always)] pub fn is_pwm_ch4(&self) -> bool { - **self == REG_GPIO_4_FUNC_SEL_A::PWM_CH4 + *self == GPIO4FUNCTION_SELECT_A::PWM_CH4 } #[doc = "Checks if the value of the field is `FEM_GPIO_0`"] #[inline(always)] pub fn is_fem_gpio_0(&self) -> bool { - **self == REG_GPIO_4_FUNC_SEL_A::FEM_GPIO_0 + *self == GPIO4FUNCTION_SELECT_A::FEM_GPIO_0 } #[doc = "Checks if the value of the field is `GPIP_CH1`"] #[inline(always)] pub fn is_gpip_ch1(&self) -> bool { - **self == REG_GPIO_4_FUNC_SEL_A::GPIP_CH1 + *self == GPIO4FUNCTION_SELECT_A::GPIP_CH1 } #[doc = "Checks if the value of the field is `SWGPIO_4`"] #[inline(always)] pub fn is_swgpio_4(&self) -> bool { - **self == REG_GPIO_4_FUNC_SEL_A::SWGPIO_4 + *self == GPIO4FUNCTION_SELECT_A::SWGPIO_4 } #[doc = "Checks if the value of the field is `E21_TMS`"] #[inline(always)] pub fn is_e21_tms(&self) -> bool { - **self == REG_GPIO_4_FUNC_SEL_A::E21_TMS - } -} -impl core::ops::Deref for REG_GPIO_4_FUNC_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO4FUNCTION_SELECT_A::E21_TMS } } #[doc = "Field `reg_gpio_4_func_sel` writer - Function select for GPIO4."] -pub struct REG_GPIO_4_FUNC_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_4_FUNC_SEL_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_4_FUNC_SEL_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +pub type REG_GPIO_4_FUNC_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL2_SPEC, u8, GPIO4FUNCTION_SELECT_A, 4, O>; +impl<'a, const O: u8> REG_GPIO_4_FUNC_SEL_W<'a, O> { #[doc = "`1`"] #[inline(always)] pub fn sdio_dat2(self) -> &'a mut W { - self.variant(REG_GPIO_4_FUNC_SEL_A::SDIO_DAT2) + self.variant(GPIO4FUNCTION_SELECT_A::SDIO_DAT2) } #[doc = "`100`"] #[inline(always)] pub fn spi_miso_spi_mosi(self) -> &'a mut W { - self.variant(REG_GPIO_4_FUNC_SEL_A::SPI_MISO_SPI_MOSI) + self.variant(GPIO4FUNCTION_SELECT_A::SPI_MISO_SPI_MOSI) } #[doc = "`110`"] #[inline(always)] pub fn i2c_scl(self) -> &'a mut W { - self.variant(REG_GPIO_4_FUNC_SEL_A::I2C_SCL) + self.variant(GPIO4FUNCTION_SELECT_A::I2C_SCL) } #[doc = "`111`"] #[inline(always)] pub fn uart_sig4(self) -> &'a mut W { - self.variant(REG_GPIO_4_FUNC_SEL_A::UART_SIG4) + self.variant(GPIO4FUNCTION_SELECT_A::UART_SIG4) } #[doc = "`1000`"] #[inline(always)] pub fn pwm_ch4(self) -> &'a mut W { - self.variant(REG_GPIO_4_FUNC_SEL_A::PWM_CH4) + self.variant(GPIO4FUNCTION_SELECT_A::PWM_CH4) } #[doc = "`1001`"] #[inline(always)] pub fn fem_gpio_0(self) -> &'a mut W { - self.variant(REG_GPIO_4_FUNC_SEL_A::FEM_GPIO_0) + self.variant(GPIO4FUNCTION_SELECT_A::FEM_GPIO_0) } #[doc = "`1010`"] #[inline(always)] pub fn gpip_ch1(self) -> &'a mut W { - self.variant(REG_GPIO_4_FUNC_SEL_A::GPIP_CH1) + self.variant(GPIO4FUNCTION_SELECT_A::GPIP_CH1) } #[doc = "`1011`"] #[inline(always)] pub fn swgpio_4(self) -> &'a mut W { - self.variant(REG_GPIO_4_FUNC_SEL_A::SWGPIO_4) + self.variant(GPIO4FUNCTION_SELECT_A::SWGPIO_4) } #[doc = "`1110`"] #[inline(always)] pub fn e21_tms(self) -> &'a mut W { - self.variant(REG_GPIO_4_FUNC_SEL_A::E21_TMS) + self.variant(GPIO4FUNCTION_SELECT_A::E21_TMS) } - #[doc = r"Writes raw bits to the field"] +} +#[doc = "Field `real_gpio_4_func_sel` reader - "] +pub type REAL_GPIO_4_FUNC_SEL_R = crate::FieldReader; +#[doc = "\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum GPIO4REAL_FUNCTION_SELECT_A { + #[doc = "0: Function select is reg_gpio_4_func_sel"] + GLB_GPIO_REAL_MODE_REG = 0, + #[doc = "1: `1`"] + GLB_GPIO_REAL_MODE_SDIO = 1, + #[doc = "12: `1100`"] + GLB_GPIO_REAL_MODE_RF = 12, + #[doc = "14: `1110`"] + GLB_GPIO_REAL_MODE_JTAG = 14, + #[doc = "15: `1111`"] + GLB_GPIO_REAL_MODE_CCI = 15, +} +impl From for u8 { #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 8)) | ((value as u32 & 0x0f) << 8); - self.w + fn from(variant: GPIO4REAL_FUNCTION_SELECT_A) -> Self { + variant as _ } } -#[doc = "Pull Down Resistor for GPIO4.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_4_PD_A { +impl REAL_GPIO_4_FUNC_SEL_R { + #[doc = "Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(GPIO4REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_REG), + 1 => Some(GPIO4REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_SDIO), + 12 => Some(GPIO4REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_RF), + 14 => Some(GPIO4REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_JTAG), + 15 => Some(GPIO4REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_CCI), + _ => None, + } + } + #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_REG`"] + #[inline(always)] + pub fn is_glb_gpio_real_mode_reg(&self) -> bool { + *self == GPIO4REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_REG + } + #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_SDIO`"] + #[inline(always)] + pub fn is_glb_gpio_real_mode_sdio(&self) -> bool { + *self == GPIO4REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_SDIO + } + #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_RF`"] + #[inline(always)] + pub fn is_glb_gpio_real_mode_rf(&self) -> bool { + *self == GPIO4REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_RF + } + #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_JTAG`"] + #[inline(always)] + pub fn is_glb_gpio_real_mode_jtag(&self) -> bool { + *self == GPIO4REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_JTAG + } + #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_CCI`"] + #[inline(always)] + pub fn is_glb_gpio_real_mode_cci(&self) -> bool { + *self == GPIO4REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_CCI + } +} +#[doc = "Field `reg_gpio_5_ie` reader - Input enable for GPIO5."] +pub type REG_GPIO_5_IE_R = crate::BitReader; +#[doc = "Input enable for GPIO5.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO5INPUT_ENABLED_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_4_PD_A) -> Self { + fn from(variant: GPIO5INPUT_ENABLED_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_4_pd` reader - Pull Down Resistor for GPIO4."] -pub struct REG_GPIO_4_PD_R(crate::FieldReader); -impl REG_GPIO_4_PD_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_4_PD_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_5_IE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_4_PD_A { + pub fn variant(&self) -> GPIO5INPUT_ENABLED_A { match self.bits { - false => REG_GPIO_4_PD_A::DISABLED, - true => REG_GPIO_4_PD_A::ENABLED, + false => GPIO5INPUT_ENABLED_A::DISABLED, + true => GPIO5INPUT_ENABLED_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_4_PD_A::DISABLED + *self == GPIO5INPUT_ENABLED_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_4_PD_A::ENABLED + *self == GPIO5INPUT_ENABLED_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_4_PD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_4_pd` writer - Pull Down Resistor for GPIO4."] -pub struct REG_GPIO_4_PD_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_4_PD_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_4_PD_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_5_ie` writer - Input enable for GPIO5."] +pub type REG_GPIO_5_IE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL2_SPEC, GPIO5INPUT_ENABLED_A, O>; +impl<'a, const O: u8> REG_GPIO_5_IE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_4_PD_A::DISABLED) + self.variant(GPIO5INPUT_ENABLED_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_4_PD_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w + self.variant(GPIO5INPUT_ENABLED_A::ENABLED) } } -#[doc = "Pull Up Resistor for GPIO4.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_4_PU_A { +#[doc = "Field `reg_gpio_5_smt` reader - Schmitt trigger enabled for GPIO5."] +pub type REG_GPIO_5_SMT_R = crate::BitReader; +#[doc = "Schmitt trigger enabled for GPIO5.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO5SCHMITT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_4_PU_A) -> Self { + fn from(variant: GPIO5SCHMITT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_4_pu` reader - Pull Up Resistor for GPIO4."] -pub struct REG_GPIO_4_PU_R(crate::FieldReader); -impl REG_GPIO_4_PU_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_4_PU_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_5_SMT_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_4_PU_A { + pub fn variant(&self) -> GPIO5SCHMITT_A { match self.bits { - false => REG_GPIO_4_PU_A::DISABLED, - true => REG_GPIO_4_PU_A::ENABLED, + false => GPIO5SCHMITT_A::DISABLED, + true => GPIO5SCHMITT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_4_PU_A::DISABLED + *self == GPIO5SCHMITT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_4_PU_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_4_PU_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO5SCHMITT_A::ENABLED } } -#[doc = "Field `reg_gpio_4_pu` writer - Pull Up Resistor for GPIO4."] -pub struct REG_GPIO_4_PU_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_4_PU_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_4_PU_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_5_smt` writer - Schmitt trigger enabled for GPIO5."] +pub type REG_GPIO_5_SMT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL2_SPEC, GPIO5SCHMITT_A, O>; +impl<'a, const O: u8> REG_GPIO_5_SMT_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_4_PU_A::DISABLED) + self.variant(GPIO5SCHMITT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_4_PU_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w + self.variant(GPIO5SCHMITT_A::ENABLED) } } -#[doc = "Driving control enabled for GPIO4.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[doc = "Field `reg_gpio_5_drv` reader - Driving control enabled for GPIO5."] +pub type REG_GPIO_5_DRV_R = crate::FieldReader; +#[doc = "Driving control enabled for GPIO5.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_4_DRV_A { +pub enum GPIO5DRIVING_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_4_DRV_A) -> Self { + fn from(variant: GPIO5DRIVING_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_4_drv` reader - Driving control enabled for GPIO4."] -pub struct REG_GPIO_4_DRV_R(crate::FieldReader); -impl REG_GPIO_4_DRV_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_4_DRV_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_5_DRV_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 0 => Some(REG_GPIO_4_DRV_A::DISABLED), - 1 => Some(REG_GPIO_4_DRV_A::ENABLED), + 0 => Some(GPIO5DRIVING_A::DISABLED), + 1 => Some(GPIO5DRIVING_A::ENABLED), _ => None, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_4_DRV_A::DISABLED + *self == GPIO5DRIVING_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_4_DRV_A::ENABLED + *self == GPIO5DRIVING_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_4_DRV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_4_drv` writer - Driving control enabled for GPIO4."] -pub struct REG_GPIO_4_DRV_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_4_DRV_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_4_DRV_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +#[doc = "Field `reg_gpio_5_drv` writer - Driving control enabled for GPIO5."] +pub type REG_GPIO_5_DRV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL2_SPEC, u8, GPIO5DRIVING_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_5_DRV_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_4_DRV_A::DISABLED) + self.variant(GPIO5DRIVING_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_4_DRV_A::ENABLED) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 2)) | ((value as u32 & 0x03) << 2); - self.w + self.variant(GPIO5DRIVING_A::ENABLED) } } -#[doc = "Schmitt trigger enabled for GPIO4.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_4_SMT_A { +#[doc = "Field `reg_gpio_5_pu` reader - Pull Up Resistor for GPIO5."] +pub type REG_GPIO_5_PU_R = crate::BitReader; +#[doc = "Pull Up Resistor for GPIO5.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO5PULL_UP_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_4_SMT_A) -> Self { + fn from(variant: GPIO5PULL_UP_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_4_smt` reader - Schmitt trigger enabled for GPIO4."] -pub struct REG_GPIO_4_SMT_R(crate::FieldReader); -impl REG_GPIO_4_SMT_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_4_SMT_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_5_PU_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_4_SMT_A { + pub fn variant(&self) -> GPIO5PULL_UP_RESISTOR_A { match self.bits { - false => REG_GPIO_4_SMT_A::DISABLED, - true => REG_GPIO_4_SMT_A::ENABLED, + false => GPIO5PULL_UP_RESISTOR_A::DISABLED, + true => GPIO5PULL_UP_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_4_SMT_A::DISABLED + *self == GPIO5PULL_UP_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_4_SMT_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_4_SMT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO5PULL_UP_RESISTOR_A::ENABLED } } -#[doc = "Field `reg_gpio_4_smt` writer - Schmitt trigger enabled for GPIO4."] -pub struct REG_GPIO_4_SMT_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_4_SMT_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_4_SMT_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_5_pu` writer - Pull Up Resistor for GPIO5."] +pub type REG_GPIO_5_PU_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL2_SPEC, GPIO5PULL_UP_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_5_PU_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_4_SMT_A::DISABLED) + self.variant(GPIO5PULL_UP_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_4_SMT_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w + self.variant(GPIO5PULL_UP_RESISTOR_A::ENABLED) } } -#[doc = "Input enable for GPIO4.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_4_IE_A { +#[doc = "Field `reg_gpio_5_pd` reader - Pull Down Resistor for GPIO5."] +pub type REG_GPIO_5_PD_R = crate::BitReader; +#[doc = "Pull Down Resistor for GPIO5.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO5PULL_DOWN_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_4_IE_A) -> Self { + fn from(variant: GPIO5PULL_DOWN_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_4_ie` reader - Input enable for GPIO4."] -pub struct REG_GPIO_4_IE_R(crate::FieldReader); -impl REG_GPIO_4_IE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_4_IE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_5_PD_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_4_IE_A { + pub fn variant(&self) -> GPIO5PULL_DOWN_RESISTOR_A { match self.bits { - false => REG_GPIO_4_IE_A::DISABLED, - true => REG_GPIO_4_IE_A::ENABLED, + false => GPIO5PULL_DOWN_RESISTOR_A::DISABLED, + true => GPIO5PULL_DOWN_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_4_IE_A::DISABLED + *self == GPIO5PULL_DOWN_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_4_IE_A::ENABLED + *self == GPIO5PULL_DOWN_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_4_IE_R { - type Target = crate::FieldReader; +#[doc = "Field `reg_gpio_5_pd` writer - Pull Down Resistor for GPIO5."] +pub type REG_GPIO_5_PD_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL2_SPEC, GPIO5PULL_DOWN_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_5_PD_W<'a, O> { + #[doc = "`0`"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn disabled(self) -> &'a mut W { + self.variant(GPIO5PULL_DOWN_RESISTOR_A::DISABLED) + } + #[doc = "`1`"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(GPIO5PULL_DOWN_RESISTOR_A::ENABLED) } } -#[doc = "Field `reg_gpio_4_ie` writer - Input enable for GPIO4."] -pub struct REG_GPIO_4_IE_W<'a> { - w: &'a mut W, +#[doc = "Field `reg_gpio_5_func_sel` reader - Function select for GPIO5."] +pub type REG_GPIO_5_FUNC_SEL_R = crate::FieldReader; +#[doc = "Function select for GPIO5.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum GPIO5FUNCTION_SELECT_A { + #[doc = "1: `1`"] + SDIO_DAT3 = 1, + #[doc = "4: `100`"] + SPI_MOSI_SPI_MISO = 4, + #[doc = "6: `110`"] + I2C_SDA = 6, + #[doc = "7: `111`"] + UART_SIG5 = 7, + #[doc = "8: `1000`"] + PWM_CH0 = 8, + #[doc = "9: `1001`"] + FEM_GPIO_1 = 9, + #[doc = "10: `1010`"] + GPIP_CH4 = 10, + #[doc = "11: `1011`"] + SWGPIO_5 = 11, + #[doc = "14: `1110`"] + E21_TDI = 14, } -impl<'a> REG_GPIO_4_IE_W<'a> { - #[doc = r"Writes `variant` to the field"] +impl From for u8 { #[inline(always)] - pub fn variant(self, variant: REG_GPIO_4_IE_A) -> &'a mut W { - self.bit(variant.into()) + fn from(variant: GPIO5FUNCTION_SELECT_A) -> Self { + variant as _ } - #[doc = "`0`"] +} +impl REG_GPIO_5_FUNC_SEL_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_4_IE_A::DISABLED) + pub fn variant(&self) -> Option { + match self.bits { + 1 => Some(GPIO5FUNCTION_SELECT_A::SDIO_DAT3), + 4 => Some(GPIO5FUNCTION_SELECT_A::SPI_MOSI_SPI_MISO), + 6 => Some(GPIO5FUNCTION_SELECT_A::I2C_SDA), + 7 => Some(GPIO5FUNCTION_SELECT_A::UART_SIG5), + 8 => Some(GPIO5FUNCTION_SELECT_A::PWM_CH0), + 9 => Some(GPIO5FUNCTION_SELECT_A::FEM_GPIO_1), + 10 => Some(GPIO5FUNCTION_SELECT_A::GPIP_CH4), + 11 => Some(GPIO5FUNCTION_SELECT_A::SWGPIO_5), + 14 => Some(GPIO5FUNCTION_SELECT_A::E21_TDI), + _ => None, + } + } + #[doc = "Checks if the value of the field is `SDIO_DAT3`"] + #[inline(always)] + pub fn is_sdio_dat3(&self) -> bool { + *self == GPIO5FUNCTION_SELECT_A::SDIO_DAT3 } + #[doc = "Checks if the value of the field is `SPI_MOSI_SPI_MISO`"] + #[inline(always)] + pub fn is_spi_mosi_spi_miso(&self) -> bool { + *self == GPIO5FUNCTION_SELECT_A::SPI_MOSI_SPI_MISO + } + #[doc = "Checks if the value of the field is `I2C_SDA`"] + #[inline(always)] + pub fn is_i2c_sda(&self) -> bool { + *self == GPIO5FUNCTION_SELECT_A::I2C_SDA + } + #[doc = "Checks if the value of the field is `UART_SIG5`"] + #[inline(always)] + pub fn is_uart_sig5(&self) -> bool { + *self == GPIO5FUNCTION_SELECT_A::UART_SIG5 + } + #[doc = "Checks if the value of the field is `PWM_CH0`"] + #[inline(always)] + pub fn is_pwm_ch0(&self) -> bool { + *self == GPIO5FUNCTION_SELECT_A::PWM_CH0 + } + #[doc = "Checks if the value of the field is `FEM_GPIO_1`"] + #[inline(always)] + pub fn is_fem_gpio_1(&self) -> bool { + *self == GPIO5FUNCTION_SELECT_A::FEM_GPIO_1 + } + #[doc = "Checks if the value of the field is `GPIP_CH4`"] + #[inline(always)] + pub fn is_gpip_ch4(&self) -> bool { + *self == GPIO5FUNCTION_SELECT_A::GPIP_CH4 + } + #[doc = "Checks if the value of the field is `SWGPIO_5`"] + #[inline(always)] + pub fn is_swgpio_5(&self) -> bool { + *self == GPIO5FUNCTION_SELECT_A::SWGPIO_5 + } + #[doc = "Checks if the value of the field is `E21_TDI`"] + #[inline(always)] + pub fn is_e21_tdi(&self) -> bool { + *self == GPIO5FUNCTION_SELECT_A::E21_TDI + } +} +#[doc = "Field `reg_gpio_5_func_sel` writer - Function select for GPIO5."] +pub type REG_GPIO_5_FUNC_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL2_SPEC, u8, GPIO5FUNCTION_SELECT_A, 4, O>; +impl<'a, const O: u8> REG_GPIO_5_FUNC_SEL_W<'a, O> { #[doc = "`1`"] #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_4_IE_A::ENABLED) + pub fn sdio_dat3(self) -> &'a mut W { + self.variant(GPIO5FUNCTION_SELECT_A::SDIO_DAT3) } - #[doc = r"Sets the field bit"] + #[doc = "`100`"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn spi_mosi_spi_miso(self) -> &'a mut W { + self.variant(GPIO5FUNCTION_SELECT_A::SPI_MOSI_SPI_MISO) } - #[doc = r"Clears the field bit"] + #[doc = "`110`"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn i2c_sda(self) -> &'a mut W { + self.variant(GPIO5FUNCTION_SELECT_A::I2C_SDA) } - #[doc = r"Writes raw bits to the field"] + #[doc = "`111`"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn uart_sig5(self) -> &'a mut W { + self.variant(GPIO5FUNCTION_SELECT_A::UART_SIG5) + } + #[doc = "`1000`"] + #[inline(always)] + pub fn pwm_ch0(self) -> &'a mut W { + self.variant(GPIO5FUNCTION_SELECT_A::PWM_CH0) + } + #[doc = "`1001`"] + #[inline(always)] + pub fn fem_gpio_1(self) -> &'a mut W { + self.variant(GPIO5FUNCTION_SELECT_A::FEM_GPIO_1) + } + #[doc = "`1010`"] + #[inline(always)] + pub fn gpip_ch4(self) -> &'a mut W { + self.variant(GPIO5FUNCTION_SELECT_A::GPIP_CH4) + } + #[doc = "`1011`"] + #[inline(always)] + pub fn swgpio_5(self) -> &'a mut W { + self.variant(GPIO5FUNCTION_SELECT_A::SWGPIO_5) + } + #[doc = "`1110`"] + #[inline(always)] + pub fn e21_tdi(self) -> &'a mut W { + self.variant(GPIO5FUNCTION_SELECT_A::E21_TDI) } } -impl R { - #[doc = "Bits 28:31"] +#[doc = "Field `real_gpio_5_func_sel` reader - "] +pub type REAL_GPIO_5_FUNC_SEL_R = crate::FieldReader; +#[doc = "\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum GPIO5REAL_FUNCTION_SELECT_A { + #[doc = "0: Function select is reg_gpio_5_func_sel"] + GLB_GPIO_REAL_MODE_REG = 0, + #[doc = "1: `1`"] + GLB_GPIO_REAL_MODE_SDIO = 1, + #[doc = "12: `1100`"] + GLB_GPIO_REAL_MODE_RF = 12, + #[doc = "14: `1110`"] + GLB_GPIO_REAL_MODE_JTAG = 14, + #[doc = "15: `1111`"] + GLB_GPIO_REAL_MODE_CCI = 15, +} +impl From for u8 { #[inline(always)] - pub fn real_gpio_5_func_sel(&self) -> REAL_GPIO_5_FUNC_SEL_R { - REAL_GPIO_5_FUNC_SEL_R::new(((self.bits >> 28) & 0x0f) as u8) + fn from(variant: GPIO5REAL_FUNCTION_SELECT_A) -> Self { + variant as _ } - #[doc = "Bits 24:27 - Function select for GPIO5."] +} +impl REAL_GPIO_5_FUNC_SEL_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn reg_gpio_5_func_sel(&self) -> REG_GPIO_5_FUNC_SEL_R { - REG_GPIO_5_FUNC_SEL_R::new(((self.bits >> 24) & 0x0f) as u8) + pub fn variant(&self) -> Option { + match self.bits { + 0 => Some(GPIO5REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_REG), + 1 => Some(GPIO5REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_SDIO), + 12 => Some(GPIO5REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_RF), + 14 => Some(GPIO5REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_JTAG), + 15 => Some(GPIO5REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_CCI), + _ => None, + } } - #[doc = "Bit 21 - Pull Down Resistor for GPIO5."] + #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_REG`"] #[inline(always)] - pub fn reg_gpio_5_pd(&self) -> REG_GPIO_5_PD_R { - REG_GPIO_5_PD_R::new(((self.bits >> 21) & 0x01) != 0) + pub fn is_glb_gpio_real_mode_reg(&self) -> bool { + *self == GPIO5REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_REG } - #[doc = "Bit 20 - Pull Up Resistor for GPIO5."] + #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_SDIO`"] #[inline(always)] - pub fn reg_gpio_5_pu(&self) -> REG_GPIO_5_PU_R { - REG_GPIO_5_PU_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn is_glb_gpio_real_mode_sdio(&self) -> bool { + *self == GPIO5REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_SDIO } - #[doc = "Bits 18:19 - Driving control enabled for GPIO5."] + #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_RF`"] #[inline(always)] - pub fn reg_gpio_5_drv(&self) -> REG_GPIO_5_DRV_R { - REG_GPIO_5_DRV_R::new(((self.bits >> 18) & 0x03) as u8) + pub fn is_glb_gpio_real_mode_rf(&self) -> bool { + *self == GPIO5REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_RF } - #[doc = "Bit 17 - Schmitt trigger enabled for GPIO5."] + #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_JTAG`"] #[inline(always)] - pub fn reg_gpio_5_smt(&self) -> REG_GPIO_5_SMT_R { - REG_GPIO_5_SMT_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn is_glb_gpio_real_mode_jtag(&self) -> bool { + *self == GPIO5REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_JTAG } - #[doc = "Bit 16 - Input enable for GPIO5."] + #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_CCI`"] #[inline(always)] - pub fn reg_gpio_5_ie(&self) -> REG_GPIO_5_IE_R { - REG_GPIO_5_IE_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn is_glb_gpio_real_mode_cci(&self) -> bool { + *self == GPIO5REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_CCI } - #[doc = "Bits 12:15"] +} +impl R { + #[doc = "Bit 0 - Input enable for GPIO4."] #[inline(always)] - pub fn real_gpio_4_func_sel(&self) -> REAL_GPIO_4_FUNC_SEL_R { - REAL_GPIO_4_FUNC_SEL_R::new(((self.bits >> 12) & 0x0f) as u8) + pub fn reg_gpio_4_ie(&self) -> REG_GPIO_4_IE_R { + REG_GPIO_4_IE_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Schmitt trigger enabled for GPIO4."] + #[inline(always)] + pub fn reg_gpio_4_smt(&self) -> REG_GPIO_4_SMT_R { + REG_GPIO_4_SMT_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bits 2:3 - Driving control enabled for GPIO4."] + #[inline(always)] + pub fn reg_gpio_4_drv(&self) -> REG_GPIO_4_DRV_R { + REG_GPIO_4_DRV_R::new(((self.bits >> 2) & 3) as u8) + } + #[doc = "Bit 4 - Pull Up Resistor for GPIO4."] + #[inline(always)] + pub fn reg_gpio_4_pu(&self) -> REG_GPIO_4_PU_R { + REG_GPIO_4_PU_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Pull Down Resistor for GPIO4."] + #[inline(always)] + pub fn reg_gpio_4_pd(&self) -> REG_GPIO_4_PD_R { + REG_GPIO_4_PD_R::new(((self.bits >> 5) & 1) != 0) } #[doc = "Bits 8:11 - Function select for GPIO4."] #[inline(always)] pub fn reg_gpio_4_func_sel(&self) -> REG_GPIO_4_FUNC_SEL_R { REG_GPIO_4_FUNC_SEL_R::new(((self.bits >> 8) & 0x0f) as u8) } - #[doc = "Bit 5 - Pull Down Resistor for GPIO4."] + #[doc = "Bits 12:15"] #[inline(always)] - pub fn reg_gpio_4_pd(&self) -> REG_GPIO_4_PD_R { - REG_GPIO_4_PD_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn real_gpio_4_func_sel(&self) -> REAL_GPIO_4_FUNC_SEL_R { + REAL_GPIO_4_FUNC_SEL_R::new(((self.bits >> 12) & 0x0f) as u8) } - #[doc = "Bit 4 - Pull Up Resistor for GPIO4."] + #[doc = "Bit 16 - Input enable for GPIO5."] #[inline(always)] - pub fn reg_gpio_4_pu(&self) -> REG_GPIO_4_PU_R { - REG_GPIO_4_PU_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn reg_gpio_5_ie(&self) -> REG_GPIO_5_IE_R { + REG_GPIO_5_IE_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bits 2:3 - Driving control enabled for GPIO4."] + #[doc = "Bit 17 - Schmitt trigger enabled for GPIO5."] #[inline(always)] - pub fn reg_gpio_4_drv(&self) -> REG_GPIO_4_DRV_R { - REG_GPIO_4_DRV_R::new(((self.bits >> 2) & 0x03) as u8) + pub fn reg_gpio_5_smt(&self) -> REG_GPIO_5_SMT_R { + REG_GPIO_5_SMT_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bit 1 - Schmitt trigger enabled for GPIO4."] + #[doc = "Bits 18:19 - Driving control enabled for GPIO5."] #[inline(always)] - pub fn reg_gpio_4_smt(&self) -> REG_GPIO_4_SMT_R { - REG_GPIO_4_SMT_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn reg_gpio_5_drv(&self) -> REG_GPIO_5_DRV_R { + REG_GPIO_5_DRV_R::new(((self.bits >> 18) & 3) as u8) } - #[doc = "Bit 0 - Input enable for GPIO4."] + #[doc = "Bit 20 - Pull Up Resistor for GPIO5."] #[inline(always)] - pub fn reg_gpio_4_ie(&self) -> REG_GPIO_4_IE_R { - REG_GPIO_4_IE_R::new((self.bits & 0x01) != 0) + pub fn reg_gpio_5_pu(&self) -> REG_GPIO_5_PU_R { + REG_GPIO_5_PU_R::new(((self.bits >> 20) & 1) != 0) + } + #[doc = "Bit 21 - Pull Down Resistor for GPIO5."] + #[inline(always)] + pub fn reg_gpio_5_pd(&self) -> REG_GPIO_5_PD_R { + REG_GPIO_5_PD_R::new(((self.bits >> 21) & 1) != 0) } -} -impl W { #[doc = "Bits 24:27 - Function select for GPIO5."] #[inline(always)] - pub fn reg_gpio_5_func_sel(&mut self) -> REG_GPIO_5_FUNC_SEL_W { - REG_GPIO_5_FUNC_SEL_W { w: self } + pub fn reg_gpio_5_func_sel(&self) -> REG_GPIO_5_FUNC_SEL_R { + REG_GPIO_5_FUNC_SEL_R::new(((self.bits >> 24) & 0x0f) as u8) } - #[doc = "Bit 21 - Pull Down Resistor for GPIO5."] + #[doc = "Bits 28:31"] #[inline(always)] - pub fn reg_gpio_5_pd(&mut self) -> REG_GPIO_5_PD_W { - REG_GPIO_5_PD_W { w: self } + pub fn real_gpio_5_func_sel(&self) -> REAL_GPIO_5_FUNC_SEL_R { + REAL_GPIO_5_FUNC_SEL_R::new(((self.bits >> 28) & 0x0f) as u8) } - #[doc = "Bit 20 - Pull Up Resistor for GPIO5."] +} +impl W { + #[doc = "Bit 0 - Input enable for GPIO4."] #[inline(always)] - pub fn reg_gpio_5_pu(&mut self) -> REG_GPIO_5_PU_W { - REG_GPIO_5_PU_W { w: self } + #[must_use] + pub fn reg_gpio_4_ie(&mut self) -> REG_GPIO_4_IE_W<0> { + REG_GPIO_4_IE_W::new(self) } - #[doc = "Bits 18:19 - Driving control enabled for GPIO5."] + #[doc = "Bit 1 - Schmitt trigger enabled for GPIO4."] #[inline(always)] - pub fn reg_gpio_5_drv(&mut self) -> REG_GPIO_5_DRV_W { - REG_GPIO_5_DRV_W { w: self } + #[must_use] + pub fn reg_gpio_4_smt(&mut self) -> REG_GPIO_4_SMT_W<1> { + REG_GPIO_4_SMT_W::new(self) } - #[doc = "Bit 17 - Schmitt trigger enabled for GPIO5."] + #[doc = "Bits 2:3 - Driving control enabled for GPIO4."] #[inline(always)] - pub fn reg_gpio_5_smt(&mut self) -> REG_GPIO_5_SMT_W { - REG_GPIO_5_SMT_W { w: self } + #[must_use] + pub fn reg_gpio_4_drv(&mut self) -> REG_GPIO_4_DRV_W<2> { + REG_GPIO_4_DRV_W::new(self) } - #[doc = "Bit 16 - Input enable for GPIO5."] + #[doc = "Bit 4 - Pull Up Resistor for GPIO4."] #[inline(always)] - pub fn reg_gpio_5_ie(&mut self) -> REG_GPIO_5_IE_W { - REG_GPIO_5_IE_W { w: self } + #[must_use] + pub fn reg_gpio_4_pu(&mut self) -> REG_GPIO_4_PU_W<4> { + REG_GPIO_4_PU_W::new(self) + } + #[doc = "Bit 5 - Pull Down Resistor for GPIO4."] + #[inline(always)] + #[must_use] + pub fn reg_gpio_4_pd(&mut self) -> REG_GPIO_4_PD_W<5> { + REG_GPIO_4_PD_W::new(self) } #[doc = "Bits 8:11 - Function select for GPIO4."] #[inline(always)] - pub fn reg_gpio_4_func_sel(&mut self) -> REG_GPIO_4_FUNC_SEL_W { - REG_GPIO_4_FUNC_SEL_W { w: self } + #[must_use] + pub fn reg_gpio_4_func_sel(&mut self) -> REG_GPIO_4_FUNC_SEL_W<8> { + REG_GPIO_4_FUNC_SEL_W::new(self) } - #[doc = "Bit 5 - Pull Down Resistor for GPIO4."] + #[doc = "Bit 16 - Input enable for GPIO5."] #[inline(always)] - pub fn reg_gpio_4_pd(&mut self) -> REG_GPIO_4_PD_W { - REG_GPIO_4_PD_W { w: self } + #[must_use] + pub fn reg_gpio_5_ie(&mut self) -> REG_GPIO_5_IE_W<16> { + REG_GPIO_5_IE_W::new(self) } - #[doc = "Bit 4 - Pull Up Resistor for GPIO4."] + #[doc = "Bit 17 - Schmitt trigger enabled for GPIO5."] #[inline(always)] - pub fn reg_gpio_4_pu(&mut self) -> REG_GPIO_4_PU_W { - REG_GPIO_4_PU_W { w: self } + #[must_use] + pub fn reg_gpio_5_smt(&mut self) -> REG_GPIO_5_SMT_W<17> { + REG_GPIO_5_SMT_W::new(self) } - #[doc = "Bits 2:3 - Driving control enabled for GPIO4."] + #[doc = "Bits 18:19 - Driving control enabled for GPIO5."] #[inline(always)] - pub fn reg_gpio_4_drv(&mut self) -> REG_GPIO_4_DRV_W { - REG_GPIO_4_DRV_W { w: self } + #[must_use] + pub fn reg_gpio_5_drv(&mut self) -> REG_GPIO_5_DRV_W<18> { + REG_GPIO_5_DRV_W::new(self) } - #[doc = "Bit 1 - Schmitt trigger enabled for GPIO4."] + #[doc = "Bit 20 - Pull Up Resistor for GPIO5."] #[inline(always)] - pub fn reg_gpio_4_smt(&mut self) -> REG_GPIO_4_SMT_W { - REG_GPIO_4_SMT_W { w: self } + #[must_use] + pub fn reg_gpio_5_pu(&mut self) -> REG_GPIO_5_PU_W<20> { + REG_GPIO_5_PU_W::new(self) } - #[doc = "Bit 0 - Input enable for GPIO4."] + #[doc = "Bit 21 - Pull Down Resistor for GPIO5."] + #[inline(always)] + #[must_use] + pub fn reg_gpio_5_pd(&mut self) -> REG_GPIO_5_PD_W<21> { + REG_GPIO_5_PD_W::new(self) + } + #[doc = "Bits 24:27 - Function select for GPIO5."] #[inline(always)] - pub fn reg_gpio_4_ie(&mut self) -> REG_GPIO_4_IE_W { - REG_GPIO_4_IE_W { w: self } + #[must_use] + pub fn reg_gpio_5_func_sel(&mut self) -> REG_GPIO_5_FUNC_SEL_W<24> { + REG_GPIO_5_FUNC_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -1473,11 +1124,10 @@ impl crate::Readable for GPIO_CFGCTL2_SPEC { #[doc = "`write(|w| ..)` method takes [gpio_cfgctl2::W](W) writer structure"] impl crate::Writable for GPIO_CFGCTL2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets GPIO_CFGCTL2 to value 0x1103_1103"] impl crate::Resettable for GPIO_CFGCTL2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x1103_1103 - } + const RESET_VALUE: Self::Ux = 0x1103_1103; } diff --git a/src/glb/gpio_cfgctl3.rs b/src/glb/gpio_cfgctl3.rs index 21af638..a65dd80 100644 --- a/src/glb/gpio_cfgctl3.rs +++ b/src/glb/gpio_cfgctl3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,562 +28,275 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Function select for GPIO7.\n\nValue on reset: 11"] -#[derive(Clone, Copy, Debug, PartialEq)] -#[repr(u8)] -pub enum REG_GPIO_7_FUNC_SEL_A { - #[doc = "4: `100`"] - SPI_SCLK = 4, - #[doc = "6: `110`"] - I2C_SDA = 6, - #[doc = "7: `111`"] - UART_SIG7 = 7, - #[doc = "8: `1000`"] - PWM_CH2 = 8, - #[doc = "9: `1001`"] - FEM_GPIO_3 = 9, - #[doc = "11: `1011`"] - SWGPIO_7 = 11, - #[doc = "14: `1110`"] - E21_TDO = 14, -} -impl From for u8 { - #[inline(always)] - fn from(variant: REG_GPIO_7_FUNC_SEL_A) -> Self { - variant as _ - } -} -#[doc = "Field `reg_gpio_7_func_sel` reader - Function select for GPIO7."] -pub struct REG_GPIO_7_FUNC_SEL_R(crate::FieldReader); -impl REG_GPIO_7_FUNC_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_7_FUNC_SEL_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 4 => Some(REG_GPIO_7_FUNC_SEL_A::SPI_SCLK), - 6 => Some(REG_GPIO_7_FUNC_SEL_A::I2C_SDA), - 7 => Some(REG_GPIO_7_FUNC_SEL_A::UART_SIG7), - 8 => Some(REG_GPIO_7_FUNC_SEL_A::PWM_CH2), - 9 => Some(REG_GPIO_7_FUNC_SEL_A::FEM_GPIO_3), - 11 => Some(REG_GPIO_7_FUNC_SEL_A::SWGPIO_7), - 14 => Some(REG_GPIO_7_FUNC_SEL_A::E21_TDO), - _ => None, - } - } - #[doc = "Checks if the value of the field is `SPI_SCLK`"] - #[inline(always)] - pub fn is_spi_sclk(&self) -> bool { - **self == REG_GPIO_7_FUNC_SEL_A::SPI_SCLK - } - #[doc = "Checks if the value of the field is `I2C_SDA`"] - #[inline(always)] - pub fn is_i2c_sda(&self) -> bool { - **self == REG_GPIO_7_FUNC_SEL_A::I2C_SDA - } - #[doc = "Checks if the value of the field is `UART_SIG7`"] - #[inline(always)] - pub fn is_uart_sig7(&self) -> bool { - **self == REG_GPIO_7_FUNC_SEL_A::UART_SIG7 - } - #[doc = "Checks if the value of the field is `PWM_CH2`"] - #[inline(always)] - pub fn is_pwm_ch2(&self) -> bool { - **self == REG_GPIO_7_FUNC_SEL_A::PWM_CH2 - } - #[doc = "Checks if the value of the field is `FEM_GPIO_3`"] - #[inline(always)] - pub fn is_fem_gpio_3(&self) -> bool { - **self == REG_GPIO_7_FUNC_SEL_A::FEM_GPIO_3 - } - #[doc = "Checks if the value of the field is `SWGPIO_7`"] - #[inline(always)] - pub fn is_swgpio_7(&self) -> bool { - **self == REG_GPIO_7_FUNC_SEL_A::SWGPIO_7 - } - #[doc = "Checks if the value of the field is `E21_TDO`"] - #[inline(always)] - pub fn is_e21_tdo(&self) -> bool { - **self == REG_GPIO_7_FUNC_SEL_A::E21_TDO - } -} -impl core::ops::Deref for REG_GPIO_7_FUNC_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_7_func_sel` writer - Function select for GPIO7."] -pub struct REG_GPIO_7_FUNC_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_7_FUNC_SEL_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_7_FUNC_SEL_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } - #[doc = "`100`"] - #[inline(always)] - pub fn spi_sclk(self) -> &'a mut W { - self.variant(REG_GPIO_7_FUNC_SEL_A::SPI_SCLK) - } - #[doc = "`110`"] - #[inline(always)] - pub fn i2c_sda(self) -> &'a mut W { - self.variant(REG_GPIO_7_FUNC_SEL_A::I2C_SDA) - } - #[doc = "`111`"] - #[inline(always)] - pub fn uart_sig7(self) -> &'a mut W { - self.variant(REG_GPIO_7_FUNC_SEL_A::UART_SIG7) - } - #[doc = "`1000`"] - #[inline(always)] - pub fn pwm_ch2(self) -> &'a mut W { - self.variant(REG_GPIO_7_FUNC_SEL_A::PWM_CH2) - } - #[doc = "`1001`"] - #[inline(always)] - pub fn fem_gpio_3(self) -> &'a mut W { - self.variant(REG_GPIO_7_FUNC_SEL_A::FEM_GPIO_3) - } - #[doc = "`1011`"] - #[inline(always)] - pub fn swgpio_7(self) -> &'a mut W { - self.variant(REG_GPIO_7_FUNC_SEL_A::SWGPIO_7) - } - #[doc = "`1110`"] - #[inline(always)] - pub fn e21_tdo(self) -> &'a mut W { - self.variant(REG_GPIO_7_FUNC_SEL_A::E21_TDO) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 24)) | ((value as u32 & 0x0f) << 24); - self.w - } -} -#[doc = "Pull Down Resistor for GPIO7.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_7_PD_A { +#[doc = "Field `reg_gpio_6_ie` reader - Input enable for GPIO6."] +pub type REG_GPIO_6_IE_R = crate::BitReader; +#[doc = "Input enable for GPIO6.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO6INPUT_ENABLED_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_7_PD_A) -> Self { + fn from(variant: GPIO6INPUT_ENABLED_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_7_pd` reader - Pull Down Resistor for GPIO7."] -pub struct REG_GPIO_7_PD_R(crate::FieldReader); -impl REG_GPIO_7_PD_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_7_PD_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_6_IE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_7_PD_A { + pub fn variant(&self) -> GPIO6INPUT_ENABLED_A { match self.bits { - false => REG_GPIO_7_PD_A::DISABLED, - true => REG_GPIO_7_PD_A::ENABLED, + false => GPIO6INPUT_ENABLED_A::DISABLED, + true => GPIO6INPUT_ENABLED_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_7_PD_A::DISABLED + *self == GPIO6INPUT_ENABLED_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_7_PD_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_7_PD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO6INPUT_ENABLED_A::ENABLED } } -#[doc = "Field `reg_gpio_7_pd` writer - Pull Down Resistor for GPIO7."] -pub struct REG_GPIO_7_PD_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_7_PD_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_7_PD_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_6_ie` writer - Input enable for GPIO6."] +pub type REG_GPIO_6_IE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL3_SPEC, GPIO6INPUT_ENABLED_A, O>; +impl<'a, const O: u8> REG_GPIO_6_IE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_7_PD_A::DISABLED) + self.variant(GPIO6INPUT_ENABLED_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_7_PD_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); - self.w + self.variant(GPIO6INPUT_ENABLED_A::ENABLED) } } -#[doc = "Pull Up Resistor for GPIO7.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_7_PU_A { +#[doc = "Field `reg_gpio_6_smt` reader - Schmitt trigger enabled for GPIO6."] +pub type REG_GPIO_6_SMT_R = crate::BitReader; +#[doc = "Schmitt trigger enabled for GPIO6.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO6SCHMITT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_7_PU_A) -> Self { + fn from(variant: GPIO6SCHMITT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_7_pu` reader - Pull Up Resistor for GPIO7."] -pub struct REG_GPIO_7_PU_R(crate::FieldReader); -impl REG_GPIO_7_PU_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_7_PU_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_6_SMT_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_7_PU_A { + pub fn variant(&self) -> GPIO6SCHMITT_A { match self.bits { - false => REG_GPIO_7_PU_A::DISABLED, - true => REG_GPIO_7_PU_A::ENABLED, + false => GPIO6SCHMITT_A::DISABLED, + true => GPIO6SCHMITT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_7_PU_A::DISABLED + *self == GPIO6SCHMITT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_7_PU_A::ENABLED + *self == GPIO6SCHMITT_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_7_PU_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_7_pu` writer - Pull Up Resistor for GPIO7."] -pub struct REG_GPIO_7_PU_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_7_PU_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_7_PU_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_6_smt` writer - Schmitt trigger enabled for GPIO6."] +pub type REG_GPIO_6_SMT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL3_SPEC, GPIO6SCHMITT_A, O>; +impl<'a, const O: u8> REG_GPIO_6_SMT_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_7_PU_A::DISABLED) + self.variant(GPIO6SCHMITT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_7_PU_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w + self.variant(GPIO6SCHMITT_A::ENABLED) } } -#[doc = "Driving control enabled for GPIO7.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[doc = "Field `reg_gpio_6_drv` reader - Driving control enabled for GPIO6."] +pub type REG_GPIO_6_DRV_R = crate::FieldReader; +#[doc = "Driving control enabled for GPIO6.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_7_DRV_A { +pub enum GPIO6DRIVING_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_7_DRV_A) -> Self { + fn from(variant: GPIO6DRIVING_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_7_drv` reader - Driving control enabled for GPIO7."] -pub struct REG_GPIO_7_DRV_R(crate::FieldReader); -impl REG_GPIO_7_DRV_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_7_DRV_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_6_DRV_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 0 => Some(REG_GPIO_7_DRV_A::DISABLED), - 1 => Some(REG_GPIO_7_DRV_A::ENABLED), + 0 => Some(GPIO6DRIVING_A::DISABLED), + 1 => Some(GPIO6DRIVING_A::ENABLED), _ => None, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_7_DRV_A::DISABLED + *self == GPIO6DRIVING_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_7_DRV_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_7_DRV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO6DRIVING_A::ENABLED } } -#[doc = "Field `reg_gpio_7_drv` writer - Driving control enabled for GPIO7."] -pub struct REG_GPIO_7_DRV_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_7_DRV_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_7_DRV_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +#[doc = "Field `reg_gpio_6_drv` writer - Driving control enabled for GPIO6."] +pub type REG_GPIO_6_DRV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL3_SPEC, u8, GPIO6DRIVING_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_6_DRV_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_7_DRV_A::DISABLED) + self.variant(GPIO6DRIVING_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_7_DRV_A::ENABLED) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 18)) | ((value as u32 & 0x03) << 18); - self.w + self.variant(GPIO6DRIVING_A::ENABLED) } } -#[doc = "Schmitt trigger enabled for GPIO7.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_7_SMT_A { +#[doc = "Field `reg_gpio_6_pu` reader - Pull Up Resistor for GPIO6."] +pub type REG_GPIO_6_PU_R = crate::BitReader; +#[doc = "Pull Up Resistor for GPIO6.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO6PULL_UP_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_7_SMT_A) -> Self { + fn from(variant: GPIO6PULL_UP_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_7_smt` reader - Schmitt trigger enabled for GPIO7."] -pub struct REG_GPIO_7_SMT_R(crate::FieldReader); -impl REG_GPIO_7_SMT_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_7_SMT_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_6_PU_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_7_SMT_A { + pub fn variant(&self) -> GPIO6PULL_UP_RESISTOR_A { match self.bits { - false => REG_GPIO_7_SMT_A::DISABLED, - true => REG_GPIO_7_SMT_A::ENABLED, + false => GPIO6PULL_UP_RESISTOR_A::DISABLED, + true => GPIO6PULL_UP_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_7_SMT_A::DISABLED + *self == GPIO6PULL_UP_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_7_SMT_A::ENABLED + *self == GPIO6PULL_UP_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_7_SMT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_7_smt` writer - Schmitt trigger enabled for GPIO7."] -pub struct REG_GPIO_7_SMT_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_7_SMT_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_7_SMT_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_6_pu` writer - Pull Up Resistor for GPIO6."] +pub type REG_GPIO_6_PU_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL3_SPEC, GPIO6PULL_UP_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_6_PU_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_7_SMT_A::DISABLED) + self.variant(GPIO6PULL_UP_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_7_SMT_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w + self.variant(GPIO6PULL_UP_RESISTOR_A::ENABLED) } } -#[doc = "Input enable for GPIO7.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_7_IE_A { +#[doc = "Field `reg_gpio_6_pd` reader - Pull Down Resistor for GPIO6."] +pub type REG_GPIO_6_PD_R = crate::BitReader; +#[doc = "Pull Down Resistor for GPIO6.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO6PULL_DOWN_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_7_IE_A) -> Self { + fn from(variant: GPIO6PULL_DOWN_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_7_ie` reader - Input enable for GPIO7."] -pub struct REG_GPIO_7_IE_R(crate::FieldReader); -impl REG_GPIO_7_IE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_7_IE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_6_PD_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_7_IE_A { + pub fn variant(&self) -> GPIO6PULL_DOWN_RESISTOR_A { match self.bits { - false => REG_GPIO_7_IE_A::DISABLED, - true => REG_GPIO_7_IE_A::ENABLED, + false => GPIO6PULL_DOWN_RESISTOR_A::DISABLED, + true => GPIO6PULL_DOWN_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_7_IE_A::DISABLED + *self == GPIO6PULL_DOWN_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_7_IE_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_7_IE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO6PULL_DOWN_RESISTOR_A::ENABLED } } -#[doc = "Field `reg_gpio_7_ie` writer - Input enable for GPIO7."] -pub struct REG_GPIO_7_IE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_7_IE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_7_IE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_6_pd` writer - Pull Down Resistor for GPIO6."] +pub type REG_GPIO_6_PD_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL3_SPEC, GPIO6PULL_DOWN_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_6_PD_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_7_IE_A::DISABLED) + self.variant(GPIO6PULL_DOWN_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_7_IE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w + self.variant(GPIO6PULL_DOWN_RESISTOR_A::ENABLED) } } +#[doc = "Field `reg_gpio_6_func_sel` reader - Function select for GPIO6."] +pub type REG_GPIO_6_FUNC_SEL_R = crate::FieldReader; #[doc = "Function select for GPIO6.\n\nValue on reset: 11"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_6_FUNC_SEL_A { +pub enum GPIO6FUNCTION_SELECT_A { #[doc = "4: `100`"] SPI_SS = 4, #[doc = "6: `110`"] @@ -600,669 +314,626 @@ pub enum REG_GPIO_6_FUNC_SEL_A { #[doc = "14: `1110`"] E21_TCK = 14, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_6_FUNC_SEL_A) -> Self { + fn from(variant: GPIO6FUNCTION_SELECT_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_6_func_sel` reader - Function select for GPIO6."] -pub struct REG_GPIO_6_FUNC_SEL_R(crate::FieldReader); impl REG_GPIO_6_FUNC_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_6_FUNC_SEL_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 4 => Some(REG_GPIO_6_FUNC_SEL_A::SPI_SS), - 6 => Some(REG_GPIO_6_FUNC_SEL_A::I2C_SCL), - 7 => Some(REG_GPIO_6_FUNC_SEL_A::UART_SIG6), - 8 => Some(REG_GPIO_6_FUNC_SEL_A::PWM_CH1), - 9 => Some(REG_GPIO_6_FUNC_SEL_A::FEM_GPIO_2), - 10 => Some(REG_GPIO_6_FUNC_SEL_A::GPIP_CH5), - 11 => Some(REG_GPIO_6_FUNC_SEL_A::SWGPIO_6), - 14 => Some(REG_GPIO_6_FUNC_SEL_A::E21_TCK), + 4 => Some(GPIO6FUNCTION_SELECT_A::SPI_SS), + 6 => Some(GPIO6FUNCTION_SELECT_A::I2C_SCL), + 7 => Some(GPIO6FUNCTION_SELECT_A::UART_SIG6), + 8 => Some(GPIO6FUNCTION_SELECT_A::PWM_CH1), + 9 => Some(GPIO6FUNCTION_SELECT_A::FEM_GPIO_2), + 10 => Some(GPIO6FUNCTION_SELECT_A::GPIP_CH5), + 11 => Some(GPIO6FUNCTION_SELECT_A::SWGPIO_6), + 14 => Some(GPIO6FUNCTION_SELECT_A::E21_TCK), _ => None, } } #[doc = "Checks if the value of the field is `SPI_SS`"] #[inline(always)] pub fn is_spi_ss(&self) -> bool { - **self == REG_GPIO_6_FUNC_SEL_A::SPI_SS + *self == GPIO6FUNCTION_SELECT_A::SPI_SS } #[doc = "Checks if the value of the field is `I2C_SCL`"] #[inline(always)] pub fn is_i2c_scl(&self) -> bool { - **self == REG_GPIO_6_FUNC_SEL_A::I2C_SCL + *self == GPIO6FUNCTION_SELECT_A::I2C_SCL } #[doc = "Checks if the value of the field is `UART_SIG6`"] #[inline(always)] pub fn is_uart_sig6(&self) -> bool { - **self == REG_GPIO_6_FUNC_SEL_A::UART_SIG6 + *self == GPIO6FUNCTION_SELECT_A::UART_SIG6 } #[doc = "Checks if the value of the field is `PWM_CH1`"] #[inline(always)] pub fn is_pwm_ch1(&self) -> bool { - **self == REG_GPIO_6_FUNC_SEL_A::PWM_CH1 + *self == GPIO6FUNCTION_SELECT_A::PWM_CH1 } #[doc = "Checks if the value of the field is `FEM_GPIO_2`"] #[inline(always)] pub fn is_fem_gpio_2(&self) -> bool { - **self == REG_GPIO_6_FUNC_SEL_A::FEM_GPIO_2 + *self == GPIO6FUNCTION_SELECT_A::FEM_GPIO_2 } #[doc = "Checks if the value of the field is `GPIP_CH5`"] #[inline(always)] pub fn is_gpip_ch5(&self) -> bool { - **self == REG_GPIO_6_FUNC_SEL_A::GPIP_CH5 + *self == GPIO6FUNCTION_SELECT_A::GPIP_CH5 } #[doc = "Checks if the value of the field is `SWGPIO_6`"] #[inline(always)] pub fn is_swgpio_6(&self) -> bool { - **self == REG_GPIO_6_FUNC_SEL_A::SWGPIO_6 + *self == GPIO6FUNCTION_SELECT_A::SWGPIO_6 } #[doc = "Checks if the value of the field is `E21_TCK`"] #[inline(always)] pub fn is_e21_tck(&self) -> bool { - **self == REG_GPIO_6_FUNC_SEL_A::E21_TCK - } -} -impl core::ops::Deref for REG_GPIO_6_FUNC_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO6FUNCTION_SELECT_A::E21_TCK } } #[doc = "Field `reg_gpio_6_func_sel` writer - Function select for GPIO6."] -pub struct REG_GPIO_6_FUNC_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_6_FUNC_SEL_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_6_FUNC_SEL_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +pub type REG_GPIO_6_FUNC_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL3_SPEC, u8, GPIO6FUNCTION_SELECT_A, 4, O>; +impl<'a, const O: u8> REG_GPIO_6_FUNC_SEL_W<'a, O> { #[doc = "`100`"] #[inline(always)] pub fn spi_ss(self) -> &'a mut W { - self.variant(REG_GPIO_6_FUNC_SEL_A::SPI_SS) + self.variant(GPIO6FUNCTION_SELECT_A::SPI_SS) } #[doc = "`110`"] #[inline(always)] pub fn i2c_scl(self) -> &'a mut W { - self.variant(REG_GPIO_6_FUNC_SEL_A::I2C_SCL) + self.variant(GPIO6FUNCTION_SELECT_A::I2C_SCL) } #[doc = "`111`"] #[inline(always)] pub fn uart_sig6(self) -> &'a mut W { - self.variant(REG_GPIO_6_FUNC_SEL_A::UART_SIG6) + self.variant(GPIO6FUNCTION_SELECT_A::UART_SIG6) } #[doc = "`1000`"] #[inline(always)] pub fn pwm_ch1(self) -> &'a mut W { - self.variant(REG_GPIO_6_FUNC_SEL_A::PWM_CH1) + self.variant(GPIO6FUNCTION_SELECT_A::PWM_CH1) } #[doc = "`1001`"] #[inline(always)] pub fn fem_gpio_2(self) -> &'a mut W { - self.variant(REG_GPIO_6_FUNC_SEL_A::FEM_GPIO_2) + self.variant(GPIO6FUNCTION_SELECT_A::FEM_GPIO_2) } #[doc = "`1010`"] #[inline(always)] pub fn gpip_ch5(self) -> &'a mut W { - self.variant(REG_GPIO_6_FUNC_SEL_A::GPIP_CH5) + self.variant(GPIO6FUNCTION_SELECT_A::GPIP_CH5) } #[doc = "`1011`"] #[inline(always)] pub fn swgpio_6(self) -> &'a mut W { - self.variant(REG_GPIO_6_FUNC_SEL_A::SWGPIO_6) + self.variant(GPIO6FUNCTION_SELECT_A::SWGPIO_6) } #[doc = "`1110`"] #[inline(always)] pub fn e21_tck(self) -> &'a mut W { - self.variant(REG_GPIO_6_FUNC_SEL_A::E21_TCK) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 8)) | ((value as u32 & 0x0f) << 8); - self.w + self.variant(GPIO6FUNCTION_SELECT_A::E21_TCK) } } -#[doc = "Pull Down Resistor for GPIO6.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_6_PD_A { +#[doc = "Field `reg_gpio_7_ie` reader - Input enable for GPIO7."] +pub type REG_GPIO_7_IE_R = crate::BitReader; +#[doc = "Input enable for GPIO7.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO7INPUT_ENABLED_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_6_PD_A) -> Self { + fn from(variant: GPIO7INPUT_ENABLED_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_6_pd` reader - Pull Down Resistor for GPIO6."] -pub struct REG_GPIO_6_PD_R(crate::FieldReader); -impl REG_GPIO_6_PD_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_6_PD_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_7_IE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_6_PD_A { + pub fn variant(&self) -> GPIO7INPUT_ENABLED_A { match self.bits { - false => REG_GPIO_6_PD_A::DISABLED, - true => REG_GPIO_6_PD_A::ENABLED, + false => GPIO7INPUT_ENABLED_A::DISABLED, + true => GPIO7INPUT_ENABLED_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_6_PD_A::DISABLED + *self == GPIO7INPUT_ENABLED_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_6_PD_A::ENABLED + *self == GPIO7INPUT_ENABLED_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_6_PD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_6_pd` writer - Pull Down Resistor for GPIO6."] -pub struct REG_GPIO_6_PD_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_6_PD_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_6_PD_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_7_ie` writer - Input enable for GPIO7."] +pub type REG_GPIO_7_IE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL3_SPEC, GPIO7INPUT_ENABLED_A, O>; +impl<'a, const O: u8> REG_GPIO_7_IE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_6_PD_A::DISABLED) + self.variant(GPIO7INPUT_ENABLED_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_6_PD_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w + self.variant(GPIO7INPUT_ENABLED_A::ENABLED) } } -#[doc = "Pull Up Resistor for GPIO6.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_6_PU_A { +#[doc = "Field `reg_gpio_7_smt` reader - Schmitt trigger enabled for GPIO7."] +pub type REG_GPIO_7_SMT_R = crate::BitReader; +#[doc = "Schmitt trigger enabled for GPIO7.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO7SCHMITT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_6_PU_A) -> Self { + fn from(variant: GPIO7SCHMITT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_6_pu` reader - Pull Up Resistor for GPIO6."] -pub struct REG_GPIO_6_PU_R(crate::FieldReader); -impl REG_GPIO_6_PU_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_6_PU_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_7_SMT_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_6_PU_A { + pub fn variant(&self) -> GPIO7SCHMITT_A { match self.bits { - false => REG_GPIO_6_PU_A::DISABLED, - true => REG_GPIO_6_PU_A::ENABLED, + false => GPIO7SCHMITT_A::DISABLED, + true => GPIO7SCHMITT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_6_PU_A::DISABLED + *self == GPIO7SCHMITT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_6_PU_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_6_PU_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO7SCHMITT_A::ENABLED } } -#[doc = "Field `reg_gpio_6_pu` writer - Pull Up Resistor for GPIO6."] -pub struct REG_GPIO_6_PU_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_6_PU_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_6_PU_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_7_smt` writer - Schmitt trigger enabled for GPIO7."] +pub type REG_GPIO_7_SMT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL3_SPEC, GPIO7SCHMITT_A, O>; +impl<'a, const O: u8> REG_GPIO_7_SMT_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_6_PU_A::DISABLED) + self.variant(GPIO7SCHMITT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_6_PU_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w + self.variant(GPIO7SCHMITT_A::ENABLED) } } -#[doc = "Driving control enabled for GPIO6.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[doc = "Field `reg_gpio_7_drv` reader - Driving control enabled for GPIO7."] +pub type REG_GPIO_7_DRV_R = crate::FieldReader; +#[doc = "Driving control enabled for GPIO7.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_6_DRV_A { +pub enum GPIO7DRIVING_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_6_DRV_A) -> Self { + fn from(variant: GPIO7DRIVING_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_6_drv` reader - Driving control enabled for GPIO6."] -pub struct REG_GPIO_6_DRV_R(crate::FieldReader); -impl REG_GPIO_6_DRV_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_6_DRV_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_7_DRV_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 0 => Some(REG_GPIO_6_DRV_A::DISABLED), - 1 => Some(REG_GPIO_6_DRV_A::ENABLED), + 0 => Some(GPIO7DRIVING_A::DISABLED), + 1 => Some(GPIO7DRIVING_A::ENABLED), _ => None, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_6_DRV_A::DISABLED + *self == GPIO7DRIVING_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_6_DRV_A::ENABLED + *self == GPIO7DRIVING_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_6_DRV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_6_drv` writer - Driving control enabled for GPIO6."] -pub struct REG_GPIO_6_DRV_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_6_DRV_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_6_DRV_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +#[doc = "Field `reg_gpio_7_drv` writer - Driving control enabled for GPIO7."] +pub type REG_GPIO_7_DRV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL3_SPEC, u8, GPIO7DRIVING_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_7_DRV_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_6_DRV_A::DISABLED) + self.variant(GPIO7DRIVING_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_6_DRV_A::ENABLED) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 2)) | ((value as u32 & 0x03) << 2); - self.w + self.variant(GPIO7DRIVING_A::ENABLED) } } -#[doc = "Schmitt trigger enabled for GPIO6.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_6_SMT_A { +#[doc = "Field `reg_gpio_7_pu` reader - Pull Up Resistor for GPIO7."] +pub type REG_GPIO_7_PU_R = crate::BitReader; +#[doc = "Pull Up Resistor for GPIO7.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO7PULL_UP_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_6_SMT_A) -> Self { + fn from(variant: GPIO7PULL_UP_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_6_smt` reader - Schmitt trigger enabled for GPIO6."] -pub struct REG_GPIO_6_SMT_R(crate::FieldReader); -impl REG_GPIO_6_SMT_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_6_SMT_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_7_PU_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_6_SMT_A { + pub fn variant(&self) -> GPIO7PULL_UP_RESISTOR_A { match self.bits { - false => REG_GPIO_6_SMT_A::DISABLED, - true => REG_GPIO_6_SMT_A::ENABLED, + false => GPIO7PULL_UP_RESISTOR_A::DISABLED, + true => GPIO7PULL_UP_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_6_SMT_A::DISABLED + *self == GPIO7PULL_UP_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_6_SMT_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_6_SMT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO7PULL_UP_RESISTOR_A::ENABLED } } -#[doc = "Field `reg_gpio_6_smt` writer - Schmitt trigger enabled for GPIO6."] -pub struct REG_GPIO_6_SMT_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_6_SMT_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_6_SMT_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_7_pu` writer - Pull Up Resistor for GPIO7."] +pub type REG_GPIO_7_PU_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL3_SPEC, GPIO7PULL_UP_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_7_PU_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_6_SMT_A::DISABLED) + self.variant(GPIO7PULL_UP_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_6_SMT_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w + self.variant(GPIO7PULL_UP_RESISTOR_A::ENABLED) } } -#[doc = "Input enable for GPIO6.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_6_IE_A { +#[doc = "Field `reg_gpio_7_pd` reader - Pull Down Resistor for GPIO7."] +pub type REG_GPIO_7_PD_R = crate::BitReader; +#[doc = "Pull Down Resistor for GPIO7.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO7PULL_DOWN_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_6_IE_A) -> Self { + fn from(variant: GPIO7PULL_DOWN_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_6_ie` reader - Input enable for GPIO6."] -pub struct REG_GPIO_6_IE_R(crate::FieldReader); -impl REG_GPIO_6_IE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_6_IE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_7_PD_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_6_IE_A { + pub fn variant(&self) -> GPIO7PULL_DOWN_RESISTOR_A { match self.bits { - false => REG_GPIO_6_IE_A::DISABLED, - true => REG_GPIO_6_IE_A::ENABLED, + false => GPIO7PULL_DOWN_RESISTOR_A::DISABLED, + true => GPIO7PULL_DOWN_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_6_IE_A::DISABLED + *self == GPIO7PULL_DOWN_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_6_IE_A::ENABLED + *self == GPIO7PULL_DOWN_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_6_IE_R { - type Target = crate::FieldReader; +#[doc = "Field `reg_gpio_7_pd` writer - Pull Down Resistor for GPIO7."] +pub type REG_GPIO_7_PD_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL3_SPEC, GPIO7PULL_DOWN_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_7_PD_W<'a, O> { + #[doc = "`0`"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn disabled(self) -> &'a mut W { + self.variant(GPIO7PULL_DOWN_RESISTOR_A::DISABLED) + } + #[doc = "`1`"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(GPIO7PULL_DOWN_RESISTOR_A::ENABLED) } } -#[doc = "Field `reg_gpio_6_ie` writer - Input enable for GPIO6."] -pub struct REG_GPIO_6_IE_W<'a> { - w: &'a mut W, +#[doc = "Field `reg_gpio_7_func_sel` reader - Function select for GPIO7."] +pub type REG_GPIO_7_FUNC_SEL_R = crate::FieldReader; +#[doc = "Function select for GPIO7.\n\nValue on reset: 11"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum GPIO7FUNCTION_SELECT_A { + #[doc = "4: `100`"] + SPI_SCLK = 4, + #[doc = "6: `110`"] + I2C_SDA = 6, + #[doc = "7: `111`"] + UART_SIG7 = 7, + #[doc = "8: `1000`"] + PWM_CH2 = 8, + #[doc = "9: `1001`"] + FEM_GPIO_3 = 9, + #[doc = "11: `1011`"] + SWGPIO_7 = 11, + #[doc = "14: `1110`"] + E21_TDO = 14, } -impl<'a> REG_GPIO_6_IE_W<'a> { - #[doc = r"Writes `variant` to the field"] +impl From for u8 { #[inline(always)] - pub fn variant(self, variant: REG_GPIO_6_IE_A) -> &'a mut W { - self.bit(variant.into()) + fn from(variant: GPIO7FUNCTION_SELECT_A) -> Self { + variant as _ } - #[doc = "`0`"] +} +impl REG_GPIO_7_FUNC_SEL_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_6_IE_A::DISABLED) + pub fn variant(&self) -> Option { + match self.bits { + 4 => Some(GPIO7FUNCTION_SELECT_A::SPI_SCLK), + 6 => Some(GPIO7FUNCTION_SELECT_A::I2C_SDA), + 7 => Some(GPIO7FUNCTION_SELECT_A::UART_SIG7), + 8 => Some(GPIO7FUNCTION_SELECT_A::PWM_CH2), + 9 => Some(GPIO7FUNCTION_SELECT_A::FEM_GPIO_3), + 11 => Some(GPIO7FUNCTION_SELECT_A::SWGPIO_7), + 14 => Some(GPIO7FUNCTION_SELECT_A::E21_TDO), + _ => None, + } } - #[doc = "`1`"] + #[doc = "Checks if the value of the field is `SPI_SCLK`"] #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_6_IE_A::ENABLED) + pub fn is_spi_sclk(&self) -> bool { + *self == GPIO7FUNCTION_SELECT_A::SPI_SCLK + } + #[doc = "Checks if the value of the field is `I2C_SDA`"] + #[inline(always)] + pub fn is_i2c_sda(&self) -> bool { + *self == GPIO7FUNCTION_SELECT_A::I2C_SDA } - #[doc = r"Sets the field bit"] + #[doc = "Checks if the value of the field is `UART_SIG7`"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn is_uart_sig7(&self) -> bool { + *self == GPIO7FUNCTION_SELECT_A::UART_SIG7 } - #[doc = r"Clears the field bit"] + #[doc = "Checks if the value of the field is `PWM_CH2`"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn is_pwm_ch2(&self) -> bool { + *self == GPIO7FUNCTION_SELECT_A::PWM_CH2 } - #[doc = r"Writes raw bits to the field"] + #[doc = "Checks if the value of the field is `FEM_GPIO_3`"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn is_fem_gpio_3(&self) -> bool { + *self == GPIO7FUNCTION_SELECT_A::FEM_GPIO_3 + } + #[doc = "Checks if the value of the field is `SWGPIO_7`"] + #[inline(always)] + pub fn is_swgpio_7(&self) -> bool { + *self == GPIO7FUNCTION_SELECT_A::SWGPIO_7 + } + #[doc = "Checks if the value of the field is `E21_TDO`"] + #[inline(always)] + pub fn is_e21_tdo(&self) -> bool { + *self == GPIO7FUNCTION_SELECT_A::E21_TDO } } -impl R { - #[doc = "Bits 24:27 - Function select for GPIO7."] +#[doc = "Field `reg_gpio_7_func_sel` writer - Function select for GPIO7."] +pub type REG_GPIO_7_FUNC_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL3_SPEC, u8, GPIO7FUNCTION_SELECT_A, 4, O>; +impl<'a, const O: u8> REG_GPIO_7_FUNC_SEL_W<'a, O> { + #[doc = "`100`"] #[inline(always)] - pub fn reg_gpio_7_func_sel(&self) -> REG_GPIO_7_FUNC_SEL_R { - REG_GPIO_7_FUNC_SEL_R::new(((self.bits >> 24) & 0x0f) as u8) + pub fn spi_sclk(self) -> &'a mut W { + self.variant(GPIO7FUNCTION_SELECT_A::SPI_SCLK) } - #[doc = "Bit 21 - Pull Down Resistor for GPIO7."] + #[doc = "`110`"] #[inline(always)] - pub fn reg_gpio_7_pd(&self) -> REG_GPIO_7_PD_R { - REG_GPIO_7_PD_R::new(((self.bits >> 21) & 0x01) != 0) + pub fn i2c_sda(self) -> &'a mut W { + self.variant(GPIO7FUNCTION_SELECT_A::I2C_SDA) } - #[doc = "Bit 20 - Pull Up Resistor for GPIO7."] + #[doc = "`111`"] #[inline(always)] - pub fn reg_gpio_7_pu(&self) -> REG_GPIO_7_PU_R { - REG_GPIO_7_PU_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn uart_sig7(self) -> &'a mut W { + self.variant(GPIO7FUNCTION_SELECT_A::UART_SIG7) } - #[doc = "Bits 18:19 - Driving control enabled for GPIO7."] + #[doc = "`1000`"] #[inline(always)] - pub fn reg_gpio_7_drv(&self) -> REG_GPIO_7_DRV_R { - REG_GPIO_7_DRV_R::new(((self.bits >> 18) & 0x03) as u8) + pub fn pwm_ch2(self) -> &'a mut W { + self.variant(GPIO7FUNCTION_SELECT_A::PWM_CH2) } - #[doc = "Bit 17 - Schmitt trigger enabled for GPIO7."] + #[doc = "`1001`"] #[inline(always)] - pub fn reg_gpio_7_smt(&self) -> REG_GPIO_7_SMT_R { - REG_GPIO_7_SMT_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn fem_gpio_3(self) -> &'a mut W { + self.variant(GPIO7FUNCTION_SELECT_A::FEM_GPIO_3) } - #[doc = "Bit 16 - Input enable for GPIO7."] + #[doc = "`1011`"] #[inline(always)] - pub fn reg_gpio_7_ie(&self) -> REG_GPIO_7_IE_R { - REG_GPIO_7_IE_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn swgpio_7(self) -> &'a mut W { + self.variant(GPIO7FUNCTION_SELECT_A::SWGPIO_7) + } + #[doc = "`1110`"] + #[inline(always)] + pub fn e21_tdo(self) -> &'a mut W { + self.variant(GPIO7FUNCTION_SELECT_A::E21_TDO) + } +} +impl R { + #[doc = "Bit 0 - Input enable for GPIO6."] + #[inline(always)] + pub fn reg_gpio_6_ie(&self) -> REG_GPIO_6_IE_R { + REG_GPIO_6_IE_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Schmitt trigger enabled for GPIO6."] + #[inline(always)] + pub fn reg_gpio_6_smt(&self) -> REG_GPIO_6_SMT_R { + REG_GPIO_6_SMT_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bits 2:3 - Driving control enabled for GPIO6."] + #[inline(always)] + pub fn reg_gpio_6_drv(&self) -> REG_GPIO_6_DRV_R { + REG_GPIO_6_DRV_R::new(((self.bits >> 2) & 3) as u8) + } + #[doc = "Bit 4 - Pull Up Resistor for GPIO6."] + #[inline(always)] + pub fn reg_gpio_6_pu(&self) -> REG_GPIO_6_PU_R { + REG_GPIO_6_PU_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Pull Down Resistor for GPIO6."] + #[inline(always)] + pub fn reg_gpio_6_pd(&self) -> REG_GPIO_6_PD_R { + REG_GPIO_6_PD_R::new(((self.bits >> 5) & 1) != 0) } #[doc = "Bits 8:11 - Function select for GPIO6."] #[inline(always)] pub fn reg_gpio_6_func_sel(&self) -> REG_GPIO_6_FUNC_SEL_R { REG_GPIO_6_FUNC_SEL_R::new(((self.bits >> 8) & 0x0f) as u8) } - #[doc = "Bit 5 - Pull Down Resistor for GPIO6."] + #[doc = "Bit 16 - Input enable for GPIO7."] #[inline(always)] - pub fn reg_gpio_6_pd(&self) -> REG_GPIO_6_PD_R { - REG_GPIO_6_PD_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn reg_gpio_7_ie(&self) -> REG_GPIO_7_IE_R { + REG_GPIO_7_IE_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 4 - Pull Up Resistor for GPIO6."] + #[doc = "Bit 17 - Schmitt trigger enabled for GPIO7."] #[inline(always)] - pub fn reg_gpio_6_pu(&self) -> REG_GPIO_6_PU_R { - REG_GPIO_6_PU_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn reg_gpio_7_smt(&self) -> REG_GPIO_7_SMT_R { + REG_GPIO_7_SMT_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bits 2:3 - Driving control enabled for GPIO6."] + #[doc = "Bits 18:19 - Driving control enabled for GPIO7."] #[inline(always)] - pub fn reg_gpio_6_drv(&self) -> REG_GPIO_6_DRV_R { - REG_GPIO_6_DRV_R::new(((self.bits >> 2) & 0x03) as u8) + pub fn reg_gpio_7_drv(&self) -> REG_GPIO_7_DRV_R { + REG_GPIO_7_DRV_R::new(((self.bits >> 18) & 3) as u8) } - #[doc = "Bit 1 - Schmitt trigger enabled for GPIO6."] + #[doc = "Bit 20 - Pull Up Resistor for GPIO7."] #[inline(always)] - pub fn reg_gpio_6_smt(&self) -> REG_GPIO_6_SMT_R { - REG_GPIO_6_SMT_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn reg_gpio_7_pu(&self) -> REG_GPIO_7_PU_R { + REG_GPIO_7_PU_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bit 0 - Input enable for GPIO6."] + #[doc = "Bit 21 - Pull Down Resistor for GPIO7."] #[inline(always)] - pub fn reg_gpio_6_ie(&self) -> REG_GPIO_6_IE_R { - REG_GPIO_6_IE_R::new((self.bits & 0x01) != 0) + pub fn reg_gpio_7_pd(&self) -> REG_GPIO_7_PD_R { + REG_GPIO_7_PD_R::new(((self.bits >> 21) & 1) != 0) } -} -impl W { #[doc = "Bits 24:27 - Function select for GPIO7."] #[inline(always)] - pub fn reg_gpio_7_func_sel(&mut self) -> REG_GPIO_7_FUNC_SEL_W { - REG_GPIO_7_FUNC_SEL_W { w: self } + pub fn reg_gpio_7_func_sel(&self) -> REG_GPIO_7_FUNC_SEL_R { + REG_GPIO_7_FUNC_SEL_R::new(((self.bits >> 24) & 0x0f) as u8) } - #[doc = "Bit 21 - Pull Down Resistor for GPIO7."] +} +impl W { + #[doc = "Bit 0 - Input enable for GPIO6."] #[inline(always)] - pub fn reg_gpio_7_pd(&mut self) -> REG_GPIO_7_PD_W { - REG_GPIO_7_PD_W { w: self } + #[must_use] + pub fn reg_gpio_6_ie(&mut self) -> REG_GPIO_6_IE_W<0> { + REG_GPIO_6_IE_W::new(self) } - #[doc = "Bit 20 - Pull Up Resistor for GPIO7."] + #[doc = "Bit 1 - Schmitt trigger enabled for GPIO6."] #[inline(always)] - pub fn reg_gpio_7_pu(&mut self) -> REG_GPIO_7_PU_W { - REG_GPIO_7_PU_W { w: self } + #[must_use] + pub fn reg_gpio_6_smt(&mut self) -> REG_GPIO_6_SMT_W<1> { + REG_GPIO_6_SMT_W::new(self) } - #[doc = "Bits 18:19 - Driving control enabled for GPIO7."] + #[doc = "Bits 2:3 - Driving control enabled for GPIO6."] #[inline(always)] - pub fn reg_gpio_7_drv(&mut self) -> REG_GPIO_7_DRV_W { - REG_GPIO_7_DRV_W { w: self } + #[must_use] + pub fn reg_gpio_6_drv(&mut self) -> REG_GPIO_6_DRV_W<2> { + REG_GPIO_6_DRV_W::new(self) } - #[doc = "Bit 17 - Schmitt trigger enabled for GPIO7."] + #[doc = "Bit 4 - Pull Up Resistor for GPIO6."] #[inline(always)] - pub fn reg_gpio_7_smt(&mut self) -> REG_GPIO_7_SMT_W { - REG_GPIO_7_SMT_W { w: self } + #[must_use] + pub fn reg_gpio_6_pu(&mut self) -> REG_GPIO_6_PU_W<4> { + REG_GPIO_6_PU_W::new(self) } - #[doc = "Bit 16 - Input enable for GPIO7."] + #[doc = "Bit 5 - Pull Down Resistor for GPIO6."] #[inline(always)] - pub fn reg_gpio_7_ie(&mut self) -> REG_GPIO_7_IE_W { - REG_GPIO_7_IE_W { w: self } + #[must_use] + pub fn reg_gpio_6_pd(&mut self) -> REG_GPIO_6_PD_W<5> { + REG_GPIO_6_PD_W::new(self) } #[doc = "Bits 8:11 - Function select for GPIO6."] #[inline(always)] - pub fn reg_gpio_6_func_sel(&mut self) -> REG_GPIO_6_FUNC_SEL_W { - REG_GPIO_6_FUNC_SEL_W { w: self } + #[must_use] + pub fn reg_gpio_6_func_sel(&mut self) -> REG_GPIO_6_FUNC_SEL_W<8> { + REG_GPIO_6_FUNC_SEL_W::new(self) } - #[doc = "Bit 5 - Pull Down Resistor for GPIO6."] + #[doc = "Bit 16 - Input enable for GPIO7."] #[inline(always)] - pub fn reg_gpio_6_pd(&mut self) -> REG_GPIO_6_PD_W { - REG_GPIO_6_PD_W { w: self } + #[must_use] + pub fn reg_gpio_7_ie(&mut self) -> REG_GPIO_7_IE_W<16> { + REG_GPIO_7_IE_W::new(self) } - #[doc = "Bit 4 - Pull Up Resistor for GPIO6."] + #[doc = "Bit 17 - Schmitt trigger enabled for GPIO7."] #[inline(always)] - pub fn reg_gpio_6_pu(&mut self) -> REG_GPIO_6_PU_W { - REG_GPIO_6_PU_W { w: self } + #[must_use] + pub fn reg_gpio_7_smt(&mut self) -> REG_GPIO_7_SMT_W<17> { + REG_GPIO_7_SMT_W::new(self) } - #[doc = "Bits 2:3 - Driving control enabled for GPIO6."] + #[doc = "Bits 18:19 - Driving control enabled for GPIO7."] #[inline(always)] - pub fn reg_gpio_6_drv(&mut self) -> REG_GPIO_6_DRV_W { - REG_GPIO_6_DRV_W { w: self } + #[must_use] + pub fn reg_gpio_7_drv(&mut self) -> REG_GPIO_7_DRV_W<18> { + REG_GPIO_7_DRV_W::new(self) } - #[doc = "Bit 1 - Schmitt trigger enabled for GPIO6."] + #[doc = "Bit 20 - Pull Up Resistor for GPIO7."] #[inline(always)] - pub fn reg_gpio_6_smt(&mut self) -> REG_GPIO_6_SMT_W { - REG_GPIO_6_SMT_W { w: self } + #[must_use] + pub fn reg_gpio_7_pu(&mut self) -> REG_GPIO_7_PU_W<20> { + REG_GPIO_7_PU_W::new(self) } - #[doc = "Bit 0 - Input enable for GPIO6."] + #[doc = "Bit 21 - Pull Down Resistor for GPIO7."] + #[inline(always)] + #[must_use] + pub fn reg_gpio_7_pd(&mut self) -> REG_GPIO_7_PD_W<21> { + REG_GPIO_7_PD_W::new(self) + } + #[doc = "Bits 24:27 - Function select for GPIO7."] #[inline(always)] - pub fn reg_gpio_6_ie(&mut self) -> REG_GPIO_6_IE_W { - REG_GPIO_6_IE_W { w: self } + #[must_use] + pub fn reg_gpio_7_func_sel(&mut self) -> REG_GPIO_7_FUNC_SEL_W<24> { + REG_GPIO_7_FUNC_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -1280,11 +951,10 @@ impl crate::Readable for GPIO_CFGCTL3_SPEC { #[doc = "`write(|w| ..)` method takes [gpio_cfgctl3::W](W) writer structure"] impl crate::Writable for GPIO_CFGCTL3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets GPIO_CFGCTL3 to value 0x0b03_0b03"] impl crate::Resettable for GPIO_CFGCTL3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0b03_0b03 - } + const RESET_VALUE: Self::Ux = 0x0b03_0b03; } diff --git a/src/glb/gpio_cfgctl30.rs b/src/glb/gpio_cfgctl30.rs index fd79a4b..30b46a5 100644 --- a/src/glb/gpio_cfgctl30.rs +++ b/src/glb/gpio_cfgctl30.rs @@ -7,1152 +7,921 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Input register for GPIO22.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_22_I_A { +#[doc = "Field `reg_gpio_0_i` reader - "] +pub type REG_GPIO_0_I_R = crate::BitReader; +#[doc = "Field `reg_gpio_1_i` reader - Input register for GPIO1."] +pub type REG_GPIO_1_I_R = crate::BitReader; +#[doc = "Input register for GPIO1.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO1INPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_22_I_A) -> Self { + fn from(variant: GPIO1INPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_22_i` reader - Input register for GPIO22."] -pub struct REG_GPIO_22_I_R(crate::FieldReader); -impl REG_GPIO_22_I_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_22_I_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_1_I_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_22_I_A { + pub fn variant(&self) -> GPIO1INPUT_A { match self.bits { - false => REG_GPIO_22_I_A::DISABLED, - true => REG_GPIO_22_I_A::ENABLED, + false => GPIO1INPUT_A::DISABLED, + true => GPIO1INPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_22_I_A::DISABLED + *self == GPIO1INPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_22_I_A::ENABLED + *self == GPIO1INPUT_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_22_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Input register for GPIO21.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_21_I_A { +#[doc = "Field `reg_gpio_2_i` reader - Input register for GPIO2."] +pub type REG_GPIO_2_I_R = crate::BitReader; +#[doc = "Input register for GPIO2.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO2INPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_21_I_A) -> Self { + fn from(variant: GPIO2INPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_21_i` reader - Input register for GPIO21."] -pub struct REG_GPIO_21_I_R(crate::FieldReader); -impl REG_GPIO_21_I_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_21_I_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_2_I_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_21_I_A { + pub fn variant(&self) -> GPIO2INPUT_A { match self.bits { - false => REG_GPIO_21_I_A::DISABLED, - true => REG_GPIO_21_I_A::ENABLED, + false => GPIO2INPUT_A::DISABLED, + true => GPIO2INPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_21_I_A::DISABLED + *self == GPIO2INPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_21_I_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_21_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO2INPUT_A::ENABLED } } -#[doc = "Input register for GPIO20.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_20_I_A { +#[doc = "Field `reg_gpio_3_i` reader - Input register for GPIO3."] +pub type REG_GPIO_3_I_R = crate::BitReader; +#[doc = "Input register for GPIO3.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO3INPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_20_I_A) -> Self { + fn from(variant: GPIO3INPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_20_i` reader - Input register for GPIO20."] -pub struct REG_GPIO_20_I_R(crate::FieldReader); -impl REG_GPIO_20_I_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_20_I_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_3_I_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_20_I_A { + pub fn variant(&self) -> GPIO3INPUT_A { match self.bits { - false => REG_GPIO_20_I_A::DISABLED, - true => REG_GPIO_20_I_A::ENABLED, + false => GPIO3INPUT_A::DISABLED, + true => GPIO3INPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_20_I_A::DISABLED + *self == GPIO3INPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_20_I_A::ENABLED + *self == GPIO3INPUT_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_20_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Input register for GPIO19.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_19_I_A { +#[doc = "Field `reg_gpio_4_i` reader - Input register for GPIO4."] +pub type REG_GPIO_4_I_R = crate::BitReader; +#[doc = "Input register for GPIO4.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO4INPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_19_I_A) -> Self { + fn from(variant: GPIO4INPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_19_i` reader - Input register for GPIO19."] -pub struct REG_GPIO_19_I_R(crate::FieldReader); -impl REG_GPIO_19_I_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_19_I_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_4_I_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_19_I_A { + pub fn variant(&self) -> GPIO4INPUT_A { match self.bits { - false => REG_GPIO_19_I_A::DISABLED, - true => REG_GPIO_19_I_A::ENABLED, + false => GPIO4INPUT_A::DISABLED, + true => GPIO4INPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_19_I_A::DISABLED + *self == GPIO4INPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_19_I_A::ENABLED + *self == GPIO4INPUT_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_19_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Input register for GPIO18.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_18_I_A { +#[doc = "Field `reg_gpio_5_i` reader - Input register for GPIO5."] +pub type REG_GPIO_5_I_R = crate::BitReader; +#[doc = "Input register for GPIO5.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO5INPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_18_I_A) -> Self { + fn from(variant: GPIO5INPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_18_i` reader - Input register for GPIO18."] -pub struct REG_GPIO_18_I_R(crate::FieldReader); -impl REG_GPIO_18_I_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_18_I_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_5_I_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_18_I_A { + pub fn variant(&self) -> GPIO5INPUT_A { match self.bits { - false => REG_GPIO_18_I_A::DISABLED, - true => REG_GPIO_18_I_A::ENABLED, + false => GPIO5INPUT_A::DISABLED, + true => GPIO5INPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_18_I_A::DISABLED + *self == GPIO5INPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_18_I_A::ENABLED + *self == GPIO5INPUT_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_18_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Input register for GPIO17.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_17_I_A { +#[doc = "Field `reg_gpio_6_i` reader - Input register for GPIO6."] +pub type REG_GPIO_6_I_R = crate::BitReader; +#[doc = "Input register for GPIO6.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO6INPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_17_I_A) -> Self { + fn from(variant: GPIO6INPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_17_i` reader - Input register for GPIO17."] -pub struct REG_GPIO_17_I_R(crate::FieldReader); -impl REG_GPIO_17_I_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_17_I_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_6_I_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_17_I_A { + pub fn variant(&self) -> GPIO6INPUT_A { match self.bits { - false => REG_GPIO_17_I_A::DISABLED, - true => REG_GPIO_17_I_A::ENABLED, + false => GPIO6INPUT_A::DISABLED, + true => GPIO6INPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_17_I_A::DISABLED + *self == GPIO6INPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_17_I_A::ENABLED + *self == GPIO6INPUT_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_17_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Input register for GPIO16.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_16_I_A { +#[doc = "Field `reg_gpio_7_i` reader - Input register for GPIO7."] +pub type REG_GPIO_7_I_R = crate::BitReader; +#[doc = "Input register for GPIO7.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO7INPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_16_I_A) -> Self { + fn from(variant: GPIO7INPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_16_i` reader - Input register for GPIO16."] -pub struct REG_GPIO_16_I_R(crate::FieldReader); -impl REG_GPIO_16_I_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_16_I_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_7_I_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_16_I_A { + pub fn variant(&self) -> GPIO7INPUT_A { match self.bits { - false => REG_GPIO_16_I_A::DISABLED, - true => REG_GPIO_16_I_A::ENABLED, + false => GPIO7INPUT_A::DISABLED, + true => GPIO7INPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_16_I_A::DISABLED + *self == GPIO7INPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_16_I_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_16_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO7INPUT_A::ENABLED } } -#[doc = "Input register for GPIO15.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_15_I_A { +#[doc = "Field `reg_gpio_8_i` reader - Input register for GPIO8."] +pub type REG_GPIO_8_I_R = crate::BitReader; +#[doc = "Input register for GPIO8.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO8INPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_15_I_A) -> Self { + fn from(variant: GPIO8INPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_15_i` reader - Input register for GPIO15."] -pub struct REG_GPIO_15_I_R(crate::FieldReader); -impl REG_GPIO_15_I_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_15_I_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_8_I_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_15_I_A { + pub fn variant(&self) -> GPIO8INPUT_A { match self.bits { - false => REG_GPIO_15_I_A::DISABLED, - true => REG_GPIO_15_I_A::ENABLED, + false => GPIO8INPUT_A::DISABLED, + true => GPIO8INPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_15_I_A::DISABLED + *self == GPIO8INPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_15_I_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_15_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO8INPUT_A::ENABLED } } -#[doc = "Input register for GPIO14.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_14_I_A { +#[doc = "Field `reg_gpio_9_i` reader - Input register for GPIO9."] +pub type REG_GPIO_9_I_R = crate::BitReader; +#[doc = "Input register for GPIO9.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO9INPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_14_I_A) -> Self { + fn from(variant: GPIO9INPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_14_i` reader - Input register for GPIO14."] -pub struct REG_GPIO_14_I_R(crate::FieldReader); -impl REG_GPIO_14_I_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_14_I_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_9_I_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_14_I_A { + pub fn variant(&self) -> GPIO9INPUT_A { match self.bits { - false => REG_GPIO_14_I_A::DISABLED, - true => REG_GPIO_14_I_A::ENABLED, + false => GPIO9INPUT_A::DISABLED, + true => GPIO9INPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_14_I_A::DISABLED + *self == GPIO9INPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_14_I_A::ENABLED + *self == GPIO9INPUT_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_14_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Input register for GPIO13.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_13_I_A { +#[doc = "Field `reg_gpio_10_i` reader - Input register for GPIO10."] +pub type REG_GPIO_10_I_R = crate::BitReader; +#[doc = "Input register for GPIO10.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO10INPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_13_I_A) -> Self { + fn from(variant: GPIO10INPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_13_i` reader - Input register for GPIO13."] -pub struct REG_GPIO_13_I_R(crate::FieldReader); -impl REG_GPIO_13_I_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_13_I_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_10_I_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_13_I_A { + pub fn variant(&self) -> GPIO10INPUT_A { match self.bits { - false => REG_GPIO_13_I_A::DISABLED, - true => REG_GPIO_13_I_A::ENABLED, + false => GPIO10INPUT_A::DISABLED, + true => GPIO10INPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_13_I_A::DISABLED + *self == GPIO10INPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_13_I_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_13_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO10INPUT_A::ENABLED } } -#[doc = "Input register for GPIO12.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_12_I_A { +#[doc = "Field `reg_gpio_11_i` reader - Input register for GPIO11."] +pub type REG_GPIO_11_I_R = crate::BitReader; +#[doc = "Input register for GPIO11.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO11INPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_12_I_A) -> Self { + fn from(variant: GPIO11INPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_12_i` reader - Input register for GPIO12."] -pub struct REG_GPIO_12_I_R(crate::FieldReader); -impl REG_GPIO_12_I_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_12_I_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_11_I_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_12_I_A { + pub fn variant(&self) -> GPIO11INPUT_A { match self.bits { - false => REG_GPIO_12_I_A::DISABLED, - true => REG_GPIO_12_I_A::ENABLED, + false => GPIO11INPUT_A::DISABLED, + true => GPIO11INPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_12_I_A::DISABLED + *self == GPIO11INPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_12_I_A::ENABLED + *self == GPIO11INPUT_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_12_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Input register for GPIO11.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_11_I_A { +#[doc = "Field `reg_gpio_12_i` reader - Input register for GPIO12."] +pub type REG_GPIO_12_I_R = crate::BitReader; +#[doc = "Input register for GPIO12.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO12INPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_11_I_A) -> Self { + fn from(variant: GPIO12INPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_11_i` reader - Input register for GPIO11."] -pub struct REG_GPIO_11_I_R(crate::FieldReader); -impl REG_GPIO_11_I_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_11_I_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_12_I_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_11_I_A { + pub fn variant(&self) -> GPIO12INPUT_A { match self.bits { - false => REG_GPIO_11_I_A::DISABLED, - true => REG_GPIO_11_I_A::ENABLED, + false => GPIO12INPUT_A::DISABLED, + true => GPIO12INPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_11_I_A::DISABLED + *self == GPIO12INPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_11_I_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_11_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO12INPUT_A::ENABLED } } -#[doc = "Input register for GPIO10.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_10_I_A { +#[doc = "Field `reg_gpio_13_i` reader - Input register for GPIO13."] +pub type REG_GPIO_13_I_R = crate::BitReader; +#[doc = "Input register for GPIO13.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO13INPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_10_I_A) -> Self { + fn from(variant: GPIO13INPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_10_i` reader - Input register for GPIO10."] -pub struct REG_GPIO_10_I_R(crate::FieldReader); -impl REG_GPIO_10_I_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_10_I_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_13_I_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_10_I_A { + pub fn variant(&self) -> GPIO13INPUT_A { match self.bits { - false => REG_GPIO_10_I_A::DISABLED, - true => REG_GPIO_10_I_A::ENABLED, + false => GPIO13INPUT_A::DISABLED, + true => GPIO13INPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_10_I_A::DISABLED + *self == GPIO13INPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_10_I_A::ENABLED + *self == GPIO13INPUT_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_10_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Input register for GPIO9.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_9_I_A { +#[doc = "Field `reg_gpio_14_i` reader - Input register for GPIO14."] +pub type REG_GPIO_14_I_R = crate::BitReader; +#[doc = "Input register for GPIO14.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO14INPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_9_I_A) -> Self { + fn from(variant: GPIO14INPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_9_i` reader - Input register for GPIO9."] -pub struct REG_GPIO_9_I_R(crate::FieldReader); -impl REG_GPIO_9_I_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_9_I_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_14_I_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_9_I_A { + pub fn variant(&self) -> GPIO14INPUT_A { match self.bits { - false => REG_GPIO_9_I_A::DISABLED, - true => REG_GPIO_9_I_A::ENABLED, + false => GPIO14INPUT_A::DISABLED, + true => GPIO14INPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_9_I_A::DISABLED + *self == GPIO14INPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_9_I_A::ENABLED + *self == GPIO14INPUT_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_9_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Input register for GPIO8.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_8_I_A { +#[doc = "Field `reg_gpio_15_i` reader - Input register for GPIO15."] +pub type REG_GPIO_15_I_R = crate::BitReader; +#[doc = "Input register for GPIO15.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO15INPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_8_I_A) -> Self { + fn from(variant: GPIO15INPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_8_i` reader - Input register for GPIO8."] -pub struct REG_GPIO_8_I_R(crate::FieldReader); -impl REG_GPIO_8_I_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_8_I_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_15_I_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_8_I_A { + pub fn variant(&self) -> GPIO15INPUT_A { match self.bits { - false => REG_GPIO_8_I_A::DISABLED, - true => REG_GPIO_8_I_A::ENABLED, + false => GPIO15INPUT_A::DISABLED, + true => GPIO15INPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_8_I_A::DISABLED + *self == GPIO15INPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_8_I_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_8_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO15INPUT_A::ENABLED } } -#[doc = "Input register for GPIO7.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_7_I_A { +#[doc = "Field `reg_gpio_16_i` reader - Input register for GPIO16."] +pub type REG_GPIO_16_I_R = crate::BitReader; +#[doc = "Input register for GPIO16.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO16INPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_7_I_A) -> Self { + fn from(variant: GPIO16INPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_7_i` reader - Input register for GPIO7."] -pub struct REG_GPIO_7_I_R(crate::FieldReader); -impl REG_GPIO_7_I_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_7_I_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_16_I_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_7_I_A { + pub fn variant(&self) -> GPIO16INPUT_A { match self.bits { - false => REG_GPIO_7_I_A::DISABLED, - true => REG_GPIO_7_I_A::ENABLED, + false => GPIO16INPUT_A::DISABLED, + true => GPIO16INPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_7_I_A::DISABLED + *self == GPIO16INPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_7_I_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_7_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO16INPUT_A::ENABLED } } -#[doc = "Input register for GPIO6.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_6_I_A { +#[doc = "Field `reg_gpio_17_i` reader - Input register for GPIO17."] +pub type REG_GPIO_17_I_R = crate::BitReader; +#[doc = "Input register for GPIO17.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO17INPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_6_I_A) -> Self { + fn from(variant: GPIO17INPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_6_i` reader - Input register for GPIO6."] -pub struct REG_GPIO_6_I_R(crate::FieldReader); -impl REG_GPIO_6_I_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_6_I_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_17_I_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_6_I_A { + pub fn variant(&self) -> GPIO17INPUT_A { match self.bits { - false => REG_GPIO_6_I_A::DISABLED, - true => REG_GPIO_6_I_A::ENABLED, + false => GPIO17INPUT_A::DISABLED, + true => GPIO17INPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_6_I_A::DISABLED + *self == GPIO17INPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_6_I_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_6_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO17INPUT_A::ENABLED } } -#[doc = "Input register for GPIO5.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_5_I_A { +#[doc = "Field `reg_gpio_18_i` reader - Input register for GPIO18."] +pub type REG_GPIO_18_I_R = crate::BitReader; +#[doc = "Input register for GPIO18.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO18INPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_5_I_A) -> Self { + fn from(variant: GPIO18INPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_5_i` reader - Input register for GPIO5."] -pub struct REG_GPIO_5_I_R(crate::FieldReader); -impl REG_GPIO_5_I_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_5_I_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_18_I_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_5_I_A { + pub fn variant(&self) -> GPIO18INPUT_A { match self.bits { - false => REG_GPIO_5_I_A::DISABLED, - true => REG_GPIO_5_I_A::ENABLED, + false => GPIO18INPUT_A::DISABLED, + true => GPIO18INPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_5_I_A::DISABLED + *self == GPIO18INPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_5_I_A::ENABLED + *self == GPIO18INPUT_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_5_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Input register for GPIO4.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_4_I_A { +#[doc = "Field `reg_gpio_19_i` reader - Input register for GPIO19."] +pub type REG_GPIO_19_I_R = crate::BitReader; +#[doc = "Input register for GPIO19.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO19INPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_4_I_A) -> Self { + fn from(variant: GPIO19INPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_4_i` reader - Input register for GPIO4."] -pub struct REG_GPIO_4_I_R(crate::FieldReader); -impl REG_GPIO_4_I_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_4_I_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_19_I_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_4_I_A { + pub fn variant(&self) -> GPIO19INPUT_A { match self.bits { - false => REG_GPIO_4_I_A::DISABLED, - true => REG_GPIO_4_I_A::ENABLED, + false => GPIO19INPUT_A::DISABLED, + true => GPIO19INPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_4_I_A::DISABLED + *self == GPIO19INPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_4_I_A::ENABLED + *self == GPIO19INPUT_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_4_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Input register for GPIO3.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_3_I_A { +#[doc = "Field `reg_gpio_20_i` reader - Input register for GPIO20."] +pub type REG_GPIO_20_I_R = crate::BitReader; +#[doc = "Input register for GPIO20.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO20INPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_3_I_A) -> Self { + fn from(variant: GPIO20INPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_3_i` reader - Input register for GPIO3."] -pub struct REG_GPIO_3_I_R(crate::FieldReader); -impl REG_GPIO_3_I_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_3_I_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_20_I_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_3_I_A { + pub fn variant(&self) -> GPIO20INPUT_A { match self.bits { - false => REG_GPIO_3_I_A::DISABLED, - true => REG_GPIO_3_I_A::ENABLED, + false => GPIO20INPUT_A::DISABLED, + true => GPIO20INPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_3_I_A::DISABLED + *self == GPIO20INPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_3_I_A::ENABLED + *self == GPIO20INPUT_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_3_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Input register for GPIO2.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_2_I_A { +#[doc = "Field `reg_gpio_21_i` reader - Input register for GPIO21."] +pub type REG_GPIO_21_I_R = crate::BitReader; +#[doc = "Input register for GPIO21.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO21INPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_2_I_A) -> Self { + fn from(variant: GPIO21INPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_2_i` reader - Input register for GPIO2."] -pub struct REG_GPIO_2_I_R(crate::FieldReader); -impl REG_GPIO_2_I_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_2_I_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_21_I_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_2_I_A { + pub fn variant(&self) -> GPIO21INPUT_A { match self.bits { - false => REG_GPIO_2_I_A::DISABLED, - true => REG_GPIO_2_I_A::ENABLED, + false => GPIO21INPUT_A::DISABLED, + true => GPIO21INPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_2_I_A::DISABLED + *self == GPIO21INPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_2_I_A::ENABLED + *self == GPIO21INPUT_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_2_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Input register for GPIO1.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_1_I_A { +#[doc = "Field `reg_gpio_22_i` reader - Input register for GPIO22."] +pub type REG_GPIO_22_I_R = crate::BitReader; +#[doc = "Input register for GPIO22.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO22INPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_1_I_A) -> Self { + fn from(variant: GPIO22INPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_1_i` reader - Input register for GPIO1."] -pub struct REG_GPIO_1_I_R(crate::FieldReader); -impl REG_GPIO_1_I_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_1_I_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_22_I_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_1_I_A { + pub fn variant(&self) -> GPIO22INPUT_A { match self.bits { - false => REG_GPIO_1_I_A::DISABLED, - true => REG_GPIO_1_I_A::ENABLED, + false => GPIO22INPUT_A::DISABLED, + true => GPIO22INPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_1_I_A::DISABLED + *self == GPIO22INPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_1_I_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_1_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_0_i` reader - "] -pub struct REG_GPIO_0_I_R(crate::FieldReader); -impl REG_GPIO_0_I_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_0_I_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_GPIO_0_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO22INPUT_A::ENABLED } } impl R { - #[doc = "Bit 22 - Input register for GPIO22."] + #[doc = "Bit 0"] #[inline(always)] - pub fn reg_gpio_22_i(&self) -> REG_GPIO_22_I_R { - REG_GPIO_22_I_R::new(((self.bits >> 22) & 0x01) != 0) + pub fn reg_gpio_0_i(&self) -> REG_GPIO_0_I_R { + REG_GPIO_0_I_R::new((self.bits & 1) != 0) } - #[doc = "Bit 21 - Input register for GPIO21."] + #[doc = "Bit 1 - Input register for GPIO1."] #[inline(always)] - pub fn reg_gpio_21_i(&self) -> REG_GPIO_21_I_R { - REG_GPIO_21_I_R::new(((self.bits >> 21) & 0x01) != 0) + pub fn reg_gpio_1_i(&self) -> REG_GPIO_1_I_R { + REG_GPIO_1_I_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 20 - Input register for GPIO20."] + #[doc = "Bit 2 - Input register for GPIO2."] #[inline(always)] - pub fn reg_gpio_20_i(&self) -> REG_GPIO_20_I_R { - REG_GPIO_20_I_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn reg_gpio_2_i(&self) -> REG_GPIO_2_I_R { + REG_GPIO_2_I_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 19 - Input register for GPIO19."] + #[doc = "Bit 3 - Input register for GPIO3."] #[inline(always)] - pub fn reg_gpio_19_i(&self) -> REG_GPIO_19_I_R { - REG_GPIO_19_I_R::new(((self.bits >> 19) & 0x01) != 0) + pub fn reg_gpio_3_i(&self) -> REG_GPIO_3_I_R { + REG_GPIO_3_I_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bit 18 - Input register for GPIO18."] + #[doc = "Bit 4 - Input register for GPIO4."] #[inline(always)] - pub fn reg_gpio_18_i(&self) -> REG_GPIO_18_I_R { - REG_GPIO_18_I_R::new(((self.bits >> 18) & 0x01) != 0) + pub fn reg_gpio_4_i(&self) -> REG_GPIO_4_I_R { + REG_GPIO_4_I_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 17 - Input register for GPIO17."] + #[doc = "Bit 5 - Input register for GPIO5."] #[inline(always)] - pub fn reg_gpio_17_i(&self) -> REG_GPIO_17_I_R { - REG_GPIO_17_I_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn reg_gpio_5_i(&self) -> REG_GPIO_5_I_R { + REG_GPIO_5_I_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 16 - Input register for GPIO16."] + #[doc = "Bit 6 - Input register for GPIO6."] #[inline(always)] - pub fn reg_gpio_16_i(&self) -> REG_GPIO_16_I_R { - REG_GPIO_16_I_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn reg_gpio_6_i(&self) -> REG_GPIO_6_I_R { + REG_GPIO_6_I_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = "Bit 15 - Input register for GPIO15."] + #[doc = "Bit 7 - Input register for GPIO7."] #[inline(always)] - pub fn reg_gpio_15_i(&self) -> REG_GPIO_15_I_R { - REG_GPIO_15_I_R::new(((self.bits >> 15) & 0x01) != 0) + pub fn reg_gpio_7_i(&self) -> REG_GPIO_7_I_R { + REG_GPIO_7_I_R::new(((self.bits >> 7) & 1) != 0) } - #[doc = "Bit 14 - Input register for GPIO14."] + #[doc = "Bit 8 - Input register for GPIO8."] #[inline(always)] - pub fn reg_gpio_14_i(&self) -> REG_GPIO_14_I_R { - REG_GPIO_14_I_R::new(((self.bits >> 14) & 0x01) != 0) + pub fn reg_gpio_8_i(&self) -> REG_GPIO_8_I_R { + REG_GPIO_8_I_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bit 13 - Input register for GPIO13."] + #[doc = "Bit 9 - Input register for GPIO9."] #[inline(always)] - pub fn reg_gpio_13_i(&self) -> REG_GPIO_13_I_R { - REG_GPIO_13_I_R::new(((self.bits >> 13) & 0x01) != 0) + pub fn reg_gpio_9_i(&self) -> REG_GPIO_9_I_R { + REG_GPIO_9_I_R::new(((self.bits >> 9) & 1) != 0) } - #[doc = "Bit 12 - Input register for GPIO12."] + #[doc = "Bit 10 - Input register for GPIO10."] #[inline(always)] - pub fn reg_gpio_12_i(&self) -> REG_GPIO_12_I_R { - REG_GPIO_12_I_R::new(((self.bits >> 12) & 0x01) != 0) + pub fn reg_gpio_10_i(&self) -> REG_GPIO_10_I_R { + REG_GPIO_10_I_R::new(((self.bits >> 10) & 1) != 0) } #[doc = "Bit 11 - Input register for GPIO11."] #[inline(always)] pub fn reg_gpio_11_i(&self) -> REG_GPIO_11_I_R { - REG_GPIO_11_I_R::new(((self.bits >> 11) & 0x01) != 0) + REG_GPIO_11_I_R::new(((self.bits >> 11) & 1) != 0) } - #[doc = "Bit 10 - Input register for GPIO10."] + #[doc = "Bit 12 - Input register for GPIO12."] #[inline(always)] - pub fn reg_gpio_10_i(&self) -> REG_GPIO_10_I_R { - REG_GPIO_10_I_R::new(((self.bits >> 10) & 0x01) != 0) + pub fn reg_gpio_12_i(&self) -> REG_GPIO_12_I_R { + REG_GPIO_12_I_R::new(((self.bits >> 12) & 1) != 0) } - #[doc = "Bit 9 - Input register for GPIO9."] + #[doc = "Bit 13 - Input register for GPIO13."] #[inline(always)] - pub fn reg_gpio_9_i(&self) -> REG_GPIO_9_I_R { - REG_GPIO_9_I_R::new(((self.bits >> 9) & 0x01) != 0) + pub fn reg_gpio_13_i(&self) -> REG_GPIO_13_I_R { + REG_GPIO_13_I_R::new(((self.bits >> 13) & 1) != 0) } - #[doc = "Bit 8 - Input register for GPIO8."] + #[doc = "Bit 14 - Input register for GPIO14."] #[inline(always)] - pub fn reg_gpio_8_i(&self) -> REG_GPIO_8_I_R { - REG_GPIO_8_I_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn reg_gpio_14_i(&self) -> REG_GPIO_14_I_R { + REG_GPIO_14_I_R::new(((self.bits >> 14) & 1) != 0) } - #[doc = "Bit 7 - Input register for GPIO7."] + #[doc = "Bit 15 - Input register for GPIO15."] #[inline(always)] - pub fn reg_gpio_7_i(&self) -> REG_GPIO_7_I_R { - REG_GPIO_7_I_R::new(((self.bits >> 7) & 0x01) != 0) + pub fn reg_gpio_15_i(&self) -> REG_GPIO_15_I_R { + REG_GPIO_15_I_R::new(((self.bits >> 15) & 1) != 0) } - #[doc = "Bit 6 - Input register for GPIO6."] + #[doc = "Bit 16 - Input register for GPIO16."] #[inline(always)] - pub fn reg_gpio_6_i(&self) -> REG_GPIO_6_I_R { - REG_GPIO_6_I_R::new(((self.bits >> 6) & 0x01) != 0) + pub fn reg_gpio_16_i(&self) -> REG_GPIO_16_I_R { + REG_GPIO_16_I_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 5 - Input register for GPIO5."] + #[doc = "Bit 17 - Input register for GPIO17."] #[inline(always)] - pub fn reg_gpio_5_i(&self) -> REG_GPIO_5_I_R { - REG_GPIO_5_I_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn reg_gpio_17_i(&self) -> REG_GPIO_17_I_R { + REG_GPIO_17_I_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bit 4 - Input register for GPIO4."] + #[doc = "Bit 18 - Input register for GPIO18."] #[inline(always)] - pub fn reg_gpio_4_i(&self) -> REG_GPIO_4_I_R { - REG_GPIO_4_I_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn reg_gpio_18_i(&self) -> REG_GPIO_18_I_R { + REG_GPIO_18_I_R::new(((self.bits >> 18) & 1) != 0) } - #[doc = "Bit 3 - Input register for GPIO3."] + #[doc = "Bit 19 - Input register for GPIO19."] #[inline(always)] - pub fn reg_gpio_3_i(&self) -> REG_GPIO_3_I_R { - REG_GPIO_3_I_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn reg_gpio_19_i(&self) -> REG_GPIO_19_I_R { + REG_GPIO_19_I_R::new(((self.bits >> 19) & 1) != 0) } - #[doc = "Bit 2 - Input register for GPIO2."] + #[doc = "Bit 20 - Input register for GPIO20."] #[inline(always)] - pub fn reg_gpio_2_i(&self) -> REG_GPIO_2_I_R { - REG_GPIO_2_I_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn reg_gpio_20_i(&self) -> REG_GPIO_20_I_R { + REG_GPIO_20_I_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bit 1 - Input register for GPIO1."] + #[doc = "Bit 21 - Input register for GPIO21."] #[inline(always)] - pub fn reg_gpio_1_i(&self) -> REG_GPIO_1_I_R { - REG_GPIO_1_I_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn reg_gpio_21_i(&self) -> REG_GPIO_21_I_R { + REG_GPIO_21_I_R::new(((self.bits >> 21) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 22 - Input register for GPIO22."] #[inline(always)] - pub fn reg_gpio_0_i(&self) -> REG_GPIO_0_I_R { - REG_GPIO_0_I_R::new((self.bits & 0x01) != 0) + pub fn reg_gpio_22_i(&self) -> REG_GPIO_22_I_R { + REG_GPIO_22_I_R::new(((self.bits >> 22) & 1) != 0) } } #[doc = "Input register for all GPIO pins. Input Enabled bit must be set in configuration register to work.\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 [gpio_cfgctl30](index.html) module"] @@ -1166,8 +935,5 @@ impl crate::Readable for GPIO_CFGCTL30_SPEC { } #[doc = "`reset()` method sets GPIO_CFGCTL30 to value 0"] impl crate::Resettable for GPIO_CFGCTL30_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/gpio_cfgctl31.rs b/src/glb/gpio_cfgctl31.rs index 39f7ef2..3db1f6e 100644 --- a/src/glb/gpio_cfgctl31.rs +++ b/src/glb/gpio_cfgctl31.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,13 +28,15 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } impl W { #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -51,11 +54,10 @@ impl crate::Readable for GPIO_CFGCTL31_SPEC { #[doc = "`write(|w| ..)` method takes [gpio_cfgctl31::W](W) writer structure"] impl crate::Writable for GPIO_CFGCTL31_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets GPIO_CFGCTL31 to value 0"] impl crate::Resettable for GPIO_CFGCTL31_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/gpio_cfgctl32.rs b/src/glb/gpio_cfgctl32.rs index efe077f..5ec4050 100644 --- a/src/glb/gpio_cfgctl32.rs +++ b/src/glb/gpio_cfgctl32.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,2154 +28,1443 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Output register for GPIO22.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_22_O_A { +#[doc = "Field `reg_gpio_0_o` reader - Output register for GPIO0."] +pub type REG_GPIO_0_O_R = crate::BitReader; +#[doc = "Output register for GPIO0.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO0OUTPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_22_O_A) -> Self { + fn from(variant: GPIO0OUTPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_22_o` reader - Output register for GPIO22."] -pub struct REG_GPIO_22_O_R(crate::FieldReader); -impl REG_GPIO_22_O_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_22_O_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_0_O_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_22_O_A { + pub fn variant(&self) -> GPIO0OUTPUT_A { match self.bits { - false => REG_GPIO_22_O_A::DISABLED, - true => REG_GPIO_22_O_A::ENABLED, + false => GPIO0OUTPUT_A::DISABLED, + true => GPIO0OUTPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_22_O_A::DISABLED + *self == GPIO0OUTPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_22_O_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_22_O_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO0OUTPUT_A::ENABLED } } -#[doc = "Field `reg_gpio_22_o` writer - Output register for GPIO22."] -pub struct REG_GPIO_22_O_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_22_O_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_22_O_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_0_o` writer - Output register for GPIO0."] +pub type REG_GPIO_0_O_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL32_SPEC, GPIO0OUTPUT_A, O>; +impl<'a, const O: u8> REG_GPIO_0_O_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_22_O_A::DISABLED) + self.variant(GPIO0OUTPUT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_22_O_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 22)) | ((value as u32 & 0x01) << 22); - self.w + self.variant(GPIO0OUTPUT_A::ENABLED) } } -#[doc = "Output register for GPIO21.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_21_O_A { +#[doc = "Field `reg_gpio_1_o` reader - Output register for GPIO1."] +pub type REG_GPIO_1_O_R = crate::BitReader; +#[doc = "Output register for GPIO1.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO1OUTPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_21_O_A) -> Self { + fn from(variant: GPIO1OUTPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_21_o` reader - Output register for GPIO21."] -pub struct REG_GPIO_21_O_R(crate::FieldReader); -impl REG_GPIO_21_O_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_21_O_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_1_O_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_21_O_A { + pub fn variant(&self) -> GPIO1OUTPUT_A { match self.bits { - false => REG_GPIO_21_O_A::DISABLED, - true => REG_GPIO_21_O_A::ENABLED, + false => GPIO1OUTPUT_A::DISABLED, + true => GPIO1OUTPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_21_O_A::DISABLED + *self == GPIO1OUTPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_21_O_A::ENABLED + *self == GPIO1OUTPUT_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_21_O_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_21_o` writer - Output register for GPIO21."] -pub struct REG_GPIO_21_O_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_21_O_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_21_O_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_1_o` writer - Output register for GPIO1."] +pub type REG_GPIO_1_O_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL32_SPEC, GPIO1OUTPUT_A, O>; +impl<'a, const O: u8> REG_GPIO_1_O_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_21_O_A::DISABLED) + self.variant(GPIO1OUTPUT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_21_O_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); - self.w + self.variant(GPIO1OUTPUT_A::ENABLED) } } -#[doc = "Output register for GPIO20.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_20_O_A { +#[doc = "Field `reg_gpio_2_o` reader - Output register for GPIO2."] +pub type REG_GPIO_2_O_R = crate::BitReader; +#[doc = "Output register for GPIO2.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO2OUTPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_20_O_A) -> Self { + fn from(variant: GPIO2OUTPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_20_o` reader - Output register for GPIO20."] -pub struct REG_GPIO_20_O_R(crate::FieldReader); -impl REG_GPIO_20_O_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_20_O_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_2_O_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_20_O_A { + pub fn variant(&self) -> GPIO2OUTPUT_A { match self.bits { - false => REG_GPIO_20_O_A::DISABLED, - true => REG_GPIO_20_O_A::ENABLED, + false => GPIO2OUTPUT_A::DISABLED, + true => GPIO2OUTPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_20_O_A::DISABLED + *self == GPIO2OUTPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_20_O_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_20_O_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO2OUTPUT_A::ENABLED } } -#[doc = "Field `reg_gpio_20_o` writer - Output register for GPIO20."] -pub struct REG_GPIO_20_O_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_20_O_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_20_O_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_2_o` writer - Output register for GPIO2."] +pub type REG_GPIO_2_O_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL32_SPEC, GPIO2OUTPUT_A, O>; +impl<'a, const O: u8> REG_GPIO_2_O_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_20_O_A::DISABLED) + self.variant(GPIO2OUTPUT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_20_O_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w + self.variant(GPIO2OUTPUT_A::ENABLED) } } -#[doc = "Output register for GPIO19.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_19_O_A { +#[doc = "Field `reg_gpio_3_o` reader - Output register for GPIO3."] +pub type REG_GPIO_3_O_R = crate::BitReader; +#[doc = "Output register for GPIO3.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO3OUTPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_19_O_A) -> Self { + fn from(variant: GPIO3OUTPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_19_o` reader - Output register for GPIO19."] -pub struct REG_GPIO_19_O_R(crate::FieldReader); -impl REG_GPIO_19_O_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_19_O_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_3_O_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_19_O_A { + pub fn variant(&self) -> GPIO3OUTPUT_A { match self.bits { - false => REG_GPIO_19_O_A::DISABLED, - true => REG_GPIO_19_O_A::ENABLED, + false => GPIO3OUTPUT_A::DISABLED, + true => GPIO3OUTPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_19_O_A::DISABLED + *self == GPIO3OUTPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_19_O_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_19_O_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO3OUTPUT_A::ENABLED } } -#[doc = "Field `reg_gpio_19_o` writer - Output register for GPIO19."] -pub struct REG_GPIO_19_O_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_19_O_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_19_O_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_3_o` writer - Output register for GPIO3."] +pub type REG_GPIO_3_O_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL32_SPEC, GPIO3OUTPUT_A, O>; +impl<'a, const O: u8> REG_GPIO_3_O_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_19_O_A::DISABLED) + self.variant(GPIO3OUTPUT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_19_O_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 19)) | ((value as u32 & 0x01) << 19); - self.w + self.variant(GPIO3OUTPUT_A::ENABLED) } } -#[doc = "Output register for GPIO18.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_18_O_A { +#[doc = "Field `reg_gpio_4_o` reader - Output register for GPIO4."] +pub type REG_GPIO_4_O_R = crate::BitReader; +#[doc = "Output register for GPIO4.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO4OUTPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_18_O_A) -> Self { + fn from(variant: GPIO4OUTPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_18_o` reader - Output register for GPIO18."] -pub struct REG_GPIO_18_O_R(crate::FieldReader); -impl REG_GPIO_18_O_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_18_O_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_4_O_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_18_O_A { + pub fn variant(&self) -> GPIO4OUTPUT_A { match self.bits { - false => REG_GPIO_18_O_A::DISABLED, - true => REG_GPIO_18_O_A::ENABLED, + false => GPIO4OUTPUT_A::DISABLED, + true => GPIO4OUTPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_18_O_A::DISABLED + *self == GPIO4OUTPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_18_O_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_18_O_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO4OUTPUT_A::ENABLED } } -#[doc = "Field `reg_gpio_18_o` writer - Output register for GPIO18."] -pub struct REG_GPIO_18_O_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_18_O_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_18_O_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_4_o` writer - Output register for GPIO4."] +pub type REG_GPIO_4_O_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL32_SPEC, GPIO4OUTPUT_A, O>; +impl<'a, const O: u8> REG_GPIO_4_O_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_18_O_A::DISABLED) + self.variant(GPIO4OUTPUT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_18_O_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18); - self.w + self.variant(GPIO4OUTPUT_A::ENABLED) } } -#[doc = "Output register for GPIO17.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_17_O_A { +#[doc = "Field `reg_gpio_5_o` reader - Output register for GPIO5."] +pub type REG_GPIO_5_O_R = crate::BitReader; +#[doc = "Output register for GPIO5.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO5OUTPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_17_O_A) -> Self { + fn from(variant: GPIO5OUTPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_17_o` reader - Output register for GPIO17."] -pub struct REG_GPIO_17_O_R(crate::FieldReader); -impl REG_GPIO_17_O_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_17_O_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_5_O_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_17_O_A { + pub fn variant(&self) -> GPIO5OUTPUT_A { match self.bits { - false => REG_GPIO_17_O_A::DISABLED, - true => REG_GPIO_17_O_A::ENABLED, + false => GPIO5OUTPUT_A::DISABLED, + true => GPIO5OUTPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_17_O_A::DISABLED + *self == GPIO5OUTPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_17_O_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_17_O_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO5OUTPUT_A::ENABLED } } -#[doc = "Field `reg_gpio_17_o` writer - Output register for GPIO17."] -pub struct REG_GPIO_17_O_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_17_O_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_17_O_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_5_o` writer - Output register for GPIO5."] +pub type REG_GPIO_5_O_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL32_SPEC, GPIO5OUTPUT_A, O>; +impl<'a, const O: u8> REG_GPIO_5_O_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_17_O_A::DISABLED) + self.variant(GPIO5OUTPUT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_17_O_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w + self.variant(GPIO5OUTPUT_A::ENABLED) } } -#[doc = "Output register for GPIO16.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_16_O_A { +#[doc = "Field `reg_gpio_6_o` reader - Output register for GPIO6."] +pub type REG_GPIO_6_O_R = crate::BitReader; +#[doc = "Output register for GPIO6.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO6OUTPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_16_O_A) -> Self { + fn from(variant: GPIO6OUTPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_16_o` reader - Output register for GPIO16."] -pub struct REG_GPIO_16_O_R(crate::FieldReader); -impl REG_GPIO_16_O_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_16_O_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_6_O_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_16_O_A { + pub fn variant(&self) -> GPIO6OUTPUT_A { match self.bits { - false => REG_GPIO_16_O_A::DISABLED, - true => REG_GPIO_16_O_A::ENABLED, + false => GPIO6OUTPUT_A::DISABLED, + true => GPIO6OUTPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_16_O_A::DISABLED + *self == GPIO6OUTPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_16_O_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_16_O_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO6OUTPUT_A::ENABLED } } -#[doc = "Field `reg_gpio_16_o` writer - Output register for GPIO16."] -pub struct REG_GPIO_16_O_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_16_O_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_16_O_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_6_o` writer - Output register for GPIO6."] +pub type REG_GPIO_6_O_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL32_SPEC, GPIO6OUTPUT_A, O>; +impl<'a, const O: u8> REG_GPIO_6_O_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_16_O_A::DISABLED) + self.variant(GPIO6OUTPUT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_16_O_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w + self.variant(GPIO6OUTPUT_A::ENABLED) } } -#[doc = "Output register for GPIO15.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_15_O_A { +#[doc = "Field `reg_gpio_7_o` reader - Output register for GPIO7."] +pub type REG_GPIO_7_O_R = crate::BitReader; +#[doc = "Output register for GPIO7.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO7OUTPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_15_O_A) -> Self { + fn from(variant: GPIO7OUTPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_15_o` reader - Output register for GPIO15."] -pub struct REG_GPIO_15_O_R(crate::FieldReader); -impl REG_GPIO_15_O_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_15_O_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_7_O_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_15_O_A { + pub fn variant(&self) -> GPIO7OUTPUT_A { match self.bits { - false => REG_GPIO_15_O_A::DISABLED, - true => REG_GPIO_15_O_A::ENABLED, + false => GPIO7OUTPUT_A::DISABLED, + true => GPIO7OUTPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_15_O_A::DISABLED + *self == GPIO7OUTPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_15_O_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_15_O_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO7OUTPUT_A::ENABLED } } -#[doc = "Field `reg_gpio_15_o` writer - Output register for GPIO15."] -pub struct REG_GPIO_15_O_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_15_O_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_15_O_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_7_o` writer - Output register for GPIO7."] +pub type REG_GPIO_7_O_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL32_SPEC, GPIO7OUTPUT_A, O>; +impl<'a, const O: u8> REG_GPIO_7_O_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_15_O_A::DISABLED) + self.variant(GPIO7OUTPUT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_15_O_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15); - self.w + self.variant(GPIO7OUTPUT_A::ENABLED) } } -#[doc = "Output register for GPIO14.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_14_O_A { +#[doc = "Field `reg_gpio_8_o` reader - Output register for GPIO8."] +pub type REG_GPIO_8_O_R = crate::BitReader; +#[doc = "Output register for GPIO8.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO8OUTPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_14_O_A) -> Self { + fn from(variant: GPIO8OUTPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_14_o` reader - Output register for GPIO14."] -pub struct REG_GPIO_14_O_R(crate::FieldReader); -impl REG_GPIO_14_O_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_14_O_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_8_O_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_14_O_A { + pub fn variant(&self) -> GPIO8OUTPUT_A { match self.bits { - false => REG_GPIO_14_O_A::DISABLED, - true => REG_GPIO_14_O_A::ENABLED, + false => GPIO8OUTPUT_A::DISABLED, + true => GPIO8OUTPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_14_O_A::DISABLED + *self == GPIO8OUTPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_14_O_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_14_O_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO8OUTPUT_A::ENABLED } } -#[doc = "Field `reg_gpio_14_o` writer - Output register for GPIO14."] -pub struct REG_GPIO_14_O_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_14_O_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_14_O_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_8_o` writer - Output register for GPIO8."] +pub type REG_GPIO_8_O_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL32_SPEC, GPIO8OUTPUT_A, O>; +impl<'a, const O: u8> REG_GPIO_8_O_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_14_O_A::DISABLED) + self.variant(GPIO8OUTPUT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_14_O_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14); - self.w + self.variant(GPIO8OUTPUT_A::ENABLED) } } -#[doc = "Output register for GPIO13.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_13_O_A { +#[doc = "Field `reg_gpio_9_o` reader - Output register for GPIO9."] +pub type REG_GPIO_9_O_R = crate::BitReader; +#[doc = "Output register for GPIO9.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO9OUTPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_13_O_A) -> Self { + fn from(variant: GPIO9OUTPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_13_o` reader - Output register for GPIO13."] -pub struct REG_GPIO_13_O_R(crate::FieldReader); -impl REG_GPIO_13_O_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_13_O_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_9_O_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_13_O_A { + pub fn variant(&self) -> GPIO9OUTPUT_A { match self.bits { - false => REG_GPIO_13_O_A::DISABLED, - true => REG_GPIO_13_O_A::ENABLED, + false => GPIO9OUTPUT_A::DISABLED, + true => GPIO9OUTPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_13_O_A::DISABLED + *self == GPIO9OUTPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_13_O_A::ENABLED + *self == GPIO9OUTPUT_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_13_O_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_13_o` writer - Output register for GPIO13."] -pub struct REG_GPIO_13_O_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_13_O_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_13_O_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_9_o` writer - Output register for GPIO9."] +pub type REG_GPIO_9_O_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL32_SPEC, GPIO9OUTPUT_A, O>; +impl<'a, const O: u8> REG_GPIO_9_O_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_13_O_A::DISABLED) + self.variant(GPIO9OUTPUT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_13_O_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13); - self.w + self.variant(GPIO9OUTPUT_A::ENABLED) } } -#[doc = "Output register for GPIO12.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_12_O_A { +#[doc = "Field `reg_gpio_10_o` reader - Output register for GPIO10."] +pub type REG_GPIO_10_O_R = crate::BitReader; +#[doc = "Output register for GPIO10.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO10OUTPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_12_O_A) -> Self { + fn from(variant: GPIO10OUTPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_12_o` reader - Output register for GPIO12."] -pub struct REG_GPIO_12_O_R(crate::FieldReader); -impl REG_GPIO_12_O_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_12_O_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_10_O_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_12_O_A { + pub fn variant(&self) -> GPIO10OUTPUT_A { match self.bits { - false => REG_GPIO_12_O_A::DISABLED, - true => REG_GPIO_12_O_A::ENABLED, + false => GPIO10OUTPUT_A::DISABLED, + true => GPIO10OUTPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_12_O_A::DISABLED + *self == GPIO10OUTPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_12_O_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_12_O_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO10OUTPUT_A::ENABLED } } -#[doc = "Field `reg_gpio_12_o` writer - Output register for GPIO12."] -pub struct REG_GPIO_12_O_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_12_O_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_12_O_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_10_o` writer - Output register for GPIO10."] +pub type REG_GPIO_10_O_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL32_SPEC, GPIO10OUTPUT_A, O>; +impl<'a, const O: u8> REG_GPIO_10_O_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_12_O_A::DISABLED) + self.variant(GPIO10OUTPUT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_12_O_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w + self.variant(GPIO10OUTPUT_A::ENABLED) } } +#[doc = "Field `reg_gpio_11_o` reader - Output register for GPIO11."] +pub type REG_GPIO_11_O_R = crate::BitReader; #[doc = "Output register for GPIO11.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_11_O_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO11OUTPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_11_O_A) -> Self { + fn from(variant: GPIO11OUTPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_11_o` reader - Output register for GPIO11."] -pub struct REG_GPIO_11_O_R(crate::FieldReader); impl REG_GPIO_11_O_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_11_O_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_11_O_A { + pub fn variant(&self) -> GPIO11OUTPUT_A { match self.bits { - false => REG_GPIO_11_O_A::DISABLED, - true => REG_GPIO_11_O_A::ENABLED, + false => GPIO11OUTPUT_A::DISABLED, + true => GPIO11OUTPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_11_O_A::DISABLED + *self == GPIO11OUTPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_11_O_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_11_O_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO11OUTPUT_A::ENABLED } } #[doc = "Field `reg_gpio_11_o` writer - Output register for GPIO11."] -pub struct REG_GPIO_11_O_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_11_O_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_11_O_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_11_O_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL32_SPEC, GPIO11OUTPUT_A, O>; +impl<'a, const O: u8> REG_GPIO_11_O_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_11_O_A::DISABLED) + self.variant(GPIO11OUTPUT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_11_O_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w + self.variant(GPIO11OUTPUT_A::ENABLED) } } -#[doc = "Output register for GPIO10.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_10_O_A { +#[doc = "Field `reg_gpio_12_o` reader - Output register for GPIO12."] +pub type REG_GPIO_12_O_R = crate::BitReader; +#[doc = "Output register for GPIO12.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO12OUTPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_10_O_A) -> Self { + fn from(variant: GPIO12OUTPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_10_o` reader - Output register for GPIO10."] -pub struct REG_GPIO_10_O_R(crate::FieldReader); -impl REG_GPIO_10_O_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_10_O_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_12_O_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_10_O_A { + pub fn variant(&self) -> GPIO12OUTPUT_A { match self.bits { - false => REG_GPIO_10_O_A::DISABLED, - true => REG_GPIO_10_O_A::ENABLED, + false => GPIO12OUTPUT_A::DISABLED, + true => GPIO12OUTPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_10_O_A::DISABLED + *self == GPIO12OUTPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_10_O_A::ENABLED + *self == GPIO12OUTPUT_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_10_O_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_10_o` writer - Output register for GPIO10."] -pub struct REG_GPIO_10_O_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_10_O_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_10_O_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_12_o` writer - Output register for GPIO12."] +pub type REG_GPIO_12_O_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL32_SPEC, GPIO12OUTPUT_A, O>; +impl<'a, const O: u8> REG_GPIO_12_O_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_10_O_A::DISABLED) + self.variant(GPIO12OUTPUT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_10_O_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); - self.w + self.variant(GPIO12OUTPUT_A::ENABLED) } } -#[doc = "Output register for GPIO9.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_9_O_A { +#[doc = "Field `reg_gpio_13_o` reader - Output register for GPIO13."] +pub type REG_GPIO_13_O_R = crate::BitReader; +#[doc = "Output register for GPIO13.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO13OUTPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_9_O_A) -> Self { + fn from(variant: GPIO13OUTPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_9_o` reader - Output register for GPIO9."] -pub struct REG_GPIO_9_O_R(crate::FieldReader); -impl REG_GPIO_9_O_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_9_O_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_13_O_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_9_O_A { + pub fn variant(&self) -> GPIO13OUTPUT_A { match self.bits { - false => REG_GPIO_9_O_A::DISABLED, - true => REG_GPIO_9_O_A::ENABLED, + false => GPIO13OUTPUT_A::DISABLED, + true => GPIO13OUTPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_9_O_A::DISABLED + *self == GPIO13OUTPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_9_O_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_9_O_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO13OUTPUT_A::ENABLED } } -#[doc = "Field `reg_gpio_9_o` writer - Output register for GPIO9."] -pub struct REG_GPIO_9_O_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_9_O_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_9_O_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_13_o` writer - Output register for GPIO13."] +pub type REG_GPIO_13_O_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL32_SPEC, GPIO13OUTPUT_A, O>; +impl<'a, const O: u8> REG_GPIO_13_O_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_9_O_A::DISABLED) + self.variant(GPIO13OUTPUT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_9_O_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w + self.variant(GPIO13OUTPUT_A::ENABLED) } } -#[doc = "Output register for GPIO8.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_8_O_A { +#[doc = "Field `reg_gpio_14_o` reader - Output register for GPIO14."] +pub type REG_GPIO_14_O_R = crate::BitReader; +#[doc = "Output register for GPIO14.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO14OUTPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_8_O_A) -> Self { + fn from(variant: GPIO14OUTPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_8_o` reader - Output register for GPIO8."] -pub struct REG_GPIO_8_O_R(crate::FieldReader); -impl REG_GPIO_8_O_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_8_O_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_14_O_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_8_O_A { + pub fn variant(&self) -> GPIO14OUTPUT_A { match self.bits { - false => REG_GPIO_8_O_A::DISABLED, - true => REG_GPIO_8_O_A::ENABLED, + false => GPIO14OUTPUT_A::DISABLED, + true => GPIO14OUTPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_8_O_A::DISABLED + *self == GPIO14OUTPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_8_O_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_8_O_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO14OUTPUT_A::ENABLED } } -#[doc = "Field `reg_gpio_8_o` writer - Output register for GPIO8."] -pub struct REG_GPIO_8_O_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_8_O_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_8_O_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_14_o` writer - Output register for GPIO14."] +pub type REG_GPIO_14_O_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL32_SPEC, GPIO14OUTPUT_A, O>; +impl<'a, const O: u8> REG_GPIO_14_O_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_8_O_A::DISABLED) + self.variant(GPIO14OUTPUT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_8_O_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w + self.variant(GPIO14OUTPUT_A::ENABLED) } } -#[doc = "Output register for GPIO7.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_7_O_A { +#[doc = "Field `reg_gpio_15_o` reader - Output register for GPIO15."] +pub type REG_GPIO_15_O_R = crate::BitReader; +#[doc = "Output register for GPIO15.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO15OUTPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_7_O_A) -> Self { + fn from(variant: GPIO15OUTPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_7_o` reader - Output register for GPIO7."] -pub struct REG_GPIO_7_O_R(crate::FieldReader); -impl REG_GPIO_7_O_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_7_O_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_15_O_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_7_O_A { + pub fn variant(&self) -> GPIO15OUTPUT_A { match self.bits { - false => REG_GPIO_7_O_A::DISABLED, - true => REG_GPIO_7_O_A::ENABLED, + false => GPIO15OUTPUT_A::DISABLED, + true => GPIO15OUTPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_7_O_A::DISABLED + *self == GPIO15OUTPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_7_O_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_7_O_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO15OUTPUT_A::ENABLED } } -#[doc = "Field `reg_gpio_7_o` writer - Output register for GPIO7."] -pub struct REG_GPIO_7_O_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_7_O_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_7_O_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_15_o` writer - Output register for GPIO15."] +pub type REG_GPIO_15_O_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL32_SPEC, GPIO15OUTPUT_A, O>; +impl<'a, const O: u8> REG_GPIO_15_O_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_7_O_A::DISABLED) + self.variant(GPIO15OUTPUT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_7_O_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7); - self.w + self.variant(GPIO15OUTPUT_A::ENABLED) } } -#[doc = "Output register for GPIO6.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_6_O_A { +#[doc = "Field `reg_gpio_16_o` reader - Output register for GPIO16."] +pub type REG_GPIO_16_O_R = crate::BitReader; +#[doc = "Output register for GPIO16.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO16OUTPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_6_O_A) -> Self { + fn from(variant: GPIO16OUTPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_6_o` reader - Output register for GPIO6."] -pub struct REG_GPIO_6_O_R(crate::FieldReader); -impl REG_GPIO_6_O_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_6_O_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_16_O_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_6_O_A { + pub fn variant(&self) -> GPIO16OUTPUT_A { match self.bits { - false => REG_GPIO_6_O_A::DISABLED, - true => REG_GPIO_6_O_A::ENABLED, + false => GPIO16OUTPUT_A::DISABLED, + true => GPIO16OUTPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_6_O_A::DISABLED + *self == GPIO16OUTPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_6_O_A::ENABLED + *self == GPIO16OUTPUT_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_6_O_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_6_o` writer - Output register for GPIO6."] -pub struct REG_GPIO_6_O_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_6_O_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_6_O_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_16_o` writer - Output register for GPIO16."] +pub type REG_GPIO_16_O_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL32_SPEC, GPIO16OUTPUT_A, O>; +impl<'a, const O: u8> REG_GPIO_16_O_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_6_O_A::DISABLED) + self.variant(GPIO16OUTPUT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_6_O_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w + self.variant(GPIO16OUTPUT_A::ENABLED) } } -#[doc = "Output register for GPIO5.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_5_O_A { +#[doc = "Field `reg_gpio_17_o` reader - Output register for GPIO17."] +pub type REG_GPIO_17_O_R = crate::BitReader; +#[doc = "Output register for GPIO17.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO17OUTPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_5_O_A) -> Self { + fn from(variant: GPIO17OUTPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_5_o` reader - Output register for GPIO5."] -pub struct REG_GPIO_5_O_R(crate::FieldReader); -impl REG_GPIO_5_O_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_5_O_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_17_O_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_5_O_A { + pub fn variant(&self) -> GPIO17OUTPUT_A { match self.bits { - false => REG_GPIO_5_O_A::DISABLED, - true => REG_GPIO_5_O_A::ENABLED, + false => GPIO17OUTPUT_A::DISABLED, + true => GPIO17OUTPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_5_O_A::DISABLED + *self == GPIO17OUTPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_5_O_A::ENABLED + *self == GPIO17OUTPUT_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_5_O_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_5_o` writer - Output register for GPIO5."] -pub struct REG_GPIO_5_O_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_5_O_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_5_O_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_17_o` writer - Output register for GPIO17."] +pub type REG_GPIO_17_O_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL32_SPEC, GPIO17OUTPUT_A, O>; +impl<'a, const O: u8> REG_GPIO_17_O_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_5_O_A::DISABLED) + self.variant(GPIO17OUTPUT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_5_O_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w + self.variant(GPIO17OUTPUT_A::ENABLED) } } -#[doc = "Output register for GPIO4.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_4_O_A { +#[doc = "Field `reg_gpio_18_o` reader - Output register for GPIO18."] +pub type REG_GPIO_18_O_R = crate::BitReader; +#[doc = "Output register for GPIO18.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO18OUTPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_4_O_A) -> Self { + fn from(variant: GPIO18OUTPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_4_o` reader - Output register for GPIO4."] -pub struct REG_GPIO_4_O_R(crate::FieldReader); -impl REG_GPIO_4_O_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_4_O_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_18_O_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_4_O_A { + pub fn variant(&self) -> GPIO18OUTPUT_A { match self.bits { - false => REG_GPIO_4_O_A::DISABLED, - true => REG_GPIO_4_O_A::ENABLED, + false => GPIO18OUTPUT_A::DISABLED, + true => GPIO18OUTPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_4_O_A::DISABLED + *self == GPIO18OUTPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_4_O_A::ENABLED + *self == GPIO18OUTPUT_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_4_O_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_4_o` writer - Output register for GPIO4."] -pub struct REG_GPIO_4_O_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_4_O_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_4_O_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_18_o` writer - Output register for GPIO18."] +pub type REG_GPIO_18_O_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL32_SPEC, GPIO18OUTPUT_A, O>; +impl<'a, const O: u8> REG_GPIO_18_O_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_4_O_A::DISABLED) + self.variant(GPIO18OUTPUT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_4_O_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w + self.variant(GPIO18OUTPUT_A::ENABLED) } } -#[doc = "Output register for GPIO3.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_3_O_A { +#[doc = "Field `reg_gpio_19_o` reader - Output register for GPIO19."] +pub type REG_GPIO_19_O_R = crate::BitReader; +#[doc = "Output register for GPIO19.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO19OUTPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_3_O_A) -> Self { + fn from(variant: GPIO19OUTPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_3_o` reader - Output register for GPIO3."] -pub struct REG_GPIO_3_O_R(crate::FieldReader); -impl REG_GPIO_3_O_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_3_O_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_19_O_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_3_O_A { + pub fn variant(&self) -> GPIO19OUTPUT_A { match self.bits { - false => REG_GPIO_3_O_A::DISABLED, - true => REG_GPIO_3_O_A::ENABLED, + false => GPIO19OUTPUT_A::DISABLED, + true => GPIO19OUTPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_3_O_A::DISABLED + *self == GPIO19OUTPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_3_O_A::ENABLED + *self == GPIO19OUTPUT_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_3_O_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_3_o` writer - Output register for GPIO3."] -pub struct REG_GPIO_3_O_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_3_O_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_3_O_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_19_o` writer - Output register for GPIO19."] +pub type REG_GPIO_19_O_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL32_SPEC, GPIO19OUTPUT_A, O>; +impl<'a, const O: u8> REG_GPIO_19_O_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_3_O_A::DISABLED) + self.variant(GPIO19OUTPUT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_3_O_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w + self.variant(GPIO19OUTPUT_A::ENABLED) } } -#[doc = "Output register for GPIO2.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_2_O_A { +#[doc = "Field `reg_gpio_20_o` reader - Output register for GPIO20."] +pub type REG_GPIO_20_O_R = crate::BitReader; +#[doc = "Output register for GPIO20.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO20OUTPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_2_O_A) -> Self { + fn from(variant: GPIO20OUTPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_2_o` reader - Output register for GPIO2."] -pub struct REG_GPIO_2_O_R(crate::FieldReader); -impl REG_GPIO_2_O_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_2_O_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_20_O_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_2_O_A { + pub fn variant(&self) -> GPIO20OUTPUT_A { match self.bits { - false => REG_GPIO_2_O_A::DISABLED, - true => REG_GPIO_2_O_A::ENABLED, + false => GPIO20OUTPUT_A::DISABLED, + true => GPIO20OUTPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_2_O_A::DISABLED + *self == GPIO20OUTPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_2_O_A::ENABLED + *self == GPIO20OUTPUT_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_2_O_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_2_o` writer - Output register for GPIO2."] -pub struct REG_GPIO_2_O_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_2_O_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_2_O_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_20_o` writer - Output register for GPIO20."] +pub type REG_GPIO_20_O_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL32_SPEC, GPIO20OUTPUT_A, O>; +impl<'a, const O: u8> REG_GPIO_20_O_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_2_O_A::DISABLED) + self.variant(GPIO20OUTPUT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_2_O_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w + self.variant(GPIO20OUTPUT_A::ENABLED) } } -#[doc = "Output register for GPIO1.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_1_O_A { +#[doc = "Field `reg_gpio_21_o` reader - Output register for GPIO21."] +pub type REG_GPIO_21_O_R = crate::BitReader; +#[doc = "Output register for GPIO21.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO21OUTPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_1_O_A) -> Self { + fn from(variant: GPIO21OUTPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_1_o` reader - Output register for GPIO1."] -pub struct REG_GPIO_1_O_R(crate::FieldReader); -impl REG_GPIO_1_O_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_1_O_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_21_O_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_1_O_A { + pub fn variant(&self) -> GPIO21OUTPUT_A { match self.bits { - false => REG_GPIO_1_O_A::DISABLED, - true => REG_GPIO_1_O_A::ENABLED, + false => GPIO21OUTPUT_A::DISABLED, + true => GPIO21OUTPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_1_O_A::DISABLED + *self == GPIO21OUTPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_1_O_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_1_O_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO21OUTPUT_A::ENABLED } } -#[doc = "Field `reg_gpio_1_o` writer - Output register for GPIO1."] -pub struct REG_GPIO_1_O_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_1_O_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_1_O_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_21_o` writer - Output register for GPIO21."] +pub type REG_GPIO_21_O_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL32_SPEC, GPIO21OUTPUT_A, O>; +impl<'a, const O: u8> REG_GPIO_21_O_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_1_O_A::DISABLED) + self.variant(GPIO21OUTPUT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_1_O_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w + self.variant(GPIO21OUTPUT_A::ENABLED) } } -#[doc = "Output register for GPIO0.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_0_O_A { +#[doc = "Field `reg_gpio_22_o` reader - Output register for GPIO22."] +pub type REG_GPIO_22_O_R = crate::BitReader; +#[doc = "Output register for GPIO22.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO22OUTPUT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_0_O_A) -> Self { + fn from(variant: GPIO22OUTPUT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_0_o` reader - Output register for GPIO0."] -pub struct REG_GPIO_0_O_R(crate::FieldReader); -impl REG_GPIO_0_O_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_0_O_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_22_O_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_0_O_A { + pub fn variant(&self) -> GPIO22OUTPUT_A { match self.bits { - false => REG_GPIO_0_O_A::DISABLED, - true => REG_GPIO_0_O_A::ENABLED, + false => GPIO22OUTPUT_A::DISABLED, + true => GPIO22OUTPUT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_0_O_A::DISABLED + *self == GPIO22OUTPUT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_0_O_A::ENABLED + *self == GPIO22OUTPUT_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_0_O_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_0_o` writer - Output register for GPIO0."] -pub struct REG_GPIO_0_O_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_0_O_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_0_O_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_22_o` writer - Output register for GPIO22."] +pub type REG_GPIO_22_O_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL32_SPEC, GPIO22OUTPUT_A, O>; +impl<'a, const O: u8> REG_GPIO_22_O_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_0_O_A::DISABLED) + self.variant(GPIO22OUTPUT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_0_O_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + self.variant(GPIO22OUTPUT_A::ENABLED) } } impl R { - #[doc = "Bit 22 - Output register for GPIO22."] + #[doc = "Bit 0 - Output register for GPIO0."] #[inline(always)] - pub fn reg_gpio_22_o(&self) -> REG_GPIO_22_O_R { - REG_GPIO_22_O_R::new(((self.bits >> 22) & 0x01) != 0) + pub fn reg_gpio_0_o(&self) -> REG_GPIO_0_O_R { + REG_GPIO_0_O_R::new((self.bits & 1) != 0) } - #[doc = "Bit 21 - Output register for GPIO21."] + #[doc = "Bit 1 - Output register for GPIO1."] #[inline(always)] - pub fn reg_gpio_21_o(&self) -> REG_GPIO_21_O_R { - REG_GPIO_21_O_R::new(((self.bits >> 21) & 0x01) != 0) + pub fn reg_gpio_1_o(&self) -> REG_GPIO_1_O_R { + REG_GPIO_1_O_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 20 - Output register for GPIO20."] + #[doc = "Bit 2 - Output register for GPIO2."] #[inline(always)] - pub fn reg_gpio_20_o(&self) -> REG_GPIO_20_O_R { - REG_GPIO_20_O_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn reg_gpio_2_o(&self) -> REG_GPIO_2_O_R { + REG_GPIO_2_O_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 19 - Output register for GPIO19."] + #[doc = "Bit 3 - Output register for GPIO3."] #[inline(always)] - pub fn reg_gpio_19_o(&self) -> REG_GPIO_19_O_R { - REG_GPIO_19_O_R::new(((self.bits >> 19) & 0x01) != 0) + pub fn reg_gpio_3_o(&self) -> REG_GPIO_3_O_R { + REG_GPIO_3_O_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bit 18 - Output register for GPIO18."] + #[doc = "Bit 4 - Output register for GPIO4."] #[inline(always)] - pub fn reg_gpio_18_o(&self) -> REG_GPIO_18_O_R { - REG_GPIO_18_O_R::new(((self.bits >> 18) & 0x01) != 0) + pub fn reg_gpio_4_o(&self) -> REG_GPIO_4_O_R { + REG_GPIO_4_O_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 17 - Output register for GPIO17."] + #[doc = "Bit 5 - Output register for GPIO5."] #[inline(always)] - pub fn reg_gpio_17_o(&self) -> REG_GPIO_17_O_R { - REG_GPIO_17_O_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn reg_gpio_5_o(&self) -> REG_GPIO_5_O_R { + REG_GPIO_5_O_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 16 - Output register for GPIO16."] + #[doc = "Bit 6 - Output register for GPIO6."] #[inline(always)] - pub fn reg_gpio_16_o(&self) -> REG_GPIO_16_O_R { - REG_GPIO_16_O_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn reg_gpio_6_o(&self) -> REG_GPIO_6_O_R { + REG_GPIO_6_O_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = "Bit 15 - Output register for GPIO15."] + #[doc = "Bit 7 - Output register for GPIO7."] #[inline(always)] - pub fn reg_gpio_15_o(&self) -> REG_GPIO_15_O_R { - REG_GPIO_15_O_R::new(((self.bits >> 15) & 0x01) != 0) + pub fn reg_gpio_7_o(&self) -> REG_GPIO_7_O_R { + REG_GPIO_7_O_R::new(((self.bits >> 7) & 1) != 0) } - #[doc = "Bit 14 - Output register for GPIO14."] + #[doc = "Bit 8 - Output register for GPIO8."] #[inline(always)] - pub fn reg_gpio_14_o(&self) -> REG_GPIO_14_O_R { - REG_GPIO_14_O_R::new(((self.bits >> 14) & 0x01) != 0) + pub fn reg_gpio_8_o(&self) -> REG_GPIO_8_O_R { + REG_GPIO_8_O_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bit 13 - Output register for GPIO13."] + #[doc = "Bit 9 - Output register for GPIO9."] #[inline(always)] - pub fn reg_gpio_13_o(&self) -> REG_GPIO_13_O_R { - REG_GPIO_13_O_R::new(((self.bits >> 13) & 0x01) != 0) + pub fn reg_gpio_9_o(&self) -> REG_GPIO_9_O_R { + REG_GPIO_9_O_R::new(((self.bits >> 9) & 1) != 0) } - #[doc = "Bit 12 - Output register for GPIO12."] + #[doc = "Bit 10 - Output register for GPIO10."] #[inline(always)] - pub fn reg_gpio_12_o(&self) -> REG_GPIO_12_O_R { - REG_GPIO_12_O_R::new(((self.bits >> 12) & 0x01) != 0) + pub fn reg_gpio_10_o(&self) -> REG_GPIO_10_O_R { + REG_GPIO_10_O_R::new(((self.bits >> 10) & 1) != 0) } #[doc = "Bit 11 - Output register for GPIO11."] #[inline(always)] pub fn reg_gpio_11_o(&self) -> REG_GPIO_11_O_R { - REG_GPIO_11_O_R::new(((self.bits >> 11) & 0x01) != 0) + REG_GPIO_11_O_R::new(((self.bits >> 11) & 1) != 0) } - #[doc = "Bit 10 - Output register for GPIO10."] + #[doc = "Bit 12 - Output register for GPIO12."] #[inline(always)] - pub fn reg_gpio_10_o(&self) -> REG_GPIO_10_O_R { - REG_GPIO_10_O_R::new(((self.bits >> 10) & 0x01) != 0) + pub fn reg_gpio_12_o(&self) -> REG_GPIO_12_O_R { + REG_GPIO_12_O_R::new(((self.bits >> 12) & 1) != 0) } - #[doc = "Bit 9 - Output register for GPIO9."] + #[doc = "Bit 13 - Output register for GPIO13."] #[inline(always)] - pub fn reg_gpio_9_o(&self) -> REG_GPIO_9_O_R { - REG_GPIO_9_O_R::new(((self.bits >> 9) & 0x01) != 0) + pub fn reg_gpio_13_o(&self) -> REG_GPIO_13_O_R { + REG_GPIO_13_O_R::new(((self.bits >> 13) & 1) != 0) } - #[doc = "Bit 8 - Output register for GPIO8."] + #[doc = "Bit 14 - Output register for GPIO14."] #[inline(always)] - pub fn reg_gpio_8_o(&self) -> REG_GPIO_8_O_R { - REG_GPIO_8_O_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn reg_gpio_14_o(&self) -> REG_GPIO_14_O_R { + REG_GPIO_14_O_R::new(((self.bits >> 14) & 1) != 0) } - #[doc = "Bit 7 - Output register for GPIO7."] + #[doc = "Bit 15 - Output register for GPIO15."] #[inline(always)] - pub fn reg_gpio_7_o(&self) -> REG_GPIO_7_O_R { - REG_GPIO_7_O_R::new(((self.bits >> 7) & 0x01) != 0) + pub fn reg_gpio_15_o(&self) -> REG_GPIO_15_O_R { + REG_GPIO_15_O_R::new(((self.bits >> 15) & 1) != 0) } - #[doc = "Bit 6 - Output register for GPIO6."] + #[doc = "Bit 16 - Output register for GPIO16."] #[inline(always)] - pub fn reg_gpio_6_o(&self) -> REG_GPIO_6_O_R { - REG_GPIO_6_O_R::new(((self.bits >> 6) & 0x01) != 0) + pub fn reg_gpio_16_o(&self) -> REG_GPIO_16_O_R { + REG_GPIO_16_O_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 5 - Output register for GPIO5."] + #[doc = "Bit 17 - Output register for GPIO17."] #[inline(always)] - pub fn reg_gpio_5_o(&self) -> REG_GPIO_5_O_R { - REG_GPIO_5_O_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn reg_gpio_17_o(&self) -> REG_GPIO_17_O_R { + REG_GPIO_17_O_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bit 4 - Output register for GPIO4."] + #[doc = "Bit 18 - Output register for GPIO18."] #[inline(always)] - pub fn reg_gpio_4_o(&self) -> REG_GPIO_4_O_R { - REG_GPIO_4_O_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn reg_gpio_18_o(&self) -> REG_GPIO_18_O_R { + REG_GPIO_18_O_R::new(((self.bits >> 18) & 1) != 0) } - #[doc = "Bit 3 - Output register for GPIO3."] + #[doc = "Bit 19 - Output register for GPIO19."] #[inline(always)] - pub fn reg_gpio_3_o(&self) -> REG_GPIO_3_O_R { - REG_GPIO_3_O_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn reg_gpio_19_o(&self) -> REG_GPIO_19_O_R { + REG_GPIO_19_O_R::new(((self.bits >> 19) & 1) != 0) } - #[doc = "Bit 2 - Output register for GPIO2."] + #[doc = "Bit 20 - Output register for GPIO20."] #[inline(always)] - pub fn reg_gpio_2_o(&self) -> REG_GPIO_2_O_R { - REG_GPIO_2_O_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn reg_gpio_20_o(&self) -> REG_GPIO_20_O_R { + REG_GPIO_20_O_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bit 1 - Output register for GPIO1."] + #[doc = "Bit 21 - Output register for GPIO21."] #[inline(always)] - pub fn reg_gpio_1_o(&self) -> REG_GPIO_1_O_R { - REG_GPIO_1_O_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn reg_gpio_21_o(&self) -> REG_GPIO_21_O_R { + REG_GPIO_21_O_R::new(((self.bits >> 21) & 1) != 0) } - #[doc = "Bit 0 - Output register for GPIO0."] + #[doc = "Bit 22 - Output register for GPIO22."] #[inline(always)] - pub fn reg_gpio_0_o(&self) -> REG_GPIO_0_O_R { - REG_GPIO_0_O_R::new((self.bits & 0x01) != 0) + pub fn reg_gpio_22_o(&self) -> REG_GPIO_22_O_R { + REG_GPIO_22_O_R::new(((self.bits >> 22) & 1) != 0) } } impl W { - #[doc = "Bit 22 - Output register for GPIO22."] + #[doc = "Bit 0 - Output register for GPIO0."] #[inline(always)] - pub fn reg_gpio_22_o(&mut self) -> REG_GPIO_22_O_W { - REG_GPIO_22_O_W { w: self } + #[must_use] + pub fn reg_gpio_0_o(&mut self) -> REG_GPIO_0_O_W<0> { + REG_GPIO_0_O_W::new(self) } - #[doc = "Bit 21 - Output register for GPIO21."] + #[doc = "Bit 1 - Output register for GPIO1."] #[inline(always)] - pub fn reg_gpio_21_o(&mut self) -> REG_GPIO_21_O_W { - REG_GPIO_21_O_W { w: self } + #[must_use] + pub fn reg_gpio_1_o(&mut self) -> REG_GPIO_1_O_W<1> { + REG_GPIO_1_O_W::new(self) } - #[doc = "Bit 20 - Output register for GPIO20."] + #[doc = "Bit 2 - Output register for GPIO2."] #[inline(always)] - pub fn reg_gpio_20_o(&mut self) -> REG_GPIO_20_O_W { - REG_GPIO_20_O_W { w: self } + #[must_use] + pub fn reg_gpio_2_o(&mut self) -> REG_GPIO_2_O_W<2> { + REG_GPIO_2_O_W::new(self) } - #[doc = "Bit 19 - Output register for GPIO19."] + #[doc = "Bit 3 - Output register for GPIO3."] #[inline(always)] - pub fn reg_gpio_19_o(&mut self) -> REG_GPIO_19_O_W { - REG_GPIO_19_O_W { w: self } + #[must_use] + pub fn reg_gpio_3_o(&mut self) -> REG_GPIO_3_O_W<3> { + REG_GPIO_3_O_W::new(self) } - #[doc = "Bit 18 - Output register for GPIO18."] + #[doc = "Bit 4 - Output register for GPIO4."] #[inline(always)] - pub fn reg_gpio_18_o(&mut self) -> REG_GPIO_18_O_W { - REG_GPIO_18_O_W { w: self } + #[must_use] + pub fn reg_gpio_4_o(&mut self) -> REG_GPIO_4_O_W<4> { + REG_GPIO_4_O_W::new(self) } - #[doc = "Bit 17 - Output register for GPIO17."] + #[doc = "Bit 5 - Output register for GPIO5."] #[inline(always)] - pub fn reg_gpio_17_o(&mut self) -> REG_GPIO_17_O_W { - REG_GPIO_17_O_W { w: self } + #[must_use] + pub fn reg_gpio_5_o(&mut self) -> REG_GPIO_5_O_W<5> { + REG_GPIO_5_O_W::new(self) } - #[doc = "Bit 16 - Output register for GPIO16."] + #[doc = "Bit 6 - Output register for GPIO6."] #[inline(always)] - pub fn reg_gpio_16_o(&mut self) -> REG_GPIO_16_O_W { - REG_GPIO_16_O_W { w: self } + #[must_use] + pub fn reg_gpio_6_o(&mut self) -> REG_GPIO_6_O_W<6> { + REG_GPIO_6_O_W::new(self) } - #[doc = "Bit 15 - Output register for GPIO15."] + #[doc = "Bit 7 - Output register for GPIO7."] #[inline(always)] - pub fn reg_gpio_15_o(&mut self) -> REG_GPIO_15_O_W { - REG_GPIO_15_O_W { w: self } + #[must_use] + pub fn reg_gpio_7_o(&mut self) -> REG_GPIO_7_O_W<7> { + REG_GPIO_7_O_W::new(self) } - #[doc = "Bit 14 - Output register for GPIO14."] + #[doc = "Bit 8 - Output register for GPIO8."] #[inline(always)] - pub fn reg_gpio_14_o(&mut self) -> REG_GPIO_14_O_W { - REG_GPIO_14_O_W { w: self } + #[must_use] + pub fn reg_gpio_8_o(&mut self) -> REG_GPIO_8_O_W<8> { + REG_GPIO_8_O_W::new(self) } - #[doc = "Bit 13 - Output register for GPIO13."] + #[doc = "Bit 9 - Output register for GPIO9."] #[inline(always)] - pub fn reg_gpio_13_o(&mut self) -> REG_GPIO_13_O_W { - REG_GPIO_13_O_W { w: self } + #[must_use] + pub fn reg_gpio_9_o(&mut self) -> REG_GPIO_9_O_W<9> { + REG_GPIO_9_O_W::new(self) } - #[doc = "Bit 12 - Output register for GPIO12."] + #[doc = "Bit 10 - Output register for GPIO10."] #[inline(always)] - pub fn reg_gpio_12_o(&mut self) -> REG_GPIO_12_O_W { - REG_GPIO_12_O_W { w: self } + #[must_use] + pub fn reg_gpio_10_o(&mut self) -> REG_GPIO_10_O_W<10> { + REG_GPIO_10_O_W::new(self) } #[doc = "Bit 11 - Output register for GPIO11."] #[inline(always)] - pub fn reg_gpio_11_o(&mut self) -> REG_GPIO_11_O_W { - REG_GPIO_11_O_W { w: self } + #[must_use] + pub fn reg_gpio_11_o(&mut self) -> REG_GPIO_11_O_W<11> { + REG_GPIO_11_O_W::new(self) } - #[doc = "Bit 10 - Output register for GPIO10."] + #[doc = "Bit 12 - Output register for GPIO12."] #[inline(always)] - pub fn reg_gpio_10_o(&mut self) -> REG_GPIO_10_O_W { - REG_GPIO_10_O_W { w: self } + #[must_use] + pub fn reg_gpio_12_o(&mut self) -> REG_GPIO_12_O_W<12> { + REG_GPIO_12_O_W::new(self) } - #[doc = "Bit 9 - Output register for GPIO9."] + #[doc = "Bit 13 - Output register for GPIO13."] #[inline(always)] - pub fn reg_gpio_9_o(&mut self) -> REG_GPIO_9_O_W { - REG_GPIO_9_O_W { w: self } + #[must_use] + pub fn reg_gpio_13_o(&mut self) -> REG_GPIO_13_O_W<13> { + REG_GPIO_13_O_W::new(self) } - #[doc = "Bit 8 - Output register for GPIO8."] + #[doc = "Bit 14 - Output register for GPIO14."] #[inline(always)] - pub fn reg_gpio_8_o(&mut self) -> REG_GPIO_8_O_W { - REG_GPIO_8_O_W { w: self } + #[must_use] + pub fn reg_gpio_14_o(&mut self) -> REG_GPIO_14_O_W<14> { + REG_GPIO_14_O_W::new(self) } - #[doc = "Bit 7 - Output register for GPIO7."] + #[doc = "Bit 15 - Output register for GPIO15."] #[inline(always)] - pub fn reg_gpio_7_o(&mut self) -> REG_GPIO_7_O_W { - REG_GPIO_7_O_W { w: self } + #[must_use] + pub fn reg_gpio_15_o(&mut self) -> REG_GPIO_15_O_W<15> { + REG_GPIO_15_O_W::new(self) } - #[doc = "Bit 6 - Output register for GPIO6."] + #[doc = "Bit 16 - Output register for GPIO16."] #[inline(always)] - pub fn reg_gpio_6_o(&mut self) -> REG_GPIO_6_O_W { - REG_GPIO_6_O_W { w: self } + #[must_use] + pub fn reg_gpio_16_o(&mut self) -> REG_GPIO_16_O_W<16> { + REG_GPIO_16_O_W::new(self) } - #[doc = "Bit 5 - Output register for GPIO5."] + #[doc = "Bit 17 - Output register for GPIO17."] #[inline(always)] - pub fn reg_gpio_5_o(&mut self) -> REG_GPIO_5_O_W { - REG_GPIO_5_O_W { w: self } + #[must_use] + pub fn reg_gpio_17_o(&mut self) -> REG_GPIO_17_O_W<17> { + REG_GPIO_17_O_W::new(self) } - #[doc = "Bit 4 - Output register for GPIO4."] + #[doc = "Bit 18 - Output register for GPIO18."] #[inline(always)] - pub fn reg_gpio_4_o(&mut self) -> REG_GPIO_4_O_W { - REG_GPIO_4_O_W { w: self } + #[must_use] + pub fn reg_gpio_18_o(&mut self) -> REG_GPIO_18_O_W<18> { + REG_GPIO_18_O_W::new(self) } - #[doc = "Bit 3 - Output register for GPIO3."] + #[doc = "Bit 19 - Output register for GPIO19."] #[inline(always)] - pub fn reg_gpio_3_o(&mut self) -> REG_GPIO_3_O_W { - REG_GPIO_3_O_W { w: self } + #[must_use] + pub fn reg_gpio_19_o(&mut self) -> REG_GPIO_19_O_W<19> { + REG_GPIO_19_O_W::new(self) } - #[doc = "Bit 2 - Output register for GPIO2."] + #[doc = "Bit 20 - Output register for GPIO20."] #[inline(always)] - pub fn reg_gpio_2_o(&mut self) -> REG_GPIO_2_O_W { - REG_GPIO_2_O_W { w: self } + #[must_use] + pub fn reg_gpio_20_o(&mut self) -> REG_GPIO_20_O_W<20> { + REG_GPIO_20_O_W::new(self) } - #[doc = "Bit 1 - Output register for GPIO1."] + #[doc = "Bit 21 - Output register for GPIO21."] #[inline(always)] - pub fn reg_gpio_1_o(&mut self) -> REG_GPIO_1_O_W { - REG_GPIO_1_O_W { w: self } + #[must_use] + pub fn reg_gpio_21_o(&mut self) -> REG_GPIO_21_O_W<21> { + REG_GPIO_21_O_W::new(self) } - #[doc = "Bit 0 - Output register for GPIO0."] + #[doc = "Bit 22 - Output register for GPIO22."] #[inline(always)] - pub fn reg_gpio_0_o(&mut self) -> REG_GPIO_0_O_W { - REG_GPIO_0_O_W { w: self } + #[must_use] + pub fn reg_gpio_22_o(&mut self) -> REG_GPIO_22_O_W<22> { + REG_GPIO_22_O_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -2192,11 +1482,10 @@ impl crate::Readable for GPIO_CFGCTL32_SPEC { #[doc = "`write(|w| ..)` method takes [gpio_cfgctl32::W](W) writer structure"] impl crate::Writable for GPIO_CFGCTL32_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets GPIO_CFGCTL32 to value 0"] impl crate::Resettable for GPIO_CFGCTL32_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/gpio_cfgctl33.rs b/src/glb/gpio_cfgctl33.rs index 372d336..3d37544 100644 --- a/src/glb/gpio_cfgctl33.rs +++ b/src/glb/gpio_cfgctl33.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,13 +28,15 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } impl W { #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -51,11 +54,10 @@ impl crate::Readable for GPIO_CFGCTL33_SPEC { #[doc = "`write(|w| ..)` method takes [gpio_cfgctl33::W](W) writer structure"] impl crate::Writable for GPIO_CFGCTL33_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets GPIO_CFGCTL33 to value 0"] impl crate::Resettable for GPIO_CFGCTL33_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/gpio_cfgctl34.rs b/src/glb/gpio_cfgctl34.rs index d542edf..de66075 100644 --- a/src/glb/gpio_cfgctl34.rs +++ b/src/glb/gpio_cfgctl34.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,2154 +28,1443 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Output enable register for GPIO22.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_22_OE_A { +#[doc = "Field `reg_gpio_0_oe` reader - Output enable register for GPIO0."] +pub type REG_GPIO_0_OE_R = crate::BitReader; +#[doc = "Output enable register for GPIO0.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO0OUTPUT_ENABLE_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_22_OE_A) -> Self { + fn from(variant: GPIO0OUTPUT_ENABLE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_22_oe` reader - Output enable register for GPIO22."] -pub struct REG_GPIO_22_OE_R(crate::FieldReader); -impl REG_GPIO_22_OE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_22_OE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_0_OE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_22_OE_A { + pub fn variant(&self) -> GPIO0OUTPUT_ENABLE_A { match self.bits { - false => REG_GPIO_22_OE_A::DISABLED, - true => REG_GPIO_22_OE_A::ENABLED, + false => GPIO0OUTPUT_ENABLE_A::DISABLED, + true => GPIO0OUTPUT_ENABLE_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_22_OE_A::DISABLED + *self == GPIO0OUTPUT_ENABLE_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_22_OE_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_22_OE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO0OUTPUT_ENABLE_A::ENABLED } } -#[doc = "Field `reg_gpio_22_oe` writer - Output enable register for GPIO22."] -pub struct REG_GPIO_22_OE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_22_OE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_22_OE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_0_oe` writer - Output enable register for GPIO0."] +pub type REG_GPIO_0_OE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL34_SPEC, GPIO0OUTPUT_ENABLE_A, O>; +impl<'a, const O: u8> REG_GPIO_0_OE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_22_OE_A::DISABLED) + self.variant(GPIO0OUTPUT_ENABLE_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_22_OE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 22)) | ((value as u32 & 0x01) << 22); - self.w + self.variant(GPIO0OUTPUT_ENABLE_A::ENABLED) } } -#[doc = "Output enable register for GPIO21.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_21_OE_A { +#[doc = "Field `reg_gpio_1_oe` reader - Output enable register for GPIO1."] +pub type REG_GPIO_1_OE_R = crate::BitReader; +#[doc = "Output enable register for GPIO1.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO1OUTPUT_ENABLE_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_21_OE_A) -> Self { + fn from(variant: GPIO1OUTPUT_ENABLE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_21_oe` reader - Output enable register for GPIO21."] -pub struct REG_GPIO_21_OE_R(crate::FieldReader); -impl REG_GPIO_21_OE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_21_OE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_1_OE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_21_OE_A { + pub fn variant(&self) -> GPIO1OUTPUT_ENABLE_A { match self.bits { - false => REG_GPIO_21_OE_A::DISABLED, - true => REG_GPIO_21_OE_A::ENABLED, + false => GPIO1OUTPUT_ENABLE_A::DISABLED, + true => GPIO1OUTPUT_ENABLE_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_21_OE_A::DISABLED + *self == GPIO1OUTPUT_ENABLE_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_21_OE_A::ENABLED + *self == GPIO1OUTPUT_ENABLE_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_21_OE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_21_oe` writer - Output enable register for GPIO21."] -pub struct REG_GPIO_21_OE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_21_OE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_21_OE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_1_oe` writer - Output enable register for GPIO1."] +pub type REG_GPIO_1_OE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL34_SPEC, GPIO1OUTPUT_ENABLE_A, O>; +impl<'a, const O: u8> REG_GPIO_1_OE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_21_OE_A::DISABLED) + self.variant(GPIO1OUTPUT_ENABLE_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_21_OE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); - self.w + self.variant(GPIO1OUTPUT_ENABLE_A::ENABLED) } } -#[doc = "Output enable register for GPIO20.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_20_OE_A { +#[doc = "Field `reg_gpio_2_oe` reader - Output enable register for GPIO2."] +pub type REG_GPIO_2_OE_R = crate::BitReader; +#[doc = "Output enable register for GPIO2.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO2OUTPUT_ENABLE_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_20_OE_A) -> Self { + fn from(variant: GPIO2OUTPUT_ENABLE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_20_oe` reader - Output enable register for GPIO20."] -pub struct REG_GPIO_20_OE_R(crate::FieldReader); -impl REG_GPIO_20_OE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_20_OE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_2_OE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_20_OE_A { + pub fn variant(&self) -> GPIO2OUTPUT_ENABLE_A { match self.bits { - false => REG_GPIO_20_OE_A::DISABLED, - true => REG_GPIO_20_OE_A::ENABLED, + false => GPIO2OUTPUT_ENABLE_A::DISABLED, + true => GPIO2OUTPUT_ENABLE_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_20_OE_A::DISABLED + *self == GPIO2OUTPUT_ENABLE_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_20_OE_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_20_OE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO2OUTPUT_ENABLE_A::ENABLED } } -#[doc = "Field `reg_gpio_20_oe` writer - Output enable register for GPIO20."] -pub struct REG_GPIO_20_OE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_20_OE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_20_OE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_2_oe` writer - Output enable register for GPIO2."] +pub type REG_GPIO_2_OE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL34_SPEC, GPIO2OUTPUT_ENABLE_A, O>; +impl<'a, const O: u8> REG_GPIO_2_OE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_20_OE_A::DISABLED) + self.variant(GPIO2OUTPUT_ENABLE_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_20_OE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w + self.variant(GPIO2OUTPUT_ENABLE_A::ENABLED) } } -#[doc = "Output enable register for GPIO19.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_19_OE_A { +#[doc = "Field `reg_gpio_3_oe` reader - Output enable register for GPIO3."] +pub type REG_GPIO_3_OE_R = crate::BitReader; +#[doc = "Output enable register for GPIO3.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO3OUTPUT_ENABLE_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_19_OE_A) -> Self { + fn from(variant: GPIO3OUTPUT_ENABLE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_19_oe` reader - Output enable register for GPIO19."] -pub struct REG_GPIO_19_OE_R(crate::FieldReader); -impl REG_GPIO_19_OE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_19_OE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_3_OE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_19_OE_A { + pub fn variant(&self) -> GPIO3OUTPUT_ENABLE_A { match self.bits { - false => REG_GPIO_19_OE_A::DISABLED, - true => REG_GPIO_19_OE_A::ENABLED, + false => GPIO3OUTPUT_ENABLE_A::DISABLED, + true => GPIO3OUTPUT_ENABLE_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_19_OE_A::DISABLED + *self == GPIO3OUTPUT_ENABLE_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_19_OE_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_19_OE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO3OUTPUT_ENABLE_A::ENABLED } } -#[doc = "Field `reg_gpio_19_oe` writer - Output enable register for GPIO19."] -pub struct REG_GPIO_19_OE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_19_OE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_19_OE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_3_oe` writer - Output enable register for GPIO3."] +pub type REG_GPIO_3_OE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL34_SPEC, GPIO3OUTPUT_ENABLE_A, O>; +impl<'a, const O: u8> REG_GPIO_3_OE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_19_OE_A::DISABLED) + self.variant(GPIO3OUTPUT_ENABLE_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_19_OE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 19)) | ((value as u32 & 0x01) << 19); - self.w + self.variant(GPIO3OUTPUT_ENABLE_A::ENABLED) } } -#[doc = "Output enable register for GPIO18.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_18_OE_A { +#[doc = "Field `reg_gpio_4_oe` reader - Output enable register for GPIO4."] +pub type REG_GPIO_4_OE_R = crate::BitReader; +#[doc = "Output enable register for GPIO4.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO4OUTPUT_ENABLE_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_18_OE_A) -> Self { + fn from(variant: GPIO4OUTPUT_ENABLE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_18_oe` reader - Output enable register for GPIO18."] -pub struct REG_GPIO_18_OE_R(crate::FieldReader); -impl REG_GPIO_18_OE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_18_OE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_4_OE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_18_OE_A { + pub fn variant(&self) -> GPIO4OUTPUT_ENABLE_A { match self.bits { - false => REG_GPIO_18_OE_A::DISABLED, - true => REG_GPIO_18_OE_A::ENABLED, + false => GPIO4OUTPUT_ENABLE_A::DISABLED, + true => GPIO4OUTPUT_ENABLE_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_18_OE_A::DISABLED + *self == GPIO4OUTPUT_ENABLE_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_18_OE_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_18_OE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO4OUTPUT_ENABLE_A::ENABLED } } -#[doc = "Field `reg_gpio_18_oe` writer - Output enable register for GPIO18."] -pub struct REG_GPIO_18_OE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_18_OE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_18_OE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_4_oe` writer - Output enable register for GPIO4."] +pub type REG_GPIO_4_OE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL34_SPEC, GPIO4OUTPUT_ENABLE_A, O>; +impl<'a, const O: u8> REG_GPIO_4_OE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_18_OE_A::DISABLED) + self.variant(GPIO4OUTPUT_ENABLE_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_18_OE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18); - self.w + self.variant(GPIO4OUTPUT_ENABLE_A::ENABLED) } } -#[doc = "Output enable register for GPIO17.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_17_OE_A { +#[doc = "Field `reg_gpio_5_oe` reader - Output enable register for GPIO5."] +pub type REG_GPIO_5_OE_R = crate::BitReader; +#[doc = "Output enable register for GPIO5.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO5OUTPUT_ENABLE_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_17_OE_A) -> Self { + fn from(variant: GPIO5OUTPUT_ENABLE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_17_oe` reader - Output enable register for GPIO17."] -pub struct REG_GPIO_17_OE_R(crate::FieldReader); -impl REG_GPIO_17_OE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_17_OE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_5_OE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_17_OE_A { + pub fn variant(&self) -> GPIO5OUTPUT_ENABLE_A { match self.bits { - false => REG_GPIO_17_OE_A::DISABLED, - true => REG_GPIO_17_OE_A::ENABLED, + false => GPIO5OUTPUT_ENABLE_A::DISABLED, + true => GPIO5OUTPUT_ENABLE_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_17_OE_A::DISABLED + *self == GPIO5OUTPUT_ENABLE_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_17_OE_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_17_OE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO5OUTPUT_ENABLE_A::ENABLED } } -#[doc = "Field `reg_gpio_17_oe` writer - Output enable register for GPIO17."] -pub struct REG_GPIO_17_OE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_17_OE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_17_OE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_5_oe` writer - Output enable register for GPIO5."] +pub type REG_GPIO_5_OE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL34_SPEC, GPIO5OUTPUT_ENABLE_A, O>; +impl<'a, const O: u8> REG_GPIO_5_OE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_17_OE_A::DISABLED) + self.variant(GPIO5OUTPUT_ENABLE_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_17_OE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w + self.variant(GPIO5OUTPUT_ENABLE_A::ENABLED) } } -#[doc = "Output enable register for GPIO16.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_16_OE_A { +#[doc = "Field `reg_gpio_6_oe` reader - Output enable register for GPIO6."] +pub type REG_GPIO_6_OE_R = crate::BitReader; +#[doc = "Output enable register for GPIO6.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO6OUTPUT_ENABLE_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_16_OE_A) -> Self { + fn from(variant: GPIO6OUTPUT_ENABLE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_16_oe` reader - Output enable register for GPIO16."] -pub struct REG_GPIO_16_OE_R(crate::FieldReader); -impl REG_GPIO_16_OE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_16_OE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_6_OE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_16_OE_A { + pub fn variant(&self) -> GPIO6OUTPUT_ENABLE_A { match self.bits { - false => REG_GPIO_16_OE_A::DISABLED, - true => REG_GPIO_16_OE_A::ENABLED, + false => GPIO6OUTPUT_ENABLE_A::DISABLED, + true => GPIO6OUTPUT_ENABLE_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_16_OE_A::DISABLED + *self == GPIO6OUTPUT_ENABLE_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_16_OE_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_16_OE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO6OUTPUT_ENABLE_A::ENABLED } } -#[doc = "Field `reg_gpio_16_oe` writer - Output enable register for GPIO16."] -pub struct REG_GPIO_16_OE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_16_OE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_16_OE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_6_oe` writer - Output enable register for GPIO6."] +pub type REG_GPIO_6_OE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL34_SPEC, GPIO6OUTPUT_ENABLE_A, O>; +impl<'a, const O: u8> REG_GPIO_6_OE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_16_OE_A::DISABLED) + self.variant(GPIO6OUTPUT_ENABLE_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_16_OE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w + self.variant(GPIO6OUTPUT_ENABLE_A::ENABLED) } } -#[doc = "Output enable register for GPIO15.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_15_OE_A { +#[doc = "Field `reg_gpio_7_oe` reader - Output enable register for GPIO7."] +pub type REG_GPIO_7_OE_R = crate::BitReader; +#[doc = "Output enable register for GPIO7.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO7OUTPUT_ENABLE_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_15_OE_A) -> Self { + fn from(variant: GPIO7OUTPUT_ENABLE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_15_oe` reader - Output enable register for GPIO15."] -pub struct REG_GPIO_15_OE_R(crate::FieldReader); -impl REG_GPIO_15_OE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_15_OE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_7_OE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_15_OE_A { + pub fn variant(&self) -> GPIO7OUTPUT_ENABLE_A { match self.bits { - false => REG_GPIO_15_OE_A::DISABLED, - true => REG_GPIO_15_OE_A::ENABLED, + false => GPIO7OUTPUT_ENABLE_A::DISABLED, + true => GPIO7OUTPUT_ENABLE_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_15_OE_A::DISABLED + *self == GPIO7OUTPUT_ENABLE_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_15_OE_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_15_OE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO7OUTPUT_ENABLE_A::ENABLED } } -#[doc = "Field `reg_gpio_15_oe` writer - Output enable register for GPIO15."] -pub struct REG_GPIO_15_OE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_15_OE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_15_OE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_7_oe` writer - Output enable register for GPIO7."] +pub type REG_GPIO_7_OE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL34_SPEC, GPIO7OUTPUT_ENABLE_A, O>; +impl<'a, const O: u8> REG_GPIO_7_OE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_15_OE_A::DISABLED) + self.variant(GPIO7OUTPUT_ENABLE_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_15_OE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15); - self.w + self.variant(GPIO7OUTPUT_ENABLE_A::ENABLED) } } -#[doc = "Output enable register for GPIO14.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_14_OE_A { +#[doc = "Field `reg_gpio_8_oe` reader - Output enable register for GPIO8."] +pub type REG_GPIO_8_OE_R = crate::BitReader; +#[doc = "Output enable register for GPIO8.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO8OUTPUT_ENABLE_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_14_OE_A) -> Self { + fn from(variant: GPIO8OUTPUT_ENABLE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_14_oe` reader - Output enable register for GPIO14."] -pub struct REG_GPIO_14_OE_R(crate::FieldReader); -impl REG_GPIO_14_OE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_14_OE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_8_OE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_14_OE_A { + pub fn variant(&self) -> GPIO8OUTPUT_ENABLE_A { match self.bits { - false => REG_GPIO_14_OE_A::DISABLED, - true => REG_GPIO_14_OE_A::ENABLED, + false => GPIO8OUTPUT_ENABLE_A::DISABLED, + true => GPIO8OUTPUT_ENABLE_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_14_OE_A::DISABLED + *self == GPIO8OUTPUT_ENABLE_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_14_OE_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_14_OE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO8OUTPUT_ENABLE_A::ENABLED } } -#[doc = "Field `reg_gpio_14_oe` writer - Output enable register for GPIO14."] -pub struct REG_GPIO_14_OE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_14_OE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_14_OE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_8_oe` writer - Output enable register for GPIO8."] +pub type REG_GPIO_8_OE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL34_SPEC, GPIO8OUTPUT_ENABLE_A, O>; +impl<'a, const O: u8> REG_GPIO_8_OE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_14_OE_A::DISABLED) + self.variant(GPIO8OUTPUT_ENABLE_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_14_OE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14); - self.w + self.variant(GPIO8OUTPUT_ENABLE_A::ENABLED) } } -#[doc = "Output enable register for GPIO13.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_13_OE_A { +#[doc = "Field `reg_gpio_9_oe` reader - Output enable register for GPIO9."] +pub type REG_GPIO_9_OE_R = crate::BitReader; +#[doc = "Output enable register for GPIO9.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO9OUTPUT_ENABLE_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_13_OE_A) -> Self { + fn from(variant: GPIO9OUTPUT_ENABLE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_13_oe` reader - Output enable register for GPIO13."] -pub struct REG_GPIO_13_OE_R(crate::FieldReader); -impl REG_GPIO_13_OE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_13_OE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_9_OE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_13_OE_A { + pub fn variant(&self) -> GPIO9OUTPUT_ENABLE_A { match self.bits { - false => REG_GPIO_13_OE_A::DISABLED, - true => REG_GPIO_13_OE_A::ENABLED, + false => GPIO9OUTPUT_ENABLE_A::DISABLED, + true => GPIO9OUTPUT_ENABLE_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_13_OE_A::DISABLED + *self == GPIO9OUTPUT_ENABLE_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_13_OE_A::ENABLED + *self == GPIO9OUTPUT_ENABLE_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_13_OE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_13_oe` writer - Output enable register for GPIO13."] -pub struct REG_GPIO_13_OE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_13_OE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_13_OE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_9_oe` writer - Output enable register for GPIO9."] +pub type REG_GPIO_9_OE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL34_SPEC, GPIO9OUTPUT_ENABLE_A, O>; +impl<'a, const O: u8> REG_GPIO_9_OE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_13_OE_A::DISABLED) + self.variant(GPIO9OUTPUT_ENABLE_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_13_OE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13); - self.w + self.variant(GPIO9OUTPUT_ENABLE_A::ENABLED) } } -#[doc = "Output enable register for GPIO12.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_12_OE_A { +#[doc = "Field `reg_gpio_10_oe` reader - Output enable register for GPIO10."] +pub type REG_GPIO_10_OE_R = crate::BitReader; +#[doc = "Output enable register for GPIO10.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO10OUTPUT_ENABLE_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_12_OE_A) -> Self { + fn from(variant: GPIO10OUTPUT_ENABLE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_12_oe` reader - Output enable register for GPIO12."] -pub struct REG_GPIO_12_OE_R(crate::FieldReader); -impl REG_GPIO_12_OE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_12_OE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_10_OE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_12_OE_A { + pub fn variant(&self) -> GPIO10OUTPUT_ENABLE_A { match self.bits { - false => REG_GPIO_12_OE_A::DISABLED, - true => REG_GPIO_12_OE_A::ENABLED, + false => GPIO10OUTPUT_ENABLE_A::DISABLED, + true => GPIO10OUTPUT_ENABLE_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_12_OE_A::DISABLED + *self == GPIO10OUTPUT_ENABLE_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_12_OE_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_12_OE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO10OUTPUT_ENABLE_A::ENABLED } } -#[doc = "Field `reg_gpio_12_oe` writer - Output enable register for GPIO12."] -pub struct REG_GPIO_12_OE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_12_OE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_12_OE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_10_oe` writer - Output enable register for GPIO10."] +pub type REG_GPIO_10_OE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL34_SPEC, GPIO10OUTPUT_ENABLE_A, O>; +impl<'a, const O: u8> REG_GPIO_10_OE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_12_OE_A::DISABLED) + self.variant(GPIO10OUTPUT_ENABLE_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_12_OE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w + self.variant(GPIO10OUTPUT_ENABLE_A::ENABLED) } } +#[doc = "Field `reg_gpio_11_oe` reader - Output enable register for GPIO11."] +pub type REG_GPIO_11_OE_R = crate::BitReader; #[doc = "Output enable register for GPIO11.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_11_OE_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO11OUTPUT_ENABLE_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_11_OE_A) -> Self { + fn from(variant: GPIO11OUTPUT_ENABLE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_11_oe` reader - Output enable register for GPIO11."] -pub struct REG_GPIO_11_OE_R(crate::FieldReader); impl REG_GPIO_11_OE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_11_OE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_11_OE_A { + pub fn variant(&self) -> GPIO11OUTPUT_ENABLE_A { match self.bits { - false => REG_GPIO_11_OE_A::DISABLED, - true => REG_GPIO_11_OE_A::ENABLED, + false => GPIO11OUTPUT_ENABLE_A::DISABLED, + true => GPIO11OUTPUT_ENABLE_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_11_OE_A::DISABLED + *self == GPIO11OUTPUT_ENABLE_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_11_OE_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_11_OE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO11OUTPUT_ENABLE_A::ENABLED } } #[doc = "Field `reg_gpio_11_oe` writer - Output enable register for GPIO11."] -pub struct REG_GPIO_11_OE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_11_OE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_11_OE_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_11_OE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL34_SPEC, GPIO11OUTPUT_ENABLE_A, O>; +impl<'a, const O: u8> REG_GPIO_11_OE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_11_OE_A::DISABLED) + self.variant(GPIO11OUTPUT_ENABLE_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_11_OE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w + self.variant(GPIO11OUTPUT_ENABLE_A::ENABLED) } } -#[doc = "Output enable register for GPIO10.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_10_OE_A { +#[doc = "Field `reg_gpio_12_oe` reader - Output enable register for GPIO12."] +pub type REG_GPIO_12_OE_R = crate::BitReader; +#[doc = "Output enable register for GPIO12.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO12OUTPUT_ENABLE_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_10_OE_A) -> Self { + fn from(variant: GPIO12OUTPUT_ENABLE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_10_oe` reader - Output enable register for GPIO10."] -pub struct REG_GPIO_10_OE_R(crate::FieldReader); -impl REG_GPIO_10_OE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_10_OE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_12_OE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_10_OE_A { + pub fn variant(&self) -> GPIO12OUTPUT_ENABLE_A { match self.bits { - false => REG_GPIO_10_OE_A::DISABLED, - true => REG_GPIO_10_OE_A::ENABLED, + false => GPIO12OUTPUT_ENABLE_A::DISABLED, + true => GPIO12OUTPUT_ENABLE_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_10_OE_A::DISABLED + *self == GPIO12OUTPUT_ENABLE_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_10_OE_A::ENABLED + *self == GPIO12OUTPUT_ENABLE_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_10_OE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_10_oe` writer - Output enable register for GPIO10."] -pub struct REG_GPIO_10_OE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_10_OE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_10_OE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_12_oe` writer - Output enable register for GPIO12."] +pub type REG_GPIO_12_OE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL34_SPEC, GPIO12OUTPUT_ENABLE_A, O>; +impl<'a, const O: u8> REG_GPIO_12_OE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_10_OE_A::DISABLED) + self.variant(GPIO12OUTPUT_ENABLE_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_10_OE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); - self.w + self.variant(GPIO12OUTPUT_ENABLE_A::ENABLED) } } -#[doc = "Output enable register for GPIO9.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_9_OE_A { +#[doc = "Field `reg_gpio_13_oe` reader - Output enable register for GPIO13."] +pub type REG_GPIO_13_OE_R = crate::BitReader; +#[doc = "Output enable register for GPIO13.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO13OUTPUT_ENABLE_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_9_OE_A) -> Self { + fn from(variant: GPIO13OUTPUT_ENABLE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_9_oe` reader - Output enable register for GPIO9."] -pub struct REG_GPIO_9_OE_R(crate::FieldReader); -impl REG_GPIO_9_OE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_9_OE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_13_OE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_9_OE_A { + pub fn variant(&self) -> GPIO13OUTPUT_ENABLE_A { match self.bits { - false => REG_GPIO_9_OE_A::DISABLED, - true => REG_GPIO_9_OE_A::ENABLED, + false => GPIO13OUTPUT_ENABLE_A::DISABLED, + true => GPIO13OUTPUT_ENABLE_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_9_OE_A::DISABLED + *self == GPIO13OUTPUT_ENABLE_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_9_OE_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_9_OE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO13OUTPUT_ENABLE_A::ENABLED } } -#[doc = "Field `reg_gpio_9_oe` writer - Output enable register for GPIO9."] -pub struct REG_GPIO_9_OE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_9_OE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_9_OE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_13_oe` writer - Output enable register for GPIO13."] +pub type REG_GPIO_13_OE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL34_SPEC, GPIO13OUTPUT_ENABLE_A, O>; +impl<'a, const O: u8> REG_GPIO_13_OE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_9_OE_A::DISABLED) + self.variant(GPIO13OUTPUT_ENABLE_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_9_OE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w + self.variant(GPIO13OUTPUT_ENABLE_A::ENABLED) } } -#[doc = "Output enable register for GPIO8.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_8_OE_A { +#[doc = "Field `reg_gpio_14_oe` reader - Output enable register for GPIO14."] +pub type REG_GPIO_14_OE_R = crate::BitReader; +#[doc = "Output enable register for GPIO14.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO14OUTPUT_ENABLE_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_8_OE_A) -> Self { + fn from(variant: GPIO14OUTPUT_ENABLE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_8_oe` reader - Output enable register for GPIO8."] -pub struct REG_GPIO_8_OE_R(crate::FieldReader); -impl REG_GPIO_8_OE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_8_OE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_14_OE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_8_OE_A { + pub fn variant(&self) -> GPIO14OUTPUT_ENABLE_A { match self.bits { - false => REG_GPIO_8_OE_A::DISABLED, - true => REG_GPIO_8_OE_A::ENABLED, + false => GPIO14OUTPUT_ENABLE_A::DISABLED, + true => GPIO14OUTPUT_ENABLE_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_8_OE_A::DISABLED + *self == GPIO14OUTPUT_ENABLE_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_8_OE_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_8_OE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO14OUTPUT_ENABLE_A::ENABLED } } -#[doc = "Field `reg_gpio_8_oe` writer - Output enable register for GPIO8."] -pub struct REG_GPIO_8_OE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_8_OE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_8_OE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_14_oe` writer - Output enable register for GPIO14."] +pub type REG_GPIO_14_OE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL34_SPEC, GPIO14OUTPUT_ENABLE_A, O>; +impl<'a, const O: u8> REG_GPIO_14_OE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_8_OE_A::DISABLED) + self.variant(GPIO14OUTPUT_ENABLE_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_8_OE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w + self.variant(GPIO14OUTPUT_ENABLE_A::ENABLED) } } -#[doc = "Output enable register for GPIO7.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_7_OE_A { +#[doc = "Field `reg_gpio_15_oe` reader - Output enable register for GPIO15."] +pub type REG_GPIO_15_OE_R = crate::BitReader; +#[doc = "Output enable register for GPIO15.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO15OUTPUT_ENABLE_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_7_OE_A) -> Self { + fn from(variant: GPIO15OUTPUT_ENABLE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_7_oe` reader - Output enable register for GPIO7."] -pub struct REG_GPIO_7_OE_R(crate::FieldReader); -impl REG_GPIO_7_OE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_7_OE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_15_OE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_7_OE_A { + pub fn variant(&self) -> GPIO15OUTPUT_ENABLE_A { match self.bits { - false => REG_GPIO_7_OE_A::DISABLED, - true => REG_GPIO_7_OE_A::ENABLED, + false => GPIO15OUTPUT_ENABLE_A::DISABLED, + true => GPIO15OUTPUT_ENABLE_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_7_OE_A::DISABLED + *self == GPIO15OUTPUT_ENABLE_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_7_OE_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_7_OE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO15OUTPUT_ENABLE_A::ENABLED } } -#[doc = "Field `reg_gpio_7_oe` writer - Output enable register for GPIO7."] -pub struct REG_GPIO_7_OE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_7_OE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_7_OE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_15_oe` writer - Output enable register for GPIO15."] +pub type REG_GPIO_15_OE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL34_SPEC, GPIO15OUTPUT_ENABLE_A, O>; +impl<'a, const O: u8> REG_GPIO_15_OE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_7_OE_A::DISABLED) + self.variant(GPIO15OUTPUT_ENABLE_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_7_OE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7); - self.w + self.variant(GPIO15OUTPUT_ENABLE_A::ENABLED) } } -#[doc = "Output enable register for GPIO6.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_6_OE_A { +#[doc = "Field `reg_gpio_16_oe` reader - Output enable register for GPIO16."] +pub type REG_GPIO_16_OE_R = crate::BitReader; +#[doc = "Output enable register for GPIO16.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO16OUTPUT_ENABLE_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_6_OE_A) -> Self { + fn from(variant: GPIO16OUTPUT_ENABLE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_6_oe` reader - Output enable register for GPIO6."] -pub struct REG_GPIO_6_OE_R(crate::FieldReader); -impl REG_GPIO_6_OE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_6_OE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_16_OE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_6_OE_A { + pub fn variant(&self) -> GPIO16OUTPUT_ENABLE_A { match self.bits { - false => REG_GPIO_6_OE_A::DISABLED, - true => REG_GPIO_6_OE_A::ENABLED, + false => GPIO16OUTPUT_ENABLE_A::DISABLED, + true => GPIO16OUTPUT_ENABLE_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_6_OE_A::DISABLED + *self == GPIO16OUTPUT_ENABLE_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_6_OE_A::ENABLED + *self == GPIO16OUTPUT_ENABLE_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_6_OE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_6_oe` writer - Output enable register for GPIO6."] -pub struct REG_GPIO_6_OE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_6_OE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_6_OE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_16_oe` writer - Output enable register for GPIO16."] +pub type REG_GPIO_16_OE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL34_SPEC, GPIO16OUTPUT_ENABLE_A, O>; +impl<'a, const O: u8> REG_GPIO_16_OE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_6_OE_A::DISABLED) + self.variant(GPIO16OUTPUT_ENABLE_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_6_OE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w + self.variant(GPIO16OUTPUT_ENABLE_A::ENABLED) } } -#[doc = "Output enable register for GPIO5.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_5_OE_A { +#[doc = "Field `reg_gpio_17_oe` reader - Output enable register for GPIO17."] +pub type REG_GPIO_17_OE_R = crate::BitReader; +#[doc = "Output enable register for GPIO17.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO17OUTPUT_ENABLE_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_5_OE_A) -> Self { + fn from(variant: GPIO17OUTPUT_ENABLE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_5_oe` reader - Output enable register for GPIO5."] -pub struct REG_GPIO_5_OE_R(crate::FieldReader); -impl REG_GPIO_5_OE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_5_OE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_17_OE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_5_OE_A { + pub fn variant(&self) -> GPIO17OUTPUT_ENABLE_A { match self.bits { - false => REG_GPIO_5_OE_A::DISABLED, - true => REG_GPIO_5_OE_A::ENABLED, + false => GPIO17OUTPUT_ENABLE_A::DISABLED, + true => GPIO17OUTPUT_ENABLE_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_5_OE_A::DISABLED + *self == GPIO17OUTPUT_ENABLE_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_5_OE_A::ENABLED + *self == GPIO17OUTPUT_ENABLE_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_5_OE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_5_oe` writer - Output enable register for GPIO5."] -pub struct REG_GPIO_5_OE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_5_OE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_5_OE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_17_oe` writer - Output enable register for GPIO17."] +pub type REG_GPIO_17_OE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL34_SPEC, GPIO17OUTPUT_ENABLE_A, O>; +impl<'a, const O: u8> REG_GPIO_17_OE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_5_OE_A::DISABLED) + self.variant(GPIO17OUTPUT_ENABLE_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_5_OE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w + self.variant(GPIO17OUTPUT_ENABLE_A::ENABLED) } } -#[doc = "Output enable register for GPIO4.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_4_OE_A { +#[doc = "Field `reg_gpio_18_oe` reader - Output enable register for GPIO18."] +pub type REG_GPIO_18_OE_R = crate::BitReader; +#[doc = "Output enable register for GPIO18.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO18OUTPUT_ENABLE_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_4_OE_A) -> Self { + fn from(variant: GPIO18OUTPUT_ENABLE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_4_oe` reader - Output enable register for GPIO4."] -pub struct REG_GPIO_4_OE_R(crate::FieldReader); -impl REG_GPIO_4_OE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_4_OE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_18_OE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_4_OE_A { + pub fn variant(&self) -> GPIO18OUTPUT_ENABLE_A { match self.bits { - false => REG_GPIO_4_OE_A::DISABLED, - true => REG_GPIO_4_OE_A::ENABLED, + false => GPIO18OUTPUT_ENABLE_A::DISABLED, + true => GPIO18OUTPUT_ENABLE_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_4_OE_A::DISABLED + *self == GPIO18OUTPUT_ENABLE_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_4_OE_A::ENABLED + *self == GPIO18OUTPUT_ENABLE_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_4_OE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_4_oe` writer - Output enable register for GPIO4."] -pub struct REG_GPIO_4_OE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_4_OE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_4_OE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_18_oe` writer - Output enable register for GPIO18."] +pub type REG_GPIO_18_OE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL34_SPEC, GPIO18OUTPUT_ENABLE_A, O>; +impl<'a, const O: u8> REG_GPIO_18_OE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_4_OE_A::DISABLED) + self.variant(GPIO18OUTPUT_ENABLE_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_4_OE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w + self.variant(GPIO18OUTPUT_ENABLE_A::ENABLED) } } -#[doc = "Output enable register for GPIO3.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_3_OE_A { +#[doc = "Field `reg_gpio_19_oe` reader - Output enable register for GPIO19."] +pub type REG_GPIO_19_OE_R = crate::BitReader; +#[doc = "Output enable register for GPIO19.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO19OUTPUT_ENABLE_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_3_OE_A) -> Self { + fn from(variant: GPIO19OUTPUT_ENABLE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_3_oe` reader - Output enable register for GPIO3."] -pub struct REG_GPIO_3_OE_R(crate::FieldReader); -impl REG_GPIO_3_OE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_3_OE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_19_OE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_3_OE_A { + pub fn variant(&self) -> GPIO19OUTPUT_ENABLE_A { match self.bits { - false => REG_GPIO_3_OE_A::DISABLED, - true => REG_GPIO_3_OE_A::ENABLED, + false => GPIO19OUTPUT_ENABLE_A::DISABLED, + true => GPIO19OUTPUT_ENABLE_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_3_OE_A::DISABLED + *self == GPIO19OUTPUT_ENABLE_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_3_OE_A::ENABLED + *self == GPIO19OUTPUT_ENABLE_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_3_OE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_3_oe` writer - Output enable register for GPIO3."] -pub struct REG_GPIO_3_OE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_3_OE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_3_OE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_19_oe` writer - Output enable register for GPIO19."] +pub type REG_GPIO_19_OE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL34_SPEC, GPIO19OUTPUT_ENABLE_A, O>; +impl<'a, const O: u8> REG_GPIO_19_OE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_3_OE_A::DISABLED) + self.variant(GPIO19OUTPUT_ENABLE_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_3_OE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w + self.variant(GPIO19OUTPUT_ENABLE_A::ENABLED) } } -#[doc = "Output enable register for GPIO2.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_2_OE_A { +#[doc = "Field `reg_gpio_20_oe` reader - Output enable register for GPIO20."] +pub type REG_GPIO_20_OE_R = crate::BitReader; +#[doc = "Output enable register for GPIO20.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO20OUTPUT_ENABLE_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_2_OE_A) -> Self { + fn from(variant: GPIO20OUTPUT_ENABLE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_2_oe` reader - Output enable register for GPIO2."] -pub struct REG_GPIO_2_OE_R(crate::FieldReader); -impl REG_GPIO_2_OE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_2_OE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_20_OE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_2_OE_A { + pub fn variant(&self) -> GPIO20OUTPUT_ENABLE_A { match self.bits { - false => REG_GPIO_2_OE_A::DISABLED, - true => REG_GPIO_2_OE_A::ENABLED, + false => GPIO20OUTPUT_ENABLE_A::DISABLED, + true => GPIO20OUTPUT_ENABLE_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_2_OE_A::DISABLED + *self == GPIO20OUTPUT_ENABLE_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_2_OE_A::ENABLED + *self == GPIO20OUTPUT_ENABLE_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_2_OE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_2_oe` writer - Output enable register for GPIO2."] -pub struct REG_GPIO_2_OE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_2_OE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_2_OE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_20_oe` writer - Output enable register for GPIO20."] +pub type REG_GPIO_20_OE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL34_SPEC, GPIO20OUTPUT_ENABLE_A, O>; +impl<'a, const O: u8> REG_GPIO_20_OE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_2_OE_A::DISABLED) + self.variant(GPIO20OUTPUT_ENABLE_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_2_OE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w + self.variant(GPIO20OUTPUT_ENABLE_A::ENABLED) } } -#[doc = "Output enable register for GPIO1.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_1_OE_A { +#[doc = "Field `reg_gpio_21_oe` reader - Output enable register for GPIO21."] +pub type REG_GPIO_21_OE_R = crate::BitReader; +#[doc = "Output enable register for GPIO21.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO21OUTPUT_ENABLE_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_1_OE_A) -> Self { + fn from(variant: GPIO21OUTPUT_ENABLE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_1_oe` reader - Output enable register for GPIO1."] -pub struct REG_GPIO_1_OE_R(crate::FieldReader); -impl REG_GPIO_1_OE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_1_OE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_21_OE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_1_OE_A { + pub fn variant(&self) -> GPIO21OUTPUT_ENABLE_A { match self.bits { - false => REG_GPIO_1_OE_A::DISABLED, - true => REG_GPIO_1_OE_A::ENABLED, + false => GPIO21OUTPUT_ENABLE_A::DISABLED, + true => GPIO21OUTPUT_ENABLE_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_1_OE_A::DISABLED + *self == GPIO21OUTPUT_ENABLE_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_1_OE_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_1_OE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO21OUTPUT_ENABLE_A::ENABLED } } -#[doc = "Field `reg_gpio_1_oe` writer - Output enable register for GPIO1."] -pub struct REG_GPIO_1_OE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_1_OE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_1_OE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_21_oe` writer - Output enable register for GPIO21."] +pub type REG_GPIO_21_OE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL34_SPEC, GPIO21OUTPUT_ENABLE_A, O>; +impl<'a, const O: u8> REG_GPIO_21_OE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_1_OE_A::DISABLED) + self.variant(GPIO21OUTPUT_ENABLE_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_1_OE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w + self.variant(GPIO21OUTPUT_ENABLE_A::ENABLED) } } -#[doc = "Output enable register for GPIO0.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_0_OE_A { +#[doc = "Field `reg_gpio_22_oe` reader - Output enable register for GPIO22."] +pub type REG_GPIO_22_OE_R = crate::BitReader; +#[doc = "Output enable register for GPIO22.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO22OUTPUT_ENABLE_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_0_OE_A) -> Self { + fn from(variant: GPIO22OUTPUT_ENABLE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_0_oe` reader - Output enable register for GPIO0."] -pub struct REG_GPIO_0_OE_R(crate::FieldReader); -impl REG_GPIO_0_OE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_0_OE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_22_OE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_0_OE_A { + pub fn variant(&self) -> GPIO22OUTPUT_ENABLE_A { match self.bits { - false => REG_GPIO_0_OE_A::DISABLED, - true => REG_GPIO_0_OE_A::ENABLED, + false => GPIO22OUTPUT_ENABLE_A::DISABLED, + true => GPIO22OUTPUT_ENABLE_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_0_OE_A::DISABLED + *self == GPIO22OUTPUT_ENABLE_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_0_OE_A::ENABLED + *self == GPIO22OUTPUT_ENABLE_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_0_OE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_0_oe` writer - Output enable register for GPIO0."] -pub struct REG_GPIO_0_OE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_0_OE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_0_OE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_22_oe` writer - Output enable register for GPIO22."] +pub type REG_GPIO_22_OE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL34_SPEC, GPIO22OUTPUT_ENABLE_A, O>; +impl<'a, const O: u8> REG_GPIO_22_OE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_0_OE_A::DISABLED) + self.variant(GPIO22OUTPUT_ENABLE_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_0_OE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + self.variant(GPIO22OUTPUT_ENABLE_A::ENABLED) } } impl R { - #[doc = "Bit 22 - Output enable register for GPIO22."] + #[doc = "Bit 0 - Output enable register for GPIO0."] #[inline(always)] - pub fn reg_gpio_22_oe(&self) -> REG_GPIO_22_OE_R { - REG_GPIO_22_OE_R::new(((self.bits >> 22) & 0x01) != 0) + pub fn reg_gpio_0_oe(&self) -> REG_GPIO_0_OE_R { + REG_GPIO_0_OE_R::new((self.bits & 1) != 0) } - #[doc = "Bit 21 - Output enable register for GPIO21."] + #[doc = "Bit 1 - Output enable register for GPIO1."] #[inline(always)] - pub fn reg_gpio_21_oe(&self) -> REG_GPIO_21_OE_R { - REG_GPIO_21_OE_R::new(((self.bits >> 21) & 0x01) != 0) + pub fn reg_gpio_1_oe(&self) -> REG_GPIO_1_OE_R { + REG_GPIO_1_OE_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 20 - Output enable register for GPIO20."] + #[doc = "Bit 2 - Output enable register for GPIO2."] #[inline(always)] - pub fn reg_gpio_20_oe(&self) -> REG_GPIO_20_OE_R { - REG_GPIO_20_OE_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn reg_gpio_2_oe(&self) -> REG_GPIO_2_OE_R { + REG_GPIO_2_OE_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 19 - Output enable register for GPIO19."] + #[doc = "Bit 3 - Output enable register for GPIO3."] #[inline(always)] - pub fn reg_gpio_19_oe(&self) -> REG_GPIO_19_OE_R { - REG_GPIO_19_OE_R::new(((self.bits >> 19) & 0x01) != 0) + pub fn reg_gpio_3_oe(&self) -> REG_GPIO_3_OE_R { + REG_GPIO_3_OE_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bit 18 - Output enable register for GPIO18."] + #[doc = "Bit 4 - Output enable register for GPIO4."] #[inline(always)] - pub fn reg_gpio_18_oe(&self) -> REG_GPIO_18_OE_R { - REG_GPIO_18_OE_R::new(((self.bits >> 18) & 0x01) != 0) + pub fn reg_gpio_4_oe(&self) -> REG_GPIO_4_OE_R { + REG_GPIO_4_OE_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 17 - Output enable register for GPIO17."] + #[doc = "Bit 5 - Output enable register for GPIO5."] #[inline(always)] - pub fn reg_gpio_17_oe(&self) -> REG_GPIO_17_OE_R { - REG_GPIO_17_OE_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn reg_gpio_5_oe(&self) -> REG_GPIO_5_OE_R { + REG_GPIO_5_OE_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 16 - Output enable register for GPIO16."] + #[doc = "Bit 6 - Output enable register for GPIO6."] #[inline(always)] - pub fn reg_gpio_16_oe(&self) -> REG_GPIO_16_OE_R { - REG_GPIO_16_OE_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn reg_gpio_6_oe(&self) -> REG_GPIO_6_OE_R { + REG_GPIO_6_OE_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = "Bit 15 - Output enable register for GPIO15."] + #[doc = "Bit 7 - Output enable register for GPIO7."] #[inline(always)] - pub fn reg_gpio_15_oe(&self) -> REG_GPIO_15_OE_R { - REG_GPIO_15_OE_R::new(((self.bits >> 15) & 0x01) != 0) + pub fn reg_gpio_7_oe(&self) -> REG_GPIO_7_OE_R { + REG_GPIO_7_OE_R::new(((self.bits >> 7) & 1) != 0) } - #[doc = "Bit 14 - Output enable register for GPIO14."] + #[doc = "Bit 8 - Output enable register for GPIO8."] #[inline(always)] - pub fn reg_gpio_14_oe(&self) -> REG_GPIO_14_OE_R { - REG_GPIO_14_OE_R::new(((self.bits >> 14) & 0x01) != 0) + pub fn reg_gpio_8_oe(&self) -> REG_GPIO_8_OE_R { + REG_GPIO_8_OE_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bit 13 - Output enable register for GPIO13."] + #[doc = "Bit 9 - Output enable register for GPIO9."] #[inline(always)] - pub fn reg_gpio_13_oe(&self) -> REG_GPIO_13_OE_R { - REG_GPIO_13_OE_R::new(((self.bits >> 13) & 0x01) != 0) + pub fn reg_gpio_9_oe(&self) -> REG_GPIO_9_OE_R { + REG_GPIO_9_OE_R::new(((self.bits >> 9) & 1) != 0) } - #[doc = "Bit 12 - Output enable register for GPIO12."] + #[doc = "Bit 10 - Output enable register for GPIO10."] #[inline(always)] - pub fn reg_gpio_12_oe(&self) -> REG_GPIO_12_OE_R { - REG_GPIO_12_OE_R::new(((self.bits >> 12) & 0x01) != 0) + pub fn reg_gpio_10_oe(&self) -> REG_GPIO_10_OE_R { + REG_GPIO_10_OE_R::new(((self.bits >> 10) & 1) != 0) } #[doc = "Bit 11 - Output enable register for GPIO11."] #[inline(always)] pub fn reg_gpio_11_oe(&self) -> REG_GPIO_11_OE_R { - REG_GPIO_11_OE_R::new(((self.bits >> 11) & 0x01) != 0) + REG_GPIO_11_OE_R::new(((self.bits >> 11) & 1) != 0) } - #[doc = "Bit 10 - Output enable register for GPIO10."] + #[doc = "Bit 12 - Output enable register for GPIO12."] #[inline(always)] - pub fn reg_gpio_10_oe(&self) -> REG_GPIO_10_OE_R { - REG_GPIO_10_OE_R::new(((self.bits >> 10) & 0x01) != 0) + pub fn reg_gpio_12_oe(&self) -> REG_GPIO_12_OE_R { + REG_GPIO_12_OE_R::new(((self.bits >> 12) & 1) != 0) } - #[doc = "Bit 9 - Output enable register for GPIO9."] + #[doc = "Bit 13 - Output enable register for GPIO13."] #[inline(always)] - pub fn reg_gpio_9_oe(&self) -> REG_GPIO_9_OE_R { - REG_GPIO_9_OE_R::new(((self.bits >> 9) & 0x01) != 0) + pub fn reg_gpio_13_oe(&self) -> REG_GPIO_13_OE_R { + REG_GPIO_13_OE_R::new(((self.bits >> 13) & 1) != 0) } - #[doc = "Bit 8 - Output enable register for GPIO8."] + #[doc = "Bit 14 - Output enable register for GPIO14."] #[inline(always)] - pub fn reg_gpio_8_oe(&self) -> REG_GPIO_8_OE_R { - REG_GPIO_8_OE_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn reg_gpio_14_oe(&self) -> REG_GPIO_14_OE_R { + REG_GPIO_14_OE_R::new(((self.bits >> 14) & 1) != 0) } - #[doc = "Bit 7 - Output enable register for GPIO7."] + #[doc = "Bit 15 - Output enable register for GPIO15."] #[inline(always)] - pub fn reg_gpio_7_oe(&self) -> REG_GPIO_7_OE_R { - REG_GPIO_7_OE_R::new(((self.bits >> 7) & 0x01) != 0) + pub fn reg_gpio_15_oe(&self) -> REG_GPIO_15_OE_R { + REG_GPIO_15_OE_R::new(((self.bits >> 15) & 1) != 0) } - #[doc = "Bit 6 - Output enable register for GPIO6."] + #[doc = "Bit 16 - Output enable register for GPIO16."] #[inline(always)] - pub fn reg_gpio_6_oe(&self) -> REG_GPIO_6_OE_R { - REG_GPIO_6_OE_R::new(((self.bits >> 6) & 0x01) != 0) + pub fn reg_gpio_16_oe(&self) -> REG_GPIO_16_OE_R { + REG_GPIO_16_OE_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 5 - Output enable register for GPIO5."] + #[doc = "Bit 17 - Output enable register for GPIO17."] #[inline(always)] - pub fn reg_gpio_5_oe(&self) -> REG_GPIO_5_OE_R { - REG_GPIO_5_OE_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn reg_gpio_17_oe(&self) -> REG_GPIO_17_OE_R { + REG_GPIO_17_OE_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bit 4 - Output enable register for GPIO4."] + #[doc = "Bit 18 - Output enable register for GPIO18."] #[inline(always)] - pub fn reg_gpio_4_oe(&self) -> REG_GPIO_4_OE_R { - REG_GPIO_4_OE_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn reg_gpio_18_oe(&self) -> REG_GPIO_18_OE_R { + REG_GPIO_18_OE_R::new(((self.bits >> 18) & 1) != 0) } - #[doc = "Bit 3 - Output enable register for GPIO3."] + #[doc = "Bit 19 - Output enable register for GPIO19."] #[inline(always)] - pub fn reg_gpio_3_oe(&self) -> REG_GPIO_3_OE_R { - REG_GPIO_3_OE_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn reg_gpio_19_oe(&self) -> REG_GPIO_19_OE_R { + REG_GPIO_19_OE_R::new(((self.bits >> 19) & 1) != 0) } - #[doc = "Bit 2 - Output enable register for GPIO2."] + #[doc = "Bit 20 - Output enable register for GPIO20."] #[inline(always)] - pub fn reg_gpio_2_oe(&self) -> REG_GPIO_2_OE_R { - REG_GPIO_2_OE_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn reg_gpio_20_oe(&self) -> REG_GPIO_20_OE_R { + REG_GPIO_20_OE_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bit 1 - Output enable register for GPIO1."] + #[doc = "Bit 21 - Output enable register for GPIO21."] #[inline(always)] - pub fn reg_gpio_1_oe(&self) -> REG_GPIO_1_OE_R { - REG_GPIO_1_OE_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn reg_gpio_21_oe(&self) -> REG_GPIO_21_OE_R { + REG_GPIO_21_OE_R::new(((self.bits >> 21) & 1) != 0) } - #[doc = "Bit 0 - Output enable register for GPIO0."] + #[doc = "Bit 22 - Output enable register for GPIO22."] #[inline(always)] - pub fn reg_gpio_0_oe(&self) -> REG_GPIO_0_OE_R { - REG_GPIO_0_OE_R::new((self.bits & 0x01) != 0) + pub fn reg_gpio_22_oe(&self) -> REG_GPIO_22_OE_R { + REG_GPIO_22_OE_R::new(((self.bits >> 22) & 1) != 0) } } impl W { - #[doc = "Bit 22 - Output enable register for GPIO22."] + #[doc = "Bit 0 - Output enable register for GPIO0."] #[inline(always)] - pub fn reg_gpio_22_oe(&mut self) -> REG_GPIO_22_OE_W { - REG_GPIO_22_OE_W { w: self } + #[must_use] + pub fn reg_gpio_0_oe(&mut self) -> REG_GPIO_0_OE_W<0> { + REG_GPIO_0_OE_W::new(self) } - #[doc = "Bit 21 - Output enable register for GPIO21."] + #[doc = "Bit 1 - Output enable register for GPIO1."] #[inline(always)] - pub fn reg_gpio_21_oe(&mut self) -> REG_GPIO_21_OE_W { - REG_GPIO_21_OE_W { w: self } + #[must_use] + pub fn reg_gpio_1_oe(&mut self) -> REG_GPIO_1_OE_W<1> { + REG_GPIO_1_OE_W::new(self) } - #[doc = "Bit 20 - Output enable register for GPIO20."] + #[doc = "Bit 2 - Output enable register for GPIO2."] #[inline(always)] - pub fn reg_gpio_20_oe(&mut self) -> REG_GPIO_20_OE_W { - REG_GPIO_20_OE_W { w: self } + #[must_use] + pub fn reg_gpio_2_oe(&mut self) -> REG_GPIO_2_OE_W<2> { + REG_GPIO_2_OE_W::new(self) } - #[doc = "Bit 19 - Output enable register for GPIO19."] + #[doc = "Bit 3 - Output enable register for GPIO3."] #[inline(always)] - pub fn reg_gpio_19_oe(&mut self) -> REG_GPIO_19_OE_W { - REG_GPIO_19_OE_W { w: self } + #[must_use] + pub fn reg_gpio_3_oe(&mut self) -> REG_GPIO_3_OE_W<3> { + REG_GPIO_3_OE_W::new(self) } - #[doc = "Bit 18 - Output enable register for GPIO18."] + #[doc = "Bit 4 - Output enable register for GPIO4."] #[inline(always)] - pub fn reg_gpio_18_oe(&mut self) -> REG_GPIO_18_OE_W { - REG_GPIO_18_OE_W { w: self } + #[must_use] + pub fn reg_gpio_4_oe(&mut self) -> REG_GPIO_4_OE_W<4> { + REG_GPIO_4_OE_W::new(self) } - #[doc = "Bit 17 - Output enable register for GPIO17."] + #[doc = "Bit 5 - Output enable register for GPIO5."] #[inline(always)] - pub fn reg_gpio_17_oe(&mut self) -> REG_GPIO_17_OE_W { - REG_GPIO_17_OE_W { w: self } + #[must_use] + pub fn reg_gpio_5_oe(&mut self) -> REG_GPIO_5_OE_W<5> { + REG_GPIO_5_OE_W::new(self) } - #[doc = "Bit 16 - Output enable register for GPIO16."] + #[doc = "Bit 6 - Output enable register for GPIO6."] #[inline(always)] - pub fn reg_gpio_16_oe(&mut self) -> REG_GPIO_16_OE_W { - REG_GPIO_16_OE_W { w: self } + #[must_use] + pub fn reg_gpio_6_oe(&mut self) -> REG_GPIO_6_OE_W<6> { + REG_GPIO_6_OE_W::new(self) } - #[doc = "Bit 15 - Output enable register for GPIO15."] + #[doc = "Bit 7 - Output enable register for GPIO7."] #[inline(always)] - pub fn reg_gpio_15_oe(&mut self) -> REG_GPIO_15_OE_W { - REG_GPIO_15_OE_W { w: self } + #[must_use] + pub fn reg_gpio_7_oe(&mut self) -> REG_GPIO_7_OE_W<7> { + REG_GPIO_7_OE_W::new(self) } - #[doc = "Bit 14 - Output enable register for GPIO14."] + #[doc = "Bit 8 - Output enable register for GPIO8."] #[inline(always)] - pub fn reg_gpio_14_oe(&mut self) -> REG_GPIO_14_OE_W { - REG_GPIO_14_OE_W { w: self } + #[must_use] + pub fn reg_gpio_8_oe(&mut self) -> REG_GPIO_8_OE_W<8> { + REG_GPIO_8_OE_W::new(self) } - #[doc = "Bit 13 - Output enable register for GPIO13."] + #[doc = "Bit 9 - Output enable register for GPIO9."] #[inline(always)] - pub fn reg_gpio_13_oe(&mut self) -> REG_GPIO_13_OE_W { - REG_GPIO_13_OE_W { w: self } + #[must_use] + pub fn reg_gpio_9_oe(&mut self) -> REG_GPIO_9_OE_W<9> { + REG_GPIO_9_OE_W::new(self) } - #[doc = "Bit 12 - Output enable register for GPIO12."] + #[doc = "Bit 10 - Output enable register for GPIO10."] #[inline(always)] - pub fn reg_gpio_12_oe(&mut self) -> REG_GPIO_12_OE_W { - REG_GPIO_12_OE_W { w: self } + #[must_use] + pub fn reg_gpio_10_oe(&mut self) -> REG_GPIO_10_OE_W<10> { + REG_GPIO_10_OE_W::new(self) } #[doc = "Bit 11 - Output enable register for GPIO11."] #[inline(always)] - pub fn reg_gpio_11_oe(&mut self) -> REG_GPIO_11_OE_W { - REG_GPIO_11_OE_W { w: self } + #[must_use] + pub fn reg_gpio_11_oe(&mut self) -> REG_GPIO_11_OE_W<11> { + REG_GPIO_11_OE_W::new(self) } - #[doc = "Bit 10 - Output enable register for GPIO10."] + #[doc = "Bit 12 - Output enable register for GPIO12."] #[inline(always)] - pub fn reg_gpio_10_oe(&mut self) -> REG_GPIO_10_OE_W { - REG_GPIO_10_OE_W { w: self } + #[must_use] + pub fn reg_gpio_12_oe(&mut self) -> REG_GPIO_12_OE_W<12> { + REG_GPIO_12_OE_W::new(self) } - #[doc = "Bit 9 - Output enable register for GPIO9."] + #[doc = "Bit 13 - Output enable register for GPIO13."] #[inline(always)] - pub fn reg_gpio_9_oe(&mut self) -> REG_GPIO_9_OE_W { - REG_GPIO_9_OE_W { w: self } + #[must_use] + pub fn reg_gpio_13_oe(&mut self) -> REG_GPIO_13_OE_W<13> { + REG_GPIO_13_OE_W::new(self) } - #[doc = "Bit 8 - Output enable register for GPIO8."] + #[doc = "Bit 14 - Output enable register for GPIO14."] #[inline(always)] - pub fn reg_gpio_8_oe(&mut self) -> REG_GPIO_8_OE_W { - REG_GPIO_8_OE_W { w: self } + #[must_use] + pub fn reg_gpio_14_oe(&mut self) -> REG_GPIO_14_OE_W<14> { + REG_GPIO_14_OE_W::new(self) } - #[doc = "Bit 7 - Output enable register for GPIO7."] + #[doc = "Bit 15 - Output enable register for GPIO15."] #[inline(always)] - pub fn reg_gpio_7_oe(&mut self) -> REG_GPIO_7_OE_W { - REG_GPIO_7_OE_W { w: self } + #[must_use] + pub fn reg_gpio_15_oe(&mut self) -> REG_GPIO_15_OE_W<15> { + REG_GPIO_15_OE_W::new(self) } - #[doc = "Bit 6 - Output enable register for GPIO6."] + #[doc = "Bit 16 - Output enable register for GPIO16."] #[inline(always)] - pub fn reg_gpio_6_oe(&mut self) -> REG_GPIO_6_OE_W { - REG_GPIO_6_OE_W { w: self } + #[must_use] + pub fn reg_gpio_16_oe(&mut self) -> REG_GPIO_16_OE_W<16> { + REG_GPIO_16_OE_W::new(self) } - #[doc = "Bit 5 - Output enable register for GPIO5."] + #[doc = "Bit 17 - Output enable register for GPIO17."] #[inline(always)] - pub fn reg_gpio_5_oe(&mut self) -> REG_GPIO_5_OE_W { - REG_GPIO_5_OE_W { w: self } + #[must_use] + pub fn reg_gpio_17_oe(&mut self) -> REG_GPIO_17_OE_W<17> { + REG_GPIO_17_OE_W::new(self) } - #[doc = "Bit 4 - Output enable register for GPIO4."] + #[doc = "Bit 18 - Output enable register for GPIO18."] #[inline(always)] - pub fn reg_gpio_4_oe(&mut self) -> REG_GPIO_4_OE_W { - REG_GPIO_4_OE_W { w: self } + #[must_use] + pub fn reg_gpio_18_oe(&mut self) -> REG_GPIO_18_OE_W<18> { + REG_GPIO_18_OE_W::new(self) } - #[doc = "Bit 3 - Output enable register for GPIO3."] + #[doc = "Bit 19 - Output enable register for GPIO19."] #[inline(always)] - pub fn reg_gpio_3_oe(&mut self) -> REG_GPIO_3_OE_W { - REG_GPIO_3_OE_W { w: self } + #[must_use] + pub fn reg_gpio_19_oe(&mut self) -> REG_GPIO_19_OE_W<19> { + REG_GPIO_19_OE_W::new(self) } - #[doc = "Bit 2 - Output enable register for GPIO2."] + #[doc = "Bit 20 - Output enable register for GPIO20."] #[inline(always)] - pub fn reg_gpio_2_oe(&mut self) -> REG_GPIO_2_OE_W { - REG_GPIO_2_OE_W { w: self } + #[must_use] + pub fn reg_gpio_20_oe(&mut self) -> REG_GPIO_20_OE_W<20> { + REG_GPIO_20_OE_W::new(self) } - #[doc = "Bit 1 - Output enable register for GPIO1."] + #[doc = "Bit 21 - Output enable register for GPIO21."] #[inline(always)] - pub fn reg_gpio_1_oe(&mut self) -> REG_GPIO_1_OE_W { - REG_GPIO_1_OE_W { w: self } + #[must_use] + pub fn reg_gpio_21_oe(&mut self) -> REG_GPIO_21_OE_W<21> { + REG_GPIO_21_OE_W::new(self) } - #[doc = "Bit 0 - Output enable register for GPIO0."] + #[doc = "Bit 22 - Output enable register for GPIO22."] #[inline(always)] - pub fn reg_gpio_0_oe(&mut self) -> REG_GPIO_0_OE_W { - REG_GPIO_0_OE_W { w: self } + #[must_use] + pub fn reg_gpio_22_oe(&mut self) -> REG_GPIO_22_OE_W<22> { + REG_GPIO_22_OE_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -2192,11 +1482,10 @@ impl crate::Readable for GPIO_CFGCTL34_SPEC { #[doc = "`write(|w| ..)` method takes [gpio_cfgctl34::W](W) writer structure"] impl crate::Writable for GPIO_CFGCTL34_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets GPIO_CFGCTL34 to value 0"] impl crate::Resettable for GPIO_CFGCTL34_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/gpio_cfgctl35.rs b/src/glb/gpio_cfgctl35.rs index c4b36b6..1dee7c0 100644 --- a/src/glb/gpio_cfgctl35.rs +++ b/src/glb/gpio_cfgctl35.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,13 +28,15 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } impl W { #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -51,11 +54,10 @@ impl crate::Readable for GPIO_CFGCTL35_SPEC { #[doc = "`write(|w| ..)` method takes [gpio_cfgctl35::W](W) writer structure"] impl crate::Writable for GPIO_CFGCTL35_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets GPIO_CFGCTL35 to value 0"] impl crate::Resettable for GPIO_CFGCTL35_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/gpio_cfgctl4.rs b/src/glb/gpio_cfgctl4.rs index 05e1288..c78c449 100644 --- a/src/glb/gpio_cfgctl4.rs +++ b/src/glb/gpio_cfgctl4.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,575 +28,275 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Function select for GPIO9.\n\nValue on reset: 11"] -#[derive(Clone, Copy, Debug, PartialEq)] -#[repr(u8)] -pub enum REG_GPIO_9_FUNC_SEL_A { - #[doc = "4: `100`"] - SPI_MOSI_SPI_MISO = 4, - #[doc = "6: `110`"] - I2C_SDA = 6, - #[doc = "7: `111`"] - UART_SIG1 = 7, - #[doc = "8: `1000`"] - PWM_CH4 = 8, - #[doc = "9: `1001`"] - FEM_GPIO_1 = 9, - #[doc = "10: `1010`"] - GPIP_CH6_GPIP_CH7 = 10, - #[doc = "11: `1011`"] - SWGPIO_9 = 11, - #[doc = "14: `1110`"] - E21_TDI = 14, -} -impl From for u8 { - #[inline(always)] - fn from(variant: REG_GPIO_9_FUNC_SEL_A) -> Self { - variant as _ - } -} -#[doc = "Field `reg_gpio_9_func_sel` reader - Function select for GPIO9."] -pub struct REG_GPIO_9_FUNC_SEL_R(crate::FieldReader); -impl REG_GPIO_9_FUNC_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_9_FUNC_SEL_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 4 => Some(REG_GPIO_9_FUNC_SEL_A::SPI_MOSI_SPI_MISO), - 6 => Some(REG_GPIO_9_FUNC_SEL_A::I2C_SDA), - 7 => Some(REG_GPIO_9_FUNC_SEL_A::UART_SIG1), - 8 => Some(REG_GPIO_9_FUNC_SEL_A::PWM_CH4), - 9 => Some(REG_GPIO_9_FUNC_SEL_A::FEM_GPIO_1), - 10 => Some(REG_GPIO_9_FUNC_SEL_A::GPIP_CH6_GPIP_CH7), - 11 => Some(REG_GPIO_9_FUNC_SEL_A::SWGPIO_9), - 14 => Some(REG_GPIO_9_FUNC_SEL_A::E21_TDI), - _ => None, - } - } - #[doc = "Checks if the value of the field is `SPI_MOSI_SPI_MISO`"] - #[inline(always)] - pub fn is_spi_mosi_spi_miso(&self) -> bool { - **self == REG_GPIO_9_FUNC_SEL_A::SPI_MOSI_SPI_MISO - } - #[doc = "Checks if the value of the field is `I2C_SDA`"] - #[inline(always)] - pub fn is_i2c_sda(&self) -> bool { - **self == REG_GPIO_9_FUNC_SEL_A::I2C_SDA - } - #[doc = "Checks if the value of the field is `UART_SIG1`"] - #[inline(always)] - pub fn is_uart_sig1(&self) -> bool { - **self == REG_GPIO_9_FUNC_SEL_A::UART_SIG1 - } - #[doc = "Checks if the value of the field is `PWM_CH4`"] - #[inline(always)] - pub fn is_pwm_ch4(&self) -> bool { - **self == REG_GPIO_9_FUNC_SEL_A::PWM_CH4 - } - #[doc = "Checks if the value of the field is `FEM_GPIO_1`"] - #[inline(always)] - pub fn is_fem_gpio_1(&self) -> bool { - **self == REG_GPIO_9_FUNC_SEL_A::FEM_GPIO_1 - } - #[doc = "Checks if the value of the field is `GPIP_CH6_GPIP_CH7`"] - #[inline(always)] - pub fn is_gpip_ch6_gpip_ch7(&self) -> bool { - **self == REG_GPIO_9_FUNC_SEL_A::GPIP_CH6_GPIP_CH7 - } - #[doc = "Checks if the value of the field is `SWGPIO_9`"] - #[inline(always)] - pub fn is_swgpio_9(&self) -> bool { - **self == REG_GPIO_9_FUNC_SEL_A::SWGPIO_9 - } - #[doc = "Checks if the value of the field is `E21_TDI`"] - #[inline(always)] - pub fn is_e21_tdi(&self) -> bool { - **self == REG_GPIO_9_FUNC_SEL_A::E21_TDI - } -} -impl core::ops::Deref for REG_GPIO_9_FUNC_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_9_func_sel` writer - Function select for GPIO9."] -pub struct REG_GPIO_9_FUNC_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_9_FUNC_SEL_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_9_FUNC_SEL_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } - #[doc = "`100`"] - #[inline(always)] - pub fn spi_mosi_spi_miso(self) -> &'a mut W { - self.variant(REG_GPIO_9_FUNC_SEL_A::SPI_MOSI_SPI_MISO) - } - #[doc = "`110`"] - #[inline(always)] - pub fn i2c_sda(self) -> &'a mut W { - self.variant(REG_GPIO_9_FUNC_SEL_A::I2C_SDA) - } - #[doc = "`111`"] - #[inline(always)] - pub fn uart_sig1(self) -> &'a mut W { - self.variant(REG_GPIO_9_FUNC_SEL_A::UART_SIG1) - } - #[doc = "`1000`"] - #[inline(always)] - pub fn pwm_ch4(self) -> &'a mut W { - self.variant(REG_GPIO_9_FUNC_SEL_A::PWM_CH4) - } - #[doc = "`1001`"] - #[inline(always)] - pub fn fem_gpio_1(self) -> &'a mut W { - self.variant(REG_GPIO_9_FUNC_SEL_A::FEM_GPIO_1) - } - #[doc = "`1010`"] - #[inline(always)] - pub fn gpip_ch6_gpip_ch7(self) -> &'a mut W { - self.variant(REG_GPIO_9_FUNC_SEL_A::GPIP_CH6_GPIP_CH7) - } - #[doc = "`1011`"] - #[inline(always)] - pub fn swgpio_9(self) -> &'a mut W { - self.variant(REG_GPIO_9_FUNC_SEL_A::SWGPIO_9) - } - #[doc = "`1110`"] - #[inline(always)] - pub fn e21_tdi(self) -> &'a mut W { - self.variant(REG_GPIO_9_FUNC_SEL_A::E21_TDI) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 24)) | ((value as u32 & 0x0f) << 24); - self.w - } -} -#[doc = "Pull Down Resistor for GPIO9.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_9_PD_A { +#[doc = "Field `reg_gpio_8_ie` reader - Input enable for GPIO8."] +pub type REG_GPIO_8_IE_R = crate::BitReader; +#[doc = "Input enable for GPIO8.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO8INPUT_ENABLED_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_9_PD_A) -> Self { + fn from(variant: GPIO8INPUT_ENABLED_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_9_pd` reader - Pull Down Resistor for GPIO9."] -pub struct REG_GPIO_9_PD_R(crate::FieldReader); -impl REG_GPIO_9_PD_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_9_PD_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_8_IE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_9_PD_A { + pub fn variant(&self) -> GPIO8INPUT_ENABLED_A { match self.bits { - false => REG_GPIO_9_PD_A::DISABLED, - true => REG_GPIO_9_PD_A::ENABLED, + false => GPIO8INPUT_ENABLED_A::DISABLED, + true => GPIO8INPUT_ENABLED_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_9_PD_A::DISABLED + *self == GPIO8INPUT_ENABLED_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_9_PD_A::ENABLED + *self == GPIO8INPUT_ENABLED_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_9_PD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_9_pd` writer - Pull Down Resistor for GPIO9."] -pub struct REG_GPIO_9_PD_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_9_PD_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_9_PD_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_8_ie` writer - Input enable for GPIO8."] +pub type REG_GPIO_8_IE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL4_SPEC, GPIO8INPUT_ENABLED_A, O>; +impl<'a, const O: u8> REG_GPIO_8_IE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_9_PD_A::DISABLED) + self.variant(GPIO8INPUT_ENABLED_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_9_PD_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); - self.w + self.variant(GPIO8INPUT_ENABLED_A::ENABLED) } } -#[doc = "Pull Up Resistor for GPIO9.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_9_PU_A { +#[doc = "Field `reg_gpio_8_smt` reader - Schmitt trigger enabled for GPIO8."] +pub type REG_GPIO_8_SMT_R = crate::BitReader; +#[doc = "Schmitt trigger enabled for GPIO8.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO8SCHMITT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_9_PU_A) -> Self { + fn from(variant: GPIO8SCHMITT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_9_pu` reader - Pull Up Resistor for GPIO9."] -pub struct REG_GPIO_9_PU_R(crate::FieldReader); -impl REG_GPIO_9_PU_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_9_PU_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_8_SMT_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_9_PU_A { + pub fn variant(&self) -> GPIO8SCHMITT_A { match self.bits { - false => REG_GPIO_9_PU_A::DISABLED, - true => REG_GPIO_9_PU_A::ENABLED, + false => GPIO8SCHMITT_A::DISABLED, + true => GPIO8SCHMITT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_9_PU_A::DISABLED + *self == GPIO8SCHMITT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_9_PU_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_9_PU_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO8SCHMITT_A::ENABLED } } -#[doc = "Field `reg_gpio_9_pu` writer - Pull Up Resistor for GPIO9."] -pub struct REG_GPIO_9_PU_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_9_PU_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_9_PU_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_8_smt` writer - Schmitt trigger enabled for GPIO8."] +pub type REG_GPIO_8_SMT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL4_SPEC, GPIO8SCHMITT_A, O>; +impl<'a, const O: u8> REG_GPIO_8_SMT_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_9_PU_A::DISABLED) + self.variant(GPIO8SCHMITT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_9_PU_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w + self.variant(GPIO8SCHMITT_A::ENABLED) } } -#[doc = "Driving control enabled for GPIO9.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[doc = "Field `reg_gpio_8_drv` reader - Driving control enabled for GPIO8."] +pub type REG_GPIO_8_DRV_R = crate::FieldReader; +#[doc = "Driving control enabled for GPIO8.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_9_DRV_A { +pub enum GPIO8DRIVING_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_9_DRV_A) -> Self { + fn from(variant: GPIO8DRIVING_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_9_drv` reader - Driving control enabled for GPIO9."] -pub struct REG_GPIO_9_DRV_R(crate::FieldReader); -impl REG_GPIO_9_DRV_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_9_DRV_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_8_DRV_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 0 => Some(REG_GPIO_9_DRV_A::DISABLED), - 1 => Some(REG_GPIO_9_DRV_A::ENABLED), + 0 => Some(GPIO8DRIVING_A::DISABLED), + 1 => Some(GPIO8DRIVING_A::ENABLED), _ => None, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_9_DRV_A::DISABLED + *self == GPIO8DRIVING_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_9_DRV_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_9_DRV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO8DRIVING_A::ENABLED } } -#[doc = "Field `reg_gpio_9_drv` writer - Driving control enabled for GPIO9."] -pub struct REG_GPIO_9_DRV_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_9_DRV_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_9_DRV_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +#[doc = "Field `reg_gpio_8_drv` writer - Driving control enabled for GPIO8."] +pub type REG_GPIO_8_DRV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL4_SPEC, u8, GPIO8DRIVING_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_8_DRV_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_9_DRV_A::DISABLED) + self.variant(GPIO8DRIVING_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_9_DRV_A::ENABLED) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 18)) | ((value as u32 & 0x03) << 18); - self.w + self.variant(GPIO8DRIVING_A::ENABLED) } } -#[doc = "Schmitt trigger enabled for GPIO9.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_9_SMT_A { +#[doc = "Field `reg_gpio_8_pu` reader - Pull Up Resistor for GPIO8."] +pub type REG_GPIO_8_PU_R = crate::BitReader; +#[doc = "Pull Up Resistor for GPIO8.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO8PULL_UP_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_9_SMT_A) -> Self { + fn from(variant: GPIO8PULL_UP_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_9_smt` reader - Schmitt trigger enabled for GPIO9."] -pub struct REG_GPIO_9_SMT_R(crate::FieldReader); -impl REG_GPIO_9_SMT_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_9_SMT_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_8_PU_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_9_SMT_A { + pub fn variant(&self) -> GPIO8PULL_UP_RESISTOR_A { match self.bits { - false => REG_GPIO_9_SMT_A::DISABLED, - true => REG_GPIO_9_SMT_A::ENABLED, + false => GPIO8PULL_UP_RESISTOR_A::DISABLED, + true => GPIO8PULL_UP_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_9_SMT_A::DISABLED + *self == GPIO8PULL_UP_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_9_SMT_A::ENABLED + *self == GPIO8PULL_UP_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_9_SMT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_9_smt` writer - Schmitt trigger enabled for GPIO9."] -pub struct REG_GPIO_9_SMT_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_9_SMT_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_9_SMT_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_8_pu` writer - Pull Up Resistor for GPIO8."] +pub type REG_GPIO_8_PU_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL4_SPEC, GPIO8PULL_UP_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_8_PU_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_9_SMT_A::DISABLED) + self.variant(GPIO8PULL_UP_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_9_SMT_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w + self.variant(GPIO8PULL_UP_RESISTOR_A::ENABLED) } } -#[doc = "Input enable for GPIO9.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_9_IE_A { +#[doc = "Field `reg_gpio_8_pd` reader - Pull Down Resistor for GPIO8."] +pub type REG_GPIO_8_PD_R = crate::BitReader; +#[doc = "Pull Down Resistor for GPIO8.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO8PULL_DOWN_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_9_IE_A) -> Self { + fn from(variant: GPIO8PULL_DOWN_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_9_ie` reader - Input enable for GPIO9."] -pub struct REG_GPIO_9_IE_R(crate::FieldReader); -impl REG_GPIO_9_IE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_9_IE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_8_PD_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_9_IE_A { + pub fn variant(&self) -> GPIO8PULL_DOWN_RESISTOR_A { match self.bits { - false => REG_GPIO_9_IE_A::DISABLED, - true => REG_GPIO_9_IE_A::ENABLED, + false => GPIO8PULL_DOWN_RESISTOR_A::DISABLED, + true => GPIO8PULL_DOWN_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_9_IE_A::DISABLED + *self == GPIO8PULL_DOWN_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_9_IE_A::ENABLED + *self == GPIO8PULL_DOWN_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_9_IE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_9_ie` writer - Input enable for GPIO9."] -pub struct REG_GPIO_9_IE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_9_IE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_9_IE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_8_pd` writer - Pull Down Resistor for GPIO8."] +pub type REG_GPIO_8_PD_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL4_SPEC, GPIO8PULL_DOWN_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_8_PD_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_9_IE_A::DISABLED) + self.variant(GPIO8PULL_DOWN_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_9_IE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w + self.variant(GPIO8PULL_DOWN_RESISTOR_A::ENABLED) } } +#[doc = "Field `reg_gpio_8_func_sel` reader - Function select for GPIO8."] +pub type REG_GPIO_8_FUNC_SEL_R = crate::FieldReader; #[doc = "Function select for GPIO8.\n\nValue on reset: 11"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_8_FUNC_SEL_A { +pub enum GPIO8FUNCTION_SELECT_A { #[doc = "4: `100`"] SPI_MISO_SPI_MOSI = 4, #[doc = "6: `110`"] @@ -611,658 +312,628 @@ pub enum REG_GPIO_8_FUNC_SEL_A { #[doc = "14: `1110`"] E21_TMS = 14, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_8_FUNC_SEL_A) -> Self { + fn from(variant: GPIO8FUNCTION_SELECT_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_8_func_sel` reader - Function select for GPIO8."] -pub struct REG_GPIO_8_FUNC_SEL_R(crate::FieldReader); impl REG_GPIO_8_FUNC_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_8_FUNC_SEL_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 4 => Some(REG_GPIO_8_FUNC_SEL_A::SPI_MISO_SPI_MOSI), - 6 => Some(REG_GPIO_8_FUNC_SEL_A::I2C_SCL), - 7 => Some(REG_GPIO_8_FUNC_SEL_A::UART_SIG0), - 8 => Some(REG_GPIO_8_FUNC_SEL_A::PWM_CH3), - 9 => Some(REG_GPIO_8_FUNC_SEL_A::FEM_GPIO_0), - 11 => Some(REG_GPIO_8_FUNC_SEL_A::SWGPIO_8), - 14 => Some(REG_GPIO_8_FUNC_SEL_A::E21_TMS), + 4 => Some(GPIO8FUNCTION_SELECT_A::SPI_MISO_SPI_MOSI), + 6 => Some(GPIO8FUNCTION_SELECT_A::I2C_SCL), + 7 => Some(GPIO8FUNCTION_SELECT_A::UART_SIG0), + 8 => Some(GPIO8FUNCTION_SELECT_A::PWM_CH3), + 9 => Some(GPIO8FUNCTION_SELECT_A::FEM_GPIO_0), + 11 => Some(GPIO8FUNCTION_SELECT_A::SWGPIO_8), + 14 => Some(GPIO8FUNCTION_SELECT_A::E21_TMS), _ => None, } } #[doc = "Checks if the value of the field is `SPI_MISO_SPI_MOSI`"] #[inline(always)] pub fn is_spi_miso_spi_mosi(&self) -> bool { - **self == REG_GPIO_8_FUNC_SEL_A::SPI_MISO_SPI_MOSI + *self == GPIO8FUNCTION_SELECT_A::SPI_MISO_SPI_MOSI } #[doc = "Checks if the value of the field is `I2C_SCL`"] #[inline(always)] pub fn is_i2c_scl(&self) -> bool { - **self == REG_GPIO_8_FUNC_SEL_A::I2C_SCL + *self == GPIO8FUNCTION_SELECT_A::I2C_SCL } #[doc = "Checks if the value of the field is `UART_SIG0`"] #[inline(always)] pub fn is_uart_sig0(&self) -> bool { - **self == REG_GPIO_8_FUNC_SEL_A::UART_SIG0 + *self == GPIO8FUNCTION_SELECT_A::UART_SIG0 } #[doc = "Checks if the value of the field is `PWM_CH3`"] #[inline(always)] pub fn is_pwm_ch3(&self) -> bool { - **self == REG_GPIO_8_FUNC_SEL_A::PWM_CH3 + *self == GPIO8FUNCTION_SELECT_A::PWM_CH3 } #[doc = "Checks if the value of the field is `FEM_GPIO_0`"] #[inline(always)] pub fn is_fem_gpio_0(&self) -> bool { - **self == REG_GPIO_8_FUNC_SEL_A::FEM_GPIO_0 + *self == GPIO8FUNCTION_SELECT_A::FEM_GPIO_0 } #[doc = "Checks if the value of the field is `SWGPIO_8`"] #[inline(always)] pub fn is_swgpio_8(&self) -> bool { - **self == REG_GPIO_8_FUNC_SEL_A::SWGPIO_8 + *self == GPIO8FUNCTION_SELECT_A::SWGPIO_8 } #[doc = "Checks if the value of the field is `E21_TMS`"] #[inline(always)] pub fn is_e21_tms(&self) -> bool { - **self == REG_GPIO_8_FUNC_SEL_A::E21_TMS - } -} -impl core::ops::Deref for REG_GPIO_8_FUNC_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO8FUNCTION_SELECT_A::E21_TMS } } #[doc = "Field `reg_gpio_8_func_sel` writer - Function select for GPIO8."] -pub struct REG_GPIO_8_FUNC_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_8_FUNC_SEL_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_8_FUNC_SEL_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +pub type REG_GPIO_8_FUNC_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL4_SPEC, u8, GPIO8FUNCTION_SELECT_A, 4, O>; +impl<'a, const O: u8> REG_GPIO_8_FUNC_SEL_W<'a, O> { #[doc = "`100`"] #[inline(always)] pub fn spi_miso_spi_mosi(self) -> &'a mut W { - self.variant(REG_GPIO_8_FUNC_SEL_A::SPI_MISO_SPI_MOSI) + self.variant(GPIO8FUNCTION_SELECT_A::SPI_MISO_SPI_MOSI) } #[doc = "`110`"] #[inline(always)] pub fn i2c_scl(self) -> &'a mut W { - self.variant(REG_GPIO_8_FUNC_SEL_A::I2C_SCL) + self.variant(GPIO8FUNCTION_SELECT_A::I2C_SCL) } #[doc = "`111`"] #[inline(always)] pub fn uart_sig0(self) -> &'a mut W { - self.variant(REG_GPIO_8_FUNC_SEL_A::UART_SIG0) + self.variant(GPIO8FUNCTION_SELECT_A::UART_SIG0) } #[doc = "`1000`"] #[inline(always)] pub fn pwm_ch3(self) -> &'a mut W { - self.variant(REG_GPIO_8_FUNC_SEL_A::PWM_CH3) + self.variant(GPIO8FUNCTION_SELECT_A::PWM_CH3) } #[doc = "`1001`"] #[inline(always)] pub fn fem_gpio_0(self) -> &'a mut W { - self.variant(REG_GPIO_8_FUNC_SEL_A::FEM_GPIO_0) + self.variant(GPIO8FUNCTION_SELECT_A::FEM_GPIO_0) } #[doc = "`1011`"] #[inline(always)] pub fn swgpio_8(self) -> &'a mut W { - self.variant(REG_GPIO_8_FUNC_SEL_A::SWGPIO_8) + self.variant(GPIO8FUNCTION_SELECT_A::SWGPIO_8) } #[doc = "`1110`"] #[inline(always)] pub fn e21_tms(self) -> &'a mut W { - self.variant(REG_GPIO_8_FUNC_SEL_A::E21_TMS) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 8)) | ((value as u32 & 0x0f) << 8); - self.w + self.variant(GPIO8FUNCTION_SELECT_A::E21_TMS) } } -#[doc = "Pull Down Resistor for GPIO8.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_8_PD_A { +#[doc = "Field `reg_gpio_9_ie` reader - Input enable for GPIO9."] +pub type REG_GPIO_9_IE_R = crate::BitReader; +#[doc = "Input enable for GPIO9.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO9INPUT_ENABLED_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_8_PD_A) -> Self { + fn from(variant: GPIO9INPUT_ENABLED_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_8_pd` reader - Pull Down Resistor for GPIO8."] -pub struct REG_GPIO_8_PD_R(crate::FieldReader); -impl REG_GPIO_8_PD_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_8_PD_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_9_IE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_8_PD_A { + pub fn variant(&self) -> GPIO9INPUT_ENABLED_A { match self.bits { - false => REG_GPIO_8_PD_A::DISABLED, - true => REG_GPIO_8_PD_A::ENABLED, + false => GPIO9INPUT_ENABLED_A::DISABLED, + true => GPIO9INPUT_ENABLED_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_8_PD_A::DISABLED + *self == GPIO9INPUT_ENABLED_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_8_PD_A::ENABLED + *self == GPIO9INPUT_ENABLED_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_8_PD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_8_pd` writer - Pull Down Resistor for GPIO8."] -pub struct REG_GPIO_8_PD_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_8_PD_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_8_PD_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_9_ie` writer - Input enable for GPIO9."] +pub type REG_GPIO_9_IE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL4_SPEC, GPIO9INPUT_ENABLED_A, O>; +impl<'a, const O: u8> REG_GPIO_9_IE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_8_PD_A::DISABLED) + self.variant(GPIO9INPUT_ENABLED_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_8_PD_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w + self.variant(GPIO9INPUT_ENABLED_A::ENABLED) } } -#[doc = "Pull Up Resistor for GPIO8.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_8_PU_A { +#[doc = "Field `reg_gpio_9_smt` reader - Schmitt trigger enabled for GPIO9."] +pub type REG_GPIO_9_SMT_R = crate::BitReader; +#[doc = "Schmitt trigger enabled for GPIO9.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO9SCHMITT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_8_PU_A) -> Self { + fn from(variant: GPIO9SCHMITT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_8_pu` reader - Pull Up Resistor for GPIO8."] -pub struct REG_GPIO_8_PU_R(crate::FieldReader); -impl REG_GPIO_8_PU_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_8_PU_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_9_SMT_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_8_PU_A { + pub fn variant(&self) -> GPIO9SCHMITT_A { match self.bits { - false => REG_GPIO_8_PU_A::DISABLED, - true => REG_GPIO_8_PU_A::ENABLED, + false => GPIO9SCHMITT_A::DISABLED, + true => GPIO9SCHMITT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_8_PU_A::DISABLED + *self == GPIO9SCHMITT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_8_PU_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_8_PU_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO9SCHMITT_A::ENABLED } } -#[doc = "Field `reg_gpio_8_pu` writer - Pull Up Resistor for GPIO8."] -pub struct REG_GPIO_8_PU_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_8_PU_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_8_PU_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_9_smt` writer - Schmitt trigger enabled for GPIO9."] +pub type REG_GPIO_9_SMT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL4_SPEC, GPIO9SCHMITT_A, O>; +impl<'a, const O: u8> REG_GPIO_9_SMT_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_8_PU_A::DISABLED) + self.variant(GPIO9SCHMITT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_8_PU_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w + self.variant(GPIO9SCHMITT_A::ENABLED) } } -#[doc = "Driving control enabled for GPIO8.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[doc = "Field `reg_gpio_9_drv` reader - Driving control enabled for GPIO9."] +pub type REG_GPIO_9_DRV_R = crate::FieldReader; +#[doc = "Driving control enabled for GPIO9.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_8_DRV_A { +pub enum GPIO9DRIVING_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_8_DRV_A) -> Self { + fn from(variant: GPIO9DRIVING_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_8_drv` reader - Driving control enabled for GPIO8."] -pub struct REG_GPIO_8_DRV_R(crate::FieldReader); -impl REG_GPIO_8_DRV_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_8_DRV_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_9_DRV_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 0 => Some(REG_GPIO_8_DRV_A::DISABLED), - 1 => Some(REG_GPIO_8_DRV_A::ENABLED), + 0 => Some(GPIO9DRIVING_A::DISABLED), + 1 => Some(GPIO9DRIVING_A::ENABLED), _ => None, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_8_DRV_A::DISABLED + *self == GPIO9DRIVING_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_8_DRV_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_8_DRV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO9DRIVING_A::ENABLED } } -#[doc = "Field `reg_gpio_8_drv` writer - Driving control enabled for GPIO8."] -pub struct REG_GPIO_8_DRV_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_8_DRV_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_8_DRV_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +#[doc = "Field `reg_gpio_9_drv` writer - Driving control enabled for GPIO9."] +pub type REG_GPIO_9_DRV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL4_SPEC, u8, GPIO9DRIVING_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_9_DRV_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_8_DRV_A::DISABLED) + self.variant(GPIO9DRIVING_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_8_DRV_A::ENABLED) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 2)) | ((value as u32 & 0x03) << 2); - self.w + self.variant(GPIO9DRIVING_A::ENABLED) } } -#[doc = "Schmitt trigger enabled for GPIO8.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_8_SMT_A { +#[doc = "Field `reg_gpio_9_pu` reader - Pull Up Resistor for GPIO9."] +pub type REG_GPIO_9_PU_R = crate::BitReader; +#[doc = "Pull Up Resistor for GPIO9.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO9PULL_UP_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_8_SMT_A) -> Self { + fn from(variant: GPIO9PULL_UP_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_8_smt` reader - Schmitt trigger enabled for GPIO8."] -pub struct REG_GPIO_8_SMT_R(crate::FieldReader); -impl REG_GPIO_8_SMT_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_8_SMT_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_9_PU_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_8_SMT_A { + pub fn variant(&self) -> GPIO9PULL_UP_RESISTOR_A { match self.bits { - false => REG_GPIO_8_SMT_A::DISABLED, - true => REG_GPIO_8_SMT_A::ENABLED, + false => GPIO9PULL_UP_RESISTOR_A::DISABLED, + true => GPIO9PULL_UP_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_8_SMT_A::DISABLED + *self == GPIO9PULL_UP_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_8_SMT_A::ENABLED + *self == GPIO9PULL_UP_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_8_SMT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_8_smt` writer - Schmitt trigger enabled for GPIO8."] -pub struct REG_GPIO_8_SMT_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_8_SMT_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_8_SMT_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_9_pu` writer - Pull Up Resistor for GPIO9."] +pub type REG_GPIO_9_PU_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL4_SPEC, GPIO9PULL_UP_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_9_PU_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_8_SMT_A::DISABLED) + self.variant(GPIO9PULL_UP_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_8_SMT_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w + self.variant(GPIO9PULL_UP_RESISTOR_A::ENABLED) } } -#[doc = "Input enable for GPIO8.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_8_IE_A { +#[doc = "Field `reg_gpio_9_pd` reader - Pull Down Resistor for GPIO9."] +pub type REG_GPIO_9_PD_R = crate::BitReader; +#[doc = "Pull Down Resistor for GPIO9.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO9PULL_DOWN_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_8_IE_A) -> Self { + fn from(variant: GPIO9PULL_DOWN_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_8_ie` reader - Input enable for GPIO8."] -pub struct REG_GPIO_8_IE_R(crate::FieldReader); -impl REG_GPIO_8_IE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_8_IE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_9_PD_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_8_IE_A { + pub fn variant(&self) -> GPIO9PULL_DOWN_RESISTOR_A { match self.bits { - false => REG_GPIO_8_IE_A::DISABLED, - true => REG_GPIO_8_IE_A::ENABLED, + false => GPIO9PULL_DOWN_RESISTOR_A::DISABLED, + true => GPIO9PULL_DOWN_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_8_IE_A::DISABLED + *self == GPIO9PULL_DOWN_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_8_IE_A::ENABLED + *self == GPIO9PULL_DOWN_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_8_IE_R { - type Target = crate::FieldReader; +#[doc = "Field `reg_gpio_9_pd` writer - Pull Down Resistor for GPIO9."] +pub type REG_GPIO_9_PD_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL4_SPEC, GPIO9PULL_DOWN_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_9_PD_W<'a, O> { + #[doc = "`0`"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn disabled(self) -> &'a mut W { + self.variant(GPIO9PULL_DOWN_RESISTOR_A::DISABLED) + } + #[doc = "`1`"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(GPIO9PULL_DOWN_RESISTOR_A::ENABLED) } } -#[doc = "Field `reg_gpio_8_ie` writer - Input enable for GPIO8."] -pub struct REG_GPIO_8_IE_W<'a> { - w: &'a mut W, +#[doc = "Field `reg_gpio_9_func_sel` reader - Function select for GPIO9."] +pub type REG_GPIO_9_FUNC_SEL_R = crate::FieldReader; +#[doc = "Function select for GPIO9.\n\nValue on reset: 11"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum GPIO9FUNCTION_SELECT_A { + #[doc = "4: `100`"] + SPI_MOSI_SPI_MISO = 4, + #[doc = "6: `110`"] + I2C_SDA = 6, + #[doc = "7: `111`"] + UART_SIG1 = 7, + #[doc = "8: `1000`"] + PWM_CH4 = 8, + #[doc = "9: `1001`"] + FEM_GPIO_1 = 9, + #[doc = "10: `1010`"] + GPIP_CH6_GPIP_CH7 = 10, + #[doc = "11: `1011`"] + SWGPIO_9 = 11, + #[doc = "14: `1110`"] + E21_TDI = 14, } -impl<'a> REG_GPIO_8_IE_W<'a> { - #[doc = r"Writes `variant` to the field"] +impl From for u8 { #[inline(always)] - pub fn variant(self, variant: REG_GPIO_8_IE_A) -> &'a mut W { - self.bit(variant.into()) + fn from(variant: GPIO9FUNCTION_SELECT_A) -> Self { + variant as _ } - #[doc = "`0`"] +} +impl REG_GPIO_9_FUNC_SEL_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_8_IE_A::DISABLED) + pub fn variant(&self) -> Option { + match self.bits { + 4 => Some(GPIO9FUNCTION_SELECT_A::SPI_MOSI_SPI_MISO), + 6 => Some(GPIO9FUNCTION_SELECT_A::I2C_SDA), + 7 => Some(GPIO9FUNCTION_SELECT_A::UART_SIG1), + 8 => Some(GPIO9FUNCTION_SELECT_A::PWM_CH4), + 9 => Some(GPIO9FUNCTION_SELECT_A::FEM_GPIO_1), + 10 => Some(GPIO9FUNCTION_SELECT_A::GPIP_CH6_GPIP_CH7), + 11 => Some(GPIO9FUNCTION_SELECT_A::SWGPIO_9), + 14 => Some(GPIO9FUNCTION_SELECT_A::E21_TDI), + _ => None, + } } - #[doc = "`1`"] + #[doc = "Checks if the value of the field is `SPI_MOSI_SPI_MISO`"] #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_8_IE_A::ENABLED) + pub fn is_spi_mosi_spi_miso(&self) -> bool { + *self == GPIO9FUNCTION_SELECT_A::SPI_MOSI_SPI_MISO + } + #[doc = "Checks if the value of the field is `I2C_SDA`"] + #[inline(always)] + pub fn is_i2c_sda(&self) -> bool { + *self == GPIO9FUNCTION_SELECT_A::I2C_SDA + } + #[doc = "Checks if the value of the field is `UART_SIG1`"] + #[inline(always)] + pub fn is_uart_sig1(&self) -> bool { + *self == GPIO9FUNCTION_SELECT_A::UART_SIG1 + } + #[doc = "Checks if the value of the field is `PWM_CH4`"] + #[inline(always)] + pub fn is_pwm_ch4(&self) -> bool { + *self == GPIO9FUNCTION_SELECT_A::PWM_CH4 + } + #[doc = "Checks if the value of the field is `FEM_GPIO_1`"] + #[inline(always)] + pub fn is_fem_gpio_1(&self) -> bool { + *self == GPIO9FUNCTION_SELECT_A::FEM_GPIO_1 } - #[doc = r"Sets the field bit"] + #[doc = "Checks if the value of the field is `GPIP_CH6_GPIP_CH7`"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn is_gpip_ch6_gpip_ch7(&self) -> bool { + *self == GPIO9FUNCTION_SELECT_A::GPIP_CH6_GPIP_CH7 } - #[doc = r"Clears the field bit"] + #[doc = "Checks if the value of the field is `SWGPIO_9`"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn is_swgpio_9(&self) -> bool { + *self == GPIO9FUNCTION_SELECT_A::SWGPIO_9 } - #[doc = r"Writes raw bits to the field"] + #[doc = "Checks if the value of the field is `E21_TDI`"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn is_e21_tdi(&self) -> bool { + *self == GPIO9FUNCTION_SELECT_A::E21_TDI } } -impl R { - #[doc = "Bits 24:27 - Function select for GPIO9."] +#[doc = "Field `reg_gpio_9_func_sel` writer - Function select for GPIO9."] +pub type REG_GPIO_9_FUNC_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL4_SPEC, u8, GPIO9FUNCTION_SELECT_A, 4, O>; +impl<'a, const O: u8> REG_GPIO_9_FUNC_SEL_W<'a, O> { + #[doc = "`100`"] #[inline(always)] - pub fn reg_gpio_9_func_sel(&self) -> REG_GPIO_9_FUNC_SEL_R { - REG_GPIO_9_FUNC_SEL_R::new(((self.bits >> 24) & 0x0f) as u8) + pub fn spi_mosi_spi_miso(self) -> &'a mut W { + self.variant(GPIO9FUNCTION_SELECT_A::SPI_MOSI_SPI_MISO) } - #[doc = "Bit 21 - Pull Down Resistor for GPIO9."] + #[doc = "`110`"] #[inline(always)] - pub fn reg_gpio_9_pd(&self) -> REG_GPIO_9_PD_R { - REG_GPIO_9_PD_R::new(((self.bits >> 21) & 0x01) != 0) + pub fn i2c_sda(self) -> &'a mut W { + self.variant(GPIO9FUNCTION_SELECT_A::I2C_SDA) } - #[doc = "Bit 20 - Pull Up Resistor for GPIO9."] + #[doc = "`111`"] #[inline(always)] - pub fn reg_gpio_9_pu(&self) -> REG_GPIO_9_PU_R { - REG_GPIO_9_PU_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn uart_sig1(self) -> &'a mut W { + self.variant(GPIO9FUNCTION_SELECT_A::UART_SIG1) } - #[doc = "Bits 18:19 - Driving control enabled for GPIO9."] + #[doc = "`1000`"] #[inline(always)] - pub fn reg_gpio_9_drv(&self) -> REG_GPIO_9_DRV_R { - REG_GPIO_9_DRV_R::new(((self.bits >> 18) & 0x03) as u8) + pub fn pwm_ch4(self) -> &'a mut W { + self.variant(GPIO9FUNCTION_SELECT_A::PWM_CH4) } - #[doc = "Bit 17 - Schmitt trigger enabled for GPIO9."] + #[doc = "`1001`"] #[inline(always)] - pub fn reg_gpio_9_smt(&self) -> REG_GPIO_9_SMT_R { - REG_GPIO_9_SMT_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn fem_gpio_1(self) -> &'a mut W { + self.variant(GPIO9FUNCTION_SELECT_A::FEM_GPIO_1) } - #[doc = "Bit 16 - Input enable for GPIO9."] + #[doc = "`1010`"] #[inline(always)] - pub fn reg_gpio_9_ie(&self) -> REG_GPIO_9_IE_R { - REG_GPIO_9_IE_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn gpip_ch6_gpip_ch7(self) -> &'a mut W { + self.variant(GPIO9FUNCTION_SELECT_A::GPIP_CH6_GPIP_CH7) + } + #[doc = "`1011`"] + #[inline(always)] + pub fn swgpio_9(self) -> &'a mut W { + self.variant(GPIO9FUNCTION_SELECT_A::SWGPIO_9) + } + #[doc = "`1110`"] + #[inline(always)] + pub fn e21_tdi(self) -> &'a mut W { + self.variant(GPIO9FUNCTION_SELECT_A::E21_TDI) + } +} +impl R { + #[doc = "Bit 0 - Input enable for GPIO8."] + #[inline(always)] + pub fn reg_gpio_8_ie(&self) -> REG_GPIO_8_IE_R { + REG_GPIO_8_IE_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Schmitt trigger enabled for GPIO8."] + #[inline(always)] + pub fn reg_gpio_8_smt(&self) -> REG_GPIO_8_SMT_R { + REG_GPIO_8_SMT_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bits 2:3 - Driving control enabled for GPIO8."] + #[inline(always)] + pub fn reg_gpio_8_drv(&self) -> REG_GPIO_8_DRV_R { + REG_GPIO_8_DRV_R::new(((self.bits >> 2) & 3) as u8) + } + #[doc = "Bit 4 - Pull Up Resistor for GPIO8."] + #[inline(always)] + pub fn reg_gpio_8_pu(&self) -> REG_GPIO_8_PU_R { + REG_GPIO_8_PU_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Pull Down Resistor for GPIO8."] + #[inline(always)] + pub fn reg_gpio_8_pd(&self) -> REG_GPIO_8_PD_R { + REG_GPIO_8_PD_R::new(((self.bits >> 5) & 1) != 0) } #[doc = "Bits 8:11 - Function select for GPIO8."] #[inline(always)] pub fn reg_gpio_8_func_sel(&self) -> REG_GPIO_8_FUNC_SEL_R { REG_GPIO_8_FUNC_SEL_R::new(((self.bits >> 8) & 0x0f) as u8) } - #[doc = "Bit 5 - Pull Down Resistor for GPIO8."] + #[doc = "Bit 16 - Input enable for GPIO9."] #[inline(always)] - pub fn reg_gpio_8_pd(&self) -> REG_GPIO_8_PD_R { - REG_GPIO_8_PD_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn reg_gpio_9_ie(&self) -> REG_GPIO_9_IE_R { + REG_GPIO_9_IE_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 4 - Pull Up Resistor for GPIO8."] + #[doc = "Bit 17 - Schmitt trigger enabled for GPIO9."] #[inline(always)] - pub fn reg_gpio_8_pu(&self) -> REG_GPIO_8_PU_R { - REG_GPIO_8_PU_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn reg_gpio_9_smt(&self) -> REG_GPIO_9_SMT_R { + REG_GPIO_9_SMT_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bits 2:3 - Driving control enabled for GPIO8."] + #[doc = "Bits 18:19 - Driving control enabled for GPIO9."] #[inline(always)] - pub fn reg_gpio_8_drv(&self) -> REG_GPIO_8_DRV_R { - REG_GPIO_8_DRV_R::new(((self.bits >> 2) & 0x03) as u8) + pub fn reg_gpio_9_drv(&self) -> REG_GPIO_9_DRV_R { + REG_GPIO_9_DRV_R::new(((self.bits >> 18) & 3) as u8) } - #[doc = "Bit 1 - Schmitt trigger enabled for GPIO8."] + #[doc = "Bit 20 - Pull Up Resistor for GPIO9."] #[inline(always)] - pub fn reg_gpio_8_smt(&self) -> REG_GPIO_8_SMT_R { - REG_GPIO_8_SMT_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn reg_gpio_9_pu(&self) -> REG_GPIO_9_PU_R { + REG_GPIO_9_PU_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bit 0 - Input enable for GPIO8."] + #[doc = "Bit 21 - Pull Down Resistor for GPIO9."] #[inline(always)] - pub fn reg_gpio_8_ie(&self) -> REG_GPIO_8_IE_R { - REG_GPIO_8_IE_R::new((self.bits & 0x01) != 0) + pub fn reg_gpio_9_pd(&self) -> REG_GPIO_9_PD_R { + REG_GPIO_9_PD_R::new(((self.bits >> 21) & 1) != 0) } -} -impl W { #[doc = "Bits 24:27 - Function select for GPIO9."] #[inline(always)] - pub fn reg_gpio_9_func_sel(&mut self) -> REG_GPIO_9_FUNC_SEL_W { - REG_GPIO_9_FUNC_SEL_W { w: self } + pub fn reg_gpio_9_func_sel(&self) -> REG_GPIO_9_FUNC_SEL_R { + REG_GPIO_9_FUNC_SEL_R::new(((self.bits >> 24) & 0x0f) as u8) } - #[doc = "Bit 21 - Pull Down Resistor for GPIO9."] +} +impl W { + #[doc = "Bit 0 - Input enable for GPIO8."] #[inline(always)] - pub fn reg_gpio_9_pd(&mut self) -> REG_GPIO_9_PD_W { - REG_GPIO_9_PD_W { w: self } + #[must_use] + pub fn reg_gpio_8_ie(&mut self) -> REG_GPIO_8_IE_W<0> { + REG_GPIO_8_IE_W::new(self) } - #[doc = "Bit 20 - Pull Up Resistor for GPIO9."] + #[doc = "Bit 1 - Schmitt trigger enabled for GPIO8."] #[inline(always)] - pub fn reg_gpio_9_pu(&mut self) -> REG_GPIO_9_PU_W { - REG_GPIO_9_PU_W { w: self } + #[must_use] + pub fn reg_gpio_8_smt(&mut self) -> REG_GPIO_8_SMT_W<1> { + REG_GPIO_8_SMT_W::new(self) } - #[doc = "Bits 18:19 - Driving control enabled for GPIO9."] + #[doc = "Bits 2:3 - Driving control enabled for GPIO8."] #[inline(always)] - pub fn reg_gpio_9_drv(&mut self) -> REG_GPIO_9_DRV_W { - REG_GPIO_9_DRV_W { w: self } + #[must_use] + pub fn reg_gpio_8_drv(&mut self) -> REG_GPIO_8_DRV_W<2> { + REG_GPIO_8_DRV_W::new(self) } - #[doc = "Bit 17 - Schmitt trigger enabled for GPIO9."] + #[doc = "Bit 4 - Pull Up Resistor for GPIO8."] #[inline(always)] - pub fn reg_gpio_9_smt(&mut self) -> REG_GPIO_9_SMT_W { - REG_GPIO_9_SMT_W { w: self } + #[must_use] + pub fn reg_gpio_8_pu(&mut self) -> REG_GPIO_8_PU_W<4> { + REG_GPIO_8_PU_W::new(self) } - #[doc = "Bit 16 - Input enable for GPIO9."] + #[doc = "Bit 5 - Pull Down Resistor for GPIO8."] #[inline(always)] - pub fn reg_gpio_9_ie(&mut self) -> REG_GPIO_9_IE_W { - REG_GPIO_9_IE_W { w: self } + #[must_use] + pub fn reg_gpio_8_pd(&mut self) -> REG_GPIO_8_PD_W<5> { + REG_GPIO_8_PD_W::new(self) } #[doc = "Bits 8:11 - Function select for GPIO8."] #[inline(always)] - pub fn reg_gpio_8_func_sel(&mut self) -> REG_GPIO_8_FUNC_SEL_W { - REG_GPIO_8_FUNC_SEL_W { w: self } + #[must_use] + pub fn reg_gpio_8_func_sel(&mut self) -> REG_GPIO_8_FUNC_SEL_W<8> { + REG_GPIO_8_FUNC_SEL_W::new(self) } - #[doc = "Bit 5 - Pull Down Resistor for GPIO8."] + #[doc = "Bit 16 - Input enable for GPIO9."] #[inline(always)] - pub fn reg_gpio_8_pd(&mut self) -> REG_GPIO_8_PD_W { - REG_GPIO_8_PD_W { w: self } + #[must_use] + pub fn reg_gpio_9_ie(&mut self) -> REG_GPIO_9_IE_W<16> { + REG_GPIO_9_IE_W::new(self) } - #[doc = "Bit 4 - Pull Up Resistor for GPIO8."] + #[doc = "Bit 17 - Schmitt trigger enabled for GPIO9."] #[inline(always)] - pub fn reg_gpio_8_pu(&mut self) -> REG_GPIO_8_PU_W { - REG_GPIO_8_PU_W { w: self } + #[must_use] + pub fn reg_gpio_9_smt(&mut self) -> REG_GPIO_9_SMT_W<17> { + REG_GPIO_9_SMT_W::new(self) } - #[doc = "Bits 2:3 - Driving control enabled for GPIO8."] + #[doc = "Bits 18:19 - Driving control enabled for GPIO9."] #[inline(always)] - pub fn reg_gpio_8_drv(&mut self) -> REG_GPIO_8_DRV_W { - REG_GPIO_8_DRV_W { w: self } + #[must_use] + pub fn reg_gpio_9_drv(&mut self) -> REG_GPIO_9_DRV_W<18> { + REG_GPIO_9_DRV_W::new(self) } - #[doc = "Bit 1 - Schmitt trigger enabled for GPIO8."] + #[doc = "Bit 20 - Pull Up Resistor for GPIO9."] #[inline(always)] - pub fn reg_gpio_8_smt(&mut self) -> REG_GPIO_8_SMT_W { - REG_GPIO_8_SMT_W { w: self } + #[must_use] + pub fn reg_gpio_9_pu(&mut self) -> REG_GPIO_9_PU_W<20> { + REG_GPIO_9_PU_W::new(self) } - #[doc = "Bit 0 - Input enable for GPIO8."] + #[doc = "Bit 21 - Pull Down Resistor for GPIO9."] + #[inline(always)] + #[must_use] + pub fn reg_gpio_9_pd(&mut self) -> REG_GPIO_9_PD_W<21> { + REG_GPIO_9_PD_W::new(self) + } + #[doc = "Bits 24:27 - Function select for GPIO9."] #[inline(always)] - pub fn reg_gpio_8_ie(&mut self) -> REG_GPIO_8_IE_W { - REG_GPIO_8_IE_W { w: self } + #[must_use] + pub fn reg_gpio_9_func_sel(&mut self) -> REG_GPIO_9_FUNC_SEL_W<24> { + REG_GPIO_9_FUNC_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -1280,11 +951,10 @@ impl crate::Readable for GPIO_CFGCTL4_SPEC { #[doc = "`write(|w| ..)` method takes [gpio_cfgctl4::W](W) writer structure"] impl crate::Writable for GPIO_CFGCTL4_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets GPIO_CFGCTL4 to value 0x0b03_0b03"] impl crate::Resettable for GPIO_CFGCTL4_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0b03_0b03 - } + const RESET_VALUE: Self::Ux = 0x0b03_0b03; } diff --git a/src/glb/gpio_cfgctl5.rs b/src/glb/gpio_cfgctl5.rs index b8b6227..b989dce 100644 --- a/src/glb/gpio_cfgctl5.rs +++ b/src/glb/gpio_cfgctl5.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,575 +28,275 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Function select for GPIO11.\n\nValue on reset: 14"] -#[derive(Clone, Copy, Debug, PartialEq)] -#[repr(u8)] -pub enum REG_GPIO_11_FUNC_SEL_A { - #[doc = "4: `100`"] - SPI_SCLK = 4, - #[doc = "6: `110`"] - I2C_SDA = 6, - #[doc = "7: `111`"] - UART_SIG3 = 7, - #[doc = "8: `1000`"] - PWM_CH1 = 8, - #[doc = "9: `1001`"] - FEM_GPIO_3 = 9, - #[doc = "10: `1010`"] - IRLED_OUT_GPIP_CH10 = 10, - #[doc = "11: `1011`"] - SWGPIO_11 = 11, - #[doc = "14: `1110`"] - E21_TDO = 14, -} -impl From for u8 { - #[inline(always)] - fn from(variant: REG_GPIO_11_FUNC_SEL_A) -> Self { - variant as _ - } -} -#[doc = "Field `reg_gpio_11_func_sel` reader - Function select for GPIO11."] -pub struct REG_GPIO_11_FUNC_SEL_R(crate::FieldReader); -impl REG_GPIO_11_FUNC_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_11_FUNC_SEL_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 4 => Some(REG_GPIO_11_FUNC_SEL_A::SPI_SCLK), - 6 => Some(REG_GPIO_11_FUNC_SEL_A::I2C_SDA), - 7 => Some(REG_GPIO_11_FUNC_SEL_A::UART_SIG3), - 8 => Some(REG_GPIO_11_FUNC_SEL_A::PWM_CH1), - 9 => Some(REG_GPIO_11_FUNC_SEL_A::FEM_GPIO_3), - 10 => Some(REG_GPIO_11_FUNC_SEL_A::IRLED_OUT_GPIP_CH10), - 11 => Some(REG_GPIO_11_FUNC_SEL_A::SWGPIO_11), - 14 => Some(REG_GPIO_11_FUNC_SEL_A::E21_TDO), - _ => None, - } - } - #[doc = "Checks if the value of the field is `SPI_SCLK`"] - #[inline(always)] - pub fn is_spi_sclk(&self) -> bool { - **self == REG_GPIO_11_FUNC_SEL_A::SPI_SCLK - } - #[doc = "Checks if the value of the field is `I2C_SDA`"] - #[inline(always)] - pub fn is_i2c_sda(&self) -> bool { - **self == REG_GPIO_11_FUNC_SEL_A::I2C_SDA - } - #[doc = "Checks if the value of the field is `UART_SIG3`"] - #[inline(always)] - pub fn is_uart_sig3(&self) -> bool { - **self == REG_GPIO_11_FUNC_SEL_A::UART_SIG3 - } - #[doc = "Checks if the value of the field is `PWM_CH1`"] - #[inline(always)] - pub fn is_pwm_ch1(&self) -> bool { - **self == REG_GPIO_11_FUNC_SEL_A::PWM_CH1 - } - #[doc = "Checks if the value of the field is `FEM_GPIO_3`"] - #[inline(always)] - pub fn is_fem_gpio_3(&self) -> bool { - **self == REG_GPIO_11_FUNC_SEL_A::FEM_GPIO_3 - } - #[doc = "Checks if the value of the field is `IRLED_OUT_GPIP_CH10`"] - #[inline(always)] - pub fn is_irled_out_gpip_ch10(&self) -> bool { - **self == REG_GPIO_11_FUNC_SEL_A::IRLED_OUT_GPIP_CH10 - } - #[doc = "Checks if the value of the field is `SWGPIO_11`"] - #[inline(always)] - pub fn is_swgpio_11(&self) -> bool { - **self == REG_GPIO_11_FUNC_SEL_A::SWGPIO_11 - } - #[doc = "Checks if the value of the field is `E21_TDO`"] - #[inline(always)] - pub fn is_e21_tdo(&self) -> bool { - **self == REG_GPIO_11_FUNC_SEL_A::E21_TDO - } -} -impl core::ops::Deref for REG_GPIO_11_FUNC_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_11_func_sel` writer - Function select for GPIO11."] -pub struct REG_GPIO_11_FUNC_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_11_FUNC_SEL_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_11_FUNC_SEL_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } - #[doc = "`100`"] - #[inline(always)] - pub fn spi_sclk(self) -> &'a mut W { - self.variant(REG_GPIO_11_FUNC_SEL_A::SPI_SCLK) - } - #[doc = "`110`"] - #[inline(always)] - pub fn i2c_sda(self) -> &'a mut W { - self.variant(REG_GPIO_11_FUNC_SEL_A::I2C_SDA) - } - #[doc = "`111`"] - #[inline(always)] - pub fn uart_sig3(self) -> &'a mut W { - self.variant(REG_GPIO_11_FUNC_SEL_A::UART_SIG3) - } - #[doc = "`1000`"] - #[inline(always)] - pub fn pwm_ch1(self) -> &'a mut W { - self.variant(REG_GPIO_11_FUNC_SEL_A::PWM_CH1) - } - #[doc = "`1001`"] - #[inline(always)] - pub fn fem_gpio_3(self) -> &'a mut W { - self.variant(REG_GPIO_11_FUNC_SEL_A::FEM_GPIO_3) - } - #[doc = "`1010`"] - #[inline(always)] - pub fn irled_out_gpip_ch10(self) -> &'a mut W { - self.variant(REG_GPIO_11_FUNC_SEL_A::IRLED_OUT_GPIP_CH10) - } - #[doc = "`1011`"] - #[inline(always)] - pub fn swgpio_11(self) -> &'a mut W { - self.variant(REG_GPIO_11_FUNC_SEL_A::SWGPIO_11) - } - #[doc = "`1110`"] - #[inline(always)] - pub fn e21_tdo(self) -> &'a mut W { - self.variant(REG_GPIO_11_FUNC_SEL_A::E21_TDO) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 24)) | ((value as u32 & 0x0f) << 24); - self.w - } -} -#[doc = "Pull Down Resistor for GPIO11.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_11_PD_A { +#[doc = "Field `reg_gpio_10_ie` reader - Input enable for GPIO10."] +pub type REG_GPIO_10_IE_R = crate::BitReader; +#[doc = "Input enable for GPIO10.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO10INPUT_ENABLED_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_11_PD_A) -> Self { + fn from(variant: GPIO10INPUT_ENABLED_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_11_pd` reader - Pull Down Resistor for GPIO11."] -pub struct REG_GPIO_11_PD_R(crate::FieldReader); -impl REG_GPIO_11_PD_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_11_PD_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_10_IE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_11_PD_A { + pub fn variant(&self) -> GPIO10INPUT_ENABLED_A { match self.bits { - false => REG_GPIO_11_PD_A::DISABLED, - true => REG_GPIO_11_PD_A::ENABLED, + false => GPIO10INPUT_ENABLED_A::DISABLED, + true => GPIO10INPUT_ENABLED_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_11_PD_A::DISABLED + *self == GPIO10INPUT_ENABLED_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_11_PD_A::ENABLED + *self == GPIO10INPUT_ENABLED_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_11_PD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_11_pd` writer - Pull Down Resistor for GPIO11."] -pub struct REG_GPIO_11_PD_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_11_PD_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_11_PD_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_10_ie` writer - Input enable for GPIO10."] +pub type REG_GPIO_10_IE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL5_SPEC, GPIO10INPUT_ENABLED_A, O>; +impl<'a, const O: u8> REG_GPIO_10_IE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_11_PD_A::DISABLED) + self.variant(GPIO10INPUT_ENABLED_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_11_PD_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); - self.w + self.variant(GPIO10INPUT_ENABLED_A::ENABLED) } } -#[doc = "Pull Up Resistor for GPIO11.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_11_PU_A { +#[doc = "Field `reg_gpio_10_smt` reader - Schmitt trigger enabled for GPIO10."] +pub type REG_GPIO_10_SMT_R = crate::BitReader; +#[doc = "Schmitt trigger enabled for GPIO10.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO10SCHMITT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_11_PU_A) -> Self { + fn from(variant: GPIO10SCHMITT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_11_pu` reader - Pull Up Resistor for GPIO11."] -pub struct REG_GPIO_11_PU_R(crate::FieldReader); -impl REG_GPIO_11_PU_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_11_PU_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_10_SMT_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_11_PU_A { + pub fn variant(&self) -> GPIO10SCHMITT_A { match self.bits { - false => REG_GPIO_11_PU_A::DISABLED, - true => REG_GPIO_11_PU_A::ENABLED, + false => GPIO10SCHMITT_A::DISABLED, + true => GPIO10SCHMITT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_11_PU_A::DISABLED + *self == GPIO10SCHMITT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_11_PU_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_11_PU_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO10SCHMITT_A::ENABLED } } -#[doc = "Field `reg_gpio_11_pu` writer - Pull Up Resistor for GPIO11."] -pub struct REG_GPIO_11_PU_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_11_PU_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_11_PU_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_10_smt` writer - Schmitt trigger enabled for GPIO10."] +pub type REG_GPIO_10_SMT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL5_SPEC, GPIO10SCHMITT_A, O>; +impl<'a, const O: u8> REG_GPIO_10_SMT_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_11_PU_A::DISABLED) + self.variant(GPIO10SCHMITT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_11_PU_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w + self.variant(GPIO10SCHMITT_A::ENABLED) } } -#[doc = "Driving control enabled for GPIO11.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[doc = "Field `reg_gpio_10_drv` reader - Driving control enabled for GPIO10."] +pub type REG_GPIO_10_DRV_R = crate::FieldReader; +#[doc = "Driving control enabled for GPIO10.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_11_DRV_A { +pub enum GPIO10DRIVING_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_11_DRV_A) -> Self { + fn from(variant: GPIO10DRIVING_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_11_drv` reader - Driving control enabled for GPIO11."] -pub struct REG_GPIO_11_DRV_R(crate::FieldReader); -impl REG_GPIO_11_DRV_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_11_DRV_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_10_DRV_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 0 => Some(REG_GPIO_11_DRV_A::DISABLED), - 1 => Some(REG_GPIO_11_DRV_A::ENABLED), + 0 => Some(GPIO10DRIVING_A::DISABLED), + 1 => Some(GPIO10DRIVING_A::ENABLED), _ => None, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_11_DRV_A::DISABLED + *self == GPIO10DRIVING_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_11_DRV_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_11_DRV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO10DRIVING_A::ENABLED } } -#[doc = "Field `reg_gpio_11_drv` writer - Driving control enabled for GPIO11."] -pub struct REG_GPIO_11_DRV_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_11_DRV_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_11_DRV_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +#[doc = "Field `reg_gpio_10_drv` writer - Driving control enabled for GPIO10."] +pub type REG_GPIO_10_DRV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL5_SPEC, u8, GPIO10DRIVING_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_10_DRV_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_11_DRV_A::DISABLED) + self.variant(GPIO10DRIVING_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_11_DRV_A::ENABLED) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 18)) | ((value as u32 & 0x03) << 18); - self.w + self.variant(GPIO10DRIVING_A::ENABLED) } } -#[doc = "Schmitt trigger enabled for GPIO11.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_11_SMT_A { +#[doc = "Field `reg_gpio_10_pu` reader - Pull Up Resistor for GPIO10."] +pub type REG_GPIO_10_PU_R = crate::BitReader; +#[doc = "Pull Up Resistor for GPIO10.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO10PULL_UP_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_11_SMT_A) -> Self { + fn from(variant: GPIO10PULL_UP_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_11_smt` reader - Schmitt trigger enabled for GPIO11."] -pub struct REG_GPIO_11_SMT_R(crate::FieldReader); -impl REG_GPIO_11_SMT_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_11_SMT_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_10_PU_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_11_SMT_A { + pub fn variant(&self) -> GPIO10PULL_UP_RESISTOR_A { match self.bits { - false => REG_GPIO_11_SMT_A::DISABLED, - true => REG_GPIO_11_SMT_A::ENABLED, + false => GPIO10PULL_UP_RESISTOR_A::DISABLED, + true => GPIO10PULL_UP_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_11_SMT_A::DISABLED + *self == GPIO10PULL_UP_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_11_SMT_A::ENABLED + *self == GPIO10PULL_UP_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_11_SMT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_11_smt` writer - Schmitt trigger enabled for GPIO11."] -pub struct REG_GPIO_11_SMT_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_11_SMT_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_11_SMT_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_10_pu` writer - Pull Up Resistor for GPIO10."] +pub type REG_GPIO_10_PU_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL5_SPEC, GPIO10PULL_UP_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_10_PU_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_11_SMT_A::DISABLED) + self.variant(GPIO10PULL_UP_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_11_SMT_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w + self.variant(GPIO10PULL_UP_RESISTOR_A::ENABLED) } } -#[doc = "Input enable for GPIO11.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_11_IE_A { +#[doc = "Field `reg_gpio_10_pd` reader - Pull Down Resistor for GPIO10."] +pub type REG_GPIO_10_PD_R = crate::BitReader; +#[doc = "Pull Down Resistor for GPIO10.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO10PULL_DOWN_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_11_IE_A) -> Self { + fn from(variant: GPIO10PULL_DOWN_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_11_ie` reader - Input enable for GPIO11."] -pub struct REG_GPIO_11_IE_R(crate::FieldReader); -impl REG_GPIO_11_IE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_11_IE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_10_PD_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_11_IE_A { + pub fn variant(&self) -> GPIO10PULL_DOWN_RESISTOR_A { match self.bits { - false => REG_GPIO_11_IE_A::DISABLED, - true => REG_GPIO_11_IE_A::ENABLED, + false => GPIO10PULL_DOWN_RESISTOR_A::DISABLED, + true => GPIO10PULL_DOWN_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_11_IE_A::DISABLED + *self == GPIO10PULL_DOWN_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_11_IE_A::ENABLED + *self == GPIO10PULL_DOWN_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_11_IE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_11_ie` writer - Input enable for GPIO11."] -pub struct REG_GPIO_11_IE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_11_IE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_11_IE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_10_pd` writer - Pull Down Resistor for GPIO10."] +pub type REG_GPIO_10_PD_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL5_SPEC, GPIO10PULL_DOWN_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_10_PD_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_11_IE_A::DISABLED) + self.variant(GPIO10PULL_DOWN_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_11_IE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w + self.variant(GPIO10PULL_DOWN_RESISTOR_A::ENABLED) } } +#[doc = "Field `reg_gpio_10_func_sel` reader - Function select for GPIO10."] +pub type REG_GPIO_10_FUNC_SEL_R = crate::FieldReader; #[doc = "Function select for GPIO10.\n\nValue on reset: 11"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_10_FUNC_SEL_A { +pub enum GPIO10FUNCTION_SELECT_A { #[doc = "4: `100`"] SPI_SS = 4, #[doc = "6: `110`"] @@ -613,669 +314,639 @@ pub enum REG_GPIO_10_FUNC_SEL_A { #[doc = "14: `1110`"] E21_TCK = 14, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_10_FUNC_SEL_A) -> Self { + fn from(variant: GPIO10FUNCTION_SELECT_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_10_func_sel` reader - Function select for GPIO10."] -pub struct REG_GPIO_10_FUNC_SEL_R(crate::FieldReader); impl REG_GPIO_10_FUNC_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_10_FUNC_SEL_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 4 => Some(REG_GPIO_10_FUNC_SEL_A::SPI_SS), - 6 => Some(REG_GPIO_10_FUNC_SEL_A::I2C_SCL), - 7 => Some(REG_GPIO_10_FUNC_SEL_A::UART_SIG2), - 8 => Some(REG_GPIO_10_FUNC_SEL_A::PWM_CH0), - 9 => Some(REG_GPIO_10_FUNC_SEL_A::FEM_GPIO_2), - 10 => Some(REG_GPIO_10_FUNC_SEL_A::MICBIAS_GPIP_CH8_GPIP_CH9), - 11 => Some(REG_GPIO_10_FUNC_SEL_A::SWGPIO_10), - 14 => Some(REG_GPIO_10_FUNC_SEL_A::E21_TCK), + 4 => Some(GPIO10FUNCTION_SELECT_A::SPI_SS), + 6 => Some(GPIO10FUNCTION_SELECT_A::I2C_SCL), + 7 => Some(GPIO10FUNCTION_SELECT_A::UART_SIG2), + 8 => Some(GPIO10FUNCTION_SELECT_A::PWM_CH0), + 9 => Some(GPIO10FUNCTION_SELECT_A::FEM_GPIO_2), + 10 => Some(GPIO10FUNCTION_SELECT_A::MICBIAS_GPIP_CH8_GPIP_CH9), + 11 => Some(GPIO10FUNCTION_SELECT_A::SWGPIO_10), + 14 => Some(GPIO10FUNCTION_SELECT_A::E21_TCK), _ => None, } } #[doc = "Checks if the value of the field is `SPI_SS`"] #[inline(always)] pub fn is_spi_ss(&self) -> bool { - **self == REG_GPIO_10_FUNC_SEL_A::SPI_SS + *self == GPIO10FUNCTION_SELECT_A::SPI_SS } #[doc = "Checks if the value of the field is `I2C_SCL`"] #[inline(always)] pub fn is_i2c_scl(&self) -> bool { - **self == REG_GPIO_10_FUNC_SEL_A::I2C_SCL + *self == GPIO10FUNCTION_SELECT_A::I2C_SCL } #[doc = "Checks if the value of the field is `UART_SIG2`"] #[inline(always)] pub fn is_uart_sig2(&self) -> bool { - **self == REG_GPIO_10_FUNC_SEL_A::UART_SIG2 + *self == GPIO10FUNCTION_SELECT_A::UART_SIG2 } #[doc = "Checks if the value of the field is `PWM_CH0`"] #[inline(always)] pub fn is_pwm_ch0(&self) -> bool { - **self == REG_GPIO_10_FUNC_SEL_A::PWM_CH0 + *self == GPIO10FUNCTION_SELECT_A::PWM_CH0 } #[doc = "Checks if the value of the field is `FEM_GPIO_2`"] #[inline(always)] pub fn is_fem_gpio_2(&self) -> bool { - **self == REG_GPIO_10_FUNC_SEL_A::FEM_GPIO_2 + *self == GPIO10FUNCTION_SELECT_A::FEM_GPIO_2 } #[doc = "Checks if the value of the field is `MICBIAS_GPIP_CH8_GPIP_CH9`"] #[inline(always)] pub fn is_micbias_gpip_ch8_gpip_ch9(&self) -> bool { - **self == REG_GPIO_10_FUNC_SEL_A::MICBIAS_GPIP_CH8_GPIP_CH9 + *self == GPIO10FUNCTION_SELECT_A::MICBIAS_GPIP_CH8_GPIP_CH9 } #[doc = "Checks if the value of the field is `SWGPIO_10`"] #[inline(always)] pub fn is_swgpio_10(&self) -> bool { - **self == REG_GPIO_10_FUNC_SEL_A::SWGPIO_10 + *self == GPIO10FUNCTION_SELECT_A::SWGPIO_10 } #[doc = "Checks if the value of the field is `E21_TCK`"] #[inline(always)] pub fn is_e21_tck(&self) -> bool { - **self == REG_GPIO_10_FUNC_SEL_A::E21_TCK - } -} -impl core::ops::Deref for REG_GPIO_10_FUNC_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO10FUNCTION_SELECT_A::E21_TCK } } #[doc = "Field `reg_gpio_10_func_sel` writer - Function select for GPIO10."] -pub struct REG_GPIO_10_FUNC_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_10_FUNC_SEL_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_10_FUNC_SEL_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +pub type REG_GPIO_10_FUNC_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL5_SPEC, u8, GPIO10FUNCTION_SELECT_A, 4, O>; +impl<'a, const O: u8> REG_GPIO_10_FUNC_SEL_W<'a, O> { #[doc = "`100`"] #[inline(always)] pub fn spi_ss(self) -> &'a mut W { - self.variant(REG_GPIO_10_FUNC_SEL_A::SPI_SS) + self.variant(GPIO10FUNCTION_SELECT_A::SPI_SS) } #[doc = "`110`"] #[inline(always)] pub fn i2c_scl(self) -> &'a mut W { - self.variant(REG_GPIO_10_FUNC_SEL_A::I2C_SCL) + self.variant(GPIO10FUNCTION_SELECT_A::I2C_SCL) } #[doc = "`111`"] #[inline(always)] pub fn uart_sig2(self) -> &'a mut W { - self.variant(REG_GPIO_10_FUNC_SEL_A::UART_SIG2) + self.variant(GPIO10FUNCTION_SELECT_A::UART_SIG2) } #[doc = "`1000`"] #[inline(always)] pub fn pwm_ch0(self) -> &'a mut W { - self.variant(REG_GPIO_10_FUNC_SEL_A::PWM_CH0) + self.variant(GPIO10FUNCTION_SELECT_A::PWM_CH0) } #[doc = "`1001`"] #[inline(always)] pub fn fem_gpio_2(self) -> &'a mut W { - self.variant(REG_GPIO_10_FUNC_SEL_A::FEM_GPIO_2) + self.variant(GPIO10FUNCTION_SELECT_A::FEM_GPIO_2) } #[doc = "`1010`"] #[inline(always)] pub fn micbias_gpip_ch8_gpip_ch9(self) -> &'a mut W { - self.variant(REG_GPIO_10_FUNC_SEL_A::MICBIAS_GPIP_CH8_GPIP_CH9) + self.variant(GPIO10FUNCTION_SELECT_A::MICBIAS_GPIP_CH8_GPIP_CH9) } #[doc = "`1011`"] #[inline(always)] pub fn swgpio_10(self) -> &'a mut W { - self.variant(REG_GPIO_10_FUNC_SEL_A::SWGPIO_10) + self.variant(GPIO10FUNCTION_SELECT_A::SWGPIO_10) } #[doc = "`1110`"] #[inline(always)] pub fn e21_tck(self) -> &'a mut W { - self.variant(REG_GPIO_10_FUNC_SEL_A::E21_TCK) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 8)) | ((value as u32 & 0x0f) << 8); - self.w + self.variant(GPIO10FUNCTION_SELECT_A::E21_TCK) } } -#[doc = "Pull Down Resistor for GPIO10.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_10_PD_A { +#[doc = "Field `reg_gpio_11_ie` reader - Input enable for GPIO11."] +pub type REG_GPIO_11_IE_R = crate::BitReader; +#[doc = "Input enable for GPIO11.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO11INPUT_ENABLED_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_10_PD_A) -> Self { + fn from(variant: GPIO11INPUT_ENABLED_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_10_pd` reader - Pull Down Resistor for GPIO10."] -pub struct REG_GPIO_10_PD_R(crate::FieldReader); -impl REG_GPIO_10_PD_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_10_PD_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_11_IE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_10_PD_A { + pub fn variant(&self) -> GPIO11INPUT_ENABLED_A { match self.bits { - false => REG_GPIO_10_PD_A::DISABLED, - true => REG_GPIO_10_PD_A::ENABLED, + false => GPIO11INPUT_ENABLED_A::DISABLED, + true => GPIO11INPUT_ENABLED_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_10_PD_A::DISABLED + *self == GPIO11INPUT_ENABLED_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_10_PD_A::ENABLED + *self == GPIO11INPUT_ENABLED_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_10_PD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_10_pd` writer - Pull Down Resistor for GPIO10."] -pub struct REG_GPIO_10_PD_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_10_PD_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_10_PD_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_11_ie` writer - Input enable for GPIO11."] +pub type REG_GPIO_11_IE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL5_SPEC, GPIO11INPUT_ENABLED_A, O>; +impl<'a, const O: u8> REG_GPIO_11_IE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_10_PD_A::DISABLED) + self.variant(GPIO11INPUT_ENABLED_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_10_PD_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w + self.variant(GPIO11INPUT_ENABLED_A::ENABLED) } } -#[doc = "Pull Up Resistor for GPIO10.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_10_PU_A { +#[doc = "Field `reg_gpio_11_smt` reader - Schmitt trigger enabled for GPIO11."] +pub type REG_GPIO_11_SMT_R = crate::BitReader; +#[doc = "Schmitt trigger enabled for GPIO11.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO11SCHMITT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_10_PU_A) -> Self { + fn from(variant: GPIO11SCHMITT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_10_pu` reader - Pull Up Resistor for GPIO10."] -pub struct REG_GPIO_10_PU_R(crate::FieldReader); -impl REG_GPIO_10_PU_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_10_PU_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_11_SMT_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_10_PU_A { + pub fn variant(&self) -> GPIO11SCHMITT_A { match self.bits { - false => REG_GPIO_10_PU_A::DISABLED, - true => REG_GPIO_10_PU_A::ENABLED, + false => GPIO11SCHMITT_A::DISABLED, + true => GPIO11SCHMITT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_10_PU_A::DISABLED + *self == GPIO11SCHMITT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_10_PU_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_10_PU_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO11SCHMITT_A::ENABLED } } -#[doc = "Field `reg_gpio_10_pu` writer - Pull Up Resistor for GPIO10."] -pub struct REG_GPIO_10_PU_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_10_PU_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_10_PU_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_11_smt` writer - Schmitt trigger enabled for GPIO11."] +pub type REG_GPIO_11_SMT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL5_SPEC, GPIO11SCHMITT_A, O>; +impl<'a, const O: u8> REG_GPIO_11_SMT_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_10_PU_A::DISABLED) + self.variant(GPIO11SCHMITT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_10_PU_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w + self.variant(GPIO11SCHMITT_A::ENABLED) } } -#[doc = "Driving control enabled for GPIO10.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[doc = "Field `reg_gpio_11_drv` reader - Driving control enabled for GPIO11."] +pub type REG_GPIO_11_DRV_R = crate::FieldReader; +#[doc = "Driving control enabled for GPIO11.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_10_DRV_A { +pub enum GPIO11DRIVING_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_10_DRV_A) -> Self { + fn from(variant: GPIO11DRIVING_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_10_drv` reader - Driving control enabled for GPIO10."] -pub struct REG_GPIO_10_DRV_R(crate::FieldReader); -impl REG_GPIO_10_DRV_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_10_DRV_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_11_DRV_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 0 => Some(REG_GPIO_10_DRV_A::DISABLED), - 1 => Some(REG_GPIO_10_DRV_A::ENABLED), + 0 => Some(GPIO11DRIVING_A::DISABLED), + 1 => Some(GPIO11DRIVING_A::ENABLED), _ => None, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_10_DRV_A::DISABLED + *self == GPIO11DRIVING_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_10_DRV_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_10_DRV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO11DRIVING_A::ENABLED } } -#[doc = "Field `reg_gpio_10_drv` writer - Driving control enabled for GPIO10."] -pub struct REG_GPIO_10_DRV_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_10_DRV_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_10_DRV_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +#[doc = "Field `reg_gpio_11_drv` writer - Driving control enabled for GPIO11."] +pub type REG_GPIO_11_DRV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL5_SPEC, u8, GPIO11DRIVING_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_11_DRV_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_10_DRV_A::DISABLED) + self.variant(GPIO11DRIVING_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_10_DRV_A::ENABLED) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 2)) | ((value as u32 & 0x03) << 2); - self.w + self.variant(GPIO11DRIVING_A::ENABLED) } } -#[doc = "Schmitt trigger enabled for GPIO10.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_10_SMT_A { +#[doc = "Field `reg_gpio_11_pu` reader - Pull Up Resistor for GPIO11."] +pub type REG_GPIO_11_PU_R = crate::BitReader; +#[doc = "Pull Up Resistor for GPIO11.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO11PULL_UP_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_10_SMT_A) -> Self { + fn from(variant: GPIO11PULL_UP_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_10_smt` reader - Schmitt trigger enabled for GPIO10."] -pub struct REG_GPIO_10_SMT_R(crate::FieldReader); -impl REG_GPIO_10_SMT_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_10_SMT_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_11_PU_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_10_SMT_A { + pub fn variant(&self) -> GPIO11PULL_UP_RESISTOR_A { match self.bits { - false => REG_GPIO_10_SMT_A::DISABLED, - true => REG_GPIO_10_SMT_A::ENABLED, + false => GPIO11PULL_UP_RESISTOR_A::DISABLED, + true => GPIO11PULL_UP_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_10_SMT_A::DISABLED + *self == GPIO11PULL_UP_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_10_SMT_A::ENABLED + *self == GPIO11PULL_UP_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_10_SMT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_10_smt` writer - Schmitt trigger enabled for GPIO10."] -pub struct REG_GPIO_10_SMT_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_10_SMT_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_10_SMT_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_11_pu` writer - Pull Up Resistor for GPIO11."] +pub type REG_GPIO_11_PU_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL5_SPEC, GPIO11PULL_UP_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_11_PU_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_10_SMT_A::DISABLED) + self.variant(GPIO11PULL_UP_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_10_SMT_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w + self.variant(GPIO11PULL_UP_RESISTOR_A::ENABLED) } } -#[doc = "Input enable for GPIO10.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_10_IE_A { +#[doc = "Field `reg_gpio_11_pd` reader - Pull Down Resistor for GPIO11."] +pub type REG_GPIO_11_PD_R = crate::BitReader; +#[doc = "Pull Down Resistor for GPIO11.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO11PULL_DOWN_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_10_IE_A) -> Self { + fn from(variant: GPIO11PULL_DOWN_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_10_ie` reader - Input enable for GPIO10."] -pub struct REG_GPIO_10_IE_R(crate::FieldReader); -impl REG_GPIO_10_IE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_10_IE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_11_PD_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_10_IE_A { + pub fn variant(&self) -> GPIO11PULL_DOWN_RESISTOR_A { match self.bits { - false => REG_GPIO_10_IE_A::DISABLED, - true => REG_GPIO_10_IE_A::ENABLED, + false => GPIO11PULL_DOWN_RESISTOR_A::DISABLED, + true => GPIO11PULL_DOWN_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_10_IE_A::DISABLED + *self == GPIO11PULL_DOWN_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_10_IE_A::ENABLED + *self == GPIO11PULL_DOWN_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_10_IE_R { - type Target = crate::FieldReader; +#[doc = "Field `reg_gpio_11_pd` writer - Pull Down Resistor for GPIO11."] +pub type REG_GPIO_11_PD_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL5_SPEC, GPIO11PULL_DOWN_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_11_PD_W<'a, O> { + #[doc = "`0`"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn disabled(self) -> &'a mut W { + self.variant(GPIO11PULL_DOWN_RESISTOR_A::DISABLED) + } + #[doc = "`1`"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(GPIO11PULL_DOWN_RESISTOR_A::ENABLED) } } -#[doc = "Field `reg_gpio_10_ie` writer - Input enable for GPIO10."] -pub struct REG_GPIO_10_IE_W<'a> { - w: &'a mut W, +#[doc = "Field `reg_gpio_11_func_sel` reader - Function select for GPIO11."] +pub type REG_GPIO_11_FUNC_SEL_R = crate::FieldReader; +#[doc = "Function select for GPIO11.\n\nValue on reset: 14"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum GPIO11FUNCTION_SELECT_A { + #[doc = "4: `100`"] + SPI_SCLK = 4, + #[doc = "6: `110`"] + I2C_SDA = 6, + #[doc = "7: `111`"] + UART_SIG3 = 7, + #[doc = "8: `1000`"] + PWM_CH1 = 8, + #[doc = "9: `1001`"] + FEM_GPIO_3 = 9, + #[doc = "10: `1010`"] + IRLED_OUT_GPIP_CH10 = 10, + #[doc = "11: `1011`"] + SWGPIO_11 = 11, + #[doc = "14: `1110`"] + E21_TDO = 14, } -impl<'a> REG_GPIO_10_IE_W<'a> { - #[doc = r"Writes `variant` to the field"] +impl From for u8 { #[inline(always)] - pub fn variant(self, variant: REG_GPIO_10_IE_A) -> &'a mut W { - self.bit(variant.into()) + fn from(variant: GPIO11FUNCTION_SELECT_A) -> Self { + variant as _ } - #[doc = "`0`"] +} +impl REG_GPIO_11_FUNC_SEL_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_10_IE_A::DISABLED) + pub fn variant(&self) -> Option { + match self.bits { + 4 => Some(GPIO11FUNCTION_SELECT_A::SPI_SCLK), + 6 => Some(GPIO11FUNCTION_SELECT_A::I2C_SDA), + 7 => Some(GPIO11FUNCTION_SELECT_A::UART_SIG3), + 8 => Some(GPIO11FUNCTION_SELECT_A::PWM_CH1), + 9 => Some(GPIO11FUNCTION_SELECT_A::FEM_GPIO_3), + 10 => Some(GPIO11FUNCTION_SELECT_A::IRLED_OUT_GPIP_CH10), + 11 => Some(GPIO11FUNCTION_SELECT_A::SWGPIO_11), + 14 => Some(GPIO11FUNCTION_SELECT_A::E21_TDO), + _ => None, + } } - #[doc = "`1`"] + #[doc = "Checks if the value of the field is `SPI_SCLK`"] #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_10_IE_A::ENABLED) + pub fn is_spi_sclk(&self) -> bool { + *self == GPIO11FUNCTION_SELECT_A::SPI_SCLK + } + #[doc = "Checks if the value of the field is `I2C_SDA`"] + #[inline(always)] + pub fn is_i2c_sda(&self) -> bool { + *self == GPIO11FUNCTION_SELECT_A::I2C_SDA + } + #[doc = "Checks if the value of the field is `UART_SIG3`"] + #[inline(always)] + pub fn is_uart_sig3(&self) -> bool { + *self == GPIO11FUNCTION_SELECT_A::UART_SIG3 + } + #[doc = "Checks if the value of the field is `PWM_CH1`"] + #[inline(always)] + pub fn is_pwm_ch1(&self) -> bool { + *self == GPIO11FUNCTION_SELECT_A::PWM_CH1 + } + #[doc = "Checks if the value of the field is `FEM_GPIO_3`"] + #[inline(always)] + pub fn is_fem_gpio_3(&self) -> bool { + *self == GPIO11FUNCTION_SELECT_A::FEM_GPIO_3 } - #[doc = r"Sets the field bit"] + #[doc = "Checks if the value of the field is `IRLED_OUT_GPIP_CH10`"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn is_irled_out_gpip_ch10(&self) -> bool { + *self == GPIO11FUNCTION_SELECT_A::IRLED_OUT_GPIP_CH10 } - #[doc = r"Clears the field bit"] + #[doc = "Checks if the value of the field is `SWGPIO_11`"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn is_swgpio_11(&self) -> bool { + *self == GPIO11FUNCTION_SELECT_A::SWGPIO_11 } - #[doc = r"Writes raw bits to the field"] + #[doc = "Checks if the value of the field is `E21_TDO`"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn is_e21_tdo(&self) -> bool { + *self == GPIO11FUNCTION_SELECT_A::E21_TDO } } -impl R { - #[doc = "Bits 24:27 - Function select for GPIO11."] +#[doc = "Field `reg_gpio_11_func_sel` writer - Function select for GPIO11."] +pub type REG_GPIO_11_FUNC_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL5_SPEC, u8, GPIO11FUNCTION_SELECT_A, 4, O>; +impl<'a, const O: u8> REG_GPIO_11_FUNC_SEL_W<'a, O> { + #[doc = "`100`"] #[inline(always)] - pub fn reg_gpio_11_func_sel(&self) -> REG_GPIO_11_FUNC_SEL_R { - REG_GPIO_11_FUNC_SEL_R::new(((self.bits >> 24) & 0x0f) as u8) + pub fn spi_sclk(self) -> &'a mut W { + self.variant(GPIO11FUNCTION_SELECT_A::SPI_SCLK) } - #[doc = "Bit 21 - Pull Down Resistor for GPIO11."] + #[doc = "`110`"] #[inline(always)] - pub fn reg_gpio_11_pd(&self) -> REG_GPIO_11_PD_R { - REG_GPIO_11_PD_R::new(((self.bits >> 21) & 0x01) != 0) + pub fn i2c_sda(self) -> &'a mut W { + self.variant(GPIO11FUNCTION_SELECT_A::I2C_SDA) } - #[doc = "Bit 20 - Pull Up Resistor for GPIO11."] + #[doc = "`111`"] #[inline(always)] - pub fn reg_gpio_11_pu(&self) -> REG_GPIO_11_PU_R { - REG_GPIO_11_PU_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn uart_sig3(self) -> &'a mut W { + self.variant(GPIO11FUNCTION_SELECT_A::UART_SIG3) } - #[doc = "Bits 18:19 - Driving control enabled for GPIO11."] + #[doc = "`1000`"] #[inline(always)] - pub fn reg_gpio_11_drv(&self) -> REG_GPIO_11_DRV_R { - REG_GPIO_11_DRV_R::new(((self.bits >> 18) & 0x03) as u8) + pub fn pwm_ch1(self) -> &'a mut W { + self.variant(GPIO11FUNCTION_SELECT_A::PWM_CH1) } - #[doc = "Bit 17 - Schmitt trigger enabled for GPIO11."] + #[doc = "`1001`"] #[inline(always)] - pub fn reg_gpio_11_smt(&self) -> REG_GPIO_11_SMT_R { - REG_GPIO_11_SMT_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn fem_gpio_3(self) -> &'a mut W { + self.variant(GPIO11FUNCTION_SELECT_A::FEM_GPIO_3) } - #[doc = "Bit 16 - Input enable for GPIO11."] + #[doc = "`1010`"] #[inline(always)] - pub fn reg_gpio_11_ie(&self) -> REG_GPIO_11_IE_R { - REG_GPIO_11_IE_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn irled_out_gpip_ch10(self) -> &'a mut W { + self.variant(GPIO11FUNCTION_SELECT_A::IRLED_OUT_GPIP_CH10) + } + #[doc = "`1011`"] + #[inline(always)] + pub fn swgpio_11(self) -> &'a mut W { + self.variant(GPIO11FUNCTION_SELECT_A::SWGPIO_11) + } + #[doc = "`1110`"] + #[inline(always)] + pub fn e21_tdo(self) -> &'a mut W { + self.variant(GPIO11FUNCTION_SELECT_A::E21_TDO) + } +} +impl R { + #[doc = "Bit 0 - Input enable for GPIO10."] + #[inline(always)] + pub fn reg_gpio_10_ie(&self) -> REG_GPIO_10_IE_R { + REG_GPIO_10_IE_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Schmitt trigger enabled for GPIO10."] + #[inline(always)] + pub fn reg_gpio_10_smt(&self) -> REG_GPIO_10_SMT_R { + REG_GPIO_10_SMT_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bits 2:3 - Driving control enabled for GPIO10."] + #[inline(always)] + pub fn reg_gpio_10_drv(&self) -> REG_GPIO_10_DRV_R { + REG_GPIO_10_DRV_R::new(((self.bits >> 2) & 3) as u8) + } + #[doc = "Bit 4 - Pull Up Resistor for GPIO10."] + #[inline(always)] + pub fn reg_gpio_10_pu(&self) -> REG_GPIO_10_PU_R { + REG_GPIO_10_PU_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Pull Down Resistor for GPIO10."] + #[inline(always)] + pub fn reg_gpio_10_pd(&self) -> REG_GPIO_10_PD_R { + REG_GPIO_10_PD_R::new(((self.bits >> 5) & 1) != 0) } #[doc = "Bits 8:11 - Function select for GPIO10."] #[inline(always)] pub fn reg_gpio_10_func_sel(&self) -> REG_GPIO_10_FUNC_SEL_R { REG_GPIO_10_FUNC_SEL_R::new(((self.bits >> 8) & 0x0f) as u8) } - #[doc = "Bit 5 - Pull Down Resistor for GPIO10."] + #[doc = "Bit 16 - Input enable for GPIO11."] #[inline(always)] - pub fn reg_gpio_10_pd(&self) -> REG_GPIO_10_PD_R { - REG_GPIO_10_PD_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn reg_gpio_11_ie(&self) -> REG_GPIO_11_IE_R { + REG_GPIO_11_IE_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 4 - Pull Up Resistor for GPIO10."] + #[doc = "Bit 17 - Schmitt trigger enabled for GPIO11."] #[inline(always)] - pub fn reg_gpio_10_pu(&self) -> REG_GPIO_10_PU_R { - REG_GPIO_10_PU_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn reg_gpio_11_smt(&self) -> REG_GPIO_11_SMT_R { + REG_GPIO_11_SMT_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bits 2:3 - Driving control enabled for GPIO10."] + #[doc = "Bits 18:19 - Driving control enabled for GPIO11."] #[inline(always)] - pub fn reg_gpio_10_drv(&self) -> REG_GPIO_10_DRV_R { - REG_GPIO_10_DRV_R::new(((self.bits >> 2) & 0x03) as u8) + pub fn reg_gpio_11_drv(&self) -> REG_GPIO_11_DRV_R { + REG_GPIO_11_DRV_R::new(((self.bits >> 18) & 3) as u8) } - #[doc = "Bit 1 - Schmitt trigger enabled for GPIO10."] + #[doc = "Bit 20 - Pull Up Resistor for GPIO11."] #[inline(always)] - pub fn reg_gpio_10_smt(&self) -> REG_GPIO_10_SMT_R { - REG_GPIO_10_SMT_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn reg_gpio_11_pu(&self) -> REG_GPIO_11_PU_R { + REG_GPIO_11_PU_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bit 0 - Input enable for GPIO10."] + #[doc = "Bit 21 - Pull Down Resistor for GPIO11."] #[inline(always)] - pub fn reg_gpio_10_ie(&self) -> REG_GPIO_10_IE_R { - REG_GPIO_10_IE_R::new((self.bits & 0x01) != 0) + pub fn reg_gpio_11_pd(&self) -> REG_GPIO_11_PD_R { + REG_GPIO_11_PD_R::new(((self.bits >> 21) & 1) != 0) } -} -impl W { #[doc = "Bits 24:27 - Function select for GPIO11."] #[inline(always)] - pub fn reg_gpio_11_func_sel(&mut self) -> REG_GPIO_11_FUNC_SEL_W { - REG_GPIO_11_FUNC_SEL_W { w: self } + pub fn reg_gpio_11_func_sel(&self) -> REG_GPIO_11_FUNC_SEL_R { + REG_GPIO_11_FUNC_SEL_R::new(((self.bits >> 24) & 0x0f) as u8) } - #[doc = "Bit 21 - Pull Down Resistor for GPIO11."] +} +impl W { + #[doc = "Bit 0 - Input enable for GPIO10."] #[inline(always)] - pub fn reg_gpio_11_pd(&mut self) -> REG_GPIO_11_PD_W { - REG_GPIO_11_PD_W { w: self } + #[must_use] + pub fn reg_gpio_10_ie(&mut self) -> REG_GPIO_10_IE_W<0> { + REG_GPIO_10_IE_W::new(self) } - #[doc = "Bit 20 - Pull Up Resistor for GPIO11."] + #[doc = "Bit 1 - Schmitt trigger enabled for GPIO10."] #[inline(always)] - pub fn reg_gpio_11_pu(&mut self) -> REG_GPIO_11_PU_W { - REG_GPIO_11_PU_W { w: self } + #[must_use] + pub fn reg_gpio_10_smt(&mut self) -> REG_GPIO_10_SMT_W<1> { + REG_GPIO_10_SMT_W::new(self) } - #[doc = "Bits 18:19 - Driving control enabled for GPIO11."] + #[doc = "Bits 2:3 - Driving control enabled for GPIO10."] #[inline(always)] - pub fn reg_gpio_11_drv(&mut self) -> REG_GPIO_11_DRV_W { - REG_GPIO_11_DRV_W { w: self } + #[must_use] + pub fn reg_gpio_10_drv(&mut self) -> REG_GPIO_10_DRV_W<2> { + REG_GPIO_10_DRV_W::new(self) } - #[doc = "Bit 17 - Schmitt trigger enabled for GPIO11."] + #[doc = "Bit 4 - Pull Up Resistor for GPIO10."] #[inline(always)] - pub fn reg_gpio_11_smt(&mut self) -> REG_GPIO_11_SMT_W { - REG_GPIO_11_SMT_W { w: self } + #[must_use] + pub fn reg_gpio_10_pu(&mut self) -> REG_GPIO_10_PU_W<4> { + REG_GPIO_10_PU_W::new(self) } - #[doc = "Bit 16 - Input enable for GPIO11."] + #[doc = "Bit 5 - Pull Down Resistor for GPIO10."] #[inline(always)] - pub fn reg_gpio_11_ie(&mut self) -> REG_GPIO_11_IE_W { - REG_GPIO_11_IE_W { w: self } + #[must_use] + pub fn reg_gpio_10_pd(&mut self) -> REG_GPIO_10_PD_W<5> { + REG_GPIO_10_PD_W::new(self) } #[doc = "Bits 8:11 - Function select for GPIO10."] #[inline(always)] - pub fn reg_gpio_10_func_sel(&mut self) -> REG_GPIO_10_FUNC_SEL_W { - REG_GPIO_10_FUNC_SEL_W { w: self } + #[must_use] + pub fn reg_gpio_10_func_sel(&mut self) -> REG_GPIO_10_FUNC_SEL_W<8> { + REG_GPIO_10_FUNC_SEL_W::new(self) } - #[doc = "Bit 5 - Pull Down Resistor for GPIO10."] + #[doc = "Bit 16 - Input enable for GPIO11."] #[inline(always)] - pub fn reg_gpio_10_pd(&mut self) -> REG_GPIO_10_PD_W { - REG_GPIO_10_PD_W { w: self } + #[must_use] + pub fn reg_gpio_11_ie(&mut self) -> REG_GPIO_11_IE_W<16> { + REG_GPIO_11_IE_W::new(self) } - #[doc = "Bit 4 - Pull Up Resistor for GPIO10."] + #[doc = "Bit 17 - Schmitt trigger enabled for GPIO11."] #[inline(always)] - pub fn reg_gpio_10_pu(&mut self) -> REG_GPIO_10_PU_W { - REG_GPIO_10_PU_W { w: self } + #[must_use] + pub fn reg_gpio_11_smt(&mut self) -> REG_GPIO_11_SMT_W<17> { + REG_GPIO_11_SMT_W::new(self) } - #[doc = "Bits 2:3 - Driving control enabled for GPIO10."] + #[doc = "Bits 18:19 - Driving control enabled for GPIO11."] #[inline(always)] - pub fn reg_gpio_10_drv(&mut self) -> REG_GPIO_10_DRV_W { - REG_GPIO_10_DRV_W { w: self } + #[must_use] + pub fn reg_gpio_11_drv(&mut self) -> REG_GPIO_11_DRV_W<18> { + REG_GPIO_11_DRV_W::new(self) } - #[doc = "Bit 1 - Schmitt trigger enabled for GPIO10."] + #[doc = "Bit 20 - Pull Up Resistor for GPIO11."] #[inline(always)] - pub fn reg_gpio_10_smt(&mut self) -> REG_GPIO_10_SMT_W { - REG_GPIO_10_SMT_W { w: self } + #[must_use] + pub fn reg_gpio_11_pu(&mut self) -> REG_GPIO_11_PU_W<20> { + REG_GPIO_11_PU_W::new(self) } - #[doc = "Bit 0 - Input enable for GPIO10."] + #[doc = "Bit 21 - Pull Down Resistor for GPIO11."] + #[inline(always)] + #[must_use] + pub fn reg_gpio_11_pd(&mut self) -> REG_GPIO_11_PD_W<21> { + REG_GPIO_11_PD_W::new(self) + } + #[doc = "Bits 24:27 - Function select for GPIO11."] #[inline(always)] - pub fn reg_gpio_10_ie(&mut self) -> REG_GPIO_10_IE_W { - REG_GPIO_10_IE_W { w: self } + #[must_use] + pub fn reg_gpio_11_func_sel(&mut self) -> REG_GPIO_11_FUNC_SEL_W<24> { + REG_GPIO_11_FUNC_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -1293,11 +964,10 @@ impl crate::Readable for GPIO_CFGCTL5_SPEC { #[doc = "`write(|w| ..)` method takes [gpio_cfgctl5::W](W) writer structure"] impl crate::Writable for GPIO_CFGCTL5_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets GPIO_CFGCTL5 to value 0x0e03_0b03"] impl crate::Resettable for GPIO_CFGCTL5_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0e03_0b03 - } + const RESET_VALUE: Self::Ux = 0x0e03_0b03; } diff --git a/src/glb/gpio_cfgctl6.rs b/src/glb/gpio_cfgctl6.rs index ff45235..2590fc6 100644 --- a/src/glb/gpio_cfgctl6.rs +++ b/src/glb/gpio_cfgctl6.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,575 +28,275 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Function select for GPIO13.\n\nValue on reset: 11"] -#[derive(Clone, Copy, Debug, PartialEq)] -#[repr(u8)] -pub enum REG_GPIO_13_FUNC_SEL_A { - #[doc = "4: `100`"] - SPI_MOSI_SPI_MISO = 4, - #[doc = "6: `110`"] - I2C_SDA = 6, - #[doc = "7: `111`"] - UART_SIG5 = 7, - #[doc = "8: `1000`"] - PWM_CH3 = 8, - #[doc = "9: `1001`"] - FEM_GPIO_1 = 9, - #[doc = "10: `1010`"] - GPIP_CH3 = 10, - #[doc = "11: `1011`"] - SWGPIO_13 = 11, - #[doc = "14: `1110`"] - E21_TDI = 14, -} -impl From for u8 { - #[inline(always)] - fn from(variant: REG_GPIO_13_FUNC_SEL_A) -> Self { - variant as _ - } -} -#[doc = "Field `reg_gpio_13_func_sel` reader - Function select for GPIO13."] -pub struct REG_GPIO_13_FUNC_SEL_R(crate::FieldReader); -impl REG_GPIO_13_FUNC_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_13_FUNC_SEL_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 4 => Some(REG_GPIO_13_FUNC_SEL_A::SPI_MOSI_SPI_MISO), - 6 => Some(REG_GPIO_13_FUNC_SEL_A::I2C_SDA), - 7 => Some(REG_GPIO_13_FUNC_SEL_A::UART_SIG5), - 8 => Some(REG_GPIO_13_FUNC_SEL_A::PWM_CH3), - 9 => Some(REG_GPIO_13_FUNC_SEL_A::FEM_GPIO_1), - 10 => Some(REG_GPIO_13_FUNC_SEL_A::GPIP_CH3), - 11 => Some(REG_GPIO_13_FUNC_SEL_A::SWGPIO_13), - 14 => Some(REG_GPIO_13_FUNC_SEL_A::E21_TDI), - _ => None, - } - } - #[doc = "Checks if the value of the field is `SPI_MOSI_SPI_MISO`"] - #[inline(always)] - pub fn is_spi_mosi_spi_miso(&self) -> bool { - **self == REG_GPIO_13_FUNC_SEL_A::SPI_MOSI_SPI_MISO - } - #[doc = "Checks if the value of the field is `I2C_SDA`"] - #[inline(always)] - pub fn is_i2c_sda(&self) -> bool { - **self == REG_GPIO_13_FUNC_SEL_A::I2C_SDA - } - #[doc = "Checks if the value of the field is `UART_SIG5`"] - #[inline(always)] - pub fn is_uart_sig5(&self) -> bool { - **self == REG_GPIO_13_FUNC_SEL_A::UART_SIG5 - } - #[doc = "Checks if the value of the field is `PWM_CH3`"] - #[inline(always)] - pub fn is_pwm_ch3(&self) -> bool { - **self == REG_GPIO_13_FUNC_SEL_A::PWM_CH3 - } - #[doc = "Checks if the value of the field is `FEM_GPIO_1`"] - #[inline(always)] - pub fn is_fem_gpio_1(&self) -> bool { - **self == REG_GPIO_13_FUNC_SEL_A::FEM_GPIO_1 - } - #[doc = "Checks if the value of the field is `GPIP_CH3`"] - #[inline(always)] - pub fn is_gpip_ch3(&self) -> bool { - **self == REG_GPIO_13_FUNC_SEL_A::GPIP_CH3 - } - #[doc = "Checks if the value of the field is `SWGPIO_13`"] - #[inline(always)] - pub fn is_swgpio_13(&self) -> bool { - **self == REG_GPIO_13_FUNC_SEL_A::SWGPIO_13 - } - #[doc = "Checks if the value of the field is `E21_TDI`"] - #[inline(always)] - pub fn is_e21_tdi(&self) -> bool { - **self == REG_GPIO_13_FUNC_SEL_A::E21_TDI - } -} -impl core::ops::Deref for REG_GPIO_13_FUNC_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_13_func_sel` writer - Function select for GPIO13."] -pub struct REG_GPIO_13_FUNC_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_13_FUNC_SEL_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_13_FUNC_SEL_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } - #[doc = "`100`"] - #[inline(always)] - pub fn spi_mosi_spi_miso(self) -> &'a mut W { - self.variant(REG_GPIO_13_FUNC_SEL_A::SPI_MOSI_SPI_MISO) - } - #[doc = "`110`"] - #[inline(always)] - pub fn i2c_sda(self) -> &'a mut W { - self.variant(REG_GPIO_13_FUNC_SEL_A::I2C_SDA) - } - #[doc = "`111`"] - #[inline(always)] - pub fn uart_sig5(self) -> &'a mut W { - self.variant(REG_GPIO_13_FUNC_SEL_A::UART_SIG5) - } - #[doc = "`1000`"] - #[inline(always)] - pub fn pwm_ch3(self) -> &'a mut W { - self.variant(REG_GPIO_13_FUNC_SEL_A::PWM_CH3) - } - #[doc = "`1001`"] - #[inline(always)] - pub fn fem_gpio_1(self) -> &'a mut W { - self.variant(REG_GPIO_13_FUNC_SEL_A::FEM_GPIO_1) - } - #[doc = "`1010`"] - #[inline(always)] - pub fn gpip_ch3(self) -> &'a mut W { - self.variant(REG_GPIO_13_FUNC_SEL_A::GPIP_CH3) - } - #[doc = "`1011`"] - #[inline(always)] - pub fn swgpio_13(self) -> &'a mut W { - self.variant(REG_GPIO_13_FUNC_SEL_A::SWGPIO_13) - } - #[doc = "`1110`"] - #[inline(always)] - pub fn e21_tdi(self) -> &'a mut W { - self.variant(REG_GPIO_13_FUNC_SEL_A::E21_TDI) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 24)) | ((value as u32 & 0x0f) << 24); - self.w - } -} -#[doc = "Pull Down Resistor for GPIO13.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_13_PD_A { +#[doc = "Field `reg_gpio_12_ie` reader - Input enable for GPIO12."] +pub type REG_GPIO_12_IE_R = crate::BitReader; +#[doc = "Input enable for GPIO12.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO12INPUT_ENABLED_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_13_PD_A) -> Self { + fn from(variant: GPIO12INPUT_ENABLED_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_13_pd` reader - Pull Down Resistor for GPIO13."] -pub struct REG_GPIO_13_PD_R(crate::FieldReader); -impl REG_GPIO_13_PD_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_13_PD_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_12_IE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_13_PD_A { + pub fn variant(&self) -> GPIO12INPUT_ENABLED_A { match self.bits { - false => REG_GPIO_13_PD_A::DISABLED, - true => REG_GPIO_13_PD_A::ENABLED, + false => GPIO12INPUT_ENABLED_A::DISABLED, + true => GPIO12INPUT_ENABLED_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_13_PD_A::DISABLED + *self == GPIO12INPUT_ENABLED_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_13_PD_A::ENABLED + *self == GPIO12INPUT_ENABLED_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_13_PD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_13_pd` writer - Pull Down Resistor for GPIO13."] -pub struct REG_GPIO_13_PD_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_13_PD_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_13_PD_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_12_ie` writer - Input enable for GPIO12."] +pub type REG_GPIO_12_IE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL6_SPEC, GPIO12INPUT_ENABLED_A, O>; +impl<'a, const O: u8> REG_GPIO_12_IE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_13_PD_A::DISABLED) + self.variant(GPIO12INPUT_ENABLED_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_13_PD_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); - self.w + self.variant(GPIO12INPUT_ENABLED_A::ENABLED) } } -#[doc = "Pull Up Resistor for GPIO13.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_13_PU_A { +#[doc = "Field `reg_gpio_12_smt` reader - Schmitt trigger enabled for GPIO12."] +pub type REG_GPIO_12_SMT_R = crate::BitReader; +#[doc = "Schmitt trigger enabled for GPIO12.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO12SCHMITT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_13_PU_A) -> Self { + fn from(variant: GPIO12SCHMITT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_13_pu` reader - Pull Up Resistor for GPIO13."] -pub struct REG_GPIO_13_PU_R(crate::FieldReader); -impl REG_GPIO_13_PU_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_13_PU_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_12_SMT_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_13_PU_A { + pub fn variant(&self) -> GPIO12SCHMITT_A { match self.bits { - false => REG_GPIO_13_PU_A::DISABLED, - true => REG_GPIO_13_PU_A::ENABLED, + false => GPIO12SCHMITT_A::DISABLED, + true => GPIO12SCHMITT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_13_PU_A::DISABLED + *self == GPIO12SCHMITT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_13_PU_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_13_PU_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO12SCHMITT_A::ENABLED } } -#[doc = "Field `reg_gpio_13_pu` writer - Pull Up Resistor for GPIO13."] -pub struct REG_GPIO_13_PU_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_13_PU_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_13_PU_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_12_smt` writer - Schmitt trigger enabled for GPIO12."] +pub type REG_GPIO_12_SMT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL6_SPEC, GPIO12SCHMITT_A, O>; +impl<'a, const O: u8> REG_GPIO_12_SMT_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_13_PU_A::DISABLED) + self.variant(GPIO12SCHMITT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_13_PU_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w + self.variant(GPIO12SCHMITT_A::ENABLED) } } -#[doc = "Driving control enabled for GPIO13.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[doc = "Field `reg_gpio_12_drv` reader - Driving control enabled for GPIO12."] +pub type REG_GPIO_12_DRV_R = crate::FieldReader; +#[doc = "Driving control enabled for GPIO12.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_13_DRV_A { +pub enum GPIO12DRIVING_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_13_DRV_A) -> Self { + fn from(variant: GPIO12DRIVING_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_13_drv` reader - Driving control enabled for GPIO13."] -pub struct REG_GPIO_13_DRV_R(crate::FieldReader); -impl REG_GPIO_13_DRV_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_13_DRV_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_12_DRV_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 0 => Some(REG_GPIO_13_DRV_A::DISABLED), - 1 => Some(REG_GPIO_13_DRV_A::ENABLED), + 0 => Some(GPIO12DRIVING_A::DISABLED), + 1 => Some(GPIO12DRIVING_A::ENABLED), _ => None, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_13_DRV_A::DISABLED + *self == GPIO12DRIVING_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_13_DRV_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_13_DRV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO12DRIVING_A::ENABLED } } -#[doc = "Field `reg_gpio_13_drv` writer - Driving control enabled for GPIO13."] -pub struct REG_GPIO_13_DRV_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_13_DRV_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_13_DRV_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +#[doc = "Field `reg_gpio_12_drv` writer - Driving control enabled for GPIO12."] +pub type REG_GPIO_12_DRV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL6_SPEC, u8, GPIO12DRIVING_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_12_DRV_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_13_DRV_A::DISABLED) + self.variant(GPIO12DRIVING_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_13_DRV_A::ENABLED) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 18)) | ((value as u32 & 0x03) << 18); - self.w + self.variant(GPIO12DRIVING_A::ENABLED) } } -#[doc = "Schmitt trigger enabled for GPIO13.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_13_SMT_A { +#[doc = "Field `reg_gpio_12_pu` reader - Pull Up Resistor for GPIO12."] +pub type REG_GPIO_12_PU_R = crate::BitReader; +#[doc = "Pull Up Resistor for GPIO12.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO12PULL_UP_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_13_SMT_A) -> Self { + fn from(variant: GPIO12PULL_UP_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_13_smt` reader - Schmitt trigger enabled for GPIO13."] -pub struct REG_GPIO_13_SMT_R(crate::FieldReader); -impl REG_GPIO_13_SMT_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_13_SMT_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_12_PU_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_13_SMT_A { + pub fn variant(&self) -> GPIO12PULL_UP_RESISTOR_A { match self.bits { - false => REG_GPIO_13_SMT_A::DISABLED, - true => REG_GPIO_13_SMT_A::ENABLED, + false => GPIO12PULL_UP_RESISTOR_A::DISABLED, + true => GPIO12PULL_UP_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_13_SMT_A::DISABLED + *self == GPIO12PULL_UP_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_13_SMT_A::ENABLED + *self == GPIO12PULL_UP_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_13_SMT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_13_smt` writer - Schmitt trigger enabled for GPIO13."] -pub struct REG_GPIO_13_SMT_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_13_SMT_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_13_SMT_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_12_pu` writer - Pull Up Resistor for GPIO12."] +pub type REG_GPIO_12_PU_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL6_SPEC, GPIO12PULL_UP_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_12_PU_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_13_SMT_A::DISABLED) + self.variant(GPIO12PULL_UP_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_13_SMT_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w + self.variant(GPIO12PULL_UP_RESISTOR_A::ENABLED) } } -#[doc = "Input enable for GPIO13.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_13_IE_A { +#[doc = "Field `reg_gpio_12_pd` reader - Pull Down Resistor for GPIO12."] +pub type REG_GPIO_12_PD_R = crate::BitReader; +#[doc = "Pull Down Resistor for GPIO12.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO12PULL_DOWN_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_13_IE_A) -> Self { + fn from(variant: GPIO12PULL_DOWN_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_13_ie` reader - Input enable for GPIO13."] -pub struct REG_GPIO_13_IE_R(crate::FieldReader); -impl REG_GPIO_13_IE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_13_IE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_12_PD_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_13_IE_A { + pub fn variant(&self) -> GPIO12PULL_DOWN_RESISTOR_A { match self.bits { - false => REG_GPIO_13_IE_A::DISABLED, - true => REG_GPIO_13_IE_A::ENABLED, + false => GPIO12PULL_DOWN_RESISTOR_A::DISABLED, + true => GPIO12PULL_DOWN_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_13_IE_A::DISABLED + *self == GPIO12PULL_DOWN_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_13_IE_A::ENABLED + *self == GPIO12PULL_DOWN_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_13_IE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_13_ie` writer - Input enable for GPIO13."] -pub struct REG_GPIO_13_IE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_13_IE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_13_IE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_12_pd` writer - Pull Down Resistor for GPIO12."] +pub type REG_GPIO_12_PD_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL6_SPEC, GPIO12PULL_DOWN_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_12_PD_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_13_IE_A::DISABLED) + self.variant(GPIO12PULL_DOWN_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_13_IE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w + self.variant(GPIO12PULL_DOWN_RESISTOR_A::ENABLED) } } +#[doc = "Field `reg_gpio_12_func_sel` reader - Function select for GPIO12."] +pub type REG_GPIO_12_FUNC_SEL_R = crate::FieldReader; #[doc = "Function select for GPIO12.\n\nValue on reset: 14"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_12_FUNC_SEL_A { +pub enum GPIO12FUNCTION_SELECT_A { #[doc = "4: `100`"] SPI_MISO_SPI_MOSI = 4, #[doc = "6: `110`"] @@ -613,669 +314,639 @@ pub enum REG_GPIO_12_FUNC_SEL_A { #[doc = "14: `1110`"] E21_TMS = 14, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_12_FUNC_SEL_A) -> Self { + fn from(variant: GPIO12FUNCTION_SELECT_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_12_func_sel` reader - Function select for GPIO12."] -pub struct REG_GPIO_12_FUNC_SEL_R(crate::FieldReader); impl REG_GPIO_12_FUNC_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_12_FUNC_SEL_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 4 => Some(REG_GPIO_12_FUNC_SEL_A::SPI_MISO_SPI_MOSI), - 6 => Some(REG_GPIO_12_FUNC_SEL_A::I2C_SCL), - 7 => Some(REG_GPIO_12_FUNC_SEL_A::UART_SIG4), - 8 => Some(REG_GPIO_12_FUNC_SEL_A::PWM_CH2), - 9 => Some(REG_GPIO_12_FUNC_SEL_A::FEM_GPIO_0), - 10 => Some(REG_GPIO_12_FUNC_SEL_A::GPIP_CH0_GPADC_VREF_EXT), - 11 => Some(REG_GPIO_12_FUNC_SEL_A::SWGPIO_12), - 14 => Some(REG_GPIO_12_FUNC_SEL_A::E21_TMS), + 4 => Some(GPIO12FUNCTION_SELECT_A::SPI_MISO_SPI_MOSI), + 6 => Some(GPIO12FUNCTION_SELECT_A::I2C_SCL), + 7 => Some(GPIO12FUNCTION_SELECT_A::UART_SIG4), + 8 => Some(GPIO12FUNCTION_SELECT_A::PWM_CH2), + 9 => Some(GPIO12FUNCTION_SELECT_A::FEM_GPIO_0), + 10 => Some(GPIO12FUNCTION_SELECT_A::GPIP_CH0_GPADC_VREF_EXT), + 11 => Some(GPIO12FUNCTION_SELECT_A::SWGPIO_12), + 14 => Some(GPIO12FUNCTION_SELECT_A::E21_TMS), _ => None, } } #[doc = "Checks if the value of the field is `SPI_MISO_SPI_MOSI`"] #[inline(always)] pub fn is_spi_miso_spi_mosi(&self) -> bool { - **self == REG_GPIO_12_FUNC_SEL_A::SPI_MISO_SPI_MOSI + *self == GPIO12FUNCTION_SELECT_A::SPI_MISO_SPI_MOSI } #[doc = "Checks if the value of the field is `I2C_SCL`"] #[inline(always)] pub fn is_i2c_scl(&self) -> bool { - **self == REG_GPIO_12_FUNC_SEL_A::I2C_SCL + *self == GPIO12FUNCTION_SELECT_A::I2C_SCL } #[doc = "Checks if the value of the field is `UART_SIG4`"] #[inline(always)] pub fn is_uart_sig4(&self) -> bool { - **self == REG_GPIO_12_FUNC_SEL_A::UART_SIG4 + *self == GPIO12FUNCTION_SELECT_A::UART_SIG4 } #[doc = "Checks if the value of the field is `PWM_CH2`"] #[inline(always)] pub fn is_pwm_ch2(&self) -> bool { - **self == REG_GPIO_12_FUNC_SEL_A::PWM_CH2 + *self == GPIO12FUNCTION_SELECT_A::PWM_CH2 } #[doc = "Checks if the value of the field is `FEM_GPIO_0`"] #[inline(always)] pub fn is_fem_gpio_0(&self) -> bool { - **self == REG_GPIO_12_FUNC_SEL_A::FEM_GPIO_0 + *self == GPIO12FUNCTION_SELECT_A::FEM_GPIO_0 } #[doc = "Checks if the value of the field is `GPIP_CH0_GPADC_VREF_EXT`"] #[inline(always)] pub fn is_gpip_ch0_gpadc_vref_ext(&self) -> bool { - **self == REG_GPIO_12_FUNC_SEL_A::GPIP_CH0_GPADC_VREF_EXT + *self == GPIO12FUNCTION_SELECT_A::GPIP_CH0_GPADC_VREF_EXT } #[doc = "Checks if the value of the field is `SWGPIO_12`"] #[inline(always)] pub fn is_swgpio_12(&self) -> bool { - **self == REG_GPIO_12_FUNC_SEL_A::SWGPIO_12 + *self == GPIO12FUNCTION_SELECT_A::SWGPIO_12 } #[doc = "Checks if the value of the field is `E21_TMS`"] #[inline(always)] pub fn is_e21_tms(&self) -> bool { - **self == REG_GPIO_12_FUNC_SEL_A::E21_TMS - } -} -impl core::ops::Deref for REG_GPIO_12_FUNC_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO12FUNCTION_SELECT_A::E21_TMS } } #[doc = "Field `reg_gpio_12_func_sel` writer - Function select for GPIO12."] -pub struct REG_GPIO_12_FUNC_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_12_FUNC_SEL_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_12_FUNC_SEL_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +pub type REG_GPIO_12_FUNC_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL6_SPEC, u8, GPIO12FUNCTION_SELECT_A, 4, O>; +impl<'a, const O: u8> REG_GPIO_12_FUNC_SEL_W<'a, O> { #[doc = "`100`"] #[inline(always)] pub fn spi_miso_spi_mosi(self) -> &'a mut W { - self.variant(REG_GPIO_12_FUNC_SEL_A::SPI_MISO_SPI_MOSI) + self.variant(GPIO12FUNCTION_SELECT_A::SPI_MISO_SPI_MOSI) } #[doc = "`110`"] #[inline(always)] pub fn i2c_scl(self) -> &'a mut W { - self.variant(REG_GPIO_12_FUNC_SEL_A::I2C_SCL) + self.variant(GPIO12FUNCTION_SELECT_A::I2C_SCL) } #[doc = "`111`"] #[inline(always)] pub fn uart_sig4(self) -> &'a mut W { - self.variant(REG_GPIO_12_FUNC_SEL_A::UART_SIG4) + self.variant(GPIO12FUNCTION_SELECT_A::UART_SIG4) } #[doc = "`1000`"] #[inline(always)] pub fn pwm_ch2(self) -> &'a mut W { - self.variant(REG_GPIO_12_FUNC_SEL_A::PWM_CH2) + self.variant(GPIO12FUNCTION_SELECT_A::PWM_CH2) } #[doc = "`1001`"] #[inline(always)] pub fn fem_gpio_0(self) -> &'a mut W { - self.variant(REG_GPIO_12_FUNC_SEL_A::FEM_GPIO_0) + self.variant(GPIO12FUNCTION_SELECT_A::FEM_GPIO_0) } #[doc = "`1010`"] #[inline(always)] pub fn gpip_ch0_gpadc_vref_ext(self) -> &'a mut W { - self.variant(REG_GPIO_12_FUNC_SEL_A::GPIP_CH0_GPADC_VREF_EXT) + self.variant(GPIO12FUNCTION_SELECT_A::GPIP_CH0_GPADC_VREF_EXT) } #[doc = "`1011`"] #[inline(always)] pub fn swgpio_12(self) -> &'a mut W { - self.variant(REG_GPIO_12_FUNC_SEL_A::SWGPIO_12) + self.variant(GPIO12FUNCTION_SELECT_A::SWGPIO_12) } #[doc = "`1110`"] #[inline(always)] pub fn e21_tms(self) -> &'a mut W { - self.variant(REG_GPIO_12_FUNC_SEL_A::E21_TMS) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 8)) | ((value as u32 & 0x0f) << 8); - self.w + self.variant(GPIO12FUNCTION_SELECT_A::E21_TMS) } } -#[doc = "Pull Down Resistor for GPIO12.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_12_PD_A { +#[doc = "Field `reg_gpio_13_ie` reader - Input enable for GPIO13."] +pub type REG_GPIO_13_IE_R = crate::BitReader; +#[doc = "Input enable for GPIO13.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO13INPUT_ENABLED_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_12_PD_A) -> Self { + fn from(variant: GPIO13INPUT_ENABLED_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_12_pd` reader - Pull Down Resistor for GPIO12."] -pub struct REG_GPIO_12_PD_R(crate::FieldReader); -impl REG_GPIO_12_PD_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_12_PD_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_13_IE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_12_PD_A { + pub fn variant(&self) -> GPIO13INPUT_ENABLED_A { match self.bits { - false => REG_GPIO_12_PD_A::DISABLED, - true => REG_GPIO_12_PD_A::ENABLED, + false => GPIO13INPUT_ENABLED_A::DISABLED, + true => GPIO13INPUT_ENABLED_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_12_PD_A::DISABLED + *self == GPIO13INPUT_ENABLED_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_12_PD_A::ENABLED + *self == GPIO13INPUT_ENABLED_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_12_PD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_12_pd` writer - Pull Down Resistor for GPIO12."] -pub struct REG_GPIO_12_PD_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_12_PD_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_12_PD_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_13_ie` writer - Input enable for GPIO13."] +pub type REG_GPIO_13_IE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL6_SPEC, GPIO13INPUT_ENABLED_A, O>; +impl<'a, const O: u8> REG_GPIO_13_IE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_12_PD_A::DISABLED) + self.variant(GPIO13INPUT_ENABLED_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_12_PD_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w + self.variant(GPIO13INPUT_ENABLED_A::ENABLED) } } -#[doc = "Pull Up Resistor for GPIO12.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_12_PU_A { +#[doc = "Field `reg_gpio_13_smt` reader - Schmitt trigger enabled for GPIO13."] +pub type REG_GPIO_13_SMT_R = crate::BitReader; +#[doc = "Schmitt trigger enabled for GPIO13.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO13SCHMITT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_12_PU_A) -> Self { + fn from(variant: GPIO13SCHMITT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_12_pu` reader - Pull Up Resistor for GPIO12."] -pub struct REG_GPIO_12_PU_R(crate::FieldReader); -impl REG_GPIO_12_PU_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_12_PU_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_13_SMT_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_12_PU_A { + pub fn variant(&self) -> GPIO13SCHMITT_A { match self.bits { - false => REG_GPIO_12_PU_A::DISABLED, - true => REG_GPIO_12_PU_A::ENABLED, + false => GPIO13SCHMITT_A::DISABLED, + true => GPIO13SCHMITT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_12_PU_A::DISABLED + *self == GPIO13SCHMITT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_12_PU_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_12_PU_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO13SCHMITT_A::ENABLED } } -#[doc = "Field `reg_gpio_12_pu` writer - Pull Up Resistor for GPIO12."] -pub struct REG_GPIO_12_PU_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_12_PU_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_12_PU_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_13_smt` writer - Schmitt trigger enabled for GPIO13."] +pub type REG_GPIO_13_SMT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL6_SPEC, GPIO13SCHMITT_A, O>; +impl<'a, const O: u8> REG_GPIO_13_SMT_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_12_PU_A::DISABLED) + self.variant(GPIO13SCHMITT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_12_PU_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w + self.variant(GPIO13SCHMITT_A::ENABLED) } } -#[doc = "Driving control enabled for GPIO12.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[doc = "Field `reg_gpio_13_drv` reader - Driving control enabled for GPIO13."] +pub type REG_GPIO_13_DRV_R = crate::FieldReader; +#[doc = "Driving control enabled for GPIO13.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_12_DRV_A { +pub enum GPIO13DRIVING_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_12_DRV_A) -> Self { + fn from(variant: GPIO13DRIVING_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_12_drv` reader - Driving control enabled for GPIO12."] -pub struct REG_GPIO_12_DRV_R(crate::FieldReader); -impl REG_GPIO_12_DRV_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_12_DRV_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_13_DRV_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 0 => Some(REG_GPIO_12_DRV_A::DISABLED), - 1 => Some(REG_GPIO_12_DRV_A::ENABLED), + 0 => Some(GPIO13DRIVING_A::DISABLED), + 1 => Some(GPIO13DRIVING_A::ENABLED), _ => None, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_12_DRV_A::DISABLED + *self == GPIO13DRIVING_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_12_DRV_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_12_DRV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO13DRIVING_A::ENABLED } } -#[doc = "Field `reg_gpio_12_drv` writer - Driving control enabled for GPIO12."] -pub struct REG_GPIO_12_DRV_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_12_DRV_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_12_DRV_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +#[doc = "Field `reg_gpio_13_drv` writer - Driving control enabled for GPIO13."] +pub type REG_GPIO_13_DRV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL6_SPEC, u8, GPIO13DRIVING_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_13_DRV_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_12_DRV_A::DISABLED) + self.variant(GPIO13DRIVING_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_12_DRV_A::ENABLED) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 2)) | ((value as u32 & 0x03) << 2); - self.w + self.variant(GPIO13DRIVING_A::ENABLED) } } -#[doc = "Schmitt trigger enabled for GPIO12.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_12_SMT_A { +#[doc = "Field `reg_gpio_13_pu` reader - Pull Up Resistor for GPIO13."] +pub type REG_GPIO_13_PU_R = crate::BitReader; +#[doc = "Pull Up Resistor for GPIO13.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO13PULL_UP_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_12_SMT_A) -> Self { + fn from(variant: GPIO13PULL_UP_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_12_smt` reader - Schmitt trigger enabled for GPIO12."] -pub struct REG_GPIO_12_SMT_R(crate::FieldReader); -impl REG_GPIO_12_SMT_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_12_SMT_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_13_PU_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_12_SMT_A { + pub fn variant(&self) -> GPIO13PULL_UP_RESISTOR_A { match self.bits { - false => REG_GPIO_12_SMT_A::DISABLED, - true => REG_GPIO_12_SMT_A::ENABLED, + false => GPIO13PULL_UP_RESISTOR_A::DISABLED, + true => GPIO13PULL_UP_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_12_SMT_A::DISABLED + *self == GPIO13PULL_UP_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_12_SMT_A::ENABLED + *self == GPIO13PULL_UP_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_12_SMT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_12_smt` writer - Schmitt trigger enabled for GPIO12."] -pub struct REG_GPIO_12_SMT_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_12_SMT_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_12_SMT_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_13_pu` writer - Pull Up Resistor for GPIO13."] +pub type REG_GPIO_13_PU_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL6_SPEC, GPIO13PULL_UP_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_13_PU_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_12_SMT_A::DISABLED) + self.variant(GPIO13PULL_UP_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_12_SMT_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w + self.variant(GPIO13PULL_UP_RESISTOR_A::ENABLED) } } -#[doc = "Input enable for GPIO12.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_12_IE_A { +#[doc = "Field `reg_gpio_13_pd` reader - Pull Down Resistor for GPIO13."] +pub type REG_GPIO_13_PD_R = crate::BitReader; +#[doc = "Pull Down Resistor for GPIO13.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO13PULL_DOWN_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_12_IE_A) -> Self { + fn from(variant: GPIO13PULL_DOWN_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_12_ie` reader - Input enable for GPIO12."] -pub struct REG_GPIO_12_IE_R(crate::FieldReader); -impl REG_GPIO_12_IE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_12_IE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_13_PD_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_12_IE_A { + pub fn variant(&self) -> GPIO13PULL_DOWN_RESISTOR_A { match self.bits { - false => REG_GPIO_12_IE_A::DISABLED, - true => REG_GPIO_12_IE_A::ENABLED, + false => GPIO13PULL_DOWN_RESISTOR_A::DISABLED, + true => GPIO13PULL_DOWN_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_12_IE_A::DISABLED + *self == GPIO13PULL_DOWN_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_12_IE_A::ENABLED + *self == GPIO13PULL_DOWN_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_12_IE_R { - type Target = crate::FieldReader; +#[doc = "Field `reg_gpio_13_pd` writer - Pull Down Resistor for GPIO13."] +pub type REG_GPIO_13_PD_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL6_SPEC, GPIO13PULL_DOWN_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_13_PD_W<'a, O> { + #[doc = "`0`"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn disabled(self) -> &'a mut W { + self.variant(GPIO13PULL_DOWN_RESISTOR_A::DISABLED) + } + #[doc = "`1`"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(GPIO13PULL_DOWN_RESISTOR_A::ENABLED) } } -#[doc = "Field `reg_gpio_12_ie` writer - Input enable for GPIO12."] -pub struct REG_GPIO_12_IE_W<'a> { - w: &'a mut W, +#[doc = "Field `reg_gpio_13_func_sel` reader - Function select for GPIO13."] +pub type REG_GPIO_13_FUNC_SEL_R = crate::FieldReader; +#[doc = "Function select for GPIO13.\n\nValue on reset: 11"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum GPIO13FUNCTION_SELECT_A { + #[doc = "4: `100`"] + SPI_MOSI_SPI_MISO = 4, + #[doc = "6: `110`"] + I2C_SDA = 6, + #[doc = "7: `111`"] + UART_SIG5 = 7, + #[doc = "8: `1000`"] + PWM_CH3 = 8, + #[doc = "9: `1001`"] + FEM_GPIO_1 = 9, + #[doc = "10: `1010`"] + GPIP_CH3 = 10, + #[doc = "11: `1011`"] + SWGPIO_13 = 11, + #[doc = "14: `1110`"] + E21_TDI = 14, } -impl<'a> REG_GPIO_12_IE_W<'a> { - #[doc = r"Writes `variant` to the field"] +impl From for u8 { #[inline(always)] - pub fn variant(self, variant: REG_GPIO_12_IE_A) -> &'a mut W { - self.bit(variant.into()) + fn from(variant: GPIO13FUNCTION_SELECT_A) -> Self { + variant as _ } - #[doc = "`0`"] +} +impl REG_GPIO_13_FUNC_SEL_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_12_IE_A::DISABLED) + pub fn variant(&self) -> Option { + match self.bits { + 4 => Some(GPIO13FUNCTION_SELECT_A::SPI_MOSI_SPI_MISO), + 6 => Some(GPIO13FUNCTION_SELECT_A::I2C_SDA), + 7 => Some(GPIO13FUNCTION_SELECT_A::UART_SIG5), + 8 => Some(GPIO13FUNCTION_SELECT_A::PWM_CH3), + 9 => Some(GPIO13FUNCTION_SELECT_A::FEM_GPIO_1), + 10 => Some(GPIO13FUNCTION_SELECT_A::GPIP_CH3), + 11 => Some(GPIO13FUNCTION_SELECT_A::SWGPIO_13), + 14 => Some(GPIO13FUNCTION_SELECT_A::E21_TDI), + _ => None, + } } - #[doc = "`1`"] + #[doc = "Checks if the value of the field is `SPI_MOSI_SPI_MISO`"] #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_12_IE_A::ENABLED) + pub fn is_spi_mosi_spi_miso(&self) -> bool { + *self == GPIO13FUNCTION_SELECT_A::SPI_MOSI_SPI_MISO + } + #[doc = "Checks if the value of the field is `I2C_SDA`"] + #[inline(always)] + pub fn is_i2c_sda(&self) -> bool { + *self == GPIO13FUNCTION_SELECT_A::I2C_SDA + } + #[doc = "Checks if the value of the field is `UART_SIG5`"] + #[inline(always)] + pub fn is_uart_sig5(&self) -> bool { + *self == GPIO13FUNCTION_SELECT_A::UART_SIG5 + } + #[doc = "Checks if the value of the field is `PWM_CH3`"] + #[inline(always)] + pub fn is_pwm_ch3(&self) -> bool { + *self == GPIO13FUNCTION_SELECT_A::PWM_CH3 + } + #[doc = "Checks if the value of the field is `FEM_GPIO_1`"] + #[inline(always)] + pub fn is_fem_gpio_1(&self) -> bool { + *self == GPIO13FUNCTION_SELECT_A::FEM_GPIO_1 } - #[doc = r"Sets the field bit"] + #[doc = "Checks if the value of the field is `GPIP_CH3`"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn is_gpip_ch3(&self) -> bool { + *self == GPIO13FUNCTION_SELECT_A::GPIP_CH3 } - #[doc = r"Clears the field bit"] + #[doc = "Checks if the value of the field is `SWGPIO_13`"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn is_swgpio_13(&self) -> bool { + *self == GPIO13FUNCTION_SELECT_A::SWGPIO_13 } - #[doc = r"Writes raw bits to the field"] + #[doc = "Checks if the value of the field is `E21_TDI`"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn is_e21_tdi(&self) -> bool { + *self == GPIO13FUNCTION_SELECT_A::E21_TDI } } -impl R { - #[doc = "Bits 24:27 - Function select for GPIO13."] +#[doc = "Field `reg_gpio_13_func_sel` writer - Function select for GPIO13."] +pub type REG_GPIO_13_FUNC_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL6_SPEC, u8, GPIO13FUNCTION_SELECT_A, 4, O>; +impl<'a, const O: u8> REG_GPIO_13_FUNC_SEL_W<'a, O> { + #[doc = "`100`"] #[inline(always)] - pub fn reg_gpio_13_func_sel(&self) -> REG_GPIO_13_FUNC_SEL_R { - REG_GPIO_13_FUNC_SEL_R::new(((self.bits >> 24) & 0x0f) as u8) + pub fn spi_mosi_spi_miso(self) -> &'a mut W { + self.variant(GPIO13FUNCTION_SELECT_A::SPI_MOSI_SPI_MISO) } - #[doc = "Bit 21 - Pull Down Resistor for GPIO13."] + #[doc = "`110`"] #[inline(always)] - pub fn reg_gpio_13_pd(&self) -> REG_GPIO_13_PD_R { - REG_GPIO_13_PD_R::new(((self.bits >> 21) & 0x01) != 0) + pub fn i2c_sda(self) -> &'a mut W { + self.variant(GPIO13FUNCTION_SELECT_A::I2C_SDA) } - #[doc = "Bit 20 - Pull Up Resistor for GPIO13."] + #[doc = "`111`"] #[inline(always)] - pub fn reg_gpio_13_pu(&self) -> REG_GPIO_13_PU_R { - REG_GPIO_13_PU_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn uart_sig5(self) -> &'a mut W { + self.variant(GPIO13FUNCTION_SELECT_A::UART_SIG5) } - #[doc = "Bits 18:19 - Driving control enabled for GPIO13."] + #[doc = "`1000`"] #[inline(always)] - pub fn reg_gpio_13_drv(&self) -> REG_GPIO_13_DRV_R { - REG_GPIO_13_DRV_R::new(((self.bits >> 18) & 0x03) as u8) + pub fn pwm_ch3(self) -> &'a mut W { + self.variant(GPIO13FUNCTION_SELECT_A::PWM_CH3) } - #[doc = "Bit 17 - Schmitt trigger enabled for GPIO13."] + #[doc = "`1001`"] #[inline(always)] - pub fn reg_gpio_13_smt(&self) -> REG_GPIO_13_SMT_R { - REG_GPIO_13_SMT_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn fem_gpio_1(self) -> &'a mut W { + self.variant(GPIO13FUNCTION_SELECT_A::FEM_GPIO_1) } - #[doc = "Bit 16 - Input enable for GPIO13."] + #[doc = "`1010`"] #[inline(always)] - pub fn reg_gpio_13_ie(&self) -> REG_GPIO_13_IE_R { - REG_GPIO_13_IE_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn gpip_ch3(self) -> &'a mut W { + self.variant(GPIO13FUNCTION_SELECT_A::GPIP_CH3) + } + #[doc = "`1011`"] + #[inline(always)] + pub fn swgpio_13(self) -> &'a mut W { + self.variant(GPIO13FUNCTION_SELECT_A::SWGPIO_13) + } + #[doc = "`1110`"] + #[inline(always)] + pub fn e21_tdi(self) -> &'a mut W { + self.variant(GPIO13FUNCTION_SELECT_A::E21_TDI) + } +} +impl R { + #[doc = "Bit 0 - Input enable for GPIO12."] + #[inline(always)] + pub fn reg_gpio_12_ie(&self) -> REG_GPIO_12_IE_R { + REG_GPIO_12_IE_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Schmitt trigger enabled for GPIO12."] + #[inline(always)] + pub fn reg_gpio_12_smt(&self) -> REG_GPIO_12_SMT_R { + REG_GPIO_12_SMT_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bits 2:3 - Driving control enabled for GPIO12."] + #[inline(always)] + pub fn reg_gpio_12_drv(&self) -> REG_GPIO_12_DRV_R { + REG_GPIO_12_DRV_R::new(((self.bits >> 2) & 3) as u8) + } + #[doc = "Bit 4 - Pull Up Resistor for GPIO12."] + #[inline(always)] + pub fn reg_gpio_12_pu(&self) -> REG_GPIO_12_PU_R { + REG_GPIO_12_PU_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Pull Down Resistor for GPIO12."] + #[inline(always)] + pub fn reg_gpio_12_pd(&self) -> REG_GPIO_12_PD_R { + REG_GPIO_12_PD_R::new(((self.bits >> 5) & 1) != 0) } #[doc = "Bits 8:11 - Function select for GPIO12."] #[inline(always)] pub fn reg_gpio_12_func_sel(&self) -> REG_GPIO_12_FUNC_SEL_R { REG_GPIO_12_FUNC_SEL_R::new(((self.bits >> 8) & 0x0f) as u8) } - #[doc = "Bit 5 - Pull Down Resistor for GPIO12."] + #[doc = "Bit 16 - Input enable for GPIO13."] #[inline(always)] - pub fn reg_gpio_12_pd(&self) -> REG_GPIO_12_PD_R { - REG_GPIO_12_PD_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn reg_gpio_13_ie(&self) -> REG_GPIO_13_IE_R { + REG_GPIO_13_IE_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 4 - Pull Up Resistor for GPIO12."] + #[doc = "Bit 17 - Schmitt trigger enabled for GPIO13."] #[inline(always)] - pub fn reg_gpio_12_pu(&self) -> REG_GPIO_12_PU_R { - REG_GPIO_12_PU_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn reg_gpio_13_smt(&self) -> REG_GPIO_13_SMT_R { + REG_GPIO_13_SMT_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bits 2:3 - Driving control enabled for GPIO12."] + #[doc = "Bits 18:19 - Driving control enabled for GPIO13."] #[inline(always)] - pub fn reg_gpio_12_drv(&self) -> REG_GPIO_12_DRV_R { - REG_GPIO_12_DRV_R::new(((self.bits >> 2) & 0x03) as u8) + pub fn reg_gpio_13_drv(&self) -> REG_GPIO_13_DRV_R { + REG_GPIO_13_DRV_R::new(((self.bits >> 18) & 3) as u8) } - #[doc = "Bit 1 - Schmitt trigger enabled for GPIO12."] + #[doc = "Bit 20 - Pull Up Resistor for GPIO13."] #[inline(always)] - pub fn reg_gpio_12_smt(&self) -> REG_GPIO_12_SMT_R { - REG_GPIO_12_SMT_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn reg_gpio_13_pu(&self) -> REG_GPIO_13_PU_R { + REG_GPIO_13_PU_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bit 0 - Input enable for GPIO12."] + #[doc = "Bit 21 - Pull Down Resistor for GPIO13."] #[inline(always)] - pub fn reg_gpio_12_ie(&self) -> REG_GPIO_12_IE_R { - REG_GPIO_12_IE_R::new((self.bits & 0x01) != 0) + pub fn reg_gpio_13_pd(&self) -> REG_GPIO_13_PD_R { + REG_GPIO_13_PD_R::new(((self.bits >> 21) & 1) != 0) } -} -impl W { #[doc = "Bits 24:27 - Function select for GPIO13."] #[inline(always)] - pub fn reg_gpio_13_func_sel(&mut self) -> REG_GPIO_13_FUNC_SEL_W { - REG_GPIO_13_FUNC_SEL_W { w: self } + pub fn reg_gpio_13_func_sel(&self) -> REG_GPIO_13_FUNC_SEL_R { + REG_GPIO_13_FUNC_SEL_R::new(((self.bits >> 24) & 0x0f) as u8) } - #[doc = "Bit 21 - Pull Down Resistor for GPIO13."] +} +impl W { + #[doc = "Bit 0 - Input enable for GPIO12."] #[inline(always)] - pub fn reg_gpio_13_pd(&mut self) -> REG_GPIO_13_PD_W { - REG_GPIO_13_PD_W { w: self } + #[must_use] + pub fn reg_gpio_12_ie(&mut self) -> REG_GPIO_12_IE_W<0> { + REG_GPIO_12_IE_W::new(self) } - #[doc = "Bit 20 - Pull Up Resistor for GPIO13."] + #[doc = "Bit 1 - Schmitt trigger enabled for GPIO12."] #[inline(always)] - pub fn reg_gpio_13_pu(&mut self) -> REG_GPIO_13_PU_W { - REG_GPIO_13_PU_W { w: self } + #[must_use] + pub fn reg_gpio_12_smt(&mut self) -> REG_GPIO_12_SMT_W<1> { + REG_GPIO_12_SMT_W::new(self) } - #[doc = "Bits 18:19 - Driving control enabled for GPIO13."] + #[doc = "Bits 2:3 - Driving control enabled for GPIO12."] #[inline(always)] - pub fn reg_gpio_13_drv(&mut self) -> REG_GPIO_13_DRV_W { - REG_GPIO_13_DRV_W { w: self } + #[must_use] + pub fn reg_gpio_12_drv(&mut self) -> REG_GPIO_12_DRV_W<2> { + REG_GPIO_12_DRV_W::new(self) } - #[doc = "Bit 17 - Schmitt trigger enabled for GPIO13."] + #[doc = "Bit 4 - Pull Up Resistor for GPIO12."] #[inline(always)] - pub fn reg_gpio_13_smt(&mut self) -> REG_GPIO_13_SMT_W { - REG_GPIO_13_SMT_W { w: self } + #[must_use] + pub fn reg_gpio_12_pu(&mut self) -> REG_GPIO_12_PU_W<4> { + REG_GPIO_12_PU_W::new(self) } - #[doc = "Bit 16 - Input enable for GPIO13."] + #[doc = "Bit 5 - Pull Down Resistor for GPIO12."] #[inline(always)] - pub fn reg_gpio_13_ie(&mut self) -> REG_GPIO_13_IE_W { - REG_GPIO_13_IE_W { w: self } + #[must_use] + pub fn reg_gpio_12_pd(&mut self) -> REG_GPIO_12_PD_W<5> { + REG_GPIO_12_PD_W::new(self) } #[doc = "Bits 8:11 - Function select for GPIO12."] #[inline(always)] - pub fn reg_gpio_12_func_sel(&mut self) -> REG_GPIO_12_FUNC_SEL_W { - REG_GPIO_12_FUNC_SEL_W { w: self } + #[must_use] + pub fn reg_gpio_12_func_sel(&mut self) -> REG_GPIO_12_FUNC_SEL_W<8> { + REG_GPIO_12_FUNC_SEL_W::new(self) } - #[doc = "Bit 5 - Pull Down Resistor for GPIO12."] + #[doc = "Bit 16 - Input enable for GPIO13."] #[inline(always)] - pub fn reg_gpio_12_pd(&mut self) -> REG_GPIO_12_PD_W { - REG_GPIO_12_PD_W { w: self } + #[must_use] + pub fn reg_gpio_13_ie(&mut self) -> REG_GPIO_13_IE_W<16> { + REG_GPIO_13_IE_W::new(self) } - #[doc = "Bit 4 - Pull Up Resistor for GPIO12."] + #[doc = "Bit 17 - Schmitt trigger enabled for GPIO13."] #[inline(always)] - pub fn reg_gpio_12_pu(&mut self) -> REG_GPIO_12_PU_W { - REG_GPIO_12_PU_W { w: self } + #[must_use] + pub fn reg_gpio_13_smt(&mut self) -> REG_GPIO_13_SMT_W<17> { + REG_GPIO_13_SMT_W::new(self) } - #[doc = "Bits 2:3 - Driving control enabled for GPIO12."] + #[doc = "Bits 18:19 - Driving control enabled for GPIO13."] #[inline(always)] - pub fn reg_gpio_12_drv(&mut self) -> REG_GPIO_12_DRV_W { - REG_GPIO_12_DRV_W { w: self } + #[must_use] + pub fn reg_gpio_13_drv(&mut self) -> REG_GPIO_13_DRV_W<18> { + REG_GPIO_13_DRV_W::new(self) } - #[doc = "Bit 1 - Schmitt trigger enabled for GPIO12."] + #[doc = "Bit 20 - Pull Up Resistor for GPIO13."] #[inline(always)] - pub fn reg_gpio_12_smt(&mut self) -> REG_GPIO_12_SMT_W { - REG_GPIO_12_SMT_W { w: self } + #[must_use] + pub fn reg_gpio_13_pu(&mut self) -> REG_GPIO_13_PU_W<20> { + REG_GPIO_13_PU_W::new(self) } - #[doc = "Bit 0 - Input enable for GPIO12."] + #[doc = "Bit 21 - Pull Down Resistor for GPIO13."] + #[inline(always)] + #[must_use] + pub fn reg_gpio_13_pd(&mut self) -> REG_GPIO_13_PD_W<21> { + REG_GPIO_13_PD_W::new(self) + } + #[doc = "Bits 24:27 - Function select for GPIO13."] #[inline(always)] - pub fn reg_gpio_12_ie(&mut self) -> REG_GPIO_12_IE_W { - REG_GPIO_12_IE_W { w: self } + #[must_use] + pub fn reg_gpio_13_func_sel(&mut self) -> REG_GPIO_13_FUNC_SEL_W<24> { + REG_GPIO_13_FUNC_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -1293,11 +964,10 @@ impl crate::Readable for GPIO_CFGCTL6_SPEC { #[doc = "`write(|w| ..)` method takes [gpio_cfgctl6::W](W) writer structure"] impl crate::Writable for GPIO_CFGCTL6_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets GPIO_CFGCTL6 to value 0x0b03_0e03"] impl crate::Resettable for GPIO_CFGCTL6_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0b03_0e03 - } + const RESET_VALUE: Self::Ux = 0x0b03_0e03; } diff --git a/src/glb/gpio_cfgctl7.rs b/src/glb/gpio_cfgctl7.rs index e9eee2c..cb80141 100644 --- a/src/glb/gpio_cfgctl7.rs +++ b/src/glb/gpio_cfgctl7.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,575 +28,275 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Function select for GPIO15.\n\nValue on reset: 11"] -#[derive(Clone, Copy, Debug, PartialEq)] -#[repr(u8)] -pub enum REG_GPIO_15_FUNC_SEL_A { - #[doc = "4: `100`"] - SPI_SCLK = 4, - #[doc = "6: `110`"] - I2C_SDA = 6, - #[doc = "7: `111`"] - UART_SIG7 = 7, - #[doc = "8: `1000`"] - PWM_CH0 = 8, - #[doc = "9: `1001`"] - FEM_GPIO_3 = 9, - #[doc = "10: `1010`"] - PSW_IRRCV_OUT_GPIP_CH11 = 10, - #[doc = "11: `1011`"] - SWGPIO_15 = 11, - #[doc = "14: `1110`"] - E21_TDO = 14, -} -impl From for u8 { - #[inline(always)] - fn from(variant: REG_GPIO_15_FUNC_SEL_A) -> Self { - variant as _ - } -} -#[doc = "Field `reg_gpio_15_func_sel` reader - Function select for GPIO15."] -pub struct REG_GPIO_15_FUNC_SEL_R(crate::FieldReader); -impl REG_GPIO_15_FUNC_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_15_FUNC_SEL_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 4 => Some(REG_GPIO_15_FUNC_SEL_A::SPI_SCLK), - 6 => Some(REG_GPIO_15_FUNC_SEL_A::I2C_SDA), - 7 => Some(REG_GPIO_15_FUNC_SEL_A::UART_SIG7), - 8 => Some(REG_GPIO_15_FUNC_SEL_A::PWM_CH0), - 9 => Some(REG_GPIO_15_FUNC_SEL_A::FEM_GPIO_3), - 10 => Some(REG_GPIO_15_FUNC_SEL_A::PSW_IRRCV_OUT_GPIP_CH11), - 11 => Some(REG_GPIO_15_FUNC_SEL_A::SWGPIO_15), - 14 => Some(REG_GPIO_15_FUNC_SEL_A::E21_TDO), - _ => None, - } - } - #[doc = "Checks if the value of the field is `SPI_SCLK`"] - #[inline(always)] - pub fn is_spi_sclk(&self) -> bool { - **self == REG_GPIO_15_FUNC_SEL_A::SPI_SCLK - } - #[doc = "Checks if the value of the field is `I2C_SDA`"] - #[inline(always)] - pub fn is_i2c_sda(&self) -> bool { - **self == REG_GPIO_15_FUNC_SEL_A::I2C_SDA - } - #[doc = "Checks if the value of the field is `UART_SIG7`"] - #[inline(always)] - pub fn is_uart_sig7(&self) -> bool { - **self == REG_GPIO_15_FUNC_SEL_A::UART_SIG7 - } - #[doc = "Checks if the value of the field is `PWM_CH0`"] - #[inline(always)] - pub fn is_pwm_ch0(&self) -> bool { - **self == REG_GPIO_15_FUNC_SEL_A::PWM_CH0 - } - #[doc = "Checks if the value of the field is `FEM_GPIO_3`"] - #[inline(always)] - pub fn is_fem_gpio_3(&self) -> bool { - **self == REG_GPIO_15_FUNC_SEL_A::FEM_GPIO_3 - } - #[doc = "Checks if the value of the field is `PSW_IRRCV_OUT_GPIP_CH11`"] - #[inline(always)] - pub fn is_psw_irrcv_out_gpip_ch11(&self) -> bool { - **self == REG_GPIO_15_FUNC_SEL_A::PSW_IRRCV_OUT_GPIP_CH11 - } - #[doc = "Checks if the value of the field is `SWGPIO_15`"] - #[inline(always)] - pub fn is_swgpio_15(&self) -> bool { - **self == REG_GPIO_15_FUNC_SEL_A::SWGPIO_15 - } - #[doc = "Checks if the value of the field is `E21_TDO`"] - #[inline(always)] - pub fn is_e21_tdo(&self) -> bool { - **self == REG_GPIO_15_FUNC_SEL_A::E21_TDO - } -} -impl core::ops::Deref for REG_GPIO_15_FUNC_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_15_func_sel` writer - Function select for GPIO15."] -pub struct REG_GPIO_15_FUNC_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_15_FUNC_SEL_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_15_FUNC_SEL_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } - #[doc = "`100`"] - #[inline(always)] - pub fn spi_sclk(self) -> &'a mut W { - self.variant(REG_GPIO_15_FUNC_SEL_A::SPI_SCLK) - } - #[doc = "`110`"] - #[inline(always)] - pub fn i2c_sda(self) -> &'a mut W { - self.variant(REG_GPIO_15_FUNC_SEL_A::I2C_SDA) - } - #[doc = "`111`"] - #[inline(always)] - pub fn uart_sig7(self) -> &'a mut W { - self.variant(REG_GPIO_15_FUNC_SEL_A::UART_SIG7) - } - #[doc = "`1000`"] - #[inline(always)] - pub fn pwm_ch0(self) -> &'a mut W { - self.variant(REG_GPIO_15_FUNC_SEL_A::PWM_CH0) - } - #[doc = "`1001`"] - #[inline(always)] - pub fn fem_gpio_3(self) -> &'a mut W { - self.variant(REG_GPIO_15_FUNC_SEL_A::FEM_GPIO_3) - } - #[doc = "`1010`"] - #[inline(always)] - pub fn psw_irrcv_out_gpip_ch11(self) -> &'a mut W { - self.variant(REG_GPIO_15_FUNC_SEL_A::PSW_IRRCV_OUT_GPIP_CH11) - } - #[doc = "`1011`"] - #[inline(always)] - pub fn swgpio_15(self) -> &'a mut W { - self.variant(REG_GPIO_15_FUNC_SEL_A::SWGPIO_15) - } - #[doc = "`1110`"] - #[inline(always)] - pub fn e21_tdo(self) -> &'a mut W { - self.variant(REG_GPIO_15_FUNC_SEL_A::E21_TDO) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 24)) | ((value as u32 & 0x0f) << 24); - self.w - } -} -#[doc = "Pull Down Resistor for GPIO15.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_15_PD_A { +#[doc = "Field `reg_gpio_14_ie` reader - Input enable for GPIO14."] +pub type REG_GPIO_14_IE_R = crate::BitReader; +#[doc = "Input enable for GPIO14.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO14INPUT_ENABLED_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_15_PD_A) -> Self { + fn from(variant: GPIO14INPUT_ENABLED_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_15_pd` reader - Pull Down Resistor for GPIO15."] -pub struct REG_GPIO_15_PD_R(crate::FieldReader); -impl REG_GPIO_15_PD_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_15_PD_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_14_IE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_15_PD_A { + pub fn variant(&self) -> GPIO14INPUT_ENABLED_A { match self.bits { - false => REG_GPIO_15_PD_A::DISABLED, - true => REG_GPIO_15_PD_A::ENABLED, + false => GPIO14INPUT_ENABLED_A::DISABLED, + true => GPIO14INPUT_ENABLED_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_15_PD_A::DISABLED + *self == GPIO14INPUT_ENABLED_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_15_PD_A::ENABLED + *self == GPIO14INPUT_ENABLED_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_15_PD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_15_pd` writer - Pull Down Resistor for GPIO15."] -pub struct REG_GPIO_15_PD_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_15_PD_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_15_PD_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_14_ie` writer - Input enable for GPIO14."] +pub type REG_GPIO_14_IE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL7_SPEC, GPIO14INPUT_ENABLED_A, O>; +impl<'a, const O: u8> REG_GPIO_14_IE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_15_PD_A::DISABLED) + self.variant(GPIO14INPUT_ENABLED_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_15_PD_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); - self.w + self.variant(GPIO14INPUT_ENABLED_A::ENABLED) } } -#[doc = "Pull Up Resistor for GPIO15.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_15_PU_A { +#[doc = "Field `reg_gpio_14_smt` reader - Schmitt trigger enabled for GPIO14."] +pub type REG_GPIO_14_SMT_R = crate::BitReader; +#[doc = "Schmitt trigger enabled for GPIO14.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO14SCHMITT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_15_PU_A) -> Self { + fn from(variant: GPIO14SCHMITT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_15_pu` reader - Pull Up Resistor for GPIO15."] -pub struct REG_GPIO_15_PU_R(crate::FieldReader); -impl REG_GPIO_15_PU_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_15_PU_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_14_SMT_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_15_PU_A { + pub fn variant(&self) -> GPIO14SCHMITT_A { match self.bits { - false => REG_GPIO_15_PU_A::DISABLED, - true => REG_GPIO_15_PU_A::ENABLED, + false => GPIO14SCHMITT_A::DISABLED, + true => GPIO14SCHMITT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_15_PU_A::DISABLED + *self == GPIO14SCHMITT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_15_PU_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_15_PU_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO14SCHMITT_A::ENABLED } } -#[doc = "Field `reg_gpio_15_pu` writer - Pull Up Resistor for GPIO15."] -pub struct REG_GPIO_15_PU_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_15_PU_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_15_PU_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_14_smt` writer - Schmitt trigger enabled for GPIO14."] +pub type REG_GPIO_14_SMT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL7_SPEC, GPIO14SCHMITT_A, O>; +impl<'a, const O: u8> REG_GPIO_14_SMT_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_15_PU_A::DISABLED) + self.variant(GPIO14SCHMITT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_15_PU_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w + self.variant(GPIO14SCHMITT_A::ENABLED) } } -#[doc = "Driving control enabled for GPIO15.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[doc = "Field `reg_gpio_14_drv` reader - Driving control enabled for GPIO14."] +pub type REG_GPIO_14_DRV_R = crate::FieldReader; +#[doc = "Driving control enabled for GPIO14.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_15_DRV_A { +pub enum GPIO14DRIVING_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_15_DRV_A) -> Self { + fn from(variant: GPIO14DRIVING_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_15_drv` reader - Driving control enabled for GPIO15."] -pub struct REG_GPIO_15_DRV_R(crate::FieldReader); -impl REG_GPIO_15_DRV_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_15_DRV_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_14_DRV_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 0 => Some(REG_GPIO_15_DRV_A::DISABLED), - 1 => Some(REG_GPIO_15_DRV_A::ENABLED), + 0 => Some(GPIO14DRIVING_A::DISABLED), + 1 => Some(GPIO14DRIVING_A::ENABLED), _ => None, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_15_DRV_A::DISABLED + *self == GPIO14DRIVING_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_15_DRV_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_15_DRV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO14DRIVING_A::ENABLED } } -#[doc = "Field `reg_gpio_15_drv` writer - Driving control enabled for GPIO15."] -pub struct REG_GPIO_15_DRV_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_15_DRV_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_15_DRV_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +#[doc = "Field `reg_gpio_14_drv` writer - Driving control enabled for GPIO14."] +pub type REG_GPIO_14_DRV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL7_SPEC, u8, GPIO14DRIVING_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_14_DRV_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_15_DRV_A::DISABLED) + self.variant(GPIO14DRIVING_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_15_DRV_A::ENABLED) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 18)) | ((value as u32 & 0x03) << 18); - self.w + self.variant(GPIO14DRIVING_A::ENABLED) } } -#[doc = "Schmitt trigger enabled for GPIO15.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_15_SMT_A { +#[doc = "Field `reg_gpio_14_pu` reader - Pull Up Resistor for GPIO14."] +pub type REG_GPIO_14_PU_R = crate::BitReader; +#[doc = "Pull Up Resistor for GPIO14.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO14PULL_UP_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_15_SMT_A) -> Self { + fn from(variant: GPIO14PULL_UP_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_15_smt` reader - Schmitt trigger enabled for GPIO15."] -pub struct REG_GPIO_15_SMT_R(crate::FieldReader); -impl REG_GPIO_15_SMT_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_15_SMT_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_14_PU_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_15_SMT_A { + pub fn variant(&self) -> GPIO14PULL_UP_RESISTOR_A { match self.bits { - false => REG_GPIO_15_SMT_A::DISABLED, - true => REG_GPIO_15_SMT_A::ENABLED, + false => GPIO14PULL_UP_RESISTOR_A::DISABLED, + true => GPIO14PULL_UP_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_15_SMT_A::DISABLED + *self == GPIO14PULL_UP_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_15_SMT_A::ENABLED + *self == GPIO14PULL_UP_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_15_SMT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_15_smt` writer - Schmitt trigger enabled for GPIO15."] -pub struct REG_GPIO_15_SMT_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_15_SMT_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_15_SMT_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_14_pu` writer - Pull Up Resistor for GPIO14."] +pub type REG_GPIO_14_PU_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL7_SPEC, GPIO14PULL_UP_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_14_PU_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_15_SMT_A::DISABLED) + self.variant(GPIO14PULL_UP_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_15_SMT_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w + self.variant(GPIO14PULL_UP_RESISTOR_A::ENABLED) } } -#[doc = "Input enable for GPIO15.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_15_IE_A { +#[doc = "Field `reg_gpio_14_pd` reader - Pull Down Resistor for GPIO14."] +pub type REG_GPIO_14_PD_R = crate::BitReader; +#[doc = "Pull Down Resistor for GPIO14.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO14PULL_DOWN_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_15_IE_A) -> Self { + fn from(variant: GPIO14PULL_DOWN_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_15_ie` reader - Input enable for GPIO15."] -pub struct REG_GPIO_15_IE_R(crate::FieldReader); -impl REG_GPIO_15_IE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_15_IE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_14_PD_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_15_IE_A { + pub fn variant(&self) -> GPIO14PULL_DOWN_RESISTOR_A { match self.bits { - false => REG_GPIO_15_IE_A::DISABLED, - true => REG_GPIO_15_IE_A::ENABLED, + false => GPIO14PULL_DOWN_RESISTOR_A::DISABLED, + true => GPIO14PULL_DOWN_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_15_IE_A::DISABLED + *self == GPIO14PULL_DOWN_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_15_IE_A::ENABLED + *self == GPIO14PULL_DOWN_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_15_IE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_15_ie` writer - Input enable for GPIO15."] -pub struct REG_GPIO_15_IE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_15_IE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_15_IE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_14_pd` writer - Pull Down Resistor for GPIO14."] +pub type REG_GPIO_14_PD_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL7_SPEC, GPIO14PULL_DOWN_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_14_PD_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_15_IE_A::DISABLED) + self.variant(GPIO14PULL_DOWN_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_15_IE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w + self.variant(GPIO14PULL_DOWN_RESISTOR_A::ENABLED) } } +#[doc = "Field `reg_gpio_14_func_sel` reader - Function select for GPIO14."] +pub type REG_GPIO_14_FUNC_SEL_R = crate::FieldReader; #[doc = "Function select for GPIO14.\n\nValue on reset: 14"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_14_FUNC_SEL_A { +pub enum GPIO14FUNCTION_SELECT_A { #[doc = "4: `100`"] SPI_SS = 4, #[doc = "6: `110`"] @@ -613,669 +314,639 @@ pub enum REG_GPIO_14_FUNC_SEL_A { #[doc = "14: `1110`"] E21_TCK = 14, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_14_FUNC_SEL_A) -> Self { + fn from(variant: GPIO14FUNCTION_SELECT_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_14_func_sel` reader - Function select for GPIO14."] -pub struct REG_GPIO_14_FUNC_SEL_R(crate::FieldReader); impl REG_GPIO_14_FUNC_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_14_FUNC_SEL_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 4 => Some(REG_GPIO_14_FUNC_SEL_A::SPI_SS), - 6 => Some(REG_GPIO_14_FUNC_SEL_A::I2C_SCL), - 7 => Some(REG_GPIO_14_FUNC_SEL_A::UART_SIG6), - 8 => Some(REG_GPIO_14_FUNC_SEL_A::PWM_CH4), - 9 => Some(REG_GPIO_14_FUNC_SEL_A::FEM_GPIO_2), - 10 => Some(REG_GPIO_14_FUNC_SEL_A::GPIP_CH2), - 11 => Some(REG_GPIO_14_FUNC_SEL_A::SWGPIO_14), - 14 => Some(REG_GPIO_14_FUNC_SEL_A::E21_TCK), + 4 => Some(GPIO14FUNCTION_SELECT_A::SPI_SS), + 6 => Some(GPIO14FUNCTION_SELECT_A::I2C_SCL), + 7 => Some(GPIO14FUNCTION_SELECT_A::UART_SIG6), + 8 => Some(GPIO14FUNCTION_SELECT_A::PWM_CH4), + 9 => Some(GPIO14FUNCTION_SELECT_A::FEM_GPIO_2), + 10 => Some(GPIO14FUNCTION_SELECT_A::GPIP_CH2), + 11 => Some(GPIO14FUNCTION_SELECT_A::SWGPIO_14), + 14 => Some(GPIO14FUNCTION_SELECT_A::E21_TCK), _ => None, } } #[doc = "Checks if the value of the field is `SPI_SS`"] #[inline(always)] pub fn is_spi_ss(&self) -> bool { - **self == REG_GPIO_14_FUNC_SEL_A::SPI_SS + *self == GPIO14FUNCTION_SELECT_A::SPI_SS } #[doc = "Checks if the value of the field is `I2C_SCL`"] #[inline(always)] pub fn is_i2c_scl(&self) -> bool { - **self == REG_GPIO_14_FUNC_SEL_A::I2C_SCL + *self == GPIO14FUNCTION_SELECT_A::I2C_SCL } #[doc = "Checks if the value of the field is `UART_SIG6`"] #[inline(always)] pub fn is_uart_sig6(&self) -> bool { - **self == REG_GPIO_14_FUNC_SEL_A::UART_SIG6 + *self == GPIO14FUNCTION_SELECT_A::UART_SIG6 } #[doc = "Checks if the value of the field is `PWM_CH4`"] #[inline(always)] pub fn is_pwm_ch4(&self) -> bool { - **self == REG_GPIO_14_FUNC_SEL_A::PWM_CH4 + *self == GPIO14FUNCTION_SELECT_A::PWM_CH4 } #[doc = "Checks if the value of the field is `FEM_GPIO_2`"] #[inline(always)] pub fn is_fem_gpio_2(&self) -> bool { - **self == REG_GPIO_14_FUNC_SEL_A::FEM_GPIO_2 + *self == GPIO14FUNCTION_SELECT_A::FEM_GPIO_2 } #[doc = "Checks if the value of the field is `GPIP_CH2`"] #[inline(always)] pub fn is_gpip_ch2(&self) -> bool { - **self == REG_GPIO_14_FUNC_SEL_A::GPIP_CH2 + *self == GPIO14FUNCTION_SELECT_A::GPIP_CH2 } #[doc = "Checks if the value of the field is `SWGPIO_14`"] #[inline(always)] pub fn is_swgpio_14(&self) -> bool { - **self == REG_GPIO_14_FUNC_SEL_A::SWGPIO_14 + *self == GPIO14FUNCTION_SELECT_A::SWGPIO_14 } #[doc = "Checks if the value of the field is `E21_TCK`"] #[inline(always)] pub fn is_e21_tck(&self) -> bool { - **self == REG_GPIO_14_FUNC_SEL_A::E21_TCK - } -} -impl core::ops::Deref for REG_GPIO_14_FUNC_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO14FUNCTION_SELECT_A::E21_TCK } } #[doc = "Field `reg_gpio_14_func_sel` writer - Function select for GPIO14."] -pub struct REG_GPIO_14_FUNC_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_14_FUNC_SEL_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_14_FUNC_SEL_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +pub type REG_GPIO_14_FUNC_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL7_SPEC, u8, GPIO14FUNCTION_SELECT_A, 4, O>; +impl<'a, const O: u8> REG_GPIO_14_FUNC_SEL_W<'a, O> { #[doc = "`100`"] #[inline(always)] pub fn spi_ss(self) -> &'a mut W { - self.variant(REG_GPIO_14_FUNC_SEL_A::SPI_SS) + self.variant(GPIO14FUNCTION_SELECT_A::SPI_SS) } #[doc = "`110`"] #[inline(always)] pub fn i2c_scl(self) -> &'a mut W { - self.variant(REG_GPIO_14_FUNC_SEL_A::I2C_SCL) + self.variant(GPIO14FUNCTION_SELECT_A::I2C_SCL) } #[doc = "`111`"] #[inline(always)] pub fn uart_sig6(self) -> &'a mut W { - self.variant(REG_GPIO_14_FUNC_SEL_A::UART_SIG6) + self.variant(GPIO14FUNCTION_SELECT_A::UART_SIG6) } #[doc = "`1000`"] #[inline(always)] pub fn pwm_ch4(self) -> &'a mut W { - self.variant(REG_GPIO_14_FUNC_SEL_A::PWM_CH4) + self.variant(GPIO14FUNCTION_SELECT_A::PWM_CH4) } #[doc = "`1001`"] #[inline(always)] pub fn fem_gpio_2(self) -> &'a mut W { - self.variant(REG_GPIO_14_FUNC_SEL_A::FEM_GPIO_2) + self.variant(GPIO14FUNCTION_SELECT_A::FEM_GPIO_2) } #[doc = "`1010`"] #[inline(always)] pub fn gpip_ch2(self) -> &'a mut W { - self.variant(REG_GPIO_14_FUNC_SEL_A::GPIP_CH2) + self.variant(GPIO14FUNCTION_SELECT_A::GPIP_CH2) } #[doc = "`1011`"] #[inline(always)] pub fn swgpio_14(self) -> &'a mut W { - self.variant(REG_GPIO_14_FUNC_SEL_A::SWGPIO_14) + self.variant(GPIO14FUNCTION_SELECT_A::SWGPIO_14) } #[doc = "`1110`"] #[inline(always)] pub fn e21_tck(self) -> &'a mut W { - self.variant(REG_GPIO_14_FUNC_SEL_A::E21_TCK) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 8)) | ((value as u32 & 0x0f) << 8); - self.w + self.variant(GPIO14FUNCTION_SELECT_A::E21_TCK) } } -#[doc = "Pull Down Resistor for GPIO14.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_14_PD_A { +#[doc = "Field `reg_gpio_15_ie` reader - Input enable for GPIO15."] +pub type REG_GPIO_15_IE_R = crate::BitReader; +#[doc = "Input enable for GPIO15.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO15INPUT_ENABLED_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_14_PD_A) -> Self { + fn from(variant: GPIO15INPUT_ENABLED_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_14_pd` reader - Pull Down Resistor for GPIO14."] -pub struct REG_GPIO_14_PD_R(crate::FieldReader); -impl REG_GPIO_14_PD_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_14_PD_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_15_IE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_14_PD_A { + pub fn variant(&self) -> GPIO15INPUT_ENABLED_A { match self.bits { - false => REG_GPIO_14_PD_A::DISABLED, - true => REG_GPIO_14_PD_A::ENABLED, + false => GPIO15INPUT_ENABLED_A::DISABLED, + true => GPIO15INPUT_ENABLED_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_14_PD_A::DISABLED + *self == GPIO15INPUT_ENABLED_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_14_PD_A::ENABLED + *self == GPIO15INPUT_ENABLED_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_14_PD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_14_pd` writer - Pull Down Resistor for GPIO14."] -pub struct REG_GPIO_14_PD_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_14_PD_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_14_PD_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_15_ie` writer - Input enable for GPIO15."] +pub type REG_GPIO_15_IE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL7_SPEC, GPIO15INPUT_ENABLED_A, O>; +impl<'a, const O: u8> REG_GPIO_15_IE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_14_PD_A::DISABLED) + self.variant(GPIO15INPUT_ENABLED_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_14_PD_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w + self.variant(GPIO15INPUT_ENABLED_A::ENABLED) } } -#[doc = "Pull Up Resistor for GPIO14.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_14_PU_A { +#[doc = "Field `reg_gpio_15_smt` reader - Schmitt trigger enabled for GPIO15."] +pub type REG_GPIO_15_SMT_R = crate::BitReader; +#[doc = "Schmitt trigger enabled for GPIO15.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO15SCHMITT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_14_PU_A) -> Self { + fn from(variant: GPIO15SCHMITT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_14_pu` reader - Pull Up Resistor for GPIO14."] -pub struct REG_GPIO_14_PU_R(crate::FieldReader); -impl REG_GPIO_14_PU_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_14_PU_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_15_SMT_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_14_PU_A { + pub fn variant(&self) -> GPIO15SCHMITT_A { match self.bits { - false => REG_GPIO_14_PU_A::DISABLED, - true => REG_GPIO_14_PU_A::ENABLED, + false => GPIO15SCHMITT_A::DISABLED, + true => GPIO15SCHMITT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_14_PU_A::DISABLED + *self == GPIO15SCHMITT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_14_PU_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_14_PU_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO15SCHMITT_A::ENABLED } } -#[doc = "Field `reg_gpio_14_pu` writer - Pull Up Resistor for GPIO14."] -pub struct REG_GPIO_14_PU_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_14_PU_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_14_PU_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_15_smt` writer - Schmitt trigger enabled for GPIO15."] +pub type REG_GPIO_15_SMT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL7_SPEC, GPIO15SCHMITT_A, O>; +impl<'a, const O: u8> REG_GPIO_15_SMT_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_14_PU_A::DISABLED) + self.variant(GPIO15SCHMITT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_14_PU_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w + self.variant(GPIO15SCHMITT_A::ENABLED) } } -#[doc = "Driving control enabled for GPIO14.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[doc = "Field `reg_gpio_15_drv` reader - Driving control enabled for GPIO15."] +pub type REG_GPIO_15_DRV_R = crate::FieldReader; +#[doc = "Driving control enabled for GPIO15.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_14_DRV_A { +pub enum GPIO15DRIVING_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_14_DRV_A) -> Self { + fn from(variant: GPIO15DRIVING_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_14_drv` reader - Driving control enabled for GPIO14."] -pub struct REG_GPIO_14_DRV_R(crate::FieldReader); -impl REG_GPIO_14_DRV_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_14_DRV_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_15_DRV_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 0 => Some(REG_GPIO_14_DRV_A::DISABLED), - 1 => Some(REG_GPIO_14_DRV_A::ENABLED), + 0 => Some(GPIO15DRIVING_A::DISABLED), + 1 => Some(GPIO15DRIVING_A::ENABLED), _ => None, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_14_DRV_A::DISABLED + *self == GPIO15DRIVING_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_14_DRV_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_14_DRV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO15DRIVING_A::ENABLED } } -#[doc = "Field `reg_gpio_14_drv` writer - Driving control enabled for GPIO14."] -pub struct REG_GPIO_14_DRV_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_14_DRV_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_14_DRV_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +#[doc = "Field `reg_gpio_15_drv` writer - Driving control enabled for GPIO15."] +pub type REG_GPIO_15_DRV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL7_SPEC, u8, GPIO15DRIVING_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_15_DRV_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_14_DRV_A::DISABLED) + self.variant(GPIO15DRIVING_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_14_DRV_A::ENABLED) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 2)) | ((value as u32 & 0x03) << 2); - self.w + self.variant(GPIO15DRIVING_A::ENABLED) } } -#[doc = "Schmitt trigger enabled for GPIO14.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_14_SMT_A { +#[doc = "Field `reg_gpio_15_pu` reader - Pull Up Resistor for GPIO15."] +pub type REG_GPIO_15_PU_R = crate::BitReader; +#[doc = "Pull Up Resistor for GPIO15.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO15PULL_UP_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_14_SMT_A) -> Self { + fn from(variant: GPIO15PULL_UP_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_14_smt` reader - Schmitt trigger enabled for GPIO14."] -pub struct REG_GPIO_14_SMT_R(crate::FieldReader); -impl REG_GPIO_14_SMT_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_14_SMT_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_15_PU_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_14_SMT_A { + pub fn variant(&self) -> GPIO15PULL_UP_RESISTOR_A { match self.bits { - false => REG_GPIO_14_SMT_A::DISABLED, - true => REG_GPIO_14_SMT_A::ENABLED, + false => GPIO15PULL_UP_RESISTOR_A::DISABLED, + true => GPIO15PULL_UP_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_14_SMT_A::DISABLED + *self == GPIO15PULL_UP_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_14_SMT_A::ENABLED + *self == GPIO15PULL_UP_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_14_SMT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_14_smt` writer - Schmitt trigger enabled for GPIO14."] -pub struct REG_GPIO_14_SMT_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_14_SMT_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_14_SMT_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_15_pu` writer - Pull Up Resistor for GPIO15."] +pub type REG_GPIO_15_PU_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL7_SPEC, GPIO15PULL_UP_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_15_PU_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_14_SMT_A::DISABLED) + self.variant(GPIO15PULL_UP_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_14_SMT_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w + self.variant(GPIO15PULL_UP_RESISTOR_A::ENABLED) } } -#[doc = "Input enable for GPIO14.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_14_IE_A { +#[doc = "Field `reg_gpio_15_pd` reader - Pull Down Resistor for GPIO15."] +pub type REG_GPIO_15_PD_R = crate::BitReader; +#[doc = "Pull Down Resistor for GPIO15.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO15PULL_DOWN_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_14_IE_A) -> Self { + fn from(variant: GPIO15PULL_DOWN_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_14_ie` reader - Input enable for GPIO14."] -pub struct REG_GPIO_14_IE_R(crate::FieldReader); -impl REG_GPIO_14_IE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_14_IE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_15_PD_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_14_IE_A { + pub fn variant(&self) -> GPIO15PULL_DOWN_RESISTOR_A { match self.bits { - false => REG_GPIO_14_IE_A::DISABLED, - true => REG_GPIO_14_IE_A::ENABLED, + false => GPIO15PULL_DOWN_RESISTOR_A::DISABLED, + true => GPIO15PULL_DOWN_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_14_IE_A::DISABLED + *self == GPIO15PULL_DOWN_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_14_IE_A::ENABLED + *self == GPIO15PULL_DOWN_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_14_IE_R { - type Target = crate::FieldReader; +#[doc = "Field `reg_gpio_15_pd` writer - Pull Down Resistor for GPIO15."] +pub type REG_GPIO_15_PD_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL7_SPEC, GPIO15PULL_DOWN_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_15_PD_W<'a, O> { + #[doc = "`0`"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn disabled(self) -> &'a mut W { + self.variant(GPIO15PULL_DOWN_RESISTOR_A::DISABLED) + } + #[doc = "`1`"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(GPIO15PULL_DOWN_RESISTOR_A::ENABLED) } } -#[doc = "Field `reg_gpio_14_ie` writer - Input enable for GPIO14."] -pub struct REG_GPIO_14_IE_W<'a> { - w: &'a mut W, +#[doc = "Field `reg_gpio_15_func_sel` reader - Function select for GPIO15."] +pub type REG_GPIO_15_FUNC_SEL_R = crate::FieldReader; +#[doc = "Function select for GPIO15.\n\nValue on reset: 11"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum GPIO15FUNCTION_SELECT_A { + #[doc = "4: `100`"] + SPI_SCLK = 4, + #[doc = "6: `110`"] + I2C_SDA = 6, + #[doc = "7: `111`"] + UART_SIG7 = 7, + #[doc = "8: `1000`"] + PWM_CH0 = 8, + #[doc = "9: `1001`"] + FEM_GPIO_3 = 9, + #[doc = "10: `1010`"] + PSW_IRRCV_OUT_GPIP_CH11 = 10, + #[doc = "11: `1011`"] + SWGPIO_15 = 11, + #[doc = "14: `1110`"] + E21_TDO = 14, } -impl<'a> REG_GPIO_14_IE_W<'a> { - #[doc = r"Writes `variant` to the field"] +impl From for u8 { #[inline(always)] - pub fn variant(self, variant: REG_GPIO_14_IE_A) -> &'a mut W { - self.bit(variant.into()) + fn from(variant: GPIO15FUNCTION_SELECT_A) -> Self { + variant as _ } - #[doc = "`0`"] +} +impl REG_GPIO_15_FUNC_SEL_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_14_IE_A::DISABLED) + pub fn variant(&self) -> Option { + match self.bits { + 4 => Some(GPIO15FUNCTION_SELECT_A::SPI_SCLK), + 6 => Some(GPIO15FUNCTION_SELECT_A::I2C_SDA), + 7 => Some(GPIO15FUNCTION_SELECT_A::UART_SIG7), + 8 => Some(GPIO15FUNCTION_SELECT_A::PWM_CH0), + 9 => Some(GPIO15FUNCTION_SELECT_A::FEM_GPIO_3), + 10 => Some(GPIO15FUNCTION_SELECT_A::PSW_IRRCV_OUT_GPIP_CH11), + 11 => Some(GPIO15FUNCTION_SELECT_A::SWGPIO_15), + 14 => Some(GPIO15FUNCTION_SELECT_A::E21_TDO), + _ => None, + } } - #[doc = "`1`"] + #[doc = "Checks if the value of the field is `SPI_SCLK`"] #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_14_IE_A::ENABLED) + pub fn is_spi_sclk(&self) -> bool { + *self == GPIO15FUNCTION_SELECT_A::SPI_SCLK + } + #[doc = "Checks if the value of the field is `I2C_SDA`"] + #[inline(always)] + pub fn is_i2c_sda(&self) -> bool { + *self == GPIO15FUNCTION_SELECT_A::I2C_SDA + } + #[doc = "Checks if the value of the field is `UART_SIG7`"] + #[inline(always)] + pub fn is_uart_sig7(&self) -> bool { + *self == GPIO15FUNCTION_SELECT_A::UART_SIG7 + } + #[doc = "Checks if the value of the field is `PWM_CH0`"] + #[inline(always)] + pub fn is_pwm_ch0(&self) -> bool { + *self == GPIO15FUNCTION_SELECT_A::PWM_CH0 + } + #[doc = "Checks if the value of the field is `FEM_GPIO_3`"] + #[inline(always)] + pub fn is_fem_gpio_3(&self) -> bool { + *self == GPIO15FUNCTION_SELECT_A::FEM_GPIO_3 } - #[doc = r"Sets the field bit"] + #[doc = "Checks if the value of the field is `PSW_IRRCV_OUT_GPIP_CH11`"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn is_psw_irrcv_out_gpip_ch11(&self) -> bool { + *self == GPIO15FUNCTION_SELECT_A::PSW_IRRCV_OUT_GPIP_CH11 } - #[doc = r"Clears the field bit"] + #[doc = "Checks if the value of the field is `SWGPIO_15`"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn is_swgpio_15(&self) -> bool { + *self == GPIO15FUNCTION_SELECT_A::SWGPIO_15 } - #[doc = r"Writes raw bits to the field"] + #[doc = "Checks if the value of the field is `E21_TDO`"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn is_e21_tdo(&self) -> bool { + *self == GPIO15FUNCTION_SELECT_A::E21_TDO } } -impl R { - #[doc = "Bits 24:27 - Function select for GPIO15."] +#[doc = "Field `reg_gpio_15_func_sel` writer - Function select for GPIO15."] +pub type REG_GPIO_15_FUNC_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL7_SPEC, u8, GPIO15FUNCTION_SELECT_A, 4, O>; +impl<'a, const O: u8> REG_GPIO_15_FUNC_SEL_W<'a, O> { + #[doc = "`100`"] #[inline(always)] - pub fn reg_gpio_15_func_sel(&self) -> REG_GPIO_15_FUNC_SEL_R { - REG_GPIO_15_FUNC_SEL_R::new(((self.bits >> 24) & 0x0f) as u8) + pub fn spi_sclk(self) -> &'a mut W { + self.variant(GPIO15FUNCTION_SELECT_A::SPI_SCLK) } - #[doc = "Bit 21 - Pull Down Resistor for GPIO15."] + #[doc = "`110`"] #[inline(always)] - pub fn reg_gpio_15_pd(&self) -> REG_GPIO_15_PD_R { - REG_GPIO_15_PD_R::new(((self.bits >> 21) & 0x01) != 0) + pub fn i2c_sda(self) -> &'a mut W { + self.variant(GPIO15FUNCTION_SELECT_A::I2C_SDA) } - #[doc = "Bit 20 - Pull Up Resistor for GPIO15."] + #[doc = "`111`"] #[inline(always)] - pub fn reg_gpio_15_pu(&self) -> REG_GPIO_15_PU_R { - REG_GPIO_15_PU_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn uart_sig7(self) -> &'a mut W { + self.variant(GPIO15FUNCTION_SELECT_A::UART_SIG7) } - #[doc = "Bits 18:19 - Driving control enabled for GPIO15."] + #[doc = "`1000`"] #[inline(always)] - pub fn reg_gpio_15_drv(&self) -> REG_GPIO_15_DRV_R { - REG_GPIO_15_DRV_R::new(((self.bits >> 18) & 0x03) as u8) + pub fn pwm_ch0(self) -> &'a mut W { + self.variant(GPIO15FUNCTION_SELECT_A::PWM_CH0) } - #[doc = "Bit 17 - Schmitt trigger enabled for GPIO15."] + #[doc = "`1001`"] #[inline(always)] - pub fn reg_gpio_15_smt(&self) -> REG_GPIO_15_SMT_R { - REG_GPIO_15_SMT_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn fem_gpio_3(self) -> &'a mut W { + self.variant(GPIO15FUNCTION_SELECT_A::FEM_GPIO_3) } - #[doc = "Bit 16 - Input enable for GPIO15."] + #[doc = "`1010`"] #[inline(always)] - pub fn reg_gpio_15_ie(&self) -> REG_GPIO_15_IE_R { - REG_GPIO_15_IE_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn psw_irrcv_out_gpip_ch11(self) -> &'a mut W { + self.variant(GPIO15FUNCTION_SELECT_A::PSW_IRRCV_OUT_GPIP_CH11) + } + #[doc = "`1011`"] + #[inline(always)] + pub fn swgpio_15(self) -> &'a mut W { + self.variant(GPIO15FUNCTION_SELECT_A::SWGPIO_15) + } + #[doc = "`1110`"] + #[inline(always)] + pub fn e21_tdo(self) -> &'a mut W { + self.variant(GPIO15FUNCTION_SELECT_A::E21_TDO) + } +} +impl R { + #[doc = "Bit 0 - Input enable for GPIO14."] + #[inline(always)] + pub fn reg_gpio_14_ie(&self) -> REG_GPIO_14_IE_R { + REG_GPIO_14_IE_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Schmitt trigger enabled for GPIO14."] + #[inline(always)] + pub fn reg_gpio_14_smt(&self) -> REG_GPIO_14_SMT_R { + REG_GPIO_14_SMT_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bits 2:3 - Driving control enabled for GPIO14."] + #[inline(always)] + pub fn reg_gpio_14_drv(&self) -> REG_GPIO_14_DRV_R { + REG_GPIO_14_DRV_R::new(((self.bits >> 2) & 3) as u8) + } + #[doc = "Bit 4 - Pull Up Resistor for GPIO14."] + #[inline(always)] + pub fn reg_gpio_14_pu(&self) -> REG_GPIO_14_PU_R { + REG_GPIO_14_PU_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Pull Down Resistor for GPIO14."] + #[inline(always)] + pub fn reg_gpio_14_pd(&self) -> REG_GPIO_14_PD_R { + REG_GPIO_14_PD_R::new(((self.bits >> 5) & 1) != 0) } #[doc = "Bits 8:11 - Function select for GPIO14."] #[inline(always)] pub fn reg_gpio_14_func_sel(&self) -> REG_GPIO_14_FUNC_SEL_R { REG_GPIO_14_FUNC_SEL_R::new(((self.bits >> 8) & 0x0f) as u8) } - #[doc = "Bit 5 - Pull Down Resistor for GPIO14."] + #[doc = "Bit 16 - Input enable for GPIO15."] #[inline(always)] - pub fn reg_gpio_14_pd(&self) -> REG_GPIO_14_PD_R { - REG_GPIO_14_PD_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn reg_gpio_15_ie(&self) -> REG_GPIO_15_IE_R { + REG_GPIO_15_IE_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 4 - Pull Up Resistor for GPIO14."] + #[doc = "Bit 17 - Schmitt trigger enabled for GPIO15."] #[inline(always)] - pub fn reg_gpio_14_pu(&self) -> REG_GPIO_14_PU_R { - REG_GPIO_14_PU_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn reg_gpio_15_smt(&self) -> REG_GPIO_15_SMT_R { + REG_GPIO_15_SMT_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bits 2:3 - Driving control enabled for GPIO14."] + #[doc = "Bits 18:19 - Driving control enabled for GPIO15."] #[inline(always)] - pub fn reg_gpio_14_drv(&self) -> REG_GPIO_14_DRV_R { - REG_GPIO_14_DRV_R::new(((self.bits >> 2) & 0x03) as u8) + pub fn reg_gpio_15_drv(&self) -> REG_GPIO_15_DRV_R { + REG_GPIO_15_DRV_R::new(((self.bits >> 18) & 3) as u8) } - #[doc = "Bit 1 - Schmitt trigger enabled for GPIO14."] + #[doc = "Bit 20 - Pull Up Resistor for GPIO15."] #[inline(always)] - pub fn reg_gpio_14_smt(&self) -> REG_GPIO_14_SMT_R { - REG_GPIO_14_SMT_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn reg_gpio_15_pu(&self) -> REG_GPIO_15_PU_R { + REG_GPIO_15_PU_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bit 0 - Input enable for GPIO14."] + #[doc = "Bit 21 - Pull Down Resistor for GPIO15."] #[inline(always)] - pub fn reg_gpio_14_ie(&self) -> REG_GPIO_14_IE_R { - REG_GPIO_14_IE_R::new((self.bits & 0x01) != 0) + pub fn reg_gpio_15_pd(&self) -> REG_GPIO_15_PD_R { + REG_GPIO_15_PD_R::new(((self.bits >> 21) & 1) != 0) } -} -impl W { #[doc = "Bits 24:27 - Function select for GPIO15."] #[inline(always)] - pub fn reg_gpio_15_func_sel(&mut self) -> REG_GPIO_15_FUNC_SEL_W { - REG_GPIO_15_FUNC_SEL_W { w: self } + pub fn reg_gpio_15_func_sel(&self) -> REG_GPIO_15_FUNC_SEL_R { + REG_GPIO_15_FUNC_SEL_R::new(((self.bits >> 24) & 0x0f) as u8) } - #[doc = "Bit 21 - Pull Down Resistor for GPIO15."] +} +impl W { + #[doc = "Bit 0 - Input enable for GPIO14."] #[inline(always)] - pub fn reg_gpio_15_pd(&mut self) -> REG_GPIO_15_PD_W { - REG_GPIO_15_PD_W { w: self } + #[must_use] + pub fn reg_gpio_14_ie(&mut self) -> REG_GPIO_14_IE_W<0> { + REG_GPIO_14_IE_W::new(self) } - #[doc = "Bit 20 - Pull Up Resistor for GPIO15."] + #[doc = "Bit 1 - Schmitt trigger enabled for GPIO14."] #[inline(always)] - pub fn reg_gpio_15_pu(&mut self) -> REG_GPIO_15_PU_W { - REG_GPIO_15_PU_W { w: self } + #[must_use] + pub fn reg_gpio_14_smt(&mut self) -> REG_GPIO_14_SMT_W<1> { + REG_GPIO_14_SMT_W::new(self) } - #[doc = "Bits 18:19 - Driving control enabled for GPIO15."] + #[doc = "Bits 2:3 - Driving control enabled for GPIO14."] #[inline(always)] - pub fn reg_gpio_15_drv(&mut self) -> REG_GPIO_15_DRV_W { - REG_GPIO_15_DRV_W { w: self } + #[must_use] + pub fn reg_gpio_14_drv(&mut self) -> REG_GPIO_14_DRV_W<2> { + REG_GPIO_14_DRV_W::new(self) } - #[doc = "Bit 17 - Schmitt trigger enabled for GPIO15."] + #[doc = "Bit 4 - Pull Up Resistor for GPIO14."] #[inline(always)] - pub fn reg_gpio_15_smt(&mut self) -> REG_GPIO_15_SMT_W { - REG_GPIO_15_SMT_W { w: self } + #[must_use] + pub fn reg_gpio_14_pu(&mut self) -> REG_GPIO_14_PU_W<4> { + REG_GPIO_14_PU_W::new(self) } - #[doc = "Bit 16 - Input enable for GPIO15."] + #[doc = "Bit 5 - Pull Down Resistor for GPIO14."] #[inline(always)] - pub fn reg_gpio_15_ie(&mut self) -> REG_GPIO_15_IE_W { - REG_GPIO_15_IE_W { w: self } + #[must_use] + pub fn reg_gpio_14_pd(&mut self) -> REG_GPIO_14_PD_W<5> { + REG_GPIO_14_PD_W::new(self) } #[doc = "Bits 8:11 - Function select for GPIO14."] #[inline(always)] - pub fn reg_gpio_14_func_sel(&mut self) -> REG_GPIO_14_FUNC_SEL_W { - REG_GPIO_14_FUNC_SEL_W { w: self } + #[must_use] + pub fn reg_gpio_14_func_sel(&mut self) -> REG_GPIO_14_FUNC_SEL_W<8> { + REG_GPIO_14_FUNC_SEL_W::new(self) } - #[doc = "Bit 5 - Pull Down Resistor for GPIO14."] + #[doc = "Bit 16 - Input enable for GPIO15."] #[inline(always)] - pub fn reg_gpio_14_pd(&mut self) -> REG_GPIO_14_PD_W { - REG_GPIO_14_PD_W { w: self } + #[must_use] + pub fn reg_gpio_15_ie(&mut self) -> REG_GPIO_15_IE_W<16> { + REG_GPIO_15_IE_W::new(self) } - #[doc = "Bit 4 - Pull Up Resistor for GPIO14."] + #[doc = "Bit 17 - Schmitt trigger enabled for GPIO15."] #[inline(always)] - pub fn reg_gpio_14_pu(&mut self) -> REG_GPIO_14_PU_W { - REG_GPIO_14_PU_W { w: self } + #[must_use] + pub fn reg_gpio_15_smt(&mut self) -> REG_GPIO_15_SMT_W<17> { + REG_GPIO_15_SMT_W::new(self) } - #[doc = "Bits 2:3 - Driving control enabled for GPIO14."] + #[doc = "Bits 18:19 - Driving control enabled for GPIO15."] #[inline(always)] - pub fn reg_gpio_14_drv(&mut self) -> REG_GPIO_14_DRV_W { - REG_GPIO_14_DRV_W { w: self } + #[must_use] + pub fn reg_gpio_15_drv(&mut self) -> REG_GPIO_15_DRV_W<18> { + REG_GPIO_15_DRV_W::new(self) } - #[doc = "Bit 1 - Schmitt trigger enabled for GPIO14."] + #[doc = "Bit 20 - Pull Up Resistor for GPIO15."] #[inline(always)] - pub fn reg_gpio_14_smt(&mut self) -> REG_GPIO_14_SMT_W { - REG_GPIO_14_SMT_W { w: self } + #[must_use] + pub fn reg_gpio_15_pu(&mut self) -> REG_GPIO_15_PU_W<20> { + REG_GPIO_15_PU_W::new(self) } - #[doc = "Bit 0 - Input enable for GPIO14."] + #[doc = "Bit 21 - Pull Down Resistor for GPIO15."] + #[inline(always)] + #[must_use] + pub fn reg_gpio_15_pd(&mut self) -> REG_GPIO_15_PD_W<21> { + REG_GPIO_15_PD_W::new(self) + } + #[doc = "Bits 24:27 - Function select for GPIO15."] #[inline(always)] - pub fn reg_gpio_14_ie(&mut self) -> REG_GPIO_14_IE_W { - REG_GPIO_14_IE_W { w: self } + #[must_use] + pub fn reg_gpio_15_func_sel(&mut self) -> REG_GPIO_15_FUNC_SEL_W<24> { + REG_GPIO_15_FUNC_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -1293,11 +964,10 @@ impl crate::Readable for GPIO_CFGCTL7_SPEC { #[doc = "`write(|w| ..)` method takes [gpio_cfgctl7::W](W) writer structure"] impl crate::Writable for GPIO_CFGCTL7_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets GPIO_CFGCTL7 to value 0x0b03_0e03"] impl crate::Resettable for GPIO_CFGCTL7_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0b03_0e03 - } + const RESET_VALUE: Self::Ux = 0x0b03_0e03; } diff --git a/src/glb/gpio_cfgctl8.rs b/src/glb/gpio_cfgctl8.rs index a71c807..e961d63 100644 --- a/src/glb/gpio_cfgctl8.rs +++ b/src/glb/gpio_cfgctl8.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,588 +28,275 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Function select for GPIO17.\n\nValue on reset: 14"] -#[derive(Clone, Copy, Debug, PartialEq)] -#[repr(u8)] -pub enum REG_GPIO_17_FUNC_SEL_A { - #[doc = "2: `10`"] - SF_D3 = 2, - #[doc = "4: `100`"] - SPI_MOSI_SPI_MISO = 4, - #[doc = "6: `110`"] - I2C_SDA = 6, - #[doc = "7: `111`"] - UART_SIG1 = 7, - #[doc = "8: `1000`"] - PWM_CH2 = 8, - #[doc = "9: `1001`"] - FEM_GPIO_1 = 9, - #[doc = "10: `1010`"] - PMIP_DC_TP_OUT = 10, - #[doc = "11: `1011`"] - SWGPIO_17 = 11, - #[doc = "14: `1110`"] - E21_TDI = 14, -} -impl From for u8 { - #[inline(always)] - fn from(variant: REG_GPIO_17_FUNC_SEL_A) -> Self { - variant as _ - } -} -#[doc = "Field `reg_gpio_17_func_sel` reader - Function select for GPIO17."] -pub struct REG_GPIO_17_FUNC_SEL_R(crate::FieldReader); -impl REG_GPIO_17_FUNC_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_17_FUNC_SEL_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 2 => Some(REG_GPIO_17_FUNC_SEL_A::SF_D3), - 4 => Some(REG_GPIO_17_FUNC_SEL_A::SPI_MOSI_SPI_MISO), - 6 => Some(REG_GPIO_17_FUNC_SEL_A::I2C_SDA), - 7 => Some(REG_GPIO_17_FUNC_SEL_A::UART_SIG1), - 8 => Some(REG_GPIO_17_FUNC_SEL_A::PWM_CH2), - 9 => Some(REG_GPIO_17_FUNC_SEL_A::FEM_GPIO_1), - 10 => Some(REG_GPIO_17_FUNC_SEL_A::PMIP_DC_TP_OUT), - 11 => Some(REG_GPIO_17_FUNC_SEL_A::SWGPIO_17), - 14 => Some(REG_GPIO_17_FUNC_SEL_A::E21_TDI), - _ => None, - } - } - #[doc = "Checks if the value of the field is `SF_D3`"] - #[inline(always)] - pub fn is_sf_d3(&self) -> bool { - **self == REG_GPIO_17_FUNC_SEL_A::SF_D3 - } - #[doc = "Checks if the value of the field is `SPI_MOSI_SPI_MISO`"] - #[inline(always)] - pub fn is_spi_mosi_spi_miso(&self) -> bool { - **self == REG_GPIO_17_FUNC_SEL_A::SPI_MOSI_SPI_MISO - } - #[doc = "Checks if the value of the field is `I2C_SDA`"] - #[inline(always)] - pub fn is_i2c_sda(&self) -> bool { - **self == REG_GPIO_17_FUNC_SEL_A::I2C_SDA - } - #[doc = "Checks if the value of the field is `UART_SIG1`"] - #[inline(always)] - pub fn is_uart_sig1(&self) -> bool { - **self == REG_GPIO_17_FUNC_SEL_A::UART_SIG1 - } - #[doc = "Checks if the value of the field is `PWM_CH2`"] - #[inline(always)] - pub fn is_pwm_ch2(&self) -> bool { - **self == REG_GPIO_17_FUNC_SEL_A::PWM_CH2 - } - #[doc = "Checks if the value of the field is `FEM_GPIO_1`"] - #[inline(always)] - pub fn is_fem_gpio_1(&self) -> bool { - **self == REG_GPIO_17_FUNC_SEL_A::FEM_GPIO_1 - } - #[doc = "Checks if the value of the field is `PMIP_DC_TP_OUT`"] - #[inline(always)] - pub fn is_pmip_dc_tp_out(&self) -> bool { - **self == REG_GPIO_17_FUNC_SEL_A::PMIP_DC_TP_OUT - } - #[doc = "Checks if the value of the field is `SWGPIO_17`"] - #[inline(always)] - pub fn is_swgpio_17(&self) -> bool { - **self == REG_GPIO_17_FUNC_SEL_A::SWGPIO_17 - } - #[doc = "Checks if the value of the field is `E21_TDI`"] - #[inline(always)] - pub fn is_e21_tdi(&self) -> bool { - **self == REG_GPIO_17_FUNC_SEL_A::E21_TDI - } -} -impl core::ops::Deref for REG_GPIO_17_FUNC_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_17_func_sel` writer - Function select for GPIO17."] -pub struct REG_GPIO_17_FUNC_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_17_FUNC_SEL_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_17_FUNC_SEL_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } - #[doc = "`10`"] - #[inline(always)] - pub fn sf_d3(self) -> &'a mut W { - self.variant(REG_GPIO_17_FUNC_SEL_A::SF_D3) - } - #[doc = "`100`"] - #[inline(always)] - pub fn spi_mosi_spi_miso(self) -> &'a mut W { - self.variant(REG_GPIO_17_FUNC_SEL_A::SPI_MOSI_SPI_MISO) - } - #[doc = "`110`"] - #[inline(always)] - pub fn i2c_sda(self) -> &'a mut W { - self.variant(REG_GPIO_17_FUNC_SEL_A::I2C_SDA) - } - #[doc = "`111`"] - #[inline(always)] - pub fn uart_sig1(self) -> &'a mut W { - self.variant(REG_GPIO_17_FUNC_SEL_A::UART_SIG1) - } - #[doc = "`1000`"] - #[inline(always)] - pub fn pwm_ch2(self) -> &'a mut W { - self.variant(REG_GPIO_17_FUNC_SEL_A::PWM_CH2) - } - #[doc = "`1001`"] - #[inline(always)] - pub fn fem_gpio_1(self) -> &'a mut W { - self.variant(REG_GPIO_17_FUNC_SEL_A::FEM_GPIO_1) - } - #[doc = "`1010`"] - #[inline(always)] - pub fn pmip_dc_tp_out(self) -> &'a mut W { - self.variant(REG_GPIO_17_FUNC_SEL_A::PMIP_DC_TP_OUT) - } - #[doc = "`1011`"] - #[inline(always)] - pub fn swgpio_17(self) -> &'a mut W { - self.variant(REG_GPIO_17_FUNC_SEL_A::SWGPIO_17) - } - #[doc = "`1110`"] - #[inline(always)] - pub fn e21_tdi(self) -> &'a mut W { - self.variant(REG_GPIO_17_FUNC_SEL_A::E21_TDI) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 24)) | ((value as u32 & 0x0f) << 24); - self.w - } -} -#[doc = "Pull Down Resistor for GPIO17.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_17_PD_A { +#[doc = "Field `reg_gpio_16_ie` reader - Input enable for GPIO16."] +pub type REG_GPIO_16_IE_R = crate::BitReader; +#[doc = "Input enable for GPIO16.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO16INPUT_ENABLED_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_17_PD_A) -> Self { + fn from(variant: GPIO16INPUT_ENABLED_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_17_pd` reader - Pull Down Resistor for GPIO17."] -pub struct REG_GPIO_17_PD_R(crate::FieldReader); -impl REG_GPIO_17_PD_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_17_PD_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_16_IE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_17_PD_A { + pub fn variant(&self) -> GPIO16INPUT_ENABLED_A { match self.bits { - false => REG_GPIO_17_PD_A::DISABLED, - true => REG_GPIO_17_PD_A::ENABLED, + false => GPIO16INPUT_ENABLED_A::DISABLED, + true => GPIO16INPUT_ENABLED_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_17_PD_A::DISABLED + *self == GPIO16INPUT_ENABLED_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_17_PD_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_17_PD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO16INPUT_ENABLED_A::ENABLED } } -#[doc = "Field `reg_gpio_17_pd` writer - Pull Down Resistor for GPIO17."] -pub struct REG_GPIO_17_PD_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_17_PD_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_17_PD_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_16_ie` writer - Input enable for GPIO16."] +pub type REG_GPIO_16_IE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL8_SPEC, GPIO16INPUT_ENABLED_A, O>; +impl<'a, const O: u8> REG_GPIO_16_IE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_17_PD_A::DISABLED) + self.variant(GPIO16INPUT_ENABLED_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_17_PD_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); - self.w + self.variant(GPIO16INPUT_ENABLED_A::ENABLED) } } -#[doc = "Pull Up Resistor for GPIO17.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_17_PU_A { +#[doc = "Field `reg_gpio_16_smt` reader - Schmitt trigger enabled for GPIO16."] +pub type REG_GPIO_16_SMT_R = crate::BitReader; +#[doc = "Schmitt trigger enabled for GPIO16.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO16SCHMITT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_17_PU_A) -> Self { + fn from(variant: GPIO16SCHMITT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_17_pu` reader - Pull Up Resistor for GPIO17."] -pub struct REG_GPIO_17_PU_R(crate::FieldReader); -impl REG_GPIO_17_PU_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_17_PU_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_16_SMT_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_17_PU_A { + pub fn variant(&self) -> GPIO16SCHMITT_A { match self.bits { - false => REG_GPIO_17_PU_A::DISABLED, - true => REG_GPIO_17_PU_A::ENABLED, + false => GPIO16SCHMITT_A::DISABLED, + true => GPIO16SCHMITT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_17_PU_A::DISABLED + *self == GPIO16SCHMITT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_17_PU_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_17_PU_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO16SCHMITT_A::ENABLED } } -#[doc = "Field `reg_gpio_17_pu` writer - Pull Up Resistor for GPIO17."] -pub struct REG_GPIO_17_PU_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_17_PU_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_17_PU_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_16_smt` writer - Schmitt trigger enabled for GPIO16."] +pub type REG_GPIO_16_SMT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL8_SPEC, GPIO16SCHMITT_A, O>; +impl<'a, const O: u8> REG_GPIO_16_SMT_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_17_PU_A::DISABLED) + self.variant(GPIO16SCHMITT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_17_PU_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w + self.variant(GPIO16SCHMITT_A::ENABLED) } } -#[doc = "Driving control enabled for GPIO17.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[doc = "Field `reg_gpio_16_drv` reader - Driving control enabled for GPIO16."] +pub type REG_GPIO_16_DRV_R = crate::FieldReader; +#[doc = "Driving control enabled for GPIO16.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_17_DRV_A { +pub enum GPIO16DRIVING_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_17_DRV_A) -> Self { + fn from(variant: GPIO16DRIVING_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_17_drv` reader - Driving control enabled for GPIO17."] -pub struct REG_GPIO_17_DRV_R(crate::FieldReader); -impl REG_GPIO_17_DRV_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_17_DRV_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_16_DRV_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 0 => Some(REG_GPIO_17_DRV_A::DISABLED), - 1 => Some(REG_GPIO_17_DRV_A::ENABLED), + 0 => Some(GPIO16DRIVING_A::DISABLED), + 1 => Some(GPIO16DRIVING_A::ENABLED), _ => None, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_17_DRV_A::DISABLED + *self == GPIO16DRIVING_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_17_DRV_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_17_DRV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO16DRIVING_A::ENABLED } } -#[doc = "Field `reg_gpio_17_drv` writer - Driving control enabled for GPIO17."] -pub struct REG_GPIO_17_DRV_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_17_DRV_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_17_DRV_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +#[doc = "Field `reg_gpio_16_drv` writer - Driving control enabled for GPIO16."] +pub type REG_GPIO_16_DRV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL8_SPEC, u8, GPIO16DRIVING_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_16_DRV_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_17_DRV_A::DISABLED) + self.variant(GPIO16DRIVING_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_17_DRV_A::ENABLED) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 18)) | ((value as u32 & 0x03) << 18); - self.w + self.variant(GPIO16DRIVING_A::ENABLED) } } -#[doc = "Schmitt trigger enabled for GPIO17.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_17_SMT_A { +#[doc = "Field `reg_gpio_16_pu` reader - Pull Up Resistor for GPIO16."] +pub type REG_GPIO_16_PU_R = crate::BitReader; +#[doc = "Pull Up Resistor for GPIO16.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO16PULL_UP_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_17_SMT_A) -> Self { + fn from(variant: GPIO16PULL_UP_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_17_smt` reader - Schmitt trigger enabled for GPIO17."] -pub struct REG_GPIO_17_SMT_R(crate::FieldReader); -impl REG_GPIO_17_SMT_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_17_SMT_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_16_PU_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_17_SMT_A { + pub fn variant(&self) -> GPIO16PULL_UP_RESISTOR_A { match self.bits { - false => REG_GPIO_17_SMT_A::DISABLED, - true => REG_GPIO_17_SMT_A::ENABLED, + false => GPIO16PULL_UP_RESISTOR_A::DISABLED, + true => GPIO16PULL_UP_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_17_SMT_A::DISABLED + *self == GPIO16PULL_UP_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_17_SMT_A::ENABLED + *self == GPIO16PULL_UP_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_17_SMT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_17_smt` writer - Schmitt trigger enabled for GPIO17."] -pub struct REG_GPIO_17_SMT_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_17_SMT_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_17_SMT_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_16_pu` writer - Pull Up Resistor for GPIO16."] +pub type REG_GPIO_16_PU_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL8_SPEC, GPIO16PULL_UP_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_16_PU_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_17_SMT_A::DISABLED) + self.variant(GPIO16PULL_UP_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_17_SMT_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w + self.variant(GPIO16PULL_UP_RESISTOR_A::ENABLED) } } -#[doc = "Input enable for GPIO17.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_17_IE_A { +#[doc = "Field `reg_gpio_16_pd` reader - Pull Down Resistor for GPIO16."] +pub type REG_GPIO_16_PD_R = crate::BitReader; +#[doc = "Pull Down Resistor for GPIO16.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO16PULL_DOWN_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_17_IE_A) -> Self { + fn from(variant: GPIO16PULL_DOWN_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_17_ie` reader - Input enable for GPIO17."] -pub struct REG_GPIO_17_IE_R(crate::FieldReader); -impl REG_GPIO_17_IE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_17_IE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_16_PD_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_17_IE_A { + pub fn variant(&self) -> GPIO16PULL_DOWN_RESISTOR_A { match self.bits { - false => REG_GPIO_17_IE_A::DISABLED, - true => REG_GPIO_17_IE_A::ENABLED, + false => GPIO16PULL_DOWN_RESISTOR_A::DISABLED, + true => GPIO16PULL_DOWN_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_17_IE_A::DISABLED + *self == GPIO16PULL_DOWN_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_17_IE_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_17_IE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO16PULL_DOWN_RESISTOR_A::ENABLED } } -#[doc = "Field `reg_gpio_17_ie` writer - Input enable for GPIO17."] -pub struct REG_GPIO_17_IE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_17_IE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_17_IE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_16_pd` writer - Pull Down Resistor for GPIO16."] +pub type REG_GPIO_16_PD_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL8_SPEC, GPIO16PULL_DOWN_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_16_PD_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_17_IE_A::DISABLED) + self.variant(GPIO16PULL_DOWN_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_17_IE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w + self.variant(GPIO16PULL_DOWN_RESISTOR_A::ENABLED) } } +#[doc = "Field `reg_gpio_16_func_sel` reader - Function select for GPIO16."] +pub type REG_GPIO_16_FUNC_SEL_R = crate::FieldReader; #[doc = "Function select for GPIO16.\n\nValue on reset: 11"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_16_FUNC_SEL_A { +pub enum GPIO16FUNCTION_SELECT_A { #[doc = "4: `100`"] SPI_MISO_SPI_MOSI = 4, #[doc = "6: `110`"] @@ -624,658 +312,641 @@ pub enum REG_GPIO_16_FUNC_SEL_A { #[doc = "14: `1110`"] E21_TMS = 14, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_16_FUNC_SEL_A) -> Self { + fn from(variant: GPIO16FUNCTION_SELECT_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_16_func_sel` reader - Function select for GPIO16."] -pub struct REG_GPIO_16_FUNC_SEL_R(crate::FieldReader); impl REG_GPIO_16_FUNC_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_16_FUNC_SEL_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 4 => Some(REG_GPIO_16_FUNC_SEL_A::SPI_MISO_SPI_MOSI), - 6 => Some(REG_GPIO_16_FUNC_SEL_A::I2C_SCL), - 7 => Some(REG_GPIO_16_FUNC_SEL_A::UART_SIG0), - 8 => Some(REG_GPIO_16_FUNC_SEL_A::PWM_CH1), - 9 => Some(REG_GPIO_16_FUNC_SEL_A::FEM_GPIO_0), - 11 => Some(REG_GPIO_16_FUNC_SEL_A::SWGPIO_16), - 14 => Some(REG_GPIO_16_FUNC_SEL_A::E21_TMS), + 4 => Some(GPIO16FUNCTION_SELECT_A::SPI_MISO_SPI_MOSI), + 6 => Some(GPIO16FUNCTION_SELECT_A::I2C_SCL), + 7 => Some(GPIO16FUNCTION_SELECT_A::UART_SIG0), + 8 => Some(GPIO16FUNCTION_SELECT_A::PWM_CH1), + 9 => Some(GPIO16FUNCTION_SELECT_A::FEM_GPIO_0), + 11 => Some(GPIO16FUNCTION_SELECT_A::SWGPIO_16), + 14 => Some(GPIO16FUNCTION_SELECT_A::E21_TMS), _ => None, } } #[doc = "Checks if the value of the field is `SPI_MISO_SPI_MOSI`"] #[inline(always)] pub fn is_spi_miso_spi_mosi(&self) -> bool { - **self == REG_GPIO_16_FUNC_SEL_A::SPI_MISO_SPI_MOSI + *self == GPIO16FUNCTION_SELECT_A::SPI_MISO_SPI_MOSI } #[doc = "Checks if the value of the field is `I2C_SCL`"] #[inline(always)] pub fn is_i2c_scl(&self) -> bool { - **self == REG_GPIO_16_FUNC_SEL_A::I2C_SCL + *self == GPIO16FUNCTION_SELECT_A::I2C_SCL } #[doc = "Checks if the value of the field is `UART_SIG0`"] #[inline(always)] pub fn is_uart_sig0(&self) -> bool { - **self == REG_GPIO_16_FUNC_SEL_A::UART_SIG0 + *self == GPIO16FUNCTION_SELECT_A::UART_SIG0 } #[doc = "Checks if the value of the field is `PWM_CH1`"] #[inline(always)] pub fn is_pwm_ch1(&self) -> bool { - **self == REG_GPIO_16_FUNC_SEL_A::PWM_CH1 + *self == GPIO16FUNCTION_SELECT_A::PWM_CH1 } #[doc = "Checks if the value of the field is `FEM_GPIO_0`"] #[inline(always)] pub fn is_fem_gpio_0(&self) -> bool { - **self == REG_GPIO_16_FUNC_SEL_A::FEM_GPIO_0 + *self == GPIO16FUNCTION_SELECT_A::FEM_GPIO_0 } #[doc = "Checks if the value of the field is `SWGPIO_16`"] #[inline(always)] pub fn is_swgpio_16(&self) -> bool { - **self == REG_GPIO_16_FUNC_SEL_A::SWGPIO_16 + *self == GPIO16FUNCTION_SELECT_A::SWGPIO_16 } #[doc = "Checks if the value of the field is `E21_TMS`"] #[inline(always)] pub fn is_e21_tms(&self) -> bool { - **self == REG_GPIO_16_FUNC_SEL_A::E21_TMS - } -} -impl core::ops::Deref for REG_GPIO_16_FUNC_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO16FUNCTION_SELECT_A::E21_TMS } } #[doc = "Field `reg_gpio_16_func_sel` writer - Function select for GPIO16."] -pub struct REG_GPIO_16_FUNC_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_16_FUNC_SEL_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_16_FUNC_SEL_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +pub type REG_GPIO_16_FUNC_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL8_SPEC, u8, GPIO16FUNCTION_SELECT_A, 4, O>; +impl<'a, const O: u8> REG_GPIO_16_FUNC_SEL_W<'a, O> { #[doc = "`100`"] #[inline(always)] pub fn spi_miso_spi_mosi(self) -> &'a mut W { - self.variant(REG_GPIO_16_FUNC_SEL_A::SPI_MISO_SPI_MOSI) + self.variant(GPIO16FUNCTION_SELECT_A::SPI_MISO_SPI_MOSI) } #[doc = "`110`"] #[inline(always)] pub fn i2c_scl(self) -> &'a mut W { - self.variant(REG_GPIO_16_FUNC_SEL_A::I2C_SCL) + self.variant(GPIO16FUNCTION_SELECT_A::I2C_SCL) } #[doc = "`111`"] #[inline(always)] pub fn uart_sig0(self) -> &'a mut W { - self.variant(REG_GPIO_16_FUNC_SEL_A::UART_SIG0) + self.variant(GPIO16FUNCTION_SELECT_A::UART_SIG0) } #[doc = "`1000`"] #[inline(always)] pub fn pwm_ch1(self) -> &'a mut W { - self.variant(REG_GPIO_16_FUNC_SEL_A::PWM_CH1) + self.variant(GPIO16FUNCTION_SELECT_A::PWM_CH1) } #[doc = "`1001`"] #[inline(always)] pub fn fem_gpio_0(self) -> &'a mut W { - self.variant(REG_GPIO_16_FUNC_SEL_A::FEM_GPIO_0) + self.variant(GPIO16FUNCTION_SELECT_A::FEM_GPIO_0) } #[doc = "`1011`"] #[inline(always)] pub fn swgpio_16(self) -> &'a mut W { - self.variant(REG_GPIO_16_FUNC_SEL_A::SWGPIO_16) + self.variant(GPIO16FUNCTION_SELECT_A::SWGPIO_16) } #[doc = "`1110`"] #[inline(always)] pub fn e21_tms(self) -> &'a mut W { - self.variant(REG_GPIO_16_FUNC_SEL_A::E21_TMS) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 8)) | ((value as u32 & 0x0f) << 8); - self.w + self.variant(GPIO16FUNCTION_SELECT_A::E21_TMS) } } -#[doc = "Pull Down Resistor for GPIO16.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_16_PD_A { +#[doc = "Field `reg_gpio_17_ie` reader - Input enable for GPIO17."] +pub type REG_GPIO_17_IE_R = crate::BitReader; +#[doc = "Input enable for GPIO17.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO17INPUT_ENABLED_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_16_PD_A) -> Self { + fn from(variant: GPIO17INPUT_ENABLED_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_16_pd` reader - Pull Down Resistor for GPIO16."] -pub struct REG_GPIO_16_PD_R(crate::FieldReader); -impl REG_GPIO_16_PD_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_16_PD_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_17_IE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_16_PD_A { + pub fn variant(&self) -> GPIO17INPUT_ENABLED_A { match self.bits { - false => REG_GPIO_16_PD_A::DISABLED, - true => REG_GPIO_16_PD_A::ENABLED, + false => GPIO17INPUT_ENABLED_A::DISABLED, + true => GPIO17INPUT_ENABLED_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_16_PD_A::DISABLED + *self == GPIO17INPUT_ENABLED_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_16_PD_A::ENABLED + *self == GPIO17INPUT_ENABLED_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_16_PD_R { - type Target = crate::FieldReader; +#[doc = "Field `reg_gpio_17_ie` writer - Input enable for GPIO17."] +pub type REG_GPIO_17_IE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL8_SPEC, GPIO17INPUT_ENABLED_A, O>; +impl<'a, const O: u8> REG_GPIO_17_IE_W<'a, O> { + #[doc = "`0`"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_16_pd` writer - Pull Down Resistor for GPIO16."] -pub struct REG_GPIO_16_PD_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_16_PD_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_16_PD_A) -> &'a mut W { - self.bit(variant.into()) - } - #[doc = "`0`"] - #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_16_PD_A::DISABLED) + pub fn disabled(self) -> &'a mut W { + self.variant(GPIO17INPUT_ENABLED_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_16_PD_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w + self.variant(GPIO17INPUT_ENABLED_A::ENABLED) } } -#[doc = "Pull Up Resistor for GPIO16.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_16_PU_A { +#[doc = "Field `reg_gpio_17_smt` reader - Schmitt trigger enabled for GPIO17."] +pub type REG_GPIO_17_SMT_R = crate::BitReader; +#[doc = "Schmitt trigger enabled for GPIO17.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO17SCHMITT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_16_PU_A) -> Self { + fn from(variant: GPIO17SCHMITT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_16_pu` reader - Pull Up Resistor for GPIO16."] -pub struct REG_GPIO_16_PU_R(crate::FieldReader); -impl REG_GPIO_16_PU_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_16_PU_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_17_SMT_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_16_PU_A { + pub fn variant(&self) -> GPIO17SCHMITT_A { match self.bits { - false => REG_GPIO_16_PU_A::DISABLED, - true => REG_GPIO_16_PU_A::ENABLED, + false => GPIO17SCHMITT_A::DISABLED, + true => GPIO17SCHMITT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_16_PU_A::DISABLED + *self == GPIO17SCHMITT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_16_PU_A::ENABLED + *self == GPIO17SCHMITT_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_16_PU_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_16_pu` writer - Pull Up Resistor for GPIO16."] -pub struct REG_GPIO_16_PU_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_16_PU_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_16_PU_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_17_smt` writer - Schmitt trigger enabled for GPIO17."] +pub type REG_GPIO_17_SMT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL8_SPEC, GPIO17SCHMITT_A, O>; +impl<'a, const O: u8> REG_GPIO_17_SMT_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_16_PU_A::DISABLED) + self.variant(GPIO17SCHMITT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_16_PU_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w + self.variant(GPIO17SCHMITT_A::ENABLED) } } -#[doc = "Driving control enabled for GPIO16.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[doc = "Field `reg_gpio_17_drv` reader - Driving control enabled for GPIO17."] +pub type REG_GPIO_17_DRV_R = crate::FieldReader; +#[doc = "Driving control enabled for GPIO17.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_16_DRV_A { +pub enum GPIO17DRIVING_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_16_DRV_A) -> Self { + fn from(variant: GPIO17DRIVING_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_16_drv` reader - Driving control enabled for GPIO16."] -pub struct REG_GPIO_16_DRV_R(crate::FieldReader); -impl REG_GPIO_16_DRV_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_16_DRV_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_17_DRV_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 0 => Some(REG_GPIO_16_DRV_A::DISABLED), - 1 => Some(REG_GPIO_16_DRV_A::ENABLED), + 0 => Some(GPIO17DRIVING_A::DISABLED), + 1 => Some(GPIO17DRIVING_A::ENABLED), _ => None, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_16_DRV_A::DISABLED + *self == GPIO17DRIVING_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_16_DRV_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_16_DRV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO17DRIVING_A::ENABLED } } -#[doc = "Field `reg_gpio_16_drv` writer - Driving control enabled for GPIO16."] -pub struct REG_GPIO_16_DRV_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_16_DRV_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_16_DRV_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +#[doc = "Field `reg_gpio_17_drv` writer - Driving control enabled for GPIO17."] +pub type REG_GPIO_17_DRV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL8_SPEC, u8, GPIO17DRIVING_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_17_DRV_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_16_DRV_A::DISABLED) + self.variant(GPIO17DRIVING_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_16_DRV_A::ENABLED) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 2)) | ((value as u32 & 0x03) << 2); - self.w + self.variant(GPIO17DRIVING_A::ENABLED) } } -#[doc = "Schmitt trigger enabled for GPIO16.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_16_SMT_A { +#[doc = "Field `reg_gpio_17_pu` reader - Pull Up Resistor for GPIO17."] +pub type REG_GPIO_17_PU_R = crate::BitReader; +#[doc = "Pull Up Resistor for GPIO17.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO17PULL_UP_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_16_SMT_A) -> Self { + fn from(variant: GPIO17PULL_UP_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_16_smt` reader - Schmitt trigger enabled for GPIO16."] -pub struct REG_GPIO_16_SMT_R(crate::FieldReader); -impl REG_GPIO_16_SMT_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_16_SMT_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_17_PU_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_16_SMT_A { + pub fn variant(&self) -> GPIO17PULL_UP_RESISTOR_A { match self.bits { - false => REG_GPIO_16_SMT_A::DISABLED, - true => REG_GPIO_16_SMT_A::ENABLED, + false => GPIO17PULL_UP_RESISTOR_A::DISABLED, + true => GPIO17PULL_UP_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_16_SMT_A::DISABLED + *self == GPIO17PULL_UP_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_16_SMT_A::ENABLED + *self == GPIO17PULL_UP_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_16_SMT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_16_smt` writer - Schmitt trigger enabled for GPIO16."] -pub struct REG_GPIO_16_SMT_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_16_SMT_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_16_SMT_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_17_pu` writer - Pull Up Resistor for GPIO17."] +pub type REG_GPIO_17_PU_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL8_SPEC, GPIO17PULL_UP_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_17_PU_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_16_SMT_A::DISABLED) + self.variant(GPIO17PULL_UP_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_16_SMT_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w + self.variant(GPIO17PULL_UP_RESISTOR_A::ENABLED) } } -#[doc = "Input enable for GPIO16.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_16_IE_A { +#[doc = "Field `reg_gpio_17_pd` reader - Pull Down Resistor for GPIO17."] +pub type REG_GPIO_17_PD_R = crate::BitReader; +#[doc = "Pull Down Resistor for GPIO17.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO17PULL_DOWN_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_16_IE_A) -> Self { + fn from(variant: GPIO17PULL_DOWN_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_16_ie` reader - Input enable for GPIO16."] -pub struct REG_GPIO_16_IE_R(crate::FieldReader); -impl REG_GPIO_16_IE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_16_IE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_17_PD_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_16_IE_A { + pub fn variant(&self) -> GPIO17PULL_DOWN_RESISTOR_A { match self.bits { - false => REG_GPIO_16_IE_A::DISABLED, - true => REG_GPIO_16_IE_A::ENABLED, + false => GPIO17PULL_DOWN_RESISTOR_A::DISABLED, + true => GPIO17PULL_DOWN_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_16_IE_A::DISABLED + *self == GPIO17PULL_DOWN_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_16_IE_A::ENABLED + *self == GPIO17PULL_DOWN_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_16_IE_R { - type Target = crate::FieldReader; +#[doc = "Field `reg_gpio_17_pd` writer - Pull Down Resistor for GPIO17."] +pub type REG_GPIO_17_PD_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL8_SPEC, GPIO17PULL_DOWN_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_17_PD_W<'a, O> { + #[doc = "`0`"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn disabled(self) -> &'a mut W { + self.variant(GPIO17PULL_DOWN_RESISTOR_A::DISABLED) + } + #[doc = "`1`"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(GPIO17PULL_DOWN_RESISTOR_A::ENABLED) } } -#[doc = "Field `reg_gpio_16_ie` writer - Input enable for GPIO16."] -pub struct REG_GPIO_16_IE_W<'a> { - w: &'a mut W, +#[doc = "Field `reg_gpio_17_func_sel` reader - Function select for GPIO17."] +pub type REG_GPIO_17_FUNC_SEL_R = crate::FieldReader; +#[doc = "Function select for GPIO17.\n\nValue on reset: 14"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum GPIO17FUNCTION_SELECT_A { + #[doc = "2: `10`"] + SF_D3 = 2, + #[doc = "4: `100`"] + SPI_MOSI_SPI_MISO = 4, + #[doc = "6: `110`"] + I2C_SDA = 6, + #[doc = "7: `111`"] + UART_SIG1 = 7, + #[doc = "8: `1000`"] + PWM_CH2 = 8, + #[doc = "9: `1001`"] + FEM_GPIO_1 = 9, + #[doc = "10: `1010`"] + PMIP_DC_TP_OUT = 10, + #[doc = "11: `1011`"] + SWGPIO_17 = 11, + #[doc = "14: `1110`"] + E21_TDI = 14, } -impl<'a> REG_GPIO_16_IE_W<'a> { - #[doc = r"Writes `variant` to the field"] +impl From for u8 { #[inline(always)] - pub fn variant(self, variant: REG_GPIO_16_IE_A) -> &'a mut W { - self.bit(variant.into()) + fn from(variant: GPIO17FUNCTION_SELECT_A) -> Self { + variant as _ } - #[doc = "`0`"] +} +impl REG_GPIO_17_FUNC_SEL_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_16_IE_A::DISABLED) + pub fn variant(&self) -> Option { + match self.bits { + 2 => Some(GPIO17FUNCTION_SELECT_A::SF_D3), + 4 => Some(GPIO17FUNCTION_SELECT_A::SPI_MOSI_SPI_MISO), + 6 => Some(GPIO17FUNCTION_SELECT_A::I2C_SDA), + 7 => Some(GPIO17FUNCTION_SELECT_A::UART_SIG1), + 8 => Some(GPIO17FUNCTION_SELECT_A::PWM_CH2), + 9 => Some(GPIO17FUNCTION_SELECT_A::FEM_GPIO_1), + 10 => Some(GPIO17FUNCTION_SELECT_A::PMIP_DC_TP_OUT), + 11 => Some(GPIO17FUNCTION_SELECT_A::SWGPIO_17), + 14 => Some(GPIO17FUNCTION_SELECT_A::E21_TDI), + _ => None, + } } - #[doc = "`1`"] + #[doc = "Checks if the value of the field is `SF_D3`"] #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_16_IE_A::ENABLED) + pub fn is_sf_d3(&self) -> bool { + *self == GPIO17FUNCTION_SELECT_A::SF_D3 } - #[doc = r"Sets the field bit"] + #[doc = "Checks if the value of the field is `SPI_MOSI_SPI_MISO`"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn is_spi_mosi_spi_miso(&self) -> bool { + *self == GPIO17FUNCTION_SELECT_A::SPI_MOSI_SPI_MISO } - #[doc = r"Clears the field bit"] + #[doc = "Checks if the value of the field is `I2C_SDA`"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn is_i2c_sda(&self) -> bool { + *self == GPIO17FUNCTION_SELECT_A::I2C_SDA } - #[doc = r"Writes raw bits to the field"] + #[doc = "Checks if the value of the field is `UART_SIG1`"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn is_uart_sig1(&self) -> bool { + *self == GPIO17FUNCTION_SELECT_A::UART_SIG1 + } + #[doc = "Checks if the value of the field is `PWM_CH2`"] + #[inline(always)] + pub fn is_pwm_ch2(&self) -> bool { + *self == GPIO17FUNCTION_SELECT_A::PWM_CH2 + } + #[doc = "Checks if the value of the field is `FEM_GPIO_1`"] + #[inline(always)] + pub fn is_fem_gpio_1(&self) -> bool { + *self == GPIO17FUNCTION_SELECT_A::FEM_GPIO_1 + } + #[doc = "Checks if the value of the field is `PMIP_DC_TP_OUT`"] + #[inline(always)] + pub fn is_pmip_dc_tp_out(&self) -> bool { + *self == GPIO17FUNCTION_SELECT_A::PMIP_DC_TP_OUT + } + #[doc = "Checks if the value of the field is `SWGPIO_17`"] + #[inline(always)] + pub fn is_swgpio_17(&self) -> bool { + *self == GPIO17FUNCTION_SELECT_A::SWGPIO_17 + } + #[doc = "Checks if the value of the field is `E21_TDI`"] + #[inline(always)] + pub fn is_e21_tdi(&self) -> bool { + *self == GPIO17FUNCTION_SELECT_A::E21_TDI } } -impl R { - #[doc = "Bits 24:27 - Function select for GPIO17."] +#[doc = "Field `reg_gpio_17_func_sel` writer - Function select for GPIO17."] +pub type REG_GPIO_17_FUNC_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL8_SPEC, u8, GPIO17FUNCTION_SELECT_A, 4, O>; +impl<'a, const O: u8> REG_GPIO_17_FUNC_SEL_W<'a, O> { + #[doc = "`10`"] #[inline(always)] - pub fn reg_gpio_17_func_sel(&self) -> REG_GPIO_17_FUNC_SEL_R { - REG_GPIO_17_FUNC_SEL_R::new(((self.bits >> 24) & 0x0f) as u8) + pub fn sf_d3(self) -> &'a mut W { + self.variant(GPIO17FUNCTION_SELECT_A::SF_D3) } - #[doc = "Bit 21 - Pull Down Resistor for GPIO17."] + #[doc = "`100`"] #[inline(always)] - pub fn reg_gpio_17_pd(&self) -> REG_GPIO_17_PD_R { - REG_GPIO_17_PD_R::new(((self.bits >> 21) & 0x01) != 0) + pub fn spi_mosi_spi_miso(self) -> &'a mut W { + self.variant(GPIO17FUNCTION_SELECT_A::SPI_MOSI_SPI_MISO) } - #[doc = "Bit 20 - Pull Up Resistor for GPIO17."] + #[doc = "`110`"] #[inline(always)] - pub fn reg_gpio_17_pu(&self) -> REG_GPIO_17_PU_R { - REG_GPIO_17_PU_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn i2c_sda(self) -> &'a mut W { + self.variant(GPIO17FUNCTION_SELECT_A::I2C_SDA) } - #[doc = "Bits 18:19 - Driving control enabled for GPIO17."] + #[doc = "`111`"] #[inline(always)] - pub fn reg_gpio_17_drv(&self) -> REG_GPIO_17_DRV_R { - REG_GPIO_17_DRV_R::new(((self.bits >> 18) & 0x03) as u8) + pub fn uart_sig1(self) -> &'a mut W { + self.variant(GPIO17FUNCTION_SELECT_A::UART_SIG1) } - #[doc = "Bit 17 - Schmitt trigger enabled for GPIO17."] + #[doc = "`1000`"] #[inline(always)] - pub fn reg_gpio_17_smt(&self) -> REG_GPIO_17_SMT_R { - REG_GPIO_17_SMT_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn pwm_ch2(self) -> &'a mut W { + self.variant(GPIO17FUNCTION_SELECT_A::PWM_CH2) } - #[doc = "Bit 16 - Input enable for GPIO17."] + #[doc = "`1001`"] #[inline(always)] - pub fn reg_gpio_17_ie(&self) -> REG_GPIO_17_IE_R { - REG_GPIO_17_IE_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn fem_gpio_1(self) -> &'a mut W { + self.variant(GPIO17FUNCTION_SELECT_A::FEM_GPIO_1) + } + #[doc = "`1010`"] + #[inline(always)] + pub fn pmip_dc_tp_out(self) -> &'a mut W { + self.variant(GPIO17FUNCTION_SELECT_A::PMIP_DC_TP_OUT) + } + #[doc = "`1011`"] + #[inline(always)] + pub fn swgpio_17(self) -> &'a mut W { + self.variant(GPIO17FUNCTION_SELECT_A::SWGPIO_17) + } + #[doc = "`1110`"] + #[inline(always)] + pub fn e21_tdi(self) -> &'a mut W { + self.variant(GPIO17FUNCTION_SELECT_A::E21_TDI) + } +} +impl R { + #[doc = "Bit 0 - Input enable for GPIO16."] + #[inline(always)] + pub fn reg_gpio_16_ie(&self) -> REG_GPIO_16_IE_R { + REG_GPIO_16_IE_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Schmitt trigger enabled for GPIO16."] + #[inline(always)] + pub fn reg_gpio_16_smt(&self) -> REG_GPIO_16_SMT_R { + REG_GPIO_16_SMT_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bits 2:3 - Driving control enabled for GPIO16."] + #[inline(always)] + pub fn reg_gpio_16_drv(&self) -> REG_GPIO_16_DRV_R { + REG_GPIO_16_DRV_R::new(((self.bits >> 2) & 3) as u8) + } + #[doc = "Bit 4 - Pull Up Resistor for GPIO16."] + #[inline(always)] + pub fn reg_gpio_16_pu(&self) -> REG_GPIO_16_PU_R { + REG_GPIO_16_PU_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Pull Down Resistor for GPIO16."] + #[inline(always)] + pub fn reg_gpio_16_pd(&self) -> REG_GPIO_16_PD_R { + REG_GPIO_16_PD_R::new(((self.bits >> 5) & 1) != 0) } #[doc = "Bits 8:11 - Function select for GPIO16."] #[inline(always)] pub fn reg_gpio_16_func_sel(&self) -> REG_GPIO_16_FUNC_SEL_R { REG_GPIO_16_FUNC_SEL_R::new(((self.bits >> 8) & 0x0f) as u8) } - #[doc = "Bit 5 - Pull Down Resistor for GPIO16."] + #[doc = "Bit 16 - Input enable for GPIO17."] #[inline(always)] - pub fn reg_gpio_16_pd(&self) -> REG_GPIO_16_PD_R { - REG_GPIO_16_PD_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn reg_gpio_17_ie(&self) -> REG_GPIO_17_IE_R { + REG_GPIO_17_IE_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 4 - Pull Up Resistor for GPIO16."] + #[doc = "Bit 17 - Schmitt trigger enabled for GPIO17."] #[inline(always)] - pub fn reg_gpio_16_pu(&self) -> REG_GPIO_16_PU_R { - REG_GPIO_16_PU_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn reg_gpio_17_smt(&self) -> REG_GPIO_17_SMT_R { + REG_GPIO_17_SMT_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bits 2:3 - Driving control enabled for GPIO16."] + #[doc = "Bits 18:19 - Driving control enabled for GPIO17."] #[inline(always)] - pub fn reg_gpio_16_drv(&self) -> REG_GPIO_16_DRV_R { - REG_GPIO_16_DRV_R::new(((self.bits >> 2) & 0x03) as u8) + pub fn reg_gpio_17_drv(&self) -> REG_GPIO_17_DRV_R { + REG_GPIO_17_DRV_R::new(((self.bits >> 18) & 3) as u8) } - #[doc = "Bit 1 - Schmitt trigger enabled for GPIO16."] + #[doc = "Bit 20 - Pull Up Resistor for GPIO17."] #[inline(always)] - pub fn reg_gpio_16_smt(&self) -> REG_GPIO_16_SMT_R { - REG_GPIO_16_SMT_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn reg_gpio_17_pu(&self) -> REG_GPIO_17_PU_R { + REG_GPIO_17_PU_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bit 0 - Input enable for GPIO16."] + #[doc = "Bit 21 - Pull Down Resistor for GPIO17."] #[inline(always)] - pub fn reg_gpio_16_ie(&self) -> REG_GPIO_16_IE_R { - REG_GPIO_16_IE_R::new((self.bits & 0x01) != 0) + pub fn reg_gpio_17_pd(&self) -> REG_GPIO_17_PD_R { + REG_GPIO_17_PD_R::new(((self.bits >> 21) & 1) != 0) } -} -impl W { #[doc = "Bits 24:27 - Function select for GPIO17."] #[inline(always)] - pub fn reg_gpio_17_func_sel(&mut self) -> REG_GPIO_17_FUNC_SEL_W { - REG_GPIO_17_FUNC_SEL_W { w: self } + pub fn reg_gpio_17_func_sel(&self) -> REG_GPIO_17_FUNC_SEL_R { + REG_GPIO_17_FUNC_SEL_R::new(((self.bits >> 24) & 0x0f) as u8) } - #[doc = "Bit 21 - Pull Down Resistor for GPIO17."] +} +impl W { + #[doc = "Bit 0 - Input enable for GPIO16."] #[inline(always)] - pub fn reg_gpio_17_pd(&mut self) -> REG_GPIO_17_PD_W { - REG_GPIO_17_PD_W { w: self } + #[must_use] + pub fn reg_gpio_16_ie(&mut self) -> REG_GPIO_16_IE_W<0> { + REG_GPIO_16_IE_W::new(self) } - #[doc = "Bit 20 - Pull Up Resistor for GPIO17."] + #[doc = "Bit 1 - Schmitt trigger enabled for GPIO16."] #[inline(always)] - pub fn reg_gpio_17_pu(&mut self) -> REG_GPIO_17_PU_W { - REG_GPIO_17_PU_W { w: self } + #[must_use] + pub fn reg_gpio_16_smt(&mut self) -> REG_GPIO_16_SMT_W<1> { + REG_GPIO_16_SMT_W::new(self) } - #[doc = "Bits 18:19 - Driving control enabled for GPIO17."] + #[doc = "Bits 2:3 - Driving control enabled for GPIO16."] #[inline(always)] - pub fn reg_gpio_17_drv(&mut self) -> REG_GPIO_17_DRV_W { - REG_GPIO_17_DRV_W { w: self } + #[must_use] + pub fn reg_gpio_16_drv(&mut self) -> REG_GPIO_16_DRV_W<2> { + REG_GPIO_16_DRV_W::new(self) } - #[doc = "Bit 17 - Schmitt trigger enabled for GPIO17."] + #[doc = "Bit 4 - Pull Up Resistor for GPIO16."] #[inline(always)] - pub fn reg_gpio_17_smt(&mut self) -> REG_GPIO_17_SMT_W { - REG_GPIO_17_SMT_W { w: self } + #[must_use] + pub fn reg_gpio_16_pu(&mut self) -> REG_GPIO_16_PU_W<4> { + REG_GPIO_16_PU_W::new(self) } - #[doc = "Bit 16 - Input enable for GPIO17."] + #[doc = "Bit 5 - Pull Down Resistor for GPIO16."] #[inline(always)] - pub fn reg_gpio_17_ie(&mut self) -> REG_GPIO_17_IE_W { - REG_GPIO_17_IE_W { w: self } + #[must_use] + pub fn reg_gpio_16_pd(&mut self) -> REG_GPIO_16_PD_W<5> { + REG_GPIO_16_PD_W::new(self) } #[doc = "Bits 8:11 - Function select for GPIO16."] #[inline(always)] - pub fn reg_gpio_16_func_sel(&mut self) -> REG_GPIO_16_FUNC_SEL_W { - REG_GPIO_16_FUNC_SEL_W { w: self } + #[must_use] + pub fn reg_gpio_16_func_sel(&mut self) -> REG_GPIO_16_FUNC_SEL_W<8> { + REG_GPIO_16_FUNC_SEL_W::new(self) } - #[doc = "Bit 5 - Pull Down Resistor for GPIO16."] + #[doc = "Bit 16 - Input enable for GPIO17."] #[inline(always)] - pub fn reg_gpio_16_pd(&mut self) -> REG_GPIO_16_PD_W { - REG_GPIO_16_PD_W { w: self } + #[must_use] + pub fn reg_gpio_17_ie(&mut self) -> REG_GPIO_17_IE_W<16> { + REG_GPIO_17_IE_W::new(self) } - #[doc = "Bit 4 - Pull Up Resistor for GPIO16."] + #[doc = "Bit 17 - Schmitt trigger enabled for GPIO17."] #[inline(always)] - pub fn reg_gpio_16_pu(&mut self) -> REG_GPIO_16_PU_W { - REG_GPIO_16_PU_W { w: self } + #[must_use] + pub fn reg_gpio_17_smt(&mut self) -> REG_GPIO_17_SMT_W<17> { + REG_GPIO_17_SMT_W::new(self) } - #[doc = "Bits 2:3 - Driving control enabled for GPIO16."] + #[doc = "Bits 18:19 - Driving control enabled for GPIO17."] #[inline(always)] - pub fn reg_gpio_16_drv(&mut self) -> REG_GPIO_16_DRV_W { - REG_GPIO_16_DRV_W { w: self } + #[must_use] + pub fn reg_gpio_17_drv(&mut self) -> REG_GPIO_17_DRV_W<18> { + REG_GPIO_17_DRV_W::new(self) } - #[doc = "Bit 1 - Schmitt trigger enabled for GPIO16."] + #[doc = "Bit 20 - Pull Up Resistor for GPIO17."] #[inline(always)] - pub fn reg_gpio_16_smt(&mut self) -> REG_GPIO_16_SMT_W { - REG_GPIO_16_SMT_W { w: self } + #[must_use] + pub fn reg_gpio_17_pu(&mut self) -> REG_GPIO_17_PU_W<20> { + REG_GPIO_17_PU_W::new(self) } - #[doc = "Bit 0 - Input enable for GPIO16."] + #[doc = "Bit 21 - Pull Down Resistor for GPIO17."] + #[inline(always)] + #[must_use] + pub fn reg_gpio_17_pd(&mut self) -> REG_GPIO_17_PD_W<21> { + REG_GPIO_17_PD_W::new(self) + } + #[doc = "Bits 24:27 - Function select for GPIO17."] #[inline(always)] - pub fn reg_gpio_16_ie(&mut self) -> REG_GPIO_16_IE_W { - REG_GPIO_16_IE_W { w: self } + #[must_use] + pub fn reg_gpio_17_func_sel(&mut self) -> REG_GPIO_17_FUNC_SEL_W<24> { + REG_GPIO_17_FUNC_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -1293,11 +964,10 @@ impl crate::Readable for GPIO_CFGCTL8_SPEC { #[doc = "`write(|w| ..)` method takes [gpio_cfgctl8::W](W) writer structure"] impl crate::Writable for GPIO_CFGCTL8_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets GPIO_CFGCTL8 to value 0x0e03_0b03"] impl crate::Resettable for GPIO_CFGCTL8_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0e03_0b03 - } + const RESET_VALUE: Self::Ux = 0x0e03_0b03; } diff --git a/src/glb/gpio_cfgctl9.rs b/src/glb/gpio_cfgctl9.rs index f559edf..d695d7e 100644 --- a/src/glb/gpio_cfgctl9.rs +++ b/src/glb/gpio_cfgctl9.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,575 +28,275 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Function select for GPIO19.\n\nValue on reset: 11"] -#[derive(Clone, Copy, Debug, PartialEq)] -#[repr(u8)] -pub enum REG_GPIO_19_FUNC_SEL_A { - #[doc = "2: `10`"] - SF_D1 = 2, - #[doc = "4: `100`"] - SPI_SCLK = 4, - #[doc = "6: `110`"] - I2C_SDA = 6, - #[doc = "7: `111`"] - UART_SIG3 = 7, - #[doc = "8: `1000`"] - PWM_CH4 = 8, - #[doc = "9: `1001`"] - FEM_GPIO_3 = 9, - #[doc = "11: `1011`"] - SWGPIO_19 = 11, - #[doc = "14: `1110`"] - E21_TDO = 14, -} -impl From for u8 { - #[inline(always)] - fn from(variant: REG_GPIO_19_FUNC_SEL_A) -> Self { - variant as _ - } -} -#[doc = "Field `reg_gpio_19_func_sel` reader - Function select for GPIO19."] -pub struct REG_GPIO_19_FUNC_SEL_R(crate::FieldReader); -impl REG_GPIO_19_FUNC_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_19_FUNC_SEL_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] - #[inline(always)] - pub fn variant(&self) -> Option { - match self.bits { - 2 => Some(REG_GPIO_19_FUNC_SEL_A::SF_D1), - 4 => Some(REG_GPIO_19_FUNC_SEL_A::SPI_SCLK), - 6 => Some(REG_GPIO_19_FUNC_SEL_A::I2C_SDA), - 7 => Some(REG_GPIO_19_FUNC_SEL_A::UART_SIG3), - 8 => Some(REG_GPIO_19_FUNC_SEL_A::PWM_CH4), - 9 => Some(REG_GPIO_19_FUNC_SEL_A::FEM_GPIO_3), - 11 => Some(REG_GPIO_19_FUNC_SEL_A::SWGPIO_19), - 14 => Some(REG_GPIO_19_FUNC_SEL_A::E21_TDO), - _ => None, - } - } - #[doc = "Checks if the value of the field is `SF_D1`"] - #[inline(always)] - pub fn is_sf_d1(&self) -> bool { - **self == REG_GPIO_19_FUNC_SEL_A::SF_D1 - } - #[doc = "Checks if the value of the field is `SPI_SCLK`"] - #[inline(always)] - pub fn is_spi_sclk(&self) -> bool { - **self == REG_GPIO_19_FUNC_SEL_A::SPI_SCLK - } - #[doc = "Checks if the value of the field is `I2C_SDA`"] - #[inline(always)] - pub fn is_i2c_sda(&self) -> bool { - **self == REG_GPIO_19_FUNC_SEL_A::I2C_SDA - } - #[doc = "Checks if the value of the field is `UART_SIG3`"] - #[inline(always)] - pub fn is_uart_sig3(&self) -> bool { - **self == REG_GPIO_19_FUNC_SEL_A::UART_SIG3 - } - #[doc = "Checks if the value of the field is `PWM_CH4`"] - #[inline(always)] - pub fn is_pwm_ch4(&self) -> bool { - **self == REG_GPIO_19_FUNC_SEL_A::PWM_CH4 - } - #[doc = "Checks if the value of the field is `FEM_GPIO_3`"] - #[inline(always)] - pub fn is_fem_gpio_3(&self) -> bool { - **self == REG_GPIO_19_FUNC_SEL_A::FEM_GPIO_3 - } - #[doc = "Checks if the value of the field is `SWGPIO_19`"] - #[inline(always)] - pub fn is_swgpio_19(&self) -> bool { - **self == REG_GPIO_19_FUNC_SEL_A::SWGPIO_19 - } - #[doc = "Checks if the value of the field is `E21_TDO`"] - #[inline(always)] - pub fn is_e21_tdo(&self) -> bool { - **self == REG_GPIO_19_FUNC_SEL_A::E21_TDO - } -} -impl core::ops::Deref for REG_GPIO_19_FUNC_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_19_func_sel` writer - Function select for GPIO19."] -pub struct REG_GPIO_19_FUNC_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_19_FUNC_SEL_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_19_FUNC_SEL_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } - #[doc = "`10`"] - #[inline(always)] - pub fn sf_d1(self) -> &'a mut W { - self.variant(REG_GPIO_19_FUNC_SEL_A::SF_D1) - } - #[doc = "`100`"] - #[inline(always)] - pub fn spi_sclk(self) -> &'a mut W { - self.variant(REG_GPIO_19_FUNC_SEL_A::SPI_SCLK) - } - #[doc = "`110`"] - #[inline(always)] - pub fn i2c_sda(self) -> &'a mut W { - self.variant(REG_GPIO_19_FUNC_SEL_A::I2C_SDA) - } - #[doc = "`111`"] - #[inline(always)] - pub fn uart_sig3(self) -> &'a mut W { - self.variant(REG_GPIO_19_FUNC_SEL_A::UART_SIG3) - } - #[doc = "`1000`"] - #[inline(always)] - pub fn pwm_ch4(self) -> &'a mut W { - self.variant(REG_GPIO_19_FUNC_SEL_A::PWM_CH4) - } - #[doc = "`1001`"] - #[inline(always)] - pub fn fem_gpio_3(self) -> &'a mut W { - self.variant(REG_GPIO_19_FUNC_SEL_A::FEM_GPIO_3) - } - #[doc = "`1011`"] - #[inline(always)] - pub fn swgpio_19(self) -> &'a mut W { - self.variant(REG_GPIO_19_FUNC_SEL_A::SWGPIO_19) - } - #[doc = "`1110`"] - #[inline(always)] - pub fn e21_tdo(self) -> &'a mut W { - self.variant(REG_GPIO_19_FUNC_SEL_A::E21_TDO) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 24)) | ((value as u32 & 0x0f) << 24); - self.w - } -} -#[doc = "Pull Down Resistor for GPIO19.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_19_PD_A { +#[doc = "Field `reg_gpio_18_ie` reader - Input enable for GPIO18."] +pub type REG_GPIO_18_IE_R = crate::BitReader; +#[doc = "Input enable for GPIO18.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO18INPUT_ENABLED_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_19_PD_A) -> Self { + fn from(variant: GPIO18INPUT_ENABLED_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_19_pd` reader - Pull Down Resistor for GPIO19."] -pub struct REG_GPIO_19_PD_R(crate::FieldReader); -impl REG_GPIO_19_PD_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_19_PD_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_18_IE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_19_PD_A { + pub fn variant(&self) -> GPIO18INPUT_ENABLED_A { match self.bits { - false => REG_GPIO_19_PD_A::DISABLED, - true => REG_GPIO_19_PD_A::ENABLED, + false => GPIO18INPUT_ENABLED_A::DISABLED, + true => GPIO18INPUT_ENABLED_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_19_PD_A::DISABLED + *self == GPIO18INPUT_ENABLED_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_19_PD_A::ENABLED + *self == GPIO18INPUT_ENABLED_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_19_PD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_19_pd` writer - Pull Down Resistor for GPIO19."] -pub struct REG_GPIO_19_PD_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_19_PD_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_19_PD_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_18_ie` writer - Input enable for GPIO18."] +pub type REG_GPIO_18_IE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL9_SPEC, GPIO18INPUT_ENABLED_A, O>; +impl<'a, const O: u8> REG_GPIO_18_IE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_19_PD_A::DISABLED) + self.variant(GPIO18INPUT_ENABLED_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_19_PD_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); - self.w + self.variant(GPIO18INPUT_ENABLED_A::ENABLED) } } -#[doc = "Pull Up Resistor for GPIO19.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_19_PU_A { +#[doc = "Field `reg_gpio_18_smt` reader - Schmitt trigger enabled for GPIO18."] +pub type REG_GPIO_18_SMT_R = crate::BitReader; +#[doc = "Schmitt trigger enabled for GPIO18.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO18SCHMITT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_19_PU_A) -> Self { + fn from(variant: GPIO18SCHMITT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_19_pu` reader - Pull Up Resistor for GPIO19."] -pub struct REG_GPIO_19_PU_R(crate::FieldReader); -impl REG_GPIO_19_PU_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_19_PU_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_18_SMT_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_19_PU_A { + pub fn variant(&self) -> GPIO18SCHMITT_A { match self.bits { - false => REG_GPIO_19_PU_A::DISABLED, - true => REG_GPIO_19_PU_A::ENABLED, + false => GPIO18SCHMITT_A::DISABLED, + true => GPIO18SCHMITT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_19_PU_A::DISABLED + *self == GPIO18SCHMITT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_19_PU_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_19_PU_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO18SCHMITT_A::ENABLED } } -#[doc = "Field `reg_gpio_19_pu` writer - Pull Up Resistor for GPIO19."] -pub struct REG_GPIO_19_PU_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_19_PU_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_19_PU_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_18_smt` writer - Schmitt trigger enabled for GPIO18."] +pub type REG_GPIO_18_SMT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL9_SPEC, GPIO18SCHMITT_A, O>; +impl<'a, const O: u8> REG_GPIO_18_SMT_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_19_PU_A::DISABLED) + self.variant(GPIO18SCHMITT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_19_PU_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w + self.variant(GPIO18SCHMITT_A::ENABLED) } } -#[doc = "Driving control enabled for GPIO19.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[doc = "Field `reg_gpio_18_drv` reader - Driving control enabled for GPIO18."] +pub type REG_GPIO_18_DRV_R = crate::FieldReader; +#[doc = "Driving control enabled for GPIO18.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_19_DRV_A { +pub enum GPIO18DRIVING_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_19_DRV_A) -> Self { + fn from(variant: GPIO18DRIVING_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_19_drv` reader - Driving control enabled for GPIO19."] -pub struct REG_GPIO_19_DRV_R(crate::FieldReader); -impl REG_GPIO_19_DRV_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_19_DRV_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_18_DRV_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 0 => Some(REG_GPIO_19_DRV_A::DISABLED), - 1 => Some(REG_GPIO_19_DRV_A::ENABLED), + 0 => Some(GPIO18DRIVING_A::DISABLED), + 1 => Some(GPIO18DRIVING_A::ENABLED), _ => None, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_19_DRV_A::DISABLED + *self == GPIO18DRIVING_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_19_DRV_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_19_DRV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO18DRIVING_A::ENABLED } } -#[doc = "Field `reg_gpio_19_drv` writer - Driving control enabled for GPIO19."] -pub struct REG_GPIO_19_DRV_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_19_DRV_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_19_DRV_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +#[doc = "Field `reg_gpio_18_drv` writer - Driving control enabled for GPIO18."] +pub type REG_GPIO_18_DRV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL9_SPEC, u8, GPIO18DRIVING_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_18_DRV_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_19_DRV_A::DISABLED) + self.variant(GPIO18DRIVING_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_19_DRV_A::ENABLED) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 18)) | ((value as u32 & 0x03) << 18); - self.w + self.variant(GPIO18DRIVING_A::ENABLED) } } -#[doc = "Schmitt trigger enabled for GPIO19.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_19_SMT_A { +#[doc = "Field `reg_gpio_18_pu` reader - Pull Up Resistor for GPIO18."] +pub type REG_GPIO_18_PU_R = crate::BitReader; +#[doc = "Pull Up Resistor for GPIO18.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO18PULL_UP_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_19_SMT_A) -> Self { + fn from(variant: GPIO18PULL_UP_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_19_smt` reader - Schmitt trigger enabled for GPIO19."] -pub struct REG_GPIO_19_SMT_R(crate::FieldReader); -impl REG_GPIO_19_SMT_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_19_SMT_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_18_PU_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_19_SMT_A { + pub fn variant(&self) -> GPIO18PULL_UP_RESISTOR_A { match self.bits { - false => REG_GPIO_19_SMT_A::DISABLED, - true => REG_GPIO_19_SMT_A::ENABLED, + false => GPIO18PULL_UP_RESISTOR_A::DISABLED, + true => GPIO18PULL_UP_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_19_SMT_A::DISABLED + *self == GPIO18PULL_UP_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_19_SMT_A::ENABLED + *self == GPIO18PULL_UP_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_19_SMT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_19_smt` writer - Schmitt trigger enabled for GPIO19."] -pub struct REG_GPIO_19_SMT_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_19_SMT_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_19_SMT_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_18_pu` writer - Pull Up Resistor for GPIO18."] +pub type REG_GPIO_18_PU_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL9_SPEC, GPIO18PULL_UP_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_18_PU_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_19_SMT_A::DISABLED) + self.variant(GPIO18PULL_UP_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_19_SMT_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w + self.variant(GPIO18PULL_UP_RESISTOR_A::ENABLED) } } -#[doc = "Input enable for GPIO19.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_19_IE_A { +#[doc = "Field `reg_gpio_18_pd` reader - Pull Down Resistor for GPIO18."] +pub type REG_GPIO_18_PD_R = crate::BitReader; +#[doc = "Pull Down Resistor for GPIO18.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO18PULL_DOWN_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_19_IE_A) -> Self { + fn from(variant: GPIO18PULL_DOWN_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_19_ie` reader - Input enable for GPIO19."] -pub struct REG_GPIO_19_IE_R(crate::FieldReader); -impl REG_GPIO_19_IE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_19_IE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_18_PD_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_19_IE_A { + pub fn variant(&self) -> GPIO18PULL_DOWN_RESISTOR_A { match self.bits { - false => REG_GPIO_19_IE_A::DISABLED, - true => REG_GPIO_19_IE_A::ENABLED, + false => GPIO18PULL_DOWN_RESISTOR_A::DISABLED, + true => GPIO18PULL_DOWN_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_19_IE_A::DISABLED + *self == GPIO18PULL_DOWN_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_19_IE_A::ENABLED + *self == GPIO18PULL_DOWN_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_19_IE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_19_ie` writer - Input enable for GPIO19."] -pub struct REG_GPIO_19_IE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_19_IE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_19_IE_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_18_pd` writer - Pull Down Resistor for GPIO18."] +pub type REG_GPIO_18_PD_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL9_SPEC, GPIO18PULL_DOWN_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_18_PD_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_19_IE_A::DISABLED) + self.variant(GPIO18PULL_DOWN_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_19_IE_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w + self.variant(GPIO18PULL_DOWN_RESISTOR_A::ENABLED) } } +#[doc = "Field `reg_gpio_18_func_sel` reader - Function select for GPIO18."] +pub type REG_GPIO_18_FUNC_SEL_R = crate::FieldReader; #[doc = "Function select for GPIO18.\n\nValue on reset: 11"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_18_FUNC_SEL_A { +pub enum GPIO18FUNCTION_SELECT_A { #[doc = "2: `10`"] SF_D2 = 2, #[doc = "4: `100`"] @@ -613,669 +314,639 @@ pub enum REG_GPIO_18_FUNC_SEL_A { #[doc = "14: `1110`"] E21_TCK = 14, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_18_FUNC_SEL_A) -> Self { + fn from(variant: GPIO18FUNCTION_SELECT_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_18_func_sel` reader - Function select for GPIO18."] -pub struct REG_GPIO_18_FUNC_SEL_R(crate::FieldReader); impl REG_GPIO_18_FUNC_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_18_FUNC_SEL_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 2 => Some(REG_GPIO_18_FUNC_SEL_A::SF_D2), - 4 => Some(REG_GPIO_18_FUNC_SEL_A::SPI_SS), - 6 => Some(REG_GPIO_18_FUNC_SEL_A::I2C_SCL), - 7 => Some(REG_GPIO_18_FUNC_SEL_A::UART_SIG2), - 8 => Some(REG_GPIO_18_FUNC_SEL_A::PWM_CH3), - 9 => Some(REG_GPIO_18_FUNC_SEL_A::FEM_GPIO_2), - 11 => Some(REG_GPIO_18_FUNC_SEL_A::SWGPIO_18), - 14 => Some(REG_GPIO_18_FUNC_SEL_A::E21_TCK), + 2 => Some(GPIO18FUNCTION_SELECT_A::SF_D2), + 4 => Some(GPIO18FUNCTION_SELECT_A::SPI_SS), + 6 => Some(GPIO18FUNCTION_SELECT_A::I2C_SCL), + 7 => Some(GPIO18FUNCTION_SELECT_A::UART_SIG2), + 8 => Some(GPIO18FUNCTION_SELECT_A::PWM_CH3), + 9 => Some(GPIO18FUNCTION_SELECT_A::FEM_GPIO_2), + 11 => Some(GPIO18FUNCTION_SELECT_A::SWGPIO_18), + 14 => Some(GPIO18FUNCTION_SELECT_A::E21_TCK), _ => None, } } #[doc = "Checks if the value of the field is `SF_D2`"] #[inline(always)] pub fn is_sf_d2(&self) -> bool { - **self == REG_GPIO_18_FUNC_SEL_A::SF_D2 + *self == GPIO18FUNCTION_SELECT_A::SF_D2 } #[doc = "Checks if the value of the field is `SPI_SS`"] #[inline(always)] pub fn is_spi_ss(&self) -> bool { - **self == REG_GPIO_18_FUNC_SEL_A::SPI_SS + *self == GPIO18FUNCTION_SELECT_A::SPI_SS } #[doc = "Checks if the value of the field is `I2C_SCL`"] #[inline(always)] pub fn is_i2c_scl(&self) -> bool { - **self == REG_GPIO_18_FUNC_SEL_A::I2C_SCL + *self == GPIO18FUNCTION_SELECT_A::I2C_SCL } #[doc = "Checks if the value of the field is `UART_SIG2`"] #[inline(always)] pub fn is_uart_sig2(&self) -> bool { - **self == REG_GPIO_18_FUNC_SEL_A::UART_SIG2 + *self == GPIO18FUNCTION_SELECT_A::UART_SIG2 } #[doc = "Checks if the value of the field is `PWM_CH3`"] #[inline(always)] pub fn is_pwm_ch3(&self) -> bool { - **self == REG_GPIO_18_FUNC_SEL_A::PWM_CH3 + *self == GPIO18FUNCTION_SELECT_A::PWM_CH3 } #[doc = "Checks if the value of the field is `FEM_GPIO_2`"] #[inline(always)] pub fn is_fem_gpio_2(&self) -> bool { - **self == REG_GPIO_18_FUNC_SEL_A::FEM_GPIO_2 + *self == GPIO18FUNCTION_SELECT_A::FEM_GPIO_2 } #[doc = "Checks if the value of the field is `SWGPIO_18`"] #[inline(always)] pub fn is_swgpio_18(&self) -> bool { - **self == REG_GPIO_18_FUNC_SEL_A::SWGPIO_18 + *self == GPIO18FUNCTION_SELECT_A::SWGPIO_18 } #[doc = "Checks if the value of the field is `E21_TCK`"] #[inline(always)] pub fn is_e21_tck(&self) -> bool { - **self == REG_GPIO_18_FUNC_SEL_A::E21_TCK - } -} -impl core::ops::Deref for REG_GPIO_18_FUNC_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO18FUNCTION_SELECT_A::E21_TCK } } #[doc = "Field `reg_gpio_18_func_sel` writer - Function select for GPIO18."] -pub struct REG_GPIO_18_FUNC_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_18_FUNC_SEL_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_18_FUNC_SEL_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +pub type REG_GPIO_18_FUNC_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL9_SPEC, u8, GPIO18FUNCTION_SELECT_A, 4, O>; +impl<'a, const O: u8> REG_GPIO_18_FUNC_SEL_W<'a, O> { #[doc = "`10`"] #[inline(always)] pub fn sf_d2(self) -> &'a mut W { - self.variant(REG_GPIO_18_FUNC_SEL_A::SF_D2) + self.variant(GPIO18FUNCTION_SELECT_A::SF_D2) } #[doc = "`100`"] #[inline(always)] pub fn spi_ss(self) -> &'a mut W { - self.variant(REG_GPIO_18_FUNC_SEL_A::SPI_SS) + self.variant(GPIO18FUNCTION_SELECT_A::SPI_SS) } #[doc = "`110`"] #[inline(always)] pub fn i2c_scl(self) -> &'a mut W { - self.variant(REG_GPIO_18_FUNC_SEL_A::I2C_SCL) + self.variant(GPIO18FUNCTION_SELECT_A::I2C_SCL) } #[doc = "`111`"] #[inline(always)] pub fn uart_sig2(self) -> &'a mut W { - self.variant(REG_GPIO_18_FUNC_SEL_A::UART_SIG2) + self.variant(GPIO18FUNCTION_SELECT_A::UART_SIG2) } #[doc = "`1000`"] #[inline(always)] pub fn pwm_ch3(self) -> &'a mut W { - self.variant(REG_GPIO_18_FUNC_SEL_A::PWM_CH3) + self.variant(GPIO18FUNCTION_SELECT_A::PWM_CH3) } #[doc = "`1001`"] #[inline(always)] pub fn fem_gpio_2(self) -> &'a mut W { - self.variant(REG_GPIO_18_FUNC_SEL_A::FEM_GPIO_2) + self.variant(GPIO18FUNCTION_SELECT_A::FEM_GPIO_2) } #[doc = "`1011`"] #[inline(always)] pub fn swgpio_18(self) -> &'a mut W { - self.variant(REG_GPIO_18_FUNC_SEL_A::SWGPIO_18) + self.variant(GPIO18FUNCTION_SELECT_A::SWGPIO_18) } #[doc = "`1110`"] #[inline(always)] pub fn e21_tck(self) -> &'a mut W { - self.variant(REG_GPIO_18_FUNC_SEL_A::E21_TCK) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 8)) | ((value as u32 & 0x0f) << 8); - self.w + self.variant(GPIO18FUNCTION_SELECT_A::E21_TCK) } } -#[doc = "Pull Down Resistor for GPIO18.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_18_PD_A { +#[doc = "Field `reg_gpio_19_ie` reader - Input enable for GPIO19."] +pub type REG_GPIO_19_IE_R = crate::BitReader; +#[doc = "Input enable for GPIO19.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO19INPUT_ENABLED_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_18_PD_A) -> Self { + fn from(variant: GPIO19INPUT_ENABLED_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_18_pd` reader - Pull Down Resistor for GPIO18."] -pub struct REG_GPIO_18_PD_R(crate::FieldReader); -impl REG_GPIO_18_PD_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_18_PD_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_19_IE_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_18_PD_A { + pub fn variant(&self) -> GPIO19INPUT_ENABLED_A { match self.bits { - false => REG_GPIO_18_PD_A::DISABLED, - true => REG_GPIO_18_PD_A::ENABLED, + false => GPIO19INPUT_ENABLED_A::DISABLED, + true => GPIO19INPUT_ENABLED_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_18_PD_A::DISABLED + *self == GPIO19INPUT_ENABLED_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_18_PD_A::ENABLED + *self == GPIO19INPUT_ENABLED_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_18_PD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_18_pd` writer - Pull Down Resistor for GPIO18."] -pub struct REG_GPIO_18_PD_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_18_PD_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_18_PD_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_19_ie` writer - Input enable for GPIO19."] +pub type REG_GPIO_19_IE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL9_SPEC, GPIO19INPUT_ENABLED_A, O>; +impl<'a, const O: u8> REG_GPIO_19_IE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_18_PD_A::DISABLED) + self.variant(GPIO19INPUT_ENABLED_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_18_PD_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w + self.variant(GPIO19INPUT_ENABLED_A::ENABLED) } } -#[doc = "Pull Up Resistor for GPIO18.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_18_PU_A { +#[doc = "Field `reg_gpio_19_smt` reader - Schmitt trigger enabled for GPIO19."] +pub type REG_GPIO_19_SMT_R = crate::BitReader; +#[doc = "Schmitt trigger enabled for GPIO19.\n\nValue on reset: 1"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO19SCHMITT_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_18_PU_A) -> Self { + fn from(variant: GPIO19SCHMITT_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_18_pu` reader - Pull Up Resistor for GPIO18."] -pub struct REG_GPIO_18_PU_R(crate::FieldReader); -impl REG_GPIO_18_PU_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_18_PU_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_19_SMT_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_18_PU_A { + pub fn variant(&self) -> GPIO19SCHMITT_A { match self.bits { - false => REG_GPIO_18_PU_A::DISABLED, - true => REG_GPIO_18_PU_A::ENABLED, + false => GPIO19SCHMITT_A::DISABLED, + true => GPIO19SCHMITT_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_18_PU_A::DISABLED + *self == GPIO19SCHMITT_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_18_PU_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_18_PU_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO19SCHMITT_A::ENABLED } } -#[doc = "Field `reg_gpio_18_pu` writer - Pull Up Resistor for GPIO18."] -pub struct REG_GPIO_18_PU_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_18_PU_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_18_PU_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_19_smt` writer - Schmitt trigger enabled for GPIO19."] +pub type REG_GPIO_19_SMT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL9_SPEC, GPIO19SCHMITT_A, O>; +impl<'a, const O: u8> REG_GPIO_19_SMT_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_18_PU_A::DISABLED) + self.variant(GPIO19SCHMITT_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_18_PU_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w + self.variant(GPIO19SCHMITT_A::ENABLED) } } -#[doc = "Driving control enabled for GPIO18.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[doc = "Field `reg_gpio_19_drv` reader - Driving control enabled for GPIO19."] +pub type REG_GPIO_19_DRV_R = crate::FieldReader; +#[doc = "Driving control enabled for GPIO19.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_18_DRV_A { +pub enum GPIO19DRIVING_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_18_DRV_A) -> Self { + fn from(variant: GPIO19DRIVING_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_18_drv` reader - Driving control enabled for GPIO18."] -pub struct REG_GPIO_18_DRV_R(crate::FieldReader); -impl REG_GPIO_18_DRV_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_18_DRV_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_19_DRV_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> Option { + pub fn variant(&self) -> Option { match self.bits { - 0 => Some(REG_GPIO_18_DRV_A::DISABLED), - 1 => Some(REG_GPIO_18_DRV_A::ENABLED), + 0 => Some(GPIO19DRIVING_A::DISABLED), + 1 => Some(GPIO19DRIVING_A::ENABLED), _ => None, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_18_DRV_A::DISABLED + *self == GPIO19DRIVING_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_18_DRV_A::ENABLED - } -} -impl core::ops::Deref for REG_GPIO_18_DRV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO19DRIVING_A::ENABLED } } -#[doc = "Field `reg_gpio_18_drv` writer - Driving control enabled for GPIO18."] -pub struct REG_GPIO_18_DRV_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_18_DRV_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_18_DRV_A) -> &'a mut W { - unsafe { self.bits(variant.into()) } - } +#[doc = "Field `reg_gpio_19_drv` writer - Driving control enabled for GPIO19."] +pub type REG_GPIO_19_DRV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL9_SPEC, u8, GPIO19DRIVING_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_19_DRV_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_18_DRV_A::DISABLED) + self.variant(GPIO19DRIVING_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_18_DRV_A::ENABLED) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 2)) | ((value as u32 & 0x03) << 2); - self.w + self.variant(GPIO19DRIVING_A::ENABLED) } } -#[doc = "Schmitt trigger enabled for GPIO18.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_18_SMT_A { +#[doc = "Field `reg_gpio_19_pu` reader - Pull Up Resistor for GPIO19."] +pub type REG_GPIO_19_PU_R = crate::BitReader; +#[doc = "Pull Up Resistor for GPIO19.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO19PULL_UP_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_18_SMT_A) -> Self { + fn from(variant: GPIO19PULL_UP_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_18_smt` reader - Schmitt trigger enabled for GPIO18."] -pub struct REG_GPIO_18_SMT_R(crate::FieldReader); -impl REG_GPIO_18_SMT_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_18_SMT_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_19_PU_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_18_SMT_A { + pub fn variant(&self) -> GPIO19PULL_UP_RESISTOR_A { match self.bits { - false => REG_GPIO_18_SMT_A::DISABLED, - true => REG_GPIO_18_SMT_A::ENABLED, + false => GPIO19PULL_UP_RESISTOR_A::DISABLED, + true => GPIO19PULL_UP_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_18_SMT_A::DISABLED + *self == GPIO19PULL_UP_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_18_SMT_A::ENABLED + *self == GPIO19PULL_UP_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_18_SMT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_gpio_18_smt` writer - Schmitt trigger enabled for GPIO18."] -pub struct REG_GPIO_18_SMT_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_18_SMT_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_18_SMT_A) -> &'a mut W { - self.bit(variant.into()) - } +#[doc = "Field `reg_gpio_19_pu` writer - Pull Up Resistor for GPIO19."] +pub type REG_GPIO_19_PU_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL9_SPEC, GPIO19PULL_UP_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_19_PU_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_18_SMT_A::DISABLED) + self.variant(GPIO19PULL_UP_RESISTOR_A::DISABLED) } #[doc = "`1`"] #[inline(always)] pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_18_SMT_A::ENABLED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w + self.variant(GPIO19PULL_UP_RESISTOR_A::ENABLED) } } -#[doc = "Input enable for GPIO18.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_18_IE_A { +#[doc = "Field `reg_gpio_19_pd` reader - Pull Down Resistor for GPIO19."] +pub type REG_GPIO_19_PD_R = crate::BitReader; +#[doc = "Pull Down Resistor for GPIO19.\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO19PULL_DOWN_RESISTOR_A { #[doc = "0: `0`"] DISABLED = 0, #[doc = "1: `1`"] ENABLED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_18_IE_A) -> Self { + fn from(variant: GPIO19PULL_DOWN_RESISTOR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_18_ie` reader - Input enable for GPIO18."] -pub struct REG_GPIO_18_IE_R(crate::FieldReader); -impl REG_GPIO_18_IE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_18_IE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] +impl REG_GPIO_19_PD_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_18_IE_A { + pub fn variant(&self) -> GPIO19PULL_DOWN_RESISTOR_A { match self.bits { - false => REG_GPIO_18_IE_A::DISABLED, - true => REG_GPIO_18_IE_A::ENABLED, + false => GPIO19PULL_DOWN_RESISTOR_A::DISABLED, + true => GPIO19PULL_DOWN_RESISTOR_A::ENABLED, } } #[doc = "Checks if the value of the field is `DISABLED`"] #[inline(always)] pub fn is_disabled(&self) -> bool { - **self == REG_GPIO_18_IE_A::DISABLED + *self == GPIO19PULL_DOWN_RESISTOR_A::DISABLED } #[doc = "Checks if the value of the field is `ENABLED`"] #[inline(always)] pub fn is_enabled(&self) -> bool { - **self == REG_GPIO_18_IE_A::ENABLED + *self == GPIO19PULL_DOWN_RESISTOR_A::ENABLED } } -impl core::ops::Deref for REG_GPIO_18_IE_R { - type Target = crate::FieldReader; +#[doc = "Field `reg_gpio_19_pd` writer - Pull Down Resistor for GPIO19."] +pub type REG_GPIO_19_PD_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_CFGCTL9_SPEC, GPIO19PULL_DOWN_RESISTOR_A, O>; +impl<'a, const O: u8> REG_GPIO_19_PD_W<'a, O> { + #[doc = "`0`"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn disabled(self) -> &'a mut W { + self.variant(GPIO19PULL_DOWN_RESISTOR_A::DISABLED) + } + #[doc = "`1`"] + #[inline(always)] + pub fn enabled(self) -> &'a mut W { + self.variant(GPIO19PULL_DOWN_RESISTOR_A::ENABLED) } } -#[doc = "Field `reg_gpio_18_ie` writer - Input enable for GPIO18."] -pub struct REG_GPIO_18_IE_W<'a> { - w: &'a mut W, +#[doc = "Field `reg_gpio_19_func_sel` reader - Function select for GPIO19."] +pub type REG_GPIO_19_FUNC_SEL_R = crate::FieldReader; +#[doc = "Function select for GPIO19.\n\nValue on reset: 11"] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum GPIO19FUNCTION_SELECT_A { + #[doc = "2: `10`"] + SF_D1 = 2, + #[doc = "4: `100`"] + SPI_SCLK = 4, + #[doc = "6: `110`"] + I2C_SDA = 6, + #[doc = "7: `111`"] + UART_SIG3 = 7, + #[doc = "8: `1000`"] + PWM_CH4 = 8, + #[doc = "9: `1001`"] + FEM_GPIO_3 = 9, + #[doc = "11: `1011`"] + SWGPIO_19 = 11, + #[doc = "14: `1110`"] + E21_TDO = 14, } -impl<'a> REG_GPIO_18_IE_W<'a> { - #[doc = r"Writes `variant` to the field"] +impl From for u8 { #[inline(always)] - pub fn variant(self, variant: REG_GPIO_18_IE_A) -> &'a mut W { - self.bit(variant.into()) + fn from(variant: GPIO19FUNCTION_SELECT_A) -> Self { + variant as _ } - #[doc = "`0`"] +} +impl REG_GPIO_19_FUNC_SEL_R { + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn disabled(self) -> &'a mut W { - self.variant(REG_GPIO_18_IE_A::DISABLED) + pub fn variant(&self) -> Option { + match self.bits { + 2 => Some(GPIO19FUNCTION_SELECT_A::SF_D1), + 4 => Some(GPIO19FUNCTION_SELECT_A::SPI_SCLK), + 6 => Some(GPIO19FUNCTION_SELECT_A::I2C_SDA), + 7 => Some(GPIO19FUNCTION_SELECT_A::UART_SIG3), + 8 => Some(GPIO19FUNCTION_SELECT_A::PWM_CH4), + 9 => Some(GPIO19FUNCTION_SELECT_A::FEM_GPIO_3), + 11 => Some(GPIO19FUNCTION_SELECT_A::SWGPIO_19), + 14 => Some(GPIO19FUNCTION_SELECT_A::E21_TDO), + _ => None, + } } - #[doc = "`1`"] + #[doc = "Checks if the value of the field is `SF_D1`"] #[inline(always)] - pub fn enabled(self) -> &'a mut W { - self.variant(REG_GPIO_18_IE_A::ENABLED) + pub fn is_sf_d1(&self) -> bool { + *self == GPIO19FUNCTION_SELECT_A::SF_D1 + } + #[doc = "Checks if the value of the field is `SPI_SCLK`"] + #[inline(always)] + pub fn is_spi_sclk(&self) -> bool { + *self == GPIO19FUNCTION_SELECT_A::SPI_SCLK + } + #[doc = "Checks if the value of the field is `I2C_SDA`"] + #[inline(always)] + pub fn is_i2c_sda(&self) -> bool { + *self == GPIO19FUNCTION_SELECT_A::I2C_SDA + } + #[doc = "Checks if the value of the field is `UART_SIG3`"] + #[inline(always)] + pub fn is_uart_sig3(&self) -> bool { + *self == GPIO19FUNCTION_SELECT_A::UART_SIG3 + } + #[doc = "Checks if the value of the field is `PWM_CH4`"] + #[inline(always)] + pub fn is_pwm_ch4(&self) -> bool { + *self == GPIO19FUNCTION_SELECT_A::PWM_CH4 } - #[doc = r"Sets the field bit"] + #[doc = "Checks if the value of the field is `FEM_GPIO_3`"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn is_fem_gpio_3(&self) -> bool { + *self == GPIO19FUNCTION_SELECT_A::FEM_GPIO_3 } - #[doc = r"Clears the field bit"] + #[doc = "Checks if the value of the field is `SWGPIO_19`"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn is_swgpio_19(&self) -> bool { + *self == GPIO19FUNCTION_SELECT_A::SWGPIO_19 } - #[doc = r"Writes raw bits to the field"] + #[doc = "Checks if the value of the field is `E21_TDO`"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn is_e21_tdo(&self) -> bool { + *self == GPIO19FUNCTION_SELECT_A::E21_TDO } } -impl R { - #[doc = "Bits 24:27 - Function select for GPIO19."] +#[doc = "Field `reg_gpio_19_func_sel` writer - Function select for GPIO19."] +pub type REG_GPIO_19_FUNC_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPIO_CFGCTL9_SPEC, u8, GPIO19FUNCTION_SELECT_A, 4, O>; +impl<'a, const O: u8> REG_GPIO_19_FUNC_SEL_W<'a, O> { + #[doc = "`10`"] #[inline(always)] - pub fn reg_gpio_19_func_sel(&self) -> REG_GPIO_19_FUNC_SEL_R { - REG_GPIO_19_FUNC_SEL_R::new(((self.bits >> 24) & 0x0f) as u8) + pub fn sf_d1(self) -> &'a mut W { + self.variant(GPIO19FUNCTION_SELECT_A::SF_D1) } - #[doc = "Bit 21 - Pull Down Resistor for GPIO19."] + #[doc = "`100`"] #[inline(always)] - pub fn reg_gpio_19_pd(&self) -> REG_GPIO_19_PD_R { - REG_GPIO_19_PD_R::new(((self.bits >> 21) & 0x01) != 0) + pub fn spi_sclk(self) -> &'a mut W { + self.variant(GPIO19FUNCTION_SELECT_A::SPI_SCLK) } - #[doc = "Bit 20 - Pull Up Resistor for GPIO19."] + #[doc = "`110`"] #[inline(always)] - pub fn reg_gpio_19_pu(&self) -> REG_GPIO_19_PU_R { - REG_GPIO_19_PU_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn i2c_sda(self) -> &'a mut W { + self.variant(GPIO19FUNCTION_SELECT_A::I2C_SDA) } - #[doc = "Bits 18:19 - Driving control enabled for GPIO19."] + #[doc = "`111`"] #[inline(always)] - pub fn reg_gpio_19_drv(&self) -> REG_GPIO_19_DRV_R { - REG_GPIO_19_DRV_R::new(((self.bits >> 18) & 0x03) as u8) + pub fn uart_sig3(self) -> &'a mut W { + self.variant(GPIO19FUNCTION_SELECT_A::UART_SIG3) } - #[doc = "Bit 17 - Schmitt trigger enabled for GPIO19."] + #[doc = "`1000`"] #[inline(always)] - pub fn reg_gpio_19_smt(&self) -> REG_GPIO_19_SMT_R { - REG_GPIO_19_SMT_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn pwm_ch4(self) -> &'a mut W { + self.variant(GPIO19FUNCTION_SELECT_A::PWM_CH4) } - #[doc = "Bit 16 - Input enable for GPIO19."] + #[doc = "`1001`"] #[inline(always)] - pub fn reg_gpio_19_ie(&self) -> REG_GPIO_19_IE_R { - REG_GPIO_19_IE_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn fem_gpio_3(self) -> &'a mut W { + self.variant(GPIO19FUNCTION_SELECT_A::FEM_GPIO_3) + } + #[doc = "`1011`"] + #[inline(always)] + pub fn swgpio_19(self) -> &'a mut W { + self.variant(GPIO19FUNCTION_SELECT_A::SWGPIO_19) + } + #[doc = "`1110`"] + #[inline(always)] + pub fn e21_tdo(self) -> &'a mut W { + self.variant(GPIO19FUNCTION_SELECT_A::E21_TDO) + } +} +impl R { + #[doc = "Bit 0 - Input enable for GPIO18."] + #[inline(always)] + pub fn reg_gpio_18_ie(&self) -> REG_GPIO_18_IE_R { + REG_GPIO_18_IE_R::new((self.bits & 1) != 0) + } + #[doc = "Bit 1 - Schmitt trigger enabled for GPIO18."] + #[inline(always)] + pub fn reg_gpio_18_smt(&self) -> REG_GPIO_18_SMT_R { + REG_GPIO_18_SMT_R::new(((self.bits >> 1) & 1) != 0) + } + #[doc = "Bits 2:3 - Driving control enabled for GPIO18."] + #[inline(always)] + pub fn reg_gpio_18_drv(&self) -> REG_GPIO_18_DRV_R { + REG_GPIO_18_DRV_R::new(((self.bits >> 2) & 3) as u8) + } + #[doc = "Bit 4 - Pull Up Resistor for GPIO18."] + #[inline(always)] + pub fn reg_gpio_18_pu(&self) -> REG_GPIO_18_PU_R { + REG_GPIO_18_PU_R::new(((self.bits >> 4) & 1) != 0) + } + #[doc = "Bit 5 - Pull Down Resistor for GPIO18."] + #[inline(always)] + pub fn reg_gpio_18_pd(&self) -> REG_GPIO_18_PD_R { + REG_GPIO_18_PD_R::new(((self.bits >> 5) & 1) != 0) } #[doc = "Bits 8:11 - Function select for GPIO18."] #[inline(always)] pub fn reg_gpio_18_func_sel(&self) -> REG_GPIO_18_FUNC_SEL_R { REG_GPIO_18_FUNC_SEL_R::new(((self.bits >> 8) & 0x0f) as u8) } - #[doc = "Bit 5 - Pull Down Resistor for GPIO18."] + #[doc = "Bit 16 - Input enable for GPIO19."] #[inline(always)] - pub fn reg_gpio_18_pd(&self) -> REG_GPIO_18_PD_R { - REG_GPIO_18_PD_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn reg_gpio_19_ie(&self) -> REG_GPIO_19_IE_R { + REG_GPIO_19_IE_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 4 - Pull Up Resistor for GPIO18."] + #[doc = "Bit 17 - Schmitt trigger enabled for GPIO19."] #[inline(always)] - pub fn reg_gpio_18_pu(&self) -> REG_GPIO_18_PU_R { - REG_GPIO_18_PU_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn reg_gpio_19_smt(&self) -> REG_GPIO_19_SMT_R { + REG_GPIO_19_SMT_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bits 2:3 - Driving control enabled for GPIO18."] + #[doc = "Bits 18:19 - Driving control enabled for GPIO19."] #[inline(always)] - pub fn reg_gpio_18_drv(&self) -> REG_GPIO_18_DRV_R { - REG_GPIO_18_DRV_R::new(((self.bits >> 2) & 0x03) as u8) + pub fn reg_gpio_19_drv(&self) -> REG_GPIO_19_DRV_R { + REG_GPIO_19_DRV_R::new(((self.bits >> 18) & 3) as u8) } - #[doc = "Bit 1 - Schmitt trigger enabled for GPIO18."] + #[doc = "Bit 20 - Pull Up Resistor for GPIO19."] #[inline(always)] - pub fn reg_gpio_18_smt(&self) -> REG_GPIO_18_SMT_R { - REG_GPIO_18_SMT_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn reg_gpio_19_pu(&self) -> REG_GPIO_19_PU_R { + REG_GPIO_19_PU_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bit 0 - Input enable for GPIO18."] + #[doc = "Bit 21 - Pull Down Resistor for GPIO19."] #[inline(always)] - pub fn reg_gpio_18_ie(&self) -> REG_GPIO_18_IE_R { - REG_GPIO_18_IE_R::new((self.bits & 0x01) != 0) + pub fn reg_gpio_19_pd(&self) -> REG_GPIO_19_PD_R { + REG_GPIO_19_PD_R::new(((self.bits >> 21) & 1) != 0) } -} -impl W { #[doc = "Bits 24:27 - Function select for GPIO19."] #[inline(always)] - pub fn reg_gpio_19_func_sel(&mut self) -> REG_GPIO_19_FUNC_SEL_W { - REG_GPIO_19_FUNC_SEL_W { w: self } + pub fn reg_gpio_19_func_sel(&self) -> REG_GPIO_19_FUNC_SEL_R { + REG_GPIO_19_FUNC_SEL_R::new(((self.bits >> 24) & 0x0f) as u8) } - #[doc = "Bit 21 - Pull Down Resistor for GPIO19."] +} +impl W { + #[doc = "Bit 0 - Input enable for GPIO18."] #[inline(always)] - pub fn reg_gpio_19_pd(&mut self) -> REG_GPIO_19_PD_W { - REG_GPIO_19_PD_W { w: self } + #[must_use] + pub fn reg_gpio_18_ie(&mut self) -> REG_GPIO_18_IE_W<0> { + REG_GPIO_18_IE_W::new(self) } - #[doc = "Bit 20 - Pull Up Resistor for GPIO19."] + #[doc = "Bit 1 - Schmitt trigger enabled for GPIO18."] #[inline(always)] - pub fn reg_gpio_19_pu(&mut self) -> REG_GPIO_19_PU_W { - REG_GPIO_19_PU_W { w: self } + #[must_use] + pub fn reg_gpio_18_smt(&mut self) -> REG_GPIO_18_SMT_W<1> { + REG_GPIO_18_SMT_W::new(self) } - #[doc = "Bits 18:19 - Driving control enabled for GPIO19."] + #[doc = "Bits 2:3 - Driving control enabled for GPIO18."] #[inline(always)] - pub fn reg_gpio_19_drv(&mut self) -> REG_GPIO_19_DRV_W { - REG_GPIO_19_DRV_W { w: self } + #[must_use] + pub fn reg_gpio_18_drv(&mut self) -> REG_GPIO_18_DRV_W<2> { + REG_GPIO_18_DRV_W::new(self) } - #[doc = "Bit 17 - Schmitt trigger enabled for GPIO19."] + #[doc = "Bit 4 - Pull Up Resistor for GPIO18."] #[inline(always)] - pub fn reg_gpio_19_smt(&mut self) -> REG_GPIO_19_SMT_W { - REG_GPIO_19_SMT_W { w: self } + #[must_use] + pub fn reg_gpio_18_pu(&mut self) -> REG_GPIO_18_PU_W<4> { + REG_GPIO_18_PU_W::new(self) } - #[doc = "Bit 16 - Input enable for GPIO19."] + #[doc = "Bit 5 - Pull Down Resistor for GPIO18."] #[inline(always)] - pub fn reg_gpio_19_ie(&mut self) -> REG_GPIO_19_IE_W { - REG_GPIO_19_IE_W { w: self } + #[must_use] + pub fn reg_gpio_18_pd(&mut self) -> REG_GPIO_18_PD_W<5> { + REG_GPIO_18_PD_W::new(self) } #[doc = "Bits 8:11 - Function select for GPIO18."] #[inline(always)] - pub fn reg_gpio_18_func_sel(&mut self) -> REG_GPIO_18_FUNC_SEL_W { - REG_GPIO_18_FUNC_SEL_W { w: self } + #[must_use] + pub fn reg_gpio_18_func_sel(&mut self) -> REG_GPIO_18_FUNC_SEL_W<8> { + REG_GPIO_18_FUNC_SEL_W::new(self) } - #[doc = "Bit 5 - Pull Down Resistor for GPIO18."] + #[doc = "Bit 16 - Input enable for GPIO19."] #[inline(always)] - pub fn reg_gpio_18_pd(&mut self) -> REG_GPIO_18_PD_W { - REG_GPIO_18_PD_W { w: self } + #[must_use] + pub fn reg_gpio_19_ie(&mut self) -> REG_GPIO_19_IE_W<16> { + REG_GPIO_19_IE_W::new(self) } - #[doc = "Bit 4 - Pull Up Resistor for GPIO18."] + #[doc = "Bit 17 - Schmitt trigger enabled for GPIO19."] #[inline(always)] - pub fn reg_gpio_18_pu(&mut self) -> REG_GPIO_18_PU_W { - REG_GPIO_18_PU_W { w: self } + #[must_use] + pub fn reg_gpio_19_smt(&mut self) -> REG_GPIO_19_SMT_W<17> { + REG_GPIO_19_SMT_W::new(self) } - #[doc = "Bits 2:3 - Driving control enabled for GPIO18."] + #[doc = "Bits 18:19 - Driving control enabled for GPIO19."] #[inline(always)] - pub fn reg_gpio_18_drv(&mut self) -> REG_GPIO_18_DRV_W { - REG_GPIO_18_DRV_W { w: self } + #[must_use] + pub fn reg_gpio_19_drv(&mut self) -> REG_GPIO_19_DRV_W<18> { + REG_GPIO_19_DRV_W::new(self) } - #[doc = "Bit 1 - Schmitt trigger enabled for GPIO18."] + #[doc = "Bit 20 - Pull Up Resistor for GPIO19."] #[inline(always)] - pub fn reg_gpio_18_smt(&mut self) -> REG_GPIO_18_SMT_W { - REG_GPIO_18_SMT_W { w: self } + #[must_use] + pub fn reg_gpio_19_pu(&mut self) -> REG_GPIO_19_PU_W<20> { + REG_GPIO_19_PU_W::new(self) } - #[doc = "Bit 0 - Input enable for GPIO18."] + #[doc = "Bit 21 - Pull Down Resistor for GPIO19."] + #[inline(always)] + #[must_use] + pub fn reg_gpio_19_pd(&mut self) -> REG_GPIO_19_PD_W<21> { + REG_GPIO_19_PD_W::new(self) + } + #[doc = "Bits 24:27 - Function select for GPIO19."] #[inline(always)] - pub fn reg_gpio_18_ie(&mut self) -> REG_GPIO_18_IE_W { - REG_GPIO_18_IE_W { w: self } + #[must_use] + pub fn reg_gpio_19_func_sel(&mut self) -> REG_GPIO_19_FUNC_SEL_W<24> { + REG_GPIO_19_FUNC_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -1293,11 +964,10 @@ impl crate::Readable for GPIO_CFGCTL9_SPEC { #[doc = "`write(|w| ..)` method takes [gpio_cfgctl9::W](W) writer structure"] impl crate::Writable for GPIO_CFGCTL9_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets GPIO_CFGCTL9 to value 0x0b03_0b03"] impl crate::Resettable for GPIO_CFGCTL9_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0b03_0b03 - } + const RESET_VALUE: Self::Ux = 0x0b03_0b03; } diff --git a/src/glb/gpio_int_clr1.rs b/src/glb/gpio_int_clr1.rs index 6993715..82c7a92 100644 --- a/src/glb/gpio_int_clr1.rs +++ b/src/glb/gpio_int_clr1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,2712 +28,1815 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } +#[doc = "Field `reg_gpio_0_interrupt_clear` reader - Interrupt clearing register for GPIO0."] +pub type REG_GPIO_0_INTERRUPT_CLEAR_R = crate::BitReader; #[doc = "Interrupt clearing register for GPIO0.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_0_INTERRUPT_CLEAR_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO0INTERRUPT_CLEAR_A { #[doc = "0: `0`"] NO_CLEAR = 0, #[doc = "1: `1`"] CLEAR = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_0_INTERRUPT_CLEAR_A) -> Self { + fn from(variant: GPIO0INTERRUPT_CLEAR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_0_interrupt_clear` reader - Interrupt clearing register for GPIO0."] -pub struct REG_GPIO_0_INTERRUPT_CLEAR_R(crate::FieldReader); impl REG_GPIO_0_INTERRUPT_CLEAR_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_0_INTERRUPT_CLEAR_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_0_INTERRUPT_CLEAR_A { + pub fn variant(&self) -> GPIO0INTERRUPT_CLEAR_A { match self.bits { - false => REG_GPIO_0_INTERRUPT_CLEAR_A::NO_CLEAR, - true => REG_GPIO_0_INTERRUPT_CLEAR_A::CLEAR, + false => GPIO0INTERRUPT_CLEAR_A::NO_CLEAR, + true => GPIO0INTERRUPT_CLEAR_A::CLEAR, } } #[doc = "Checks if the value of the field is `NO_CLEAR`"] #[inline(always)] pub fn is_no_clear(&self) -> bool { - **self == REG_GPIO_0_INTERRUPT_CLEAR_A::NO_CLEAR + *self == GPIO0INTERRUPT_CLEAR_A::NO_CLEAR } #[doc = "Checks if the value of the field is `CLEAR`"] #[inline(always)] pub fn is_clear(&self) -> bool { - **self == REG_GPIO_0_INTERRUPT_CLEAR_A::CLEAR - } -} -impl core::ops::Deref for REG_GPIO_0_INTERRUPT_CLEAR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO0INTERRUPT_CLEAR_A::CLEAR } } #[doc = "Field `reg_gpio_0_interrupt_clear` writer - Interrupt clearing register for GPIO0."] -pub struct REG_GPIO_0_INTERRUPT_CLEAR_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_0_INTERRUPT_CLEAR_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_0_INTERRUPT_CLEAR_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_0_INTERRUPT_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_CLR1_SPEC, GPIO0INTERRUPT_CLEAR_A, O>; +impl<'a, const O: u8> REG_GPIO_0_INTERRUPT_CLEAR_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn no_clear(self) -> &'a mut W { - self.variant(REG_GPIO_0_INTERRUPT_CLEAR_A::NO_CLEAR) + self.variant(GPIO0INTERRUPT_CLEAR_A::NO_CLEAR) } #[doc = "`1`"] #[inline(always)] pub fn clear(self) -> &'a mut W { - self.variant(REG_GPIO_0_INTERRUPT_CLEAR_A::CLEAR) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + self.variant(GPIO0INTERRUPT_CLEAR_A::CLEAR) } } +#[doc = "Field `reg_gpio_1_interrupt_clear` reader - Interrupt clearing register for GPIO1."] +pub type REG_GPIO_1_INTERRUPT_CLEAR_R = crate::BitReader; #[doc = "Interrupt clearing register for GPIO1.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_1_INTERRUPT_CLEAR_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO1INTERRUPT_CLEAR_A { #[doc = "0: `0`"] NO_CLEAR = 0, #[doc = "1: `1`"] CLEAR = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_1_INTERRUPT_CLEAR_A) -> Self { + fn from(variant: GPIO1INTERRUPT_CLEAR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_1_interrupt_clear` reader - Interrupt clearing register for GPIO1."] -pub struct REG_GPIO_1_INTERRUPT_CLEAR_R(crate::FieldReader); impl REG_GPIO_1_INTERRUPT_CLEAR_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_1_INTERRUPT_CLEAR_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_1_INTERRUPT_CLEAR_A { + pub fn variant(&self) -> GPIO1INTERRUPT_CLEAR_A { match self.bits { - false => REG_GPIO_1_INTERRUPT_CLEAR_A::NO_CLEAR, - true => REG_GPIO_1_INTERRUPT_CLEAR_A::CLEAR, + false => GPIO1INTERRUPT_CLEAR_A::NO_CLEAR, + true => GPIO1INTERRUPT_CLEAR_A::CLEAR, } } #[doc = "Checks if the value of the field is `NO_CLEAR`"] #[inline(always)] pub fn is_no_clear(&self) -> bool { - **self == REG_GPIO_1_INTERRUPT_CLEAR_A::NO_CLEAR + *self == GPIO1INTERRUPT_CLEAR_A::NO_CLEAR } #[doc = "Checks if the value of the field is `CLEAR`"] #[inline(always)] pub fn is_clear(&self) -> bool { - **self == REG_GPIO_1_INTERRUPT_CLEAR_A::CLEAR - } -} -impl core::ops::Deref for REG_GPIO_1_INTERRUPT_CLEAR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO1INTERRUPT_CLEAR_A::CLEAR } } #[doc = "Field `reg_gpio_1_interrupt_clear` writer - Interrupt clearing register for GPIO1."] -pub struct REG_GPIO_1_INTERRUPT_CLEAR_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_1_INTERRUPT_CLEAR_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_1_INTERRUPT_CLEAR_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_1_INTERRUPT_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_CLR1_SPEC, GPIO1INTERRUPT_CLEAR_A, O>; +impl<'a, const O: u8> REG_GPIO_1_INTERRUPT_CLEAR_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn no_clear(self) -> &'a mut W { - self.variant(REG_GPIO_1_INTERRUPT_CLEAR_A::NO_CLEAR) + self.variant(GPIO1INTERRUPT_CLEAR_A::NO_CLEAR) } #[doc = "`1`"] #[inline(always)] pub fn clear(self) -> &'a mut W { - self.variant(REG_GPIO_1_INTERRUPT_CLEAR_A::CLEAR) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w + self.variant(GPIO1INTERRUPT_CLEAR_A::CLEAR) } } +#[doc = "Field `reg_gpio_2_interrupt_clear` reader - Interrupt clearing register for GPIO2."] +pub type REG_GPIO_2_INTERRUPT_CLEAR_R = crate::BitReader; #[doc = "Interrupt clearing register for GPIO2.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_2_INTERRUPT_CLEAR_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO2INTERRUPT_CLEAR_A { #[doc = "0: `0`"] NO_CLEAR = 0, #[doc = "1: `1`"] CLEAR = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_2_INTERRUPT_CLEAR_A) -> Self { + fn from(variant: GPIO2INTERRUPT_CLEAR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_2_interrupt_clear` reader - Interrupt clearing register for GPIO2."] -pub struct REG_GPIO_2_INTERRUPT_CLEAR_R(crate::FieldReader); impl REG_GPIO_2_INTERRUPT_CLEAR_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_2_INTERRUPT_CLEAR_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_2_INTERRUPT_CLEAR_A { + pub fn variant(&self) -> GPIO2INTERRUPT_CLEAR_A { match self.bits { - false => REG_GPIO_2_INTERRUPT_CLEAR_A::NO_CLEAR, - true => REG_GPIO_2_INTERRUPT_CLEAR_A::CLEAR, + false => GPIO2INTERRUPT_CLEAR_A::NO_CLEAR, + true => GPIO2INTERRUPT_CLEAR_A::CLEAR, } } #[doc = "Checks if the value of the field is `NO_CLEAR`"] #[inline(always)] pub fn is_no_clear(&self) -> bool { - **self == REG_GPIO_2_INTERRUPT_CLEAR_A::NO_CLEAR + *self == GPIO2INTERRUPT_CLEAR_A::NO_CLEAR } #[doc = "Checks if the value of the field is `CLEAR`"] #[inline(always)] pub fn is_clear(&self) -> bool { - **self == REG_GPIO_2_INTERRUPT_CLEAR_A::CLEAR - } -} -impl core::ops::Deref for REG_GPIO_2_INTERRUPT_CLEAR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO2INTERRUPT_CLEAR_A::CLEAR } } #[doc = "Field `reg_gpio_2_interrupt_clear` writer - Interrupt clearing register for GPIO2."] -pub struct REG_GPIO_2_INTERRUPT_CLEAR_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_2_INTERRUPT_CLEAR_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_2_INTERRUPT_CLEAR_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_2_INTERRUPT_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_CLR1_SPEC, GPIO2INTERRUPT_CLEAR_A, O>; +impl<'a, const O: u8> REG_GPIO_2_INTERRUPT_CLEAR_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn no_clear(self) -> &'a mut W { - self.variant(REG_GPIO_2_INTERRUPT_CLEAR_A::NO_CLEAR) + self.variant(GPIO2INTERRUPT_CLEAR_A::NO_CLEAR) } #[doc = "`1`"] #[inline(always)] pub fn clear(self) -> &'a mut W { - self.variant(REG_GPIO_2_INTERRUPT_CLEAR_A::CLEAR) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w + self.variant(GPIO2INTERRUPT_CLEAR_A::CLEAR) } } +#[doc = "Field `reg_gpio_3_interrupt_clear` reader - Interrupt clearing register for GPIO3."] +pub type REG_GPIO_3_INTERRUPT_CLEAR_R = crate::BitReader; #[doc = "Interrupt clearing register for GPIO3.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_3_INTERRUPT_CLEAR_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO3INTERRUPT_CLEAR_A { #[doc = "0: `0`"] NO_CLEAR = 0, #[doc = "1: `1`"] CLEAR = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_3_INTERRUPT_CLEAR_A) -> Self { + fn from(variant: GPIO3INTERRUPT_CLEAR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_3_interrupt_clear` reader - Interrupt clearing register for GPIO3."] -pub struct REG_GPIO_3_INTERRUPT_CLEAR_R(crate::FieldReader); impl REG_GPIO_3_INTERRUPT_CLEAR_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_3_INTERRUPT_CLEAR_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_3_INTERRUPT_CLEAR_A { + pub fn variant(&self) -> GPIO3INTERRUPT_CLEAR_A { match self.bits { - false => REG_GPIO_3_INTERRUPT_CLEAR_A::NO_CLEAR, - true => REG_GPIO_3_INTERRUPT_CLEAR_A::CLEAR, + false => GPIO3INTERRUPT_CLEAR_A::NO_CLEAR, + true => GPIO3INTERRUPT_CLEAR_A::CLEAR, } } #[doc = "Checks if the value of the field is `NO_CLEAR`"] #[inline(always)] pub fn is_no_clear(&self) -> bool { - **self == REG_GPIO_3_INTERRUPT_CLEAR_A::NO_CLEAR + *self == GPIO3INTERRUPT_CLEAR_A::NO_CLEAR } #[doc = "Checks if the value of the field is `CLEAR`"] #[inline(always)] pub fn is_clear(&self) -> bool { - **self == REG_GPIO_3_INTERRUPT_CLEAR_A::CLEAR - } -} -impl core::ops::Deref for REG_GPIO_3_INTERRUPT_CLEAR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO3INTERRUPT_CLEAR_A::CLEAR } } #[doc = "Field `reg_gpio_3_interrupt_clear` writer - Interrupt clearing register for GPIO3."] -pub struct REG_GPIO_3_INTERRUPT_CLEAR_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_3_INTERRUPT_CLEAR_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_3_INTERRUPT_CLEAR_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_3_INTERRUPT_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_CLR1_SPEC, GPIO3INTERRUPT_CLEAR_A, O>; +impl<'a, const O: u8> REG_GPIO_3_INTERRUPT_CLEAR_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn no_clear(self) -> &'a mut W { - self.variant(REG_GPIO_3_INTERRUPT_CLEAR_A::NO_CLEAR) + self.variant(GPIO3INTERRUPT_CLEAR_A::NO_CLEAR) } #[doc = "`1`"] #[inline(always)] pub fn clear(self) -> &'a mut W { - self.variant(REG_GPIO_3_INTERRUPT_CLEAR_A::CLEAR) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w + self.variant(GPIO3INTERRUPT_CLEAR_A::CLEAR) } } +#[doc = "Field `reg_gpio_4_interrupt_clear` reader - Interrupt clearing register for GPIO4."] +pub type REG_GPIO_4_INTERRUPT_CLEAR_R = crate::BitReader; #[doc = "Interrupt clearing register for GPIO4.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_4_INTERRUPT_CLEAR_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO4INTERRUPT_CLEAR_A { #[doc = "0: `0`"] NO_CLEAR = 0, #[doc = "1: `1`"] CLEAR = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_4_INTERRUPT_CLEAR_A) -> Self { + fn from(variant: GPIO4INTERRUPT_CLEAR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_4_interrupt_clear` reader - Interrupt clearing register for GPIO4."] -pub struct REG_GPIO_4_INTERRUPT_CLEAR_R(crate::FieldReader); impl REG_GPIO_4_INTERRUPT_CLEAR_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_4_INTERRUPT_CLEAR_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_4_INTERRUPT_CLEAR_A { + pub fn variant(&self) -> GPIO4INTERRUPT_CLEAR_A { match self.bits { - false => REG_GPIO_4_INTERRUPT_CLEAR_A::NO_CLEAR, - true => REG_GPIO_4_INTERRUPT_CLEAR_A::CLEAR, + false => GPIO4INTERRUPT_CLEAR_A::NO_CLEAR, + true => GPIO4INTERRUPT_CLEAR_A::CLEAR, } } #[doc = "Checks if the value of the field is `NO_CLEAR`"] #[inline(always)] pub fn is_no_clear(&self) -> bool { - **self == REG_GPIO_4_INTERRUPT_CLEAR_A::NO_CLEAR + *self == GPIO4INTERRUPT_CLEAR_A::NO_CLEAR } #[doc = "Checks if the value of the field is `CLEAR`"] #[inline(always)] pub fn is_clear(&self) -> bool { - **self == REG_GPIO_4_INTERRUPT_CLEAR_A::CLEAR - } -} -impl core::ops::Deref for REG_GPIO_4_INTERRUPT_CLEAR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO4INTERRUPT_CLEAR_A::CLEAR } } #[doc = "Field `reg_gpio_4_interrupt_clear` writer - Interrupt clearing register for GPIO4."] -pub struct REG_GPIO_4_INTERRUPT_CLEAR_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_4_INTERRUPT_CLEAR_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_4_INTERRUPT_CLEAR_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_4_INTERRUPT_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_CLR1_SPEC, GPIO4INTERRUPT_CLEAR_A, O>; +impl<'a, const O: u8> REG_GPIO_4_INTERRUPT_CLEAR_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn no_clear(self) -> &'a mut W { - self.variant(REG_GPIO_4_INTERRUPT_CLEAR_A::NO_CLEAR) + self.variant(GPIO4INTERRUPT_CLEAR_A::NO_CLEAR) } #[doc = "`1`"] #[inline(always)] pub fn clear(self) -> &'a mut W { - self.variant(REG_GPIO_4_INTERRUPT_CLEAR_A::CLEAR) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w + self.variant(GPIO4INTERRUPT_CLEAR_A::CLEAR) } } +#[doc = "Field `reg_gpio_5_interrupt_clear` reader - Interrupt clearing register for GPIO5."] +pub type REG_GPIO_5_INTERRUPT_CLEAR_R = crate::BitReader; #[doc = "Interrupt clearing register for GPIO5.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_5_INTERRUPT_CLEAR_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO5INTERRUPT_CLEAR_A { #[doc = "0: `0`"] NO_CLEAR = 0, #[doc = "1: `1`"] CLEAR = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_5_INTERRUPT_CLEAR_A) -> Self { + fn from(variant: GPIO5INTERRUPT_CLEAR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_5_interrupt_clear` reader - Interrupt clearing register for GPIO5."] -pub struct REG_GPIO_5_INTERRUPT_CLEAR_R(crate::FieldReader); impl REG_GPIO_5_INTERRUPT_CLEAR_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_5_INTERRUPT_CLEAR_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_5_INTERRUPT_CLEAR_A { + pub fn variant(&self) -> GPIO5INTERRUPT_CLEAR_A { match self.bits { - false => REG_GPIO_5_INTERRUPT_CLEAR_A::NO_CLEAR, - true => REG_GPIO_5_INTERRUPT_CLEAR_A::CLEAR, + false => GPIO5INTERRUPT_CLEAR_A::NO_CLEAR, + true => GPIO5INTERRUPT_CLEAR_A::CLEAR, } } #[doc = "Checks if the value of the field is `NO_CLEAR`"] #[inline(always)] pub fn is_no_clear(&self) -> bool { - **self == REG_GPIO_5_INTERRUPT_CLEAR_A::NO_CLEAR + *self == GPIO5INTERRUPT_CLEAR_A::NO_CLEAR } #[doc = "Checks if the value of the field is `CLEAR`"] #[inline(always)] pub fn is_clear(&self) -> bool { - **self == REG_GPIO_5_INTERRUPT_CLEAR_A::CLEAR - } -} -impl core::ops::Deref for REG_GPIO_5_INTERRUPT_CLEAR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO5INTERRUPT_CLEAR_A::CLEAR } } #[doc = "Field `reg_gpio_5_interrupt_clear` writer - Interrupt clearing register for GPIO5."] -pub struct REG_GPIO_5_INTERRUPT_CLEAR_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_5_INTERRUPT_CLEAR_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_5_INTERRUPT_CLEAR_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_5_INTERRUPT_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_CLR1_SPEC, GPIO5INTERRUPT_CLEAR_A, O>; +impl<'a, const O: u8> REG_GPIO_5_INTERRUPT_CLEAR_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn no_clear(self) -> &'a mut W { - self.variant(REG_GPIO_5_INTERRUPT_CLEAR_A::NO_CLEAR) + self.variant(GPIO5INTERRUPT_CLEAR_A::NO_CLEAR) } #[doc = "`1`"] #[inline(always)] pub fn clear(self) -> &'a mut W { - self.variant(REG_GPIO_5_INTERRUPT_CLEAR_A::CLEAR) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w + self.variant(GPIO5INTERRUPT_CLEAR_A::CLEAR) } } +#[doc = "Field `reg_gpio_6_interrupt_clear` reader - Interrupt clearing register for GPIO6."] +pub type REG_GPIO_6_INTERRUPT_CLEAR_R = crate::BitReader; #[doc = "Interrupt clearing register for GPIO6.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_6_INTERRUPT_CLEAR_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO6INTERRUPT_CLEAR_A { #[doc = "0: `0`"] NO_CLEAR = 0, #[doc = "1: `1`"] CLEAR = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_6_INTERRUPT_CLEAR_A) -> Self { + fn from(variant: GPIO6INTERRUPT_CLEAR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_6_interrupt_clear` reader - Interrupt clearing register for GPIO6."] -pub struct REG_GPIO_6_INTERRUPT_CLEAR_R(crate::FieldReader); impl REG_GPIO_6_INTERRUPT_CLEAR_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_6_INTERRUPT_CLEAR_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_6_INTERRUPT_CLEAR_A { + pub fn variant(&self) -> GPIO6INTERRUPT_CLEAR_A { match self.bits { - false => REG_GPIO_6_INTERRUPT_CLEAR_A::NO_CLEAR, - true => REG_GPIO_6_INTERRUPT_CLEAR_A::CLEAR, + false => GPIO6INTERRUPT_CLEAR_A::NO_CLEAR, + true => GPIO6INTERRUPT_CLEAR_A::CLEAR, } } #[doc = "Checks if the value of the field is `NO_CLEAR`"] #[inline(always)] pub fn is_no_clear(&self) -> bool { - **self == REG_GPIO_6_INTERRUPT_CLEAR_A::NO_CLEAR + *self == GPIO6INTERRUPT_CLEAR_A::NO_CLEAR } #[doc = "Checks if the value of the field is `CLEAR`"] #[inline(always)] pub fn is_clear(&self) -> bool { - **self == REG_GPIO_6_INTERRUPT_CLEAR_A::CLEAR - } -} -impl core::ops::Deref for REG_GPIO_6_INTERRUPT_CLEAR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO6INTERRUPT_CLEAR_A::CLEAR } } #[doc = "Field `reg_gpio_6_interrupt_clear` writer - Interrupt clearing register for GPIO6."] -pub struct REG_GPIO_6_INTERRUPT_CLEAR_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_6_INTERRUPT_CLEAR_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_6_INTERRUPT_CLEAR_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_6_INTERRUPT_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_CLR1_SPEC, GPIO6INTERRUPT_CLEAR_A, O>; +impl<'a, const O: u8> REG_GPIO_6_INTERRUPT_CLEAR_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn no_clear(self) -> &'a mut W { - self.variant(REG_GPIO_6_INTERRUPT_CLEAR_A::NO_CLEAR) + self.variant(GPIO6INTERRUPT_CLEAR_A::NO_CLEAR) } #[doc = "`1`"] #[inline(always)] pub fn clear(self) -> &'a mut W { - self.variant(REG_GPIO_6_INTERRUPT_CLEAR_A::CLEAR) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w + self.variant(GPIO6INTERRUPT_CLEAR_A::CLEAR) } } +#[doc = "Field `reg_gpio_7_interrupt_clear` reader - Interrupt clearing register for GPIO7."] +pub type REG_GPIO_7_INTERRUPT_CLEAR_R = crate::BitReader; #[doc = "Interrupt clearing register for GPIO7.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_7_INTERRUPT_CLEAR_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO7INTERRUPT_CLEAR_A { #[doc = "0: `0`"] NO_CLEAR = 0, #[doc = "1: `1`"] CLEAR = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_7_INTERRUPT_CLEAR_A) -> Self { + fn from(variant: GPIO7INTERRUPT_CLEAR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_7_interrupt_clear` reader - Interrupt clearing register for GPIO7."] -pub struct REG_GPIO_7_INTERRUPT_CLEAR_R(crate::FieldReader); impl REG_GPIO_7_INTERRUPT_CLEAR_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_7_INTERRUPT_CLEAR_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_7_INTERRUPT_CLEAR_A { + pub fn variant(&self) -> GPIO7INTERRUPT_CLEAR_A { match self.bits { - false => REG_GPIO_7_INTERRUPT_CLEAR_A::NO_CLEAR, - true => REG_GPIO_7_INTERRUPT_CLEAR_A::CLEAR, + false => GPIO7INTERRUPT_CLEAR_A::NO_CLEAR, + true => GPIO7INTERRUPT_CLEAR_A::CLEAR, } } #[doc = "Checks if the value of the field is `NO_CLEAR`"] #[inline(always)] pub fn is_no_clear(&self) -> bool { - **self == REG_GPIO_7_INTERRUPT_CLEAR_A::NO_CLEAR + *self == GPIO7INTERRUPT_CLEAR_A::NO_CLEAR } #[doc = "Checks if the value of the field is `CLEAR`"] #[inline(always)] pub fn is_clear(&self) -> bool { - **self == REG_GPIO_7_INTERRUPT_CLEAR_A::CLEAR - } -} -impl core::ops::Deref for REG_GPIO_7_INTERRUPT_CLEAR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO7INTERRUPT_CLEAR_A::CLEAR } } #[doc = "Field `reg_gpio_7_interrupt_clear` writer - Interrupt clearing register for GPIO7."] -pub struct REG_GPIO_7_INTERRUPT_CLEAR_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_7_INTERRUPT_CLEAR_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_7_INTERRUPT_CLEAR_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_7_INTERRUPT_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_CLR1_SPEC, GPIO7INTERRUPT_CLEAR_A, O>; +impl<'a, const O: u8> REG_GPIO_7_INTERRUPT_CLEAR_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn no_clear(self) -> &'a mut W { - self.variant(REG_GPIO_7_INTERRUPT_CLEAR_A::NO_CLEAR) + self.variant(GPIO7INTERRUPT_CLEAR_A::NO_CLEAR) } #[doc = "`1`"] #[inline(always)] pub fn clear(self) -> &'a mut W { - self.variant(REG_GPIO_7_INTERRUPT_CLEAR_A::CLEAR) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7); - self.w + self.variant(GPIO7INTERRUPT_CLEAR_A::CLEAR) } } +#[doc = "Field `reg_gpio_8_interrupt_clear` reader - Interrupt clearing register for GPIO8."] +pub type REG_GPIO_8_INTERRUPT_CLEAR_R = crate::BitReader; #[doc = "Interrupt clearing register for GPIO8.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_8_INTERRUPT_CLEAR_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO8INTERRUPT_CLEAR_A { #[doc = "0: `0`"] NO_CLEAR = 0, #[doc = "1: `1`"] CLEAR = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_8_INTERRUPT_CLEAR_A) -> Self { + fn from(variant: GPIO8INTERRUPT_CLEAR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_8_interrupt_clear` reader - Interrupt clearing register for GPIO8."] -pub struct REG_GPIO_8_INTERRUPT_CLEAR_R(crate::FieldReader); impl REG_GPIO_8_INTERRUPT_CLEAR_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_8_INTERRUPT_CLEAR_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_8_INTERRUPT_CLEAR_A { + pub fn variant(&self) -> GPIO8INTERRUPT_CLEAR_A { match self.bits { - false => REG_GPIO_8_INTERRUPT_CLEAR_A::NO_CLEAR, - true => REG_GPIO_8_INTERRUPT_CLEAR_A::CLEAR, + false => GPIO8INTERRUPT_CLEAR_A::NO_CLEAR, + true => GPIO8INTERRUPT_CLEAR_A::CLEAR, } } #[doc = "Checks if the value of the field is `NO_CLEAR`"] #[inline(always)] pub fn is_no_clear(&self) -> bool { - **self == REG_GPIO_8_INTERRUPT_CLEAR_A::NO_CLEAR + *self == GPIO8INTERRUPT_CLEAR_A::NO_CLEAR } #[doc = "Checks if the value of the field is `CLEAR`"] #[inline(always)] pub fn is_clear(&self) -> bool { - **self == REG_GPIO_8_INTERRUPT_CLEAR_A::CLEAR - } -} -impl core::ops::Deref for REG_GPIO_8_INTERRUPT_CLEAR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO8INTERRUPT_CLEAR_A::CLEAR } } #[doc = "Field `reg_gpio_8_interrupt_clear` writer - Interrupt clearing register for GPIO8."] -pub struct REG_GPIO_8_INTERRUPT_CLEAR_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_8_INTERRUPT_CLEAR_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_8_INTERRUPT_CLEAR_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_8_INTERRUPT_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_CLR1_SPEC, GPIO8INTERRUPT_CLEAR_A, O>; +impl<'a, const O: u8> REG_GPIO_8_INTERRUPT_CLEAR_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn no_clear(self) -> &'a mut W { - self.variant(REG_GPIO_8_INTERRUPT_CLEAR_A::NO_CLEAR) + self.variant(GPIO8INTERRUPT_CLEAR_A::NO_CLEAR) } #[doc = "`1`"] #[inline(always)] pub fn clear(self) -> &'a mut W { - self.variant(REG_GPIO_8_INTERRUPT_CLEAR_A::CLEAR) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w + self.variant(GPIO8INTERRUPT_CLEAR_A::CLEAR) } } +#[doc = "Field `reg_gpio_9_interrupt_clear` reader - Interrupt clearing register for GPIO9."] +pub type REG_GPIO_9_INTERRUPT_CLEAR_R = crate::BitReader; #[doc = "Interrupt clearing register for GPIO9.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_9_INTERRUPT_CLEAR_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO9INTERRUPT_CLEAR_A { #[doc = "0: `0`"] NO_CLEAR = 0, #[doc = "1: `1`"] CLEAR = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_9_INTERRUPT_CLEAR_A) -> Self { + fn from(variant: GPIO9INTERRUPT_CLEAR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_9_interrupt_clear` reader - Interrupt clearing register for GPIO9."] -pub struct REG_GPIO_9_INTERRUPT_CLEAR_R(crate::FieldReader); impl REG_GPIO_9_INTERRUPT_CLEAR_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_9_INTERRUPT_CLEAR_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_9_INTERRUPT_CLEAR_A { + pub fn variant(&self) -> GPIO9INTERRUPT_CLEAR_A { match self.bits { - false => REG_GPIO_9_INTERRUPT_CLEAR_A::NO_CLEAR, - true => REG_GPIO_9_INTERRUPT_CLEAR_A::CLEAR, + false => GPIO9INTERRUPT_CLEAR_A::NO_CLEAR, + true => GPIO9INTERRUPT_CLEAR_A::CLEAR, } } #[doc = "Checks if the value of the field is `NO_CLEAR`"] #[inline(always)] pub fn is_no_clear(&self) -> bool { - **self == REG_GPIO_9_INTERRUPT_CLEAR_A::NO_CLEAR + *self == GPIO9INTERRUPT_CLEAR_A::NO_CLEAR } #[doc = "Checks if the value of the field is `CLEAR`"] #[inline(always)] pub fn is_clear(&self) -> bool { - **self == REG_GPIO_9_INTERRUPT_CLEAR_A::CLEAR - } -} -impl core::ops::Deref for REG_GPIO_9_INTERRUPT_CLEAR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO9INTERRUPT_CLEAR_A::CLEAR } } #[doc = "Field `reg_gpio_9_interrupt_clear` writer - Interrupt clearing register for GPIO9."] -pub struct REG_GPIO_9_INTERRUPT_CLEAR_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_9_INTERRUPT_CLEAR_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_9_INTERRUPT_CLEAR_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_9_INTERRUPT_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_CLR1_SPEC, GPIO9INTERRUPT_CLEAR_A, O>; +impl<'a, const O: u8> REG_GPIO_9_INTERRUPT_CLEAR_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn no_clear(self) -> &'a mut W { - self.variant(REG_GPIO_9_INTERRUPT_CLEAR_A::NO_CLEAR) + self.variant(GPIO9INTERRUPT_CLEAR_A::NO_CLEAR) } #[doc = "`1`"] #[inline(always)] pub fn clear(self) -> &'a mut W { - self.variant(REG_GPIO_9_INTERRUPT_CLEAR_A::CLEAR) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w + self.variant(GPIO9INTERRUPT_CLEAR_A::CLEAR) } } +#[doc = "Field `reg_gpio_10_interrupt_clear` reader - Interrupt clearing register for GPIO10."] +pub type REG_GPIO_10_INTERRUPT_CLEAR_R = crate::BitReader; #[doc = "Interrupt clearing register for GPIO10.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_10_INTERRUPT_CLEAR_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO10INTERRUPT_CLEAR_A { #[doc = "0: `0`"] NO_CLEAR = 0, #[doc = "1: `1`"] CLEAR = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_10_INTERRUPT_CLEAR_A) -> Self { + fn from(variant: GPIO10INTERRUPT_CLEAR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_10_interrupt_clear` reader - Interrupt clearing register for GPIO10."] -pub struct REG_GPIO_10_INTERRUPT_CLEAR_R(crate::FieldReader); impl REG_GPIO_10_INTERRUPT_CLEAR_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_10_INTERRUPT_CLEAR_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_10_INTERRUPT_CLEAR_A { + pub fn variant(&self) -> GPIO10INTERRUPT_CLEAR_A { match self.bits { - false => REG_GPIO_10_INTERRUPT_CLEAR_A::NO_CLEAR, - true => REG_GPIO_10_INTERRUPT_CLEAR_A::CLEAR, + false => GPIO10INTERRUPT_CLEAR_A::NO_CLEAR, + true => GPIO10INTERRUPT_CLEAR_A::CLEAR, } } #[doc = "Checks if the value of the field is `NO_CLEAR`"] #[inline(always)] pub fn is_no_clear(&self) -> bool { - **self == REG_GPIO_10_INTERRUPT_CLEAR_A::NO_CLEAR + *self == GPIO10INTERRUPT_CLEAR_A::NO_CLEAR } #[doc = "Checks if the value of the field is `CLEAR`"] #[inline(always)] pub fn is_clear(&self) -> bool { - **self == REG_GPIO_10_INTERRUPT_CLEAR_A::CLEAR - } -} -impl core::ops::Deref for REG_GPIO_10_INTERRUPT_CLEAR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO10INTERRUPT_CLEAR_A::CLEAR } } #[doc = "Field `reg_gpio_10_interrupt_clear` writer - Interrupt clearing register for GPIO10."] -pub struct REG_GPIO_10_INTERRUPT_CLEAR_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_10_INTERRUPT_CLEAR_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_10_INTERRUPT_CLEAR_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_10_INTERRUPT_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_CLR1_SPEC, GPIO10INTERRUPT_CLEAR_A, O>; +impl<'a, const O: u8> REG_GPIO_10_INTERRUPT_CLEAR_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn no_clear(self) -> &'a mut W { - self.variant(REG_GPIO_10_INTERRUPT_CLEAR_A::NO_CLEAR) + self.variant(GPIO10INTERRUPT_CLEAR_A::NO_CLEAR) } #[doc = "`1`"] #[inline(always)] pub fn clear(self) -> &'a mut W { - self.variant(REG_GPIO_10_INTERRUPT_CLEAR_A::CLEAR) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); - self.w + self.variant(GPIO10INTERRUPT_CLEAR_A::CLEAR) } } +#[doc = "Field `reg_gpio_11_interrupt_clear` reader - Interrupt clearing register for GPIO11."] +pub type REG_GPIO_11_INTERRUPT_CLEAR_R = crate::BitReader; #[doc = "Interrupt clearing register for GPIO11.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_11_INTERRUPT_CLEAR_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO11INTERRUPT_CLEAR_A { #[doc = "0: `0`"] NO_CLEAR = 0, #[doc = "1: `1`"] CLEAR = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_11_INTERRUPT_CLEAR_A) -> Self { + fn from(variant: GPIO11INTERRUPT_CLEAR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_11_interrupt_clear` reader - Interrupt clearing register for GPIO11."] -pub struct REG_GPIO_11_INTERRUPT_CLEAR_R(crate::FieldReader); impl REG_GPIO_11_INTERRUPT_CLEAR_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_11_INTERRUPT_CLEAR_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_11_INTERRUPT_CLEAR_A { + pub fn variant(&self) -> GPIO11INTERRUPT_CLEAR_A { match self.bits { - false => REG_GPIO_11_INTERRUPT_CLEAR_A::NO_CLEAR, - true => REG_GPIO_11_INTERRUPT_CLEAR_A::CLEAR, + false => GPIO11INTERRUPT_CLEAR_A::NO_CLEAR, + true => GPIO11INTERRUPT_CLEAR_A::CLEAR, } } #[doc = "Checks if the value of the field is `NO_CLEAR`"] #[inline(always)] pub fn is_no_clear(&self) -> bool { - **self == REG_GPIO_11_INTERRUPT_CLEAR_A::NO_CLEAR + *self == GPIO11INTERRUPT_CLEAR_A::NO_CLEAR } #[doc = "Checks if the value of the field is `CLEAR`"] #[inline(always)] pub fn is_clear(&self) -> bool { - **self == REG_GPIO_11_INTERRUPT_CLEAR_A::CLEAR - } -} -impl core::ops::Deref for REG_GPIO_11_INTERRUPT_CLEAR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO11INTERRUPT_CLEAR_A::CLEAR } } #[doc = "Field `reg_gpio_11_interrupt_clear` writer - Interrupt clearing register for GPIO11."] -pub struct REG_GPIO_11_INTERRUPT_CLEAR_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_11_INTERRUPT_CLEAR_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_11_INTERRUPT_CLEAR_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_11_INTERRUPT_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_CLR1_SPEC, GPIO11INTERRUPT_CLEAR_A, O>; +impl<'a, const O: u8> REG_GPIO_11_INTERRUPT_CLEAR_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn no_clear(self) -> &'a mut W { - self.variant(REG_GPIO_11_INTERRUPT_CLEAR_A::NO_CLEAR) + self.variant(GPIO11INTERRUPT_CLEAR_A::NO_CLEAR) } #[doc = "`1`"] #[inline(always)] pub fn clear(self) -> &'a mut W { - self.variant(REG_GPIO_11_INTERRUPT_CLEAR_A::CLEAR) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w + self.variant(GPIO11INTERRUPT_CLEAR_A::CLEAR) } } +#[doc = "Field `reg_gpio_12_interrupt_clear` reader - Interrupt clearing register for GPIO12."] +pub type REG_GPIO_12_INTERRUPT_CLEAR_R = crate::BitReader; #[doc = "Interrupt clearing register for GPIO12.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_12_INTERRUPT_CLEAR_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO12INTERRUPT_CLEAR_A { #[doc = "0: `0`"] NO_CLEAR = 0, #[doc = "1: `1`"] CLEAR = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_12_INTERRUPT_CLEAR_A) -> Self { + fn from(variant: GPIO12INTERRUPT_CLEAR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_12_interrupt_clear` reader - Interrupt clearing register for GPIO12."] -pub struct REG_GPIO_12_INTERRUPT_CLEAR_R(crate::FieldReader); impl REG_GPIO_12_INTERRUPT_CLEAR_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_12_INTERRUPT_CLEAR_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_12_INTERRUPT_CLEAR_A { + pub fn variant(&self) -> GPIO12INTERRUPT_CLEAR_A { match self.bits { - false => REG_GPIO_12_INTERRUPT_CLEAR_A::NO_CLEAR, - true => REG_GPIO_12_INTERRUPT_CLEAR_A::CLEAR, + false => GPIO12INTERRUPT_CLEAR_A::NO_CLEAR, + true => GPIO12INTERRUPT_CLEAR_A::CLEAR, } } #[doc = "Checks if the value of the field is `NO_CLEAR`"] #[inline(always)] pub fn is_no_clear(&self) -> bool { - **self == REG_GPIO_12_INTERRUPT_CLEAR_A::NO_CLEAR + *self == GPIO12INTERRUPT_CLEAR_A::NO_CLEAR } #[doc = "Checks if the value of the field is `CLEAR`"] #[inline(always)] pub fn is_clear(&self) -> bool { - **self == REG_GPIO_12_INTERRUPT_CLEAR_A::CLEAR - } -} -impl core::ops::Deref for REG_GPIO_12_INTERRUPT_CLEAR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO12INTERRUPT_CLEAR_A::CLEAR } } #[doc = "Field `reg_gpio_12_interrupt_clear` writer - Interrupt clearing register for GPIO12."] -pub struct REG_GPIO_12_INTERRUPT_CLEAR_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_12_INTERRUPT_CLEAR_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_12_INTERRUPT_CLEAR_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_12_INTERRUPT_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_CLR1_SPEC, GPIO12INTERRUPT_CLEAR_A, O>; +impl<'a, const O: u8> REG_GPIO_12_INTERRUPT_CLEAR_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn no_clear(self) -> &'a mut W { - self.variant(REG_GPIO_12_INTERRUPT_CLEAR_A::NO_CLEAR) + self.variant(GPIO12INTERRUPT_CLEAR_A::NO_CLEAR) } #[doc = "`1`"] #[inline(always)] pub fn clear(self) -> &'a mut W { - self.variant(REG_GPIO_12_INTERRUPT_CLEAR_A::CLEAR) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w + self.variant(GPIO12INTERRUPT_CLEAR_A::CLEAR) } } +#[doc = "Field `reg_gpio_13_interrupt_clear` reader - Interrupt clearing register for GPIO13."] +pub type REG_GPIO_13_INTERRUPT_CLEAR_R = crate::BitReader; #[doc = "Interrupt clearing register for GPIO13.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_13_INTERRUPT_CLEAR_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO13INTERRUPT_CLEAR_A { #[doc = "0: `0`"] NO_CLEAR = 0, #[doc = "1: `1`"] CLEAR = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_13_INTERRUPT_CLEAR_A) -> Self { + fn from(variant: GPIO13INTERRUPT_CLEAR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_13_interrupt_clear` reader - Interrupt clearing register for GPIO13."] -pub struct REG_GPIO_13_INTERRUPT_CLEAR_R(crate::FieldReader); impl REG_GPIO_13_INTERRUPT_CLEAR_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_13_INTERRUPT_CLEAR_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_13_INTERRUPT_CLEAR_A { + pub fn variant(&self) -> GPIO13INTERRUPT_CLEAR_A { match self.bits { - false => REG_GPIO_13_INTERRUPT_CLEAR_A::NO_CLEAR, - true => REG_GPIO_13_INTERRUPT_CLEAR_A::CLEAR, + false => GPIO13INTERRUPT_CLEAR_A::NO_CLEAR, + true => GPIO13INTERRUPT_CLEAR_A::CLEAR, } } #[doc = "Checks if the value of the field is `NO_CLEAR`"] #[inline(always)] pub fn is_no_clear(&self) -> bool { - **self == REG_GPIO_13_INTERRUPT_CLEAR_A::NO_CLEAR + *self == GPIO13INTERRUPT_CLEAR_A::NO_CLEAR } #[doc = "Checks if the value of the field is `CLEAR`"] #[inline(always)] pub fn is_clear(&self) -> bool { - **self == REG_GPIO_13_INTERRUPT_CLEAR_A::CLEAR - } -} -impl core::ops::Deref for REG_GPIO_13_INTERRUPT_CLEAR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO13INTERRUPT_CLEAR_A::CLEAR } } #[doc = "Field `reg_gpio_13_interrupt_clear` writer - Interrupt clearing register for GPIO13."] -pub struct REG_GPIO_13_INTERRUPT_CLEAR_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_13_INTERRUPT_CLEAR_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_13_INTERRUPT_CLEAR_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_13_INTERRUPT_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_CLR1_SPEC, GPIO13INTERRUPT_CLEAR_A, O>; +impl<'a, const O: u8> REG_GPIO_13_INTERRUPT_CLEAR_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn no_clear(self) -> &'a mut W { - self.variant(REG_GPIO_13_INTERRUPT_CLEAR_A::NO_CLEAR) + self.variant(GPIO13INTERRUPT_CLEAR_A::NO_CLEAR) } #[doc = "`1`"] #[inline(always)] pub fn clear(self) -> &'a mut W { - self.variant(REG_GPIO_13_INTERRUPT_CLEAR_A::CLEAR) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13); - self.w + self.variant(GPIO13INTERRUPT_CLEAR_A::CLEAR) } } +#[doc = "Field `reg_gpio_14_interrupt_clear` reader - Interrupt clearing register for GPIO14."] +pub type REG_GPIO_14_INTERRUPT_CLEAR_R = crate::BitReader; #[doc = "Interrupt clearing register for GPIO14.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_14_INTERRUPT_CLEAR_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO14INTERRUPT_CLEAR_A { #[doc = "0: `0`"] NO_CLEAR = 0, #[doc = "1: `1`"] CLEAR = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_14_INTERRUPT_CLEAR_A) -> Self { + fn from(variant: GPIO14INTERRUPT_CLEAR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_14_interrupt_clear` reader - Interrupt clearing register for GPIO14."] -pub struct REG_GPIO_14_INTERRUPT_CLEAR_R(crate::FieldReader); impl REG_GPIO_14_INTERRUPT_CLEAR_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_14_INTERRUPT_CLEAR_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_14_INTERRUPT_CLEAR_A { + pub fn variant(&self) -> GPIO14INTERRUPT_CLEAR_A { match self.bits { - false => REG_GPIO_14_INTERRUPT_CLEAR_A::NO_CLEAR, - true => REG_GPIO_14_INTERRUPT_CLEAR_A::CLEAR, + false => GPIO14INTERRUPT_CLEAR_A::NO_CLEAR, + true => GPIO14INTERRUPT_CLEAR_A::CLEAR, } } #[doc = "Checks if the value of the field is `NO_CLEAR`"] #[inline(always)] pub fn is_no_clear(&self) -> bool { - **self == REG_GPIO_14_INTERRUPT_CLEAR_A::NO_CLEAR + *self == GPIO14INTERRUPT_CLEAR_A::NO_CLEAR } #[doc = "Checks if the value of the field is `CLEAR`"] #[inline(always)] pub fn is_clear(&self) -> bool { - **self == REG_GPIO_14_INTERRUPT_CLEAR_A::CLEAR - } -} -impl core::ops::Deref for REG_GPIO_14_INTERRUPT_CLEAR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO14INTERRUPT_CLEAR_A::CLEAR } } #[doc = "Field `reg_gpio_14_interrupt_clear` writer - Interrupt clearing register for GPIO14."] -pub struct REG_GPIO_14_INTERRUPT_CLEAR_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_14_INTERRUPT_CLEAR_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_14_INTERRUPT_CLEAR_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_14_INTERRUPT_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_CLR1_SPEC, GPIO14INTERRUPT_CLEAR_A, O>; +impl<'a, const O: u8> REG_GPIO_14_INTERRUPT_CLEAR_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn no_clear(self) -> &'a mut W { - self.variant(REG_GPIO_14_INTERRUPT_CLEAR_A::NO_CLEAR) + self.variant(GPIO14INTERRUPT_CLEAR_A::NO_CLEAR) } #[doc = "`1`"] #[inline(always)] pub fn clear(self) -> &'a mut W { - self.variant(REG_GPIO_14_INTERRUPT_CLEAR_A::CLEAR) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14); - self.w + self.variant(GPIO14INTERRUPT_CLEAR_A::CLEAR) } } +#[doc = "Field `reg_gpio_15_interrupt_clear` reader - Interrupt clearing register for GPIO15."] +pub type REG_GPIO_15_INTERRUPT_CLEAR_R = crate::BitReader; #[doc = "Interrupt clearing register for GPIO15.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_15_INTERRUPT_CLEAR_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO15INTERRUPT_CLEAR_A { #[doc = "0: `0`"] NO_CLEAR = 0, #[doc = "1: `1`"] CLEAR = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_15_INTERRUPT_CLEAR_A) -> Self { + fn from(variant: GPIO15INTERRUPT_CLEAR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_15_interrupt_clear` reader - Interrupt clearing register for GPIO15."] -pub struct REG_GPIO_15_INTERRUPT_CLEAR_R(crate::FieldReader); impl REG_GPIO_15_INTERRUPT_CLEAR_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_15_INTERRUPT_CLEAR_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_15_INTERRUPT_CLEAR_A { + pub fn variant(&self) -> GPIO15INTERRUPT_CLEAR_A { match self.bits { - false => REG_GPIO_15_INTERRUPT_CLEAR_A::NO_CLEAR, - true => REG_GPIO_15_INTERRUPT_CLEAR_A::CLEAR, + false => GPIO15INTERRUPT_CLEAR_A::NO_CLEAR, + true => GPIO15INTERRUPT_CLEAR_A::CLEAR, } } #[doc = "Checks if the value of the field is `NO_CLEAR`"] #[inline(always)] pub fn is_no_clear(&self) -> bool { - **self == REG_GPIO_15_INTERRUPT_CLEAR_A::NO_CLEAR + *self == GPIO15INTERRUPT_CLEAR_A::NO_CLEAR } #[doc = "Checks if the value of the field is `CLEAR`"] #[inline(always)] pub fn is_clear(&self) -> bool { - **self == REG_GPIO_15_INTERRUPT_CLEAR_A::CLEAR - } -} -impl core::ops::Deref for REG_GPIO_15_INTERRUPT_CLEAR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO15INTERRUPT_CLEAR_A::CLEAR } } #[doc = "Field `reg_gpio_15_interrupt_clear` writer - Interrupt clearing register for GPIO15."] -pub struct REG_GPIO_15_INTERRUPT_CLEAR_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_15_INTERRUPT_CLEAR_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_15_INTERRUPT_CLEAR_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_15_INTERRUPT_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_CLR1_SPEC, GPIO15INTERRUPT_CLEAR_A, O>; +impl<'a, const O: u8> REG_GPIO_15_INTERRUPT_CLEAR_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn no_clear(self) -> &'a mut W { - self.variant(REG_GPIO_15_INTERRUPT_CLEAR_A::NO_CLEAR) + self.variant(GPIO15INTERRUPT_CLEAR_A::NO_CLEAR) } #[doc = "`1`"] #[inline(always)] pub fn clear(self) -> &'a mut W { - self.variant(REG_GPIO_15_INTERRUPT_CLEAR_A::CLEAR) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15); - self.w + self.variant(GPIO15INTERRUPT_CLEAR_A::CLEAR) } } +#[doc = "Field `reg_gpio_16_interrupt_clear` reader - Interrupt clearing register for GPIO16."] +pub type REG_GPIO_16_INTERRUPT_CLEAR_R = crate::BitReader; #[doc = "Interrupt clearing register for GPIO16.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_16_INTERRUPT_CLEAR_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO16INTERRUPT_CLEAR_A { #[doc = "0: `0`"] NO_CLEAR = 0, #[doc = "1: `1`"] CLEAR = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_16_INTERRUPT_CLEAR_A) -> Self { + fn from(variant: GPIO16INTERRUPT_CLEAR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_16_interrupt_clear` reader - Interrupt clearing register for GPIO16."] -pub struct REG_GPIO_16_INTERRUPT_CLEAR_R(crate::FieldReader); impl REG_GPIO_16_INTERRUPT_CLEAR_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_16_INTERRUPT_CLEAR_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_16_INTERRUPT_CLEAR_A { + pub fn variant(&self) -> GPIO16INTERRUPT_CLEAR_A { match self.bits { - false => REG_GPIO_16_INTERRUPT_CLEAR_A::NO_CLEAR, - true => REG_GPIO_16_INTERRUPT_CLEAR_A::CLEAR, + false => GPIO16INTERRUPT_CLEAR_A::NO_CLEAR, + true => GPIO16INTERRUPT_CLEAR_A::CLEAR, } } #[doc = "Checks if the value of the field is `NO_CLEAR`"] #[inline(always)] pub fn is_no_clear(&self) -> bool { - **self == REG_GPIO_16_INTERRUPT_CLEAR_A::NO_CLEAR + *self == GPIO16INTERRUPT_CLEAR_A::NO_CLEAR } #[doc = "Checks if the value of the field is `CLEAR`"] #[inline(always)] pub fn is_clear(&self) -> bool { - **self == REG_GPIO_16_INTERRUPT_CLEAR_A::CLEAR - } -} -impl core::ops::Deref for REG_GPIO_16_INTERRUPT_CLEAR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO16INTERRUPT_CLEAR_A::CLEAR } } #[doc = "Field `reg_gpio_16_interrupt_clear` writer - Interrupt clearing register for GPIO16."] -pub struct REG_GPIO_16_INTERRUPT_CLEAR_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_16_INTERRUPT_CLEAR_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_16_INTERRUPT_CLEAR_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_16_INTERRUPT_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_CLR1_SPEC, GPIO16INTERRUPT_CLEAR_A, O>; +impl<'a, const O: u8> REG_GPIO_16_INTERRUPT_CLEAR_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn no_clear(self) -> &'a mut W { - self.variant(REG_GPIO_16_INTERRUPT_CLEAR_A::NO_CLEAR) + self.variant(GPIO16INTERRUPT_CLEAR_A::NO_CLEAR) } #[doc = "`1`"] #[inline(always)] pub fn clear(self) -> &'a mut W { - self.variant(REG_GPIO_16_INTERRUPT_CLEAR_A::CLEAR) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w + self.variant(GPIO16INTERRUPT_CLEAR_A::CLEAR) } } +#[doc = "Field `reg_gpio_17_interrupt_clear` reader - Interrupt clearing register for GPIO17."] +pub type REG_GPIO_17_INTERRUPT_CLEAR_R = crate::BitReader; #[doc = "Interrupt clearing register for GPIO17.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_17_INTERRUPT_CLEAR_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO17INTERRUPT_CLEAR_A { #[doc = "0: `0`"] NO_CLEAR = 0, #[doc = "1: `1`"] CLEAR = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_17_INTERRUPT_CLEAR_A) -> Self { + fn from(variant: GPIO17INTERRUPT_CLEAR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_17_interrupt_clear` reader - Interrupt clearing register for GPIO17."] -pub struct REG_GPIO_17_INTERRUPT_CLEAR_R(crate::FieldReader); impl REG_GPIO_17_INTERRUPT_CLEAR_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_17_INTERRUPT_CLEAR_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_17_INTERRUPT_CLEAR_A { + pub fn variant(&self) -> GPIO17INTERRUPT_CLEAR_A { match self.bits { - false => REG_GPIO_17_INTERRUPT_CLEAR_A::NO_CLEAR, - true => REG_GPIO_17_INTERRUPT_CLEAR_A::CLEAR, + false => GPIO17INTERRUPT_CLEAR_A::NO_CLEAR, + true => GPIO17INTERRUPT_CLEAR_A::CLEAR, } } #[doc = "Checks if the value of the field is `NO_CLEAR`"] #[inline(always)] pub fn is_no_clear(&self) -> bool { - **self == REG_GPIO_17_INTERRUPT_CLEAR_A::NO_CLEAR + *self == GPIO17INTERRUPT_CLEAR_A::NO_CLEAR } #[doc = "Checks if the value of the field is `CLEAR`"] #[inline(always)] pub fn is_clear(&self) -> bool { - **self == REG_GPIO_17_INTERRUPT_CLEAR_A::CLEAR - } -} -impl core::ops::Deref for REG_GPIO_17_INTERRUPT_CLEAR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO17INTERRUPT_CLEAR_A::CLEAR } } #[doc = "Field `reg_gpio_17_interrupt_clear` writer - Interrupt clearing register for GPIO17."] -pub struct REG_GPIO_17_INTERRUPT_CLEAR_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_17_INTERRUPT_CLEAR_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_17_INTERRUPT_CLEAR_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_17_INTERRUPT_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_CLR1_SPEC, GPIO17INTERRUPT_CLEAR_A, O>; +impl<'a, const O: u8> REG_GPIO_17_INTERRUPT_CLEAR_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn no_clear(self) -> &'a mut W { - self.variant(REG_GPIO_17_INTERRUPT_CLEAR_A::NO_CLEAR) + self.variant(GPIO17INTERRUPT_CLEAR_A::NO_CLEAR) } #[doc = "`1`"] #[inline(always)] pub fn clear(self) -> &'a mut W { - self.variant(REG_GPIO_17_INTERRUPT_CLEAR_A::CLEAR) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w + self.variant(GPIO17INTERRUPT_CLEAR_A::CLEAR) } } +#[doc = "Field `reg_gpio_18_interrupt_clear` reader - Interrupt clearing register for GPIO18."] +pub type REG_GPIO_18_INTERRUPT_CLEAR_R = crate::BitReader; #[doc = "Interrupt clearing register for GPIO18.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_18_INTERRUPT_CLEAR_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO18INTERRUPT_CLEAR_A { #[doc = "0: `0`"] NO_CLEAR = 0, #[doc = "1: `1`"] CLEAR = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_18_INTERRUPT_CLEAR_A) -> Self { + fn from(variant: GPIO18INTERRUPT_CLEAR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_18_interrupt_clear` reader - Interrupt clearing register for GPIO18."] -pub struct REG_GPIO_18_INTERRUPT_CLEAR_R(crate::FieldReader); impl REG_GPIO_18_INTERRUPT_CLEAR_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_18_INTERRUPT_CLEAR_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_18_INTERRUPT_CLEAR_A { + pub fn variant(&self) -> GPIO18INTERRUPT_CLEAR_A { match self.bits { - false => REG_GPIO_18_INTERRUPT_CLEAR_A::NO_CLEAR, - true => REG_GPIO_18_INTERRUPT_CLEAR_A::CLEAR, + false => GPIO18INTERRUPT_CLEAR_A::NO_CLEAR, + true => GPIO18INTERRUPT_CLEAR_A::CLEAR, } } #[doc = "Checks if the value of the field is `NO_CLEAR`"] #[inline(always)] pub fn is_no_clear(&self) -> bool { - **self == REG_GPIO_18_INTERRUPT_CLEAR_A::NO_CLEAR + *self == GPIO18INTERRUPT_CLEAR_A::NO_CLEAR } #[doc = "Checks if the value of the field is `CLEAR`"] #[inline(always)] pub fn is_clear(&self) -> bool { - **self == REG_GPIO_18_INTERRUPT_CLEAR_A::CLEAR - } -} -impl core::ops::Deref for REG_GPIO_18_INTERRUPT_CLEAR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO18INTERRUPT_CLEAR_A::CLEAR } } #[doc = "Field `reg_gpio_18_interrupt_clear` writer - Interrupt clearing register for GPIO18."] -pub struct REG_GPIO_18_INTERRUPT_CLEAR_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_18_INTERRUPT_CLEAR_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_18_INTERRUPT_CLEAR_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_18_INTERRUPT_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_CLR1_SPEC, GPIO18INTERRUPT_CLEAR_A, O>; +impl<'a, const O: u8> REG_GPIO_18_INTERRUPT_CLEAR_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn no_clear(self) -> &'a mut W { - self.variant(REG_GPIO_18_INTERRUPT_CLEAR_A::NO_CLEAR) + self.variant(GPIO18INTERRUPT_CLEAR_A::NO_CLEAR) } #[doc = "`1`"] #[inline(always)] pub fn clear(self) -> &'a mut W { - self.variant(REG_GPIO_18_INTERRUPT_CLEAR_A::CLEAR) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18); - self.w + self.variant(GPIO18INTERRUPT_CLEAR_A::CLEAR) } } +#[doc = "Field `reg_gpio_19_interrupt_clear` reader - Interrupt clearing register for GPIO19."] +pub type REG_GPIO_19_INTERRUPT_CLEAR_R = crate::BitReader; #[doc = "Interrupt clearing register for GPIO19.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_19_INTERRUPT_CLEAR_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO19INTERRUPT_CLEAR_A { #[doc = "0: `0`"] NO_CLEAR = 0, #[doc = "1: `1`"] CLEAR = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_19_INTERRUPT_CLEAR_A) -> Self { + fn from(variant: GPIO19INTERRUPT_CLEAR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_19_interrupt_clear` reader - Interrupt clearing register for GPIO19."] -pub struct REG_GPIO_19_INTERRUPT_CLEAR_R(crate::FieldReader); impl REG_GPIO_19_INTERRUPT_CLEAR_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_19_INTERRUPT_CLEAR_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_19_INTERRUPT_CLEAR_A { + pub fn variant(&self) -> GPIO19INTERRUPT_CLEAR_A { match self.bits { - false => REG_GPIO_19_INTERRUPT_CLEAR_A::NO_CLEAR, - true => REG_GPIO_19_INTERRUPT_CLEAR_A::CLEAR, + false => GPIO19INTERRUPT_CLEAR_A::NO_CLEAR, + true => GPIO19INTERRUPT_CLEAR_A::CLEAR, } } #[doc = "Checks if the value of the field is `NO_CLEAR`"] #[inline(always)] pub fn is_no_clear(&self) -> bool { - **self == REG_GPIO_19_INTERRUPT_CLEAR_A::NO_CLEAR + *self == GPIO19INTERRUPT_CLEAR_A::NO_CLEAR } #[doc = "Checks if the value of the field is `CLEAR`"] #[inline(always)] pub fn is_clear(&self) -> bool { - **self == REG_GPIO_19_INTERRUPT_CLEAR_A::CLEAR - } -} -impl core::ops::Deref for REG_GPIO_19_INTERRUPT_CLEAR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO19INTERRUPT_CLEAR_A::CLEAR } } #[doc = "Field `reg_gpio_19_interrupt_clear` writer - Interrupt clearing register for GPIO19."] -pub struct REG_GPIO_19_INTERRUPT_CLEAR_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_19_INTERRUPT_CLEAR_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_19_INTERRUPT_CLEAR_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_19_INTERRUPT_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_CLR1_SPEC, GPIO19INTERRUPT_CLEAR_A, O>; +impl<'a, const O: u8> REG_GPIO_19_INTERRUPT_CLEAR_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn no_clear(self) -> &'a mut W { - self.variant(REG_GPIO_19_INTERRUPT_CLEAR_A::NO_CLEAR) + self.variant(GPIO19INTERRUPT_CLEAR_A::NO_CLEAR) } #[doc = "`1`"] #[inline(always)] pub fn clear(self) -> &'a mut W { - self.variant(REG_GPIO_19_INTERRUPT_CLEAR_A::CLEAR) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 19)) | ((value as u32 & 0x01) << 19); - self.w + self.variant(GPIO19INTERRUPT_CLEAR_A::CLEAR) } } +#[doc = "Field `reg_gpio_20_interrupt_clear` reader - Interrupt clearing register for GPIO20."] +pub type REG_GPIO_20_INTERRUPT_CLEAR_R = crate::BitReader; #[doc = "Interrupt clearing register for GPIO20.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_20_INTERRUPT_CLEAR_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO20INTERRUPT_CLEAR_A { #[doc = "0: `0`"] NO_CLEAR = 0, #[doc = "1: `1`"] CLEAR = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_20_INTERRUPT_CLEAR_A) -> Self { + fn from(variant: GPIO20INTERRUPT_CLEAR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_20_interrupt_clear` reader - Interrupt clearing register for GPIO20."] -pub struct REG_GPIO_20_INTERRUPT_CLEAR_R(crate::FieldReader); impl REG_GPIO_20_INTERRUPT_CLEAR_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_20_INTERRUPT_CLEAR_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_20_INTERRUPT_CLEAR_A { + pub fn variant(&self) -> GPIO20INTERRUPT_CLEAR_A { match self.bits { - false => REG_GPIO_20_INTERRUPT_CLEAR_A::NO_CLEAR, - true => REG_GPIO_20_INTERRUPT_CLEAR_A::CLEAR, + false => GPIO20INTERRUPT_CLEAR_A::NO_CLEAR, + true => GPIO20INTERRUPT_CLEAR_A::CLEAR, } } #[doc = "Checks if the value of the field is `NO_CLEAR`"] #[inline(always)] pub fn is_no_clear(&self) -> bool { - **self == REG_GPIO_20_INTERRUPT_CLEAR_A::NO_CLEAR + *self == GPIO20INTERRUPT_CLEAR_A::NO_CLEAR } #[doc = "Checks if the value of the field is `CLEAR`"] #[inline(always)] pub fn is_clear(&self) -> bool { - **self == REG_GPIO_20_INTERRUPT_CLEAR_A::CLEAR - } -} -impl core::ops::Deref for REG_GPIO_20_INTERRUPT_CLEAR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO20INTERRUPT_CLEAR_A::CLEAR } } #[doc = "Field `reg_gpio_20_interrupt_clear` writer - Interrupt clearing register for GPIO20."] -pub struct REG_GPIO_20_INTERRUPT_CLEAR_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_20_INTERRUPT_CLEAR_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_20_INTERRUPT_CLEAR_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_20_INTERRUPT_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_CLR1_SPEC, GPIO20INTERRUPT_CLEAR_A, O>; +impl<'a, const O: u8> REG_GPIO_20_INTERRUPT_CLEAR_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn no_clear(self) -> &'a mut W { - self.variant(REG_GPIO_20_INTERRUPT_CLEAR_A::NO_CLEAR) + self.variant(GPIO20INTERRUPT_CLEAR_A::NO_CLEAR) } #[doc = "`1`"] #[inline(always)] pub fn clear(self) -> &'a mut W { - self.variant(REG_GPIO_20_INTERRUPT_CLEAR_A::CLEAR) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w + self.variant(GPIO20INTERRUPT_CLEAR_A::CLEAR) } } +#[doc = "Field `reg_gpio_21_interrupt_clear` reader - Interrupt clearing register for GPIO21."] +pub type REG_GPIO_21_INTERRUPT_CLEAR_R = crate::BitReader; #[doc = "Interrupt clearing register for GPIO21.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_21_INTERRUPT_CLEAR_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO21INTERRUPT_CLEAR_A { #[doc = "0: `0`"] NO_CLEAR = 0, #[doc = "1: `1`"] CLEAR = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_21_INTERRUPT_CLEAR_A) -> Self { + fn from(variant: GPIO21INTERRUPT_CLEAR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_21_interrupt_clear` reader - Interrupt clearing register for GPIO21."] -pub struct REG_GPIO_21_INTERRUPT_CLEAR_R(crate::FieldReader); impl REG_GPIO_21_INTERRUPT_CLEAR_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_21_INTERRUPT_CLEAR_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_21_INTERRUPT_CLEAR_A { + pub fn variant(&self) -> GPIO21INTERRUPT_CLEAR_A { match self.bits { - false => REG_GPIO_21_INTERRUPT_CLEAR_A::NO_CLEAR, - true => REG_GPIO_21_INTERRUPT_CLEAR_A::CLEAR, + false => GPIO21INTERRUPT_CLEAR_A::NO_CLEAR, + true => GPIO21INTERRUPT_CLEAR_A::CLEAR, } } #[doc = "Checks if the value of the field is `NO_CLEAR`"] #[inline(always)] pub fn is_no_clear(&self) -> bool { - **self == REG_GPIO_21_INTERRUPT_CLEAR_A::NO_CLEAR + *self == GPIO21INTERRUPT_CLEAR_A::NO_CLEAR } #[doc = "Checks if the value of the field is `CLEAR`"] #[inline(always)] pub fn is_clear(&self) -> bool { - **self == REG_GPIO_21_INTERRUPT_CLEAR_A::CLEAR - } -} -impl core::ops::Deref for REG_GPIO_21_INTERRUPT_CLEAR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO21INTERRUPT_CLEAR_A::CLEAR } } #[doc = "Field `reg_gpio_21_interrupt_clear` writer - Interrupt clearing register for GPIO21."] -pub struct REG_GPIO_21_INTERRUPT_CLEAR_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_21_INTERRUPT_CLEAR_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_21_INTERRUPT_CLEAR_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_21_INTERRUPT_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_CLR1_SPEC, GPIO21INTERRUPT_CLEAR_A, O>; +impl<'a, const O: u8> REG_GPIO_21_INTERRUPT_CLEAR_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn no_clear(self) -> &'a mut W { - self.variant(REG_GPIO_21_INTERRUPT_CLEAR_A::NO_CLEAR) + self.variant(GPIO21INTERRUPT_CLEAR_A::NO_CLEAR) } #[doc = "`1`"] #[inline(always)] pub fn clear(self) -> &'a mut W { - self.variant(REG_GPIO_21_INTERRUPT_CLEAR_A::CLEAR) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); - self.w + self.variant(GPIO21INTERRUPT_CLEAR_A::CLEAR) } } +#[doc = "Field `reg_gpio_22_interrupt_clear` reader - Interrupt clearing register for GPIO22."] +pub type REG_GPIO_22_INTERRUPT_CLEAR_R = crate::BitReader; #[doc = "Interrupt clearing register for GPIO22.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_22_INTERRUPT_CLEAR_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO22INTERRUPT_CLEAR_A { #[doc = "0: `0`"] NO_CLEAR = 0, #[doc = "1: `1`"] CLEAR = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_22_INTERRUPT_CLEAR_A) -> Self { + fn from(variant: GPIO22INTERRUPT_CLEAR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_22_interrupt_clear` reader - Interrupt clearing register for GPIO22."] -pub struct REG_GPIO_22_INTERRUPT_CLEAR_R(crate::FieldReader); impl REG_GPIO_22_INTERRUPT_CLEAR_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_22_INTERRUPT_CLEAR_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_22_INTERRUPT_CLEAR_A { + pub fn variant(&self) -> GPIO22INTERRUPT_CLEAR_A { match self.bits { - false => REG_GPIO_22_INTERRUPT_CLEAR_A::NO_CLEAR, - true => REG_GPIO_22_INTERRUPT_CLEAR_A::CLEAR, + false => GPIO22INTERRUPT_CLEAR_A::NO_CLEAR, + true => GPIO22INTERRUPT_CLEAR_A::CLEAR, } } #[doc = "Checks if the value of the field is `NO_CLEAR`"] #[inline(always)] pub fn is_no_clear(&self) -> bool { - **self == REG_GPIO_22_INTERRUPT_CLEAR_A::NO_CLEAR + *self == GPIO22INTERRUPT_CLEAR_A::NO_CLEAR } #[doc = "Checks if the value of the field is `CLEAR`"] #[inline(always)] pub fn is_clear(&self) -> bool { - **self == REG_GPIO_22_INTERRUPT_CLEAR_A::CLEAR - } -} -impl core::ops::Deref for REG_GPIO_22_INTERRUPT_CLEAR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO22INTERRUPT_CLEAR_A::CLEAR } } #[doc = "Field `reg_gpio_22_interrupt_clear` writer - Interrupt clearing register for GPIO22."] -pub struct REG_GPIO_22_INTERRUPT_CLEAR_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_22_INTERRUPT_CLEAR_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_22_INTERRUPT_CLEAR_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_22_INTERRUPT_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_CLR1_SPEC, GPIO22INTERRUPT_CLEAR_A, O>; +impl<'a, const O: u8> REG_GPIO_22_INTERRUPT_CLEAR_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn no_clear(self) -> &'a mut W { - self.variant(REG_GPIO_22_INTERRUPT_CLEAR_A::NO_CLEAR) + self.variant(GPIO22INTERRUPT_CLEAR_A::NO_CLEAR) } #[doc = "`1`"] #[inline(always)] pub fn clear(self) -> &'a mut W { - self.variant(REG_GPIO_22_INTERRUPT_CLEAR_A::CLEAR) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 22)) | ((value as u32 & 0x01) << 22); - self.w + self.variant(GPIO22INTERRUPT_CLEAR_A::CLEAR) } } +#[doc = "Field `reg_gpio_23_interrupt_clear` reader - Interrupt clearing register for GPIO23."] +pub type REG_GPIO_23_INTERRUPT_CLEAR_R = crate::BitReader; #[doc = "Interrupt clearing register for GPIO23.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_23_INTERRUPT_CLEAR_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO23INTERRUPT_CLEAR_A { #[doc = "0: `0`"] NO_CLEAR = 0, #[doc = "1: `1`"] CLEAR = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_23_INTERRUPT_CLEAR_A) -> Self { + fn from(variant: GPIO23INTERRUPT_CLEAR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_23_interrupt_clear` reader - Interrupt clearing register for GPIO23."] -pub struct REG_GPIO_23_INTERRUPT_CLEAR_R(crate::FieldReader); impl REG_GPIO_23_INTERRUPT_CLEAR_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_23_INTERRUPT_CLEAR_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_23_INTERRUPT_CLEAR_A { + pub fn variant(&self) -> GPIO23INTERRUPT_CLEAR_A { match self.bits { - false => REG_GPIO_23_INTERRUPT_CLEAR_A::NO_CLEAR, - true => REG_GPIO_23_INTERRUPT_CLEAR_A::CLEAR, + false => GPIO23INTERRUPT_CLEAR_A::NO_CLEAR, + true => GPIO23INTERRUPT_CLEAR_A::CLEAR, } } #[doc = "Checks if the value of the field is `NO_CLEAR`"] #[inline(always)] pub fn is_no_clear(&self) -> bool { - **self == REG_GPIO_23_INTERRUPT_CLEAR_A::NO_CLEAR + *self == GPIO23INTERRUPT_CLEAR_A::NO_CLEAR } #[doc = "Checks if the value of the field is `CLEAR`"] #[inline(always)] pub fn is_clear(&self) -> bool { - **self == REG_GPIO_23_INTERRUPT_CLEAR_A::CLEAR - } -} -impl core::ops::Deref for REG_GPIO_23_INTERRUPT_CLEAR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO23INTERRUPT_CLEAR_A::CLEAR } } #[doc = "Field `reg_gpio_23_interrupt_clear` writer - Interrupt clearing register for GPIO23."] -pub struct REG_GPIO_23_INTERRUPT_CLEAR_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_23_INTERRUPT_CLEAR_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_23_INTERRUPT_CLEAR_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_23_INTERRUPT_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_CLR1_SPEC, GPIO23INTERRUPT_CLEAR_A, O>; +impl<'a, const O: u8> REG_GPIO_23_INTERRUPT_CLEAR_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn no_clear(self) -> &'a mut W { - self.variant(REG_GPIO_23_INTERRUPT_CLEAR_A::NO_CLEAR) + self.variant(GPIO23INTERRUPT_CLEAR_A::NO_CLEAR) } #[doc = "`1`"] #[inline(always)] pub fn clear(self) -> &'a mut W { - self.variant(REG_GPIO_23_INTERRUPT_CLEAR_A::CLEAR) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23); - self.w + self.variant(GPIO23INTERRUPT_CLEAR_A::CLEAR) } } +#[doc = "Field `reg_gpio_24_interrupt_clear` reader - Interrupt clearing register for GPIO24."] +pub type REG_GPIO_24_INTERRUPT_CLEAR_R = crate::BitReader; #[doc = "Interrupt clearing register for GPIO24.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_24_INTERRUPT_CLEAR_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO24INTERRUPT_CLEAR_A { #[doc = "0: `0`"] NO_CLEAR = 0, #[doc = "1: `1`"] CLEAR = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_24_INTERRUPT_CLEAR_A) -> Self { + fn from(variant: GPIO24INTERRUPT_CLEAR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_24_interrupt_clear` reader - Interrupt clearing register for GPIO24."] -pub struct REG_GPIO_24_INTERRUPT_CLEAR_R(crate::FieldReader); impl REG_GPIO_24_INTERRUPT_CLEAR_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_24_INTERRUPT_CLEAR_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_24_INTERRUPT_CLEAR_A { + pub fn variant(&self) -> GPIO24INTERRUPT_CLEAR_A { match self.bits { - false => REG_GPIO_24_INTERRUPT_CLEAR_A::NO_CLEAR, - true => REG_GPIO_24_INTERRUPT_CLEAR_A::CLEAR, + false => GPIO24INTERRUPT_CLEAR_A::NO_CLEAR, + true => GPIO24INTERRUPT_CLEAR_A::CLEAR, } } #[doc = "Checks if the value of the field is `NO_CLEAR`"] #[inline(always)] pub fn is_no_clear(&self) -> bool { - **self == REG_GPIO_24_INTERRUPT_CLEAR_A::NO_CLEAR + *self == GPIO24INTERRUPT_CLEAR_A::NO_CLEAR } #[doc = "Checks if the value of the field is `CLEAR`"] #[inline(always)] pub fn is_clear(&self) -> bool { - **self == REG_GPIO_24_INTERRUPT_CLEAR_A::CLEAR - } -} -impl core::ops::Deref for REG_GPIO_24_INTERRUPT_CLEAR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO24INTERRUPT_CLEAR_A::CLEAR } } #[doc = "Field `reg_gpio_24_interrupt_clear` writer - Interrupt clearing register for GPIO24."] -pub struct REG_GPIO_24_INTERRUPT_CLEAR_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_24_INTERRUPT_CLEAR_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_24_INTERRUPT_CLEAR_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_24_INTERRUPT_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_CLR1_SPEC, GPIO24INTERRUPT_CLEAR_A, O>; +impl<'a, const O: u8> REG_GPIO_24_INTERRUPT_CLEAR_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn no_clear(self) -> &'a mut W { - self.variant(REG_GPIO_24_INTERRUPT_CLEAR_A::NO_CLEAR) + self.variant(GPIO24INTERRUPT_CLEAR_A::NO_CLEAR) } #[doc = "`1`"] #[inline(always)] pub fn clear(self) -> &'a mut W { - self.variant(REG_GPIO_24_INTERRUPT_CLEAR_A::CLEAR) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24); - self.w + self.variant(GPIO24INTERRUPT_CLEAR_A::CLEAR) } } +#[doc = "Field `reg_gpio_25_interrupt_clear` reader - Interrupt clearing register for GPIO25."] +pub type REG_GPIO_25_INTERRUPT_CLEAR_R = crate::BitReader; #[doc = "Interrupt clearing register for GPIO25.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_25_INTERRUPT_CLEAR_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO25INTERRUPT_CLEAR_A { #[doc = "0: `0`"] NO_CLEAR = 0, #[doc = "1: `1`"] CLEAR = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_25_INTERRUPT_CLEAR_A) -> Self { + fn from(variant: GPIO25INTERRUPT_CLEAR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_25_interrupt_clear` reader - Interrupt clearing register for GPIO25."] -pub struct REG_GPIO_25_INTERRUPT_CLEAR_R(crate::FieldReader); impl REG_GPIO_25_INTERRUPT_CLEAR_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_25_INTERRUPT_CLEAR_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_25_INTERRUPT_CLEAR_A { + pub fn variant(&self) -> GPIO25INTERRUPT_CLEAR_A { match self.bits { - false => REG_GPIO_25_INTERRUPT_CLEAR_A::NO_CLEAR, - true => REG_GPIO_25_INTERRUPT_CLEAR_A::CLEAR, + false => GPIO25INTERRUPT_CLEAR_A::NO_CLEAR, + true => GPIO25INTERRUPT_CLEAR_A::CLEAR, } } #[doc = "Checks if the value of the field is `NO_CLEAR`"] #[inline(always)] pub fn is_no_clear(&self) -> bool { - **self == REG_GPIO_25_INTERRUPT_CLEAR_A::NO_CLEAR + *self == GPIO25INTERRUPT_CLEAR_A::NO_CLEAR } #[doc = "Checks if the value of the field is `CLEAR`"] #[inline(always)] pub fn is_clear(&self) -> bool { - **self == REG_GPIO_25_INTERRUPT_CLEAR_A::CLEAR - } -} -impl core::ops::Deref for REG_GPIO_25_INTERRUPT_CLEAR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO25INTERRUPT_CLEAR_A::CLEAR } } #[doc = "Field `reg_gpio_25_interrupt_clear` writer - Interrupt clearing register for GPIO25."] -pub struct REG_GPIO_25_INTERRUPT_CLEAR_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_25_INTERRUPT_CLEAR_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_25_INTERRUPT_CLEAR_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_25_INTERRUPT_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_CLR1_SPEC, GPIO25INTERRUPT_CLEAR_A, O>; +impl<'a, const O: u8> REG_GPIO_25_INTERRUPT_CLEAR_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn no_clear(self) -> &'a mut W { - self.variant(REG_GPIO_25_INTERRUPT_CLEAR_A::NO_CLEAR) + self.variant(GPIO25INTERRUPT_CLEAR_A::NO_CLEAR) } #[doc = "`1`"] #[inline(always)] pub fn clear(self) -> &'a mut W { - self.variant(REG_GPIO_25_INTERRUPT_CLEAR_A::CLEAR) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 25)) | ((value as u32 & 0x01) << 25); - self.w + self.variant(GPIO25INTERRUPT_CLEAR_A::CLEAR) } } +#[doc = "Field `reg_gpio_26_interrupt_clear` reader - Interrupt clearing register for GPIO26."] +pub type REG_GPIO_26_INTERRUPT_CLEAR_R = crate::BitReader; #[doc = "Interrupt clearing register for GPIO26.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_26_INTERRUPT_CLEAR_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO26INTERRUPT_CLEAR_A { #[doc = "0: `0`"] NO_CLEAR = 0, #[doc = "1: `1`"] CLEAR = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_26_INTERRUPT_CLEAR_A) -> Self { + fn from(variant: GPIO26INTERRUPT_CLEAR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_26_interrupt_clear` reader - Interrupt clearing register for GPIO26."] -pub struct REG_GPIO_26_INTERRUPT_CLEAR_R(crate::FieldReader); impl REG_GPIO_26_INTERRUPT_CLEAR_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_26_INTERRUPT_CLEAR_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_26_INTERRUPT_CLEAR_A { + pub fn variant(&self) -> GPIO26INTERRUPT_CLEAR_A { match self.bits { - false => REG_GPIO_26_INTERRUPT_CLEAR_A::NO_CLEAR, - true => REG_GPIO_26_INTERRUPT_CLEAR_A::CLEAR, + false => GPIO26INTERRUPT_CLEAR_A::NO_CLEAR, + true => GPIO26INTERRUPT_CLEAR_A::CLEAR, } } #[doc = "Checks if the value of the field is `NO_CLEAR`"] #[inline(always)] pub fn is_no_clear(&self) -> bool { - **self == REG_GPIO_26_INTERRUPT_CLEAR_A::NO_CLEAR + *self == GPIO26INTERRUPT_CLEAR_A::NO_CLEAR } #[doc = "Checks if the value of the field is `CLEAR`"] #[inline(always)] pub fn is_clear(&self) -> bool { - **self == REG_GPIO_26_INTERRUPT_CLEAR_A::CLEAR - } -} -impl core::ops::Deref for REG_GPIO_26_INTERRUPT_CLEAR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO26INTERRUPT_CLEAR_A::CLEAR } } #[doc = "Field `reg_gpio_26_interrupt_clear` writer - Interrupt clearing register for GPIO26."] -pub struct REG_GPIO_26_INTERRUPT_CLEAR_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_26_INTERRUPT_CLEAR_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_26_INTERRUPT_CLEAR_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_26_INTERRUPT_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_CLR1_SPEC, GPIO26INTERRUPT_CLEAR_A, O>; +impl<'a, const O: u8> REG_GPIO_26_INTERRUPT_CLEAR_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn no_clear(self) -> &'a mut W { - self.variant(REG_GPIO_26_INTERRUPT_CLEAR_A::NO_CLEAR) + self.variant(GPIO26INTERRUPT_CLEAR_A::NO_CLEAR) } #[doc = "`1`"] #[inline(always)] pub fn clear(self) -> &'a mut W { - self.variant(REG_GPIO_26_INTERRUPT_CLEAR_A::CLEAR) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 26)) | ((value as u32 & 0x01) << 26); - self.w + self.variant(GPIO26INTERRUPT_CLEAR_A::CLEAR) } } +#[doc = "Field `reg_gpio_27_interrupt_clear` reader - Interrupt clearing register for GPIO27."] +pub type REG_GPIO_27_INTERRUPT_CLEAR_R = crate::BitReader; #[doc = "Interrupt clearing register for GPIO27.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_27_INTERRUPT_CLEAR_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO27INTERRUPT_CLEAR_A { #[doc = "0: `0`"] NO_CLEAR = 0, #[doc = "1: `1`"] CLEAR = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_27_INTERRUPT_CLEAR_A) -> Self { + fn from(variant: GPIO27INTERRUPT_CLEAR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_27_interrupt_clear` reader - Interrupt clearing register for GPIO27."] -pub struct REG_GPIO_27_INTERRUPT_CLEAR_R(crate::FieldReader); impl REG_GPIO_27_INTERRUPT_CLEAR_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_27_INTERRUPT_CLEAR_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_27_INTERRUPT_CLEAR_A { + pub fn variant(&self) -> GPIO27INTERRUPT_CLEAR_A { match self.bits { - false => REG_GPIO_27_INTERRUPT_CLEAR_A::NO_CLEAR, - true => REG_GPIO_27_INTERRUPT_CLEAR_A::CLEAR, + false => GPIO27INTERRUPT_CLEAR_A::NO_CLEAR, + true => GPIO27INTERRUPT_CLEAR_A::CLEAR, } } #[doc = "Checks if the value of the field is `NO_CLEAR`"] #[inline(always)] pub fn is_no_clear(&self) -> bool { - **self == REG_GPIO_27_INTERRUPT_CLEAR_A::NO_CLEAR + *self == GPIO27INTERRUPT_CLEAR_A::NO_CLEAR } #[doc = "Checks if the value of the field is `CLEAR`"] #[inline(always)] pub fn is_clear(&self) -> bool { - **self == REG_GPIO_27_INTERRUPT_CLEAR_A::CLEAR - } -} -impl core::ops::Deref for REG_GPIO_27_INTERRUPT_CLEAR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO27INTERRUPT_CLEAR_A::CLEAR } } #[doc = "Field `reg_gpio_27_interrupt_clear` writer - Interrupt clearing register for GPIO27."] -pub struct REG_GPIO_27_INTERRUPT_CLEAR_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_27_INTERRUPT_CLEAR_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_27_INTERRUPT_CLEAR_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_27_INTERRUPT_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_CLR1_SPEC, GPIO27INTERRUPT_CLEAR_A, O>; +impl<'a, const O: u8> REG_GPIO_27_INTERRUPT_CLEAR_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn no_clear(self) -> &'a mut W { - self.variant(REG_GPIO_27_INTERRUPT_CLEAR_A::NO_CLEAR) + self.variant(GPIO27INTERRUPT_CLEAR_A::NO_CLEAR) } #[doc = "`1`"] #[inline(always)] pub fn clear(self) -> &'a mut W { - self.variant(REG_GPIO_27_INTERRUPT_CLEAR_A::CLEAR) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 27)) | ((value as u32 & 0x01) << 27); - self.w + self.variant(GPIO27INTERRUPT_CLEAR_A::CLEAR) } } +#[doc = "Field `reg_gpio_28_interrupt_clear` reader - Interrupt clearing register for GPIO28."] +pub type REG_GPIO_28_INTERRUPT_CLEAR_R = crate::BitReader; #[doc = "Interrupt clearing register for GPIO28.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_28_INTERRUPT_CLEAR_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO28INTERRUPT_CLEAR_A { #[doc = "0: `0`"] NO_CLEAR = 0, #[doc = "1: `1`"] CLEAR = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_28_INTERRUPT_CLEAR_A) -> Self { + fn from(variant: GPIO28INTERRUPT_CLEAR_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_28_interrupt_clear` reader - Interrupt clearing register for GPIO28."] -pub struct REG_GPIO_28_INTERRUPT_CLEAR_R(crate::FieldReader); impl REG_GPIO_28_INTERRUPT_CLEAR_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_28_INTERRUPT_CLEAR_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_28_INTERRUPT_CLEAR_A { + pub fn variant(&self) -> GPIO28INTERRUPT_CLEAR_A { match self.bits { - false => REG_GPIO_28_INTERRUPT_CLEAR_A::NO_CLEAR, - true => REG_GPIO_28_INTERRUPT_CLEAR_A::CLEAR, + false => GPIO28INTERRUPT_CLEAR_A::NO_CLEAR, + true => GPIO28INTERRUPT_CLEAR_A::CLEAR, } } #[doc = "Checks if the value of the field is `NO_CLEAR`"] #[inline(always)] pub fn is_no_clear(&self) -> bool { - **self == REG_GPIO_28_INTERRUPT_CLEAR_A::NO_CLEAR + *self == GPIO28INTERRUPT_CLEAR_A::NO_CLEAR } #[doc = "Checks if the value of the field is `CLEAR`"] #[inline(always)] pub fn is_clear(&self) -> bool { - **self == REG_GPIO_28_INTERRUPT_CLEAR_A::CLEAR - } -} -impl core::ops::Deref for REG_GPIO_28_INTERRUPT_CLEAR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO28INTERRUPT_CLEAR_A::CLEAR } } #[doc = "Field `reg_gpio_28_interrupt_clear` writer - Interrupt clearing register for GPIO28."] -pub struct REG_GPIO_28_INTERRUPT_CLEAR_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_28_INTERRUPT_CLEAR_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_28_INTERRUPT_CLEAR_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_28_INTERRUPT_CLEAR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_CLR1_SPEC, GPIO28INTERRUPT_CLEAR_A, O>; +impl<'a, const O: u8> REG_GPIO_28_INTERRUPT_CLEAR_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn no_clear(self) -> &'a mut W { - self.variant(REG_GPIO_28_INTERRUPT_CLEAR_A::NO_CLEAR) + self.variant(GPIO28INTERRUPT_CLEAR_A::NO_CLEAR) } #[doc = "`1`"] #[inline(always)] pub fn clear(self) -> &'a mut W { - self.variant(REG_GPIO_28_INTERRUPT_CLEAR_A::CLEAR) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 28)) | ((value as u32 & 0x01) << 28); - self.w + self.variant(GPIO28INTERRUPT_CLEAR_A::CLEAR) } } impl R { #[doc = "Bit 0 - Interrupt clearing register for GPIO0."] #[inline(always)] pub fn reg_gpio_0_interrupt_clear(&self) -> REG_GPIO_0_INTERRUPT_CLEAR_R { - REG_GPIO_0_INTERRUPT_CLEAR_R::new((self.bits & 0x01) != 0) + REG_GPIO_0_INTERRUPT_CLEAR_R::new((self.bits & 1) != 0) } #[doc = "Bit 1 - Interrupt clearing register for GPIO1."] #[inline(always)] pub fn reg_gpio_1_interrupt_clear(&self) -> REG_GPIO_1_INTERRUPT_CLEAR_R { - REG_GPIO_1_INTERRUPT_CLEAR_R::new(((self.bits >> 1) & 0x01) != 0) + REG_GPIO_1_INTERRUPT_CLEAR_R::new(((self.bits >> 1) & 1) != 0) } #[doc = "Bit 2 - Interrupt clearing register for GPIO2."] #[inline(always)] pub fn reg_gpio_2_interrupt_clear(&self) -> REG_GPIO_2_INTERRUPT_CLEAR_R { - REG_GPIO_2_INTERRUPT_CLEAR_R::new(((self.bits >> 2) & 0x01) != 0) + REG_GPIO_2_INTERRUPT_CLEAR_R::new(((self.bits >> 2) & 1) != 0) } #[doc = "Bit 3 - Interrupt clearing register for GPIO3."] #[inline(always)] pub fn reg_gpio_3_interrupt_clear(&self) -> REG_GPIO_3_INTERRUPT_CLEAR_R { - REG_GPIO_3_INTERRUPT_CLEAR_R::new(((self.bits >> 3) & 0x01) != 0) + REG_GPIO_3_INTERRUPT_CLEAR_R::new(((self.bits >> 3) & 1) != 0) } #[doc = "Bit 4 - Interrupt clearing register for GPIO4."] #[inline(always)] pub fn reg_gpio_4_interrupt_clear(&self) -> REG_GPIO_4_INTERRUPT_CLEAR_R { - REG_GPIO_4_INTERRUPT_CLEAR_R::new(((self.bits >> 4) & 0x01) != 0) + REG_GPIO_4_INTERRUPT_CLEAR_R::new(((self.bits >> 4) & 1) != 0) } #[doc = "Bit 5 - Interrupt clearing register for GPIO5."] #[inline(always)] pub fn reg_gpio_5_interrupt_clear(&self) -> REG_GPIO_5_INTERRUPT_CLEAR_R { - REG_GPIO_5_INTERRUPT_CLEAR_R::new(((self.bits >> 5) & 0x01) != 0) + REG_GPIO_5_INTERRUPT_CLEAR_R::new(((self.bits >> 5) & 1) != 0) } #[doc = "Bit 6 - Interrupt clearing register for GPIO6."] #[inline(always)] pub fn reg_gpio_6_interrupt_clear(&self) -> REG_GPIO_6_INTERRUPT_CLEAR_R { - REG_GPIO_6_INTERRUPT_CLEAR_R::new(((self.bits >> 6) & 0x01) != 0) + REG_GPIO_6_INTERRUPT_CLEAR_R::new(((self.bits >> 6) & 1) != 0) } #[doc = "Bit 7 - Interrupt clearing register for GPIO7."] #[inline(always)] pub fn reg_gpio_7_interrupt_clear(&self) -> REG_GPIO_7_INTERRUPT_CLEAR_R { - REG_GPIO_7_INTERRUPT_CLEAR_R::new(((self.bits >> 7) & 0x01) != 0) + REG_GPIO_7_INTERRUPT_CLEAR_R::new(((self.bits >> 7) & 1) != 0) } #[doc = "Bit 8 - Interrupt clearing register for GPIO8."] #[inline(always)] pub fn reg_gpio_8_interrupt_clear(&self) -> REG_GPIO_8_INTERRUPT_CLEAR_R { - REG_GPIO_8_INTERRUPT_CLEAR_R::new(((self.bits >> 8) & 0x01) != 0) + REG_GPIO_8_INTERRUPT_CLEAR_R::new(((self.bits >> 8) & 1) != 0) } #[doc = "Bit 9 - Interrupt clearing register for GPIO9."] #[inline(always)] pub fn reg_gpio_9_interrupt_clear(&self) -> REG_GPIO_9_INTERRUPT_CLEAR_R { - REG_GPIO_9_INTERRUPT_CLEAR_R::new(((self.bits >> 9) & 0x01) != 0) + REG_GPIO_9_INTERRUPT_CLEAR_R::new(((self.bits >> 9) & 1) != 0) } #[doc = "Bit 10 - Interrupt clearing register for GPIO10."] #[inline(always)] pub fn reg_gpio_10_interrupt_clear(&self) -> REG_GPIO_10_INTERRUPT_CLEAR_R { - REG_GPIO_10_INTERRUPT_CLEAR_R::new(((self.bits >> 10) & 0x01) != 0) + REG_GPIO_10_INTERRUPT_CLEAR_R::new(((self.bits >> 10) & 1) != 0) } #[doc = "Bit 11 - Interrupt clearing register for GPIO11."] #[inline(always)] pub fn reg_gpio_11_interrupt_clear(&self) -> REG_GPIO_11_INTERRUPT_CLEAR_R { - REG_GPIO_11_INTERRUPT_CLEAR_R::new(((self.bits >> 11) & 0x01) != 0) + REG_GPIO_11_INTERRUPT_CLEAR_R::new(((self.bits >> 11) & 1) != 0) } #[doc = "Bit 12 - Interrupt clearing register for GPIO12."] #[inline(always)] pub fn reg_gpio_12_interrupt_clear(&self) -> REG_GPIO_12_INTERRUPT_CLEAR_R { - REG_GPIO_12_INTERRUPT_CLEAR_R::new(((self.bits >> 12) & 0x01) != 0) + REG_GPIO_12_INTERRUPT_CLEAR_R::new(((self.bits >> 12) & 1) != 0) } #[doc = "Bit 13 - Interrupt clearing register for GPIO13."] #[inline(always)] pub fn reg_gpio_13_interrupt_clear(&self) -> REG_GPIO_13_INTERRUPT_CLEAR_R { - REG_GPIO_13_INTERRUPT_CLEAR_R::new(((self.bits >> 13) & 0x01) != 0) + REG_GPIO_13_INTERRUPT_CLEAR_R::new(((self.bits >> 13) & 1) != 0) } #[doc = "Bit 14 - Interrupt clearing register for GPIO14."] #[inline(always)] pub fn reg_gpio_14_interrupt_clear(&self) -> REG_GPIO_14_INTERRUPT_CLEAR_R { - REG_GPIO_14_INTERRUPT_CLEAR_R::new(((self.bits >> 14) & 0x01) != 0) + REG_GPIO_14_INTERRUPT_CLEAR_R::new(((self.bits >> 14) & 1) != 0) } #[doc = "Bit 15 - Interrupt clearing register for GPIO15."] #[inline(always)] pub fn reg_gpio_15_interrupt_clear(&self) -> REG_GPIO_15_INTERRUPT_CLEAR_R { - REG_GPIO_15_INTERRUPT_CLEAR_R::new(((self.bits >> 15) & 0x01) != 0) + REG_GPIO_15_INTERRUPT_CLEAR_R::new(((self.bits >> 15) & 1) != 0) } #[doc = "Bit 16 - Interrupt clearing register for GPIO16."] #[inline(always)] pub fn reg_gpio_16_interrupt_clear(&self) -> REG_GPIO_16_INTERRUPT_CLEAR_R { - REG_GPIO_16_INTERRUPT_CLEAR_R::new(((self.bits >> 16) & 0x01) != 0) + REG_GPIO_16_INTERRUPT_CLEAR_R::new(((self.bits >> 16) & 1) != 0) } #[doc = "Bit 17 - Interrupt clearing register for GPIO17."] #[inline(always)] pub fn reg_gpio_17_interrupt_clear(&self) -> REG_GPIO_17_INTERRUPT_CLEAR_R { - REG_GPIO_17_INTERRUPT_CLEAR_R::new(((self.bits >> 17) & 0x01) != 0) + REG_GPIO_17_INTERRUPT_CLEAR_R::new(((self.bits >> 17) & 1) != 0) } #[doc = "Bit 18 - Interrupt clearing register for GPIO18."] #[inline(always)] pub fn reg_gpio_18_interrupt_clear(&self) -> REG_GPIO_18_INTERRUPT_CLEAR_R { - REG_GPIO_18_INTERRUPT_CLEAR_R::new(((self.bits >> 18) & 0x01) != 0) + REG_GPIO_18_INTERRUPT_CLEAR_R::new(((self.bits >> 18) & 1) != 0) } #[doc = "Bit 19 - Interrupt clearing register for GPIO19."] #[inline(always)] pub fn reg_gpio_19_interrupt_clear(&self) -> REG_GPIO_19_INTERRUPT_CLEAR_R { - REG_GPIO_19_INTERRUPT_CLEAR_R::new(((self.bits >> 19) & 0x01) != 0) + REG_GPIO_19_INTERRUPT_CLEAR_R::new(((self.bits >> 19) & 1) != 0) } #[doc = "Bit 20 - Interrupt clearing register for GPIO20."] #[inline(always)] pub fn reg_gpio_20_interrupt_clear(&self) -> REG_GPIO_20_INTERRUPT_CLEAR_R { - REG_GPIO_20_INTERRUPT_CLEAR_R::new(((self.bits >> 20) & 0x01) != 0) + REG_GPIO_20_INTERRUPT_CLEAR_R::new(((self.bits >> 20) & 1) != 0) } #[doc = "Bit 21 - Interrupt clearing register for GPIO21."] #[inline(always)] pub fn reg_gpio_21_interrupt_clear(&self) -> REG_GPIO_21_INTERRUPT_CLEAR_R { - REG_GPIO_21_INTERRUPT_CLEAR_R::new(((self.bits >> 21) & 0x01) != 0) + REG_GPIO_21_INTERRUPT_CLEAR_R::new(((self.bits >> 21) & 1) != 0) } #[doc = "Bit 22 - Interrupt clearing register for GPIO22."] #[inline(always)] pub fn reg_gpio_22_interrupt_clear(&self) -> REG_GPIO_22_INTERRUPT_CLEAR_R { - REG_GPIO_22_INTERRUPT_CLEAR_R::new(((self.bits >> 22) & 0x01) != 0) + REG_GPIO_22_INTERRUPT_CLEAR_R::new(((self.bits >> 22) & 1) != 0) } #[doc = "Bit 23 - Interrupt clearing register for GPIO23."] #[inline(always)] pub fn reg_gpio_23_interrupt_clear(&self) -> REG_GPIO_23_INTERRUPT_CLEAR_R { - REG_GPIO_23_INTERRUPT_CLEAR_R::new(((self.bits >> 23) & 0x01) != 0) + REG_GPIO_23_INTERRUPT_CLEAR_R::new(((self.bits >> 23) & 1) != 0) } #[doc = "Bit 24 - Interrupt clearing register for GPIO24."] #[inline(always)] pub fn reg_gpio_24_interrupt_clear(&self) -> REG_GPIO_24_INTERRUPT_CLEAR_R { - REG_GPIO_24_INTERRUPT_CLEAR_R::new(((self.bits >> 24) & 0x01) != 0) + REG_GPIO_24_INTERRUPT_CLEAR_R::new(((self.bits >> 24) & 1) != 0) } #[doc = "Bit 25 - Interrupt clearing register for GPIO25."] #[inline(always)] pub fn reg_gpio_25_interrupt_clear(&self) -> REG_GPIO_25_INTERRUPT_CLEAR_R { - REG_GPIO_25_INTERRUPT_CLEAR_R::new(((self.bits >> 25) & 0x01) != 0) + REG_GPIO_25_INTERRUPT_CLEAR_R::new(((self.bits >> 25) & 1) != 0) } #[doc = "Bit 26 - Interrupt clearing register for GPIO26."] #[inline(always)] pub fn reg_gpio_26_interrupt_clear(&self) -> REG_GPIO_26_INTERRUPT_CLEAR_R { - REG_GPIO_26_INTERRUPT_CLEAR_R::new(((self.bits >> 26) & 0x01) != 0) + REG_GPIO_26_INTERRUPT_CLEAR_R::new(((self.bits >> 26) & 1) != 0) } #[doc = "Bit 27 - Interrupt clearing register for GPIO27."] #[inline(always)] pub fn reg_gpio_27_interrupt_clear(&self) -> REG_GPIO_27_INTERRUPT_CLEAR_R { - REG_GPIO_27_INTERRUPT_CLEAR_R::new(((self.bits >> 27) & 0x01) != 0) + REG_GPIO_27_INTERRUPT_CLEAR_R::new(((self.bits >> 27) & 1) != 0) } #[doc = "Bit 28 - Interrupt clearing register for GPIO28."] #[inline(always)] pub fn reg_gpio_28_interrupt_clear(&self) -> REG_GPIO_28_INTERRUPT_CLEAR_R { - REG_GPIO_28_INTERRUPT_CLEAR_R::new(((self.bits >> 28) & 0x01) != 0) + REG_GPIO_28_INTERRUPT_CLEAR_R::new(((self.bits >> 28) & 1) != 0) } } impl W { #[doc = "Bit 0 - Interrupt clearing register for GPIO0."] #[inline(always)] - pub fn reg_gpio_0_interrupt_clear(&mut self) -> REG_GPIO_0_INTERRUPT_CLEAR_W { - REG_GPIO_0_INTERRUPT_CLEAR_W { w: self } + #[must_use] + pub fn reg_gpio_0_interrupt_clear(&mut self) -> REG_GPIO_0_INTERRUPT_CLEAR_W<0> { + REG_GPIO_0_INTERRUPT_CLEAR_W::new(self) } #[doc = "Bit 1 - Interrupt clearing register for GPIO1."] #[inline(always)] - pub fn reg_gpio_1_interrupt_clear(&mut self) -> REG_GPIO_1_INTERRUPT_CLEAR_W { - REG_GPIO_1_INTERRUPT_CLEAR_W { w: self } + #[must_use] + pub fn reg_gpio_1_interrupt_clear(&mut self) -> REG_GPIO_1_INTERRUPT_CLEAR_W<1> { + REG_GPIO_1_INTERRUPT_CLEAR_W::new(self) } #[doc = "Bit 2 - Interrupt clearing register for GPIO2."] #[inline(always)] - pub fn reg_gpio_2_interrupt_clear(&mut self) -> REG_GPIO_2_INTERRUPT_CLEAR_W { - REG_GPIO_2_INTERRUPT_CLEAR_W { w: self } + #[must_use] + pub fn reg_gpio_2_interrupt_clear(&mut self) -> REG_GPIO_2_INTERRUPT_CLEAR_W<2> { + REG_GPIO_2_INTERRUPT_CLEAR_W::new(self) } #[doc = "Bit 3 - Interrupt clearing register for GPIO3."] #[inline(always)] - pub fn reg_gpio_3_interrupt_clear(&mut self) -> REG_GPIO_3_INTERRUPT_CLEAR_W { - REG_GPIO_3_INTERRUPT_CLEAR_W { w: self } + #[must_use] + pub fn reg_gpio_3_interrupt_clear(&mut self) -> REG_GPIO_3_INTERRUPT_CLEAR_W<3> { + REG_GPIO_3_INTERRUPT_CLEAR_W::new(self) } #[doc = "Bit 4 - Interrupt clearing register for GPIO4."] #[inline(always)] - pub fn reg_gpio_4_interrupt_clear(&mut self) -> REG_GPIO_4_INTERRUPT_CLEAR_W { - REG_GPIO_4_INTERRUPT_CLEAR_W { w: self } + #[must_use] + pub fn reg_gpio_4_interrupt_clear(&mut self) -> REG_GPIO_4_INTERRUPT_CLEAR_W<4> { + REG_GPIO_4_INTERRUPT_CLEAR_W::new(self) } #[doc = "Bit 5 - Interrupt clearing register for GPIO5."] #[inline(always)] - pub fn reg_gpio_5_interrupt_clear(&mut self) -> REG_GPIO_5_INTERRUPT_CLEAR_W { - REG_GPIO_5_INTERRUPT_CLEAR_W { w: self } + #[must_use] + pub fn reg_gpio_5_interrupt_clear(&mut self) -> REG_GPIO_5_INTERRUPT_CLEAR_W<5> { + REG_GPIO_5_INTERRUPT_CLEAR_W::new(self) } #[doc = "Bit 6 - Interrupt clearing register for GPIO6."] #[inline(always)] - pub fn reg_gpio_6_interrupt_clear(&mut self) -> REG_GPIO_6_INTERRUPT_CLEAR_W { - REG_GPIO_6_INTERRUPT_CLEAR_W { w: self } + #[must_use] + pub fn reg_gpio_6_interrupt_clear(&mut self) -> REG_GPIO_6_INTERRUPT_CLEAR_W<6> { + REG_GPIO_6_INTERRUPT_CLEAR_W::new(self) } #[doc = "Bit 7 - Interrupt clearing register for GPIO7."] #[inline(always)] - pub fn reg_gpio_7_interrupt_clear(&mut self) -> REG_GPIO_7_INTERRUPT_CLEAR_W { - REG_GPIO_7_INTERRUPT_CLEAR_W { w: self } + #[must_use] + pub fn reg_gpio_7_interrupt_clear(&mut self) -> REG_GPIO_7_INTERRUPT_CLEAR_W<7> { + REG_GPIO_7_INTERRUPT_CLEAR_W::new(self) } #[doc = "Bit 8 - Interrupt clearing register for GPIO8."] #[inline(always)] - pub fn reg_gpio_8_interrupt_clear(&mut self) -> REG_GPIO_8_INTERRUPT_CLEAR_W { - REG_GPIO_8_INTERRUPT_CLEAR_W { w: self } + #[must_use] + pub fn reg_gpio_8_interrupt_clear(&mut self) -> REG_GPIO_8_INTERRUPT_CLEAR_W<8> { + REG_GPIO_8_INTERRUPT_CLEAR_W::new(self) } #[doc = "Bit 9 - Interrupt clearing register for GPIO9."] #[inline(always)] - pub fn reg_gpio_9_interrupt_clear(&mut self) -> REG_GPIO_9_INTERRUPT_CLEAR_W { - REG_GPIO_9_INTERRUPT_CLEAR_W { w: self } + #[must_use] + pub fn reg_gpio_9_interrupt_clear(&mut self) -> REG_GPIO_9_INTERRUPT_CLEAR_W<9> { + REG_GPIO_9_INTERRUPT_CLEAR_W::new(self) } #[doc = "Bit 10 - Interrupt clearing register for GPIO10."] #[inline(always)] - pub fn reg_gpio_10_interrupt_clear(&mut self) -> REG_GPIO_10_INTERRUPT_CLEAR_W { - REG_GPIO_10_INTERRUPT_CLEAR_W { w: self } + #[must_use] + pub fn reg_gpio_10_interrupt_clear(&mut self) -> REG_GPIO_10_INTERRUPT_CLEAR_W<10> { + REG_GPIO_10_INTERRUPT_CLEAR_W::new(self) } #[doc = "Bit 11 - Interrupt clearing register for GPIO11."] #[inline(always)] - pub fn reg_gpio_11_interrupt_clear(&mut self) -> REG_GPIO_11_INTERRUPT_CLEAR_W { - REG_GPIO_11_INTERRUPT_CLEAR_W { w: self } + #[must_use] + pub fn reg_gpio_11_interrupt_clear(&mut self) -> REG_GPIO_11_INTERRUPT_CLEAR_W<11> { + REG_GPIO_11_INTERRUPT_CLEAR_W::new(self) } #[doc = "Bit 12 - Interrupt clearing register for GPIO12."] #[inline(always)] - pub fn reg_gpio_12_interrupt_clear(&mut self) -> REG_GPIO_12_INTERRUPT_CLEAR_W { - REG_GPIO_12_INTERRUPT_CLEAR_W { w: self } + #[must_use] + pub fn reg_gpio_12_interrupt_clear(&mut self) -> REG_GPIO_12_INTERRUPT_CLEAR_W<12> { + REG_GPIO_12_INTERRUPT_CLEAR_W::new(self) } #[doc = "Bit 13 - Interrupt clearing register for GPIO13."] #[inline(always)] - pub fn reg_gpio_13_interrupt_clear(&mut self) -> REG_GPIO_13_INTERRUPT_CLEAR_W { - REG_GPIO_13_INTERRUPT_CLEAR_W { w: self } + #[must_use] + pub fn reg_gpio_13_interrupt_clear(&mut self) -> REG_GPIO_13_INTERRUPT_CLEAR_W<13> { + REG_GPIO_13_INTERRUPT_CLEAR_W::new(self) } #[doc = "Bit 14 - Interrupt clearing register for GPIO14."] #[inline(always)] - pub fn reg_gpio_14_interrupt_clear(&mut self) -> REG_GPIO_14_INTERRUPT_CLEAR_W { - REG_GPIO_14_INTERRUPT_CLEAR_W { w: self } + #[must_use] + pub fn reg_gpio_14_interrupt_clear(&mut self) -> REG_GPIO_14_INTERRUPT_CLEAR_W<14> { + REG_GPIO_14_INTERRUPT_CLEAR_W::new(self) } #[doc = "Bit 15 - Interrupt clearing register for GPIO15."] #[inline(always)] - pub fn reg_gpio_15_interrupt_clear(&mut self) -> REG_GPIO_15_INTERRUPT_CLEAR_W { - REG_GPIO_15_INTERRUPT_CLEAR_W { w: self } + #[must_use] + pub fn reg_gpio_15_interrupt_clear(&mut self) -> REG_GPIO_15_INTERRUPT_CLEAR_W<15> { + REG_GPIO_15_INTERRUPT_CLEAR_W::new(self) } #[doc = "Bit 16 - Interrupt clearing register for GPIO16."] #[inline(always)] - pub fn reg_gpio_16_interrupt_clear(&mut self) -> REG_GPIO_16_INTERRUPT_CLEAR_W { - REG_GPIO_16_INTERRUPT_CLEAR_W { w: self } + #[must_use] + pub fn reg_gpio_16_interrupt_clear(&mut self) -> REG_GPIO_16_INTERRUPT_CLEAR_W<16> { + REG_GPIO_16_INTERRUPT_CLEAR_W::new(self) } #[doc = "Bit 17 - Interrupt clearing register for GPIO17."] #[inline(always)] - pub fn reg_gpio_17_interrupt_clear(&mut self) -> REG_GPIO_17_INTERRUPT_CLEAR_W { - REG_GPIO_17_INTERRUPT_CLEAR_W { w: self } + #[must_use] + pub fn reg_gpio_17_interrupt_clear(&mut self) -> REG_GPIO_17_INTERRUPT_CLEAR_W<17> { + REG_GPIO_17_INTERRUPT_CLEAR_W::new(self) } #[doc = "Bit 18 - Interrupt clearing register for GPIO18."] #[inline(always)] - pub fn reg_gpio_18_interrupt_clear(&mut self) -> REG_GPIO_18_INTERRUPT_CLEAR_W { - REG_GPIO_18_INTERRUPT_CLEAR_W { w: self } + #[must_use] + pub fn reg_gpio_18_interrupt_clear(&mut self) -> REG_GPIO_18_INTERRUPT_CLEAR_W<18> { + REG_GPIO_18_INTERRUPT_CLEAR_W::new(self) } #[doc = "Bit 19 - Interrupt clearing register for GPIO19."] #[inline(always)] - pub fn reg_gpio_19_interrupt_clear(&mut self) -> REG_GPIO_19_INTERRUPT_CLEAR_W { - REG_GPIO_19_INTERRUPT_CLEAR_W { w: self } + #[must_use] + pub fn reg_gpio_19_interrupt_clear(&mut self) -> REG_GPIO_19_INTERRUPT_CLEAR_W<19> { + REG_GPIO_19_INTERRUPT_CLEAR_W::new(self) } #[doc = "Bit 20 - Interrupt clearing register for GPIO20."] #[inline(always)] - pub fn reg_gpio_20_interrupt_clear(&mut self) -> REG_GPIO_20_INTERRUPT_CLEAR_W { - REG_GPIO_20_INTERRUPT_CLEAR_W { w: self } + #[must_use] + pub fn reg_gpio_20_interrupt_clear(&mut self) -> REG_GPIO_20_INTERRUPT_CLEAR_W<20> { + REG_GPIO_20_INTERRUPT_CLEAR_W::new(self) } #[doc = "Bit 21 - Interrupt clearing register for GPIO21."] #[inline(always)] - pub fn reg_gpio_21_interrupt_clear(&mut self) -> REG_GPIO_21_INTERRUPT_CLEAR_W { - REG_GPIO_21_INTERRUPT_CLEAR_W { w: self } + #[must_use] + pub fn reg_gpio_21_interrupt_clear(&mut self) -> REG_GPIO_21_INTERRUPT_CLEAR_W<21> { + REG_GPIO_21_INTERRUPT_CLEAR_W::new(self) } #[doc = "Bit 22 - Interrupt clearing register for GPIO22."] #[inline(always)] - pub fn reg_gpio_22_interrupt_clear(&mut self) -> REG_GPIO_22_INTERRUPT_CLEAR_W { - REG_GPIO_22_INTERRUPT_CLEAR_W { w: self } + #[must_use] + pub fn reg_gpio_22_interrupt_clear(&mut self) -> REG_GPIO_22_INTERRUPT_CLEAR_W<22> { + REG_GPIO_22_INTERRUPT_CLEAR_W::new(self) } #[doc = "Bit 23 - Interrupt clearing register for GPIO23."] #[inline(always)] - pub fn reg_gpio_23_interrupt_clear(&mut self) -> REG_GPIO_23_INTERRUPT_CLEAR_W { - REG_GPIO_23_INTERRUPT_CLEAR_W { w: self } + #[must_use] + pub fn reg_gpio_23_interrupt_clear(&mut self) -> REG_GPIO_23_INTERRUPT_CLEAR_W<23> { + REG_GPIO_23_INTERRUPT_CLEAR_W::new(self) } #[doc = "Bit 24 - Interrupt clearing register for GPIO24."] #[inline(always)] - pub fn reg_gpio_24_interrupt_clear(&mut self) -> REG_GPIO_24_INTERRUPT_CLEAR_W { - REG_GPIO_24_INTERRUPT_CLEAR_W { w: self } + #[must_use] + pub fn reg_gpio_24_interrupt_clear(&mut self) -> REG_GPIO_24_INTERRUPT_CLEAR_W<24> { + REG_GPIO_24_INTERRUPT_CLEAR_W::new(self) } #[doc = "Bit 25 - Interrupt clearing register for GPIO25."] #[inline(always)] - pub fn reg_gpio_25_interrupt_clear(&mut self) -> REG_GPIO_25_INTERRUPT_CLEAR_W { - REG_GPIO_25_INTERRUPT_CLEAR_W { w: self } + #[must_use] + pub fn reg_gpio_25_interrupt_clear(&mut self) -> REG_GPIO_25_INTERRUPT_CLEAR_W<25> { + REG_GPIO_25_INTERRUPT_CLEAR_W::new(self) } #[doc = "Bit 26 - Interrupt clearing register for GPIO26."] #[inline(always)] - pub fn reg_gpio_26_interrupt_clear(&mut self) -> REG_GPIO_26_INTERRUPT_CLEAR_W { - REG_GPIO_26_INTERRUPT_CLEAR_W { w: self } + #[must_use] + pub fn reg_gpio_26_interrupt_clear(&mut self) -> REG_GPIO_26_INTERRUPT_CLEAR_W<26> { + REG_GPIO_26_INTERRUPT_CLEAR_W::new(self) } #[doc = "Bit 27 - Interrupt clearing register for GPIO27."] #[inline(always)] - pub fn reg_gpio_27_interrupt_clear(&mut self) -> REG_GPIO_27_INTERRUPT_CLEAR_W { - REG_GPIO_27_INTERRUPT_CLEAR_W { w: self } + #[must_use] + pub fn reg_gpio_27_interrupt_clear(&mut self) -> REG_GPIO_27_INTERRUPT_CLEAR_W<27> { + REG_GPIO_27_INTERRUPT_CLEAR_W::new(self) } #[doc = "Bit 28 - Interrupt clearing register for GPIO28."] #[inline(always)] - pub fn reg_gpio_28_interrupt_clear(&mut self) -> REG_GPIO_28_INTERRUPT_CLEAR_W { - REG_GPIO_28_INTERRUPT_CLEAR_W { w: self } + #[must_use] + pub fn reg_gpio_28_interrupt_clear(&mut self) -> REG_GPIO_28_INTERRUPT_CLEAR_W<28> { + REG_GPIO_28_INTERRUPT_CLEAR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -2750,11 +1854,10 @@ impl crate::Readable for GPIO_INT_CLR1_SPEC { #[doc = "`write(|w| ..)` method takes [gpio_int_clr1::W](W) writer structure"] impl crate::Writable for GPIO_INT_CLR1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets GPIO_INT_CLR1 to value 0"] impl crate::Resettable for GPIO_INT_CLR1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/gpio_int_mask1.rs b/src/glb/gpio_int_mask1.rs index 6d97c4d..331078c 100644 --- a/src/glb/gpio_int_mask1.rs +++ b/src/glb/gpio_int_mask1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,2712 +28,1815 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } +#[doc = "Field `reg_gpio_0_mask` reader - Mask register for GPIO0."] +pub type REG_GPIO_0_MASK_R = crate::BitReader; #[doc = "Mask register for GPIO0.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_0_MASK_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO0MASK_A { #[doc = "0: `0`"] UNMASKED = 0, #[doc = "1: `1`"] MASKED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_0_MASK_A) -> Self { + fn from(variant: GPIO0MASK_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_0_mask` reader - Mask register for GPIO0."] -pub struct REG_GPIO_0_MASK_R(crate::FieldReader); impl REG_GPIO_0_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_0_MASK_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_0_MASK_A { + pub fn variant(&self) -> GPIO0MASK_A { match self.bits { - false => REG_GPIO_0_MASK_A::UNMASKED, - true => REG_GPIO_0_MASK_A::MASKED, + false => GPIO0MASK_A::UNMASKED, + true => GPIO0MASK_A::MASKED, } } #[doc = "Checks if the value of the field is `UNMASKED`"] #[inline(always)] pub fn is_unmasked(&self) -> bool { - **self == REG_GPIO_0_MASK_A::UNMASKED + *self == GPIO0MASK_A::UNMASKED } #[doc = "Checks if the value of the field is `MASKED`"] #[inline(always)] pub fn is_masked(&self) -> bool { - **self == REG_GPIO_0_MASK_A::MASKED - } -} -impl core::ops::Deref for REG_GPIO_0_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO0MASK_A::MASKED } } #[doc = "Field `reg_gpio_0_mask` writer - Mask register for GPIO0."] -pub struct REG_GPIO_0_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_0_MASK_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_0_MASK_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_0_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MASK1_SPEC, GPIO0MASK_A, O>; +impl<'a, const O: u8> REG_GPIO_0_MASK_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn unmasked(self) -> &'a mut W { - self.variant(REG_GPIO_0_MASK_A::UNMASKED) + self.variant(GPIO0MASK_A::UNMASKED) } #[doc = "`1`"] #[inline(always)] pub fn masked(self) -> &'a mut W { - self.variant(REG_GPIO_0_MASK_A::MASKED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + self.variant(GPIO0MASK_A::MASKED) } } +#[doc = "Field `reg_gpio_1_mask` reader - Mask register for GPIO1."] +pub type REG_GPIO_1_MASK_R = crate::BitReader; #[doc = "Mask register for GPIO1.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_1_MASK_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO1MASK_A { #[doc = "0: `0`"] UNMASKED = 0, #[doc = "1: `1`"] MASKED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_1_MASK_A) -> Self { + fn from(variant: GPIO1MASK_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_1_mask` reader - Mask register for GPIO1."] -pub struct REG_GPIO_1_MASK_R(crate::FieldReader); impl REG_GPIO_1_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_1_MASK_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_1_MASK_A { + pub fn variant(&self) -> GPIO1MASK_A { match self.bits { - false => REG_GPIO_1_MASK_A::UNMASKED, - true => REG_GPIO_1_MASK_A::MASKED, + false => GPIO1MASK_A::UNMASKED, + true => GPIO1MASK_A::MASKED, } } #[doc = "Checks if the value of the field is `UNMASKED`"] #[inline(always)] pub fn is_unmasked(&self) -> bool { - **self == REG_GPIO_1_MASK_A::UNMASKED + *self == GPIO1MASK_A::UNMASKED } #[doc = "Checks if the value of the field is `MASKED`"] #[inline(always)] pub fn is_masked(&self) -> bool { - **self == REG_GPIO_1_MASK_A::MASKED - } -} -impl core::ops::Deref for REG_GPIO_1_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO1MASK_A::MASKED } } #[doc = "Field `reg_gpio_1_mask` writer - Mask register for GPIO1."] -pub struct REG_GPIO_1_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_1_MASK_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_1_MASK_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_1_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MASK1_SPEC, GPIO1MASK_A, O>; +impl<'a, const O: u8> REG_GPIO_1_MASK_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn unmasked(self) -> &'a mut W { - self.variant(REG_GPIO_1_MASK_A::UNMASKED) + self.variant(GPIO1MASK_A::UNMASKED) } #[doc = "`1`"] #[inline(always)] pub fn masked(self) -> &'a mut W { - self.variant(REG_GPIO_1_MASK_A::MASKED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w + self.variant(GPIO1MASK_A::MASKED) } } +#[doc = "Field `reg_gpio_2_mask` reader - Mask register for GPIO2."] +pub type REG_GPIO_2_MASK_R = crate::BitReader; #[doc = "Mask register for GPIO2.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_2_MASK_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO2MASK_A { #[doc = "0: `0`"] UNMASKED = 0, #[doc = "1: `1`"] MASKED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_2_MASK_A) -> Self { + fn from(variant: GPIO2MASK_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_2_mask` reader - Mask register for GPIO2."] -pub struct REG_GPIO_2_MASK_R(crate::FieldReader); impl REG_GPIO_2_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_2_MASK_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_2_MASK_A { + pub fn variant(&self) -> GPIO2MASK_A { match self.bits { - false => REG_GPIO_2_MASK_A::UNMASKED, - true => REG_GPIO_2_MASK_A::MASKED, + false => GPIO2MASK_A::UNMASKED, + true => GPIO2MASK_A::MASKED, } } #[doc = "Checks if the value of the field is `UNMASKED`"] #[inline(always)] pub fn is_unmasked(&self) -> bool { - **self == REG_GPIO_2_MASK_A::UNMASKED + *self == GPIO2MASK_A::UNMASKED } #[doc = "Checks if the value of the field is `MASKED`"] #[inline(always)] pub fn is_masked(&self) -> bool { - **self == REG_GPIO_2_MASK_A::MASKED - } -} -impl core::ops::Deref for REG_GPIO_2_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO2MASK_A::MASKED } } #[doc = "Field `reg_gpio_2_mask` writer - Mask register for GPIO2."] -pub struct REG_GPIO_2_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_2_MASK_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_2_MASK_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_2_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MASK1_SPEC, GPIO2MASK_A, O>; +impl<'a, const O: u8> REG_GPIO_2_MASK_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn unmasked(self) -> &'a mut W { - self.variant(REG_GPIO_2_MASK_A::UNMASKED) + self.variant(GPIO2MASK_A::UNMASKED) } #[doc = "`1`"] #[inline(always)] pub fn masked(self) -> &'a mut W { - self.variant(REG_GPIO_2_MASK_A::MASKED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w + self.variant(GPIO2MASK_A::MASKED) } } +#[doc = "Field `reg_gpio_3_mask` reader - Mask register for GPIO3."] +pub type REG_GPIO_3_MASK_R = crate::BitReader; #[doc = "Mask register for GPIO3.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_3_MASK_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO3MASK_A { #[doc = "0: `0`"] UNMASKED = 0, #[doc = "1: `1`"] MASKED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_3_MASK_A) -> Self { + fn from(variant: GPIO3MASK_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_3_mask` reader - Mask register for GPIO3."] -pub struct REG_GPIO_3_MASK_R(crate::FieldReader); impl REG_GPIO_3_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_3_MASK_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_3_MASK_A { + pub fn variant(&self) -> GPIO3MASK_A { match self.bits { - false => REG_GPIO_3_MASK_A::UNMASKED, - true => REG_GPIO_3_MASK_A::MASKED, + false => GPIO3MASK_A::UNMASKED, + true => GPIO3MASK_A::MASKED, } } #[doc = "Checks if the value of the field is `UNMASKED`"] #[inline(always)] pub fn is_unmasked(&self) -> bool { - **self == REG_GPIO_3_MASK_A::UNMASKED + *self == GPIO3MASK_A::UNMASKED } #[doc = "Checks if the value of the field is `MASKED`"] #[inline(always)] pub fn is_masked(&self) -> bool { - **self == REG_GPIO_3_MASK_A::MASKED - } -} -impl core::ops::Deref for REG_GPIO_3_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO3MASK_A::MASKED } } #[doc = "Field `reg_gpio_3_mask` writer - Mask register for GPIO3."] -pub struct REG_GPIO_3_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_3_MASK_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_3_MASK_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_3_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MASK1_SPEC, GPIO3MASK_A, O>; +impl<'a, const O: u8> REG_GPIO_3_MASK_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn unmasked(self) -> &'a mut W { - self.variant(REG_GPIO_3_MASK_A::UNMASKED) + self.variant(GPIO3MASK_A::UNMASKED) } #[doc = "`1`"] #[inline(always)] pub fn masked(self) -> &'a mut W { - self.variant(REG_GPIO_3_MASK_A::MASKED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w + self.variant(GPIO3MASK_A::MASKED) } } +#[doc = "Field `reg_gpio_4_mask` reader - Mask register for GPIO4."] +pub type REG_GPIO_4_MASK_R = crate::BitReader; #[doc = "Mask register for GPIO4.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_4_MASK_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO4MASK_A { #[doc = "0: `0`"] UNMASKED = 0, #[doc = "1: `1`"] MASKED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_4_MASK_A) -> Self { + fn from(variant: GPIO4MASK_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_4_mask` reader - Mask register for GPIO4."] -pub struct REG_GPIO_4_MASK_R(crate::FieldReader); impl REG_GPIO_4_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_4_MASK_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_4_MASK_A { + pub fn variant(&self) -> GPIO4MASK_A { match self.bits { - false => REG_GPIO_4_MASK_A::UNMASKED, - true => REG_GPIO_4_MASK_A::MASKED, + false => GPIO4MASK_A::UNMASKED, + true => GPIO4MASK_A::MASKED, } } #[doc = "Checks if the value of the field is `UNMASKED`"] #[inline(always)] pub fn is_unmasked(&self) -> bool { - **self == REG_GPIO_4_MASK_A::UNMASKED + *self == GPIO4MASK_A::UNMASKED } #[doc = "Checks if the value of the field is `MASKED`"] #[inline(always)] pub fn is_masked(&self) -> bool { - **self == REG_GPIO_4_MASK_A::MASKED - } -} -impl core::ops::Deref for REG_GPIO_4_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO4MASK_A::MASKED } } #[doc = "Field `reg_gpio_4_mask` writer - Mask register for GPIO4."] -pub struct REG_GPIO_4_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_4_MASK_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_4_MASK_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_4_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MASK1_SPEC, GPIO4MASK_A, O>; +impl<'a, const O: u8> REG_GPIO_4_MASK_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn unmasked(self) -> &'a mut W { - self.variant(REG_GPIO_4_MASK_A::UNMASKED) + self.variant(GPIO4MASK_A::UNMASKED) } #[doc = "`1`"] #[inline(always)] pub fn masked(self) -> &'a mut W { - self.variant(REG_GPIO_4_MASK_A::MASKED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w + self.variant(GPIO4MASK_A::MASKED) } } +#[doc = "Field `reg_gpio_5_mask` reader - Mask register for GPIO5."] +pub type REG_GPIO_5_MASK_R = crate::BitReader; #[doc = "Mask register for GPIO5.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_5_MASK_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO5MASK_A { #[doc = "0: `0`"] UNMASKED = 0, #[doc = "1: `1`"] MASKED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_5_MASK_A) -> Self { + fn from(variant: GPIO5MASK_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_5_mask` reader - Mask register for GPIO5."] -pub struct REG_GPIO_5_MASK_R(crate::FieldReader); impl REG_GPIO_5_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_5_MASK_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_5_MASK_A { + pub fn variant(&self) -> GPIO5MASK_A { match self.bits { - false => REG_GPIO_5_MASK_A::UNMASKED, - true => REG_GPIO_5_MASK_A::MASKED, + false => GPIO5MASK_A::UNMASKED, + true => GPIO5MASK_A::MASKED, } } #[doc = "Checks if the value of the field is `UNMASKED`"] #[inline(always)] pub fn is_unmasked(&self) -> bool { - **self == REG_GPIO_5_MASK_A::UNMASKED + *self == GPIO5MASK_A::UNMASKED } #[doc = "Checks if the value of the field is `MASKED`"] #[inline(always)] pub fn is_masked(&self) -> bool { - **self == REG_GPIO_5_MASK_A::MASKED - } -} -impl core::ops::Deref for REG_GPIO_5_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO5MASK_A::MASKED } } #[doc = "Field `reg_gpio_5_mask` writer - Mask register for GPIO5."] -pub struct REG_GPIO_5_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_5_MASK_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_5_MASK_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_5_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MASK1_SPEC, GPIO5MASK_A, O>; +impl<'a, const O: u8> REG_GPIO_5_MASK_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn unmasked(self) -> &'a mut W { - self.variant(REG_GPIO_5_MASK_A::UNMASKED) + self.variant(GPIO5MASK_A::UNMASKED) } #[doc = "`1`"] #[inline(always)] pub fn masked(self) -> &'a mut W { - self.variant(REG_GPIO_5_MASK_A::MASKED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w + self.variant(GPIO5MASK_A::MASKED) } } +#[doc = "Field `reg_gpio_6_mask` reader - Mask register for GPIO6."] +pub type REG_GPIO_6_MASK_R = crate::BitReader; #[doc = "Mask register for GPIO6.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_6_MASK_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO6MASK_A { #[doc = "0: `0`"] UNMASKED = 0, #[doc = "1: `1`"] MASKED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_6_MASK_A) -> Self { + fn from(variant: GPIO6MASK_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_6_mask` reader - Mask register for GPIO6."] -pub struct REG_GPIO_6_MASK_R(crate::FieldReader); impl REG_GPIO_6_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_6_MASK_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_6_MASK_A { + pub fn variant(&self) -> GPIO6MASK_A { match self.bits { - false => REG_GPIO_6_MASK_A::UNMASKED, - true => REG_GPIO_6_MASK_A::MASKED, + false => GPIO6MASK_A::UNMASKED, + true => GPIO6MASK_A::MASKED, } } #[doc = "Checks if the value of the field is `UNMASKED`"] #[inline(always)] pub fn is_unmasked(&self) -> bool { - **self == REG_GPIO_6_MASK_A::UNMASKED + *self == GPIO6MASK_A::UNMASKED } #[doc = "Checks if the value of the field is `MASKED`"] #[inline(always)] pub fn is_masked(&self) -> bool { - **self == REG_GPIO_6_MASK_A::MASKED - } -} -impl core::ops::Deref for REG_GPIO_6_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO6MASK_A::MASKED } } #[doc = "Field `reg_gpio_6_mask` writer - Mask register for GPIO6."] -pub struct REG_GPIO_6_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_6_MASK_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_6_MASK_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_6_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MASK1_SPEC, GPIO6MASK_A, O>; +impl<'a, const O: u8> REG_GPIO_6_MASK_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn unmasked(self) -> &'a mut W { - self.variant(REG_GPIO_6_MASK_A::UNMASKED) + self.variant(GPIO6MASK_A::UNMASKED) } #[doc = "`1`"] #[inline(always)] pub fn masked(self) -> &'a mut W { - self.variant(REG_GPIO_6_MASK_A::MASKED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w + self.variant(GPIO6MASK_A::MASKED) } } +#[doc = "Field `reg_gpio_7_mask` reader - Mask register for GPIO7."] +pub type REG_GPIO_7_MASK_R = crate::BitReader; #[doc = "Mask register for GPIO7.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_7_MASK_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO7MASK_A { #[doc = "0: `0`"] UNMASKED = 0, #[doc = "1: `1`"] MASKED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_7_MASK_A) -> Self { + fn from(variant: GPIO7MASK_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_7_mask` reader - Mask register for GPIO7."] -pub struct REG_GPIO_7_MASK_R(crate::FieldReader); impl REG_GPIO_7_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_7_MASK_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_7_MASK_A { + pub fn variant(&self) -> GPIO7MASK_A { match self.bits { - false => REG_GPIO_7_MASK_A::UNMASKED, - true => REG_GPIO_7_MASK_A::MASKED, + false => GPIO7MASK_A::UNMASKED, + true => GPIO7MASK_A::MASKED, } } #[doc = "Checks if the value of the field is `UNMASKED`"] #[inline(always)] pub fn is_unmasked(&self) -> bool { - **self == REG_GPIO_7_MASK_A::UNMASKED + *self == GPIO7MASK_A::UNMASKED } #[doc = "Checks if the value of the field is `MASKED`"] #[inline(always)] pub fn is_masked(&self) -> bool { - **self == REG_GPIO_7_MASK_A::MASKED - } -} -impl core::ops::Deref for REG_GPIO_7_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO7MASK_A::MASKED } } #[doc = "Field `reg_gpio_7_mask` writer - Mask register for GPIO7."] -pub struct REG_GPIO_7_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_7_MASK_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_7_MASK_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_7_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MASK1_SPEC, GPIO7MASK_A, O>; +impl<'a, const O: u8> REG_GPIO_7_MASK_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn unmasked(self) -> &'a mut W { - self.variant(REG_GPIO_7_MASK_A::UNMASKED) + self.variant(GPIO7MASK_A::UNMASKED) } #[doc = "`1`"] #[inline(always)] pub fn masked(self) -> &'a mut W { - self.variant(REG_GPIO_7_MASK_A::MASKED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7); - self.w + self.variant(GPIO7MASK_A::MASKED) } } +#[doc = "Field `reg_gpio_8_mask` reader - Mask register for GPIO8."] +pub type REG_GPIO_8_MASK_R = crate::BitReader; #[doc = "Mask register for GPIO8.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_8_MASK_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO8MASK_A { #[doc = "0: `0`"] UNMASKED = 0, #[doc = "1: `1`"] MASKED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_8_MASK_A) -> Self { + fn from(variant: GPIO8MASK_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_8_mask` reader - Mask register for GPIO8."] -pub struct REG_GPIO_8_MASK_R(crate::FieldReader); impl REG_GPIO_8_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_8_MASK_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_8_MASK_A { + pub fn variant(&self) -> GPIO8MASK_A { match self.bits { - false => REG_GPIO_8_MASK_A::UNMASKED, - true => REG_GPIO_8_MASK_A::MASKED, + false => GPIO8MASK_A::UNMASKED, + true => GPIO8MASK_A::MASKED, } } #[doc = "Checks if the value of the field is `UNMASKED`"] #[inline(always)] pub fn is_unmasked(&self) -> bool { - **self == REG_GPIO_8_MASK_A::UNMASKED + *self == GPIO8MASK_A::UNMASKED } #[doc = "Checks if the value of the field is `MASKED`"] #[inline(always)] pub fn is_masked(&self) -> bool { - **self == REG_GPIO_8_MASK_A::MASKED - } -} -impl core::ops::Deref for REG_GPIO_8_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO8MASK_A::MASKED } } #[doc = "Field `reg_gpio_8_mask` writer - Mask register for GPIO8."] -pub struct REG_GPIO_8_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_8_MASK_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_8_MASK_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_8_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MASK1_SPEC, GPIO8MASK_A, O>; +impl<'a, const O: u8> REG_GPIO_8_MASK_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn unmasked(self) -> &'a mut W { - self.variant(REG_GPIO_8_MASK_A::UNMASKED) + self.variant(GPIO8MASK_A::UNMASKED) } #[doc = "`1`"] #[inline(always)] pub fn masked(self) -> &'a mut W { - self.variant(REG_GPIO_8_MASK_A::MASKED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w + self.variant(GPIO8MASK_A::MASKED) } } +#[doc = "Field `reg_gpio_9_mask` reader - Mask register for GPIO9."] +pub type REG_GPIO_9_MASK_R = crate::BitReader; #[doc = "Mask register for GPIO9.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_9_MASK_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO9MASK_A { #[doc = "0: `0`"] UNMASKED = 0, #[doc = "1: `1`"] MASKED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_9_MASK_A) -> Self { + fn from(variant: GPIO9MASK_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_9_mask` reader - Mask register for GPIO9."] -pub struct REG_GPIO_9_MASK_R(crate::FieldReader); impl REG_GPIO_9_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_9_MASK_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_9_MASK_A { + pub fn variant(&self) -> GPIO9MASK_A { match self.bits { - false => REG_GPIO_9_MASK_A::UNMASKED, - true => REG_GPIO_9_MASK_A::MASKED, + false => GPIO9MASK_A::UNMASKED, + true => GPIO9MASK_A::MASKED, } } #[doc = "Checks if the value of the field is `UNMASKED`"] #[inline(always)] pub fn is_unmasked(&self) -> bool { - **self == REG_GPIO_9_MASK_A::UNMASKED + *self == GPIO9MASK_A::UNMASKED } #[doc = "Checks if the value of the field is `MASKED`"] #[inline(always)] pub fn is_masked(&self) -> bool { - **self == REG_GPIO_9_MASK_A::MASKED - } -} -impl core::ops::Deref for REG_GPIO_9_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO9MASK_A::MASKED } } #[doc = "Field `reg_gpio_9_mask` writer - Mask register for GPIO9."] -pub struct REG_GPIO_9_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_9_MASK_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_9_MASK_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_9_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MASK1_SPEC, GPIO9MASK_A, O>; +impl<'a, const O: u8> REG_GPIO_9_MASK_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn unmasked(self) -> &'a mut W { - self.variant(REG_GPIO_9_MASK_A::UNMASKED) + self.variant(GPIO9MASK_A::UNMASKED) } #[doc = "`1`"] #[inline(always)] pub fn masked(self) -> &'a mut W { - self.variant(REG_GPIO_9_MASK_A::MASKED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w + self.variant(GPIO9MASK_A::MASKED) } } +#[doc = "Field `reg_gpio_10_mask` reader - Mask register for GPIO10."] +pub type REG_GPIO_10_MASK_R = crate::BitReader; #[doc = "Mask register for GPIO10.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_10_MASK_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO10MASK_A { #[doc = "0: `0`"] UNMASKED = 0, #[doc = "1: `1`"] MASKED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_10_MASK_A) -> Self { + fn from(variant: GPIO10MASK_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_10_mask` reader - Mask register for GPIO10."] -pub struct REG_GPIO_10_MASK_R(crate::FieldReader); impl REG_GPIO_10_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_10_MASK_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_10_MASK_A { + pub fn variant(&self) -> GPIO10MASK_A { match self.bits { - false => REG_GPIO_10_MASK_A::UNMASKED, - true => REG_GPIO_10_MASK_A::MASKED, + false => GPIO10MASK_A::UNMASKED, + true => GPIO10MASK_A::MASKED, } } #[doc = "Checks if the value of the field is `UNMASKED`"] #[inline(always)] pub fn is_unmasked(&self) -> bool { - **self == REG_GPIO_10_MASK_A::UNMASKED + *self == GPIO10MASK_A::UNMASKED } #[doc = "Checks if the value of the field is `MASKED`"] #[inline(always)] pub fn is_masked(&self) -> bool { - **self == REG_GPIO_10_MASK_A::MASKED - } -} -impl core::ops::Deref for REG_GPIO_10_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO10MASK_A::MASKED } } #[doc = "Field `reg_gpio_10_mask` writer - Mask register for GPIO10."] -pub struct REG_GPIO_10_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_10_MASK_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_10_MASK_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_10_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MASK1_SPEC, GPIO10MASK_A, O>; +impl<'a, const O: u8> REG_GPIO_10_MASK_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn unmasked(self) -> &'a mut W { - self.variant(REG_GPIO_10_MASK_A::UNMASKED) + self.variant(GPIO10MASK_A::UNMASKED) } #[doc = "`1`"] #[inline(always)] pub fn masked(self) -> &'a mut W { - self.variant(REG_GPIO_10_MASK_A::MASKED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); - self.w + self.variant(GPIO10MASK_A::MASKED) } } +#[doc = "Field `reg_gpio_11_mask` reader - Mask register for GPIO11."] +pub type REG_GPIO_11_MASK_R = crate::BitReader; #[doc = "Mask register for GPIO11.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_11_MASK_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO11MASK_A { #[doc = "0: `0`"] UNMASKED = 0, #[doc = "1: `1`"] MASKED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_11_MASK_A) -> Self { + fn from(variant: GPIO11MASK_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_11_mask` reader - Mask register for GPIO11."] -pub struct REG_GPIO_11_MASK_R(crate::FieldReader); impl REG_GPIO_11_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_11_MASK_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_11_MASK_A { + pub fn variant(&self) -> GPIO11MASK_A { match self.bits { - false => REG_GPIO_11_MASK_A::UNMASKED, - true => REG_GPIO_11_MASK_A::MASKED, + false => GPIO11MASK_A::UNMASKED, + true => GPIO11MASK_A::MASKED, } } #[doc = "Checks if the value of the field is `UNMASKED`"] #[inline(always)] pub fn is_unmasked(&self) -> bool { - **self == REG_GPIO_11_MASK_A::UNMASKED + *self == GPIO11MASK_A::UNMASKED } #[doc = "Checks if the value of the field is `MASKED`"] #[inline(always)] pub fn is_masked(&self) -> bool { - **self == REG_GPIO_11_MASK_A::MASKED - } -} -impl core::ops::Deref for REG_GPIO_11_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO11MASK_A::MASKED } } #[doc = "Field `reg_gpio_11_mask` writer - Mask register for GPIO11."] -pub struct REG_GPIO_11_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_11_MASK_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_11_MASK_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_11_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MASK1_SPEC, GPIO11MASK_A, O>; +impl<'a, const O: u8> REG_GPIO_11_MASK_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn unmasked(self) -> &'a mut W { - self.variant(REG_GPIO_11_MASK_A::UNMASKED) + self.variant(GPIO11MASK_A::UNMASKED) } #[doc = "`1`"] #[inline(always)] pub fn masked(self) -> &'a mut W { - self.variant(REG_GPIO_11_MASK_A::MASKED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w + self.variant(GPIO11MASK_A::MASKED) } } +#[doc = "Field `reg_gpio_12_mask` reader - Mask register for GPIO12."] +pub type REG_GPIO_12_MASK_R = crate::BitReader; #[doc = "Mask register for GPIO12.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_12_MASK_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO12MASK_A { #[doc = "0: `0`"] UNMASKED = 0, #[doc = "1: `1`"] MASKED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_12_MASK_A) -> Self { + fn from(variant: GPIO12MASK_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_12_mask` reader - Mask register for GPIO12."] -pub struct REG_GPIO_12_MASK_R(crate::FieldReader); impl REG_GPIO_12_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_12_MASK_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_12_MASK_A { + pub fn variant(&self) -> GPIO12MASK_A { match self.bits { - false => REG_GPIO_12_MASK_A::UNMASKED, - true => REG_GPIO_12_MASK_A::MASKED, + false => GPIO12MASK_A::UNMASKED, + true => GPIO12MASK_A::MASKED, } } #[doc = "Checks if the value of the field is `UNMASKED`"] #[inline(always)] pub fn is_unmasked(&self) -> bool { - **self == REG_GPIO_12_MASK_A::UNMASKED + *self == GPIO12MASK_A::UNMASKED } #[doc = "Checks if the value of the field is `MASKED`"] #[inline(always)] pub fn is_masked(&self) -> bool { - **self == REG_GPIO_12_MASK_A::MASKED - } -} -impl core::ops::Deref for REG_GPIO_12_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO12MASK_A::MASKED } } #[doc = "Field `reg_gpio_12_mask` writer - Mask register for GPIO12."] -pub struct REG_GPIO_12_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_12_MASK_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_12_MASK_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_12_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MASK1_SPEC, GPIO12MASK_A, O>; +impl<'a, const O: u8> REG_GPIO_12_MASK_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn unmasked(self) -> &'a mut W { - self.variant(REG_GPIO_12_MASK_A::UNMASKED) + self.variant(GPIO12MASK_A::UNMASKED) } #[doc = "`1`"] #[inline(always)] pub fn masked(self) -> &'a mut W { - self.variant(REG_GPIO_12_MASK_A::MASKED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w + self.variant(GPIO12MASK_A::MASKED) } } +#[doc = "Field `reg_gpio_13_mask` reader - Mask register for GPIO13."] +pub type REG_GPIO_13_MASK_R = crate::BitReader; #[doc = "Mask register for GPIO13.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_13_MASK_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO13MASK_A { #[doc = "0: `0`"] UNMASKED = 0, #[doc = "1: `1`"] MASKED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_13_MASK_A) -> Self { + fn from(variant: GPIO13MASK_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_13_mask` reader - Mask register for GPIO13."] -pub struct REG_GPIO_13_MASK_R(crate::FieldReader); impl REG_GPIO_13_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_13_MASK_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_13_MASK_A { + pub fn variant(&self) -> GPIO13MASK_A { match self.bits { - false => REG_GPIO_13_MASK_A::UNMASKED, - true => REG_GPIO_13_MASK_A::MASKED, + false => GPIO13MASK_A::UNMASKED, + true => GPIO13MASK_A::MASKED, } } #[doc = "Checks if the value of the field is `UNMASKED`"] #[inline(always)] pub fn is_unmasked(&self) -> bool { - **self == REG_GPIO_13_MASK_A::UNMASKED + *self == GPIO13MASK_A::UNMASKED } #[doc = "Checks if the value of the field is `MASKED`"] #[inline(always)] pub fn is_masked(&self) -> bool { - **self == REG_GPIO_13_MASK_A::MASKED - } -} -impl core::ops::Deref for REG_GPIO_13_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO13MASK_A::MASKED } } #[doc = "Field `reg_gpio_13_mask` writer - Mask register for GPIO13."] -pub struct REG_GPIO_13_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_13_MASK_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_13_MASK_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_13_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MASK1_SPEC, GPIO13MASK_A, O>; +impl<'a, const O: u8> REG_GPIO_13_MASK_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn unmasked(self) -> &'a mut W { - self.variant(REG_GPIO_13_MASK_A::UNMASKED) + self.variant(GPIO13MASK_A::UNMASKED) } #[doc = "`1`"] #[inline(always)] pub fn masked(self) -> &'a mut W { - self.variant(REG_GPIO_13_MASK_A::MASKED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13); - self.w + self.variant(GPIO13MASK_A::MASKED) } } +#[doc = "Field `reg_gpio_14_mask` reader - Mask register for GPIO14."] +pub type REG_GPIO_14_MASK_R = crate::BitReader; #[doc = "Mask register for GPIO14.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_14_MASK_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO14MASK_A { #[doc = "0: `0`"] UNMASKED = 0, #[doc = "1: `1`"] MASKED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_14_MASK_A) -> Self { + fn from(variant: GPIO14MASK_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_14_mask` reader - Mask register for GPIO14."] -pub struct REG_GPIO_14_MASK_R(crate::FieldReader); impl REG_GPIO_14_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_14_MASK_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_14_MASK_A { + pub fn variant(&self) -> GPIO14MASK_A { match self.bits { - false => REG_GPIO_14_MASK_A::UNMASKED, - true => REG_GPIO_14_MASK_A::MASKED, + false => GPIO14MASK_A::UNMASKED, + true => GPIO14MASK_A::MASKED, } } #[doc = "Checks if the value of the field is `UNMASKED`"] #[inline(always)] pub fn is_unmasked(&self) -> bool { - **self == REG_GPIO_14_MASK_A::UNMASKED + *self == GPIO14MASK_A::UNMASKED } #[doc = "Checks if the value of the field is `MASKED`"] #[inline(always)] pub fn is_masked(&self) -> bool { - **self == REG_GPIO_14_MASK_A::MASKED - } -} -impl core::ops::Deref for REG_GPIO_14_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO14MASK_A::MASKED } } #[doc = "Field `reg_gpio_14_mask` writer - Mask register for GPIO14."] -pub struct REG_GPIO_14_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_14_MASK_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_14_MASK_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_14_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MASK1_SPEC, GPIO14MASK_A, O>; +impl<'a, const O: u8> REG_GPIO_14_MASK_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn unmasked(self) -> &'a mut W { - self.variant(REG_GPIO_14_MASK_A::UNMASKED) + self.variant(GPIO14MASK_A::UNMASKED) } #[doc = "`1`"] #[inline(always)] pub fn masked(self) -> &'a mut W { - self.variant(REG_GPIO_14_MASK_A::MASKED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14); - self.w + self.variant(GPIO14MASK_A::MASKED) } } +#[doc = "Field `reg_gpio_15_mask` reader - Mask register for GPIO15."] +pub type REG_GPIO_15_MASK_R = crate::BitReader; #[doc = "Mask register for GPIO15.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_15_MASK_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO15MASK_A { #[doc = "0: `0`"] UNMASKED = 0, #[doc = "1: `1`"] MASKED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_15_MASK_A) -> Self { + fn from(variant: GPIO15MASK_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_15_mask` reader - Mask register for GPIO15."] -pub struct REG_GPIO_15_MASK_R(crate::FieldReader); impl REG_GPIO_15_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_15_MASK_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_15_MASK_A { + pub fn variant(&self) -> GPIO15MASK_A { match self.bits { - false => REG_GPIO_15_MASK_A::UNMASKED, - true => REG_GPIO_15_MASK_A::MASKED, + false => GPIO15MASK_A::UNMASKED, + true => GPIO15MASK_A::MASKED, } } #[doc = "Checks if the value of the field is `UNMASKED`"] #[inline(always)] pub fn is_unmasked(&self) -> bool { - **self == REG_GPIO_15_MASK_A::UNMASKED + *self == GPIO15MASK_A::UNMASKED } #[doc = "Checks if the value of the field is `MASKED`"] #[inline(always)] pub fn is_masked(&self) -> bool { - **self == REG_GPIO_15_MASK_A::MASKED - } -} -impl core::ops::Deref for REG_GPIO_15_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO15MASK_A::MASKED } } #[doc = "Field `reg_gpio_15_mask` writer - Mask register for GPIO15."] -pub struct REG_GPIO_15_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_15_MASK_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_15_MASK_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_15_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MASK1_SPEC, GPIO15MASK_A, O>; +impl<'a, const O: u8> REG_GPIO_15_MASK_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn unmasked(self) -> &'a mut W { - self.variant(REG_GPIO_15_MASK_A::UNMASKED) + self.variant(GPIO15MASK_A::UNMASKED) } #[doc = "`1`"] #[inline(always)] pub fn masked(self) -> &'a mut W { - self.variant(REG_GPIO_15_MASK_A::MASKED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15); - self.w + self.variant(GPIO15MASK_A::MASKED) } } +#[doc = "Field `reg_gpio_16_mask` reader - Mask register for GPIO16."] +pub type REG_GPIO_16_MASK_R = crate::BitReader; #[doc = "Mask register for GPIO16.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_16_MASK_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO16MASK_A { #[doc = "0: `0`"] UNMASKED = 0, #[doc = "1: `1`"] MASKED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_16_MASK_A) -> Self { + fn from(variant: GPIO16MASK_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_16_mask` reader - Mask register for GPIO16."] -pub struct REG_GPIO_16_MASK_R(crate::FieldReader); impl REG_GPIO_16_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_16_MASK_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_16_MASK_A { + pub fn variant(&self) -> GPIO16MASK_A { match self.bits { - false => REG_GPIO_16_MASK_A::UNMASKED, - true => REG_GPIO_16_MASK_A::MASKED, + false => GPIO16MASK_A::UNMASKED, + true => GPIO16MASK_A::MASKED, } } #[doc = "Checks if the value of the field is `UNMASKED`"] #[inline(always)] pub fn is_unmasked(&self) -> bool { - **self == REG_GPIO_16_MASK_A::UNMASKED + *self == GPIO16MASK_A::UNMASKED } #[doc = "Checks if the value of the field is `MASKED`"] #[inline(always)] pub fn is_masked(&self) -> bool { - **self == REG_GPIO_16_MASK_A::MASKED - } -} -impl core::ops::Deref for REG_GPIO_16_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO16MASK_A::MASKED } } #[doc = "Field `reg_gpio_16_mask` writer - Mask register for GPIO16."] -pub struct REG_GPIO_16_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_16_MASK_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_16_MASK_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_16_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MASK1_SPEC, GPIO16MASK_A, O>; +impl<'a, const O: u8> REG_GPIO_16_MASK_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn unmasked(self) -> &'a mut W { - self.variant(REG_GPIO_16_MASK_A::UNMASKED) + self.variant(GPIO16MASK_A::UNMASKED) } #[doc = "`1`"] #[inline(always)] pub fn masked(self) -> &'a mut W { - self.variant(REG_GPIO_16_MASK_A::MASKED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w + self.variant(GPIO16MASK_A::MASKED) } } +#[doc = "Field `reg_gpio_17_mask` reader - Mask register for GPIO17."] +pub type REG_GPIO_17_MASK_R = crate::BitReader; #[doc = "Mask register for GPIO17.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_17_MASK_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO17MASK_A { #[doc = "0: `0`"] UNMASKED = 0, #[doc = "1: `1`"] MASKED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_17_MASK_A) -> Self { + fn from(variant: GPIO17MASK_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_17_mask` reader - Mask register for GPIO17."] -pub struct REG_GPIO_17_MASK_R(crate::FieldReader); impl REG_GPIO_17_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_17_MASK_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_17_MASK_A { + pub fn variant(&self) -> GPIO17MASK_A { match self.bits { - false => REG_GPIO_17_MASK_A::UNMASKED, - true => REG_GPIO_17_MASK_A::MASKED, + false => GPIO17MASK_A::UNMASKED, + true => GPIO17MASK_A::MASKED, } } #[doc = "Checks if the value of the field is `UNMASKED`"] #[inline(always)] pub fn is_unmasked(&self) -> bool { - **self == REG_GPIO_17_MASK_A::UNMASKED + *self == GPIO17MASK_A::UNMASKED } #[doc = "Checks if the value of the field is `MASKED`"] #[inline(always)] pub fn is_masked(&self) -> bool { - **self == REG_GPIO_17_MASK_A::MASKED - } -} -impl core::ops::Deref for REG_GPIO_17_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO17MASK_A::MASKED } } #[doc = "Field `reg_gpio_17_mask` writer - Mask register for GPIO17."] -pub struct REG_GPIO_17_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_17_MASK_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_17_MASK_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_17_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MASK1_SPEC, GPIO17MASK_A, O>; +impl<'a, const O: u8> REG_GPIO_17_MASK_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn unmasked(self) -> &'a mut W { - self.variant(REG_GPIO_17_MASK_A::UNMASKED) + self.variant(GPIO17MASK_A::UNMASKED) } #[doc = "`1`"] #[inline(always)] pub fn masked(self) -> &'a mut W { - self.variant(REG_GPIO_17_MASK_A::MASKED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w + self.variant(GPIO17MASK_A::MASKED) } } +#[doc = "Field `reg_gpio_18_mask` reader - Mask register for GPIO18."] +pub type REG_GPIO_18_MASK_R = crate::BitReader; #[doc = "Mask register for GPIO18.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_18_MASK_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO18MASK_A { #[doc = "0: `0`"] UNMASKED = 0, #[doc = "1: `1`"] MASKED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_18_MASK_A) -> Self { + fn from(variant: GPIO18MASK_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_18_mask` reader - Mask register for GPIO18."] -pub struct REG_GPIO_18_MASK_R(crate::FieldReader); impl REG_GPIO_18_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_18_MASK_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_18_MASK_A { + pub fn variant(&self) -> GPIO18MASK_A { match self.bits { - false => REG_GPIO_18_MASK_A::UNMASKED, - true => REG_GPIO_18_MASK_A::MASKED, + false => GPIO18MASK_A::UNMASKED, + true => GPIO18MASK_A::MASKED, } } #[doc = "Checks if the value of the field is `UNMASKED`"] #[inline(always)] pub fn is_unmasked(&self) -> bool { - **self == REG_GPIO_18_MASK_A::UNMASKED + *self == GPIO18MASK_A::UNMASKED } #[doc = "Checks if the value of the field is `MASKED`"] #[inline(always)] pub fn is_masked(&self) -> bool { - **self == REG_GPIO_18_MASK_A::MASKED - } -} -impl core::ops::Deref for REG_GPIO_18_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO18MASK_A::MASKED } } #[doc = "Field `reg_gpio_18_mask` writer - Mask register for GPIO18."] -pub struct REG_GPIO_18_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_18_MASK_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_18_MASK_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_18_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MASK1_SPEC, GPIO18MASK_A, O>; +impl<'a, const O: u8> REG_GPIO_18_MASK_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn unmasked(self) -> &'a mut W { - self.variant(REG_GPIO_18_MASK_A::UNMASKED) + self.variant(GPIO18MASK_A::UNMASKED) } #[doc = "`1`"] #[inline(always)] pub fn masked(self) -> &'a mut W { - self.variant(REG_GPIO_18_MASK_A::MASKED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18); - self.w + self.variant(GPIO18MASK_A::MASKED) } } +#[doc = "Field `reg_gpio_19_mask` reader - Mask register for GPIO19."] +pub type REG_GPIO_19_MASK_R = crate::BitReader; #[doc = "Mask register for GPIO19.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_19_MASK_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO19MASK_A { #[doc = "0: `0`"] UNMASKED = 0, #[doc = "1: `1`"] MASKED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_19_MASK_A) -> Self { + fn from(variant: GPIO19MASK_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_19_mask` reader - Mask register for GPIO19."] -pub struct REG_GPIO_19_MASK_R(crate::FieldReader); impl REG_GPIO_19_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_19_MASK_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_19_MASK_A { + pub fn variant(&self) -> GPIO19MASK_A { match self.bits { - false => REG_GPIO_19_MASK_A::UNMASKED, - true => REG_GPIO_19_MASK_A::MASKED, + false => GPIO19MASK_A::UNMASKED, + true => GPIO19MASK_A::MASKED, } } #[doc = "Checks if the value of the field is `UNMASKED`"] #[inline(always)] pub fn is_unmasked(&self) -> bool { - **self == REG_GPIO_19_MASK_A::UNMASKED + *self == GPIO19MASK_A::UNMASKED } #[doc = "Checks if the value of the field is `MASKED`"] #[inline(always)] pub fn is_masked(&self) -> bool { - **self == REG_GPIO_19_MASK_A::MASKED - } -} -impl core::ops::Deref for REG_GPIO_19_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO19MASK_A::MASKED } } #[doc = "Field `reg_gpio_19_mask` writer - Mask register for GPIO19."] -pub struct REG_GPIO_19_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_19_MASK_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_19_MASK_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_19_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MASK1_SPEC, GPIO19MASK_A, O>; +impl<'a, const O: u8> REG_GPIO_19_MASK_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn unmasked(self) -> &'a mut W { - self.variant(REG_GPIO_19_MASK_A::UNMASKED) + self.variant(GPIO19MASK_A::UNMASKED) } #[doc = "`1`"] #[inline(always)] pub fn masked(self) -> &'a mut W { - self.variant(REG_GPIO_19_MASK_A::MASKED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 19)) | ((value as u32 & 0x01) << 19); - self.w + self.variant(GPIO19MASK_A::MASKED) } } +#[doc = "Field `reg_gpio_20_mask` reader - Mask register for GPIO20."] +pub type REG_GPIO_20_MASK_R = crate::BitReader; #[doc = "Mask register for GPIO20.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_20_MASK_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO20MASK_A { #[doc = "0: `0`"] UNMASKED = 0, #[doc = "1: `1`"] MASKED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_20_MASK_A) -> Self { + fn from(variant: GPIO20MASK_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_20_mask` reader - Mask register for GPIO20."] -pub struct REG_GPIO_20_MASK_R(crate::FieldReader); impl REG_GPIO_20_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_20_MASK_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_20_MASK_A { + pub fn variant(&self) -> GPIO20MASK_A { match self.bits { - false => REG_GPIO_20_MASK_A::UNMASKED, - true => REG_GPIO_20_MASK_A::MASKED, + false => GPIO20MASK_A::UNMASKED, + true => GPIO20MASK_A::MASKED, } } #[doc = "Checks if the value of the field is `UNMASKED`"] #[inline(always)] pub fn is_unmasked(&self) -> bool { - **self == REG_GPIO_20_MASK_A::UNMASKED + *self == GPIO20MASK_A::UNMASKED } #[doc = "Checks if the value of the field is `MASKED`"] #[inline(always)] pub fn is_masked(&self) -> bool { - **self == REG_GPIO_20_MASK_A::MASKED - } -} -impl core::ops::Deref for REG_GPIO_20_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO20MASK_A::MASKED } } #[doc = "Field `reg_gpio_20_mask` writer - Mask register for GPIO20."] -pub struct REG_GPIO_20_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_20_MASK_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_20_MASK_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_20_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MASK1_SPEC, GPIO20MASK_A, O>; +impl<'a, const O: u8> REG_GPIO_20_MASK_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn unmasked(self) -> &'a mut W { - self.variant(REG_GPIO_20_MASK_A::UNMASKED) + self.variant(GPIO20MASK_A::UNMASKED) } #[doc = "`1`"] #[inline(always)] pub fn masked(self) -> &'a mut W { - self.variant(REG_GPIO_20_MASK_A::MASKED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w + self.variant(GPIO20MASK_A::MASKED) } } +#[doc = "Field `reg_gpio_21_mask` reader - Mask register for GPIO21."] +pub type REG_GPIO_21_MASK_R = crate::BitReader; #[doc = "Mask register for GPIO21.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_21_MASK_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO21MASK_A { #[doc = "0: `0`"] UNMASKED = 0, #[doc = "1: `1`"] MASKED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_21_MASK_A) -> Self { + fn from(variant: GPIO21MASK_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_21_mask` reader - Mask register for GPIO21."] -pub struct REG_GPIO_21_MASK_R(crate::FieldReader); impl REG_GPIO_21_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_21_MASK_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_21_MASK_A { + pub fn variant(&self) -> GPIO21MASK_A { match self.bits { - false => REG_GPIO_21_MASK_A::UNMASKED, - true => REG_GPIO_21_MASK_A::MASKED, + false => GPIO21MASK_A::UNMASKED, + true => GPIO21MASK_A::MASKED, } } #[doc = "Checks if the value of the field is `UNMASKED`"] #[inline(always)] pub fn is_unmasked(&self) -> bool { - **self == REG_GPIO_21_MASK_A::UNMASKED + *self == GPIO21MASK_A::UNMASKED } #[doc = "Checks if the value of the field is `MASKED`"] #[inline(always)] pub fn is_masked(&self) -> bool { - **self == REG_GPIO_21_MASK_A::MASKED - } -} -impl core::ops::Deref for REG_GPIO_21_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO21MASK_A::MASKED } } #[doc = "Field `reg_gpio_21_mask` writer - Mask register for GPIO21."] -pub struct REG_GPIO_21_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_21_MASK_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_21_MASK_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_21_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MASK1_SPEC, GPIO21MASK_A, O>; +impl<'a, const O: u8> REG_GPIO_21_MASK_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn unmasked(self) -> &'a mut W { - self.variant(REG_GPIO_21_MASK_A::UNMASKED) + self.variant(GPIO21MASK_A::UNMASKED) } #[doc = "`1`"] #[inline(always)] pub fn masked(self) -> &'a mut W { - self.variant(REG_GPIO_21_MASK_A::MASKED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); - self.w + self.variant(GPIO21MASK_A::MASKED) } } +#[doc = "Field `reg_gpio_22_mask` reader - Mask register for GPIO22."] +pub type REG_GPIO_22_MASK_R = crate::BitReader; #[doc = "Mask register for GPIO22.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_22_MASK_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO22MASK_A { #[doc = "0: `0`"] UNMASKED = 0, #[doc = "1: `1`"] MASKED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_22_MASK_A) -> Self { + fn from(variant: GPIO22MASK_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_22_mask` reader - Mask register for GPIO22."] -pub struct REG_GPIO_22_MASK_R(crate::FieldReader); impl REG_GPIO_22_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_22_MASK_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_22_MASK_A { + pub fn variant(&self) -> GPIO22MASK_A { match self.bits { - false => REG_GPIO_22_MASK_A::UNMASKED, - true => REG_GPIO_22_MASK_A::MASKED, + false => GPIO22MASK_A::UNMASKED, + true => GPIO22MASK_A::MASKED, } } #[doc = "Checks if the value of the field is `UNMASKED`"] #[inline(always)] pub fn is_unmasked(&self) -> bool { - **self == REG_GPIO_22_MASK_A::UNMASKED + *self == GPIO22MASK_A::UNMASKED } #[doc = "Checks if the value of the field is `MASKED`"] #[inline(always)] pub fn is_masked(&self) -> bool { - **self == REG_GPIO_22_MASK_A::MASKED - } -} -impl core::ops::Deref for REG_GPIO_22_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO22MASK_A::MASKED } } #[doc = "Field `reg_gpio_22_mask` writer - Mask register for GPIO22."] -pub struct REG_GPIO_22_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_22_MASK_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_22_MASK_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_22_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MASK1_SPEC, GPIO22MASK_A, O>; +impl<'a, const O: u8> REG_GPIO_22_MASK_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn unmasked(self) -> &'a mut W { - self.variant(REG_GPIO_22_MASK_A::UNMASKED) + self.variant(GPIO22MASK_A::UNMASKED) } #[doc = "`1`"] #[inline(always)] pub fn masked(self) -> &'a mut W { - self.variant(REG_GPIO_22_MASK_A::MASKED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 22)) | ((value as u32 & 0x01) << 22); - self.w + self.variant(GPIO22MASK_A::MASKED) } } +#[doc = "Field `reg_gpio_23_mask` reader - Mask register for GPIO23."] +pub type REG_GPIO_23_MASK_R = crate::BitReader; #[doc = "Mask register for GPIO23.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_23_MASK_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO23MASK_A { #[doc = "0: `0`"] UNMASKED = 0, #[doc = "1: `1`"] MASKED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_23_MASK_A) -> Self { + fn from(variant: GPIO23MASK_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_23_mask` reader - Mask register for GPIO23."] -pub struct REG_GPIO_23_MASK_R(crate::FieldReader); impl REG_GPIO_23_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_23_MASK_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_23_MASK_A { + pub fn variant(&self) -> GPIO23MASK_A { match self.bits { - false => REG_GPIO_23_MASK_A::UNMASKED, - true => REG_GPIO_23_MASK_A::MASKED, + false => GPIO23MASK_A::UNMASKED, + true => GPIO23MASK_A::MASKED, } } #[doc = "Checks if the value of the field is `UNMASKED`"] #[inline(always)] pub fn is_unmasked(&self) -> bool { - **self == REG_GPIO_23_MASK_A::UNMASKED + *self == GPIO23MASK_A::UNMASKED } #[doc = "Checks if the value of the field is `MASKED`"] #[inline(always)] pub fn is_masked(&self) -> bool { - **self == REG_GPIO_23_MASK_A::MASKED - } -} -impl core::ops::Deref for REG_GPIO_23_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO23MASK_A::MASKED } } #[doc = "Field `reg_gpio_23_mask` writer - Mask register for GPIO23."] -pub struct REG_GPIO_23_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_23_MASK_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_23_MASK_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_23_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MASK1_SPEC, GPIO23MASK_A, O>; +impl<'a, const O: u8> REG_GPIO_23_MASK_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn unmasked(self) -> &'a mut W { - self.variant(REG_GPIO_23_MASK_A::UNMASKED) + self.variant(GPIO23MASK_A::UNMASKED) } #[doc = "`1`"] #[inline(always)] pub fn masked(self) -> &'a mut W { - self.variant(REG_GPIO_23_MASK_A::MASKED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23); - self.w + self.variant(GPIO23MASK_A::MASKED) } } +#[doc = "Field `reg_gpio_24_mask` reader - Mask register for GPIO24."] +pub type REG_GPIO_24_MASK_R = crate::BitReader; #[doc = "Mask register for GPIO24.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_24_MASK_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO24MASK_A { #[doc = "0: `0`"] UNMASKED = 0, #[doc = "1: `1`"] MASKED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_24_MASK_A) -> Self { + fn from(variant: GPIO24MASK_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_24_mask` reader - Mask register for GPIO24."] -pub struct REG_GPIO_24_MASK_R(crate::FieldReader); impl REG_GPIO_24_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_24_MASK_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_24_MASK_A { + pub fn variant(&self) -> GPIO24MASK_A { match self.bits { - false => REG_GPIO_24_MASK_A::UNMASKED, - true => REG_GPIO_24_MASK_A::MASKED, + false => GPIO24MASK_A::UNMASKED, + true => GPIO24MASK_A::MASKED, } } #[doc = "Checks if the value of the field is `UNMASKED`"] #[inline(always)] pub fn is_unmasked(&self) -> bool { - **self == REG_GPIO_24_MASK_A::UNMASKED + *self == GPIO24MASK_A::UNMASKED } #[doc = "Checks if the value of the field is `MASKED`"] #[inline(always)] pub fn is_masked(&self) -> bool { - **self == REG_GPIO_24_MASK_A::MASKED - } -} -impl core::ops::Deref for REG_GPIO_24_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO24MASK_A::MASKED } } #[doc = "Field `reg_gpio_24_mask` writer - Mask register for GPIO24."] -pub struct REG_GPIO_24_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_24_MASK_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_24_MASK_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_24_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MASK1_SPEC, GPIO24MASK_A, O>; +impl<'a, const O: u8> REG_GPIO_24_MASK_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn unmasked(self) -> &'a mut W { - self.variant(REG_GPIO_24_MASK_A::UNMASKED) + self.variant(GPIO24MASK_A::UNMASKED) } #[doc = "`1`"] #[inline(always)] pub fn masked(self) -> &'a mut W { - self.variant(REG_GPIO_24_MASK_A::MASKED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24); - self.w + self.variant(GPIO24MASK_A::MASKED) } } +#[doc = "Field `reg_gpio_25_mask` reader - Mask register for GPIO25."] +pub type REG_GPIO_25_MASK_R = crate::BitReader; #[doc = "Mask register for GPIO25.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_25_MASK_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO25MASK_A { #[doc = "0: `0`"] UNMASKED = 0, #[doc = "1: `1`"] MASKED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_25_MASK_A) -> Self { + fn from(variant: GPIO25MASK_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_25_mask` reader - Mask register for GPIO25."] -pub struct REG_GPIO_25_MASK_R(crate::FieldReader); impl REG_GPIO_25_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_25_MASK_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_25_MASK_A { + pub fn variant(&self) -> GPIO25MASK_A { match self.bits { - false => REG_GPIO_25_MASK_A::UNMASKED, - true => REG_GPIO_25_MASK_A::MASKED, + false => GPIO25MASK_A::UNMASKED, + true => GPIO25MASK_A::MASKED, } } #[doc = "Checks if the value of the field is `UNMASKED`"] #[inline(always)] pub fn is_unmasked(&self) -> bool { - **self == REG_GPIO_25_MASK_A::UNMASKED + *self == GPIO25MASK_A::UNMASKED } #[doc = "Checks if the value of the field is `MASKED`"] #[inline(always)] pub fn is_masked(&self) -> bool { - **self == REG_GPIO_25_MASK_A::MASKED - } -} -impl core::ops::Deref for REG_GPIO_25_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO25MASK_A::MASKED } } #[doc = "Field `reg_gpio_25_mask` writer - Mask register for GPIO25."] -pub struct REG_GPIO_25_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_25_MASK_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_25_MASK_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_25_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MASK1_SPEC, GPIO25MASK_A, O>; +impl<'a, const O: u8> REG_GPIO_25_MASK_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn unmasked(self) -> &'a mut W { - self.variant(REG_GPIO_25_MASK_A::UNMASKED) + self.variant(GPIO25MASK_A::UNMASKED) } #[doc = "`1`"] #[inline(always)] pub fn masked(self) -> &'a mut W { - self.variant(REG_GPIO_25_MASK_A::MASKED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 25)) | ((value as u32 & 0x01) << 25); - self.w + self.variant(GPIO25MASK_A::MASKED) } } +#[doc = "Field `reg_gpio_26_mask` reader - Mask register for GPIO26."] +pub type REG_GPIO_26_MASK_R = crate::BitReader; #[doc = "Mask register for GPIO26.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_26_MASK_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO26MASK_A { #[doc = "0: `0`"] UNMASKED = 0, #[doc = "1: `1`"] MASKED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_26_MASK_A) -> Self { + fn from(variant: GPIO26MASK_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_26_mask` reader - Mask register for GPIO26."] -pub struct REG_GPIO_26_MASK_R(crate::FieldReader); impl REG_GPIO_26_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_26_MASK_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_26_MASK_A { + pub fn variant(&self) -> GPIO26MASK_A { match self.bits { - false => REG_GPIO_26_MASK_A::UNMASKED, - true => REG_GPIO_26_MASK_A::MASKED, + false => GPIO26MASK_A::UNMASKED, + true => GPIO26MASK_A::MASKED, } } #[doc = "Checks if the value of the field is `UNMASKED`"] #[inline(always)] pub fn is_unmasked(&self) -> bool { - **self == REG_GPIO_26_MASK_A::UNMASKED + *self == GPIO26MASK_A::UNMASKED } #[doc = "Checks if the value of the field is `MASKED`"] #[inline(always)] pub fn is_masked(&self) -> bool { - **self == REG_GPIO_26_MASK_A::MASKED - } -} -impl core::ops::Deref for REG_GPIO_26_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO26MASK_A::MASKED } } #[doc = "Field `reg_gpio_26_mask` writer - Mask register for GPIO26."] -pub struct REG_GPIO_26_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_26_MASK_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_26_MASK_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_26_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MASK1_SPEC, GPIO26MASK_A, O>; +impl<'a, const O: u8> REG_GPIO_26_MASK_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn unmasked(self) -> &'a mut W { - self.variant(REG_GPIO_26_MASK_A::UNMASKED) + self.variant(GPIO26MASK_A::UNMASKED) } #[doc = "`1`"] #[inline(always)] pub fn masked(self) -> &'a mut W { - self.variant(REG_GPIO_26_MASK_A::MASKED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 26)) | ((value as u32 & 0x01) << 26); - self.w + self.variant(GPIO26MASK_A::MASKED) } } +#[doc = "Field `reg_gpio_27_mask` reader - Mask register for GPIO27."] +pub type REG_GPIO_27_MASK_R = crate::BitReader; #[doc = "Mask register for GPIO27.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_27_MASK_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO27MASK_A { #[doc = "0: `0`"] UNMASKED = 0, #[doc = "1: `1`"] MASKED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_27_MASK_A) -> Self { + fn from(variant: GPIO27MASK_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_27_mask` reader - Mask register for GPIO27."] -pub struct REG_GPIO_27_MASK_R(crate::FieldReader); impl REG_GPIO_27_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_27_MASK_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_27_MASK_A { + pub fn variant(&self) -> GPIO27MASK_A { match self.bits { - false => REG_GPIO_27_MASK_A::UNMASKED, - true => REG_GPIO_27_MASK_A::MASKED, + false => GPIO27MASK_A::UNMASKED, + true => GPIO27MASK_A::MASKED, } } #[doc = "Checks if the value of the field is `UNMASKED`"] #[inline(always)] pub fn is_unmasked(&self) -> bool { - **self == REG_GPIO_27_MASK_A::UNMASKED + *self == GPIO27MASK_A::UNMASKED } #[doc = "Checks if the value of the field is `MASKED`"] #[inline(always)] pub fn is_masked(&self) -> bool { - **self == REG_GPIO_27_MASK_A::MASKED - } -} -impl core::ops::Deref for REG_GPIO_27_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO27MASK_A::MASKED } } #[doc = "Field `reg_gpio_27_mask` writer - Mask register for GPIO27."] -pub struct REG_GPIO_27_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_27_MASK_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_27_MASK_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_27_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MASK1_SPEC, GPIO27MASK_A, O>; +impl<'a, const O: u8> REG_GPIO_27_MASK_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn unmasked(self) -> &'a mut W { - self.variant(REG_GPIO_27_MASK_A::UNMASKED) + self.variant(GPIO27MASK_A::UNMASKED) } #[doc = "`1`"] #[inline(always)] pub fn masked(self) -> &'a mut W { - self.variant(REG_GPIO_27_MASK_A::MASKED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 27)) | ((value as u32 & 0x01) << 27); - self.w + self.variant(GPIO27MASK_A::MASKED) } } +#[doc = "Field `reg_gpio_28_mask` reader - Mask register for GPIO28."] +pub type REG_GPIO_28_MASK_R = crate::BitReader; #[doc = "Mask register for GPIO28.\n\nValue on reset: 1"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_28_MASK_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO28MASK_A { #[doc = "0: `0`"] UNMASKED = 0, #[doc = "1: `1`"] MASKED = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_28_MASK_A) -> Self { + fn from(variant: GPIO28MASK_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_28_mask` reader - Mask register for GPIO28."] -pub struct REG_GPIO_28_MASK_R(crate::FieldReader); impl REG_GPIO_28_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_28_MASK_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_28_MASK_A { + pub fn variant(&self) -> GPIO28MASK_A { match self.bits { - false => REG_GPIO_28_MASK_A::UNMASKED, - true => REG_GPIO_28_MASK_A::MASKED, + false => GPIO28MASK_A::UNMASKED, + true => GPIO28MASK_A::MASKED, } } #[doc = "Checks if the value of the field is `UNMASKED`"] #[inline(always)] pub fn is_unmasked(&self) -> bool { - **self == REG_GPIO_28_MASK_A::UNMASKED + *self == GPIO28MASK_A::UNMASKED } #[doc = "Checks if the value of the field is `MASKED`"] #[inline(always)] pub fn is_masked(&self) -> bool { - **self == REG_GPIO_28_MASK_A::MASKED - } -} -impl core::ops::Deref for REG_GPIO_28_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO28MASK_A::MASKED } } #[doc = "Field `reg_gpio_28_mask` writer - Mask register for GPIO28."] -pub struct REG_GPIO_28_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_28_MASK_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_28_MASK_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_28_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MASK1_SPEC, GPIO28MASK_A, O>; +impl<'a, const O: u8> REG_GPIO_28_MASK_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn unmasked(self) -> &'a mut W { - self.variant(REG_GPIO_28_MASK_A::UNMASKED) + self.variant(GPIO28MASK_A::UNMASKED) } #[doc = "`1`"] #[inline(always)] pub fn masked(self) -> &'a mut W { - self.variant(REG_GPIO_28_MASK_A::MASKED) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 28)) | ((value as u32 & 0x01) << 28); - self.w + self.variant(GPIO28MASK_A::MASKED) } } impl R { #[doc = "Bit 0 - Mask register for GPIO0."] #[inline(always)] pub fn reg_gpio_0_mask(&self) -> REG_GPIO_0_MASK_R { - REG_GPIO_0_MASK_R::new((self.bits & 0x01) != 0) + REG_GPIO_0_MASK_R::new((self.bits & 1) != 0) } #[doc = "Bit 1 - Mask register for GPIO1."] #[inline(always)] pub fn reg_gpio_1_mask(&self) -> REG_GPIO_1_MASK_R { - REG_GPIO_1_MASK_R::new(((self.bits >> 1) & 0x01) != 0) + REG_GPIO_1_MASK_R::new(((self.bits >> 1) & 1) != 0) } #[doc = "Bit 2 - Mask register for GPIO2."] #[inline(always)] pub fn reg_gpio_2_mask(&self) -> REG_GPIO_2_MASK_R { - REG_GPIO_2_MASK_R::new(((self.bits >> 2) & 0x01) != 0) + REG_GPIO_2_MASK_R::new(((self.bits >> 2) & 1) != 0) } #[doc = "Bit 3 - Mask register for GPIO3."] #[inline(always)] pub fn reg_gpio_3_mask(&self) -> REG_GPIO_3_MASK_R { - REG_GPIO_3_MASK_R::new(((self.bits >> 3) & 0x01) != 0) + REG_GPIO_3_MASK_R::new(((self.bits >> 3) & 1) != 0) } #[doc = "Bit 4 - Mask register for GPIO4."] #[inline(always)] pub fn reg_gpio_4_mask(&self) -> REG_GPIO_4_MASK_R { - REG_GPIO_4_MASK_R::new(((self.bits >> 4) & 0x01) != 0) + REG_GPIO_4_MASK_R::new(((self.bits >> 4) & 1) != 0) } #[doc = "Bit 5 - Mask register for GPIO5."] #[inline(always)] pub fn reg_gpio_5_mask(&self) -> REG_GPIO_5_MASK_R { - REG_GPIO_5_MASK_R::new(((self.bits >> 5) & 0x01) != 0) + REG_GPIO_5_MASK_R::new(((self.bits >> 5) & 1) != 0) } #[doc = "Bit 6 - Mask register for GPIO6."] #[inline(always)] pub fn reg_gpio_6_mask(&self) -> REG_GPIO_6_MASK_R { - REG_GPIO_6_MASK_R::new(((self.bits >> 6) & 0x01) != 0) + REG_GPIO_6_MASK_R::new(((self.bits >> 6) & 1) != 0) } #[doc = "Bit 7 - Mask register for GPIO7."] #[inline(always)] pub fn reg_gpio_7_mask(&self) -> REG_GPIO_7_MASK_R { - REG_GPIO_7_MASK_R::new(((self.bits >> 7) & 0x01) != 0) + REG_GPIO_7_MASK_R::new(((self.bits >> 7) & 1) != 0) } #[doc = "Bit 8 - Mask register for GPIO8."] #[inline(always)] pub fn reg_gpio_8_mask(&self) -> REG_GPIO_8_MASK_R { - REG_GPIO_8_MASK_R::new(((self.bits >> 8) & 0x01) != 0) + REG_GPIO_8_MASK_R::new(((self.bits >> 8) & 1) != 0) } #[doc = "Bit 9 - Mask register for GPIO9."] #[inline(always)] pub fn reg_gpio_9_mask(&self) -> REG_GPIO_9_MASK_R { - REG_GPIO_9_MASK_R::new(((self.bits >> 9) & 0x01) != 0) + REG_GPIO_9_MASK_R::new(((self.bits >> 9) & 1) != 0) } #[doc = "Bit 10 - Mask register for GPIO10."] #[inline(always)] pub fn reg_gpio_10_mask(&self) -> REG_GPIO_10_MASK_R { - REG_GPIO_10_MASK_R::new(((self.bits >> 10) & 0x01) != 0) + REG_GPIO_10_MASK_R::new(((self.bits >> 10) & 1) != 0) } #[doc = "Bit 11 - Mask register for GPIO11."] #[inline(always)] pub fn reg_gpio_11_mask(&self) -> REG_GPIO_11_MASK_R { - REG_GPIO_11_MASK_R::new(((self.bits >> 11) & 0x01) != 0) + REG_GPIO_11_MASK_R::new(((self.bits >> 11) & 1) != 0) } #[doc = "Bit 12 - Mask register for GPIO12."] #[inline(always)] pub fn reg_gpio_12_mask(&self) -> REG_GPIO_12_MASK_R { - REG_GPIO_12_MASK_R::new(((self.bits >> 12) & 0x01) != 0) + REG_GPIO_12_MASK_R::new(((self.bits >> 12) & 1) != 0) } #[doc = "Bit 13 - Mask register for GPIO13."] #[inline(always)] pub fn reg_gpio_13_mask(&self) -> REG_GPIO_13_MASK_R { - REG_GPIO_13_MASK_R::new(((self.bits >> 13) & 0x01) != 0) + REG_GPIO_13_MASK_R::new(((self.bits >> 13) & 1) != 0) } #[doc = "Bit 14 - Mask register for GPIO14."] #[inline(always)] pub fn reg_gpio_14_mask(&self) -> REG_GPIO_14_MASK_R { - REG_GPIO_14_MASK_R::new(((self.bits >> 14) & 0x01) != 0) + REG_GPIO_14_MASK_R::new(((self.bits >> 14) & 1) != 0) } #[doc = "Bit 15 - Mask register for GPIO15."] #[inline(always)] pub fn reg_gpio_15_mask(&self) -> REG_GPIO_15_MASK_R { - REG_GPIO_15_MASK_R::new(((self.bits >> 15) & 0x01) != 0) + REG_GPIO_15_MASK_R::new(((self.bits >> 15) & 1) != 0) } #[doc = "Bit 16 - Mask register for GPIO16."] #[inline(always)] pub fn reg_gpio_16_mask(&self) -> REG_GPIO_16_MASK_R { - REG_GPIO_16_MASK_R::new(((self.bits >> 16) & 0x01) != 0) + REG_GPIO_16_MASK_R::new(((self.bits >> 16) & 1) != 0) } #[doc = "Bit 17 - Mask register for GPIO17."] #[inline(always)] pub fn reg_gpio_17_mask(&self) -> REG_GPIO_17_MASK_R { - REG_GPIO_17_MASK_R::new(((self.bits >> 17) & 0x01) != 0) + REG_GPIO_17_MASK_R::new(((self.bits >> 17) & 1) != 0) } #[doc = "Bit 18 - Mask register for GPIO18."] #[inline(always)] pub fn reg_gpio_18_mask(&self) -> REG_GPIO_18_MASK_R { - REG_GPIO_18_MASK_R::new(((self.bits >> 18) & 0x01) != 0) + REG_GPIO_18_MASK_R::new(((self.bits >> 18) & 1) != 0) } #[doc = "Bit 19 - Mask register for GPIO19."] #[inline(always)] pub fn reg_gpio_19_mask(&self) -> REG_GPIO_19_MASK_R { - REG_GPIO_19_MASK_R::new(((self.bits >> 19) & 0x01) != 0) + REG_GPIO_19_MASK_R::new(((self.bits >> 19) & 1) != 0) } #[doc = "Bit 20 - Mask register for GPIO20."] #[inline(always)] pub fn reg_gpio_20_mask(&self) -> REG_GPIO_20_MASK_R { - REG_GPIO_20_MASK_R::new(((self.bits >> 20) & 0x01) != 0) + REG_GPIO_20_MASK_R::new(((self.bits >> 20) & 1) != 0) } #[doc = "Bit 21 - Mask register for GPIO21."] #[inline(always)] pub fn reg_gpio_21_mask(&self) -> REG_GPIO_21_MASK_R { - REG_GPIO_21_MASK_R::new(((self.bits >> 21) & 0x01) != 0) + REG_GPIO_21_MASK_R::new(((self.bits >> 21) & 1) != 0) } #[doc = "Bit 22 - Mask register for GPIO22."] #[inline(always)] pub fn reg_gpio_22_mask(&self) -> REG_GPIO_22_MASK_R { - REG_GPIO_22_MASK_R::new(((self.bits >> 22) & 0x01) != 0) + REG_GPIO_22_MASK_R::new(((self.bits >> 22) & 1) != 0) } #[doc = "Bit 23 - Mask register for GPIO23."] #[inline(always)] pub fn reg_gpio_23_mask(&self) -> REG_GPIO_23_MASK_R { - REG_GPIO_23_MASK_R::new(((self.bits >> 23) & 0x01) != 0) + REG_GPIO_23_MASK_R::new(((self.bits >> 23) & 1) != 0) } #[doc = "Bit 24 - Mask register for GPIO24."] #[inline(always)] pub fn reg_gpio_24_mask(&self) -> REG_GPIO_24_MASK_R { - REG_GPIO_24_MASK_R::new(((self.bits >> 24) & 0x01) != 0) + REG_GPIO_24_MASK_R::new(((self.bits >> 24) & 1) != 0) } #[doc = "Bit 25 - Mask register for GPIO25."] #[inline(always)] pub fn reg_gpio_25_mask(&self) -> REG_GPIO_25_MASK_R { - REG_GPIO_25_MASK_R::new(((self.bits >> 25) & 0x01) != 0) + REG_GPIO_25_MASK_R::new(((self.bits >> 25) & 1) != 0) } #[doc = "Bit 26 - Mask register for GPIO26."] #[inline(always)] pub fn reg_gpio_26_mask(&self) -> REG_GPIO_26_MASK_R { - REG_GPIO_26_MASK_R::new(((self.bits >> 26) & 0x01) != 0) + REG_GPIO_26_MASK_R::new(((self.bits >> 26) & 1) != 0) } #[doc = "Bit 27 - Mask register for GPIO27."] #[inline(always)] pub fn reg_gpio_27_mask(&self) -> REG_GPIO_27_MASK_R { - REG_GPIO_27_MASK_R::new(((self.bits >> 27) & 0x01) != 0) + REG_GPIO_27_MASK_R::new(((self.bits >> 27) & 1) != 0) } #[doc = "Bit 28 - Mask register for GPIO28."] #[inline(always)] pub fn reg_gpio_28_mask(&self) -> REG_GPIO_28_MASK_R { - REG_GPIO_28_MASK_R::new(((self.bits >> 28) & 0x01) != 0) + REG_GPIO_28_MASK_R::new(((self.bits >> 28) & 1) != 0) } } impl W { #[doc = "Bit 0 - Mask register for GPIO0."] #[inline(always)] - pub fn reg_gpio_0_mask(&mut self) -> REG_GPIO_0_MASK_W { - REG_GPIO_0_MASK_W { w: self } + #[must_use] + pub fn reg_gpio_0_mask(&mut self) -> REG_GPIO_0_MASK_W<0> { + REG_GPIO_0_MASK_W::new(self) } #[doc = "Bit 1 - Mask register for GPIO1."] #[inline(always)] - pub fn reg_gpio_1_mask(&mut self) -> REG_GPIO_1_MASK_W { - REG_GPIO_1_MASK_W { w: self } + #[must_use] + pub fn reg_gpio_1_mask(&mut self) -> REG_GPIO_1_MASK_W<1> { + REG_GPIO_1_MASK_W::new(self) } #[doc = "Bit 2 - Mask register for GPIO2."] #[inline(always)] - pub fn reg_gpio_2_mask(&mut self) -> REG_GPIO_2_MASK_W { - REG_GPIO_2_MASK_W { w: self } + #[must_use] + pub fn reg_gpio_2_mask(&mut self) -> REG_GPIO_2_MASK_W<2> { + REG_GPIO_2_MASK_W::new(self) } #[doc = "Bit 3 - Mask register for GPIO3."] #[inline(always)] - pub fn reg_gpio_3_mask(&mut self) -> REG_GPIO_3_MASK_W { - REG_GPIO_3_MASK_W { w: self } + #[must_use] + pub fn reg_gpio_3_mask(&mut self) -> REG_GPIO_3_MASK_W<3> { + REG_GPIO_3_MASK_W::new(self) } #[doc = "Bit 4 - Mask register for GPIO4."] #[inline(always)] - pub fn reg_gpio_4_mask(&mut self) -> REG_GPIO_4_MASK_W { - REG_GPIO_4_MASK_W { w: self } + #[must_use] + pub fn reg_gpio_4_mask(&mut self) -> REG_GPIO_4_MASK_W<4> { + REG_GPIO_4_MASK_W::new(self) } #[doc = "Bit 5 - Mask register for GPIO5."] #[inline(always)] - pub fn reg_gpio_5_mask(&mut self) -> REG_GPIO_5_MASK_W { - REG_GPIO_5_MASK_W { w: self } + #[must_use] + pub fn reg_gpio_5_mask(&mut self) -> REG_GPIO_5_MASK_W<5> { + REG_GPIO_5_MASK_W::new(self) } #[doc = "Bit 6 - Mask register for GPIO6."] #[inline(always)] - pub fn reg_gpio_6_mask(&mut self) -> REG_GPIO_6_MASK_W { - REG_GPIO_6_MASK_W { w: self } + #[must_use] + pub fn reg_gpio_6_mask(&mut self) -> REG_GPIO_6_MASK_W<6> { + REG_GPIO_6_MASK_W::new(self) } #[doc = "Bit 7 - Mask register for GPIO7."] #[inline(always)] - pub fn reg_gpio_7_mask(&mut self) -> REG_GPIO_7_MASK_W { - REG_GPIO_7_MASK_W { w: self } + #[must_use] + pub fn reg_gpio_7_mask(&mut self) -> REG_GPIO_7_MASK_W<7> { + REG_GPIO_7_MASK_W::new(self) } #[doc = "Bit 8 - Mask register for GPIO8."] #[inline(always)] - pub fn reg_gpio_8_mask(&mut self) -> REG_GPIO_8_MASK_W { - REG_GPIO_8_MASK_W { w: self } + #[must_use] + pub fn reg_gpio_8_mask(&mut self) -> REG_GPIO_8_MASK_W<8> { + REG_GPIO_8_MASK_W::new(self) } #[doc = "Bit 9 - Mask register for GPIO9."] #[inline(always)] - pub fn reg_gpio_9_mask(&mut self) -> REG_GPIO_9_MASK_W { - REG_GPIO_9_MASK_W { w: self } + #[must_use] + pub fn reg_gpio_9_mask(&mut self) -> REG_GPIO_9_MASK_W<9> { + REG_GPIO_9_MASK_W::new(self) } #[doc = "Bit 10 - Mask register for GPIO10."] #[inline(always)] - pub fn reg_gpio_10_mask(&mut self) -> REG_GPIO_10_MASK_W { - REG_GPIO_10_MASK_W { w: self } + #[must_use] + pub fn reg_gpio_10_mask(&mut self) -> REG_GPIO_10_MASK_W<10> { + REG_GPIO_10_MASK_W::new(self) } #[doc = "Bit 11 - Mask register for GPIO11."] #[inline(always)] - pub fn reg_gpio_11_mask(&mut self) -> REG_GPIO_11_MASK_W { - REG_GPIO_11_MASK_W { w: self } + #[must_use] + pub fn reg_gpio_11_mask(&mut self) -> REG_GPIO_11_MASK_W<11> { + REG_GPIO_11_MASK_W::new(self) } #[doc = "Bit 12 - Mask register for GPIO12."] #[inline(always)] - pub fn reg_gpio_12_mask(&mut self) -> REG_GPIO_12_MASK_W { - REG_GPIO_12_MASK_W { w: self } + #[must_use] + pub fn reg_gpio_12_mask(&mut self) -> REG_GPIO_12_MASK_W<12> { + REG_GPIO_12_MASK_W::new(self) } #[doc = "Bit 13 - Mask register for GPIO13."] #[inline(always)] - pub fn reg_gpio_13_mask(&mut self) -> REG_GPIO_13_MASK_W { - REG_GPIO_13_MASK_W { w: self } + #[must_use] + pub fn reg_gpio_13_mask(&mut self) -> REG_GPIO_13_MASK_W<13> { + REG_GPIO_13_MASK_W::new(self) } #[doc = "Bit 14 - Mask register for GPIO14."] #[inline(always)] - pub fn reg_gpio_14_mask(&mut self) -> REG_GPIO_14_MASK_W { - REG_GPIO_14_MASK_W { w: self } + #[must_use] + pub fn reg_gpio_14_mask(&mut self) -> REG_GPIO_14_MASK_W<14> { + REG_GPIO_14_MASK_W::new(self) } #[doc = "Bit 15 - Mask register for GPIO15."] #[inline(always)] - pub fn reg_gpio_15_mask(&mut self) -> REG_GPIO_15_MASK_W { - REG_GPIO_15_MASK_W { w: self } + #[must_use] + pub fn reg_gpio_15_mask(&mut self) -> REG_GPIO_15_MASK_W<15> { + REG_GPIO_15_MASK_W::new(self) } #[doc = "Bit 16 - Mask register for GPIO16."] #[inline(always)] - pub fn reg_gpio_16_mask(&mut self) -> REG_GPIO_16_MASK_W { - REG_GPIO_16_MASK_W { w: self } + #[must_use] + pub fn reg_gpio_16_mask(&mut self) -> REG_GPIO_16_MASK_W<16> { + REG_GPIO_16_MASK_W::new(self) } #[doc = "Bit 17 - Mask register for GPIO17."] #[inline(always)] - pub fn reg_gpio_17_mask(&mut self) -> REG_GPIO_17_MASK_W { - REG_GPIO_17_MASK_W { w: self } + #[must_use] + pub fn reg_gpio_17_mask(&mut self) -> REG_GPIO_17_MASK_W<17> { + REG_GPIO_17_MASK_W::new(self) } #[doc = "Bit 18 - Mask register for GPIO18."] #[inline(always)] - pub fn reg_gpio_18_mask(&mut self) -> REG_GPIO_18_MASK_W { - REG_GPIO_18_MASK_W { w: self } + #[must_use] + pub fn reg_gpio_18_mask(&mut self) -> REG_GPIO_18_MASK_W<18> { + REG_GPIO_18_MASK_W::new(self) } #[doc = "Bit 19 - Mask register for GPIO19."] #[inline(always)] - pub fn reg_gpio_19_mask(&mut self) -> REG_GPIO_19_MASK_W { - REG_GPIO_19_MASK_W { w: self } + #[must_use] + pub fn reg_gpio_19_mask(&mut self) -> REG_GPIO_19_MASK_W<19> { + REG_GPIO_19_MASK_W::new(self) } #[doc = "Bit 20 - Mask register for GPIO20."] #[inline(always)] - pub fn reg_gpio_20_mask(&mut self) -> REG_GPIO_20_MASK_W { - REG_GPIO_20_MASK_W { w: self } + #[must_use] + pub fn reg_gpio_20_mask(&mut self) -> REG_GPIO_20_MASK_W<20> { + REG_GPIO_20_MASK_W::new(self) } #[doc = "Bit 21 - Mask register for GPIO21."] #[inline(always)] - pub fn reg_gpio_21_mask(&mut self) -> REG_GPIO_21_MASK_W { - REG_GPIO_21_MASK_W { w: self } + #[must_use] + pub fn reg_gpio_21_mask(&mut self) -> REG_GPIO_21_MASK_W<21> { + REG_GPIO_21_MASK_W::new(self) } #[doc = "Bit 22 - Mask register for GPIO22."] #[inline(always)] - pub fn reg_gpio_22_mask(&mut self) -> REG_GPIO_22_MASK_W { - REG_GPIO_22_MASK_W { w: self } + #[must_use] + pub fn reg_gpio_22_mask(&mut self) -> REG_GPIO_22_MASK_W<22> { + REG_GPIO_22_MASK_W::new(self) } #[doc = "Bit 23 - Mask register for GPIO23."] #[inline(always)] - pub fn reg_gpio_23_mask(&mut self) -> REG_GPIO_23_MASK_W { - REG_GPIO_23_MASK_W { w: self } + #[must_use] + pub fn reg_gpio_23_mask(&mut self) -> REG_GPIO_23_MASK_W<23> { + REG_GPIO_23_MASK_W::new(self) } #[doc = "Bit 24 - Mask register for GPIO24."] #[inline(always)] - pub fn reg_gpio_24_mask(&mut self) -> REG_GPIO_24_MASK_W { - REG_GPIO_24_MASK_W { w: self } + #[must_use] + pub fn reg_gpio_24_mask(&mut self) -> REG_GPIO_24_MASK_W<24> { + REG_GPIO_24_MASK_W::new(self) } #[doc = "Bit 25 - Mask register for GPIO25."] #[inline(always)] - pub fn reg_gpio_25_mask(&mut self) -> REG_GPIO_25_MASK_W { - REG_GPIO_25_MASK_W { w: self } + #[must_use] + pub fn reg_gpio_25_mask(&mut self) -> REG_GPIO_25_MASK_W<25> { + REG_GPIO_25_MASK_W::new(self) } #[doc = "Bit 26 - Mask register for GPIO26."] #[inline(always)] - pub fn reg_gpio_26_mask(&mut self) -> REG_GPIO_26_MASK_W { - REG_GPIO_26_MASK_W { w: self } + #[must_use] + pub fn reg_gpio_26_mask(&mut self) -> REG_GPIO_26_MASK_W<26> { + REG_GPIO_26_MASK_W::new(self) } #[doc = "Bit 27 - Mask register for GPIO27."] #[inline(always)] - pub fn reg_gpio_27_mask(&mut self) -> REG_GPIO_27_MASK_W { - REG_GPIO_27_MASK_W { w: self } + #[must_use] + pub fn reg_gpio_27_mask(&mut self) -> REG_GPIO_27_MASK_W<27> { + REG_GPIO_27_MASK_W::new(self) } #[doc = "Bit 28 - Mask register for GPIO28."] #[inline(always)] - pub fn reg_gpio_28_mask(&mut self) -> REG_GPIO_28_MASK_W { - REG_GPIO_28_MASK_W { w: self } + #[must_use] + pub fn reg_gpio_28_mask(&mut self) -> REG_GPIO_28_MASK_W<28> { + REG_GPIO_28_MASK_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -2750,11 +1854,10 @@ impl crate::Readable for GPIO_INT_MASK1_SPEC { #[doc = "`write(|w| ..)` method takes [gpio_int_mask1::W](W) writer structure"] impl crate::Writable for GPIO_INT_MASK1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets GPIO_INT_MASK1 to value 0xffff_ffff"] impl crate::Resettable for GPIO_INT_MASK1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xffff_ffff - } + const RESET_VALUE: Self::Ux = 0xffff_ffff; } diff --git a/src/glb/gpio_int_mode_set1.rs b/src/glb/gpio_int_mode_set1.rs index 96a4504..f775be5 100644 --- a/src/glb/gpio_int_mode_set1.rs +++ b/src/glb/gpio_int_mode_set1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,15 +28,18 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } +#[doc = "Field `reg_gpio_0_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO0."] +pub type REG_GPIO_0_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader; #[doc = "Interrupt trigger mode register for GPIO0.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_0_INTERRUPT_TRIGGER_MODE_A { +pub enum GPIO0TRIGGER_MODE_A { #[doc = "0: `0`"] NEGATIVE_PULSE = 0, #[doc = "1: `1`"] @@ -45,185 +49,127 @@ pub enum REG_GPIO_0_INTERRUPT_TRIGGER_MODE_A { #[doc = "3: `11`"] POSITIVE_LEVEL = 3, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_0_INTERRUPT_TRIGGER_MODE_A) -> Self { + fn from(variant: GPIO0TRIGGER_MODE_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_0_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO0."] -pub struct REG_GPIO_0_INTERRUPT_TRIGGER_MODE_R( - crate::FieldReader, -); impl REG_GPIO_0_INTERRUPT_TRIGGER_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_0_INTERRUPT_TRIGGER_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_0_INTERRUPT_TRIGGER_MODE_A { + pub fn variant(&self) -> GPIO0TRIGGER_MODE_A { match self.bits { - 0 => REG_GPIO_0_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE, - 1 => REG_GPIO_0_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE, - 2 => REG_GPIO_0_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL, - 3 => REG_GPIO_0_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL, + 0 => GPIO0TRIGGER_MODE_A::NEGATIVE_PULSE, + 1 => GPIO0TRIGGER_MODE_A::POSITIVE_PULSE, + 2 => GPIO0TRIGGER_MODE_A::NEGATIVE_LEVEL, + 3 => GPIO0TRIGGER_MODE_A::POSITIVE_LEVEL, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"] #[inline(always)] pub fn is_negative_pulse(&self) -> bool { - **self == REG_GPIO_0_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE + *self == GPIO0TRIGGER_MODE_A::NEGATIVE_PULSE } #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"] #[inline(always)] pub fn is_positive_pulse(&self) -> bool { - **self == REG_GPIO_0_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE + *self == GPIO0TRIGGER_MODE_A::POSITIVE_PULSE } #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"] #[inline(always)] pub fn is_negative_level(&self) -> bool { - **self == REG_GPIO_0_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL + *self == GPIO0TRIGGER_MODE_A::NEGATIVE_LEVEL } #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"] #[inline(always)] pub fn is_positive_level(&self) -> bool { - **self == REG_GPIO_0_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL - } -} -impl core::ops::Deref for REG_GPIO_0_INTERRUPT_TRIGGER_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO0TRIGGER_MODE_A::POSITIVE_LEVEL } } #[doc = "Field `reg_gpio_0_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO0."] -pub struct REG_GPIO_0_INTERRUPT_TRIGGER_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_0_INTERRUPT_TRIGGER_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_0_INTERRUPT_TRIGGER_MODE_A) -> &'a mut W { - self.bits(variant.into()) - } +pub type REG_GPIO_0_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET1_SPEC, u8, GPIO0TRIGGER_MODE_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_0_INTERRUPT_TRIGGER_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn negative_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_0_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE) + self.variant(GPIO0TRIGGER_MODE_A::NEGATIVE_PULSE) } #[doc = "`1`"] #[inline(always)] pub fn positive_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_0_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE) + self.variant(GPIO0TRIGGER_MODE_A::POSITIVE_PULSE) } #[doc = "`10`"] #[inline(always)] pub fn negative_level(self) -> &'a mut W { - self.variant(REG_GPIO_0_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL) + self.variant(GPIO0TRIGGER_MODE_A::NEGATIVE_LEVEL) } #[doc = "`11`"] #[inline(always)] pub fn positive_level(self) -> &'a mut W { - self.variant(REG_GPIO_0_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w + self.variant(GPIO0TRIGGER_MODE_A::POSITIVE_LEVEL) } } +#[doc = "Field `reg_gpio_0_interrupt_control_mode` reader - Interrupt control mode register for GPIO0."] +pub type REG_GPIO_0_INTERRUPT_CONTROL_MODE_R = crate::BitReader; #[doc = "Interrupt control mode register for GPIO0.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_0_INTERRUPT_CONTROL_MODE_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO0CONTROL_MODE_A { #[doc = "0: `0`"] SYNCHRONOUS = 0, #[doc = "1: `1`"] ASYNCHRONOUS = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_0_INTERRUPT_CONTROL_MODE_A) -> Self { + fn from(variant: GPIO0CONTROL_MODE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_0_interrupt_control_mode` reader - Interrupt control mode register for GPIO0."] -pub struct REG_GPIO_0_INTERRUPT_CONTROL_MODE_R( - crate::FieldReader, -); impl REG_GPIO_0_INTERRUPT_CONTROL_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_0_INTERRUPT_CONTROL_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_0_INTERRUPT_CONTROL_MODE_A { + pub fn variant(&self) -> GPIO0CONTROL_MODE_A { match self.bits { - false => REG_GPIO_0_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS, - true => REG_GPIO_0_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS, + false => GPIO0CONTROL_MODE_A::SYNCHRONOUS, + true => GPIO0CONTROL_MODE_A::ASYNCHRONOUS, } } #[doc = "Checks if the value of the field is `SYNCHRONOUS`"] #[inline(always)] pub fn is_synchronous(&self) -> bool { - **self == REG_GPIO_0_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS + *self == GPIO0CONTROL_MODE_A::SYNCHRONOUS } #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"] #[inline(always)] pub fn is_asynchronous(&self) -> bool { - **self == REG_GPIO_0_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS - } -} -impl core::ops::Deref for REG_GPIO_0_INTERRUPT_CONTROL_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO0CONTROL_MODE_A::ASYNCHRONOUS } } #[doc = "Field `reg_gpio_0_interrupt_control_mode` writer - Interrupt control mode register for GPIO0."] -pub struct REG_GPIO_0_INTERRUPT_CONTROL_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_0_INTERRUPT_CONTROL_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_0_INTERRUPT_CONTROL_MODE_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_0_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MODE_SET1_SPEC, GPIO0CONTROL_MODE_A, O>; +impl<'a, const O: u8> REG_GPIO_0_INTERRUPT_CONTROL_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn synchronous(self) -> &'a mut W { - self.variant(REG_GPIO_0_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS) + self.variant(GPIO0CONTROL_MODE_A::SYNCHRONOUS) } #[doc = "`1`"] #[inline(always)] pub fn asynchronous(self) -> &'a mut W { - self.variant(REG_GPIO_0_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w + self.variant(GPIO0CONTROL_MODE_A::ASYNCHRONOUS) } } +#[doc = "Field `reg_gpio_1_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO1."] +pub type REG_GPIO_1_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader; #[doc = "Interrupt trigger mode register for GPIO1.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_1_INTERRUPT_TRIGGER_MODE_A { +pub enum GPIO1TRIGGER_MODE_A { #[doc = "0: `0`"] NEGATIVE_PULSE = 0, #[doc = "1: `1`"] @@ -233,185 +179,127 @@ pub enum REG_GPIO_1_INTERRUPT_TRIGGER_MODE_A { #[doc = "3: `11`"] POSITIVE_LEVEL = 3, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_1_INTERRUPT_TRIGGER_MODE_A) -> Self { + fn from(variant: GPIO1TRIGGER_MODE_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_1_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO1."] -pub struct REG_GPIO_1_INTERRUPT_TRIGGER_MODE_R( - crate::FieldReader, -); impl REG_GPIO_1_INTERRUPT_TRIGGER_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_1_INTERRUPT_TRIGGER_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_1_INTERRUPT_TRIGGER_MODE_A { + pub fn variant(&self) -> GPIO1TRIGGER_MODE_A { match self.bits { - 0 => REG_GPIO_1_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE, - 1 => REG_GPIO_1_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE, - 2 => REG_GPIO_1_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL, - 3 => REG_GPIO_1_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL, + 0 => GPIO1TRIGGER_MODE_A::NEGATIVE_PULSE, + 1 => GPIO1TRIGGER_MODE_A::POSITIVE_PULSE, + 2 => GPIO1TRIGGER_MODE_A::NEGATIVE_LEVEL, + 3 => GPIO1TRIGGER_MODE_A::POSITIVE_LEVEL, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"] #[inline(always)] pub fn is_negative_pulse(&self) -> bool { - **self == REG_GPIO_1_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE + *self == GPIO1TRIGGER_MODE_A::NEGATIVE_PULSE } #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"] #[inline(always)] pub fn is_positive_pulse(&self) -> bool { - **self == REG_GPIO_1_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE + *self == GPIO1TRIGGER_MODE_A::POSITIVE_PULSE } #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"] #[inline(always)] pub fn is_negative_level(&self) -> bool { - **self == REG_GPIO_1_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL + *self == GPIO1TRIGGER_MODE_A::NEGATIVE_LEVEL } #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"] #[inline(always)] pub fn is_positive_level(&self) -> bool { - **self == REG_GPIO_1_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL - } -} -impl core::ops::Deref for REG_GPIO_1_INTERRUPT_TRIGGER_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO1TRIGGER_MODE_A::POSITIVE_LEVEL } } #[doc = "Field `reg_gpio_1_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO1."] -pub struct REG_GPIO_1_INTERRUPT_TRIGGER_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_1_INTERRUPT_TRIGGER_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_1_INTERRUPT_TRIGGER_MODE_A) -> &'a mut W { - self.bits(variant.into()) - } +pub type REG_GPIO_1_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET1_SPEC, u8, GPIO1TRIGGER_MODE_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_1_INTERRUPT_TRIGGER_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn negative_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_1_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE) + self.variant(GPIO1TRIGGER_MODE_A::NEGATIVE_PULSE) } #[doc = "`1`"] #[inline(always)] pub fn positive_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_1_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE) + self.variant(GPIO1TRIGGER_MODE_A::POSITIVE_PULSE) } #[doc = "`10`"] #[inline(always)] pub fn negative_level(self) -> &'a mut W { - self.variant(REG_GPIO_1_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL) + self.variant(GPIO1TRIGGER_MODE_A::NEGATIVE_LEVEL) } #[doc = "`11`"] #[inline(always)] pub fn positive_level(self) -> &'a mut W { - self.variant(REG_GPIO_1_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 3)) | ((value as u32 & 0x03) << 3); - self.w + self.variant(GPIO1TRIGGER_MODE_A::POSITIVE_LEVEL) } } +#[doc = "Field `reg_gpio_1_interrupt_control_mode` reader - Interrupt control mode register for GPIO1."] +pub type REG_GPIO_1_INTERRUPT_CONTROL_MODE_R = crate::BitReader; #[doc = "Interrupt control mode register for GPIO1.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_1_INTERRUPT_CONTROL_MODE_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO1CONTROL_MODE_A { #[doc = "0: `0`"] SYNCHRONOUS = 0, #[doc = "1: `1`"] ASYNCHRONOUS = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_1_INTERRUPT_CONTROL_MODE_A) -> Self { + fn from(variant: GPIO1CONTROL_MODE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_1_interrupt_control_mode` reader - Interrupt control mode register for GPIO1."] -pub struct REG_GPIO_1_INTERRUPT_CONTROL_MODE_R( - crate::FieldReader, -); impl REG_GPIO_1_INTERRUPT_CONTROL_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_1_INTERRUPT_CONTROL_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_1_INTERRUPT_CONTROL_MODE_A { + pub fn variant(&self) -> GPIO1CONTROL_MODE_A { match self.bits { - false => REG_GPIO_1_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS, - true => REG_GPIO_1_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS, + false => GPIO1CONTROL_MODE_A::SYNCHRONOUS, + true => GPIO1CONTROL_MODE_A::ASYNCHRONOUS, } } #[doc = "Checks if the value of the field is `SYNCHRONOUS`"] #[inline(always)] pub fn is_synchronous(&self) -> bool { - **self == REG_GPIO_1_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS + *self == GPIO1CONTROL_MODE_A::SYNCHRONOUS } #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"] #[inline(always)] pub fn is_asynchronous(&self) -> bool { - **self == REG_GPIO_1_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS - } -} -impl core::ops::Deref for REG_GPIO_1_INTERRUPT_CONTROL_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO1CONTROL_MODE_A::ASYNCHRONOUS } } #[doc = "Field `reg_gpio_1_interrupt_control_mode` writer - Interrupt control mode register for GPIO1."] -pub struct REG_GPIO_1_INTERRUPT_CONTROL_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_1_INTERRUPT_CONTROL_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_1_INTERRUPT_CONTROL_MODE_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_1_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MODE_SET1_SPEC, GPIO1CONTROL_MODE_A, O>; +impl<'a, const O: u8> REG_GPIO_1_INTERRUPT_CONTROL_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn synchronous(self) -> &'a mut W { - self.variant(REG_GPIO_1_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS) + self.variant(GPIO1CONTROL_MODE_A::SYNCHRONOUS) } #[doc = "`1`"] #[inline(always)] pub fn asynchronous(self) -> &'a mut W { - self.variant(REG_GPIO_1_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w + self.variant(GPIO1CONTROL_MODE_A::ASYNCHRONOUS) } } +#[doc = "Field `reg_gpio_2_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO2."] +pub type REG_GPIO_2_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader; #[doc = "Interrupt trigger mode register for GPIO2.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_2_INTERRUPT_TRIGGER_MODE_A { +pub enum GPIO2TRIGGER_MODE_A { #[doc = "0: `0`"] NEGATIVE_PULSE = 0, #[doc = "1: `1`"] @@ -421,185 +309,127 @@ pub enum REG_GPIO_2_INTERRUPT_TRIGGER_MODE_A { #[doc = "3: `11`"] POSITIVE_LEVEL = 3, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_2_INTERRUPT_TRIGGER_MODE_A) -> Self { + fn from(variant: GPIO2TRIGGER_MODE_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_2_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO2."] -pub struct REG_GPIO_2_INTERRUPT_TRIGGER_MODE_R( - crate::FieldReader, -); impl REG_GPIO_2_INTERRUPT_TRIGGER_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_2_INTERRUPT_TRIGGER_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_2_INTERRUPT_TRIGGER_MODE_A { + pub fn variant(&self) -> GPIO2TRIGGER_MODE_A { match self.bits { - 0 => REG_GPIO_2_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE, - 1 => REG_GPIO_2_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE, - 2 => REG_GPIO_2_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL, - 3 => REG_GPIO_2_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL, + 0 => GPIO2TRIGGER_MODE_A::NEGATIVE_PULSE, + 1 => GPIO2TRIGGER_MODE_A::POSITIVE_PULSE, + 2 => GPIO2TRIGGER_MODE_A::NEGATIVE_LEVEL, + 3 => GPIO2TRIGGER_MODE_A::POSITIVE_LEVEL, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"] #[inline(always)] pub fn is_negative_pulse(&self) -> bool { - **self == REG_GPIO_2_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE + *self == GPIO2TRIGGER_MODE_A::NEGATIVE_PULSE } #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"] #[inline(always)] pub fn is_positive_pulse(&self) -> bool { - **self == REG_GPIO_2_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE + *self == GPIO2TRIGGER_MODE_A::POSITIVE_PULSE } #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"] #[inline(always)] pub fn is_negative_level(&self) -> bool { - **self == REG_GPIO_2_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL + *self == GPIO2TRIGGER_MODE_A::NEGATIVE_LEVEL } #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"] #[inline(always)] pub fn is_positive_level(&self) -> bool { - **self == REG_GPIO_2_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL - } -} -impl core::ops::Deref for REG_GPIO_2_INTERRUPT_TRIGGER_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO2TRIGGER_MODE_A::POSITIVE_LEVEL } } #[doc = "Field `reg_gpio_2_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO2."] -pub struct REG_GPIO_2_INTERRUPT_TRIGGER_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_2_INTERRUPT_TRIGGER_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_2_INTERRUPT_TRIGGER_MODE_A) -> &'a mut W { - self.bits(variant.into()) - } +pub type REG_GPIO_2_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET1_SPEC, u8, GPIO2TRIGGER_MODE_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_2_INTERRUPT_TRIGGER_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn negative_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_2_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE) + self.variant(GPIO2TRIGGER_MODE_A::NEGATIVE_PULSE) } #[doc = "`1`"] #[inline(always)] pub fn positive_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_2_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE) + self.variant(GPIO2TRIGGER_MODE_A::POSITIVE_PULSE) } #[doc = "`10`"] #[inline(always)] pub fn negative_level(self) -> &'a mut W { - self.variant(REG_GPIO_2_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL) + self.variant(GPIO2TRIGGER_MODE_A::NEGATIVE_LEVEL) } #[doc = "`11`"] #[inline(always)] pub fn positive_level(self) -> &'a mut W { - self.variant(REG_GPIO_2_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 6)) | ((value as u32 & 0x03) << 6); - self.w + self.variant(GPIO2TRIGGER_MODE_A::POSITIVE_LEVEL) } } +#[doc = "Field `reg_gpio_2_interrupt_control_mode` reader - Interrupt control mode register for GPIO2."] +pub type REG_GPIO_2_INTERRUPT_CONTROL_MODE_R = crate::BitReader; #[doc = "Interrupt control mode register for GPIO2.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_2_INTERRUPT_CONTROL_MODE_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO2CONTROL_MODE_A { #[doc = "0: `0`"] SYNCHRONOUS = 0, #[doc = "1: `1`"] ASYNCHRONOUS = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_2_INTERRUPT_CONTROL_MODE_A) -> Self { + fn from(variant: GPIO2CONTROL_MODE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_2_interrupt_control_mode` reader - Interrupt control mode register for GPIO2."] -pub struct REG_GPIO_2_INTERRUPT_CONTROL_MODE_R( - crate::FieldReader, -); impl REG_GPIO_2_INTERRUPT_CONTROL_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_2_INTERRUPT_CONTROL_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_2_INTERRUPT_CONTROL_MODE_A { + pub fn variant(&self) -> GPIO2CONTROL_MODE_A { match self.bits { - false => REG_GPIO_2_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS, - true => REG_GPIO_2_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS, + false => GPIO2CONTROL_MODE_A::SYNCHRONOUS, + true => GPIO2CONTROL_MODE_A::ASYNCHRONOUS, } } #[doc = "Checks if the value of the field is `SYNCHRONOUS`"] #[inline(always)] pub fn is_synchronous(&self) -> bool { - **self == REG_GPIO_2_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS + *self == GPIO2CONTROL_MODE_A::SYNCHRONOUS } #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"] #[inline(always)] pub fn is_asynchronous(&self) -> bool { - **self == REG_GPIO_2_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS - } -} -impl core::ops::Deref for REG_GPIO_2_INTERRUPT_CONTROL_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO2CONTROL_MODE_A::ASYNCHRONOUS } } #[doc = "Field `reg_gpio_2_interrupt_control_mode` writer - Interrupt control mode register for GPIO2."] -pub struct REG_GPIO_2_INTERRUPT_CONTROL_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_2_INTERRUPT_CONTROL_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_2_INTERRUPT_CONTROL_MODE_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_2_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MODE_SET1_SPEC, GPIO2CONTROL_MODE_A, O>; +impl<'a, const O: u8> REG_GPIO_2_INTERRUPT_CONTROL_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn synchronous(self) -> &'a mut W { - self.variant(REG_GPIO_2_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS) + self.variant(GPIO2CONTROL_MODE_A::SYNCHRONOUS) } #[doc = "`1`"] #[inline(always)] pub fn asynchronous(self) -> &'a mut W { - self.variant(REG_GPIO_2_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w + self.variant(GPIO2CONTROL_MODE_A::ASYNCHRONOUS) } } +#[doc = "Field `reg_gpio_3_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO3."] +pub type REG_GPIO_3_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader; #[doc = "Interrupt trigger mode register for GPIO3.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_3_INTERRUPT_TRIGGER_MODE_A { +pub enum GPIO3TRIGGER_MODE_A { #[doc = "0: `0`"] NEGATIVE_PULSE = 0, #[doc = "1: `1`"] @@ -609,185 +439,127 @@ pub enum REG_GPIO_3_INTERRUPT_TRIGGER_MODE_A { #[doc = "3: `11`"] POSITIVE_LEVEL = 3, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_3_INTERRUPT_TRIGGER_MODE_A) -> Self { + fn from(variant: GPIO3TRIGGER_MODE_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_3_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO3."] -pub struct REG_GPIO_3_INTERRUPT_TRIGGER_MODE_R( - crate::FieldReader, -); impl REG_GPIO_3_INTERRUPT_TRIGGER_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_3_INTERRUPT_TRIGGER_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_3_INTERRUPT_TRIGGER_MODE_A { + pub fn variant(&self) -> GPIO3TRIGGER_MODE_A { match self.bits { - 0 => REG_GPIO_3_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE, - 1 => REG_GPIO_3_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE, - 2 => REG_GPIO_3_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL, - 3 => REG_GPIO_3_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL, + 0 => GPIO3TRIGGER_MODE_A::NEGATIVE_PULSE, + 1 => GPIO3TRIGGER_MODE_A::POSITIVE_PULSE, + 2 => GPIO3TRIGGER_MODE_A::NEGATIVE_LEVEL, + 3 => GPIO3TRIGGER_MODE_A::POSITIVE_LEVEL, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"] #[inline(always)] pub fn is_negative_pulse(&self) -> bool { - **self == REG_GPIO_3_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE + *self == GPIO3TRIGGER_MODE_A::NEGATIVE_PULSE } #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"] #[inline(always)] pub fn is_positive_pulse(&self) -> bool { - **self == REG_GPIO_3_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE + *self == GPIO3TRIGGER_MODE_A::POSITIVE_PULSE } #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"] #[inline(always)] pub fn is_negative_level(&self) -> bool { - **self == REG_GPIO_3_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL + *self == GPIO3TRIGGER_MODE_A::NEGATIVE_LEVEL } #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"] #[inline(always)] pub fn is_positive_level(&self) -> bool { - **self == REG_GPIO_3_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL - } -} -impl core::ops::Deref for REG_GPIO_3_INTERRUPT_TRIGGER_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO3TRIGGER_MODE_A::POSITIVE_LEVEL } } #[doc = "Field `reg_gpio_3_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO3."] -pub struct REG_GPIO_3_INTERRUPT_TRIGGER_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_3_INTERRUPT_TRIGGER_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_3_INTERRUPT_TRIGGER_MODE_A) -> &'a mut W { - self.bits(variant.into()) - } +pub type REG_GPIO_3_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET1_SPEC, u8, GPIO3TRIGGER_MODE_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_3_INTERRUPT_TRIGGER_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn negative_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_3_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE) + self.variant(GPIO3TRIGGER_MODE_A::NEGATIVE_PULSE) } #[doc = "`1`"] #[inline(always)] pub fn positive_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_3_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE) + self.variant(GPIO3TRIGGER_MODE_A::POSITIVE_PULSE) } #[doc = "`10`"] #[inline(always)] pub fn negative_level(self) -> &'a mut W { - self.variant(REG_GPIO_3_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL) + self.variant(GPIO3TRIGGER_MODE_A::NEGATIVE_LEVEL) } #[doc = "`11`"] #[inline(always)] pub fn positive_level(self) -> &'a mut W { - self.variant(REG_GPIO_3_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 9)) | ((value as u32 & 0x03) << 9); - self.w + self.variant(GPIO3TRIGGER_MODE_A::POSITIVE_LEVEL) } } +#[doc = "Field `reg_gpio_3_interrupt_control_mode` reader - Interrupt control mode register for GPIO3."] +pub type REG_GPIO_3_INTERRUPT_CONTROL_MODE_R = crate::BitReader; #[doc = "Interrupt control mode register for GPIO3.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_3_INTERRUPT_CONTROL_MODE_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO3CONTROL_MODE_A { #[doc = "0: `0`"] SYNCHRONOUS = 0, #[doc = "1: `1`"] ASYNCHRONOUS = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_3_INTERRUPT_CONTROL_MODE_A) -> Self { + fn from(variant: GPIO3CONTROL_MODE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_3_interrupt_control_mode` reader - Interrupt control mode register for GPIO3."] -pub struct REG_GPIO_3_INTERRUPT_CONTROL_MODE_R( - crate::FieldReader, -); impl REG_GPIO_3_INTERRUPT_CONTROL_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_3_INTERRUPT_CONTROL_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_3_INTERRUPT_CONTROL_MODE_A { + pub fn variant(&self) -> GPIO3CONTROL_MODE_A { match self.bits { - false => REG_GPIO_3_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS, - true => REG_GPIO_3_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS, + false => GPIO3CONTROL_MODE_A::SYNCHRONOUS, + true => GPIO3CONTROL_MODE_A::ASYNCHRONOUS, } } #[doc = "Checks if the value of the field is `SYNCHRONOUS`"] #[inline(always)] pub fn is_synchronous(&self) -> bool { - **self == REG_GPIO_3_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS + *self == GPIO3CONTROL_MODE_A::SYNCHRONOUS } #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"] #[inline(always)] pub fn is_asynchronous(&self) -> bool { - **self == REG_GPIO_3_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS - } -} -impl core::ops::Deref for REG_GPIO_3_INTERRUPT_CONTROL_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO3CONTROL_MODE_A::ASYNCHRONOUS } } #[doc = "Field `reg_gpio_3_interrupt_control_mode` writer - Interrupt control mode register for GPIO3."] -pub struct REG_GPIO_3_INTERRUPT_CONTROL_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_3_INTERRUPT_CONTROL_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_3_INTERRUPT_CONTROL_MODE_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_3_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MODE_SET1_SPEC, GPIO3CONTROL_MODE_A, O>; +impl<'a, const O: u8> REG_GPIO_3_INTERRUPT_CONTROL_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn synchronous(self) -> &'a mut W { - self.variant(REG_GPIO_3_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS) + self.variant(GPIO3CONTROL_MODE_A::SYNCHRONOUS) } #[doc = "`1`"] #[inline(always)] pub fn asynchronous(self) -> &'a mut W { - self.variant(REG_GPIO_3_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w + self.variant(GPIO3CONTROL_MODE_A::ASYNCHRONOUS) } } +#[doc = "Field `reg_gpio_4_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO4."] +pub type REG_GPIO_4_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader; #[doc = "Interrupt trigger mode register for GPIO4.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_4_INTERRUPT_TRIGGER_MODE_A { +pub enum GPIO4TRIGGER_MODE_A { #[doc = "0: `0`"] NEGATIVE_PULSE = 0, #[doc = "1: `1`"] @@ -797,185 +569,127 @@ pub enum REG_GPIO_4_INTERRUPT_TRIGGER_MODE_A { #[doc = "3: `11`"] POSITIVE_LEVEL = 3, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_4_INTERRUPT_TRIGGER_MODE_A) -> Self { + fn from(variant: GPIO4TRIGGER_MODE_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_4_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO4."] -pub struct REG_GPIO_4_INTERRUPT_TRIGGER_MODE_R( - crate::FieldReader, -); impl REG_GPIO_4_INTERRUPT_TRIGGER_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_4_INTERRUPT_TRIGGER_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_4_INTERRUPT_TRIGGER_MODE_A { + pub fn variant(&self) -> GPIO4TRIGGER_MODE_A { match self.bits { - 0 => REG_GPIO_4_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE, - 1 => REG_GPIO_4_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE, - 2 => REG_GPIO_4_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL, - 3 => REG_GPIO_4_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL, + 0 => GPIO4TRIGGER_MODE_A::NEGATIVE_PULSE, + 1 => GPIO4TRIGGER_MODE_A::POSITIVE_PULSE, + 2 => GPIO4TRIGGER_MODE_A::NEGATIVE_LEVEL, + 3 => GPIO4TRIGGER_MODE_A::POSITIVE_LEVEL, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"] #[inline(always)] pub fn is_negative_pulse(&self) -> bool { - **self == REG_GPIO_4_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE + *self == GPIO4TRIGGER_MODE_A::NEGATIVE_PULSE } #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"] #[inline(always)] pub fn is_positive_pulse(&self) -> bool { - **self == REG_GPIO_4_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE + *self == GPIO4TRIGGER_MODE_A::POSITIVE_PULSE } #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"] #[inline(always)] pub fn is_negative_level(&self) -> bool { - **self == REG_GPIO_4_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL + *self == GPIO4TRIGGER_MODE_A::NEGATIVE_LEVEL } #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"] #[inline(always)] pub fn is_positive_level(&self) -> bool { - **self == REG_GPIO_4_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL - } -} -impl core::ops::Deref for REG_GPIO_4_INTERRUPT_TRIGGER_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO4TRIGGER_MODE_A::POSITIVE_LEVEL } } #[doc = "Field `reg_gpio_4_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO4."] -pub struct REG_GPIO_4_INTERRUPT_TRIGGER_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_4_INTERRUPT_TRIGGER_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_4_INTERRUPT_TRIGGER_MODE_A) -> &'a mut W { - self.bits(variant.into()) - } +pub type REG_GPIO_4_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET1_SPEC, u8, GPIO4TRIGGER_MODE_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_4_INTERRUPT_TRIGGER_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn negative_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_4_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE) + self.variant(GPIO4TRIGGER_MODE_A::NEGATIVE_PULSE) } #[doc = "`1`"] #[inline(always)] pub fn positive_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_4_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE) + self.variant(GPIO4TRIGGER_MODE_A::POSITIVE_PULSE) } #[doc = "`10`"] #[inline(always)] pub fn negative_level(self) -> &'a mut W { - self.variant(REG_GPIO_4_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL) + self.variant(GPIO4TRIGGER_MODE_A::NEGATIVE_LEVEL) } #[doc = "`11`"] #[inline(always)] pub fn positive_level(self) -> &'a mut W { - self.variant(REG_GPIO_4_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 12)) | ((value as u32 & 0x03) << 12); - self.w + self.variant(GPIO4TRIGGER_MODE_A::POSITIVE_LEVEL) } } +#[doc = "Field `reg_gpio_4_interrupt_control_mode` reader - Interrupt control mode register for GPIO4."] +pub type REG_GPIO_4_INTERRUPT_CONTROL_MODE_R = crate::BitReader; #[doc = "Interrupt control mode register for GPIO4.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_4_INTERRUPT_CONTROL_MODE_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO4CONTROL_MODE_A { #[doc = "0: `0`"] SYNCHRONOUS = 0, #[doc = "1: `1`"] ASYNCHRONOUS = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_4_INTERRUPT_CONTROL_MODE_A) -> Self { + fn from(variant: GPIO4CONTROL_MODE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_4_interrupt_control_mode` reader - Interrupt control mode register for GPIO4."] -pub struct REG_GPIO_4_INTERRUPT_CONTROL_MODE_R( - crate::FieldReader, -); impl REG_GPIO_4_INTERRUPT_CONTROL_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_4_INTERRUPT_CONTROL_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_4_INTERRUPT_CONTROL_MODE_A { + pub fn variant(&self) -> GPIO4CONTROL_MODE_A { match self.bits { - false => REG_GPIO_4_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS, - true => REG_GPIO_4_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS, + false => GPIO4CONTROL_MODE_A::SYNCHRONOUS, + true => GPIO4CONTROL_MODE_A::ASYNCHRONOUS, } } #[doc = "Checks if the value of the field is `SYNCHRONOUS`"] #[inline(always)] pub fn is_synchronous(&self) -> bool { - **self == REG_GPIO_4_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS + *self == GPIO4CONTROL_MODE_A::SYNCHRONOUS } #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"] #[inline(always)] pub fn is_asynchronous(&self) -> bool { - **self == REG_GPIO_4_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS - } -} -impl core::ops::Deref for REG_GPIO_4_INTERRUPT_CONTROL_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO4CONTROL_MODE_A::ASYNCHRONOUS } } #[doc = "Field `reg_gpio_4_interrupt_control_mode` writer - Interrupt control mode register for GPIO4."] -pub struct REG_GPIO_4_INTERRUPT_CONTROL_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_4_INTERRUPT_CONTROL_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_4_INTERRUPT_CONTROL_MODE_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_4_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MODE_SET1_SPEC, GPIO4CONTROL_MODE_A, O>; +impl<'a, const O: u8> REG_GPIO_4_INTERRUPT_CONTROL_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn synchronous(self) -> &'a mut W { - self.variant(REG_GPIO_4_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS) + self.variant(GPIO4CONTROL_MODE_A::SYNCHRONOUS) } #[doc = "`1`"] #[inline(always)] pub fn asynchronous(self) -> &'a mut W { - self.variant(REG_GPIO_4_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14); - self.w + self.variant(GPIO4CONTROL_MODE_A::ASYNCHRONOUS) } } +#[doc = "Field `reg_gpio_5_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO5."] +pub type REG_GPIO_5_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader; #[doc = "Interrupt trigger mode register for GPIO5.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_5_INTERRUPT_TRIGGER_MODE_A { +pub enum GPIO5TRIGGER_MODE_A { #[doc = "0: `0`"] NEGATIVE_PULSE = 0, #[doc = "1: `1`"] @@ -985,185 +699,127 @@ pub enum REG_GPIO_5_INTERRUPT_TRIGGER_MODE_A { #[doc = "3: `11`"] POSITIVE_LEVEL = 3, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_5_INTERRUPT_TRIGGER_MODE_A) -> Self { + fn from(variant: GPIO5TRIGGER_MODE_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_5_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO5."] -pub struct REG_GPIO_5_INTERRUPT_TRIGGER_MODE_R( - crate::FieldReader, -); impl REG_GPIO_5_INTERRUPT_TRIGGER_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_5_INTERRUPT_TRIGGER_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_5_INTERRUPT_TRIGGER_MODE_A { + pub fn variant(&self) -> GPIO5TRIGGER_MODE_A { match self.bits { - 0 => REG_GPIO_5_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE, - 1 => REG_GPIO_5_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE, - 2 => REG_GPIO_5_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL, - 3 => REG_GPIO_5_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL, + 0 => GPIO5TRIGGER_MODE_A::NEGATIVE_PULSE, + 1 => GPIO5TRIGGER_MODE_A::POSITIVE_PULSE, + 2 => GPIO5TRIGGER_MODE_A::NEGATIVE_LEVEL, + 3 => GPIO5TRIGGER_MODE_A::POSITIVE_LEVEL, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"] #[inline(always)] pub fn is_negative_pulse(&self) -> bool { - **self == REG_GPIO_5_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE + *self == GPIO5TRIGGER_MODE_A::NEGATIVE_PULSE } #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"] #[inline(always)] pub fn is_positive_pulse(&self) -> bool { - **self == REG_GPIO_5_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE + *self == GPIO5TRIGGER_MODE_A::POSITIVE_PULSE } #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"] #[inline(always)] pub fn is_negative_level(&self) -> bool { - **self == REG_GPIO_5_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL + *self == GPIO5TRIGGER_MODE_A::NEGATIVE_LEVEL } #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"] #[inline(always)] pub fn is_positive_level(&self) -> bool { - **self == REG_GPIO_5_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL - } -} -impl core::ops::Deref for REG_GPIO_5_INTERRUPT_TRIGGER_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO5TRIGGER_MODE_A::POSITIVE_LEVEL } } #[doc = "Field `reg_gpio_5_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO5."] -pub struct REG_GPIO_5_INTERRUPT_TRIGGER_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_5_INTERRUPT_TRIGGER_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_5_INTERRUPT_TRIGGER_MODE_A) -> &'a mut W { - self.bits(variant.into()) - } +pub type REG_GPIO_5_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET1_SPEC, u8, GPIO5TRIGGER_MODE_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_5_INTERRUPT_TRIGGER_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn negative_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_5_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE) + self.variant(GPIO5TRIGGER_MODE_A::NEGATIVE_PULSE) } #[doc = "`1`"] #[inline(always)] pub fn positive_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_5_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE) + self.variant(GPIO5TRIGGER_MODE_A::POSITIVE_PULSE) } #[doc = "`10`"] #[inline(always)] pub fn negative_level(self) -> &'a mut W { - self.variant(REG_GPIO_5_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL) + self.variant(GPIO5TRIGGER_MODE_A::NEGATIVE_LEVEL) } #[doc = "`11`"] #[inline(always)] pub fn positive_level(self) -> &'a mut W { - self.variant(REG_GPIO_5_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 15)) | ((value as u32 & 0x03) << 15); - self.w + self.variant(GPIO5TRIGGER_MODE_A::POSITIVE_LEVEL) } } +#[doc = "Field `reg_gpio_5_interrupt_control_mode` reader - Interrupt control mode register for GPIO5."] +pub type REG_GPIO_5_INTERRUPT_CONTROL_MODE_R = crate::BitReader; #[doc = "Interrupt control mode register for GPIO5.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_5_INTERRUPT_CONTROL_MODE_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO5CONTROL_MODE_A { #[doc = "0: `0`"] SYNCHRONOUS = 0, #[doc = "1: `1`"] ASYNCHRONOUS = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_5_INTERRUPT_CONTROL_MODE_A) -> Self { + fn from(variant: GPIO5CONTROL_MODE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_5_interrupt_control_mode` reader - Interrupt control mode register for GPIO5."] -pub struct REG_GPIO_5_INTERRUPT_CONTROL_MODE_R( - crate::FieldReader, -); impl REG_GPIO_5_INTERRUPT_CONTROL_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_5_INTERRUPT_CONTROL_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_5_INTERRUPT_CONTROL_MODE_A { + pub fn variant(&self) -> GPIO5CONTROL_MODE_A { match self.bits { - false => REG_GPIO_5_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS, - true => REG_GPIO_5_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS, + false => GPIO5CONTROL_MODE_A::SYNCHRONOUS, + true => GPIO5CONTROL_MODE_A::ASYNCHRONOUS, } } #[doc = "Checks if the value of the field is `SYNCHRONOUS`"] #[inline(always)] pub fn is_synchronous(&self) -> bool { - **self == REG_GPIO_5_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS + *self == GPIO5CONTROL_MODE_A::SYNCHRONOUS } #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"] #[inline(always)] pub fn is_asynchronous(&self) -> bool { - **self == REG_GPIO_5_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS - } -} -impl core::ops::Deref for REG_GPIO_5_INTERRUPT_CONTROL_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO5CONTROL_MODE_A::ASYNCHRONOUS } } #[doc = "Field `reg_gpio_5_interrupt_control_mode` writer - Interrupt control mode register for GPIO5."] -pub struct REG_GPIO_5_INTERRUPT_CONTROL_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_5_INTERRUPT_CONTROL_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_5_INTERRUPT_CONTROL_MODE_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_5_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MODE_SET1_SPEC, GPIO5CONTROL_MODE_A, O>; +impl<'a, const O: u8> REG_GPIO_5_INTERRUPT_CONTROL_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn synchronous(self) -> &'a mut W { - self.variant(REG_GPIO_5_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS) + self.variant(GPIO5CONTROL_MODE_A::SYNCHRONOUS) } #[doc = "`1`"] #[inline(always)] pub fn asynchronous(self) -> &'a mut W { - self.variant(REG_GPIO_5_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w + self.variant(GPIO5CONTROL_MODE_A::ASYNCHRONOUS) } } +#[doc = "Field `reg_gpio_6_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO6."] +pub type REG_GPIO_6_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader; #[doc = "Interrupt trigger mode register for GPIO6.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_6_INTERRUPT_TRIGGER_MODE_A { +pub enum GPIO6TRIGGER_MODE_A { #[doc = "0: `0`"] NEGATIVE_PULSE = 0, #[doc = "1: `1`"] @@ -1173,185 +829,127 @@ pub enum REG_GPIO_6_INTERRUPT_TRIGGER_MODE_A { #[doc = "3: `11`"] POSITIVE_LEVEL = 3, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_6_INTERRUPT_TRIGGER_MODE_A) -> Self { + fn from(variant: GPIO6TRIGGER_MODE_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_6_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO6."] -pub struct REG_GPIO_6_INTERRUPT_TRIGGER_MODE_R( - crate::FieldReader, -); impl REG_GPIO_6_INTERRUPT_TRIGGER_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_6_INTERRUPT_TRIGGER_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_6_INTERRUPT_TRIGGER_MODE_A { + pub fn variant(&self) -> GPIO6TRIGGER_MODE_A { match self.bits { - 0 => REG_GPIO_6_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE, - 1 => REG_GPIO_6_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE, - 2 => REG_GPIO_6_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL, - 3 => REG_GPIO_6_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL, + 0 => GPIO6TRIGGER_MODE_A::NEGATIVE_PULSE, + 1 => GPIO6TRIGGER_MODE_A::POSITIVE_PULSE, + 2 => GPIO6TRIGGER_MODE_A::NEGATIVE_LEVEL, + 3 => GPIO6TRIGGER_MODE_A::POSITIVE_LEVEL, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"] #[inline(always)] pub fn is_negative_pulse(&self) -> bool { - **self == REG_GPIO_6_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE + *self == GPIO6TRIGGER_MODE_A::NEGATIVE_PULSE } #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"] #[inline(always)] pub fn is_positive_pulse(&self) -> bool { - **self == REG_GPIO_6_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE + *self == GPIO6TRIGGER_MODE_A::POSITIVE_PULSE } #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"] #[inline(always)] pub fn is_negative_level(&self) -> bool { - **self == REG_GPIO_6_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL + *self == GPIO6TRIGGER_MODE_A::NEGATIVE_LEVEL } #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"] #[inline(always)] pub fn is_positive_level(&self) -> bool { - **self == REG_GPIO_6_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL - } -} -impl core::ops::Deref for REG_GPIO_6_INTERRUPT_TRIGGER_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO6TRIGGER_MODE_A::POSITIVE_LEVEL } } #[doc = "Field `reg_gpio_6_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO6."] -pub struct REG_GPIO_6_INTERRUPT_TRIGGER_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_6_INTERRUPT_TRIGGER_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_6_INTERRUPT_TRIGGER_MODE_A) -> &'a mut W { - self.bits(variant.into()) - } +pub type REG_GPIO_6_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET1_SPEC, u8, GPIO6TRIGGER_MODE_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_6_INTERRUPT_TRIGGER_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn negative_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_6_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE) + self.variant(GPIO6TRIGGER_MODE_A::NEGATIVE_PULSE) } #[doc = "`1`"] #[inline(always)] pub fn positive_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_6_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE) + self.variant(GPIO6TRIGGER_MODE_A::POSITIVE_PULSE) } #[doc = "`10`"] #[inline(always)] pub fn negative_level(self) -> &'a mut W { - self.variant(REG_GPIO_6_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL) + self.variant(GPIO6TRIGGER_MODE_A::NEGATIVE_LEVEL) } #[doc = "`11`"] #[inline(always)] pub fn positive_level(self) -> &'a mut W { - self.variant(REG_GPIO_6_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 18)) | ((value as u32 & 0x03) << 18); - self.w + self.variant(GPIO6TRIGGER_MODE_A::POSITIVE_LEVEL) } } +#[doc = "Field `reg_gpio_6_interrupt_control_mode` reader - Interrupt control mode register for GPIO6."] +pub type REG_GPIO_6_INTERRUPT_CONTROL_MODE_R = crate::BitReader; #[doc = "Interrupt control mode register for GPIO6.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_6_INTERRUPT_CONTROL_MODE_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO6CONTROL_MODE_A { #[doc = "0: `0`"] SYNCHRONOUS = 0, #[doc = "1: `1`"] ASYNCHRONOUS = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_6_INTERRUPT_CONTROL_MODE_A) -> Self { + fn from(variant: GPIO6CONTROL_MODE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_6_interrupt_control_mode` reader - Interrupt control mode register for GPIO6."] -pub struct REG_GPIO_6_INTERRUPT_CONTROL_MODE_R( - crate::FieldReader, -); impl REG_GPIO_6_INTERRUPT_CONTROL_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_6_INTERRUPT_CONTROL_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_6_INTERRUPT_CONTROL_MODE_A { + pub fn variant(&self) -> GPIO6CONTROL_MODE_A { match self.bits { - false => REG_GPIO_6_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS, - true => REG_GPIO_6_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS, + false => GPIO6CONTROL_MODE_A::SYNCHRONOUS, + true => GPIO6CONTROL_MODE_A::ASYNCHRONOUS, } } #[doc = "Checks if the value of the field is `SYNCHRONOUS`"] #[inline(always)] pub fn is_synchronous(&self) -> bool { - **self == REG_GPIO_6_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS + *self == GPIO6CONTROL_MODE_A::SYNCHRONOUS } #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"] #[inline(always)] pub fn is_asynchronous(&self) -> bool { - **self == REG_GPIO_6_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS - } -} -impl core::ops::Deref for REG_GPIO_6_INTERRUPT_CONTROL_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO6CONTROL_MODE_A::ASYNCHRONOUS } } #[doc = "Field `reg_gpio_6_interrupt_control_mode` writer - Interrupt control mode register for GPIO6."] -pub struct REG_GPIO_6_INTERRUPT_CONTROL_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_6_INTERRUPT_CONTROL_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_6_INTERRUPT_CONTROL_MODE_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_6_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MODE_SET1_SPEC, GPIO6CONTROL_MODE_A, O>; +impl<'a, const O: u8> REG_GPIO_6_INTERRUPT_CONTROL_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn synchronous(self) -> &'a mut W { - self.variant(REG_GPIO_6_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS) + self.variant(GPIO6CONTROL_MODE_A::SYNCHRONOUS) } #[doc = "`1`"] #[inline(always)] pub fn asynchronous(self) -> &'a mut W { - self.variant(REG_GPIO_6_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w + self.variant(GPIO6CONTROL_MODE_A::ASYNCHRONOUS) } } +#[doc = "Field `reg_gpio_7_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO7."] +pub type REG_GPIO_7_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader; #[doc = "Interrupt trigger mode register for GPIO7.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_7_INTERRUPT_TRIGGER_MODE_A { +pub enum GPIO7TRIGGER_MODE_A { #[doc = "0: `0`"] NEGATIVE_PULSE = 0, #[doc = "1: `1`"] @@ -1361,185 +959,127 @@ pub enum REG_GPIO_7_INTERRUPT_TRIGGER_MODE_A { #[doc = "3: `11`"] POSITIVE_LEVEL = 3, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_7_INTERRUPT_TRIGGER_MODE_A) -> Self { + fn from(variant: GPIO7TRIGGER_MODE_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_7_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO7."] -pub struct REG_GPIO_7_INTERRUPT_TRIGGER_MODE_R( - crate::FieldReader, -); impl REG_GPIO_7_INTERRUPT_TRIGGER_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_7_INTERRUPT_TRIGGER_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_7_INTERRUPT_TRIGGER_MODE_A { + pub fn variant(&self) -> GPIO7TRIGGER_MODE_A { match self.bits { - 0 => REG_GPIO_7_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE, - 1 => REG_GPIO_7_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE, - 2 => REG_GPIO_7_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL, - 3 => REG_GPIO_7_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL, + 0 => GPIO7TRIGGER_MODE_A::NEGATIVE_PULSE, + 1 => GPIO7TRIGGER_MODE_A::POSITIVE_PULSE, + 2 => GPIO7TRIGGER_MODE_A::NEGATIVE_LEVEL, + 3 => GPIO7TRIGGER_MODE_A::POSITIVE_LEVEL, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"] #[inline(always)] pub fn is_negative_pulse(&self) -> bool { - **self == REG_GPIO_7_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE + *self == GPIO7TRIGGER_MODE_A::NEGATIVE_PULSE } #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"] #[inline(always)] pub fn is_positive_pulse(&self) -> bool { - **self == REG_GPIO_7_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE + *self == GPIO7TRIGGER_MODE_A::POSITIVE_PULSE } #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"] #[inline(always)] pub fn is_negative_level(&self) -> bool { - **self == REG_GPIO_7_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL + *self == GPIO7TRIGGER_MODE_A::NEGATIVE_LEVEL } #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"] #[inline(always)] pub fn is_positive_level(&self) -> bool { - **self == REG_GPIO_7_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL - } -} -impl core::ops::Deref for REG_GPIO_7_INTERRUPT_TRIGGER_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO7TRIGGER_MODE_A::POSITIVE_LEVEL } } #[doc = "Field `reg_gpio_7_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO7."] -pub struct REG_GPIO_7_INTERRUPT_TRIGGER_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_7_INTERRUPT_TRIGGER_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_7_INTERRUPT_TRIGGER_MODE_A) -> &'a mut W { - self.bits(variant.into()) - } +pub type REG_GPIO_7_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET1_SPEC, u8, GPIO7TRIGGER_MODE_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_7_INTERRUPT_TRIGGER_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn negative_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_7_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE) + self.variant(GPIO7TRIGGER_MODE_A::NEGATIVE_PULSE) } #[doc = "`1`"] #[inline(always)] pub fn positive_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_7_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE) + self.variant(GPIO7TRIGGER_MODE_A::POSITIVE_PULSE) } #[doc = "`10`"] #[inline(always)] pub fn negative_level(self) -> &'a mut W { - self.variant(REG_GPIO_7_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL) + self.variant(GPIO7TRIGGER_MODE_A::NEGATIVE_LEVEL) } #[doc = "`11`"] #[inline(always)] pub fn positive_level(self) -> &'a mut W { - self.variant(REG_GPIO_7_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 21)) | ((value as u32 & 0x03) << 21); - self.w + self.variant(GPIO7TRIGGER_MODE_A::POSITIVE_LEVEL) } } +#[doc = "Field `reg_gpio_7_interrupt_control_mode` reader - Interrupt control mode register for GPIO7."] +pub type REG_GPIO_7_INTERRUPT_CONTROL_MODE_R = crate::BitReader; #[doc = "Interrupt control mode register for GPIO7.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_7_INTERRUPT_CONTROL_MODE_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO7CONTROL_MODE_A { #[doc = "0: `0`"] SYNCHRONOUS = 0, #[doc = "1: `1`"] ASYNCHRONOUS = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_7_INTERRUPT_CONTROL_MODE_A) -> Self { + fn from(variant: GPIO7CONTROL_MODE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_7_interrupt_control_mode` reader - Interrupt control mode register for GPIO7."] -pub struct REG_GPIO_7_INTERRUPT_CONTROL_MODE_R( - crate::FieldReader, -); impl REG_GPIO_7_INTERRUPT_CONTROL_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_7_INTERRUPT_CONTROL_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_7_INTERRUPT_CONTROL_MODE_A { + pub fn variant(&self) -> GPIO7CONTROL_MODE_A { match self.bits { - false => REG_GPIO_7_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS, - true => REG_GPIO_7_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS, + false => GPIO7CONTROL_MODE_A::SYNCHRONOUS, + true => GPIO7CONTROL_MODE_A::ASYNCHRONOUS, } } #[doc = "Checks if the value of the field is `SYNCHRONOUS`"] #[inline(always)] pub fn is_synchronous(&self) -> bool { - **self == REG_GPIO_7_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS + *self == GPIO7CONTROL_MODE_A::SYNCHRONOUS } #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"] #[inline(always)] pub fn is_asynchronous(&self) -> bool { - **self == REG_GPIO_7_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS - } -} -impl core::ops::Deref for REG_GPIO_7_INTERRUPT_CONTROL_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO7CONTROL_MODE_A::ASYNCHRONOUS } } #[doc = "Field `reg_gpio_7_interrupt_control_mode` writer - Interrupt control mode register for GPIO7."] -pub struct REG_GPIO_7_INTERRUPT_CONTROL_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_7_INTERRUPT_CONTROL_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_7_INTERRUPT_CONTROL_MODE_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_7_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MODE_SET1_SPEC, GPIO7CONTROL_MODE_A, O>; +impl<'a, const O: u8> REG_GPIO_7_INTERRUPT_CONTROL_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn synchronous(self) -> &'a mut W { - self.variant(REG_GPIO_7_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS) + self.variant(GPIO7CONTROL_MODE_A::SYNCHRONOUS) } #[doc = "`1`"] #[inline(always)] pub fn asynchronous(self) -> &'a mut W { - self.variant(REG_GPIO_7_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23); - self.w + self.variant(GPIO7CONTROL_MODE_A::ASYNCHRONOUS) } } +#[doc = "Field `reg_gpio_8_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO8."] +pub type REG_GPIO_8_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader; #[doc = "Interrupt trigger mode register for GPIO8.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_8_INTERRUPT_TRIGGER_MODE_A { +pub enum GPIO8TRIGGER_MODE_A { #[doc = "0: `0`"] NEGATIVE_PULSE = 0, #[doc = "1: `1`"] @@ -1549,185 +1089,127 @@ pub enum REG_GPIO_8_INTERRUPT_TRIGGER_MODE_A { #[doc = "3: `11`"] POSITIVE_LEVEL = 3, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_8_INTERRUPT_TRIGGER_MODE_A) -> Self { + fn from(variant: GPIO8TRIGGER_MODE_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_8_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO8."] -pub struct REG_GPIO_8_INTERRUPT_TRIGGER_MODE_R( - crate::FieldReader, -); impl REG_GPIO_8_INTERRUPT_TRIGGER_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_8_INTERRUPT_TRIGGER_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_8_INTERRUPT_TRIGGER_MODE_A { + pub fn variant(&self) -> GPIO8TRIGGER_MODE_A { match self.bits { - 0 => REG_GPIO_8_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE, - 1 => REG_GPIO_8_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE, - 2 => REG_GPIO_8_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL, - 3 => REG_GPIO_8_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL, + 0 => GPIO8TRIGGER_MODE_A::NEGATIVE_PULSE, + 1 => GPIO8TRIGGER_MODE_A::POSITIVE_PULSE, + 2 => GPIO8TRIGGER_MODE_A::NEGATIVE_LEVEL, + 3 => GPIO8TRIGGER_MODE_A::POSITIVE_LEVEL, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"] #[inline(always)] pub fn is_negative_pulse(&self) -> bool { - **self == REG_GPIO_8_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE + *self == GPIO8TRIGGER_MODE_A::NEGATIVE_PULSE } #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"] #[inline(always)] pub fn is_positive_pulse(&self) -> bool { - **self == REG_GPIO_8_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE + *self == GPIO8TRIGGER_MODE_A::POSITIVE_PULSE } #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"] #[inline(always)] pub fn is_negative_level(&self) -> bool { - **self == REG_GPIO_8_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL + *self == GPIO8TRIGGER_MODE_A::NEGATIVE_LEVEL } #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"] #[inline(always)] pub fn is_positive_level(&self) -> bool { - **self == REG_GPIO_8_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL - } -} -impl core::ops::Deref for REG_GPIO_8_INTERRUPT_TRIGGER_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO8TRIGGER_MODE_A::POSITIVE_LEVEL } } #[doc = "Field `reg_gpio_8_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO8."] -pub struct REG_GPIO_8_INTERRUPT_TRIGGER_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_8_INTERRUPT_TRIGGER_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_8_INTERRUPT_TRIGGER_MODE_A) -> &'a mut W { - self.bits(variant.into()) - } +pub type REG_GPIO_8_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET1_SPEC, u8, GPIO8TRIGGER_MODE_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_8_INTERRUPT_TRIGGER_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn negative_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_8_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE) + self.variant(GPIO8TRIGGER_MODE_A::NEGATIVE_PULSE) } #[doc = "`1`"] #[inline(always)] pub fn positive_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_8_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE) + self.variant(GPIO8TRIGGER_MODE_A::POSITIVE_PULSE) } #[doc = "`10`"] #[inline(always)] pub fn negative_level(self) -> &'a mut W { - self.variant(REG_GPIO_8_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL) + self.variant(GPIO8TRIGGER_MODE_A::NEGATIVE_LEVEL) } #[doc = "`11`"] #[inline(always)] pub fn positive_level(self) -> &'a mut W { - self.variant(REG_GPIO_8_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 24)) | ((value as u32 & 0x03) << 24); - self.w + self.variant(GPIO8TRIGGER_MODE_A::POSITIVE_LEVEL) } } +#[doc = "Field `reg_gpio_8_interrupt_control_mode` reader - Interrupt control mode register for GPIO8."] +pub type REG_GPIO_8_INTERRUPT_CONTROL_MODE_R = crate::BitReader; #[doc = "Interrupt control mode register for GPIO8.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_8_INTERRUPT_CONTROL_MODE_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO8CONTROL_MODE_A { #[doc = "0: `0`"] SYNCHRONOUS = 0, #[doc = "1: `1`"] ASYNCHRONOUS = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_8_INTERRUPT_CONTROL_MODE_A) -> Self { + fn from(variant: GPIO8CONTROL_MODE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_8_interrupt_control_mode` reader - Interrupt control mode register for GPIO8."] -pub struct REG_GPIO_8_INTERRUPT_CONTROL_MODE_R( - crate::FieldReader, -); impl REG_GPIO_8_INTERRUPT_CONTROL_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_8_INTERRUPT_CONTROL_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_8_INTERRUPT_CONTROL_MODE_A { + pub fn variant(&self) -> GPIO8CONTROL_MODE_A { match self.bits { - false => REG_GPIO_8_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS, - true => REG_GPIO_8_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS, + false => GPIO8CONTROL_MODE_A::SYNCHRONOUS, + true => GPIO8CONTROL_MODE_A::ASYNCHRONOUS, } } #[doc = "Checks if the value of the field is `SYNCHRONOUS`"] #[inline(always)] pub fn is_synchronous(&self) -> bool { - **self == REG_GPIO_8_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS + *self == GPIO8CONTROL_MODE_A::SYNCHRONOUS } #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"] #[inline(always)] pub fn is_asynchronous(&self) -> bool { - **self == REG_GPIO_8_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS - } -} -impl core::ops::Deref for REG_GPIO_8_INTERRUPT_CONTROL_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO8CONTROL_MODE_A::ASYNCHRONOUS } } #[doc = "Field `reg_gpio_8_interrupt_control_mode` writer - Interrupt control mode register for GPIO8."] -pub struct REG_GPIO_8_INTERRUPT_CONTROL_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_8_INTERRUPT_CONTROL_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_8_INTERRUPT_CONTROL_MODE_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_8_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MODE_SET1_SPEC, GPIO8CONTROL_MODE_A, O>; +impl<'a, const O: u8> REG_GPIO_8_INTERRUPT_CONTROL_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn synchronous(self) -> &'a mut W { - self.variant(REG_GPIO_8_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS) + self.variant(GPIO8CONTROL_MODE_A::SYNCHRONOUS) } #[doc = "`1`"] #[inline(always)] pub fn asynchronous(self) -> &'a mut W { - self.variant(REG_GPIO_8_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 26)) | ((value as u32 & 0x01) << 26); - self.w + self.variant(GPIO8CONTROL_MODE_A::ASYNCHRONOUS) } } +#[doc = "Field `reg_gpio_9_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO9."] +pub type REG_GPIO_9_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader; #[doc = "Interrupt trigger mode register for GPIO9.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_9_INTERRUPT_TRIGGER_MODE_A { +pub enum GPIO9TRIGGER_MODE_A { #[doc = "0: `0`"] NEGATIVE_PULSE = 0, #[doc = "1: `1`"] @@ -1737,385 +1219,346 @@ pub enum REG_GPIO_9_INTERRUPT_TRIGGER_MODE_A { #[doc = "3: `11`"] POSITIVE_LEVEL = 3, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_9_INTERRUPT_TRIGGER_MODE_A) -> Self { + fn from(variant: GPIO9TRIGGER_MODE_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_9_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO9."] -pub struct REG_GPIO_9_INTERRUPT_TRIGGER_MODE_R( - crate::FieldReader, -); impl REG_GPIO_9_INTERRUPT_TRIGGER_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_9_INTERRUPT_TRIGGER_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_9_INTERRUPT_TRIGGER_MODE_A { + pub fn variant(&self) -> GPIO9TRIGGER_MODE_A { match self.bits { - 0 => REG_GPIO_9_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE, - 1 => REG_GPIO_9_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE, - 2 => REG_GPIO_9_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL, - 3 => REG_GPIO_9_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL, + 0 => GPIO9TRIGGER_MODE_A::NEGATIVE_PULSE, + 1 => GPIO9TRIGGER_MODE_A::POSITIVE_PULSE, + 2 => GPIO9TRIGGER_MODE_A::NEGATIVE_LEVEL, + 3 => GPIO9TRIGGER_MODE_A::POSITIVE_LEVEL, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"] #[inline(always)] pub fn is_negative_pulse(&self) -> bool { - **self == REG_GPIO_9_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE + *self == GPIO9TRIGGER_MODE_A::NEGATIVE_PULSE } #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"] #[inline(always)] pub fn is_positive_pulse(&self) -> bool { - **self == REG_GPIO_9_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE + *self == GPIO9TRIGGER_MODE_A::POSITIVE_PULSE } #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"] #[inline(always)] pub fn is_negative_level(&self) -> bool { - **self == REG_GPIO_9_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL + *self == GPIO9TRIGGER_MODE_A::NEGATIVE_LEVEL } #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"] #[inline(always)] pub fn is_positive_level(&self) -> bool { - **self == REG_GPIO_9_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL - } -} -impl core::ops::Deref for REG_GPIO_9_INTERRUPT_TRIGGER_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO9TRIGGER_MODE_A::POSITIVE_LEVEL } } #[doc = "Field `reg_gpio_9_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO9."] -pub struct REG_GPIO_9_INTERRUPT_TRIGGER_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_9_INTERRUPT_TRIGGER_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_9_INTERRUPT_TRIGGER_MODE_A) -> &'a mut W { - self.bits(variant.into()) - } +pub type REG_GPIO_9_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET1_SPEC, u8, GPIO9TRIGGER_MODE_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_9_INTERRUPT_TRIGGER_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn negative_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_9_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE) + self.variant(GPIO9TRIGGER_MODE_A::NEGATIVE_PULSE) } #[doc = "`1`"] #[inline(always)] pub fn positive_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_9_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE) + self.variant(GPIO9TRIGGER_MODE_A::POSITIVE_PULSE) } #[doc = "`10`"] #[inline(always)] pub fn negative_level(self) -> &'a mut W { - self.variant(REG_GPIO_9_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL) + self.variant(GPIO9TRIGGER_MODE_A::NEGATIVE_LEVEL) } #[doc = "`11`"] #[inline(always)] pub fn positive_level(self) -> &'a mut W { - self.variant(REG_GPIO_9_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 27)) | ((value as u32 & 0x03) << 27); - self.w + self.variant(GPIO9TRIGGER_MODE_A::POSITIVE_LEVEL) } } +#[doc = "Field `reg_gpio_9_interrupt_control_mode` reader - Interrupt control mode register for GPIO9."] +pub type REG_GPIO_9_INTERRUPT_CONTROL_MODE_R = crate::BitReader; #[doc = "Interrupt control mode register for GPIO9.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_9_INTERRUPT_CONTROL_MODE_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO9CONTROL_MODE_A { #[doc = "0: `0`"] SYNCHRONOUS = 0, #[doc = "1: `1`"] ASYNCHRONOUS = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_9_INTERRUPT_CONTROL_MODE_A) -> Self { + fn from(variant: GPIO9CONTROL_MODE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_9_interrupt_control_mode` reader - Interrupt control mode register for GPIO9."] -pub struct REG_GPIO_9_INTERRUPT_CONTROL_MODE_R( - crate::FieldReader, -); impl REG_GPIO_9_INTERRUPT_CONTROL_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_9_INTERRUPT_CONTROL_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_9_INTERRUPT_CONTROL_MODE_A { + pub fn variant(&self) -> GPIO9CONTROL_MODE_A { match self.bits { - false => REG_GPIO_9_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS, - true => REG_GPIO_9_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS, + false => GPIO9CONTROL_MODE_A::SYNCHRONOUS, + true => GPIO9CONTROL_MODE_A::ASYNCHRONOUS, } } #[doc = "Checks if the value of the field is `SYNCHRONOUS`"] #[inline(always)] pub fn is_synchronous(&self) -> bool { - **self == REG_GPIO_9_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS + *self == GPIO9CONTROL_MODE_A::SYNCHRONOUS } #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"] #[inline(always)] pub fn is_asynchronous(&self) -> bool { - **self == REG_GPIO_9_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS - } -} -impl core::ops::Deref for REG_GPIO_9_INTERRUPT_CONTROL_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO9CONTROL_MODE_A::ASYNCHRONOUS } } #[doc = "Field `reg_gpio_9_interrupt_control_mode` writer - Interrupt control mode register for GPIO9."] -pub struct REG_GPIO_9_INTERRUPT_CONTROL_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_9_INTERRUPT_CONTROL_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_9_INTERRUPT_CONTROL_MODE_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_9_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MODE_SET1_SPEC, GPIO9CONTROL_MODE_A, O>; +impl<'a, const O: u8> REG_GPIO_9_INTERRUPT_CONTROL_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn synchronous(self) -> &'a mut W { - self.variant(REG_GPIO_9_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS) + self.variant(GPIO9CONTROL_MODE_A::SYNCHRONOUS) } #[doc = "`1`"] #[inline(always)] pub fn asynchronous(self) -> &'a mut W { - self.variant(REG_GPIO_9_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 29)) | ((value as u32 & 0x01) << 29); - self.w + self.variant(GPIO9CONTROL_MODE_A::ASYNCHRONOUS) } } impl R { #[doc = "Bits 0:1 - Interrupt trigger mode register for GPIO0."] #[inline(always)] pub fn reg_gpio_0_interrupt_trigger_mode(&self) -> REG_GPIO_0_INTERRUPT_TRIGGER_MODE_R { - REG_GPIO_0_INTERRUPT_TRIGGER_MODE_R::new((self.bits & 0x03) as u8) + REG_GPIO_0_INTERRUPT_TRIGGER_MODE_R::new((self.bits & 3) as u8) } #[doc = "Bit 2 - Interrupt control mode register for GPIO0."] #[inline(always)] pub fn reg_gpio_0_interrupt_control_mode(&self) -> REG_GPIO_0_INTERRUPT_CONTROL_MODE_R { - REG_GPIO_0_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 2) & 0x01) != 0) + REG_GPIO_0_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 2) & 1) != 0) } #[doc = "Bits 3:4 - Interrupt trigger mode register for GPIO1."] #[inline(always)] pub fn reg_gpio_1_interrupt_trigger_mode(&self) -> REG_GPIO_1_INTERRUPT_TRIGGER_MODE_R { - REG_GPIO_1_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 3) & 0x03) as u8) + REG_GPIO_1_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 3) & 3) as u8) } #[doc = "Bit 5 - Interrupt control mode register for GPIO1."] #[inline(always)] pub fn reg_gpio_1_interrupt_control_mode(&self) -> REG_GPIO_1_INTERRUPT_CONTROL_MODE_R { - REG_GPIO_1_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 5) & 0x01) != 0) + REG_GPIO_1_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 5) & 1) != 0) } #[doc = "Bits 6:7 - Interrupt trigger mode register for GPIO2."] #[inline(always)] pub fn reg_gpio_2_interrupt_trigger_mode(&self) -> REG_GPIO_2_INTERRUPT_TRIGGER_MODE_R { - REG_GPIO_2_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 6) & 0x03) as u8) + REG_GPIO_2_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 6) & 3) as u8) } #[doc = "Bit 8 - Interrupt control mode register for GPIO2."] #[inline(always)] pub fn reg_gpio_2_interrupt_control_mode(&self) -> REG_GPIO_2_INTERRUPT_CONTROL_MODE_R { - REG_GPIO_2_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 8) & 0x01) != 0) + REG_GPIO_2_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 8) & 1) != 0) } #[doc = "Bits 9:10 - Interrupt trigger mode register for GPIO3."] #[inline(always)] pub fn reg_gpio_3_interrupt_trigger_mode(&self) -> REG_GPIO_3_INTERRUPT_TRIGGER_MODE_R { - REG_GPIO_3_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 9) & 0x03) as u8) + REG_GPIO_3_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 9) & 3) as u8) } #[doc = "Bit 11 - Interrupt control mode register for GPIO3."] #[inline(always)] pub fn reg_gpio_3_interrupt_control_mode(&self) -> REG_GPIO_3_INTERRUPT_CONTROL_MODE_R { - REG_GPIO_3_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 11) & 0x01) != 0) + REG_GPIO_3_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 11) & 1) != 0) } #[doc = "Bits 12:13 - Interrupt trigger mode register for GPIO4."] #[inline(always)] pub fn reg_gpio_4_interrupt_trigger_mode(&self) -> REG_GPIO_4_INTERRUPT_TRIGGER_MODE_R { - REG_GPIO_4_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 12) & 0x03) as u8) + REG_GPIO_4_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 12) & 3) as u8) } #[doc = "Bit 14 - Interrupt control mode register for GPIO4."] #[inline(always)] pub fn reg_gpio_4_interrupt_control_mode(&self) -> REG_GPIO_4_INTERRUPT_CONTROL_MODE_R { - REG_GPIO_4_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 14) & 0x01) != 0) + REG_GPIO_4_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 14) & 1) != 0) } #[doc = "Bits 15:16 - Interrupt trigger mode register for GPIO5."] #[inline(always)] pub fn reg_gpio_5_interrupt_trigger_mode(&self) -> REG_GPIO_5_INTERRUPT_TRIGGER_MODE_R { - REG_GPIO_5_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 15) & 0x03) as u8) + REG_GPIO_5_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 15) & 3) as u8) } #[doc = "Bit 17 - Interrupt control mode register for GPIO5."] #[inline(always)] pub fn reg_gpio_5_interrupt_control_mode(&self) -> REG_GPIO_5_INTERRUPT_CONTROL_MODE_R { - REG_GPIO_5_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 17) & 0x01) != 0) + REG_GPIO_5_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 17) & 1) != 0) } #[doc = "Bits 18:19 - Interrupt trigger mode register for GPIO6."] #[inline(always)] pub fn reg_gpio_6_interrupt_trigger_mode(&self) -> REG_GPIO_6_INTERRUPT_TRIGGER_MODE_R { - REG_GPIO_6_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 18) & 0x03) as u8) + REG_GPIO_6_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 18) & 3) as u8) } #[doc = "Bit 20 - Interrupt control mode register for GPIO6."] #[inline(always)] pub fn reg_gpio_6_interrupt_control_mode(&self) -> REG_GPIO_6_INTERRUPT_CONTROL_MODE_R { - REG_GPIO_6_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 20) & 0x01) != 0) + REG_GPIO_6_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 20) & 1) != 0) } #[doc = "Bits 21:22 - Interrupt trigger mode register for GPIO7."] #[inline(always)] pub fn reg_gpio_7_interrupt_trigger_mode(&self) -> REG_GPIO_7_INTERRUPT_TRIGGER_MODE_R { - REG_GPIO_7_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 21) & 0x03) as u8) + REG_GPIO_7_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 21) & 3) as u8) } #[doc = "Bit 23 - Interrupt control mode register for GPIO7."] #[inline(always)] pub fn reg_gpio_7_interrupt_control_mode(&self) -> REG_GPIO_7_INTERRUPT_CONTROL_MODE_R { - REG_GPIO_7_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 23) & 0x01) != 0) + REG_GPIO_7_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 23) & 1) != 0) } #[doc = "Bits 24:25 - Interrupt trigger mode register for GPIO8."] #[inline(always)] pub fn reg_gpio_8_interrupt_trigger_mode(&self) -> REG_GPIO_8_INTERRUPT_TRIGGER_MODE_R { - REG_GPIO_8_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 24) & 0x03) as u8) + REG_GPIO_8_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 24) & 3) as u8) } #[doc = "Bit 26 - Interrupt control mode register for GPIO8."] #[inline(always)] pub fn reg_gpio_8_interrupt_control_mode(&self) -> REG_GPIO_8_INTERRUPT_CONTROL_MODE_R { - REG_GPIO_8_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 26) & 0x01) != 0) + REG_GPIO_8_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 26) & 1) != 0) } #[doc = "Bits 27:28 - Interrupt trigger mode register for GPIO9."] #[inline(always)] pub fn reg_gpio_9_interrupt_trigger_mode(&self) -> REG_GPIO_9_INTERRUPT_TRIGGER_MODE_R { - REG_GPIO_9_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 27) & 0x03) as u8) + REG_GPIO_9_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 27) & 3) as u8) } #[doc = "Bit 29 - Interrupt control mode register for GPIO9."] #[inline(always)] pub fn reg_gpio_9_interrupt_control_mode(&self) -> REG_GPIO_9_INTERRUPT_CONTROL_MODE_R { - REG_GPIO_9_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 29) & 0x01) != 0) + REG_GPIO_9_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 29) & 1) != 0) } } impl W { #[doc = "Bits 0:1 - Interrupt trigger mode register for GPIO0."] #[inline(always)] - pub fn reg_gpio_0_interrupt_trigger_mode(&mut self) -> REG_GPIO_0_INTERRUPT_TRIGGER_MODE_W { - REG_GPIO_0_INTERRUPT_TRIGGER_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_0_interrupt_trigger_mode(&mut self) -> REG_GPIO_0_INTERRUPT_TRIGGER_MODE_W<0> { + REG_GPIO_0_INTERRUPT_TRIGGER_MODE_W::new(self) } #[doc = "Bit 2 - Interrupt control mode register for GPIO0."] #[inline(always)] - pub fn reg_gpio_0_interrupt_control_mode(&mut self) -> REG_GPIO_0_INTERRUPT_CONTROL_MODE_W { - REG_GPIO_0_INTERRUPT_CONTROL_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_0_interrupt_control_mode(&mut self) -> REG_GPIO_0_INTERRUPT_CONTROL_MODE_W<2> { + REG_GPIO_0_INTERRUPT_CONTROL_MODE_W::new(self) } #[doc = "Bits 3:4 - Interrupt trigger mode register for GPIO1."] #[inline(always)] - pub fn reg_gpio_1_interrupt_trigger_mode(&mut self) -> REG_GPIO_1_INTERRUPT_TRIGGER_MODE_W { - REG_GPIO_1_INTERRUPT_TRIGGER_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_1_interrupt_trigger_mode(&mut self) -> REG_GPIO_1_INTERRUPT_TRIGGER_MODE_W<3> { + REG_GPIO_1_INTERRUPT_TRIGGER_MODE_W::new(self) } #[doc = "Bit 5 - Interrupt control mode register for GPIO1."] #[inline(always)] - pub fn reg_gpio_1_interrupt_control_mode(&mut self) -> REG_GPIO_1_INTERRUPT_CONTROL_MODE_W { - REG_GPIO_1_INTERRUPT_CONTROL_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_1_interrupt_control_mode(&mut self) -> REG_GPIO_1_INTERRUPT_CONTROL_MODE_W<5> { + REG_GPIO_1_INTERRUPT_CONTROL_MODE_W::new(self) } #[doc = "Bits 6:7 - Interrupt trigger mode register for GPIO2."] #[inline(always)] - pub fn reg_gpio_2_interrupt_trigger_mode(&mut self) -> REG_GPIO_2_INTERRUPT_TRIGGER_MODE_W { - REG_GPIO_2_INTERRUPT_TRIGGER_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_2_interrupt_trigger_mode(&mut self) -> REG_GPIO_2_INTERRUPT_TRIGGER_MODE_W<6> { + REG_GPIO_2_INTERRUPT_TRIGGER_MODE_W::new(self) } #[doc = "Bit 8 - Interrupt control mode register for GPIO2."] #[inline(always)] - pub fn reg_gpio_2_interrupt_control_mode(&mut self) -> REG_GPIO_2_INTERRUPT_CONTROL_MODE_W { - REG_GPIO_2_INTERRUPT_CONTROL_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_2_interrupt_control_mode(&mut self) -> REG_GPIO_2_INTERRUPT_CONTROL_MODE_W<8> { + REG_GPIO_2_INTERRUPT_CONTROL_MODE_W::new(self) } #[doc = "Bits 9:10 - Interrupt trigger mode register for GPIO3."] #[inline(always)] - pub fn reg_gpio_3_interrupt_trigger_mode(&mut self) -> REG_GPIO_3_INTERRUPT_TRIGGER_MODE_W { - REG_GPIO_3_INTERRUPT_TRIGGER_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_3_interrupt_trigger_mode(&mut self) -> REG_GPIO_3_INTERRUPT_TRIGGER_MODE_W<9> { + REG_GPIO_3_INTERRUPT_TRIGGER_MODE_W::new(self) } #[doc = "Bit 11 - Interrupt control mode register for GPIO3."] #[inline(always)] - pub fn reg_gpio_3_interrupt_control_mode(&mut self) -> REG_GPIO_3_INTERRUPT_CONTROL_MODE_W { - REG_GPIO_3_INTERRUPT_CONTROL_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_3_interrupt_control_mode(&mut self) -> REG_GPIO_3_INTERRUPT_CONTROL_MODE_W<11> { + REG_GPIO_3_INTERRUPT_CONTROL_MODE_W::new(self) } #[doc = "Bits 12:13 - Interrupt trigger mode register for GPIO4."] #[inline(always)] - pub fn reg_gpio_4_interrupt_trigger_mode(&mut self) -> REG_GPIO_4_INTERRUPT_TRIGGER_MODE_W { - REG_GPIO_4_INTERRUPT_TRIGGER_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_4_interrupt_trigger_mode(&mut self) -> REG_GPIO_4_INTERRUPT_TRIGGER_MODE_W<12> { + REG_GPIO_4_INTERRUPT_TRIGGER_MODE_W::new(self) } #[doc = "Bit 14 - Interrupt control mode register for GPIO4."] #[inline(always)] - pub fn reg_gpio_4_interrupt_control_mode(&mut self) -> REG_GPIO_4_INTERRUPT_CONTROL_MODE_W { - REG_GPIO_4_INTERRUPT_CONTROL_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_4_interrupt_control_mode(&mut self) -> REG_GPIO_4_INTERRUPT_CONTROL_MODE_W<14> { + REG_GPIO_4_INTERRUPT_CONTROL_MODE_W::new(self) } #[doc = "Bits 15:16 - Interrupt trigger mode register for GPIO5."] #[inline(always)] - pub fn reg_gpio_5_interrupt_trigger_mode(&mut self) -> REG_GPIO_5_INTERRUPT_TRIGGER_MODE_W { - REG_GPIO_5_INTERRUPT_TRIGGER_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_5_interrupt_trigger_mode(&mut self) -> REG_GPIO_5_INTERRUPT_TRIGGER_MODE_W<15> { + REG_GPIO_5_INTERRUPT_TRIGGER_MODE_W::new(self) } #[doc = "Bit 17 - Interrupt control mode register for GPIO5."] #[inline(always)] - pub fn reg_gpio_5_interrupt_control_mode(&mut self) -> REG_GPIO_5_INTERRUPT_CONTROL_MODE_W { - REG_GPIO_5_INTERRUPT_CONTROL_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_5_interrupt_control_mode(&mut self) -> REG_GPIO_5_INTERRUPT_CONTROL_MODE_W<17> { + REG_GPIO_5_INTERRUPT_CONTROL_MODE_W::new(self) } #[doc = "Bits 18:19 - Interrupt trigger mode register for GPIO6."] #[inline(always)] - pub fn reg_gpio_6_interrupt_trigger_mode(&mut self) -> REG_GPIO_6_INTERRUPT_TRIGGER_MODE_W { - REG_GPIO_6_INTERRUPT_TRIGGER_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_6_interrupt_trigger_mode(&mut self) -> REG_GPIO_6_INTERRUPT_TRIGGER_MODE_W<18> { + REG_GPIO_6_INTERRUPT_TRIGGER_MODE_W::new(self) } #[doc = "Bit 20 - Interrupt control mode register for GPIO6."] #[inline(always)] - pub fn reg_gpio_6_interrupt_control_mode(&mut self) -> REG_GPIO_6_INTERRUPT_CONTROL_MODE_W { - REG_GPIO_6_INTERRUPT_CONTROL_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_6_interrupt_control_mode(&mut self) -> REG_GPIO_6_INTERRUPT_CONTROL_MODE_W<20> { + REG_GPIO_6_INTERRUPT_CONTROL_MODE_W::new(self) } #[doc = "Bits 21:22 - Interrupt trigger mode register for GPIO7."] #[inline(always)] - pub fn reg_gpio_7_interrupt_trigger_mode(&mut self) -> REG_GPIO_7_INTERRUPT_TRIGGER_MODE_W { - REG_GPIO_7_INTERRUPT_TRIGGER_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_7_interrupt_trigger_mode(&mut self) -> REG_GPIO_7_INTERRUPT_TRIGGER_MODE_W<21> { + REG_GPIO_7_INTERRUPT_TRIGGER_MODE_W::new(self) } #[doc = "Bit 23 - Interrupt control mode register for GPIO7."] #[inline(always)] - pub fn reg_gpio_7_interrupt_control_mode(&mut self) -> REG_GPIO_7_INTERRUPT_CONTROL_MODE_W { - REG_GPIO_7_INTERRUPT_CONTROL_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_7_interrupt_control_mode(&mut self) -> REG_GPIO_7_INTERRUPT_CONTROL_MODE_W<23> { + REG_GPIO_7_INTERRUPT_CONTROL_MODE_W::new(self) } #[doc = "Bits 24:25 - Interrupt trigger mode register for GPIO8."] #[inline(always)] - pub fn reg_gpio_8_interrupt_trigger_mode(&mut self) -> REG_GPIO_8_INTERRUPT_TRIGGER_MODE_W { - REG_GPIO_8_INTERRUPT_TRIGGER_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_8_interrupt_trigger_mode(&mut self) -> REG_GPIO_8_INTERRUPT_TRIGGER_MODE_W<24> { + REG_GPIO_8_INTERRUPT_TRIGGER_MODE_W::new(self) } #[doc = "Bit 26 - Interrupt control mode register for GPIO8."] #[inline(always)] - pub fn reg_gpio_8_interrupt_control_mode(&mut self) -> REG_GPIO_8_INTERRUPT_CONTROL_MODE_W { - REG_GPIO_8_INTERRUPT_CONTROL_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_8_interrupt_control_mode(&mut self) -> REG_GPIO_8_INTERRUPT_CONTROL_MODE_W<26> { + REG_GPIO_8_INTERRUPT_CONTROL_MODE_W::new(self) } #[doc = "Bits 27:28 - Interrupt trigger mode register for GPIO9."] #[inline(always)] - pub fn reg_gpio_9_interrupt_trigger_mode(&mut self) -> REG_GPIO_9_INTERRUPT_TRIGGER_MODE_W { - REG_GPIO_9_INTERRUPT_TRIGGER_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_9_interrupt_trigger_mode(&mut self) -> REG_GPIO_9_INTERRUPT_TRIGGER_MODE_W<27> { + REG_GPIO_9_INTERRUPT_TRIGGER_MODE_W::new(self) } #[doc = "Bit 29 - Interrupt control mode register for GPIO9."] #[inline(always)] - pub fn reg_gpio_9_interrupt_control_mode(&mut self) -> REG_GPIO_9_INTERRUPT_CONTROL_MODE_W { - REG_GPIO_9_INTERRUPT_CONTROL_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_9_interrupt_control_mode(&mut self) -> REG_GPIO_9_INTERRUPT_CONTROL_MODE_W<29> { + REG_GPIO_9_INTERRUPT_CONTROL_MODE_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -2133,11 +1576,10 @@ impl crate::Readable for GPIO_INT_MODE_SET1_SPEC { #[doc = "`write(|w| ..)` method takes [gpio_int_mode_set1::W](W) writer structure"] impl crate::Writable for GPIO_INT_MODE_SET1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets GPIO_INT_MODE_SET1 to value 0"] impl crate::Resettable for GPIO_INT_MODE_SET1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/gpio_int_mode_set2.rs b/src/glb/gpio_int_mode_set2.rs index e48f664..741d401 100644 --- a/src/glb/gpio_int_mode_set2.rs +++ b/src/glb/gpio_int_mode_set2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,15 +28,18 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } +#[doc = "Field `reg_gpio_10_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO10."] +pub type REG_GPIO_10_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader; #[doc = "Interrupt trigger mode register for GPIO10.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_10_INTERRUPT_TRIGGER_MODE_A { +pub enum GPIO10TRIGGER_MODE_A { #[doc = "0: `0`"] NEGATIVE_PULSE = 0, #[doc = "1: `1`"] @@ -45,185 +49,127 @@ pub enum REG_GPIO_10_INTERRUPT_TRIGGER_MODE_A { #[doc = "3: `11`"] POSITIVE_LEVEL = 3, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_10_INTERRUPT_TRIGGER_MODE_A) -> Self { + fn from(variant: GPIO10TRIGGER_MODE_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_10_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO10."] -pub struct REG_GPIO_10_INTERRUPT_TRIGGER_MODE_R( - crate::FieldReader, -); impl REG_GPIO_10_INTERRUPT_TRIGGER_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_10_INTERRUPT_TRIGGER_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_10_INTERRUPT_TRIGGER_MODE_A { + pub fn variant(&self) -> GPIO10TRIGGER_MODE_A { match self.bits { - 0 => REG_GPIO_10_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE, - 1 => REG_GPIO_10_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE, - 2 => REG_GPIO_10_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL, - 3 => REG_GPIO_10_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL, + 0 => GPIO10TRIGGER_MODE_A::NEGATIVE_PULSE, + 1 => GPIO10TRIGGER_MODE_A::POSITIVE_PULSE, + 2 => GPIO10TRIGGER_MODE_A::NEGATIVE_LEVEL, + 3 => GPIO10TRIGGER_MODE_A::POSITIVE_LEVEL, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"] #[inline(always)] pub fn is_negative_pulse(&self) -> bool { - **self == REG_GPIO_10_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE + *self == GPIO10TRIGGER_MODE_A::NEGATIVE_PULSE } #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"] #[inline(always)] pub fn is_positive_pulse(&self) -> bool { - **self == REG_GPIO_10_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE + *self == GPIO10TRIGGER_MODE_A::POSITIVE_PULSE } #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"] #[inline(always)] pub fn is_negative_level(&self) -> bool { - **self == REG_GPIO_10_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL + *self == GPIO10TRIGGER_MODE_A::NEGATIVE_LEVEL } #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"] #[inline(always)] pub fn is_positive_level(&self) -> bool { - **self == REG_GPIO_10_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL - } -} -impl core::ops::Deref for REG_GPIO_10_INTERRUPT_TRIGGER_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO10TRIGGER_MODE_A::POSITIVE_LEVEL } } #[doc = "Field `reg_gpio_10_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO10."] -pub struct REG_GPIO_10_INTERRUPT_TRIGGER_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_10_INTERRUPT_TRIGGER_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_10_INTERRUPT_TRIGGER_MODE_A) -> &'a mut W { - self.bits(variant.into()) - } +pub type REG_GPIO_10_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET2_SPEC, u8, GPIO10TRIGGER_MODE_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_10_INTERRUPT_TRIGGER_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn negative_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_10_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE) + self.variant(GPIO10TRIGGER_MODE_A::NEGATIVE_PULSE) } #[doc = "`1`"] #[inline(always)] pub fn positive_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_10_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE) + self.variant(GPIO10TRIGGER_MODE_A::POSITIVE_PULSE) } #[doc = "`10`"] #[inline(always)] pub fn negative_level(self) -> &'a mut W { - self.variant(REG_GPIO_10_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL) + self.variant(GPIO10TRIGGER_MODE_A::NEGATIVE_LEVEL) } #[doc = "`11`"] #[inline(always)] pub fn positive_level(self) -> &'a mut W { - self.variant(REG_GPIO_10_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w + self.variant(GPIO10TRIGGER_MODE_A::POSITIVE_LEVEL) } } +#[doc = "Field `reg_gpio_10_interrupt_control_mode` reader - Interrupt control mode register for GPIO10."] +pub type REG_GPIO_10_INTERRUPT_CONTROL_MODE_R = crate::BitReader; #[doc = "Interrupt control mode register for GPIO10.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_10_INTERRUPT_CONTROL_MODE_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO10CONTROL_MODE_A { #[doc = "0: `0`"] SYNCHRONOUS = 0, #[doc = "1: `1`"] ASYNCHRONOUS = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_10_INTERRUPT_CONTROL_MODE_A) -> Self { + fn from(variant: GPIO10CONTROL_MODE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_10_interrupt_control_mode` reader - Interrupt control mode register for GPIO10."] -pub struct REG_GPIO_10_INTERRUPT_CONTROL_MODE_R( - crate::FieldReader, -); impl REG_GPIO_10_INTERRUPT_CONTROL_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_10_INTERRUPT_CONTROL_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_10_INTERRUPT_CONTROL_MODE_A { + pub fn variant(&self) -> GPIO10CONTROL_MODE_A { match self.bits { - false => REG_GPIO_10_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS, - true => REG_GPIO_10_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS, + false => GPIO10CONTROL_MODE_A::SYNCHRONOUS, + true => GPIO10CONTROL_MODE_A::ASYNCHRONOUS, } } #[doc = "Checks if the value of the field is `SYNCHRONOUS`"] #[inline(always)] pub fn is_synchronous(&self) -> bool { - **self == REG_GPIO_10_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS + *self == GPIO10CONTROL_MODE_A::SYNCHRONOUS } #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"] #[inline(always)] pub fn is_asynchronous(&self) -> bool { - **self == REG_GPIO_10_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS - } -} -impl core::ops::Deref for REG_GPIO_10_INTERRUPT_CONTROL_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO10CONTROL_MODE_A::ASYNCHRONOUS } } #[doc = "Field `reg_gpio_10_interrupt_control_mode` writer - Interrupt control mode register for GPIO10."] -pub struct REG_GPIO_10_INTERRUPT_CONTROL_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_10_INTERRUPT_CONTROL_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_10_INTERRUPT_CONTROL_MODE_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_10_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MODE_SET2_SPEC, GPIO10CONTROL_MODE_A, O>; +impl<'a, const O: u8> REG_GPIO_10_INTERRUPT_CONTROL_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn synchronous(self) -> &'a mut W { - self.variant(REG_GPIO_10_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS) + self.variant(GPIO10CONTROL_MODE_A::SYNCHRONOUS) } #[doc = "`1`"] #[inline(always)] pub fn asynchronous(self) -> &'a mut W { - self.variant(REG_GPIO_10_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w + self.variant(GPIO10CONTROL_MODE_A::ASYNCHRONOUS) } } +#[doc = "Field `reg_gpio_11_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO11."] +pub type REG_GPIO_11_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader; #[doc = "Interrupt trigger mode register for GPIO11.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_11_INTERRUPT_TRIGGER_MODE_A { +pub enum GPIO11TRIGGER_MODE_A { #[doc = "0: `0`"] NEGATIVE_PULSE = 0, #[doc = "1: `1`"] @@ -233,185 +179,127 @@ pub enum REG_GPIO_11_INTERRUPT_TRIGGER_MODE_A { #[doc = "3: `11`"] POSITIVE_LEVEL = 3, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_11_INTERRUPT_TRIGGER_MODE_A) -> Self { + fn from(variant: GPIO11TRIGGER_MODE_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_11_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO11."] -pub struct REG_GPIO_11_INTERRUPT_TRIGGER_MODE_R( - crate::FieldReader, -); impl REG_GPIO_11_INTERRUPT_TRIGGER_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_11_INTERRUPT_TRIGGER_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_11_INTERRUPT_TRIGGER_MODE_A { + pub fn variant(&self) -> GPIO11TRIGGER_MODE_A { match self.bits { - 0 => REG_GPIO_11_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE, - 1 => REG_GPIO_11_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE, - 2 => REG_GPIO_11_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL, - 3 => REG_GPIO_11_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL, + 0 => GPIO11TRIGGER_MODE_A::NEGATIVE_PULSE, + 1 => GPIO11TRIGGER_MODE_A::POSITIVE_PULSE, + 2 => GPIO11TRIGGER_MODE_A::NEGATIVE_LEVEL, + 3 => GPIO11TRIGGER_MODE_A::POSITIVE_LEVEL, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"] #[inline(always)] pub fn is_negative_pulse(&self) -> bool { - **self == REG_GPIO_11_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE + *self == GPIO11TRIGGER_MODE_A::NEGATIVE_PULSE } #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"] #[inline(always)] pub fn is_positive_pulse(&self) -> bool { - **self == REG_GPIO_11_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE + *self == GPIO11TRIGGER_MODE_A::POSITIVE_PULSE } #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"] #[inline(always)] pub fn is_negative_level(&self) -> bool { - **self == REG_GPIO_11_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL + *self == GPIO11TRIGGER_MODE_A::NEGATIVE_LEVEL } #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"] #[inline(always)] pub fn is_positive_level(&self) -> bool { - **self == REG_GPIO_11_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL - } -} -impl core::ops::Deref for REG_GPIO_11_INTERRUPT_TRIGGER_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO11TRIGGER_MODE_A::POSITIVE_LEVEL } } #[doc = "Field `reg_gpio_11_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO11."] -pub struct REG_GPIO_11_INTERRUPT_TRIGGER_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_11_INTERRUPT_TRIGGER_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_11_INTERRUPT_TRIGGER_MODE_A) -> &'a mut W { - self.bits(variant.into()) - } +pub type REG_GPIO_11_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET2_SPEC, u8, GPIO11TRIGGER_MODE_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_11_INTERRUPT_TRIGGER_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn negative_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_11_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE) + self.variant(GPIO11TRIGGER_MODE_A::NEGATIVE_PULSE) } #[doc = "`1`"] #[inline(always)] pub fn positive_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_11_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE) + self.variant(GPIO11TRIGGER_MODE_A::POSITIVE_PULSE) } #[doc = "`10`"] #[inline(always)] pub fn negative_level(self) -> &'a mut W { - self.variant(REG_GPIO_11_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL) + self.variant(GPIO11TRIGGER_MODE_A::NEGATIVE_LEVEL) } #[doc = "`11`"] #[inline(always)] pub fn positive_level(self) -> &'a mut W { - self.variant(REG_GPIO_11_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 3)) | ((value as u32 & 0x03) << 3); - self.w + self.variant(GPIO11TRIGGER_MODE_A::POSITIVE_LEVEL) } } +#[doc = "Field `reg_gpio_11_interrupt_control_mode` reader - Interrupt control mode register for GPIO11."] +pub type REG_GPIO_11_INTERRUPT_CONTROL_MODE_R = crate::BitReader; #[doc = "Interrupt control mode register for GPIO11.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_11_INTERRUPT_CONTROL_MODE_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO11CONTROL_MODE_A { #[doc = "0: `0`"] SYNCHRONOUS = 0, #[doc = "1: `1`"] ASYNCHRONOUS = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_11_INTERRUPT_CONTROL_MODE_A) -> Self { + fn from(variant: GPIO11CONTROL_MODE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_11_interrupt_control_mode` reader - Interrupt control mode register for GPIO11."] -pub struct REG_GPIO_11_INTERRUPT_CONTROL_MODE_R( - crate::FieldReader, -); impl REG_GPIO_11_INTERRUPT_CONTROL_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_11_INTERRUPT_CONTROL_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_11_INTERRUPT_CONTROL_MODE_A { + pub fn variant(&self) -> GPIO11CONTROL_MODE_A { match self.bits { - false => REG_GPIO_11_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS, - true => REG_GPIO_11_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS, + false => GPIO11CONTROL_MODE_A::SYNCHRONOUS, + true => GPIO11CONTROL_MODE_A::ASYNCHRONOUS, } } #[doc = "Checks if the value of the field is `SYNCHRONOUS`"] #[inline(always)] pub fn is_synchronous(&self) -> bool { - **self == REG_GPIO_11_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS + *self == GPIO11CONTROL_MODE_A::SYNCHRONOUS } #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"] #[inline(always)] pub fn is_asynchronous(&self) -> bool { - **self == REG_GPIO_11_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS - } -} -impl core::ops::Deref for REG_GPIO_11_INTERRUPT_CONTROL_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO11CONTROL_MODE_A::ASYNCHRONOUS } } #[doc = "Field `reg_gpio_11_interrupt_control_mode` writer - Interrupt control mode register for GPIO11."] -pub struct REG_GPIO_11_INTERRUPT_CONTROL_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_11_INTERRUPT_CONTROL_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_11_INTERRUPT_CONTROL_MODE_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_11_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MODE_SET2_SPEC, GPIO11CONTROL_MODE_A, O>; +impl<'a, const O: u8> REG_GPIO_11_INTERRUPT_CONTROL_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn synchronous(self) -> &'a mut W { - self.variant(REG_GPIO_11_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS) + self.variant(GPIO11CONTROL_MODE_A::SYNCHRONOUS) } #[doc = "`1`"] #[inline(always)] pub fn asynchronous(self) -> &'a mut W { - self.variant(REG_GPIO_11_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w + self.variant(GPIO11CONTROL_MODE_A::ASYNCHRONOUS) } } +#[doc = "Field `reg_gpio_12_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO12."] +pub type REG_GPIO_12_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader; #[doc = "Interrupt trigger mode register for GPIO12.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_12_INTERRUPT_TRIGGER_MODE_A { +pub enum GPIO12TRIGGER_MODE_A { #[doc = "0: `0`"] NEGATIVE_PULSE = 0, #[doc = "1: `1`"] @@ -421,185 +309,127 @@ pub enum REG_GPIO_12_INTERRUPT_TRIGGER_MODE_A { #[doc = "3: `11`"] POSITIVE_LEVEL = 3, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_12_INTERRUPT_TRIGGER_MODE_A) -> Self { + fn from(variant: GPIO12TRIGGER_MODE_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_12_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO12."] -pub struct REG_GPIO_12_INTERRUPT_TRIGGER_MODE_R( - crate::FieldReader, -); impl REG_GPIO_12_INTERRUPT_TRIGGER_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_12_INTERRUPT_TRIGGER_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_12_INTERRUPT_TRIGGER_MODE_A { + pub fn variant(&self) -> GPIO12TRIGGER_MODE_A { match self.bits { - 0 => REG_GPIO_12_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE, - 1 => REG_GPIO_12_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE, - 2 => REG_GPIO_12_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL, - 3 => REG_GPIO_12_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL, + 0 => GPIO12TRIGGER_MODE_A::NEGATIVE_PULSE, + 1 => GPIO12TRIGGER_MODE_A::POSITIVE_PULSE, + 2 => GPIO12TRIGGER_MODE_A::NEGATIVE_LEVEL, + 3 => GPIO12TRIGGER_MODE_A::POSITIVE_LEVEL, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"] #[inline(always)] pub fn is_negative_pulse(&self) -> bool { - **self == REG_GPIO_12_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE + *self == GPIO12TRIGGER_MODE_A::NEGATIVE_PULSE } #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"] #[inline(always)] pub fn is_positive_pulse(&self) -> bool { - **self == REG_GPIO_12_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE + *self == GPIO12TRIGGER_MODE_A::POSITIVE_PULSE } #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"] #[inline(always)] pub fn is_negative_level(&self) -> bool { - **self == REG_GPIO_12_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL + *self == GPIO12TRIGGER_MODE_A::NEGATIVE_LEVEL } #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"] #[inline(always)] pub fn is_positive_level(&self) -> bool { - **self == REG_GPIO_12_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL - } -} -impl core::ops::Deref for REG_GPIO_12_INTERRUPT_TRIGGER_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO12TRIGGER_MODE_A::POSITIVE_LEVEL } } #[doc = "Field `reg_gpio_12_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO12."] -pub struct REG_GPIO_12_INTERRUPT_TRIGGER_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_12_INTERRUPT_TRIGGER_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_12_INTERRUPT_TRIGGER_MODE_A) -> &'a mut W { - self.bits(variant.into()) - } +pub type REG_GPIO_12_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET2_SPEC, u8, GPIO12TRIGGER_MODE_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_12_INTERRUPT_TRIGGER_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn negative_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_12_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE) + self.variant(GPIO12TRIGGER_MODE_A::NEGATIVE_PULSE) } #[doc = "`1`"] #[inline(always)] pub fn positive_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_12_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE) + self.variant(GPIO12TRIGGER_MODE_A::POSITIVE_PULSE) } #[doc = "`10`"] #[inline(always)] pub fn negative_level(self) -> &'a mut W { - self.variant(REG_GPIO_12_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL) + self.variant(GPIO12TRIGGER_MODE_A::NEGATIVE_LEVEL) } #[doc = "`11`"] #[inline(always)] pub fn positive_level(self) -> &'a mut W { - self.variant(REG_GPIO_12_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 6)) | ((value as u32 & 0x03) << 6); - self.w + self.variant(GPIO12TRIGGER_MODE_A::POSITIVE_LEVEL) } } +#[doc = "Field `reg_gpio_12_interrupt_control_mode` reader - Interrupt control mode register for GPIO12."] +pub type REG_GPIO_12_INTERRUPT_CONTROL_MODE_R = crate::BitReader; #[doc = "Interrupt control mode register for GPIO12.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_12_INTERRUPT_CONTROL_MODE_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO12CONTROL_MODE_A { #[doc = "0: `0`"] SYNCHRONOUS = 0, #[doc = "1: `1`"] ASYNCHRONOUS = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_12_INTERRUPT_CONTROL_MODE_A) -> Self { + fn from(variant: GPIO12CONTROL_MODE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_12_interrupt_control_mode` reader - Interrupt control mode register for GPIO12."] -pub struct REG_GPIO_12_INTERRUPT_CONTROL_MODE_R( - crate::FieldReader, -); impl REG_GPIO_12_INTERRUPT_CONTROL_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_12_INTERRUPT_CONTROL_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_12_INTERRUPT_CONTROL_MODE_A { + pub fn variant(&self) -> GPIO12CONTROL_MODE_A { match self.bits { - false => REG_GPIO_12_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS, - true => REG_GPIO_12_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS, + false => GPIO12CONTROL_MODE_A::SYNCHRONOUS, + true => GPIO12CONTROL_MODE_A::ASYNCHRONOUS, } } #[doc = "Checks if the value of the field is `SYNCHRONOUS`"] #[inline(always)] pub fn is_synchronous(&self) -> bool { - **self == REG_GPIO_12_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS + *self == GPIO12CONTROL_MODE_A::SYNCHRONOUS } #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"] #[inline(always)] pub fn is_asynchronous(&self) -> bool { - **self == REG_GPIO_12_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS - } -} -impl core::ops::Deref for REG_GPIO_12_INTERRUPT_CONTROL_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO12CONTROL_MODE_A::ASYNCHRONOUS } } #[doc = "Field `reg_gpio_12_interrupt_control_mode` writer - Interrupt control mode register for GPIO12."] -pub struct REG_GPIO_12_INTERRUPT_CONTROL_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_12_INTERRUPT_CONTROL_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_12_INTERRUPT_CONTROL_MODE_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_12_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MODE_SET2_SPEC, GPIO12CONTROL_MODE_A, O>; +impl<'a, const O: u8> REG_GPIO_12_INTERRUPT_CONTROL_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn synchronous(self) -> &'a mut W { - self.variant(REG_GPIO_12_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS) + self.variant(GPIO12CONTROL_MODE_A::SYNCHRONOUS) } #[doc = "`1`"] #[inline(always)] pub fn asynchronous(self) -> &'a mut W { - self.variant(REG_GPIO_12_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w + self.variant(GPIO12CONTROL_MODE_A::ASYNCHRONOUS) } } +#[doc = "Field `reg_gpio_13_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO13."] +pub type REG_GPIO_13_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader; #[doc = "Interrupt trigger mode register for GPIO13.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_13_INTERRUPT_TRIGGER_MODE_A { +pub enum GPIO13TRIGGER_MODE_A { #[doc = "0: `0`"] NEGATIVE_PULSE = 0, #[doc = "1: `1`"] @@ -609,185 +439,127 @@ pub enum REG_GPIO_13_INTERRUPT_TRIGGER_MODE_A { #[doc = "3: `11`"] POSITIVE_LEVEL = 3, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_13_INTERRUPT_TRIGGER_MODE_A) -> Self { + fn from(variant: GPIO13TRIGGER_MODE_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_13_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO13."] -pub struct REG_GPIO_13_INTERRUPT_TRIGGER_MODE_R( - crate::FieldReader, -); impl REG_GPIO_13_INTERRUPT_TRIGGER_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_13_INTERRUPT_TRIGGER_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_13_INTERRUPT_TRIGGER_MODE_A { + pub fn variant(&self) -> GPIO13TRIGGER_MODE_A { match self.bits { - 0 => REG_GPIO_13_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE, - 1 => REG_GPIO_13_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE, - 2 => REG_GPIO_13_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL, - 3 => REG_GPIO_13_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL, + 0 => GPIO13TRIGGER_MODE_A::NEGATIVE_PULSE, + 1 => GPIO13TRIGGER_MODE_A::POSITIVE_PULSE, + 2 => GPIO13TRIGGER_MODE_A::NEGATIVE_LEVEL, + 3 => GPIO13TRIGGER_MODE_A::POSITIVE_LEVEL, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"] #[inline(always)] pub fn is_negative_pulse(&self) -> bool { - **self == REG_GPIO_13_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE + *self == GPIO13TRIGGER_MODE_A::NEGATIVE_PULSE } #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"] #[inline(always)] pub fn is_positive_pulse(&self) -> bool { - **self == REG_GPIO_13_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE + *self == GPIO13TRIGGER_MODE_A::POSITIVE_PULSE } #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"] #[inline(always)] pub fn is_negative_level(&self) -> bool { - **self == REG_GPIO_13_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL + *self == GPIO13TRIGGER_MODE_A::NEGATIVE_LEVEL } #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"] #[inline(always)] pub fn is_positive_level(&self) -> bool { - **self == REG_GPIO_13_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL - } -} -impl core::ops::Deref for REG_GPIO_13_INTERRUPT_TRIGGER_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO13TRIGGER_MODE_A::POSITIVE_LEVEL } } #[doc = "Field `reg_gpio_13_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO13."] -pub struct REG_GPIO_13_INTERRUPT_TRIGGER_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_13_INTERRUPT_TRIGGER_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_13_INTERRUPT_TRIGGER_MODE_A) -> &'a mut W { - self.bits(variant.into()) - } +pub type REG_GPIO_13_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET2_SPEC, u8, GPIO13TRIGGER_MODE_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_13_INTERRUPT_TRIGGER_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn negative_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_13_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE) + self.variant(GPIO13TRIGGER_MODE_A::NEGATIVE_PULSE) } #[doc = "`1`"] #[inline(always)] pub fn positive_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_13_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE) + self.variant(GPIO13TRIGGER_MODE_A::POSITIVE_PULSE) } #[doc = "`10`"] #[inline(always)] pub fn negative_level(self) -> &'a mut W { - self.variant(REG_GPIO_13_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL) + self.variant(GPIO13TRIGGER_MODE_A::NEGATIVE_LEVEL) } #[doc = "`11`"] #[inline(always)] pub fn positive_level(self) -> &'a mut W { - self.variant(REG_GPIO_13_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 9)) | ((value as u32 & 0x03) << 9); - self.w + self.variant(GPIO13TRIGGER_MODE_A::POSITIVE_LEVEL) } } +#[doc = "Field `reg_gpio_13_interrupt_control_mode` reader - Interrupt control mode register for GPIO13."] +pub type REG_GPIO_13_INTERRUPT_CONTROL_MODE_R = crate::BitReader; #[doc = "Interrupt control mode register for GPIO13.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_13_INTERRUPT_CONTROL_MODE_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO13CONTROL_MODE_A { #[doc = "0: `0`"] SYNCHRONOUS = 0, #[doc = "1: `1`"] ASYNCHRONOUS = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_13_INTERRUPT_CONTROL_MODE_A) -> Self { + fn from(variant: GPIO13CONTROL_MODE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_13_interrupt_control_mode` reader - Interrupt control mode register for GPIO13."] -pub struct REG_GPIO_13_INTERRUPT_CONTROL_MODE_R( - crate::FieldReader, -); impl REG_GPIO_13_INTERRUPT_CONTROL_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_13_INTERRUPT_CONTROL_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_13_INTERRUPT_CONTROL_MODE_A { + pub fn variant(&self) -> GPIO13CONTROL_MODE_A { match self.bits { - false => REG_GPIO_13_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS, - true => REG_GPIO_13_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS, + false => GPIO13CONTROL_MODE_A::SYNCHRONOUS, + true => GPIO13CONTROL_MODE_A::ASYNCHRONOUS, } } #[doc = "Checks if the value of the field is `SYNCHRONOUS`"] #[inline(always)] pub fn is_synchronous(&self) -> bool { - **self == REG_GPIO_13_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS + *self == GPIO13CONTROL_MODE_A::SYNCHRONOUS } #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"] #[inline(always)] pub fn is_asynchronous(&self) -> bool { - **self == REG_GPIO_13_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS - } -} -impl core::ops::Deref for REG_GPIO_13_INTERRUPT_CONTROL_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO13CONTROL_MODE_A::ASYNCHRONOUS } } #[doc = "Field `reg_gpio_13_interrupt_control_mode` writer - Interrupt control mode register for GPIO13."] -pub struct REG_GPIO_13_INTERRUPT_CONTROL_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_13_INTERRUPT_CONTROL_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_13_INTERRUPT_CONTROL_MODE_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_13_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MODE_SET2_SPEC, GPIO13CONTROL_MODE_A, O>; +impl<'a, const O: u8> REG_GPIO_13_INTERRUPT_CONTROL_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn synchronous(self) -> &'a mut W { - self.variant(REG_GPIO_13_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS) + self.variant(GPIO13CONTROL_MODE_A::SYNCHRONOUS) } #[doc = "`1`"] #[inline(always)] pub fn asynchronous(self) -> &'a mut W { - self.variant(REG_GPIO_13_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w + self.variant(GPIO13CONTROL_MODE_A::ASYNCHRONOUS) } } +#[doc = "Field `reg_gpio_14_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO14."] +pub type REG_GPIO_14_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader; #[doc = "Interrupt trigger mode register for GPIO14.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_14_INTERRUPT_TRIGGER_MODE_A { +pub enum GPIO14TRIGGER_MODE_A { #[doc = "0: `0`"] NEGATIVE_PULSE = 0, #[doc = "1: `1`"] @@ -797,185 +569,127 @@ pub enum REG_GPIO_14_INTERRUPT_TRIGGER_MODE_A { #[doc = "3: `11`"] POSITIVE_LEVEL = 3, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_14_INTERRUPT_TRIGGER_MODE_A) -> Self { + fn from(variant: GPIO14TRIGGER_MODE_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_14_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO14."] -pub struct REG_GPIO_14_INTERRUPT_TRIGGER_MODE_R( - crate::FieldReader, -); impl REG_GPIO_14_INTERRUPT_TRIGGER_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_14_INTERRUPT_TRIGGER_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_14_INTERRUPT_TRIGGER_MODE_A { + pub fn variant(&self) -> GPIO14TRIGGER_MODE_A { match self.bits { - 0 => REG_GPIO_14_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE, - 1 => REG_GPIO_14_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE, - 2 => REG_GPIO_14_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL, - 3 => REG_GPIO_14_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL, + 0 => GPIO14TRIGGER_MODE_A::NEGATIVE_PULSE, + 1 => GPIO14TRIGGER_MODE_A::POSITIVE_PULSE, + 2 => GPIO14TRIGGER_MODE_A::NEGATIVE_LEVEL, + 3 => GPIO14TRIGGER_MODE_A::POSITIVE_LEVEL, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"] #[inline(always)] pub fn is_negative_pulse(&self) -> bool { - **self == REG_GPIO_14_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE + *self == GPIO14TRIGGER_MODE_A::NEGATIVE_PULSE } #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"] #[inline(always)] pub fn is_positive_pulse(&self) -> bool { - **self == REG_GPIO_14_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE + *self == GPIO14TRIGGER_MODE_A::POSITIVE_PULSE } #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"] #[inline(always)] pub fn is_negative_level(&self) -> bool { - **self == REG_GPIO_14_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL + *self == GPIO14TRIGGER_MODE_A::NEGATIVE_LEVEL } #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"] #[inline(always)] pub fn is_positive_level(&self) -> bool { - **self == REG_GPIO_14_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL - } -} -impl core::ops::Deref for REG_GPIO_14_INTERRUPT_TRIGGER_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO14TRIGGER_MODE_A::POSITIVE_LEVEL } } #[doc = "Field `reg_gpio_14_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO14."] -pub struct REG_GPIO_14_INTERRUPT_TRIGGER_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_14_INTERRUPT_TRIGGER_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_14_INTERRUPT_TRIGGER_MODE_A) -> &'a mut W { - self.bits(variant.into()) - } +pub type REG_GPIO_14_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET2_SPEC, u8, GPIO14TRIGGER_MODE_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_14_INTERRUPT_TRIGGER_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn negative_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_14_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE) + self.variant(GPIO14TRIGGER_MODE_A::NEGATIVE_PULSE) } #[doc = "`1`"] #[inline(always)] pub fn positive_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_14_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE) + self.variant(GPIO14TRIGGER_MODE_A::POSITIVE_PULSE) } #[doc = "`10`"] #[inline(always)] pub fn negative_level(self) -> &'a mut W { - self.variant(REG_GPIO_14_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL) + self.variant(GPIO14TRIGGER_MODE_A::NEGATIVE_LEVEL) } #[doc = "`11`"] #[inline(always)] pub fn positive_level(self) -> &'a mut W { - self.variant(REG_GPIO_14_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 12)) | ((value as u32 & 0x03) << 12); - self.w + self.variant(GPIO14TRIGGER_MODE_A::POSITIVE_LEVEL) } } +#[doc = "Field `reg_gpio_14_interrupt_control_mode` reader - Interrupt control mode register for GPIO14."] +pub type REG_GPIO_14_INTERRUPT_CONTROL_MODE_R = crate::BitReader; #[doc = "Interrupt control mode register for GPIO14.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_14_INTERRUPT_CONTROL_MODE_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO14CONTROL_MODE_A { #[doc = "0: `0`"] SYNCHRONOUS = 0, #[doc = "1: `1`"] ASYNCHRONOUS = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_14_INTERRUPT_CONTROL_MODE_A) -> Self { + fn from(variant: GPIO14CONTROL_MODE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_14_interrupt_control_mode` reader - Interrupt control mode register for GPIO14."] -pub struct REG_GPIO_14_INTERRUPT_CONTROL_MODE_R( - crate::FieldReader, -); impl REG_GPIO_14_INTERRUPT_CONTROL_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_14_INTERRUPT_CONTROL_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_14_INTERRUPT_CONTROL_MODE_A { + pub fn variant(&self) -> GPIO14CONTROL_MODE_A { match self.bits { - false => REG_GPIO_14_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS, - true => REG_GPIO_14_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS, + false => GPIO14CONTROL_MODE_A::SYNCHRONOUS, + true => GPIO14CONTROL_MODE_A::ASYNCHRONOUS, } } #[doc = "Checks if the value of the field is `SYNCHRONOUS`"] #[inline(always)] pub fn is_synchronous(&self) -> bool { - **self == REG_GPIO_14_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS + *self == GPIO14CONTROL_MODE_A::SYNCHRONOUS } #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"] #[inline(always)] pub fn is_asynchronous(&self) -> bool { - **self == REG_GPIO_14_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS - } -} -impl core::ops::Deref for REG_GPIO_14_INTERRUPT_CONTROL_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO14CONTROL_MODE_A::ASYNCHRONOUS } } #[doc = "Field `reg_gpio_14_interrupt_control_mode` writer - Interrupt control mode register for GPIO14."] -pub struct REG_GPIO_14_INTERRUPT_CONTROL_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_14_INTERRUPT_CONTROL_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_14_INTERRUPT_CONTROL_MODE_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_14_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MODE_SET2_SPEC, GPIO14CONTROL_MODE_A, O>; +impl<'a, const O: u8> REG_GPIO_14_INTERRUPT_CONTROL_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn synchronous(self) -> &'a mut W { - self.variant(REG_GPIO_14_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS) + self.variant(GPIO14CONTROL_MODE_A::SYNCHRONOUS) } #[doc = "`1`"] #[inline(always)] pub fn asynchronous(self) -> &'a mut W { - self.variant(REG_GPIO_14_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14); - self.w + self.variant(GPIO14CONTROL_MODE_A::ASYNCHRONOUS) } } +#[doc = "Field `reg_gpio_15_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO15."] +pub type REG_GPIO_15_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader; #[doc = "Interrupt trigger mode register for GPIO15.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_15_INTERRUPT_TRIGGER_MODE_A { +pub enum GPIO15TRIGGER_MODE_A { #[doc = "0: `0`"] NEGATIVE_PULSE = 0, #[doc = "1: `1`"] @@ -985,185 +699,127 @@ pub enum REG_GPIO_15_INTERRUPT_TRIGGER_MODE_A { #[doc = "3: `11`"] POSITIVE_LEVEL = 3, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_15_INTERRUPT_TRIGGER_MODE_A) -> Self { + fn from(variant: GPIO15TRIGGER_MODE_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_15_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO15."] -pub struct REG_GPIO_15_INTERRUPT_TRIGGER_MODE_R( - crate::FieldReader, -); impl REG_GPIO_15_INTERRUPT_TRIGGER_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_15_INTERRUPT_TRIGGER_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_15_INTERRUPT_TRIGGER_MODE_A { + pub fn variant(&self) -> GPIO15TRIGGER_MODE_A { match self.bits { - 0 => REG_GPIO_15_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE, - 1 => REG_GPIO_15_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE, - 2 => REG_GPIO_15_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL, - 3 => REG_GPIO_15_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL, + 0 => GPIO15TRIGGER_MODE_A::NEGATIVE_PULSE, + 1 => GPIO15TRIGGER_MODE_A::POSITIVE_PULSE, + 2 => GPIO15TRIGGER_MODE_A::NEGATIVE_LEVEL, + 3 => GPIO15TRIGGER_MODE_A::POSITIVE_LEVEL, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"] #[inline(always)] pub fn is_negative_pulse(&self) -> bool { - **self == REG_GPIO_15_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE + *self == GPIO15TRIGGER_MODE_A::NEGATIVE_PULSE } #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"] #[inline(always)] pub fn is_positive_pulse(&self) -> bool { - **self == REG_GPIO_15_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE + *self == GPIO15TRIGGER_MODE_A::POSITIVE_PULSE } #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"] #[inline(always)] pub fn is_negative_level(&self) -> bool { - **self == REG_GPIO_15_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL + *self == GPIO15TRIGGER_MODE_A::NEGATIVE_LEVEL } #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"] #[inline(always)] pub fn is_positive_level(&self) -> bool { - **self == REG_GPIO_15_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL - } -} -impl core::ops::Deref for REG_GPIO_15_INTERRUPT_TRIGGER_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO15TRIGGER_MODE_A::POSITIVE_LEVEL } } #[doc = "Field `reg_gpio_15_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO15."] -pub struct REG_GPIO_15_INTERRUPT_TRIGGER_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_15_INTERRUPT_TRIGGER_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_15_INTERRUPT_TRIGGER_MODE_A) -> &'a mut W { - self.bits(variant.into()) - } +pub type REG_GPIO_15_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET2_SPEC, u8, GPIO15TRIGGER_MODE_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_15_INTERRUPT_TRIGGER_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn negative_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_15_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE) + self.variant(GPIO15TRIGGER_MODE_A::NEGATIVE_PULSE) } #[doc = "`1`"] #[inline(always)] pub fn positive_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_15_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE) + self.variant(GPIO15TRIGGER_MODE_A::POSITIVE_PULSE) } #[doc = "`10`"] #[inline(always)] pub fn negative_level(self) -> &'a mut W { - self.variant(REG_GPIO_15_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL) + self.variant(GPIO15TRIGGER_MODE_A::NEGATIVE_LEVEL) } #[doc = "`11`"] #[inline(always)] pub fn positive_level(self) -> &'a mut W { - self.variant(REG_GPIO_15_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 15)) | ((value as u32 & 0x03) << 15); - self.w + self.variant(GPIO15TRIGGER_MODE_A::POSITIVE_LEVEL) } } +#[doc = "Field `reg_gpio_15_interrupt_control_mode` reader - Interrupt control mode register for GPIO15."] +pub type REG_GPIO_15_INTERRUPT_CONTROL_MODE_R = crate::BitReader; #[doc = "Interrupt control mode register for GPIO15.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_15_INTERRUPT_CONTROL_MODE_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO15CONTROL_MODE_A { #[doc = "0: `0`"] SYNCHRONOUS = 0, #[doc = "1: `1`"] ASYNCHRONOUS = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_15_INTERRUPT_CONTROL_MODE_A) -> Self { + fn from(variant: GPIO15CONTROL_MODE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_15_interrupt_control_mode` reader - Interrupt control mode register for GPIO15."] -pub struct REG_GPIO_15_INTERRUPT_CONTROL_MODE_R( - crate::FieldReader, -); impl REG_GPIO_15_INTERRUPT_CONTROL_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_15_INTERRUPT_CONTROL_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_15_INTERRUPT_CONTROL_MODE_A { + pub fn variant(&self) -> GPIO15CONTROL_MODE_A { match self.bits { - false => REG_GPIO_15_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS, - true => REG_GPIO_15_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS, + false => GPIO15CONTROL_MODE_A::SYNCHRONOUS, + true => GPIO15CONTROL_MODE_A::ASYNCHRONOUS, } } #[doc = "Checks if the value of the field is `SYNCHRONOUS`"] #[inline(always)] pub fn is_synchronous(&self) -> bool { - **self == REG_GPIO_15_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS + *self == GPIO15CONTROL_MODE_A::SYNCHRONOUS } #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"] #[inline(always)] pub fn is_asynchronous(&self) -> bool { - **self == REG_GPIO_15_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS - } -} -impl core::ops::Deref for REG_GPIO_15_INTERRUPT_CONTROL_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO15CONTROL_MODE_A::ASYNCHRONOUS } } #[doc = "Field `reg_gpio_15_interrupt_control_mode` writer - Interrupt control mode register for GPIO15."] -pub struct REG_GPIO_15_INTERRUPT_CONTROL_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_15_INTERRUPT_CONTROL_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_15_INTERRUPT_CONTROL_MODE_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_15_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MODE_SET2_SPEC, GPIO15CONTROL_MODE_A, O>; +impl<'a, const O: u8> REG_GPIO_15_INTERRUPT_CONTROL_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn synchronous(self) -> &'a mut W { - self.variant(REG_GPIO_15_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS) + self.variant(GPIO15CONTROL_MODE_A::SYNCHRONOUS) } #[doc = "`1`"] #[inline(always)] pub fn asynchronous(self) -> &'a mut W { - self.variant(REG_GPIO_15_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w + self.variant(GPIO15CONTROL_MODE_A::ASYNCHRONOUS) } } +#[doc = "Field `reg_gpio_16_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO16."] +pub type REG_GPIO_16_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader; #[doc = "Interrupt trigger mode register for GPIO16.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_16_INTERRUPT_TRIGGER_MODE_A { +pub enum GPIO16TRIGGER_MODE_A { #[doc = "0: `0`"] NEGATIVE_PULSE = 0, #[doc = "1: `1`"] @@ -1173,185 +829,127 @@ pub enum REG_GPIO_16_INTERRUPT_TRIGGER_MODE_A { #[doc = "3: `11`"] POSITIVE_LEVEL = 3, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_16_INTERRUPT_TRIGGER_MODE_A) -> Self { + fn from(variant: GPIO16TRIGGER_MODE_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_16_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO16."] -pub struct REG_GPIO_16_INTERRUPT_TRIGGER_MODE_R( - crate::FieldReader, -); impl REG_GPIO_16_INTERRUPT_TRIGGER_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_16_INTERRUPT_TRIGGER_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_16_INTERRUPT_TRIGGER_MODE_A { + pub fn variant(&self) -> GPIO16TRIGGER_MODE_A { match self.bits { - 0 => REG_GPIO_16_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE, - 1 => REG_GPIO_16_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE, - 2 => REG_GPIO_16_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL, - 3 => REG_GPIO_16_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL, + 0 => GPIO16TRIGGER_MODE_A::NEGATIVE_PULSE, + 1 => GPIO16TRIGGER_MODE_A::POSITIVE_PULSE, + 2 => GPIO16TRIGGER_MODE_A::NEGATIVE_LEVEL, + 3 => GPIO16TRIGGER_MODE_A::POSITIVE_LEVEL, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"] #[inline(always)] pub fn is_negative_pulse(&self) -> bool { - **self == REG_GPIO_16_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE + *self == GPIO16TRIGGER_MODE_A::NEGATIVE_PULSE } #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"] #[inline(always)] pub fn is_positive_pulse(&self) -> bool { - **self == REG_GPIO_16_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE + *self == GPIO16TRIGGER_MODE_A::POSITIVE_PULSE } #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"] #[inline(always)] pub fn is_negative_level(&self) -> bool { - **self == REG_GPIO_16_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL + *self == GPIO16TRIGGER_MODE_A::NEGATIVE_LEVEL } #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"] #[inline(always)] pub fn is_positive_level(&self) -> bool { - **self == REG_GPIO_16_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL - } -} -impl core::ops::Deref for REG_GPIO_16_INTERRUPT_TRIGGER_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO16TRIGGER_MODE_A::POSITIVE_LEVEL } } #[doc = "Field `reg_gpio_16_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO16."] -pub struct REG_GPIO_16_INTERRUPT_TRIGGER_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_16_INTERRUPT_TRIGGER_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_16_INTERRUPT_TRIGGER_MODE_A) -> &'a mut W { - self.bits(variant.into()) - } +pub type REG_GPIO_16_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET2_SPEC, u8, GPIO16TRIGGER_MODE_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_16_INTERRUPT_TRIGGER_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn negative_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_16_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE) + self.variant(GPIO16TRIGGER_MODE_A::NEGATIVE_PULSE) } #[doc = "`1`"] #[inline(always)] pub fn positive_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_16_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE) + self.variant(GPIO16TRIGGER_MODE_A::POSITIVE_PULSE) } #[doc = "`10`"] #[inline(always)] pub fn negative_level(self) -> &'a mut W { - self.variant(REG_GPIO_16_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL) + self.variant(GPIO16TRIGGER_MODE_A::NEGATIVE_LEVEL) } #[doc = "`11`"] #[inline(always)] pub fn positive_level(self) -> &'a mut W { - self.variant(REG_GPIO_16_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 18)) | ((value as u32 & 0x03) << 18); - self.w + self.variant(GPIO16TRIGGER_MODE_A::POSITIVE_LEVEL) } } +#[doc = "Field `reg_gpio_16_interrupt_control_mode` reader - Interrupt control mode register for GPIO16."] +pub type REG_GPIO_16_INTERRUPT_CONTROL_MODE_R = crate::BitReader; #[doc = "Interrupt control mode register for GPIO16.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_16_INTERRUPT_CONTROL_MODE_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO16CONTROL_MODE_A { #[doc = "0: `0`"] SYNCHRONOUS = 0, #[doc = "1: `1`"] ASYNCHRONOUS = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_16_INTERRUPT_CONTROL_MODE_A) -> Self { + fn from(variant: GPIO16CONTROL_MODE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_16_interrupt_control_mode` reader - Interrupt control mode register for GPIO16."] -pub struct REG_GPIO_16_INTERRUPT_CONTROL_MODE_R( - crate::FieldReader, -); impl REG_GPIO_16_INTERRUPT_CONTROL_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_16_INTERRUPT_CONTROL_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_16_INTERRUPT_CONTROL_MODE_A { + pub fn variant(&self) -> GPIO16CONTROL_MODE_A { match self.bits { - false => REG_GPIO_16_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS, - true => REG_GPIO_16_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS, + false => GPIO16CONTROL_MODE_A::SYNCHRONOUS, + true => GPIO16CONTROL_MODE_A::ASYNCHRONOUS, } } #[doc = "Checks if the value of the field is `SYNCHRONOUS`"] #[inline(always)] pub fn is_synchronous(&self) -> bool { - **self == REG_GPIO_16_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS + *self == GPIO16CONTROL_MODE_A::SYNCHRONOUS } #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"] #[inline(always)] pub fn is_asynchronous(&self) -> bool { - **self == REG_GPIO_16_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS - } -} -impl core::ops::Deref for REG_GPIO_16_INTERRUPT_CONTROL_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO16CONTROL_MODE_A::ASYNCHRONOUS } } #[doc = "Field `reg_gpio_16_interrupt_control_mode` writer - Interrupt control mode register for GPIO16."] -pub struct REG_GPIO_16_INTERRUPT_CONTROL_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_16_INTERRUPT_CONTROL_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_16_INTERRUPT_CONTROL_MODE_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_16_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MODE_SET2_SPEC, GPIO16CONTROL_MODE_A, O>; +impl<'a, const O: u8> REG_GPIO_16_INTERRUPT_CONTROL_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn synchronous(self) -> &'a mut W { - self.variant(REG_GPIO_16_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS) + self.variant(GPIO16CONTROL_MODE_A::SYNCHRONOUS) } #[doc = "`1`"] #[inline(always)] pub fn asynchronous(self) -> &'a mut W { - self.variant(REG_GPIO_16_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w + self.variant(GPIO16CONTROL_MODE_A::ASYNCHRONOUS) } } +#[doc = "Field `reg_gpio_17_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO17."] +pub type REG_GPIO_17_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader; #[doc = "Interrupt trigger mode register for GPIO17.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_17_INTERRUPT_TRIGGER_MODE_A { +pub enum GPIO17TRIGGER_MODE_A { #[doc = "0: `0`"] NEGATIVE_PULSE = 0, #[doc = "1: `1`"] @@ -1361,185 +959,127 @@ pub enum REG_GPIO_17_INTERRUPT_TRIGGER_MODE_A { #[doc = "3: `11`"] POSITIVE_LEVEL = 3, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_17_INTERRUPT_TRIGGER_MODE_A) -> Self { + fn from(variant: GPIO17TRIGGER_MODE_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_17_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO17."] -pub struct REG_GPIO_17_INTERRUPT_TRIGGER_MODE_R( - crate::FieldReader, -); impl REG_GPIO_17_INTERRUPT_TRIGGER_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_17_INTERRUPT_TRIGGER_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_17_INTERRUPT_TRIGGER_MODE_A { + pub fn variant(&self) -> GPIO17TRIGGER_MODE_A { match self.bits { - 0 => REG_GPIO_17_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE, - 1 => REG_GPIO_17_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE, - 2 => REG_GPIO_17_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL, - 3 => REG_GPIO_17_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL, + 0 => GPIO17TRIGGER_MODE_A::NEGATIVE_PULSE, + 1 => GPIO17TRIGGER_MODE_A::POSITIVE_PULSE, + 2 => GPIO17TRIGGER_MODE_A::NEGATIVE_LEVEL, + 3 => GPIO17TRIGGER_MODE_A::POSITIVE_LEVEL, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"] #[inline(always)] pub fn is_negative_pulse(&self) -> bool { - **self == REG_GPIO_17_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE + *self == GPIO17TRIGGER_MODE_A::NEGATIVE_PULSE } #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"] #[inline(always)] pub fn is_positive_pulse(&self) -> bool { - **self == REG_GPIO_17_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE + *self == GPIO17TRIGGER_MODE_A::POSITIVE_PULSE } #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"] #[inline(always)] pub fn is_negative_level(&self) -> bool { - **self == REG_GPIO_17_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL + *self == GPIO17TRIGGER_MODE_A::NEGATIVE_LEVEL } #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"] #[inline(always)] pub fn is_positive_level(&self) -> bool { - **self == REG_GPIO_17_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL - } -} -impl core::ops::Deref for REG_GPIO_17_INTERRUPT_TRIGGER_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO17TRIGGER_MODE_A::POSITIVE_LEVEL } } #[doc = "Field `reg_gpio_17_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO17."] -pub struct REG_GPIO_17_INTERRUPT_TRIGGER_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_17_INTERRUPT_TRIGGER_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_17_INTERRUPT_TRIGGER_MODE_A) -> &'a mut W { - self.bits(variant.into()) - } +pub type REG_GPIO_17_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET2_SPEC, u8, GPIO17TRIGGER_MODE_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_17_INTERRUPT_TRIGGER_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn negative_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_17_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE) + self.variant(GPIO17TRIGGER_MODE_A::NEGATIVE_PULSE) } #[doc = "`1`"] #[inline(always)] pub fn positive_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_17_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE) + self.variant(GPIO17TRIGGER_MODE_A::POSITIVE_PULSE) } #[doc = "`10`"] #[inline(always)] pub fn negative_level(self) -> &'a mut W { - self.variant(REG_GPIO_17_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL) + self.variant(GPIO17TRIGGER_MODE_A::NEGATIVE_LEVEL) } #[doc = "`11`"] #[inline(always)] pub fn positive_level(self) -> &'a mut W { - self.variant(REG_GPIO_17_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 21)) | ((value as u32 & 0x03) << 21); - self.w + self.variant(GPIO17TRIGGER_MODE_A::POSITIVE_LEVEL) } } +#[doc = "Field `reg_gpio_17_interrupt_control_mode` reader - Interrupt control mode register for GPIO17."] +pub type REG_GPIO_17_INTERRUPT_CONTROL_MODE_R = crate::BitReader; #[doc = "Interrupt control mode register for GPIO17.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_17_INTERRUPT_CONTROL_MODE_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO17CONTROL_MODE_A { #[doc = "0: `0`"] SYNCHRONOUS = 0, #[doc = "1: `1`"] ASYNCHRONOUS = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_17_INTERRUPT_CONTROL_MODE_A) -> Self { + fn from(variant: GPIO17CONTROL_MODE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_17_interrupt_control_mode` reader - Interrupt control mode register for GPIO17."] -pub struct REG_GPIO_17_INTERRUPT_CONTROL_MODE_R( - crate::FieldReader, -); impl REG_GPIO_17_INTERRUPT_CONTROL_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_17_INTERRUPT_CONTROL_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_17_INTERRUPT_CONTROL_MODE_A { + pub fn variant(&self) -> GPIO17CONTROL_MODE_A { match self.bits { - false => REG_GPIO_17_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS, - true => REG_GPIO_17_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS, + false => GPIO17CONTROL_MODE_A::SYNCHRONOUS, + true => GPIO17CONTROL_MODE_A::ASYNCHRONOUS, } } #[doc = "Checks if the value of the field is `SYNCHRONOUS`"] #[inline(always)] pub fn is_synchronous(&self) -> bool { - **self == REG_GPIO_17_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS + *self == GPIO17CONTROL_MODE_A::SYNCHRONOUS } #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"] #[inline(always)] pub fn is_asynchronous(&self) -> bool { - **self == REG_GPIO_17_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS - } -} -impl core::ops::Deref for REG_GPIO_17_INTERRUPT_CONTROL_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO17CONTROL_MODE_A::ASYNCHRONOUS } } #[doc = "Field `reg_gpio_17_interrupt_control_mode` writer - Interrupt control mode register for GPIO17."] -pub struct REG_GPIO_17_INTERRUPT_CONTROL_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_17_INTERRUPT_CONTROL_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_17_INTERRUPT_CONTROL_MODE_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_17_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MODE_SET2_SPEC, GPIO17CONTROL_MODE_A, O>; +impl<'a, const O: u8> REG_GPIO_17_INTERRUPT_CONTROL_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn synchronous(self) -> &'a mut W { - self.variant(REG_GPIO_17_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS) + self.variant(GPIO17CONTROL_MODE_A::SYNCHRONOUS) } #[doc = "`1`"] #[inline(always)] pub fn asynchronous(self) -> &'a mut W { - self.variant(REG_GPIO_17_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23); - self.w + self.variant(GPIO17CONTROL_MODE_A::ASYNCHRONOUS) } } +#[doc = "Field `reg_gpio_18_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO18."] +pub type REG_GPIO_18_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader; #[doc = "Interrupt trigger mode register for GPIO18.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_18_INTERRUPT_TRIGGER_MODE_A { +pub enum GPIO18TRIGGER_MODE_A { #[doc = "0: `0`"] NEGATIVE_PULSE = 0, #[doc = "1: `1`"] @@ -1549,185 +1089,127 @@ pub enum REG_GPIO_18_INTERRUPT_TRIGGER_MODE_A { #[doc = "3: `11`"] POSITIVE_LEVEL = 3, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_18_INTERRUPT_TRIGGER_MODE_A) -> Self { + fn from(variant: GPIO18TRIGGER_MODE_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_18_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO18."] -pub struct REG_GPIO_18_INTERRUPT_TRIGGER_MODE_R( - crate::FieldReader, -); impl REG_GPIO_18_INTERRUPT_TRIGGER_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_18_INTERRUPT_TRIGGER_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_18_INTERRUPT_TRIGGER_MODE_A { + pub fn variant(&self) -> GPIO18TRIGGER_MODE_A { match self.bits { - 0 => REG_GPIO_18_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE, - 1 => REG_GPIO_18_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE, - 2 => REG_GPIO_18_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL, - 3 => REG_GPIO_18_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL, + 0 => GPIO18TRIGGER_MODE_A::NEGATIVE_PULSE, + 1 => GPIO18TRIGGER_MODE_A::POSITIVE_PULSE, + 2 => GPIO18TRIGGER_MODE_A::NEGATIVE_LEVEL, + 3 => GPIO18TRIGGER_MODE_A::POSITIVE_LEVEL, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"] #[inline(always)] pub fn is_negative_pulse(&self) -> bool { - **self == REG_GPIO_18_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE + *self == GPIO18TRIGGER_MODE_A::NEGATIVE_PULSE } #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"] #[inline(always)] pub fn is_positive_pulse(&self) -> bool { - **self == REG_GPIO_18_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE + *self == GPIO18TRIGGER_MODE_A::POSITIVE_PULSE } #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"] #[inline(always)] pub fn is_negative_level(&self) -> bool { - **self == REG_GPIO_18_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL + *self == GPIO18TRIGGER_MODE_A::NEGATIVE_LEVEL } #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"] #[inline(always)] pub fn is_positive_level(&self) -> bool { - **self == REG_GPIO_18_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL - } -} -impl core::ops::Deref for REG_GPIO_18_INTERRUPT_TRIGGER_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO18TRIGGER_MODE_A::POSITIVE_LEVEL } } #[doc = "Field `reg_gpio_18_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO18."] -pub struct REG_GPIO_18_INTERRUPT_TRIGGER_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_18_INTERRUPT_TRIGGER_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_18_INTERRUPT_TRIGGER_MODE_A) -> &'a mut W { - self.bits(variant.into()) - } +pub type REG_GPIO_18_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET2_SPEC, u8, GPIO18TRIGGER_MODE_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_18_INTERRUPT_TRIGGER_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn negative_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_18_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE) + self.variant(GPIO18TRIGGER_MODE_A::NEGATIVE_PULSE) } #[doc = "`1`"] #[inline(always)] pub fn positive_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_18_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE) + self.variant(GPIO18TRIGGER_MODE_A::POSITIVE_PULSE) } #[doc = "`10`"] #[inline(always)] pub fn negative_level(self) -> &'a mut W { - self.variant(REG_GPIO_18_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL) + self.variant(GPIO18TRIGGER_MODE_A::NEGATIVE_LEVEL) } #[doc = "`11`"] #[inline(always)] pub fn positive_level(self) -> &'a mut W { - self.variant(REG_GPIO_18_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 24)) | ((value as u32 & 0x03) << 24); - self.w + self.variant(GPIO18TRIGGER_MODE_A::POSITIVE_LEVEL) } } +#[doc = "Field `reg_gpio_18_interrupt_control_mode` reader - Interrupt control mode register for GPIO18."] +pub type REG_GPIO_18_INTERRUPT_CONTROL_MODE_R = crate::BitReader; #[doc = "Interrupt control mode register for GPIO18.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_18_INTERRUPT_CONTROL_MODE_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO18CONTROL_MODE_A { #[doc = "0: `0`"] SYNCHRONOUS = 0, #[doc = "1: `1`"] ASYNCHRONOUS = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_18_INTERRUPT_CONTROL_MODE_A) -> Self { + fn from(variant: GPIO18CONTROL_MODE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_18_interrupt_control_mode` reader - Interrupt control mode register for GPIO18."] -pub struct REG_GPIO_18_INTERRUPT_CONTROL_MODE_R( - crate::FieldReader, -); impl REG_GPIO_18_INTERRUPT_CONTROL_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_18_INTERRUPT_CONTROL_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_18_INTERRUPT_CONTROL_MODE_A { + pub fn variant(&self) -> GPIO18CONTROL_MODE_A { match self.bits { - false => REG_GPIO_18_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS, - true => REG_GPIO_18_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS, + false => GPIO18CONTROL_MODE_A::SYNCHRONOUS, + true => GPIO18CONTROL_MODE_A::ASYNCHRONOUS, } } #[doc = "Checks if the value of the field is `SYNCHRONOUS`"] #[inline(always)] pub fn is_synchronous(&self) -> bool { - **self == REG_GPIO_18_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS + *self == GPIO18CONTROL_MODE_A::SYNCHRONOUS } #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"] #[inline(always)] pub fn is_asynchronous(&self) -> bool { - **self == REG_GPIO_18_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS - } -} -impl core::ops::Deref for REG_GPIO_18_INTERRUPT_CONTROL_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO18CONTROL_MODE_A::ASYNCHRONOUS } } #[doc = "Field `reg_gpio_18_interrupt_control_mode` writer - Interrupt control mode register for GPIO18."] -pub struct REG_GPIO_18_INTERRUPT_CONTROL_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_18_INTERRUPT_CONTROL_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_18_INTERRUPT_CONTROL_MODE_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_18_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MODE_SET2_SPEC, GPIO18CONTROL_MODE_A, O>; +impl<'a, const O: u8> REG_GPIO_18_INTERRUPT_CONTROL_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn synchronous(self) -> &'a mut W { - self.variant(REG_GPIO_18_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS) + self.variant(GPIO18CONTROL_MODE_A::SYNCHRONOUS) } #[doc = "`1`"] #[inline(always)] pub fn asynchronous(self) -> &'a mut W { - self.variant(REG_GPIO_18_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 26)) | ((value as u32 & 0x01) << 26); - self.w + self.variant(GPIO18CONTROL_MODE_A::ASYNCHRONOUS) } } +#[doc = "Field `reg_gpio_19_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO19."] +pub type REG_GPIO_19_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader; #[doc = "Interrupt trigger mode register for GPIO19.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_19_INTERRUPT_TRIGGER_MODE_A { +pub enum GPIO19TRIGGER_MODE_A { #[doc = "0: `0`"] NEGATIVE_PULSE = 0, #[doc = "1: `1`"] @@ -1737,385 +1219,386 @@ pub enum REG_GPIO_19_INTERRUPT_TRIGGER_MODE_A { #[doc = "3: `11`"] POSITIVE_LEVEL = 3, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_19_INTERRUPT_TRIGGER_MODE_A) -> Self { + fn from(variant: GPIO19TRIGGER_MODE_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_19_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO19."] -pub struct REG_GPIO_19_INTERRUPT_TRIGGER_MODE_R( - crate::FieldReader, -); impl REG_GPIO_19_INTERRUPT_TRIGGER_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_19_INTERRUPT_TRIGGER_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_19_INTERRUPT_TRIGGER_MODE_A { + pub fn variant(&self) -> GPIO19TRIGGER_MODE_A { match self.bits { - 0 => REG_GPIO_19_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE, - 1 => REG_GPIO_19_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE, - 2 => REG_GPIO_19_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL, - 3 => REG_GPIO_19_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL, + 0 => GPIO19TRIGGER_MODE_A::NEGATIVE_PULSE, + 1 => GPIO19TRIGGER_MODE_A::POSITIVE_PULSE, + 2 => GPIO19TRIGGER_MODE_A::NEGATIVE_LEVEL, + 3 => GPIO19TRIGGER_MODE_A::POSITIVE_LEVEL, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"] #[inline(always)] pub fn is_negative_pulse(&self) -> bool { - **self == REG_GPIO_19_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE + *self == GPIO19TRIGGER_MODE_A::NEGATIVE_PULSE } #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"] #[inline(always)] pub fn is_positive_pulse(&self) -> bool { - **self == REG_GPIO_19_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE + *self == GPIO19TRIGGER_MODE_A::POSITIVE_PULSE } #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"] #[inline(always)] pub fn is_negative_level(&self) -> bool { - **self == REG_GPIO_19_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL + *self == GPIO19TRIGGER_MODE_A::NEGATIVE_LEVEL } #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"] #[inline(always)] pub fn is_positive_level(&self) -> bool { - **self == REG_GPIO_19_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL - } -} -impl core::ops::Deref for REG_GPIO_19_INTERRUPT_TRIGGER_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO19TRIGGER_MODE_A::POSITIVE_LEVEL } } #[doc = "Field `reg_gpio_19_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO19."] -pub struct REG_GPIO_19_INTERRUPT_TRIGGER_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_19_INTERRUPT_TRIGGER_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_19_INTERRUPT_TRIGGER_MODE_A) -> &'a mut W { - self.bits(variant.into()) - } +pub type REG_GPIO_19_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET2_SPEC, u8, GPIO19TRIGGER_MODE_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_19_INTERRUPT_TRIGGER_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn negative_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_19_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE) + self.variant(GPIO19TRIGGER_MODE_A::NEGATIVE_PULSE) } #[doc = "`1`"] #[inline(always)] pub fn positive_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_19_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE) + self.variant(GPIO19TRIGGER_MODE_A::POSITIVE_PULSE) } #[doc = "`10`"] #[inline(always)] pub fn negative_level(self) -> &'a mut W { - self.variant(REG_GPIO_19_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL) + self.variant(GPIO19TRIGGER_MODE_A::NEGATIVE_LEVEL) } #[doc = "`11`"] #[inline(always)] pub fn positive_level(self) -> &'a mut W { - self.variant(REG_GPIO_19_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 27)) | ((value as u32 & 0x03) << 27); - self.w + self.variant(GPIO19TRIGGER_MODE_A::POSITIVE_LEVEL) } } +#[doc = "Field `reg_gpio_19_interrupt_control_mode` reader - Interrupt control mode register for GPIO19."] +pub type REG_GPIO_19_INTERRUPT_CONTROL_MODE_R = crate::BitReader; #[doc = "Interrupt control mode register for GPIO19.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_19_INTERRUPT_CONTROL_MODE_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO19CONTROL_MODE_A { #[doc = "0: `0`"] SYNCHRONOUS = 0, #[doc = "1: `1`"] ASYNCHRONOUS = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_19_INTERRUPT_CONTROL_MODE_A) -> Self { + fn from(variant: GPIO19CONTROL_MODE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_19_interrupt_control_mode` reader - Interrupt control mode register for GPIO19."] -pub struct REG_GPIO_19_INTERRUPT_CONTROL_MODE_R( - crate::FieldReader, -); impl REG_GPIO_19_INTERRUPT_CONTROL_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_19_INTERRUPT_CONTROL_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_19_INTERRUPT_CONTROL_MODE_A { + pub fn variant(&self) -> GPIO19CONTROL_MODE_A { match self.bits { - false => REG_GPIO_19_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS, - true => REG_GPIO_19_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS, + false => GPIO19CONTROL_MODE_A::SYNCHRONOUS, + true => GPIO19CONTROL_MODE_A::ASYNCHRONOUS, } } #[doc = "Checks if the value of the field is `SYNCHRONOUS`"] #[inline(always)] pub fn is_synchronous(&self) -> bool { - **self == REG_GPIO_19_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS + *self == GPIO19CONTROL_MODE_A::SYNCHRONOUS } #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"] #[inline(always)] pub fn is_asynchronous(&self) -> bool { - **self == REG_GPIO_19_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS - } -} -impl core::ops::Deref for REG_GPIO_19_INTERRUPT_CONTROL_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO19CONTROL_MODE_A::ASYNCHRONOUS } } #[doc = "Field `reg_gpio_19_interrupt_control_mode` writer - Interrupt control mode register for GPIO19."] -pub struct REG_GPIO_19_INTERRUPT_CONTROL_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_19_INTERRUPT_CONTROL_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_19_INTERRUPT_CONTROL_MODE_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_19_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MODE_SET2_SPEC, GPIO19CONTROL_MODE_A, O>; +impl<'a, const O: u8> REG_GPIO_19_INTERRUPT_CONTROL_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn synchronous(self) -> &'a mut W { - self.variant(REG_GPIO_19_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS) + self.variant(GPIO19CONTROL_MODE_A::SYNCHRONOUS) } #[doc = "`1`"] #[inline(always)] pub fn asynchronous(self) -> &'a mut W { - self.variant(REG_GPIO_19_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 29)) | ((value as u32 & 0x01) << 29); - self.w + self.variant(GPIO19CONTROL_MODE_A::ASYNCHRONOUS) } } impl R { #[doc = "Bits 0:1 - Interrupt trigger mode register for GPIO10."] #[inline(always)] pub fn reg_gpio_10_interrupt_trigger_mode(&self) -> REG_GPIO_10_INTERRUPT_TRIGGER_MODE_R { - REG_GPIO_10_INTERRUPT_TRIGGER_MODE_R::new((self.bits & 0x03) as u8) + REG_GPIO_10_INTERRUPT_TRIGGER_MODE_R::new((self.bits & 3) as u8) } #[doc = "Bit 2 - Interrupt control mode register for GPIO10."] #[inline(always)] pub fn reg_gpio_10_interrupt_control_mode(&self) -> REG_GPIO_10_INTERRUPT_CONTROL_MODE_R { - REG_GPIO_10_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 2) & 0x01) != 0) + REG_GPIO_10_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 2) & 1) != 0) } #[doc = "Bits 3:4 - Interrupt trigger mode register for GPIO11."] #[inline(always)] pub fn reg_gpio_11_interrupt_trigger_mode(&self) -> REG_GPIO_11_INTERRUPT_TRIGGER_MODE_R { - REG_GPIO_11_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 3) & 0x03) as u8) + REG_GPIO_11_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 3) & 3) as u8) } #[doc = "Bit 5 - Interrupt control mode register for GPIO11."] #[inline(always)] pub fn reg_gpio_11_interrupt_control_mode(&self) -> REG_GPIO_11_INTERRUPT_CONTROL_MODE_R { - REG_GPIO_11_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 5) & 0x01) != 0) + REG_GPIO_11_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 5) & 1) != 0) } #[doc = "Bits 6:7 - Interrupt trigger mode register for GPIO12."] #[inline(always)] pub fn reg_gpio_12_interrupt_trigger_mode(&self) -> REG_GPIO_12_INTERRUPT_TRIGGER_MODE_R { - REG_GPIO_12_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 6) & 0x03) as u8) + REG_GPIO_12_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 6) & 3) as u8) } #[doc = "Bit 8 - Interrupt control mode register for GPIO12."] #[inline(always)] pub fn reg_gpio_12_interrupt_control_mode(&self) -> REG_GPIO_12_INTERRUPT_CONTROL_MODE_R { - REG_GPIO_12_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 8) & 0x01) != 0) + REG_GPIO_12_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 8) & 1) != 0) } #[doc = "Bits 9:10 - Interrupt trigger mode register for GPIO13."] #[inline(always)] pub fn reg_gpio_13_interrupt_trigger_mode(&self) -> REG_GPIO_13_INTERRUPT_TRIGGER_MODE_R { - REG_GPIO_13_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 9) & 0x03) as u8) + REG_GPIO_13_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 9) & 3) as u8) } #[doc = "Bit 11 - Interrupt control mode register for GPIO13."] #[inline(always)] pub fn reg_gpio_13_interrupt_control_mode(&self) -> REG_GPIO_13_INTERRUPT_CONTROL_MODE_R { - REG_GPIO_13_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 11) & 0x01) != 0) + REG_GPIO_13_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 11) & 1) != 0) } #[doc = "Bits 12:13 - Interrupt trigger mode register for GPIO14."] #[inline(always)] pub fn reg_gpio_14_interrupt_trigger_mode(&self) -> REG_GPIO_14_INTERRUPT_TRIGGER_MODE_R { - REG_GPIO_14_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 12) & 0x03) as u8) + REG_GPIO_14_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 12) & 3) as u8) } #[doc = "Bit 14 - Interrupt control mode register for GPIO14."] #[inline(always)] pub fn reg_gpio_14_interrupt_control_mode(&self) -> REG_GPIO_14_INTERRUPT_CONTROL_MODE_R { - REG_GPIO_14_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 14) & 0x01) != 0) + REG_GPIO_14_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 14) & 1) != 0) } #[doc = "Bits 15:16 - Interrupt trigger mode register for GPIO15."] #[inline(always)] pub fn reg_gpio_15_interrupt_trigger_mode(&self) -> REG_GPIO_15_INTERRUPT_TRIGGER_MODE_R { - REG_GPIO_15_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 15) & 0x03) as u8) + REG_GPIO_15_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 15) & 3) as u8) } #[doc = "Bit 17 - Interrupt control mode register for GPIO15."] #[inline(always)] pub fn reg_gpio_15_interrupt_control_mode(&self) -> REG_GPIO_15_INTERRUPT_CONTROL_MODE_R { - REG_GPIO_15_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 17) & 0x01) != 0) + REG_GPIO_15_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 17) & 1) != 0) } #[doc = "Bits 18:19 - Interrupt trigger mode register for GPIO16."] #[inline(always)] pub fn reg_gpio_16_interrupt_trigger_mode(&self) -> REG_GPIO_16_INTERRUPT_TRIGGER_MODE_R { - REG_GPIO_16_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 18) & 0x03) as u8) + REG_GPIO_16_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 18) & 3) as u8) } #[doc = "Bit 20 - Interrupt control mode register for GPIO16."] #[inline(always)] pub fn reg_gpio_16_interrupt_control_mode(&self) -> REG_GPIO_16_INTERRUPT_CONTROL_MODE_R { - REG_GPIO_16_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 20) & 0x01) != 0) + REG_GPIO_16_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 20) & 1) != 0) } #[doc = "Bits 21:22 - Interrupt trigger mode register for GPIO17."] #[inline(always)] pub fn reg_gpio_17_interrupt_trigger_mode(&self) -> REG_GPIO_17_INTERRUPT_TRIGGER_MODE_R { - REG_GPIO_17_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 21) & 0x03) as u8) + REG_GPIO_17_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 21) & 3) as u8) } #[doc = "Bit 23 - Interrupt control mode register for GPIO17."] #[inline(always)] pub fn reg_gpio_17_interrupt_control_mode(&self) -> REG_GPIO_17_INTERRUPT_CONTROL_MODE_R { - REG_GPIO_17_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 23) & 0x01) != 0) + REG_GPIO_17_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 23) & 1) != 0) } #[doc = "Bits 24:25 - Interrupt trigger mode register for GPIO18."] #[inline(always)] pub fn reg_gpio_18_interrupt_trigger_mode(&self) -> REG_GPIO_18_INTERRUPT_TRIGGER_MODE_R { - REG_GPIO_18_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 24) & 0x03) as u8) + REG_GPIO_18_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 24) & 3) as u8) } #[doc = "Bit 26 - Interrupt control mode register for GPIO18."] #[inline(always)] pub fn reg_gpio_18_interrupt_control_mode(&self) -> REG_GPIO_18_INTERRUPT_CONTROL_MODE_R { - REG_GPIO_18_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 26) & 0x01) != 0) + REG_GPIO_18_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 26) & 1) != 0) } #[doc = "Bits 27:28 - Interrupt trigger mode register for GPIO19."] #[inline(always)] pub fn reg_gpio_19_interrupt_trigger_mode(&self) -> REG_GPIO_19_INTERRUPT_TRIGGER_MODE_R { - REG_GPIO_19_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 27) & 0x03) as u8) + REG_GPIO_19_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 27) & 3) as u8) } #[doc = "Bit 29 - Interrupt control mode register for GPIO19."] #[inline(always)] pub fn reg_gpio_19_interrupt_control_mode(&self) -> REG_GPIO_19_INTERRUPT_CONTROL_MODE_R { - REG_GPIO_19_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 29) & 0x01) != 0) + REG_GPIO_19_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 29) & 1) != 0) } } impl W { #[doc = "Bits 0:1 - Interrupt trigger mode register for GPIO10."] #[inline(always)] - pub fn reg_gpio_10_interrupt_trigger_mode(&mut self) -> REG_GPIO_10_INTERRUPT_TRIGGER_MODE_W { - REG_GPIO_10_INTERRUPT_TRIGGER_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_10_interrupt_trigger_mode( + &mut self, + ) -> REG_GPIO_10_INTERRUPT_TRIGGER_MODE_W<0> { + REG_GPIO_10_INTERRUPT_TRIGGER_MODE_W::new(self) } #[doc = "Bit 2 - Interrupt control mode register for GPIO10."] #[inline(always)] - pub fn reg_gpio_10_interrupt_control_mode(&mut self) -> REG_GPIO_10_INTERRUPT_CONTROL_MODE_W { - REG_GPIO_10_INTERRUPT_CONTROL_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_10_interrupt_control_mode( + &mut self, + ) -> REG_GPIO_10_INTERRUPT_CONTROL_MODE_W<2> { + REG_GPIO_10_INTERRUPT_CONTROL_MODE_W::new(self) } #[doc = "Bits 3:4 - Interrupt trigger mode register for GPIO11."] #[inline(always)] - pub fn reg_gpio_11_interrupt_trigger_mode(&mut self) -> REG_GPIO_11_INTERRUPT_TRIGGER_MODE_W { - REG_GPIO_11_INTERRUPT_TRIGGER_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_11_interrupt_trigger_mode( + &mut self, + ) -> REG_GPIO_11_INTERRUPT_TRIGGER_MODE_W<3> { + REG_GPIO_11_INTERRUPT_TRIGGER_MODE_W::new(self) } #[doc = "Bit 5 - Interrupt control mode register for GPIO11."] #[inline(always)] - pub fn reg_gpio_11_interrupt_control_mode(&mut self) -> REG_GPIO_11_INTERRUPT_CONTROL_MODE_W { - REG_GPIO_11_INTERRUPT_CONTROL_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_11_interrupt_control_mode( + &mut self, + ) -> REG_GPIO_11_INTERRUPT_CONTROL_MODE_W<5> { + REG_GPIO_11_INTERRUPT_CONTROL_MODE_W::new(self) } #[doc = "Bits 6:7 - Interrupt trigger mode register for GPIO12."] #[inline(always)] - pub fn reg_gpio_12_interrupt_trigger_mode(&mut self) -> REG_GPIO_12_INTERRUPT_TRIGGER_MODE_W { - REG_GPIO_12_INTERRUPT_TRIGGER_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_12_interrupt_trigger_mode( + &mut self, + ) -> REG_GPIO_12_INTERRUPT_TRIGGER_MODE_W<6> { + REG_GPIO_12_INTERRUPT_TRIGGER_MODE_W::new(self) } #[doc = "Bit 8 - Interrupt control mode register for GPIO12."] #[inline(always)] - pub fn reg_gpio_12_interrupt_control_mode(&mut self) -> REG_GPIO_12_INTERRUPT_CONTROL_MODE_W { - REG_GPIO_12_INTERRUPT_CONTROL_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_12_interrupt_control_mode( + &mut self, + ) -> REG_GPIO_12_INTERRUPT_CONTROL_MODE_W<8> { + REG_GPIO_12_INTERRUPT_CONTROL_MODE_W::new(self) } #[doc = "Bits 9:10 - Interrupt trigger mode register for GPIO13."] #[inline(always)] - pub fn reg_gpio_13_interrupt_trigger_mode(&mut self) -> REG_GPIO_13_INTERRUPT_TRIGGER_MODE_W { - REG_GPIO_13_INTERRUPT_TRIGGER_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_13_interrupt_trigger_mode( + &mut self, + ) -> REG_GPIO_13_INTERRUPT_TRIGGER_MODE_W<9> { + REG_GPIO_13_INTERRUPT_TRIGGER_MODE_W::new(self) } #[doc = "Bit 11 - Interrupt control mode register for GPIO13."] #[inline(always)] - pub fn reg_gpio_13_interrupt_control_mode(&mut self) -> REG_GPIO_13_INTERRUPT_CONTROL_MODE_W { - REG_GPIO_13_INTERRUPT_CONTROL_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_13_interrupt_control_mode( + &mut self, + ) -> REG_GPIO_13_INTERRUPT_CONTROL_MODE_W<11> { + REG_GPIO_13_INTERRUPT_CONTROL_MODE_W::new(self) } #[doc = "Bits 12:13 - Interrupt trigger mode register for GPIO14."] #[inline(always)] - pub fn reg_gpio_14_interrupt_trigger_mode(&mut self) -> REG_GPIO_14_INTERRUPT_TRIGGER_MODE_W { - REG_GPIO_14_INTERRUPT_TRIGGER_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_14_interrupt_trigger_mode( + &mut self, + ) -> REG_GPIO_14_INTERRUPT_TRIGGER_MODE_W<12> { + REG_GPIO_14_INTERRUPT_TRIGGER_MODE_W::new(self) } #[doc = "Bit 14 - Interrupt control mode register for GPIO14."] #[inline(always)] - pub fn reg_gpio_14_interrupt_control_mode(&mut self) -> REG_GPIO_14_INTERRUPT_CONTROL_MODE_W { - REG_GPIO_14_INTERRUPT_CONTROL_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_14_interrupt_control_mode( + &mut self, + ) -> REG_GPIO_14_INTERRUPT_CONTROL_MODE_W<14> { + REG_GPIO_14_INTERRUPT_CONTROL_MODE_W::new(self) } #[doc = "Bits 15:16 - Interrupt trigger mode register for GPIO15."] #[inline(always)] - pub fn reg_gpio_15_interrupt_trigger_mode(&mut self) -> REG_GPIO_15_INTERRUPT_TRIGGER_MODE_W { - REG_GPIO_15_INTERRUPT_TRIGGER_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_15_interrupt_trigger_mode( + &mut self, + ) -> REG_GPIO_15_INTERRUPT_TRIGGER_MODE_W<15> { + REG_GPIO_15_INTERRUPT_TRIGGER_MODE_W::new(self) } #[doc = "Bit 17 - Interrupt control mode register for GPIO15."] #[inline(always)] - pub fn reg_gpio_15_interrupt_control_mode(&mut self) -> REG_GPIO_15_INTERRUPT_CONTROL_MODE_W { - REG_GPIO_15_INTERRUPT_CONTROL_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_15_interrupt_control_mode( + &mut self, + ) -> REG_GPIO_15_INTERRUPT_CONTROL_MODE_W<17> { + REG_GPIO_15_INTERRUPT_CONTROL_MODE_W::new(self) } #[doc = "Bits 18:19 - Interrupt trigger mode register for GPIO16."] #[inline(always)] - pub fn reg_gpio_16_interrupt_trigger_mode(&mut self) -> REG_GPIO_16_INTERRUPT_TRIGGER_MODE_W { - REG_GPIO_16_INTERRUPT_TRIGGER_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_16_interrupt_trigger_mode( + &mut self, + ) -> REG_GPIO_16_INTERRUPT_TRIGGER_MODE_W<18> { + REG_GPIO_16_INTERRUPT_TRIGGER_MODE_W::new(self) } #[doc = "Bit 20 - Interrupt control mode register for GPIO16."] #[inline(always)] - pub fn reg_gpio_16_interrupt_control_mode(&mut self) -> REG_GPIO_16_INTERRUPT_CONTROL_MODE_W { - REG_GPIO_16_INTERRUPT_CONTROL_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_16_interrupt_control_mode( + &mut self, + ) -> REG_GPIO_16_INTERRUPT_CONTROL_MODE_W<20> { + REG_GPIO_16_INTERRUPT_CONTROL_MODE_W::new(self) } #[doc = "Bits 21:22 - Interrupt trigger mode register for GPIO17."] #[inline(always)] - pub fn reg_gpio_17_interrupt_trigger_mode(&mut self) -> REG_GPIO_17_INTERRUPT_TRIGGER_MODE_W { - REG_GPIO_17_INTERRUPT_TRIGGER_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_17_interrupt_trigger_mode( + &mut self, + ) -> REG_GPIO_17_INTERRUPT_TRIGGER_MODE_W<21> { + REG_GPIO_17_INTERRUPT_TRIGGER_MODE_W::new(self) } #[doc = "Bit 23 - Interrupt control mode register for GPIO17."] #[inline(always)] - pub fn reg_gpio_17_interrupt_control_mode(&mut self) -> REG_GPIO_17_INTERRUPT_CONTROL_MODE_W { - REG_GPIO_17_INTERRUPT_CONTROL_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_17_interrupt_control_mode( + &mut self, + ) -> REG_GPIO_17_INTERRUPT_CONTROL_MODE_W<23> { + REG_GPIO_17_INTERRUPT_CONTROL_MODE_W::new(self) } #[doc = "Bits 24:25 - Interrupt trigger mode register for GPIO18."] #[inline(always)] - pub fn reg_gpio_18_interrupt_trigger_mode(&mut self) -> REG_GPIO_18_INTERRUPT_TRIGGER_MODE_W { - REG_GPIO_18_INTERRUPT_TRIGGER_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_18_interrupt_trigger_mode( + &mut self, + ) -> REG_GPIO_18_INTERRUPT_TRIGGER_MODE_W<24> { + REG_GPIO_18_INTERRUPT_TRIGGER_MODE_W::new(self) } #[doc = "Bit 26 - Interrupt control mode register for GPIO18."] #[inline(always)] - pub fn reg_gpio_18_interrupt_control_mode(&mut self) -> REG_GPIO_18_INTERRUPT_CONTROL_MODE_W { - REG_GPIO_18_INTERRUPT_CONTROL_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_18_interrupt_control_mode( + &mut self, + ) -> REG_GPIO_18_INTERRUPT_CONTROL_MODE_W<26> { + REG_GPIO_18_INTERRUPT_CONTROL_MODE_W::new(self) } #[doc = "Bits 27:28 - Interrupt trigger mode register for GPIO19."] #[inline(always)] - pub fn reg_gpio_19_interrupt_trigger_mode(&mut self) -> REG_GPIO_19_INTERRUPT_TRIGGER_MODE_W { - REG_GPIO_19_INTERRUPT_TRIGGER_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_19_interrupt_trigger_mode( + &mut self, + ) -> REG_GPIO_19_INTERRUPT_TRIGGER_MODE_W<27> { + REG_GPIO_19_INTERRUPT_TRIGGER_MODE_W::new(self) } #[doc = "Bit 29 - Interrupt control mode register for GPIO19."] #[inline(always)] - pub fn reg_gpio_19_interrupt_control_mode(&mut self) -> REG_GPIO_19_INTERRUPT_CONTROL_MODE_W { - REG_GPIO_19_INTERRUPT_CONTROL_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_19_interrupt_control_mode( + &mut self, + ) -> REG_GPIO_19_INTERRUPT_CONTROL_MODE_W<29> { + REG_GPIO_19_INTERRUPT_CONTROL_MODE_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -2133,11 +1616,10 @@ impl crate::Readable for GPIO_INT_MODE_SET2_SPEC { #[doc = "`write(|w| ..)` method takes [gpio_int_mode_set2::W](W) writer structure"] impl crate::Writable for GPIO_INT_MODE_SET2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets GPIO_INT_MODE_SET2 to value 0"] impl crate::Resettable for GPIO_INT_MODE_SET2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/gpio_int_mode_set3.rs b/src/glb/gpio_int_mode_set3.rs index dce411a..8b74ef7 100644 --- a/src/glb/gpio_int_mode_set3.rs +++ b/src/glb/gpio_int_mode_set3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,15 +28,18 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } +#[doc = "Field `reg_gpio_20_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO20."] +pub type REG_GPIO_20_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader; #[doc = "Interrupt trigger mode register for GPIO20.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_20_INTERRUPT_TRIGGER_MODE_A { +pub enum GPIO20TRIGGER_MODE_A { #[doc = "0: `0`"] NEGATIVE_PULSE = 0, #[doc = "1: `1`"] @@ -45,185 +49,127 @@ pub enum REG_GPIO_20_INTERRUPT_TRIGGER_MODE_A { #[doc = "3: `11`"] POSITIVE_LEVEL = 3, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_20_INTERRUPT_TRIGGER_MODE_A) -> Self { + fn from(variant: GPIO20TRIGGER_MODE_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_20_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO20."] -pub struct REG_GPIO_20_INTERRUPT_TRIGGER_MODE_R( - crate::FieldReader, -); impl REG_GPIO_20_INTERRUPT_TRIGGER_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_20_INTERRUPT_TRIGGER_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_20_INTERRUPT_TRIGGER_MODE_A { + pub fn variant(&self) -> GPIO20TRIGGER_MODE_A { match self.bits { - 0 => REG_GPIO_20_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE, - 1 => REG_GPIO_20_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE, - 2 => REG_GPIO_20_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL, - 3 => REG_GPIO_20_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL, + 0 => GPIO20TRIGGER_MODE_A::NEGATIVE_PULSE, + 1 => GPIO20TRIGGER_MODE_A::POSITIVE_PULSE, + 2 => GPIO20TRIGGER_MODE_A::NEGATIVE_LEVEL, + 3 => GPIO20TRIGGER_MODE_A::POSITIVE_LEVEL, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"] #[inline(always)] pub fn is_negative_pulse(&self) -> bool { - **self == REG_GPIO_20_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE + *self == GPIO20TRIGGER_MODE_A::NEGATIVE_PULSE } #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"] #[inline(always)] pub fn is_positive_pulse(&self) -> bool { - **self == REG_GPIO_20_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE + *self == GPIO20TRIGGER_MODE_A::POSITIVE_PULSE } #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"] #[inline(always)] pub fn is_negative_level(&self) -> bool { - **self == REG_GPIO_20_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL + *self == GPIO20TRIGGER_MODE_A::NEGATIVE_LEVEL } #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"] #[inline(always)] pub fn is_positive_level(&self) -> bool { - **self == REG_GPIO_20_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL - } -} -impl core::ops::Deref for REG_GPIO_20_INTERRUPT_TRIGGER_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO20TRIGGER_MODE_A::POSITIVE_LEVEL } } #[doc = "Field `reg_gpio_20_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO20."] -pub struct REG_GPIO_20_INTERRUPT_TRIGGER_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_20_INTERRUPT_TRIGGER_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_20_INTERRUPT_TRIGGER_MODE_A) -> &'a mut W { - self.bits(variant.into()) - } +pub type REG_GPIO_20_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET3_SPEC, u8, GPIO20TRIGGER_MODE_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_20_INTERRUPT_TRIGGER_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn negative_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_20_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE) + self.variant(GPIO20TRIGGER_MODE_A::NEGATIVE_PULSE) } #[doc = "`1`"] #[inline(always)] pub fn positive_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_20_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE) + self.variant(GPIO20TRIGGER_MODE_A::POSITIVE_PULSE) } #[doc = "`10`"] #[inline(always)] pub fn negative_level(self) -> &'a mut W { - self.variant(REG_GPIO_20_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL) + self.variant(GPIO20TRIGGER_MODE_A::NEGATIVE_LEVEL) } #[doc = "`11`"] #[inline(always)] pub fn positive_level(self) -> &'a mut W { - self.variant(REG_GPIO_20_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w + self.variant(GPIO20TRIGGER_MODE_A::POSITIVE_LEVEL) } } +#[doc = "Field `reg_gpio_20_interrupt_control_mode` reader - Interrupt control mode register for GPIO20."] +pub type REG_GPIO_20_INTERRUPT_CONTROL_MODE_R = crate::BitReader; #[doc = "Interrupt control mode register for GPIO20.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_20_INTERRUPT_CONTROL_MODE_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO20CONTROL_MODE_A { #[doc = "0: `0`"] SYNCHRONOUS = 0, #[doc = "1: `1`"] ASYNCHRONOUS = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_20_INTERRUPT_CONTROL_MODE_A) -> Self { + fn from(variant: GPIO20CONTROL_MODE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_20_interrupt_control_mode` reader - Interrupt control mode register for GPIO20."] -pub struct REG_GPIO_20_INTERRUPT_CONTROL_MODE_R( - crate::FieldReader, -); impl REG_GPIO_20_INTERRUPT_CONTROL_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_20_INTERRUPT_CONTROL_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_20_INTERRUPT_CONTROL_MODE_A { + pub fn variant(&self) -> GPIO20CONTROL_MODE_A { match self.bits { - false => REG_GPIO_20_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS, - true => REG_GPIO_20_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS, + false => GPIO20CONTROL_MODE_A::SYNCHRONOUS, + true => GPIO20CONTROL_MODE_A::ASYNCHRONOUS, } } #[doc = "Checks if the value of the field is `SYNCHRONOUS`"] #[inline(always)] pub fn is_synchronous(&self) -> bool { - **self == REG_GPIO_20_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS + *self == GPIO20CONTROL_MODE_A::SYNCHRONOUS } #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"] #[inline(always)] pub fn is_asynchronous(&self) -> bool { - **self == REG_GPIO_20_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS - } -} -impl core::ops::Deref for REG_GPIO_20_INTERRUPT_CONTROL_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO20CONTROL_MODE_A::ASYNCHRONOUS } } #[doc = "Field `reg_gpio_20_interrupt_control_mode` writer - Interrupt control mode register for GPIO20."] -pub struct REG_GPIO_20_INTERRUPT_CONTROL_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_20_INTERRUPT_CONTROL_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_20_INTERRUPT_CONTROL_MODE_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_20_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MODE_SET3_SPEC, GPIO20CONTROL_MODE_A, O>; +impl<'a, const O: u8> REG_GPIO_20_INTERRUPT_CONTROL_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn synchronous(self) -> &'a mut W { - self.variant(REG_GPIO_20_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS) + self.variant(GPIO20CONTROL_MODE_A::SYNCHRONOUS) } #[doc = "`1`"] #[inline(always)] pub fn asynchronous(self) -> &'a mut W { - self.variant(REG_GPIO_20_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w + self.variant(GPIO20CONTROL_MODE_A::ASYNCHRONOUS) } } +#[doc = "Field `reg_gpio_21_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO21."] +pub type REG_GPIO_21_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader; #[doc = "Interrupt trigger mode register for GPIO21.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_21_INTERRUPT_TRIGGER_MODE_A { +pub enum GPIO21TRIGGER_MODE_A { #[doc = "0: `0`"] NEGATIVE_PULSE = 0, #[doc = "1: `1`"] @@ -233,185 +179,127 @@ pub enum REG_GPIO_21_INTERRUPT_TRIGGER_MODE_A { #[doc = "3: `11`"] POSITIVE_LEVEL = 3, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_21_INTERRUPT_TRIGGER_MODE_A) -> Self { + fn from(variant: GPIO21TRIGGER_MODE_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_21_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO21."] -pub struct REG_GPIO_21_INTERRUPT_TRIGGER_MODE_R( - crate::FieldReader, -); impl REG_GPIO_21_INTERRUPT_TRIGGER_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_21_INTERRUPT_TRIGGER_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_21_INTERRUPT_TRIGGER_MODE_A { + pub fn variant(&self) -> GPIO21TRIGGER_MODE_A { match self.bits { - 0 => REG_GPIO_21_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE, - 1 => REG_GPIO_21_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE, - 2 => REG_GPIO_21_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL, - 3 => REG_GPIO_21_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL, + 0 => GPIO21TRIGGER_MODE_A::NEGATIVE_PULSE, + 1 => GPIO21TRIGGER_MODE_A::POSITIVE_PULSE, + 2 => GPIO21TRIGGER_MODE_A::NEGATIVE_LEVEL, + 3 => GPIO21TRIGGER_MODE_A::POSITIVE_LEVEL, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"] #[inline(always)] pub fn is_negative_pulse(&self) -> bool { - **self == REG_GPIO_21_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE + *self == GPIO21TRIGGER_MODE_A::NEGATIVE_PULSE } #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"] #[inline(always)] pub fn is_positive_pulse(&self) -> bool { - **self == REG_GPIO_21_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE + *self == GPIO21TRIGGER_MODE_A::POSITIVE_PULSE } #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"] #[inline(always)] pub fn is_negative_level(&self) -> bool { - **self == REG_GPIO_21_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL + *self == GPIO21TRIGGER_MODE_A::NEGATIVE_LEVEL } #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"] #[inline(always)] pub fn is_positive_level(&self) -> bool { - **self == REG_GPIO_21_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL - } -} -impl core::ops::Deref for REG_GPIO_21_INTERRUPT_TRIGGER_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO21TRIGGER_MODE_A::POSITIVE_LEVEL } } #[doc = "Field `reg_gpio_21_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO21."] -pub struct REG_GPIO_21_INTERRUPT_TRIGGER_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_21_INTERRUPT_TRIGGER_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_21_INTERRUPT_TRIGGER_MODE_A) -> &'a mut W { - self.bits(variant.into()) - } +pub type REG_GPIO_21_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET3_SPEC, u8, GPIO21TRIGGER_MODE_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_21_INTERRUPT_TRIGGER_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn negative_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_21_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE) + self.variant(GPIO21TRIGGER_MODE_A::NEGATIVE_PULSE) } #[doc = "`1`"] #[inline(always)] pub fn positive_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_21_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE) + self.variant(GPIO21TRIGGER_MODE_A::POSITIVE_PULSE) } #[doc = "`10`"] #[inline(always)] pub fn negative_level(self) -> &'a mut W { - self.variant(REG_GPIO_21_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL) + self.variant(GPIO21TRIGGER_MODE_A::NEGATIVE_LEVEL) } #[doc = "`11`"] #[inline(always)] pub fn positive_level(self) -> &'a mut W { - self.variant(REG_GPIO_21_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 3)) | ((value as u32 & 0x03) << 3); - self.w + self.variant(GPIO21TRIGGER_MODE_A::POSITIVE_LEVEL) } } +#[doc = "Field `reg_gpio_21_interrupt_control_mode` reader - Interrupt control mode register for GPIO21."] +pub type REG_GPIO_21_INTERRUPT_CONTROL_MODE_R = crate::BitReader; #[doc = "Interrupt control mode register for GPIO21.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_21_INTERRUPT_CONTROL_MODE_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO21CONTROL_MODE_A { #[doc = "0: `0`"] SYNCHRONOUS = 0, #[doc = "1: `1`"] ASYNCHRONOUS = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_21_INTERRUPT_CONTROL_MODE_A) -> Self { + fn from(variant: GPIO21CONTROL_MODE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_21_interrupt_control_mode` reader - Interrupt control mode register for GPIO21."] -pub struct REG_GPIO_21_INTERRUPT_CONTROL_MODE_R( - crate::FieldReader, -); impl REG_GPIO_21_INTERRUPT_CONTROL_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_21_INTERRUPT_CONTROL_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_21_INTERRUPT_CONTROL_MODE_A { + pub fn variant(&self) -> GPIO21CONTROL_MODE_A { match self.bits { - false => REG_GPIO_21_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS, - true => REG_GPIO_21_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS, + false => GPIO21CONTROL_MODE_A::SYNCHRONOUS, + true => GPIO21CONTROL_MODE_A::ASYNCHRONOUS, } } #[doc = "Checks if the value of the field is `SYNCHRONOUS`"] #[inline(always)] pub fn is_synchronous(&self) -> bool { - **self == REG_GPIO_21_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS + *self == GPIO21CONTROL_MODE_A::SYNCHRONOUS } #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"] #[inline(always)] pub fn is_asynchronous(&self) -> bool { - **self == REG_GPIO_21_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS - } -} -impl core::ops::Deref for REG_GPIO_21_INTERRUPT_CONTROL_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO21CONTROL_MODE_A::ASYNCHRONOUS } } #[doc = "Field `reg_gpio_21_interrupt_control_mode` writer - Interrupt control mode register for GPIO21."] -pub struct REG_GPIO_21_INTERRUPT_CONTROL_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_21_INTERRUPT_CONTROL_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_21_INTERRUPT_CONTROL_MODE_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_21_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MODE_SET3_SPEC, GPIO21CONTROL_MODE_A, O>; +impl<'a, const O: u8> REG_GPIO_21_INTERRUPT_CONTROL_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn synchronous(self) -> &'a mut W { - self.variant(REG_GPIO_21_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS) + self.variant(GPIO21CONTROL_MODE_A::SYNCHRONOUS) } #[doc = "`1`"] #[inline(always)] pub fn asynchronous(self) -> &'a mut W { - self.variant(REG_GPIO_21_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w + self.variant(GPIO21CONTROL_MODE_A::ASYNCHRONOUS) } } +#[doc = "Field `reg_gpio_22_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO22."] +pub type REG_GPIO_22_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader; #[doc = "Interrupt trigger mode register for GPIO22.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_22_INTERRUPT_TRIGGER_MODE_A { +pub enum GPIO22TRIGGER_MODE_A { #[doc = "0: `0`"] NEGATIVE_PULSE = 0, #[doc = "1: `1`"] @@ -421,185 +309,127 @@ pub enum REG_GPIO_22_INTERRUPT_TRIGGER_MODE_A { #[doc = "3: `11`"] POSITIVE_LEVEL = 3, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_22_INTERRUPT_TRIGGER_MODE_A) -> Self { + fn from(variant: GPIO22TRIGGER_MODE_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_22_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO22."] -pub struct REG_GPIO_22_INTERRUPT_TRIGGER_MODE_R( - crate::FieldReader, -); impl REG_GPIO_22_INTERRUPT_TRIGGER_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_22_INTERRUPT_TRIGGER_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_22_INTERRUPT_TRIGGER_MODE_A { + pub fn variant(&self) -> GPIO22TRIGGER_MODE_A { match self.bits { - 0 => REG_GPIO_22_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE, - 1 => REG_GPIO_22_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE, - 2 => REG_GPIO_22_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL, - 3 => REG_GPIO_22_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL, + 0 => GPIO22TRIGGER_MODE_A::NEGATIVE_PULSE, + 1 => GPIO22TRIGGER_MODE_A::POSITIVE_PULSE, + 2 => GPIO22TRIGGER_MODE_A::NEGATIVE_LEVEL, + 3 => GPIO22TRIGGER_MODE_A::POSITIVE_LEVEL, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"] #[inline(always)] pub fn is_negative_pulse(&self) -> bool { - **self == REG_GPIO_22_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE + *self == GPIO22TRIGGER_MODE_A::NEGATIVE_PULSE } #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"] #[inline(always)] pub fn is_positive_pulse(&self) -> bool { - **self == REG_GPIO_22_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE + *self == GPIO22TRIGGER_MODE_A::POSITIVE_PULSE } #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"] #[inline(always)] pub fn is_negative_level(&self) -> bool { - **self == REG_GPIO_22_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL + *self == GPIO22TRIGGER_MODE_A::NEGATIVE_LEVEL } #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"] #[inline(always)] pub fn is_positive_level(&self) -> bool { - **self == REG_GPIO_22_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL - } -} -impl core::ops::Deref for REG_GPIO_22_INTERRUPT_TRIGGER_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO22TRIGGER_MODE_A::POSITIVE_LEVEL } } #[doc = "Field `reg_gpio_22_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO22."] -pub struct REG_GPIO_22_INTERRUPT_TRIGGER_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_22_INTERRUPT_TRIGGER_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_22_INTERRUPT_TRIGGER_MODE_A) -> &'a mut W { - self.bits(variant.into()) - } +pub type REG_GPIO_22_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET3_SPEC, u8, GPIO22TRIGGER_MODE_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_22_INTERRUPT_TRIGGER_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn negative_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_22_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE) + self.variant(GPIO22TRIGGER_MODE_A::NEGATIVE_PULSE) } #[doc = "`1`"] #[inline(always)] pub fn positive_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_22_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE) + self.variant(GPIO22TRIGGER_MODE_A::POSITIVE_PULSE) } #[doc = "`10`"] #[inline(always)] pub fn negative_level(self) -> &'a mut W { - self.variant(REG_GPIO_22_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL) + self.variant(GPIO22TRIGGER_MODE_A::NEGATIVE_LEVEL) } #[doc = "`11`"] #[inline(always)] pub fn positive_level(self) -> &'a mut W { - self.variant(REG_GPIO_22_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 6)) | ((value as u32 & 0x03) << 6); - self.w + self.variant(GPIO22TRIGGER_MODE_A::POSITIVE_LEVEL) } } +#[doc = "Field `reg_gpio_22_interrupt_control_mode` reader - Interrupt control mode register for GPIO22."] +pub type REG_GPIO_22_INTERRUPT_CONTROL_MODE_R = crate::BitReader; #[doc = "Interrupt control mode register for GPIO22.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_22_INTERRUPT_CONTROL_MODE_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO22CONTROL_MODE_A { #[doc = "0: `0`"] SYNCHRONOUS = 0, #[doc = "1: `1`"] ASYNCHRONOUS = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_22_INTERRUPT_CONTROL_MODE_A) -> Self { + fn from(variant: GPIO22CONTROL_MODE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_22_interrupt_control_mode` reader - Interrupt control mode register for GPIO22."] -pub struct REG_GPIO_22_INTERRUPT_CONTROL_MODE_R( - crate::FieldReader, -); impl REG_GPIO_22_INTERRUPT_CONTROL_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_22_INTERRUPT_CONTROL_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_22_INTERRUPT_CONTROL_MODE_A { + pub fn variant(&self) -> GPIO22CONTROL_MODE_A { match self.bits { - false => REG_GPIO_22_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS, - true => REG_GPIO_22_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS, + false => GPIO22CONTROL_MODE_A::SYNCHRONOUS, + true => GPIO22CONTROL_MODE_A::ASYNCHRONOUS, } } #[doc = "Checks if the value of the field is `SYNCHRONOUS`"] #[inline(always)] pub fn is_synchronous(&self) -> bool { - **self == REG_GPIO_22_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS + *self == GPIO22CONTROL_MODE_A::SYNCHRONOUS } #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"] #[inline(always)] pub fn is_asynchronous(&self) -> bool { - **self == REG_GPIO_22_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS - } -} -impl core::ops::Deref for REG_GPIO_22_INTERRUPT_CONTROL_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO22CONTROL_MODE_A::ASYNCHRONOUS } } #[doc = "Field `reg_gpio_22_interrupt_control_mode` writer - Interrupt control mode register for GPIO22."] -pub struct REG_GPIO_22_INTERRUPT_CONTROL_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_22_INTERRUPT_CONTROL_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_22_INTERRUPT_CONTROL_MODE_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_22_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MODE_SET3_SPEC, GPIO22CONTROL_MODE_A, O>; +impl<'a, const O: u8> REG_GPIO_22_INTERRUPT_CONTROL_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn synchronous(self) -> &'a mut W { - self.variant(REG_GPIO_22_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS) + self.variant(GPIO22CONTROL_MODE_A::SYNCHRONOUS) } #[doc = "`1`"] #[inline(always)] pub fn asynchronous(self) -> &'a mut W { - self.variant(REG_GPIO_22_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w + self.variant(GPIO22CONTROL_MODE_A::ASYNCHRONOUS) } } +#[doc = "Field `reg_gpio_23_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO23."] +pub type REG_GPIO_23_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader; #[doc = "Interrupt trigger mode register for GPIO23.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_23_INTERRUPT_TRIGGER_MODE_A { +pub enum GPIO23TRIGGER_MODE_A { #[doc = "0: `0`"] NEGATIVE_PULSE = 0, #[doc = "1: `1`"] @@ -609,185 +439,127 @@ pub enum REG_GPIO_23_INTERRUPT_TRIGGER_MODE_A { #[doc = "3: `11`"] POSITIVE_LEVEL = 3, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_23_INTERRUPT_TRIGGER_MODE_A) -> Self { + fn from(variant: GPIO23TRIGGER_MODE_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_23_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO23."] -pub struct REG_GPIO_23_INTERRUPT_TRIGGER_MODE_R( - crate::FieldReader, -); impl REG_GPIO_23_INTERRUPT_TRIGGER_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_23_INTERRUPT_TRIGGER_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_23_INTERRUPT_TRIGGER_MODE_A { + pub fn variant(&self) -> GPIO23TRIGGER_MODE_A { match self.bits { - 0 => REG_GPIO_23_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE, - 1 => REG_GPIO_23_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE, - 2 => REG_GPIO_23_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL, - 3 => REG_GPIO_23_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL, + 0 => GPIO23TRIGGER_MODE_A::NEGATIVE_PULSE, + 1 => GPIO23TRIGGER_MODE_A::POSITIVE_PULSE, + 2 => GPIO23TRIGGER_MODE_A::NEGATIVE_LEVEL, + 3 => GPIO23TRIGGER_MODE_A::POSITIVE_LEVEL, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"] #[inline(always)] pub fn is_negative_pulse(&self) -> bool { - **self == REG_GPIO_23_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE + *self == GPIO23TRIGGER_MODE_A::NEGATIVE_PULSE } #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"] #[inline(always)] pub fn is_positive_pulse(&self) -> bool { - **self == REG_GPIO_23_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE + *self == GPIO23TRIGGER_MODE_A::POSITIVE_PULSE } #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"] #[inline(always)] pub fn is_negative_level(&self) -> bool { - **self == REG_GPIO_23_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL + *self == GPIO23TRIGGER_MODE_A::NEGATIVE_LEVEL } #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"] #[inline(always)] pub fn is_positive_level(&self) -> bool { - **self == REG_GPIO_23_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL - } -} -impl core::ops::Deref for REG_GPIO_23_INTERRUPT_TRIGGER_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO23TRIGGER_MODE_A::POSITIVE_LEVEL } } #[doc = "Field `reg_gpio_23_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO23."] -pub struct REG_GPIO_23_INTERRUPT_TRIGGER_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_23_INTERRUPT_TRIGGER_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_23_INTERRUPT_TRIGGER_MODE_A) -> &'a mut W { - self.bits(variant.into()) - } +pub type REG_GPIO_23_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET3_SPEC, u8, GPIO23TRIGGER_MODE_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_23_INTERRUPT_TRIGGER_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn negative_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_23_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE) + self.variant(GPIO23TRIGGER_MODE_A::NEGATIVE_PULSE) } #[doc = "`1`"] #[inline(always)] pub fn positive_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_23_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE) + self.variant(GPIO23TRIGGER_MODE_A::POSITIVE_PULSE) } #[doc = "`10`"] #[inline(always)] pub fn negative_level(self) -> &'a mut W { - self.variant(REG_GPIO_23_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL) + self.variant(GPIO23TRIGGER_MODE_A::NEGATIVE_LEVEL) } #[doc = "`11`"] #[inline(always)] pub fn positive_level(self) -> &'a mut W { - self.variant(REG_GPIO_23_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 9)) | ((value as u32 & 0x03) << 9); - self.w + self.variant(GPIO23TRIGGER_MODE_A::POSITIVE_LEVEL) } } +#[doc = "Field `reg_gpio_23_interrupt_control_mode` reader - Interrupt control mode register for GPIO23."] +pub type REG_GPIO_23_INTERRUPT_CONTROL_MODE_R = crate::BitReader; #[doc = "Interrupt control mode register for GPIO23.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_23_INTERRUPT_CONTROL_MODE_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO23CONTROL_MODE_A { #[doc = "0: `0`"] SYNCHRONOUS = 0, #[doc = "1: `1`"] ASYNCHRONOUS = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_23_INTERRUPT_CONTROL_MODE_A) -> Self { + fn from(variant: GPIO23CONTROL_MODE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_23_interrupt_control_mode` reader - Interrupt control mode register for GPIO23."] -pub struct REG_GPIO_23_INTERRUPT_CONTROL_MODE_R( - crate::FieldReader, -); impl REG_GPIO_23_INTERRUPT_CONTROL_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_23_INTERRUPT_CONTROL_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_23_INTERRUPT_CONTROL_MODE_A { + pub fn variant(&self) -> GPIO23CONTROL_MODE_A { match self.bits { - false => REG_GPIO_23_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS, - true => REG_GPIO_23_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS, + false => GPIO23CONTROL_MODE_A::SYNCHRONOUS, + true => GPIO23CONTROL_MODE_A::ASYNCHRONOUS, } } #[doc = "Checks if the value of the field is `SYNCHRONOUS`"] #[inline(always)] pub fn is_synchronous(&self) -> bool { - **self == REG_GPIO_23_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS + *self == GPIO23CONTROL_MODE_A::SYNCHRONOUS } #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"] #[inline(always)] pub fn is_asynchronous(&self) -> bool { - **self == REG_GPIO_23_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS - } -} -impl core::ops::Deref for REG_GPIO_23_INTERRUPT_CONTROL_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO23CONTROL_MODE_A::ASYNCHRONOUS } } #[doc = "Field `reg_gpio_23_interrupt_control_mode` writer - Interrupt control mode register for GPIO23."] -pub struct REG_GPIO_23_INTERRUPT_CONTROL_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_23_INTERRUPT_CONTROL_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_23_INTERRUPT_CONTROL_MODE_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_23_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MODE_SET3_SPEC, GPIO23CONTROL_MODE_A, O>; +impl<'a, const O: u8> REG_GPIO_23_INTERRUPT_CONTROL_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn synchronous(self) -> &'a mut W { - self.variant(REG_GPIO_23_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS) + self.variant(GPIO23CONTROL_MODE_A::SYNCHRONOUS) } #[doc = "`1`"] #[inline(always)] pub fn asynchronous(self) -> &'a mut W { - self.variant(REG_GPIO_23_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w + self.variant(GPIO23CONTROL_MODE_A::ASYNCHRONOUS) } } +#[doc = "Field `reg_gpio_24_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO24."] +pub type REG_GPIO_24_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader; #[doc = "Interrupt trigger mode register for GPIO24.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_24_INTERRUPT_TRIGGER_MODE_A { +pub enum GPIO24TRIGGER_MODE_A { #[doc = "0: `0`"] NEGATIVE_PULSE = 0, #[doc = "1: `1`"] @@ -797,185 +569,127 @@ pub enum REG_GPIO_24_INTERRUPT_TRIGGER_MODE_A { #[doc = "3: `11`"] POSITIVE_LEVEL = 3, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_24_INTERRUPT_TRIGGER_MODE_A) -> Self { + fn from(variant: GPIO24TRIGGER_MODE_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_24_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO24."] -pub struct REG_GPIO_24_INTERRUPT_TRIGGER_MODE_R( - crate::FieldReader, -); impl REG_GPIO_24_INTERRUPT_TRIGGER_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_24_INTERRUPT_TRIGGER_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_24_INTERRUPT_TRIGGER_MODE_A { + pub fn variant(&self) -> GPIO24TRIGGER_MODE_A { match self.bits { - 0 => REG_GPIO_24_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE, - 1 => REG_GPIO_24_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE, - 2 => REG_GPIO_24_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL, - 3 => REG_GPIO_24_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL, + 0 => GPIO24TRIGGER_MODE_A::NEGATIVE_PULSE, + 1 => GPIO24TRIGGER_MODE_A::POSITIVE_PULSE, + 2 => GPIO24TRIGGER_MODE_A::NEGATIVE_LEVEL, + 3 => GPIO24TRIGGER_MODE_A::POSITIVE_LEVEL, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"] #[inline(always)] pub fn is_negative_pulse(&self) -> bool { - **self == REG_GPIO_24_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE + *self == GPIO24TRIGGER_MODE_A::NEGATIVE_PULSE } #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"] #[inline(always)] pub fn is_positive_pulse(&self) -> bool { - **self == REG_GPIO_24_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE + *self == GPIO24TRIGGER_MODE_A::POSITIVE_PULSE } #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"] #[inline(always)] pub fn is_negative_level(&self) -> bool { - **self == REG_GPIO_24_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL + *self == GPIO24TRIGGER_MODE_A::NEGATIVE_LEVEL } #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"] #[inline(always)] pub fn is_positive_level(&self) -> bool { - **self == REG_GPIO_24_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL - } -} -impl core::ops::Deref for REG_GPIO_24_INTERRUPT_TRIGGER_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO24TRIGGER_MODE_A::POSITIVE_LEVEL } } #[doc = "Field `reg_gpio_24_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO24."] -pub struct REG_GPIO_24_INTERRUPT_TRIGGER_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_24_INTERRUPT_TRIGGER_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_24_INTERRUPT_TRIGGER_MODE_A) -> &'a mut W { - self.bits(variant.into()) - } +pub type REG_GPIO_24_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET3_SPEC, u8, GPIO24TRIGGER_MODE_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_24_INTERRUPT_TRIGGER_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn negative_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_24_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE) + self.variant(GPIO24TRIGGER_MODE_A::NEGATIVE_PULSE) } #[doc = "`1`"] #[inline(always)] pub fn positive_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_24_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE) + self.variant(GPIO24TRIGGER_MODE_A::POSITIVE_PULSE) } #[doc = "`10`"] #[inline(always)] pub fn negative_level(self) -> &'a mut W { - self.variant(REG_GPIO_24_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL) + self.variant(GPIO24TRIGGER_MODE_A::NEGATIVE_LEVEL) } #[doc = "`11`"] #[inline(always)] pub fn positive_level(self) -> &'a mut W { - self.variant(REG_GPIO_24_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 12)) | ((value as u32 & 0x03) << 12); - self.w + self.variant(GPIO24TRIGGER_MODE_A::POSITIVE_LEVEL) } } +#[doc = "Field `reg_gpio_24_interrupt_control_mode` reader - Interrupt control mode register for GPIO24."] +pub type REG_GPIO_24_INTERRUPT_CONTROL_MODE_R = crate::BitReader; #[doc = "Interrupt control mode register for GPIO24.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_24_INTERRUPT_CONTROL_MODE_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO24CONTROL_MODE_A { #[doc = "0: `0`"] SYNCHRONOUS = 0, #[doc = "1: `1`"] ASYNCHRONOUS = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_24_INTERRUPT_CONTROL_MODE_A) -> Self { + fn from(variant: GPIO24CONTROL_MODE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_24_interrupt_control_mode` reader - Interrupt control mode register for GPIO24."] -pub struct REG_GPIO_24_INTERRUPT_CONTROL_MODE_R( - crate::FieldReader, -); impl REG_GPIO_24_INTERRUPT_CONTROL_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_24_INTERRUPT_CONTROL_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_24_INTERRUPT_CONTROL_MODE_A { + pub fn variant(&self) -> GPIO24CONTROL_MODE_A { match self.bits { - false => REG_GPIO_24_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS, - true => REG_GPIO_24_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS, + false => GPIO24CONTROL_MODE_A::SYNCHRONOUS, + true => GPIO24CONTROL_MODE_A::ASYNCHRONOUS, } } #[doc = "Checks if the value of the field is `SYNCHRONOUS`"] #[inline(always)] pub fn is_synchronous(&self) -> bool { - **self == REG_GPIO_24_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS + *self == GPIO24CONTROL_MODE_A::SYNCHRONOUS } #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"] #[inline(always)] pub fn is_asynchronous(&self) -> bool { - **self == REG_GPIO_24_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS - } -} -impl core::ops::Deref for REG_GPIO_24_INTERRUPT_CONTROL_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO24CONTROL_MODE_A::ASYNCHRONOUS } } #[doc = "Field `reg_gpio_24_interrupt_control_mode` writer - Interrupt control mode register for GPIO24."] -pub struct REG_GPIO_24_INTERRUPT_CONTROL_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_24_INTERRUPT_CONTROL_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_24_INTERRUPT_CONTROL_MODE_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_24_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MODE_SET3_SPEC, GPIO24CONTROL_MODE_A, O>; +impl<'a, const O: u8> REG_GPIO_24_INTERRUPT_CONTROL_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn synchronous(self) -> &'a mut W { - self.variant(REG_GPIO_24_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS) + self.variant(GPIO24CONTROL_MODE_A::SYNCHRONOUS) } #[doc = "`1`"] #[inline(always)] pub fn asynchronous(self) -> &'a mut W { - self.variant(REG_GPIO_24_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14); - self.w + self.variant(GPIO24CONTROL_MODE_A::ASYNCHRONOUS) } } +#[doc = "Field `reg_gpio_25_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO25."] +pub type REG_GPIO_25_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader; #[doc = "Interrupt trigger mode register for GPIO25.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_25_INTERRUPT_TRIGGER_MODE_A { +pub enum GPIO25TRIGGER_MODE_A { #[doc = "0: `0`"] NEGATIVE_PULSE = 0, #[doc = "1: `1`"] @@ -985,185 +699,127 @@ pub enum REG_GPIO_25_INTERRUPT_TRIGGER_MODE_A { #[doc = "3: `11`"] POSITIVE_LEVEL = 3, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_25_INTERRUPT_TRIGGER_MODE_A) -> Self { + fn from(variant: GPIO25TRIGGER_MODE_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_25_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO25."] -pub struct REG_GPIO_25_INTERRUPT_TRIGGER_MODE_R( - crate::FieldReader, -); impl REG_GPIO_25_INTERRUPT_TRIGGER_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_25_INTERRUPT_TRIGGER_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_25_INTERRUPT_TRIGGER_MODE_A { + pub fn variant(&self) -> GPIO25TRIGGER_MODE_A { match self.bits { - 0 => REG_GPIO_25_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE, - 1 => REG_GPIO_25_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE, - 2 => REG_GPIO_25_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL, - 3 => REG_GPIO_25_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL, + 0 => GPIO25TRIGGER_MODE_A::NEGATIVE_PULSE, + 1 => GPIO25TRIGGER_MODE_A::POSITIVE_PULSE, + 2 => GPIO25TRIGGER_MODE_A::NEGATIVE_LEVEL, + 3 => GPIO25TRIGGER_MODE_A::POSITIVE_LEVEL, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"] #[inline(always)] pub fn is_negative_pulse(&self) -> bool { - **self == REG_GPIO_25_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE + *self == GPIO25TRIGGER_MODE_A::NEGATIVE_PULSE } #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"] #[inline(always)] pub fn is_positive_pulse(&self) -> bool { - **self == REG_GPIO_25_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE + *self == GPIO25TRIGGER_MODE_A::POSITIVE_PULSE } #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"] #[inline(always)] pub fn is_negative_level(&self) -> bool { - **self == REG_GPIO_25_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL + *self == GPIO25TRIGGER_MODE_A::NEGATIVE_LEVEL } #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"] #[inline(always)] pub fn is_positive_level(&self) -> bool { - **self == REG_GPIO_25_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL - } -} -impl core::ops::Deref for REG_GPIO_25_INTERRUPT_TRIGGER_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO25TRIGGER_MODE_A::POSITIVE_LEVEL } } #[doc = "Field `reg_gpio_25_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO25."] -pub struct REG_GPIO_25_INTERRUPT_TRIGGER_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_25_INTERRUPT_TRIGGER_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_25_INTERRUPT_TRIGGER_MODE_A) -> &'a mut W { - self.bits(variant.into()) - } +pub type REG_GPIO_25_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET3_SPEC, u8, GPIO25TRIGGER_MODE_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_25_INTERRUPT_TRIGGER_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn negative_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_25_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE) + self.variant(GPIO25TRIGGER_MODE_A::NEGATIVE_PULSE) } #[doc = "`1`"] #[inline(always)] pub fn positive_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_25_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE) + self.variant(GPIO25TRIGGER_MODE_A::POSITIVE_PULSE) } #[doc = "`10`"] #[inline(always)] pub fn negative_level(self) -> &'a mut W { - self.variant(REG_GPIO_25_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL) + self.variant(GPIO25TRIGGER_MODE_A::NEGATIVE_LEVEL) } #[doc = "`11`"] #[inline(always)] pub fn positive_level(self) -> &'a mut W { - self.variant(REG_GPIO_25_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 15)) | ((value as u32 & 0x03) << 15); - self.w + self.variant(GPIO25TRIGGER_MODE_A::POSITIVE_LEVEL) } } +#[doc = "Field `reg_gpio_25_interrupt_control_mode` reader - Interrupt control mode register for GPIO25."] +pub type REG_GPIO_25_INTERRUPT_CONTROL_MODE_R = crate::BitReader; #[doc = "Interrupt control mode register for GPIO25.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_25_INTERRUPT_CONTROL_MODE_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO25CONTROL_MODE_A { #[doc = "0: `0`"] SYNCHRONOUS = 0, #[doc = "1: `1`"] ASYNCHRONOUS = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_25_INTERRUPT_CONTROL_MODE_A) -> Self { + fn from(variant: GPIO25CONTROL_MODE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_25_interrupt_control_mode` reader - Interrupt control mode register for GPIO25."] -pub struct REG_GPIO_25_INTERRUPT_CONTROL_MODE_R( - crate::FieldReader, -); impl REG_GPIO_25_INTERRUPT_CONTROL_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_25_INTERRUPT_CONTROL_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_25_INTERRUPT_CONTROL_MODE_A { + pub fn variant(&self) -> GPIO25CONTROL_MODE_A { match self.bits { - false => REG_GPIO_25_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS, - true => REG_GPIO_25_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS, + false => GPIO25CONTROL_MODE_A::SYNCHRONOUS, + true => GPIO25CONTROL_MODE_A::ASYNCHRONOUS, } } #[doc = "Checks if the value of the field is `SYNCHRONOUS`"] #[inline(always)] pub fn is_synchronous(&self) -> bool { - **self == REG_GPIO_25_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS + *self == GPIO25CONTROL_MODE_A::SYNCHRONOUS } #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"] #[inline(always)] pub fn is_asynchronous(&self) -> bool { - **self == REG_GPIO_25_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS - } -} -impl core::ops::Deref for REG_GPIO_25_INTERRUPT_CONTROL_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO25CONTROL_MODE_A::ASYNCHRONOUS } } #[doc = "Field `reg_gpio_25_interrupt_control_mode` writer - Interrupt control mode register for GPIO25."] -pub struct REG_GPIO_25_INTERRUPT_CONTROL_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_25_INTERRUPT_CONTROL_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_25_INTERRUPT_CONTROL_MODE_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_25_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MODE_SET3_SPEC, GPIO25CONTROL_MODE_A, O>; +impl<'a, const O: u8> REG_GPIO_25_INTERRUPT_CONTROL_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn synchronous(self) -> &'a mut W { - self.variant(REG_GPIO_25_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS) + self.variant(GPIO25CONTROL_MODE_A::SYNCHRONOUS) } #[doc = "`1`"] #[inline(always)] pub fn asynchronous(self) -> &'a mut W { - self.variant(REG_GPIO_25_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w + self.variant(GPIO25CONTROL_MODE_A::ASYNCHRONOUS) } } +#[doc = "Field `reg_gpio_26_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO26."] +pub type REG_GPIO_26_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader; #[doc = "Interrupt trigger mode register for GPIO26.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_26_INTERRUPT_TRIGGER_MODE_A { +pub enum GPIO26TRIGGER_MODE_A { #[doc = "0: `0`"] NEGATIVE_PULSE = 0, #[doc = "1: `1`"] @@ -1173,185 +829,127 @@ pub enum REG_GPIO_26_INTERRUPT_TRIGGER_MODE_A { #[doc = "3: `11`"] POSITIVE_LEVEL = 3, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_26_INTERRUPT_TRIGGER_MODE_A) -> Self { + fn from(variant: GPIO26TRIGGER_MODE_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_26_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO26."] -pub struct REG_GPIO_26_INTERRUPT_TRIGGER_MODE_R( - crate::FieldReader, -); impl REG_GPIO_26_INTERRUPT_TRIGGER_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_26_INTERRUPT_TRIGGER_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_26_INTERRUPT_TRIGGER_MODE_A { + pub fn variant(&self) -> GPIO26TRIGGER_MODE_A { match self.bits { - 0 => REG_GPIO_26_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE, - 1 => REG_GPIO_26_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE, - 2 => REG_GPIO_26_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL, - 3 => REG_GPIO_26_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL, + 0 => GPIO26TRIGGER_MODE_A::NEGATIVE_PULSE, + 1 => GPIO26TRIGGER_MODE_A::POSITIVE_PULSE, + 2 => GPIO26TRIGGER_MODE_A::NEGATIVE_LEVEL, + 3 => GPIO26TRIGGER_MODE_A::POSITIVE_LEVEL, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"] #[inline(always)] pub fn is_negative_pulse(&self) -> bool { - **self == REG_GPIO_26_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE + *self == GPIO26TRIGGER_MODE_A::NEGATIVE_PULSE } #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"] #[inline(always)] pub fn is_positive_pulse(&self) -> bool { - **self == REG_GPIO_26_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE + *self == GPIO26TRIGGER_MODE_A::POSITIVE_PULSE } #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"] #[inline(always)] pub fn is_negative_level(&self) -> bool { - **self == REG_GPIO_26_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL + *self == GPIO26TRIGGER_MODE_A::NEGATIVE_LEVEL } #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"] #[inline(always)] pub fn is_positive_level(&self) -> bool { - **self == REG_GPIO_26_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL - } -} -impl core::ops::Deref for REG_GPIO_26_INTERRUPT_TRIGGER_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO26TRIGGER_MODE_A::POSITIVE_LEVEL } } #[doc = "Field `reg_gpio_26_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO26."] -pub struct REG_GPIO_26_INTERRUPT_TRIGGER_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_26_INTERRUPT_TRIGGER_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_26_INTERRUPT_TRIGGER_MODE_A) -> &'a mut W { - self.bits(variant.into()) - } +pub type REG_GPIO_26_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET3_SPEC, u8, GPIO26TRIGGER_MODE_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_26_INTERRUPT_TRIGGER_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn negative_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_26_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE) + self.variant(GPIO26TRIGGER_MODE_A::NEGATIVE_PULSE) } #[doc = "`1`"] #[inline(always)] pub fn positive_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_26_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE) + self.variant(GPIO26TRIGGER_MODE_A::POSITIVE_PULSE) } #[doc = "`10`"] #[inline(always)] pub fn negative_level(self) -> &'a mut W { - self.variant(REG_GPIO_26_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL) + self.variant(GPIO26TRIGGER_MODE_A::NEGATIVE_LEVEL) } #[doc = "`11`"] #[inline(always)] pub fn positive_level(self) -> &'a mut W { - self.variant(REG_GPIO_26_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 18)) | ((value as u32 & 0x03) << 18); - self.w + self.variant(GPIO26TRIGGER_MODE_A::POSITIVE_LEVEL) } } +#[doc = "Field `reg_gpio_26_interrupt_control_mode` reader - Interrupt control mode register for GPIO26."] +pub type REG_GPIO_26_INTERRUPT_CONTROL_MODE_R = crate::BitReader; #[doc = "Interrupt control mode register for GPIO26.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_26_INTERRUPT_CONTROL_MODE_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO26CONTROL_MODE_A { #[doc = "0: `0`"] SYNCHRONOUS = 0, #[doc = "1: `1`"] ASYNCHRONOUS = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_26_INTERRUPT_CONTROL_MODE_A) -> Self { + fn from(variant: GPIO26CONTROL_MODE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_26_interrupt_control_mode` reader - Interrupt control mode register for GPIO26."] -pub struct REG_GPIO_26_INTERRUPT_CONTROL_MODE_R( - crate::FieldReader, -); impl REG_GPIO_26_INTERRUPT_CONTROL_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_26_INTERRUPT_CONTROL_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_26_INTERRUPT_CONTROL_MODE_A { + pub fn variant(&self) -> GPIO26CONTROL_MODE_A { match self.bits { - false => REG_GPIO_26_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS, - true => REG_GPIO_26_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS, + false => GPIO26CONTROL_MODE_A::SYNCHRONOUS, + true => GPIO26CONTROL_MODE_A::ASYNCHRONOUS, } } #[doc = "Checks if the value of the field is `SYNCHRONOUS`"] #[inline(always)] pub fn is_synchronous(&self) -> bool { - **self == REG_GPIO_26_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS + *self == GPIO26CONTROL_MODE_A::SYNCHRONOUS } #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"] #[inline(always)] pub fn is_asynchronous(&self) -> bool { - **self == REG_GPIO_26_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS - } -} -impl core::ops::Deref for REG_GPIO_26_INTERRUPT_CONTROL_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO26CONTROL_MODE_A::ASYNCHRONOUS } } #[doc = "Field `reg_gpio_26_interrupt_control_mode` writer - Interrupt control mode register for GPIO26."] -pub struct REG_GPIO_26_INTERRUPT_CONTROL_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_26_INTERRUPT_CONTROL_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_26_INTERRUPT_CONTROL_MODE_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_26_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MODE_SET3_SPEC, GPIO26CONTROL_MODE_A, O>; +impl<'a, const O: u8> REG_GPIO_26_INTERRUPT_CONTROL_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn synchronous(self) -> &'a mut W { - self.variant(REG_GPIO_26_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS) + self.variant(GPIO26CONTROL_MODE_A::SYNCHRONOUS) } #[doc = "`1`"] #[inline(always)] pub fn asynchronous(self) -> &'a mut W { - self.variant(REG_GPIO_26_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w + self.variant(GPIO26CONTROL_MODE_A::ASYNCHRONOUS) } } +#[doc = "Field `reg_gpio_27_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO27."] +pub type REG_GPIO_27_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader; #[doc = "Interrupt trigger mode register for GPIO27.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_27_INTERRUPT_TRIGGER_MODE_A { +pub enum GPIO27TRIGGER_MODE_A { #[doc = "0: `0`"] NEGATIVE_PULSE = 0, #[doc = "1: `1`"] @@ -1361,185 +959,127 @@ pub enum REG_GPIO_27_INTERRUPT_TRIGGER_MODE_A { #[doc = "3: `11`"] POSITIVE_LEVEL = 3, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_27_INTERRUPT_TRIGGER_MODE_A) -> Self { + fn from(variant: GPIO27TRIGGER_MODE_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_27_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO27."] -pub struct REG_GPIO_27_INTERRUPT_TRIGGER_MODE_R( - crate::FieldReader, -); impl REG_GPIO_27_INTERRUPT_TRIGGER_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_27_INTERRUPT_TRIGGER_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_27_INTERRUPT_TRIGGER_MODE_A { + pub fn variant(&self) -> GPIO27TRIGGER_MODE_A { match self.bits { - 0 => REG_GPIO_27_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE, - 1 => REG_GPIO_27_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE, - 2 => REG_GPIO_27_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL, - 3 => REG_GPIO_27_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL, + 0 => GPIO27TRIGGER_MODE_A::NEGATIVE_PULSE, + 1 => GPIO27TRIGGER_MODE_A::POSITIVE_PULSE, + 2 => GPIO27TRIGGER_MODE_A::NEGATIVE_LEVEL, + 3 => GPIO27TRIGGER_MODE_A::POSITIVE_LEVEL, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"] #[inline(always)] pub fn is_negative_pulse(&self) -> bool { - **self == REG_GPIO_27_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE + *self == GPIO27TRIGGER_MODE_A::NEGATIVE_PULSE } #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"] #[inline(always)] pub fn is_positive_pulse(&self) -> bool { - **self == REG_GPIO_27_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE + *self == GPIO27TRIGGER_MODE_A::POSITIVE_PULSE } #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"] #[inline(always)] pub fn is_negative_level(&self) -> bool { - **self == REG_GPIO_27_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL + *self == GPIO27TRIGGER_MODE_A::NEGATIVE_LEVEL } #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"] #[inline(always)] pub fn is_positive_level(&self) -> bool { - **self == REG_GPIO_27_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL - } -} -impl core::ops::Deref for REG_GPIO_27_INTERRUPT_TRIGGER_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO27TRIGGER_MODE_A::POSITIVE_LEVEL } } #[doc = "Field `reg_gpio_27_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO27."] -pub struct REG_GPIO_27_INTERRUPT_TRIGGER_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_27_INTERRUPT_TRIGGER_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_27_INTERRUPT_TRIGGER_MODE_A) -> &'a mut W { - self.bits(variant.into()) - } +pub type REG_GPIO_27_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET3_SPEC, u8, GPIO27TRIGGER_MODE_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_27_INTERRUPT_TRIGGER_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn negative_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_27_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE) + self.variant(GPIO27TRIGGER_MODE_A::NEGATIVE_PULSE) } #[doc = "`1`"] #[inline(always)] pub fn positive_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_27_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE) + self.variant(GPIO27TRIGGER_MODE_A::POSITIVE_PULSE) } #[doc = "`10`"] #[inline(always)] pub fn negative_level(self) -> &'a mut W { - self.variant(REG_GPIO_27_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL) + self.variant(GPIO27TRIGGER_MODE_A::NEGATIVE_LEVEL) } #[doc = "`11`"] #[inline(always)] pub fn positive_level(self) -> &'a mut W { - self.variant(REG_GPIO_27_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 21)) | ((value as u32 & 0x03) << 21); - self.w + self.variant(GPIO27TRIGGER_MODE_A::POSITIVE_LEVEL) } } +#[doc = "Field `reg_gpio_27_interrupt_control_mode` reader - Interrupt control mode register for GPIO27."] +pub type REG_GPIO_27_INTERRUPT_CONTROL_MODE_R = crate::BitReader; #[doc = "Interrupt control mode register for GPIO27.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_27_INTERRUPT_CONTROL_MODE_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO27CONTROL_MODE_A { #[doc = "0: `0`"] SYNCHRONOUS = 0, #[doc = "1: `1`"] ASYNCHRONOUS = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_27_INTERRUPT_CONTROL_MODE_A) -> Self { + fn from(variant: GPIO27CONTROL_MODE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_27_interrupt_control_mode` reader - Interrupt control mode register for GPIO27."] -pub struct REG_GPIO_27_INTERRUPT_CONTROL_MODE_R( - crate::FieldReader, -); impl REG_GPIO_27_INTERRUPT_CONTROL_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_27_INTERRUPT_CONTROL_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_27_INTERRUPT_CONTROL_MODE_A { + pub fn variant(&self) -> GPIO27CONTROL_MODE_A { match self.bits { - false => REG_GPIO_27_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS, - true => REG_GPIO_27_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS, + false => GPIO27CONTROL_MODE_A::SYNCHRONOUS, + true => GPIO27CONTROL_MODE_A::ASYNCHRONOUS, } } #[doc = "Checks if the value of the field is `SYNCHRONOUS`"] #[inline(always)] pub fn is_synchronous(&self) -> bool { - **self == REG_GPIO_27_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS + *self == GPIO27CONTROL_MODE_A::SYNCHRONOUS } #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"] #[inline(always)] pub fn is_asynchronous(&self) -> bool { - **self == REG_GPIO_27_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS - } -} -impl core::ops::Deref for REG_GPIO_27_INTERRUPT_CONTROL_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO27CONTROL_MODE_A::ASYNCHRONOUS } } #[doc = "Field `reg_gpio_27_interrupt_control_mode` writer - Interrupt control mode register for GPIO27."] -pub struct REG_GPIO_27_INTERRUPT_CONTROL_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_27_INTERRUPT_CONTROL_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_27_INTERRUPT_CONTROL_MODE_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_27_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MODE_SET3_SPEC, GPIO27CONTROL_MODE_A, O>; +impl<'a, const O: u8> REG_GPIO_27_INTERRUPT_CONTROL_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn synchronous(self) -> &'a mut W { - self.variant(REG_GPIO_27_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS) + self.variant(GPIO27CONTROL_MODE_A::SYNCHRONOUS) } #[doc = "`1`"] #[inline(always)] pub fn asynchronous(self) -> &'a mut W { - self.variant(REG_GPIO_27_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23); - self.w + self.variant(GPIO27CONTROL_MODE_A::ASYNCHRONOUS) } } +#[doc = "Field `reg_gpio_28_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO28."] +pub type REG_GPIO_28_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader; #[doc = "Interrupt trigger mode register for GPIO28.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_28_INTERRUPT_TRIGGER_MODE_A { +pub enum GPIO28TRIGGER_MODE_A { #[doc = "0: `0`"] NEGATIVE_PULSE = 0, #[doc = "1: `1`"] @@ -1549,185 +1089,127 @@ pub enum REG_GPIO_28_INTERRUPT_TRIGGER_MODE_A { #[doc = "3: `11`"] POSITIVE_LEVEL = 3, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_28_INTERRUPT_TRIGGER_MODE_A) -> Self { + fn from(variant: GPIO28TRIGGER_MODE_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_28_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO28."] -pub struct REG_GPIO_28_INTERRUPT_TRIGGER_MODE_R( - crate::FieldReader, -); impl REG_GPIO_28_INTERRUPT_TRIGGER_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_28_INTERRUPT_TRIGGER_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_28_INTERRUPT_TRIGGER_MODE_A { + pub fn variant(&self) -> GPIO28TRIGGER_MODE_A { match self.bits { - 0 => REG_GPIO_28_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE, - 1 => REG_GPIO_28_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE, - 2 => REG_GPIO_28_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL, - 3 => REG_GPIO_28_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL, + 0 => GPIO28TRIGGER_MODE_A::NEGATIVE_PULSE, + 1 => GPIO28TRIGGER_MODE_A::POSITIVE_PULSE, + 2 => GPIO28TRIGGER_MODE_A::NEGATIVE_LEVEL, + 3 => GPIO28TRIGGER_MODE_A::POSITIVE_LEVEL, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"] #[inline(always)] pub fn is_negative_pulse(&self) -> bool { - **self == REG_GPIO_28_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE + *self == GPIO28TRIGGER_MODE_A::NEGATIVE_PULSE } #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"] #[inline(always)] pub fn is_positive_pulse(&self) -> bool { - **self == REG_GPIO_28_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE + *self == GPIO28TRIGGER_MODE_A::POSITIVE_PULSE } #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"] #[inline(always)] pub fn is_negative_level(&self) -> bool { - **self == REG_GPIO_28_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL + *self == GPIO28TRIGGER_MODE_A::NEGATIVE_LEVEL } #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"] #[inline(always)] pub fn is_positive_level(&self) -> bool { - **self == REG_GPIO_28_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL - } -} -impl core::ops::Deref for REG_GPIO_28_INTERRUPT_TRIGGER_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO28TRIGGER_MODE_A::POSITIVE_LEVEL } } #[doc = "Field `reg_gpio_28_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO28."] -pub struct REG_GPIO_28_INTERRUPT_TRIGGER_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_28_INTERRUPT_TRIGGER_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_28_INTERRUPT_TRIGGER_MODE_A) -> &'a mut W { - self.bits(variant.into()) - } +pub type REG_GPIO_28_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET3_SPEC, u8, GPIO28TRIGGER_MODE_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_28_INTERRUPT_TRIGGER_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn negative_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_28_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE) + self.variant(GPIO28TRIGGER_MODE_A::NEGATIVE_PULSE) } #[doc = "`1`"] #[inline(always)] pub fn positive_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_28_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE) + self.variant(GPIO28TRIGGER_MODE_A::POSITIVE_PULSE) } #[doc = "`10`"] #[inline(always)] pub fn negative_level(self) -> &'a mut W { - self.variant(REG_GPIO_28_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL) + self.variant(GPIO28TRIGGER_MODE_A::NEGATIVE_LEVEL) } #[doc = "`11`"] #[inline(always)] pub fn positive_level(self) -> &'a mut W { - self.variant(REG_GPIO_28_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 24)) | ((value as u32 & 0x03) << 24); - self.w + self.variant(GPIO28TRIGGER_MODE_A::POSITIVE_LEVEL) } } +#[doc = "Field `reg_gpio_28_interrupt_control_mode` reader - Interrupt control mode register for GPIO28."] +pub type REG_GPIO_28_INTERRUPT_CONTROL_MODE_R = crate::BitReader; #[doc = "Interrupt control mode register for GPIO28.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_28_INTERRUPT_CONTROL_MODE_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO28CONTROL_MODE_A { #[doc = "0: `0`"] SYNCHRONOUS = 0, #[doc = "1: `1`"] ASYNCHRONOUS = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_28_INTERRUPT_CONTROL_MODE_A) -> Self { + fn from(variant: GPIO28CONTROL_MODE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_28_interrupt_control_mode` reader - Interrupt control mode register for GPIO28."] -pub struct REG_GPIO_28_INTERRUPT_CONTROL_MODE_R( - crate::FieldReader, -); impl REG_GPIO_28_INTERRUPT_CONTROL_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_28_INTERRUPT_CONTROL_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_28_INTERRUPT_CONTROL_MODE_A { + pub fn variant(&self) -> GPIO28CONTROL_MODE_A { match self.bits { - false => REG_GPIO_28_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS, - true => REG_GPIO_28_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS, + false => GPIO28CONTROL_MODE_A::SYNCHRONOUS, + true => GPIO28CONTROL_MODE_A::ASYNCHRONOUS, } } #[doc = "Checks if the value of the field is `SYNCHRONOUS`"] #[inline(always)] pub fn is_synchronous(&self) -> bool { - **self == REG_GPIO_28_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS + *self == GPIO28CONTROL_MODE_A::SYNCHRONOUS } #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"] #[inline(always)] pub fn is_asynchronous(&self) -> bool { - **self == REG_GPIO_28_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS - } -} -impl core::ops::Deref for REG_GPIO_28_INTERRUPT_CONTROL_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO28CONTROL_MODE_A::ASYNCHRONOUS } } #[doc = "Field `reg_gpio_28_interrupt_control_mode` writer - Interrupt control mode register for GPIO28."] -pub struct REG_GPIO_28_INTERRUPT_CONTROL_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_28_INTERRUPT_CONTROL_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_28_INTERRUPT_CONTROL_MODE_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_28_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MODE_SET3_SPEC, GPIO28CONTROL_MODE_A, O>; +impl<'a, const O: u8> REG_GPIO_28_INTERRUPT_CONTROL_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn synchronous(self) -> &'a mut W { - self.variant(REG_GPIO_28_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS) + self.variant(GPIO28CONTROL_MODE_A::SYNCHRONOUS) } #[doc = "`1`"] #[inline(always)] pub fn asynchronous(self) -> &'a mut W { - self.variant(REG_GPIO_28_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 26)) | ((value as u32 & 0x01) << 26); - self.w + self.variant(GPIO28CONTROL_MODE_A::ASYNCHRONOUS) } } +#[doc = "Field `reg_gpio_29_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO29."] +pub type REG_GPIO_29_INTERRUPT_TRIGGER_MODE_R = crate::FieldReader; #[doc = "Interrupt trigger mode register for GPIO29.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] -pub enum REG_GPIO_29_INTERRUPT_TRIGGER_MODE_A { +pub enum GPIO29TRIGGER_MODE_A { #[doc = "0: `0`"] NEGATIVE_PULSE = 0, #[doc = "1: `1`"] @@ -1737,385 +1219,386 @@ pub enum REG_GPIO_29_INTERRUPT_TRIGGER_MODE_A { #[doc = "3: `11`"] POSITIVE_LEVEL = 3, } -impl From for u8 { +impl From for u8 { #[inline(always)] - fn from(variant: REG_GPIO_29_INTERRUPT_TRIGGER_MODE_A) -> Self { + fn from(variant: GPIO29TRIGGER_MODE_A) -> Self { variant as _ } } -#[doc = "Field `reg_gpio_29_interrupt_trigger_mode` reader - Interrupt trigger mode register for GPIO29."] -pub struct REG_GPIO_29_INTERRUPT_TRIGGER_MODE_R( - crate::FieldReader, -); impl REG_GPIO_29_INTERRUPT_TRIGGER_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - REG_GPIO_29_INTERRUPT_TRIGGER_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_29_INTERRUPT_TRIGGER_MODE_A { + pub fn variant(&self) -> GPIO29TRIGGER_MODE_A { match self.bits { - 0 => REG_GPIO_29_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE, - 1 => REG_GPIO_29_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE, - 2 => REG_GPIO_29_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL, - 3 => REG_GPIO_29_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL, + 0 => GPIO29TRIGGER_MODE_A::NEGATIVE_PULSE, + 1 => GPIO29TRIGGER_MODE_A::POSITIVE_PULSE, + 2 => GPIO29TRIGGER_MODE_A::NEGATIVE_LEVEL, + 3 => GPIO29TRIGGER_MODE_A::POSITIVE_LEVEL, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `NEGATIVE_PULSE`"] #[inline(always)] pub fn is_negative_pulse(&self) -> bool { - **self == REG_GPIO_29_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE + *self == GPIO29TRIGGER_MODE_A::NEGATIVE_PULSE } #[doc = "Checks if the value of the field is `POSITIVE_PULSE`"] #[inline(always)] pub fn is_positive_pulse(&self) -> bool { - **self == REG_GPIO_29_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE + *self == GPIO29TRIGGER_MODE_A::POSITIVE_PULSE } #[doc = "Checks if the value of the field is `NEGATIVE_LEVEL`"] #[inline(always)] pub fn is_negative_level(&self) -> bool { - **self == REG_GPIO_29_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL + *self == GPIO29TRIGGER_MODE_A::NEGATIVE_LEVEL } #[doc = "Checks if the value of the field is `POSITIVE_LEVEL`"] #[inline(always)] pub fn is_positive_level(&self) -> bool { - **self == REG_GPIO_29_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL - } -} -impl core::ops::Deref for REG_GPIO_29_INTERRUPT_TRIGGER_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO29TRIGGER_MODE_A::POSITIVE_LEVEL } } #[doc = "Field `reg_gpio_29_interrupt_trigger_mode` writer - Interrupt trigger mode register for GPIO29."] -pub struct REG_GPIO_29_INTERRUPT_TRIGGER_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_29_INTERRUPT_TRIGGER_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_29_INTERRUPT_TRIGGER_MODE_A) -> &'a mut W { - self.bits(variant.into()) - } +pub type REG_GPIO_29_INTERRUPT_TRIGGER_MODE_W<'a, const O: u8> = + crate::FieldWriterSafe<'a, u32, GPIO_INT_MODE_SET3_SPEC, u8, GPIO29TRIGGER_MODE_A, 2, O>; +impl<'a, const O: u8> REG_GPIO_29_INTERRUPT_TRIGGER_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn negative_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_29_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_PULSE) + self.variant(GPIO29TRIGGER_MODE_A::NEGATIVE_PULSE) } #[doc = "`1`"] #[inline(always)] pub fn positive_pulse(self) -> &'a mut W { - self.variant(REG_GPIO_29_INTERRUPT_TRIGGER_MODE_A::POSITIVE_PULSE) + self.variant(GPIO29TRIGGER_MODE_A::POSITIVE_PULSE) } #[doc = "`10`"] #[inline(always)] pub fn negative_level(self) -> &'a mut W { - self.variant(REG_GPIO_29_INTERRUPT_TRIGGER_MODE_A::NEGATIVE_LEVEL) + self.variant(GPIO29TRIGGER_MODE_A::NEGATIVE_LEVEL) } #[doc = "`11`"] #[inline(always)] pub fn positive_level(self) -> &'a mut W { - self.variant(REG_GPIO_29_INTERRUPT_TRIGGER_MODE_A::POSITIVE_LEVEL) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 27)) | ((value as u32 & 0x03) << 27); - self.w + self.variant(GPIO29TRIGGER_MODE_A::POSITIVE_LEVEL) } } +#[doc = "Field `reg_gpio_29_interrupt_control_mode` reader - Interrupt control mode register for GPIO29."] +pub type REG_GPIO_29_INTERRUPT_CONTROL_MODE_R = crate::BitReader; #[doc = "Interrupt control mode register for GPIO29.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_29_INTERRUPT_CONTROL_MODE_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO29CONTROL_MODE_A { #[doc = "0: `0`"] SYNCHRONOUS = 0, #[doc = "1: `1`"] ASYNCHRONOUS = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_29_INTERRUPT_CONTROL_MODE_A) -> Self { + fn from(variant: GPIO29CONTROL_MODE_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_29_interrupt_control_mode` reader - Interrupt control mode register for GPIO29."] -pub struct REG_GPIO_29_INTERRUPT_CONTROL_MODE_R( - crate::FieldReader, -); impl REG_GPIO_29_INTERRUPT_CONTROL_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_29_INTERRUPT_CONTROL_MODE_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_29_INTERRUPT_CONTROL_MODE_A { + pub fn variant(&self) -> GPIO29CONTROL_MODE_A { match self.bits { - false => REG_GPIO_29_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS, - true => REG_GPIO_29_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS, + false => GPIO29CONTROL_MODE_A::SYNCHRONOUS, + true => GPIO29CONTROL_MODE_A::ASYNCHRONOUS, } } #[doc = "Checks if the value of the field is `SYNCHRONOUS`"] #[inline(always)] pub fn is_synchronous(&self) -> bool { - **self == REG_GPIO_29_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS + *self == GPIO29CONTROL_MODE_A::SYNCHRONOUS } #[doc = "Checks if the value of the field is `ASYNCHRONOUS`"] #[inline(always)] pub fn is_asynchronous(&self) -> bool { - **self == REG_GPIO_29_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS - } -} -impl core::ops::Deref for REG_GPIO_29_INTERRUPT_CONTROL_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO29CONTROL_MODE_A::ASYNCHRONOUS } } #[doc = "Field `reg_gpio_29_interrupt_control_mode` writer - Interrupt control mode register for GPIO29."] -pub struct REG_GPIO_29_INTERRUPT_CONTROL_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> REG_GPIO_29_INTERRUPT_CONTROL_MODE_W<'a> { - #[doc = r"Writes `variant` to the field"] - #[inline(always)] - pub fn variant(self, variant: REG_GPIO_29_INTERRUPT_CONTROL_MODE_A) -> &'a mut W { - self.bit(variant.into()) - } +pub type REG_GPIO_29_INTERRUPT_CONTROL_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPIO_INT_MODE_SET3_SPEC, GPIO29CONTROL_MODE_A, O>; +impl<'a, const O: u8> REG_GPIO_29_INTERRUPT_CONTROL_MODE_W<'a, O> { #[doc = "`0`"] #[inline(always)] pub fn synchronous(self) -> &'a mut W { - self.variant(REG_GPIO_29_INTERRUPT_CONTROL_MODE_A::SYNCHRONOUS) + self.variant(GPIO29CONTROL_MODE_A::SYNCHRONOUS) } #[doc = "`1`"] #[inline(always)] pub fn asynchronous(self) -> &'a mut W { - self.variant(REG_GPIO_29_INTERRUPT_CONTROL_MODE_A::ASYNCHRONOUS) - } - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 29)) | ((value as u32 & 0x01) << 29); - self.w + self.variant(GPIO29CONTROL_MODE_A::ASYNCHRONOUS) } } impl R { #[doc = "Bits 0:1 - Interrupt trigger mode register for GPIO20."] #[inline(always)] pub fn reg_gpio_20_interrupt_trigger_mode(&self) -> REG_GPIO_20_INTERRUPT_TRIGGER_MODE_R { - REG_GPIO_20_INTERRUPT_TRIGGER_MODE_R::new((self.bits & 0x03) as u8) + REG_GPIO_20_INTERRUPT_TRIGGER_MODE_R::new((self.bits & 3) as u8) } #[doc = "Bit 2 - Interrupt control mode register for GPIO20."] #[inline(always)] pub fn reg_gpio_20_interrupt_control_mode(&self) -> REG_GPIO_20_INTERRUPT_CONTROL_MODE_R { - REG_GPIO_20_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 2) & 0x01) != 0) + REG_GPIO_20_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 2) & 1) != 0) } #[doc = "Bits 3:4 - Interrupt trigger mode register for GPIO21."] #[inline(always)] pub fn reg_gpio_21_interrupt_trigger_mode(&self) -> REG_GPIO_21_INTERRUPT_TRIGGER_MODE_R { - REG_GPIO_21_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 3) & 0x03) as u8) + REG_GPIO_21_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 3) & 3) as u8) } #[doc = "Bit 5 - Interrupt control mode register for GPIO21."] #[inline(always)] pub fn reg_gpio_21_interrupt_control_mode(&self) -> REG_GPIO_21_INTERRUPT_CONTROL_MODE_R { - REG_GPIO_21_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 5) & 0x01) != 0) + REG_GPIO_21_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 5) & 1) != 0) } #[doc = "Bits 6:7 - Interrupt trigger mode register for GPIO22."] #[inline(always)] pub fn reg_gpio_22_interrupt_trigger_mode(&self) -> REG_GPIO_22_INTERRUPT_TRIGGER_MODE_R { - REG_GPIO_22_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 6) & 0x03) as u8) + REG_GPIO_22_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 6) & 3) as u8) } #[doc = "Bit 8 - Interrupt control mode register for GPIO22."] #[inline(always)] pub fn reg_gpio_22_interrupt_control_mode(&self) -> REG_GPIO_22_INTERRUPT_CONTROL_MODE_R { - REG_GPIO_22_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 8) & 0x01) != 0) + REG_GPIO_22_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 8) & 1) != 0) } #[doc = "Bits 9:10 - Interrupt trigger mode register for GPIO23."] #[inline(always)] pub fn reg_gpio_23_interrupt_trigger_mode(&self) -> REG_GPIO_23_INTERRUPT_TRIGGER_MODE_R { - REG_GPIO_23_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 9) & 0x03) as u8) + REG_GPIO_23_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 9) & 3) as u8) } #[doc = "Bit 11 - Interrupt control mode register for GPIO23."] #[inline(always)] pub fn reg_gpio_23_interrupt_control_mode(&self) -> REG_GPIO_23_INTERRUPT_CONTROL_MODE_R { - REG_GPIO_23_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 11) & 0x01) != 0) + REG_GPIO_23_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 11) & 1) != 0) } #[doc = "Bits 12:13 - Interrupt trigger mode register for GPIO24."] #[inline(always)] pub fn reg_gpio_24_interrupt_trigger_mode(&self) -> REG_GPIO_24_INTERRUPT_TRIGGER_MODE_R { - REG_GPIO_24_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 12) & 0x03) as u8) + REG_GPIO_24_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 12) & 3) as u8) } #[doc = "Bit 14 - Interrupt control mode register for GPIO24."] #[inline(always)] pub fn reg_gpio_24_interrupt_control_mode(&self) -> REG_GPIO_24_INTERRUPT_CONTROL_MODE_R { - REG_GPIO_24_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 14) & 0x01) != 0) + REG_GPIO_24_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 14) & 1) != 0) } #[doc = "Bits 15:16 - Interrupt trigger mode register for GPIO25."] #[inline(always)] pub fn reg_gpio_25_interrupt_trigger_mode(&self) -> REG_GPIO_25_INTERRUPT_TRIGGER_MODE_R { - REG_GPIO_25_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 15) & 0x03) as u8) + REG_GPIO_25_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 15) & 3) as u8) } #[doc = "Bit 17 - Interrupt control mode register for GPIO25."] #[inline(always)] pub fn reg_gpio_25_interrupt_control_mode(&self) -> REG_GPIO_25_INTERRUPT_CONTROL_MODE_R { - REG_GPIO_25_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 17) & 0x01) != 0) + REG_GPIO_25_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 17) & 1) != 0) } #[doc = "Bits 18:19 - Interrupt trigger mode register for GPIO26."] #[inline(always)] pub fn reg_gpio_26_interrupt_trigger_mode(&self) -> REG_GPIO_26_INTERRUPT_TRIGGER_MODE_R { - REG_GPIO_26_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 18) & 0x03) as u8) + REG_GPIO_26_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 18) & 3) as u8) } #[doc = "Bit 20 - Interrupt control mode register for GPIO26."] #[inline(always)] pub fn reg_gpio_26_interrupt_control_mode(&self) -> REG_GPIO_26_INTERRUPT_CONTROL_MODE_R { - REG_GPIO_26_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 20) & 0x01) != 0) + REG_GPIO_26_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 20) & 1) != 0) } #[doc = "Bits 21:22 - Interrupt trigger mode register for GPIO27."] #[inline(always)] pub fn reg_gpio_27_interrupt_trigger_mode(&self) -> REG_GPIO_27_INTERRUPT_TRIGGER_MODE_R { - REG_GPIO_27_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 21) & 0x03) as u8) + REG_GPIO_27_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 21) & 3) as u8) } #[doc = "Bit 23 - Interrupt control mode register for GPIO27."] #[inline(always)] pub fn reg_gpio_27_interrupt_control_mode(&self) -> REG_GPIO_27_INTERRUPT_CONTROL_MODE_R { - REG_GPIO_27_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 23) & 0x01) != 0) + REG_GPIO_27_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 23) & 1) != 0) } #[doc = "Bits 24:25 - Interrupt trigger mode register for GPIO28."] #[inline(always)] pub fn reg_gpio_28_interrupt_trigger_mode(&self) -> REG_GPIO_28_INTERRUPT_TRIGGER_MODE_R { - REG_GPIO_28_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 24) & 0x03) as u8) + REG_GPIO_28_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 24) & 3) as u8) } #[doc = "Bit 26 - Interrupt control mode register for GPIO28."] #[inline(always)] pub fn reg_gpio_28_interrupt_control_mode(&self) -> REG_GPIO_28_INTERRUPT_CONTROL_MODE_R { - REG_GPIO_28_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 26) & 0x01) != 0) + REG_GPIO_28_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 26) & 1) != 0) } #[doc = "Bits 27:28 - Interrupt trigger mode register for GPIO29."] #[inline(always)] pub fn reg_gpio_29_interrupt_trigger_mode(&self) -> REG_GPIO_29_INTERRUPT_TRIGGER_MODE_R { - REG_GPIO_29_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 27) & 0x03) as u8) + REG_GPIO_29_INTERRUPT_TRIGGER_MODE_R::new(((self.bits >> 27) & 3) as u8) } #[doc = "Bit 29 - Interrupt control mode register for GPIO29."] #[inline(always)] pub fn reg_gpio_29_interrupt_control_mode(&self) -> REG_GPIO_29_INTERRUPT_CONTROL_MODE_R { - REG_GPIO_29_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 29) & 0x01) != 0) + REG_GPIO_29_INTERRUPT_CONTROL_MODE_R::new(((self.bits >> 29) & 1) != 0) } } impl W { #[doc = "Bits 0:1 - Interrupt trigger mode register for GPIO20."] #[inline(always)] - pub fn reg_gpio_20_interrupt_trigger_mode(&mut self) -> REG_GPIO_20_INTERRUPT_TRIGGER_MODE_W { - REG_GPIO_20_INTERRUPT_TRIGGER_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_20_interrupt_trigger_mode( + &mut self, + ) -> REG_GPIO_20_INTERRUPT_TRIGGER_MODE_W<0> { + REG_GPIO_20_INTERRUPT_TRIGGER_MODE_W::new(self) } #[doc = "Bit 2 - Interrupt control mode register for GPIO20."] #[inline(always)] - pub fn reg_gpio_20_interrupt_control_mode(&mut self) -> REG_GPIO_20_INTERRUPT_CONTROL_MODE_W { - REG_GPIO_20_INTERRUPT_CONTROL_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_20_interrupt_control_mode( + &mut self, + ) -> REG_GPIO_20_INTERRUPT_CONTROL_MODE_W<2> { + REG_GPIO_20_INTERRUPT_CONTROL_MODE_W::new(self) } #[doc = "Bits 3:4 - Interrupt trigger mode register for GPIO21."] #[inline(always)] - pub fn reg_gpio_21_interrupt_trigger_mode(&mut self) -> REG_GPIO_21_INTERRUPT_TRIGGER_MODE_W { - REG_GPIO_21_INTERRUPT_TRIGGER_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_21_interrupt_trigger_mode( + &mut self, + ) -> REG_GPIO_21_INTERRUPT_TRIGGER_MODE_W<3> { + REG_GPIO_21_INTERRUPT_TRIGGER_MODE_W::new(self) } #[doc = "Bit 5 - Interrupt control mode register for GPIO21."] #[inline(always)] - pub fn reg_gpio_21_interrupt_control_mode(&mut self) -> REG_GPIO_21_INTERRUPT_CONTROL_MODE_W { - REG_GPIO_21_INTERRUPT_CONTROL_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_21_interrupt_control_mode( + &mut self, + ) -> REG_GPIO_21_INTERRUPT_CONTROL_MODE_W<5> { + REG_GPIO_21_INTERRUPT_CONTROL_MODE_W::new(self) } #[doc = "Bits 6:7 - Interrupt trigger mode register for GPIO22."] #[inline(always)] - pub fn reg_gpio_22_interrupt_trigger_mode(&mut self) -> REG_GPIO_22_INTERRUPT_TRIGGER_MODE_W { - REG_GPIO_22_INTERRUPT_TRIGGER_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_22_interrupt_trigger_mode( + &mut self, + ) -> REG_GPIO_22_INTERRUPT_TRIGGER_MODE_W<6> { + REG_GPIO_22_INTERRUPT_TRIGGER_MODE_W::new(self) } #[doc = "Bit 8 - Interrupt control mode register for GPIO22."] #[inline(always)] - pub fn reg_gpio_22_interrupt_control_mode(&mut self) -> REG_GPIO_22_INTERRUPT_CONTROL_MODE_W { - REG_GPIO_22_INTERRUPT_CONTROL_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_22_interrupt_control_mode( + &mut self, + ) -> REG_GPIO_22_INTERRUPT_CONTROL_MODE_W<8> { + REG_GPIO_22_INTERRUPT_CONTROL_MODE_W::new(self) } #[doc = "Bits 9:10 - Interrupt trigger mode register for GPIO23."] #[inline(always)] - pub fn reg_gpio_23_interrupt_trigger_mode(&mut self) -> REG_GPIO_23_INTERRUPT_TRIGGER_MODE_W { - REG_GPIO_23_INTERRUPT_TRIGGER_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_23_interrupt_trigger_mode( + &mut self, + ) -> REG_GPIO_23_INTERRUPT_TRIGGER_MODE_W<9> { + REG_GPIO_23_INTERRUPT_TRIGGER_MODE_W::new(self) } #[doc = "Bit 11 - Interrupt control mode register for GPIO23."] #[inline(always)] - pub fn reg_gpio_23_interrupt_control_mode(&mut self) -> REG_GPIO_23_INTERRUPT_CONTROL_MODE_W { - REG_GPIO_23_INTERRUPT_CONTROL_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_23_interrupt_control_mode( + &mut self, + ) -> REG_GPIO_23_INTERRUPT_CONTROL_MODE_W<11> { + REG_GPIO_23_INTERRUPT_CONTROL_MODE_W::new(self) } #[doc = "Bits 12:13 - Interrupt trigger mode register for GPIO24."] #[inline(always)] - pub fn reg_gpio_24_interrupt_trigger_mode(&mut self) -> REG_GPIO_24_INTERRUPT_TRIGGER_MODE_W { - REG_GPIO_24_INTERRUPT_TRIGGER_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_24_interrupt_trigger_mode( + &mut self, + ) -> REG_GPIO_24_INTERRUPT_TRIGGER_MODE_W<12> { + REG_GPIO_24_INTERRUPT_TRIGGER_MODE_W::new(self) } #[doc = "Bit 14 - Interrupt control mode register for GPIO24."] #[inline(always)] - pub fn reg_gpio_24_interrupt_control_mode(&mut self) -> REG_GPIO_24_INTERRUPT_CONTROL_MODE_W { - REG_GPIO_24_INTERRUPT_CONTROL_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_24_interrupt_control_mode( + &mut self, + ) -> REG_GPIO_24_INTERRUPT_CONTROL_MODE_W<14> { + REG_GPIO_24_INTERRUPT_CONTROL_MODE_W::new(self) } #[doc = "Bits 15:16 - Interrupt trigger mode register for GPIO25."] #[inline(always)] - pub fn reg_gpio_25_interrupt_trigger_mode(&mut self) -> REG_GPIO_25_INTERRUPT_TRIGGER_MODE_W { - REG_GPIO_25_INTERRUPT_TRIGGER_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_25_interrupt_trigger_mode( + &mut self, + ) -> REG_GPIO_25_INTERRUPT_TRIGGER_MODE_W<15> { + REG_GPIO_25_INTERRUPT_TRIGGER_MODE_W::new(self) } #[doc = "Bit 17 - Interrupt control mode register for GPIO25."] #[inline(always)] - pub fn reg_gpio_25_interrupt_control_mode(&mut self) -> REG_GPIO_25_INTERRUPT_CONTROL_MODE_W { - REG_GPIO_25_INTERRUPT_CONTROL_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_25_interrupt_control_mode( + &mut self, + ) -> REG_GPIO_25_INTERRUPT_CONTROL_MODE_W<17> { + REG_GPIO_25_INTERRUPT_CONTROL_MODE_W::new(self) } #[doc = "Bits 18:19 - Interrupt trigger mode register for GPIO26."] #[inline(always)] - pub fn reg_gpio_26_interrupt_trigger_mode(&mut self) -> REG_GPIO_26_INTERRUPT_TRIGGER_MODE_W { - REG_GPIO_26_INTERRUPT_TRIGGER_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_26_interrupt_trigger_mode( + &mut self, + ) -> REG_GPIO_26_INTERRUPT_TRIGGER_MODE_W<18> { + REG_GPIO_26_INTERRUPT_TRIGGER_MODE_W::new(self) } #[doc = "Bit 20 - Interrupt control mode register for GPIO26."] #[inline(always)] - pub fn reg_gpio_26_interrupt_control_mode(&mut self) -> REG_GPIO_26_INTERRUPT_CONTROL_MODE_W { - REG_GPIO_26_INTERRUPT_CONTROL_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_26_interrupt_control_mode( + &mut self, + ) -> REG_GPIO_26_INTERRUPT_CONTROL_MODE_W<20> { + REG_GPIO_26_INTERRUPT_CONTROL_MODE_W::new(self) } #[doc = "Bits 21:22 - Interrupt trigger mode register for GPIO27."] #[inline(always)] - pub fn reg_gpio_27_interrupt_trigger_mode(&mut self) -> REG_GPIO_27_INTERRUPT_TRIGGER_MODE_W { - REG_GPIO_27_INTERRUPT_TRIGGER_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_27_interrupt_trigger_mode( + &mut self, + ) -> REG_GPIO_27_INTERRUPT_TRIGGER_MODE_W<21> { + REG_GPIO_27_INTERRUPT_TRIGGER_MODE_W::new(self) } #[doc = "Bit 23 - Interrupt control mode register for GPIO27."] #[inline(always)] - pub fn reg_gpio_27_interrupt_control_mode(&mut self) -> REG_GPIO_27_INTERRUPT_CONTROL_MODE_W { - REG_GPIO_27_INTERRUPT_CONTROL_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_27_interrupt_control_mode( + &mut self, + ) -> REG_GPIO_27_INTERRUPT_CONTROL_MODE_W<23> { + REG_GPIO_27_INTERRUPT_CONTROL_MODE_W::new(self) } #[doc = "Bits 24:25 - Interrupt trigger mode register for GPIO28."] #[inline(always)] - pub fn reg_gpio_28_interrupt_trigger_mode(&mut self) -> REG_GPIO_28_INTERRUPT_TRIGGER_MODE_W { - REG_GPIO_28_INTERRUPT_TRIGGER_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_28_interrupt_trigger_mode( + &mut self, + ) -> REG_GPIO_28_INTERRUPT_TRIGGER_MODE_W<24> { + REG_GPIO_28_INTERRUPT_TRIGGER_MODE_W::new(self) } #[doc = "Bit 26 - Interrupt control mode register for GPIO28."] #[inline(always)] - pub fn reg_gpio_28_interrupt_control_mode(&mut self) -> REG_GPIO_28_INTERRUPT_CONTROL_MODE_W { - REG_GPIO_28_INTERRUPT_CONTROL_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_28_interrupt_control_mode( + &mut self, + ) -> REG_GPIO_28_INTERRUPT_CONTROL_MODE_W<26> { + REG_GPIO_28_INTERRUPT_CONTROL_MODE_W::new(self) } #[doc = "Bits 27:28 - Interrupt trigger mode register for GPIO29."] #[inline(always)] - pub fn reg_gpio_29_interrupt_trigger_mode(&mut self) -> REG_GPIO_29_INTERRUPT_TRIGGER_MODE_W { - REG_GPIO_29_INTERRUPT_TRIGGER_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_29_interrupt_trigger_mode( + &mut self, + ) -> REG_GPIO_29_INTERRUPT_TRIGGER_MODE_W<27> { + REG_GPIO_29_INTERRUPT_TRIGGER_MODE_W::new(self) } #[doc = "Bit 29 - Interrupt control mode register for GPIO29."] #[inline(always)] - pub fn reg_gpio_29_interrupt_control_mode(&mut self) -> REG_GPIO_29_INTERRUPT_CONTROL_MODE_W { - REG_GPIO_29_INTERRUPT_CONTROL_MODE_W { w: self } + #[must_use] + pub fn reg_gpio_29_interrupt_control_mode( + &mut self, + ) -> REG_GPIO_29_INTERRUPT_CONTROL_MODE_W<29> { + REG_GPIO_29_INTERRUPT_CONTROL_MODE_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -2133,11 +1616,10 @@ impl crate::Readable for GPIO_INT_MODE_SET3_SPEC { #[doc = "`write(|w| ..)` method takes [gpio_int_mode_set3::W](W) writer structure"] impl crate::Writable for GPIO_INT_MODE_SET3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets GPIO_INT_MODE_SET3 to value 0"] impl crate::Resettable for GPIO_INT_MODE_SET3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/gpio_int_stat1.rs b/src/glb/gpio_int_stat1.rs index 69a869c..bd240d8 100644 --- a/src/glb/gpio_int_stat1.rs +++ b/src/glb/gpio_int_stat1.rs @@ -7,1490 +7,1201 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } +#[doc = "Field `reg_gpio_0_interrupt_status` reader - Interrupt status register for GPIO0."] +pub type REG_GPIO_0_INTERRUPT_STATUS_R = crate::BitReader; #[doc = "Interrupt status register for GPIO0.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_0_INTERRUPT_STATUS_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO0INTERRUPT_STATUS_A { #[doc = "0: `0`"] RESET = 0, #[doc = "1: `1`"] SET = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_0_INTERRUPT_STATUS_A) -> Self { + fn from(variant: GPIO0INTERRUPT_STATUS_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_0_interrupt_status` reader - Interrupt status register for GPIO0."] -pub struct REG_GPIO_0_INTERRUPT_STATUS_R(crate::FieldReader); impl REG_GPIO_0_INTERRUPT_STATUS_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_0_INTERRUPT_STATUS_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_0_INTERRUPT_STATUS_A { + pub fn variant(&self) -> GPIO0INTERRUPT_STATUS_A { match self.bits { - false => REG_GPIO_0_INTERRUPT_STATUS_A::RESET, - true => REG_GPIO_0_INTERRUPT_STATUS_A::SET, + false => GPIO0INTERRUPT_STATUS_A::RESET, + true => GPIO0INTERRUPT_STATUS_A::SET, } } #[doc = "Checks if the value of the field is `RESET`"] #[inline(always)] pub fn is_reset(&self) -> bool { - **self == REG_GPIO_0_INTERRUPT_STATUS_A::RESET + *self == GPIO0INTERRUPT_STATUS_A::RESET } #[doc = "Checks if the value of the field is `SET`"] #[inline(always)] pub fn is_set(&self) -> bool { - **self == REG_GPIO_0_INTERRUPT_STATUS_A::SET - } -} -impl core::ops::Deref for REG_GPIO_0_INTERRUPT_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO0INTERRUPT_STATUS_A::SET } } +#[doc = "Field `reg_gpio_1_interrupt_status` reader - Interrupt status register for GPIO1."] +pub type REG_GPIO_1_INTERRUPT_STATUS_R = crate::BitReader; #[doc = "Interrupt status register for GPIO1.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_1_INTERRUPT_STATUS_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO1INTERRUPT_STATUS_A { #[doc = "0: `0`"] RESET = 0, #[doc = "1: `1`"] SET = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_1_INTERRUPT_STATUS_A) -> Self { + fn from(variant: GPIO1INTERRUPT_STATUS_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_1_interrupt_status` reader - Interrupt status register for GPIO1."] -pub struct REG_GPIO_1_INTERRUPT_STATUS_R(crate::FieldReader); impl REG_GPIO_1_INTERRUPT_STATUS_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_1_INTERRUPT_STATUS_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_1_INTERRUPT_STATUS_A { + pub fn variant(&self) -> GPIO1INTERRUPT_STATUS_A { match self.bits { - false => REG_GPIO_1_INTERRUPT_STATUS_A::RESET, - true => REG_GPIO_1_INTERRUPT_STATUS_A::SET, + false => GPIO1INTERRUPT_STATUS_A::RESET, + true => GPIO1INTERRUPT_STATUS_A::SET, } } #[doc = "Checks if the value of the field is `RESET`"] #[inline(always)] pub fn is_reset(&self) -> bool { - **self == REG_GPIO_1_INTERRUPT_STATUS_A::RESET + *self == GPIO1INTERRUPT_STATUS_A::RESET } #[doc = "Checks if the value of the field is `SET`"] #[inline(always)] pub fn is_set(&self) -> bool { - **self == REG_GPIO_1_INTERRUPT_STATUS_A::SET - } -} -impl core::ops::Deref for REG_GPIO_1_INTERRUPT_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO1INTERRUPT_STATUS_A::SET } } +#[doc = "Field `reg_gpio_2_interrupt_status` reader - Interrupt status register for GPIO2."] +pub type REG_GPIO_2_INTERRUPT_STATUS_R = crate::BitReader; #[doc = "Interrupt status register for GPIO2.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_2_INTERRUPT_STATUS_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO2INTERRUPT_STATUS_A { #[doc = "0: `0`"] RESET = 0, #[doc = "1: `1`"] SET = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_2_INTERRUPT_STATUS_A) -> Self { + fn from(variant: GPIO2INTERRUPT_STATUS_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_2_interrupt_status` reader - Interrupt status register for GPIO2."] -pub struct REG_GPIO_2_INTERRUPT_STATUS_R(crate::FieldReader); impl REG_GPIO_2_INTERRUPT_STATUS_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_2_INTERRUPT_STATUS_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_2_INTERRUPT_STATUS_A { + pub fn variant(&self) -> GPIO2INTERRUPT_STATUS_A { match self.bits { - false => REG_GPIO_2_INTERRUPT_STATUS_A::RESET, - true => REG_GPIO_2_INTERRUPT_STATUS_A::SET, + false => GPIO2INTERRUPT_STATUS_A::RESET, + true => GPIO2INTERRUPT_STATUS_A::SET, } } #[doc = "Checks if the value of the field is `RESET`"] #[inline(always)] pub fn is_reset(&self) -> bool { - **self == REG_GPIO_2_INTERRUPT_STATUS_A::RESET + *self == GPIO2INTERRUPT_STATUS_A::RESET } #[doc = "Checks if the value of the field is `SET`"] #[inline(always)] pub fn is_set(&self) -> bool { - **self == REG_GPIO_2_INTERRUPT_STATUS_A::SET - } -} -impl core::ops::Deref for REG_GPIO_2_INTERRUPT_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO2INTERRUPT_STATUS_A::SET } } +#[doc = "Field `reg_gpio_3_interrupt_status` reader - Interrupt status register for GPIO3."] +pub type REG_GPIO_3_INTERRUPT_STATUS_R = crate::BitReader; #[doc = "Interrupt status register for GPIO3.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_3_INTERRUPT_STATUS_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO3INTERRUPT_STATUS_A { #[doc = "0: `0`"] RESET = 0, #[doc = "1: `1`"] SET = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_3_INTERRUPT_STATUS_A) -> Self { + fn from(variant: GPIO3INTERRUPT_STATUS_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_3_interrupt_status` reader - Interrupt status register for GPIO3."] -pub struct REG_GPIO_3_INTERRUPT_STATUS_R(crate::FieldReader); impl REG_GPIO_3_INTERRUPT_STATUS_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_3_INTERRUPT_STATUS_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_3_INTERRUPT_STATUS_A { + pub fn variant(&self) -> GPIO3INTERRUPT_STATUS_A { match self.bits { - false => REG_GPIO_3_INTERRUPT_STATUS_A::RESET, - true => REG_GPIO_3_INTERRUPT_STATUS_A::SET, + false => GPIO3INTERRUPT_STATUS_A::RESET, + true => GPIO3INTERRUPT_STATUS_A::SET, } } #[doc = "Checks if the value of the field is `RESET`"] #[inline(always)] pub fn is_reset(&self) -> bool { - **self == REG_GPIO_3_INTERRUPT_STATUS_A::RESET + *self == GPIO3INTERRUPT_STATUS_A::RESET } #[doc = "Checks if the value of the field is `SET`"] #[inline(always)] pub fn is_set(&self) -> bool { - **self == REG_GPIO_3_INTERRUPT_STATUS_A::SET - } -} -impl core::ops::Deref for REG_GPIO_3_INTERRUPT_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO3INTERRUPT_STATUS_A::SET } } +#[doc = "Field `reg_gpio_4_interrupt_status` reader - Interrupt status register for GPIO4."] +pub type REG_GPIO_4_INTERRUPT_STATUS_R = crate::BitReader; #[doc = "Interrupt status register for GPIO4.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_4_INTERRUPT_STATUS_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO4INTERRUPT_STATUS_A { #[doc = "0: `0`"] RESET = 0, #[doc = "1: `1`"] SET = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_4_INTERRUPT_STATUS_A) -> Self { + fn from(variant: GPIO4INTERRUPT_STATUS_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_4_interrupt_status` reader - Interrupt status register for GPIO4."] -pub struct REG_GPIO_4_INTERRUPT_STATUS_R(crate::FieldReader); impl REG_GPIO_4_INTERRUPT_STATUS_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_4_INTERRUPT_STATUS_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_4_INTERRUPT_STATUS_A { + pub fn variant(&self) -> GPIO4INTERRUPT_STATUS_A { match self.bits { - false => REG_GPIO_4_INTERRUPT_STATUS_A::RESET, - true => REG_GPIO_4_INTERRUPT_STATUS_A::SET, + false => GPIO4INTERRUPT_STATUS_A::RESET, + true => GPIO4INTERRUPT_STATUS_A::SET, } } #[doc = "Checks if the value of the field is `RESET`"] #[inline(always)] pub fn is_reset(&self) -> bool { - **self == REG_GPIO_4_INTERRUPT_STATUS_A::RESET + *self == GPIO4INTERRUPT_STATUS_A::RESET } #[doc = "Checks if the value of the field is `SET`"] #[inline(always)] pub fn is_set(&self) -> bool { - **self == REG_GPIO_4_INTERRUPT_STATUS_A::SET - } -} -impl core::ops::Deref for REG_GPIO_4_INTERRUPT_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO4INTERRUPT_STATUS_A::SET } } +#[doc = "Field `reg_gpio_5_interrupt_status` reader - Interrupt status register for GPIO5."] +pub type REG_GPIO_5_INTERRUPT_STATUS_R = crate::BitReader; #[doc = "Interrupt status register for GPIO5.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_5_INTERRUPT_STATUS_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO5INTERRUPT_STATUS_A { #[doc = "0: `0`"] RESET = 0, #[doc = "1: `1`"] SET = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_5_INTERRUPT_STATUS_A) -> Self { + fn from(variant: GPIO5INTERRUPT_STATUS_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_5_interrupt_status` reader - Interrupt status register for GPIO5."] -pub struct REG_GPIO_5_INTERRUPT_STATUS_R(crate::FieldReader); impl REG_GPIO_5_INTERRUPT_STATUS_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_5_INTERRUPT_STATUS_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_5_INTERRUPT_STATUS_A { + pub fn variant(&self) -> GPIO5INTERRUPT_STATUS_A { match self.bits { - false => REG_GPIO_5_INTERRUPT_STATUS_A::RESET, - true => REG_GPIO_5_INTERRUPT_STATUS_A::SET, + false => GPIO5INTERRUPT_STATUS_A::RESET, + true => GPIO5INTERRUPT_STATUS_A::SET, } } #[doc = "Checks if the value of the field is `RESET`"] #[inline(always)] pub fn is_reset(&self) -> bool { - **self == REG_GPIO_5_INTERRUPT_STATUS_A::RESET + *self == GPIO5INTERRUPT_STATUS_A::RESET } #[doc = "Checks if the value of the field is `SET`"] #[inline(always)] pub fn is_set(&self) -> bool { - **self == REG_GPIO_5_INTERRUPT_STATUS_A::SET - } -} -impl core::ops::Deref for REG_GPIO_5_INTERRUPT_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO5INTERRUPT_STATUS_A::SET } } +#[doc = "Field `reg_gpio_6_interrupt_status` reader - Interrupt status register for GPIO6."] +pub type REG_GPIO_6_INTERRUPT_STATUS_R = crate::BitReader; #[doc = "Interrupt status register for GPIO6.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_6_INTERRUPT_STATUS_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO6INTERRUPT_STATUS_A { #[doc = "0: `0`"] RESET = 0, #[doc = "1: `1`"] SET = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_6_INTERRUPT_STATUS_A) -> Self { + fn from(variant: GPIO6INTERRUPT_STATUS_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_6_interrupt_status` reader - Interrupt status register for GPIO6."] -pub struct REG_GPIO_6_INTERRUPT_STATUS_R(crate::FieldReader); impl REG_GPIO_6_INTERRUPT_STATUS_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_6_INTERRUPT_STATUS_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_6_INTERRUPT_STATUS_A { + pub fn variant(&self) -> GPIO6INTERRUPT_STATUS_A { match self.bits { - false => REG_GPIO_6_INTERRUPT_STATUS_A::RESET, - true => REG_GPIO_6_INTERRUPT_STATUS_A::SET, + false => GPIO6INTERRUPT_STATUS_A::RESET, + true => GPIO6INTERRUPT_STATUS_A::SET, } } #[doc = "Checks if the value of the field is `RESET`"] #[inline(always)] pub fn is_reset(&self) -> bool { - **self == REG_GPIO_6_INTERRUPT_STATUS_A::RESET + *self == GPIO6INTERRUPT_STATUS_A::RESET } #[doc = "Checks if the value of the field is `SET`"] #[inline(always)] pub fn is_set(&self) -> bool { - **self == REG_GPIO_6_INTERRUPT_STATUS_A::SET - } -} -impl core::ops::Deref for REG_GPIO_6_INTERRUPT_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO6INTERRUPT_STATUS_A::SET } } +#[doc = "Field `reg_gpio_7_interrupt_status` reader - Interrupt status register for GPIO7."] +pub type REG_GPIO_7_INTERRUPT_STATUS_R = crate::BitReader; #[doc = "Interrupt status register for GPIO7.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_7_INTERRUPT_STATUS_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO7INTERRUPT_STATUS_A { #[doc = "0: `0`"] RESET = 0, #[doc = "1: `1`"] SET = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_7_INTERRUPT_STATUS_A) -> Self { + fn from(variant: GPIO7INTERRUPT_STATUS_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_7_interrupt_status` reader - Interrupt status register for GPIO7."] -pub struct REG_GPIO_7_INTERRUPT_STATUS_R(crate::FieldReader); impl REG_GPIO_7_INTERRUPT_STATUS_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_7_INTERRUPT_STATUS_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_7_INTERRUPT_STATUS_A { + pub fn variant(&self) -> GPIO7INTERRUPT_STATUS_A { match self.bits { - false => REG_GPIO_7_INTERRUPT_STATUS_A::RESET, - true => REG_GPIO_7_INTERRUPT_STATUS_A::SET, + false => GPIO7INTERRUPT_STATUS_A::RESET, + true => GPIO7INTERRUPT_STATUS_A::SET, } } #[doc = "Checks if the value of the field is `RESET`"] #[inline(always)] pub fn is_reset(&self) -> bool { - **self == REG_GPIO_7_INTERRUPT_STATUS_A::RESET + *self == GPIO7INTERRUPT_STATUS_A::RESET } #[doc = "Checks if the value of the field is `SET`"] #[inline(always)] pub fn is_set(&self) -> bool { - **self == REG_GPIO_7_INTERRUPT_STATUS_A::SET - } -} -impl core::ops::Deref for REG_GPIO_7_INTERRUPT_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO7INTERRUPT_STATUS_A::SET } } +#[doc = "Field `reg_gpio_8_interrupt_status` reader - Interrupt status register for GPIO8."] +pub type REG_GPIO_8_INTERRUPT_STATUS_R = crate::BitReader; #[doc = "Interrupt status register for GPIO8.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_8_INTERRUPT_STATUS_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO8INTERRUPT_STATUS_A { #[doc = "0: `0`"] RESET = 0, #[doc = "1: `1`"] SET = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_8_INTERRUPT_STATUS_A) -> Self { + fn from(variant: GPIO8INTERRUPT_STATUS_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_8_interrupt_status` reader - Interrupt status register for GPIO8."] -pub struct REG_GPIO_8_INTERRUPT_STATUS_R(crate::FieldReader); impl REG_GPIO_8_INTERRUPT_STATUS_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_8_INTERRUPT_STATUS_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_8_INTERRUPT_STATUS_A { + pub fn variant(&self) -> GPIO8INTERRUPT_STATUS_A { match self.bits { - false => REG_GPIO_8_INTERRUPT_STATUS_A::RESET, - true => REG_GPIO_8_INTERRUPT_STATUS_A::SET, + false => GPIO8INTERRUPT_STATUS_A::RESET, + true => GPIO8INTERRUPT_STATUS_A::SET, } } #[doc = "Checks if the value of the field is `RESET`"] #[inline(always)] pub fn is_reset(&self) -> bool { - **self == REG_GPIO_8_INTERRUPT_STATUS_A::RESET + *self == GPIO8INTERRUPT_STATUS_A::RESET } #[doc = "Checks if the value of the field is `SET`"] #[inline(always)] pub fn is_set(&self) -> bool { - **self == REG_GPIO_8_INTERRUPT_STATUS_A::SET - } -} -impl core::ops::Deref for REG_GPIO_8_INTERRUPT_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO8INTERRUPT_STATUS_A::SET } } +#[doc = "Field `reg_gpio_9_interrupt_status` reader - Interrupt status register for GPIO9."] +pub type REG_GPIO_9_INTERRUPT_STATUS_R = crate::BitReader; #[doc = "Interrupt status register for GPIO9.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_9_INTERRUPT_STATUS_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO9INTERRUPT_STATUS_A { #[doc = "0: `0`"] RESET = 0, #[doc = "1: `1`"] SET = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_9_INTERRUPT_STATUS_A) -> Self { + fn from(variant: GPIO9INTERRUPT_STATUS_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_9_interrupt_status` reader - Interrupt status register for GPIO9."] -pub struct REG_GPIO_9_INTERRUPT_STATUS_R(crate::FieldReader); impl REG_GPIO_9_INTERRUPT_STATUS_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_9_INTERRUPT_STATUS_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_9_INTERRUPT_STATUS_A { + pub fn variant(&self) -> GPIO9INTERRUPT_STATUS_A { match self.bits { - false => REG_GPIO_9_INTERRUPT_STATUS_A::RESET, - true => REG_GPIO_9_INTERRUPT_STATUS_A::SET, + false => GPIO9INTERRUPT_STATUS_A::RESET, + true => GPIO9INTERRUPT_STATUS_A::SET, } } #[doc = "Checks if the value of the field is `RESET`"] #[inline(always)] pub fn is_reset(&self) -> bool { - **self == REG_GPIO_9_INTERRUPT_STATUS_A::RESET + *self == GPIO9INTERRUPT_STATUS_A::RESET } #[doc = "Checks if the value of the field is `SET`"] #[inline(always)] pub fn is_set(&self) -> bool { - **self == REG_GPIO_9_INTERRUPT_STATUS_A::SET - } -} -impl core::ops::Deref for REG_GPIO_9_INTERRUPT_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO9INTERRUPT_STATUS_A::SET } } +#[doc = "Field `reg_gpio_10_interrupt_status` reader - Interrupt status register for GPIO10."] +pub type REG_GPIO_10_INTERRUPT_STATUS_R = crate::BitReader; #[doc = "Interrupt status register for GPIO10.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_10_INTERRUPT_STATUS_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO10INTERRUPT_STATUS_A { #[doc = "0: `0`"] RESET = 0, #[doc = "1: `1`"] SET = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_10_INTERRUPT_STATUS_A) -> Self { + fn from(variant: GPIO10INTERRUPT_STATUS_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_10_interrupt_status` reader - Interrupt status register for GPIO10."] -pub struct REG_GPIO_10_INTERRUPT_STATUS_R(crate::FieldReader); impl REG_GPIO_10_INTERRUPT_STATUS_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_10_INTERRUPT_STATUS_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_10_INTERRUPT_STATUS_A { + pub fn variant(&self) -> GPIO10INTERRUPT_STATUS_A { match self.bits { - false => REG_GPIO_10_INTERRUPT_STATUS_A::RESET, - true => REG_GPIO_10_INTERRUPT_STATUS_A::SET, + false => GPIO10INTERRUPT_STATUS_A::RESET, + true => GPIO10INTERRUPT_STATUS_A::SET, } } #[doc = "Checks if the value of the field is `RESET`"] #[inline(always)] pub fn is_reset(&self) -> bool { - **self == REG_GPIO_10_INTERRUPT_STATUS_A::RESET + *self == GPIO10INTERRUPT_STATUS_A::RESET } #[doc = "Checks if the value of the field is `SET`"] #[inline(always)] pub fn is_set(&self) -> bool { - **self == REG_GPIO_10_INTERRUPT_STATUS_A::SET - } -} -impl core::ops::Deref for REG_GPIO_10_INTERRUPT_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO10INTERRUPT_STATUS_A::SET } } +#[doc = "Field `reg_gpio_11_interrupt_status` reader - Interrupt status register for GPIO11."] +pub type REG_GPIO_11_INTERRUPT_STATUS_R = crate::BitReader; #[doc = "Interrupt status register for GPIO11.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_11_INTERRUPT_STATUS_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO11INTERRUPT_STATUS_A { #[doc = "0: `0`"] RESET = 0, #[doc = "1: `1`"] SET = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_11_INTERRUPT_STATUS_A) -> Self { + fn from(variant: GPIO11INTERRUPT_STATUS_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_11_interrupt_status` reader - Interrupt status register for GPIO11."] -pub struct REG_GPIO_11_INTERRUPT_STATUS_R(crate::FieldReader); impl REG_GPIO_11_INTERRUPT_STATUS_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_11_INTERRUPT_STATUS_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_11_INTERRUPT_STATUS_A { + pub fn variant(&self) -> GPIO11INTERRUPT_STATUS_A { match self.bits { - false => REG_GPIO_11_INTERRUPT_STATUS_A::RESET, - true => REG_GPIO_11_INTERRUPT_STATUS_A::SET, + false => GPIO11INTERRUPT_STATUS_A::RESET, + true => GPIO11INTERRUPT_STATUS_A::SET, } } #[doc = "Checks if the value of the field is `RESET`"] #[inline(always)] pub fn is_reset(&self) -> bool { - **self == REG_GPIO_11_INTERRUPT_STATUS_A::RESET + *self == GPIO11INTERRUPT_STATUS_A::RESET } #[doc = "Checks if the value of the field is `SET`"] #[inline(always)] pub fn is_set(&self) -> bool { - **self == REG_GPIO_11_INTERRUPT_STATUS_A::SET - } -} -impl core::ops::Deref for REG_GPIO_11_INTERRUPT_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO11INTERRUPT_STATUS_A::SET } } +#[doc = "Field `reg_gpio_12_interrupt_status` reader - Interrupt status register for GPIO12."] +pub type REG_GPIO_12_INTERRUPT_STATUS_R = crate::BitReader; #[doc = "Interrupt status register for GPIO12.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_12_INTERRUPT_STATUS_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO12INTERRUPT_STATUS_A { #[doc = "0: `0`"] RESET = 0, #[doc = "1: `1`"] SET = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_12_INTERRUPT_STATUS_A) -> Self { + fn from(variant: GPIO12INTERRUPT_STATUS_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_12_interrupt_status` reader - Interrupt status register for GPIO12."] -pub struct REG_GPIO_12_INTERRUPT_STATUS_R(crate::FieldReader); impl REG_GPIO_12_INTERRUPT_STATUS_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_12_INTERRUPT_STATUS_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_12_INTERRUPT_STATUS_A { + pub fn variant(&self) -> GPIO12INTERRUPT_STATUS_A { match self.bits { - false => REG_GPIO_12_INTERRUPT_STATUS_A::RESET, - true => REG_GPIO_12_INTERRUPT_STATUS_A::SET, + false => GPIO12INTERRUPT_STATUS_A::RESET, + true => GPIO12INTERRUPT_STATUS_A::SET, } } #[doc = "Checks if the value of the field is `RESET`"] #[inline(always)] pub fn is_reset(&self) -> bool { - **self == REG_GPIO_12_INTERRUPT_STATUS_A::RESET + *self == GPIO12INTERRUPT_STATUS_A::RESET } #[doc = "Checks if the value of the field is `SET`"] #[inline(always)] pub fn is_set(&self) -> bool { - **self == REG_GPIO_12_INTERRUPT_STATUS_A::SET - } -} -impl core::ops::Deref for REG_GPIO_12_INTERRUPT_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO12INTERRUPT_STATUS_A::SET } } +#[doc = "Field `reg_gpio_13_interrupt_status` reader - Interrupt status register for GPIO13."] +pub type REG_GPIO_13_INTERRUPT_STATUS_R = crate::BitReader; #[doc = "Interrupt status register for GPIO13.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_13_INTERRUPT_STATUS_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO13INTERRUPT_STATUS_A { #[doc = "0: `0`"] RESET = 0, #[doc = "1: `1`"] SET = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_13_INTERRUPT_STATUS_A) -> Self { + fn from(variant: GPIO13INTERRUPT_STATUS_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_13_interrupt_status` reader - Interrupt status register for GPIO13."] -pub struct REG_GPIO_13_INTERRUPT_STATUS_R(crate::FieldReader); impl REG_GPIO_13_INTERRUPT_STATUS_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_13_INTERRUPT_STATUS_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_13_INTERRUPT_STATUS_A { + pub fn variant(&self) -> GPIO13INTERRUPT_STATUS_A { match self.bits { - false => REG_GPIO_13_INTERRUPT_STATUS_A::RESET, - true => REG_GPIO_13_INTERRUPT_STATUS_A::SET, + false => GPIO13INTERRUPT_STATUS_A::RESET, + true => GPIO13INTERRUPT_STATUS_A::SET, } } #[doc = "Checks if the value of the field is `RESET`"] #[inline(always)] pub fn is_reset(&self) -> bool { - **self == REG_GPIO_13_INTERRUPT_STATUS_A::RESET + *self == GPIO13INTERRUPT_STATUS_A::RESET } #[doc = "Checks if the value of the field is `SET`"] #[inline(always)] pub fn is_set(&self) -> bool { - **self == REG_GPIO_13_INTERRUPT_STATUS_A::SET - } -} -impl core::ops::Deref for REG_GPIO_13_INTERRUPT_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO13INTERRUPT_STATUS_A::SET } } +#[doc = "Field `reg_gpio_14_interrupt_status` reader - Interrupt status register for GPIO14."] +pub type REG_GPIO_14_INTERRUPT_STATUS_R = crate::BitReader; #[doc = "Interrupt status register for GPIO14.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_14_INTERRUPT_STATUS_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO14INTERRUPT_STATUS_A { #[doc = "0: `0`"] RESET = 0, #[doc = "1: `1`"] SET = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_14_INTERRUPT_STATUS_A) -> Self { + fn from(variant: GPIO14INTERRUPT_STATUS_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_14_interrupt_status` reader - Interrupt status register for GPIO14."] -pub struct REG_GPIO_14_INTERRUPT_STATUS_R(crate::FieldReader); impl REG_GPIO_14_INTERRUPT_STATUS_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_14_INTERRUPT_STATUS_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_14_INTERRUPT_STATUS_A { + pub fn variant(&self) -> GPIO14INTERRUPT_STATUS_A { match self.bits { - false => REG_GPIO_14_INTERRUPT_STATUS_A::RESET, - true => REG_GPIO_14_INTERRUPT_STATUS_A::SET, + false => GPIO14INTERRUPT_STATUS_A::RESET, + true => GPIO14INTERRUPT_STATUS_A::SET, } } #[doc = "Checks if the value of the field is `RESET`"] #[inline(always)] pub fn is_reset(&self) -> bool { - **self == REG_GPIO_14_INTERRUPT_STATUS_A::RESET + *self == GPIO14INTERRUPT_STATUS_A::RESET } #[doc = "Checks if the value of the field is `SET`"] #[inline(always)] pub fn is_set(&self) -> bool { - **self == REG_GPIO_14_INTERRUPT_STATUS_A::SET - } -} -impl core::ops::Deref for REG_GPIO_14_INTERRUPT_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO14INTERRUPT_STATUS_A::SET } } +#[doc = "Field `reg_gpio_15_interrupt_status` reader - Interrupt status register for GPIO15."] +pub type REG_GPIO_15_INTERRUPT_STATUS_R = crate::BitReader; #[doc = "Interrupt status register for GPIO15.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_15_INTERRUPT_STATUS_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO15INTERRUPT_STATUS_A { #[doc = "0: `0`"] RESET = 0, #[doc = "1: `1`"] SET = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_15_INTERRUPT_STATUS_A) -> Self { + fn from(variant: GPIO15INTERRUPT_STATUS_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_15_interrupt_status` reader - Interrupt status register for GPIO15."] -pub struct REG_GPIO_15_INTERRUPT_STATUS_R(crate::FieldReader); impl REG_GPIO_15_INTERRUPT_STATUS_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_15_INTERRUPT_STATUS_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_15_INTERRUPT_STATUS_A { + pub fn variant(&self) -> GPIO15INTERRUPT_STATUS_A { match self.bits { - false => REG_GPIO_15_INTERRUPT_STATUS_A::RESET, - true => REG_GPIO_15_INTERRUPT_STATUS_A::SET, + false => GPIO15INTERRUPT_STATUS_A::RESET, + true => GPIO15INTERRUPT_STATUS_A::SET, } } #[doc = "Checks if the value of the field is `RESET`"] #[inline(always)] pub fn is_reset(&self) -> bool { - **self == REG_GPIO_15_INTERRUPT_STATUS_A::RESET + *self == GPIO15INTERRUPT_STATUS_A::RESET } #[doc = "Checks if the value of the field is `SET`"] #[inline(always)] pub fn is_set(&self) -> bool { - **self == REG_GPIO_15_INTERRUPT_STATUS_A::SET - } -} -impl core::ops::Deref for REG_GPIO_15_INTERRUPT_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO15INTERRUPT_STATUS_A::SET } } +#[doc = "Field `reg_gpio_16_interrupt_status` reader - Interrupt status register for GPIO16."] +pub type REG_GPIO_16_INTERRUPT_STATUS_R = crate::BitReader; #[doc = "Interrupt status register for GPIO16.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_16_INTERRUPT_STATUS_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO16INTERRUPT_STATUS_A { #[doc = "0: `0`"] RESET = 0, #[doc = "1: `1`"] SET = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_16_INTERRUPT_STATUS_A) -> Self { + fn from(variant: GPIO16INTERRUPT_STATUS_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_16_interrupt_status` reader - Interrupt status register for GPIO16."] -pub struct REG_GPIO_16_INTERRUPT_STATUS_R(crate::FieldReader); impl REG_GPIO_16_INTERRUPT_STATUS_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_16_INTERRUPT_STATUS_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_16_INTERRUPT_STATUS_A { + pub fn variant(&self) -> GPIO16INTERRUPT_STATUS_A { match self.bits { - false => REG_GPIO_16_INTERRUPT_STATUS_A::RESET, - true => REG_GPIO_16_INTERRUPT_STATUS_A::SET, + false => GPIO16INTERRUPT_STATUS_A::RESET, + true => GPIO16INTERRUPT_STATUS_A::SET, } } #[doc = "Checks if the value of the field is `RESET`"] #[inline(always)] pub fn is_reset(&self) -> bool { - **self == REG_GPIO_16_INTERRUPT_STATUS_A::RESET + *self == GPIO16INTERRUPT_STATUS_A::RESET } #[doc = "Checks if the value of the field is `SET`"] #[inline(always)] pub fn is_set(&self) -> bool { - **self == REG_GPIO_16_INTERRUPT_STATUS_A::SET - } -} -impl core::ops::Deref for REG_GPIO_16_INTERRUPT_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO16INTERRUPT_STATUS_A::SET } } +#[doc = "Field `reg_gpio_17_interrupt_status` reader - Interrupt status register for GPIO17."] +pub type REG_GPIO_17_INTERRUPT_STATUS_R = crate::BitReader; #[doc = "Interrupt status register for GPIO17.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_17_INTERRUPT_STATUS_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO17INTERRUPT_STATUS_A { #[doc = "0: `0`"] RESET = 0, #[doc = "1: `1`"] SET = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_17_INTERRUPT_STATUS_A) -> Self { + fn from(variant: GPIO17INTERRUPT_STATUS_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_17_interrupt_status` reader - Interrupt status register for GPIO17."] -pub struct REG_GPIO_17_INTERRUPT_STATUS_R(crate::FieldReader); impl REG_GPIO_17_INTERRUPT_STATUS_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_17_INTERRUPT_STATUS_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_17_INTERRUPT_STATUS_A { + pub fn variant(&self) -> GPIO17INTERRUPT_STATUS_A { match self.bits { - false => REG_GPIO_17_INTERRUPT_STATUS_A::RESET, - true => REG_GPIO_17_INTERRUPT_STATUS_A::SET, + false => GPIO17INTERRUPT_STATUS_A::RESET, + true => GPIO17INTERRUPT_STATUS_A::SET, } } #[doc = "Checks if the value of the field is `RESET`"] #[inline(always)] pub fn is_reset(&self) -> bool { - **self == REG_GPIO_17_INTERRUPT_STATUS_A::RESET + *self == GPIO17INTERRUPT_STATUS_A::RESET } #[doc = "Checks if the value of the field is `SET`"] #[inline(always)] pub fn is_set(&self) -> bool { - **self == REG_GPIO_17_INTERRUPT_STATUS_A::SET - } -} -impl core::ops::Deref for REG_GPIO_17_INTERRUPT_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO17INTERRUPT_STATUS_A::SET } } +#[doc = "Field `reg_gpio_18_interrupt_status` reader - Interrupt status register for GPIO18."] +pub type REG_GPIO_18_INTERRUPT_STATUS_R = crate::BitReader; #[doc = "Interrupt status register for GPIO18.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_18_INTERRUPT_STATUS_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO18INTERRUPT_STATUS_A { #[doc = "0: `0`"] RESET = 0, #[doc = "1: `1`"] SET = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_18_INTERRUPT_STATUS_A) -> Self { + fn from(variant: GPIO18INTERRUPT_STATUS_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_18_interrupt_status` reader - Interrupt status register for GPIO18."] -pub struct REG_GPIO_18_INTERRUPT_STATUS_R(crate::FieldReader); impl REG_GPIO_18_INTERRUPT_STATUS_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_18_INTERRUPT_STATUS_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_18_INTERRUPT_STATUS_A { + pub fn variant(&self) -> GPIO18INTERRUPT_STATUS_A { match self.bits { - false => REG_GPIO_18_INTERRUPT_STATUS_A::RESET, - true => REG_GPIO_18_INTERRUPT_STATUS_A::SET, + false => GPIO18INTERRUPT_STATUS_A::RESET, + true => GPIO18INTERRUPT_STATUS_A::SET, } } #[doc = "Checks if the value of the field is `RESET`"] #[inline(always)] pub fn is_reset(&self) -> bool { - **self == REG_GPIO_18_INTERRUPT_STATUS_A::RESET + *self == GPIO18INTERRUPT_STATUS_A::RESET } #[doc = "Checks if the value of the field is `SET`"] #[inline(always)] pub fn is_set(&self) -> bool { - **self == REG_GPIO_18_INTERRUPT_STATUS_A::SET - } -} -impl core::ops::Deref for REG_GPIO_18_INTERRUPT_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO18INTERRUPT_STATUS_A::SET } } +#[doc = "Field `reg_gpio_19_interrupt_status` reader - Interrupt status register for GPIO19."] +pub type REG_GPIO_19_INTERRUPT_STATUS_R = crate::BitReader; #[doc = "Interrupt status register for GPIO19.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_19_INTERRUPT_STATUS_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO19INTERRUPT_STATUS_A { #[doc = "0: `0`"] RESET = 0, #[doc = "1: `1`"] SET = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_19_INTERRUPT_STATUS_A) -> Self { + fn from(variant: GPIO19INTERRUPT_STATUS_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_19_interrupt_status` reader - Interrupt status register for GPIO19."] -pub struct REG_GPIO_19_INTERRUPT_STATUS_R(crate::FieldReader); impl REG_GPIO_19_INTERRUPT_STATUS_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_19_INTERRUPT_STATUS_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_19_INTERRUPT_STATUS_A { + pub fn variant(&self) -> GPIO19INTERRUPT_STATUS_A { match self.bits { - false => REG_GPIO_19_INTERRUPT_STATUS_A::RESET, - true => REG_GPIO_19_INTERRUPT_STATUS_A::SET, + false => GPIO19INTERRUPT_STATUS_A::RESET, + true => GPIO19INTERRUPT_STATUS_A::SET, } } #[doc = "Checks if the value of the field is `RESET`"] #[inline(always)] pub fn is_reset(&self) -> bool { - **self == REG_GPIO_19_INTERRUPT_STATUS_A::RESET + *self == GPIO19INTERRUPT_STATUS_A::RESET } #[doc = "Checks if the value of the field is `SET`"] #[inline(always)] pub fn is_set(&self) -> bool { - **self == REG_GPIO_19_INTERRUPT_STATUS_A::SET - } -} -impl core::ops::Deref for REG_GPIO_19_INTERRUPT_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO19INTERRUPT_STATUS_A::SET } } +#[doc = "Field `reg_gpio_20_interrupt_status` reader - Interrupt status register for GPIO20."] +pub type REG_GPIO_20_INTERRUPT_STATUS_R = crate::BitReader; #[doc = "Interrupt status register for GPIO20.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_20_INTERRUPT_STATUS_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO20INTERRUPT_STATUS_A { #[doc = "0: `0`"] RESET = 0, #[doc = "1: `1`"] SET = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_20_INTERRUPT_STATUS_A) -> Self { + fn from(variant: GPIO20INTERRUPT_STATUS_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_20_interrupt_status` reader - Interrupt status register for GPIO20."] -pub struct REG_GPIO_20_INTERRUPT_STATUS_R(crate::FieldReader); impl REG_GPIO_20_INTERRUPT_STATUS_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_20_INTERRUPT_STATUS_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_20_INTERRUPT_STATUS_A { + pub fn variant(&self) -> GPIO20INTERRUPT_STATUS_A { match self.bits { - false => REG_GPIO_20_INTERRUPT_STATUS_A::RESET, - true => REG_GPIO_20_INTERRUPT_STATUS_A::SET, + false => GPIO20INTERRUPT_STATUS_A::RESET, + true => GPIO20INTERRUPT_STATUS_A::SET, } } #[doc = "Checks if the value of the field is `RESET`"] #[inline(always)] pub fn is_reset(&self) -> bool { - **self == REG_GPIO_20_INTERRUPT_STATUS_A::RESET + *self == GPIO20INTERRUPT_STATUS_A::RESET } #[doc = "Checks if the value of the field is `SET`"] #[inline(always)] pub fn is_set(&self) -> bool { - **self == REG_GPIO_20_INTERRUPT_STATUS_A::SET - } -} -impl core::ops::Deref for REG_GPIO_20_INTERRUPT_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO20INTERRUPT_STATUS_A::SET } } +#[doc = "Field `reg_gpio_21_interrupt_status` reader - Interrupt status register for GPIO21."] +pub type REG_GPIO_21_INTERRUPT_STATUS_R = crate::BitReader; #[doc = "Interrupt status register for GPIO21.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_21_INTERRUPT_STATUS_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO21INTERRUPT_STATUS_A { #[doc = "0: `0`"] RESET = 0, #[doc = "1: `1`"] SET = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_21_INTERRUPT_STATUS_A) -> Self { + fn from(variant: GPIO21INTERRUPT_STATUS_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_21_interrupt_status` reader - Interrupt status register for GPIO21."] -pub struct REG_GPIO_21_INTERRUPT_STATUS_R(crate::FieldReader); impl REG_GPIO_21_INTERRUPT_STATUS_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_21_INTERRUPT_STATUS_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_21_INTERRUPT_STATUS_A { + pub fn variant(&self) -> GPIO21INTERRUPT_STATUS_A { match self.bits { - false => REG_GPIO_21_INTERRUPT_STATUS_A::RESET, - true => REG_GPIO_21_INTERRUPT_STATUS_A::SET, + false => GPIO21INTERRUPT_STATUS_A::RESET, + true => GPIO21INTERRUPT_STATUS_A::SET, } } #[doc = "Checks if the value of the field is `RESET`"] #[inline(always)] pub fn is_reset(&self) -> bool { - **self == REG_GPIO_21_INTERRUPT_STATUS_A::RESET + *self == GPIO21INTERRUPT_STATUS_A::RESET } #[doc = "Checks if the value of the field is `SET`"] #[inline(always)] pub fn is_set(&self) -> bool { - **self == REG_GPIO_21_INTERRUPT_STATUS_A::SET - } -} -impl core::ops::Deref for REG_GPIO_21_INTERRUPT_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO21INTERRUPT_STATUS_A::SET } } +#[doc = "Field `reg_gpio_22_interrupt_status` reader - Interrupt status register for GPIO22."] +pub type REG_GPIO_22_INTERRUPT_STATUS_R = crate::BitReader; #[doc = "Interrupt status register for GPIO22.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_22_INTERRUPT_STATUS_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO22INTERRUPT_STATUS_A { #[doc = "0: `0`"] RESET = 0, #[doc = "1: `1`"] SET = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_22_INTERRUPT_STATUS_A) -> Self { + fn from(variant: GPIO22INTERRUPT_STATUS_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_22_interrupt_status` reader - Interrupt status register for GPIO22."] -pub struct REG_GPIO_22_INTERRUPT_STATUS_R(crate::FieldReader); impl REG_GPIO_22_INTERRUPT_STATUS_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_22_INTERRUPT_STATUS_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_22_INTERRUPT_STATUS_A { + pub fn variant(&self) -> GPIO22INTERRUPT_STATUS_A { match self.bits { - false => REG_GPIO_22_INTERRUPT_STATUS_A::RESET, - true => REG_GPIO_22_INTERRUPT_STATUS_A::SET, + false => GPIO22INTERRUPT_STATUS_A::RESET, + true => GPIO22INTERRUPT_STATUS_A::SET, } } #[doc = "Checks if the value of the field is `RESET`"] #[inline(always)] pub fn is_reset(&self) -> bool { - **self == REG_GPIO_22_INTERRUPT_STATUS_A::RESET + *self == GPIO22INTERRUPT_STATUS_A::RESET } #[doc = "Checks if the value of the field is `SET`"] #[inline(always)] pub fn is_set(&self) -> bool { - **self == REG_GPIO_22_INTERRUPT_STATUS_A::SET - } -} -impl core::ops::Deref for REG_GPIO_22_INTERRUPT_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO22INTERRUPT_STATUS_A::SET } } +#[doc = "Field `reg_gpio_23_interrupt_status` reader - Interrupt status register for GPIO23."] +pub type REG_GPIO_23_INTERRUPT_STATUS_R = crate::BitReader; #[doc = "Interrupt status register for GPIO23.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_23_INTERRUPT_STATUS_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO23INTERRUPT_STATUS_A { #[doc = "0: `0`"] RESET = 0, #[doc = "1: `1`"] SET = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_23_INTERRUPT_STATUS_A) -> Self { + fn from(variant: GPIO23INTERRUPT_STATUS_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_23_interrupt_status` reader - Interrupt status register for GPIO23."] -pub struct REG_GPIO_23_INTERRUPT_STATUS_R(crate::FieldReader); impl REG_GPIO_23_INTERRUPT_STATUS_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_23_INTERRUPT_STATUS_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_23_INTERRUPT_STATUS_A { + pub fn variant(&self) -> GPIO23INTERRUPT_STATUS_A { match self.bits { - false => REG_GPIO_23_INTERRUPT_STATUS_A::RESET, - true => REG_GPIO_23_INTERRUPT_STATUS_A::SET, + false => GPIO23INTERRUPT_STATUS_A::RESET, + true => GPIO23INTERRUPT_STATUS_A::SET, } } #[doc = "Checks if the value of the field is `RESET`"] #[inline(always)] pub fn is_reset(&self) -> bool { - **self == REG_GPIO_23_INTERRUPT_STATUS_A::RESET + *self == GPIO23INTERRUPT_STATUS_A::RESET } #[doc = "Checks if the value of the field is `SET`"] #[inline(always)] pub fn is_set(&self) -> bool { - **self == REG_GPIO_23_INTERRUPT_STATUS_A::SET - } -} -impl core::ops::Deref for REG_GPIO_23_INTERRUPT_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO23INTERRUPT_STATUS_A::SET } } +#[doc = "Field `reg_gpio_24_interrupt_status` reader - Interrupt status register for GPIO24."] +pub type REG_GPIO_24_INTERRUPT_STATUS_R = crate::BitReader; #[doc = "Interrupt status register for GPIO24.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_24_INTERRUPT_STATUS_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO24INTERRUPT_STATUS_A { #[doc = "0: `0`"] RESET = 0, #[doc = "1: `1`"] SET = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_24_INTERRUPT_STATUS_A) -> Self { + fn from(variant: GPIO24INTERRUPT_STATUS_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_24_interrupt_status` reader - Interrupt status register for GPIO24."] -pub struct REG_GPIO_24_INTERRUPT_STATUS_R(crate::FieldReader); impl REG_GPIO_24_INTERRUPT_STATUS_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_24_INTERRUPT_STATUS_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_24_INTERRUPT_STATUS_A { + pub fn variant(&self) -> GPIO24INTERRUPT_STATUS_A { match self.bits { - false => REG_GPIO_24_INTERRUPT_STATUS_A::RESET, - true => REG_GPIO_24_INTERRUPT_STATUS_A::SET, + false => GPIO24INTERRUPT_STATUS_A::RESET, + true => GPIO24INTERRUPT_STATUS_A::SET, } } #[doc = "Checks if the value of the field is `RESET`"] #[inline(always)] pub fn is_reset(&self) -> bool { - **self == REG_GPIO_24_INTERRUPT_STATUS_A::RESET + *self == GPIO24INTERRUPT_STATUS_A::RESET } #[doc = "Checks if the value of the field is `SET`"] #[inline(always)] pub fn is_set(&self) -> bool { - **self == REG_GPIO_24_INTERRUPT_STATUS_A::SET - } -} -impl core::ops::Deref for REG_GPIO_24_INTERRUPT_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO24INTERRUPT_STATUS_A::SET } } +#[doc = "Field `reg_gpio_25_interrupt_status` reader - Interrupt status register for GPIO25."] +pub type REG_GPIO_25_INTERRUPT_STATUS_R = crate::BitReader; #[doc = "Interrupt status register for GPIO25.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_25_INTERRUPT_STATUS_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO25INTERRUPT_STATUS_A { #[doc = "0: `0`"] RESET = 0, #[doc = "1: `1`"] SET = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_25_INTERRUPT_STATUS_A) -> Self { + fn from(variant: GPIO25INTERRUPT_STATUS_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_25_interrupt_status` reader - Interrupt status register for GPIO25."] -pub struct REG_GPIO_25_INTERRUPT_STATUS_R(crate::FieldReader); impl REG_GPIO_25_INTERRUPT_STATUS_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_25_INTERRUPT_STATUS_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_25_INTERRUPT_STATUS_A { + pub fn variant(&self) -> GPIO25INTERRUPT_STATUS_A { match self.bits { - false => REG_GPIO_25_INTERRUPT_STATUS_A::RESET, - true => REG_GPIO_25_INTERRUPT_STATUS_A::SET, + false => GPIO25INTERRUPT_STATUS_A::RESET, + true => GPIO25INTERRUPT_STATUS_A::SET, } } #[doc = "Checks if the value of the field is `RESET`"] #[inline(always)] pub fn is_reset(&self) -> bool { - **self == REG_GPIO_25_INTERRUPT_STATUS_A::RESET + *self == GPIO25INTERRUPT_STATUS_A::RESET } #[doc = "Checks if the value of the field is `SET`"] #[inline(always)] pub fn is_set(&self) -> bool { - **self == REG_GPIO_25_INTERRUPT_STATUS_A::SET - } -} -impl core::ops::Deref for REG_GPIO_25_INTERRUPT_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO25INTERRUPT_STATUS_A::SET } } +#[doc = "Field `reg_gpio_26_interrupt_status` reader - Interrupt status register for GPIO26."] +pub type REG_GPIO_26_INTERRUPT_STATUS_R = crate::BitReader; #[doc = "Interrupt status register for GPIO26.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_26_INTERRUPT_STATUS_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO26INTERRUPT_STATUS_A { #[doc = "0: `0`"] RESET = 0, #[doc = "1: `1`"] SET = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_26_INTERRUPT_STATUS_A) -> Self { + fn from(variant: GPIO26INTERRUPT_STATUS_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_26_interrupt_status` reader - Interrupt status register for GPIO26."] -pub struct REG_GPIO_26_INTERRUPT_STATUS_R(crate::FieldReader); impl REG_GPIO_26_INTERRUPT_STATUS_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_26_INTERRUPT_STATUS_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_26_INTERRUPT_STATUS_A { + pub fn variant(&self) -> GPIO26INTERRUPT_STATUS_A { match self.bits { - false => REG_GPIO_26_INTERRUPT_STATUS_A::RESET, - true => REG_GPIO_26_INTERRUPT_STATUS_A::SET, + false => GPIO26INTERRUPT_STATUS_A::RESET, + true => GPIO26INTERRUPT_STATUS_A::SET, } } #[doc = "Checks if the value of the field is `RESET`"] #[inline(always)] pub fn is_reset(&self) -> bool { - **self == REG_GPIO_26_INTERRUPT_STATUS_A::RESET + *self == GPIO26INTERRUPT_STATUS_A::RESET } #[doc = "Checks if the value of the field is `SET`"] #[inline(always)] pub fn is_set(&self) -> bool { - **self == REG_GPIO_26_INTERRUPT_STATUS_A::SET - } -} -impl core::ops::Deref for REG_GPIO_26_INTERRUPT_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO26INTERRUPT_STATUS_A::SET } } +#[doc = "Field `reg_gpio_27_interrupt_status` reader - Interrupt status register for GPIO27."] +pub type REG_GPIO_27_INTERRUPT_STATUS_R = crate::BitReader; #[doc = "Interrupt status register for GPIO27.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_27_INTERRUPT_STATUS_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO27INTERRUPT_STATUS_A { #[doc = "0: `0`"] RESET = 0, #[doc = "1: `1`"] SET = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_27_INTERRUPT_STATUS_A) -> Self { + fn from(variant: GPIO27INTERRUPT_STATUS_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_27_interrupt_status` reader - Interrupt status register for GPIO27."] -pub struct REG_GPIO_27_INTERRUPT_STATUS_R(crate::FieldReader); impl REG_GPIO_27_INTERRUPT_STATUS_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_27_INTERRUPT_STATUS_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_27_INTERRUPT_STATUS_A { + pub fn variant(&self) -> GPIO27INTERRUPT_STATUS_A { match self.bits { - false => REG_GPIO_27_INTERRUPT_STATUS_A::RESET, - true => REG_GPIO_27_INTERRUPT_STATUS_A::SET, + false => GPIO27INTERRUPT_STATUS_A::RESET, + true => GPIO27INTERRUPT_STATUS_A::SET, } } #[doc = "Checks if the value of the field is `RESET`"] #[inline(always)] pub fn is_reset(&self) -> bool { - **self == REG_GPIO_27_INTERRUPT_STATUS_A::RESET + *self == GPIO27INTERRUPT_STATUS_A::RESET } #[doc = "Checks if the value of the field is `SET`"] #[inline(always)] pub fn is_set(&self) -> bool { - **self == REG_GPIO_27_INTERRUPT_STATUS_A::SET - } -} -impl core::ops::Deref for REG_GPIO_27_INTERRUPT_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO27INTERRUPT_STATUS_A::SET } } +#[doc = "Field `reg_gpio_28_interrupt_status` reader - Interrupt status register for GPIO28."] +pub type REG_GPIO_28_INTERRUPT_STATUS_R = crate::BitReader; #[doc = "Interrupt status register for GPIO28.\n\nValue on reset: 0"] -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum REG_GPIO_28_INTERRUPT_STATUS_A { +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GPIO28INTERRUPT_STATUS_A { #[doc = "0: `0`"] RESET = 0, #[doc = "1: `1`"] SET = 1, } -impl From for bool { +impl From for bool { #[inline(always)] - fn from(variant: REG_GPIO_28_INTERRUPT_STATUS_A) -> Self { + fn from(variant: GPIO28INTERRUPT_STATUS_A) -> Self { variant as u8 != 0 } } -#[doc = "Field `reg_gpio_28_interrupt_status` reader - Interrupt status register for GPIO28."] -pub struct REG_GPIO_28_INTERRUPT_STATUS_R(crate::FieldReader); impl REG_GPIO_28_INTERRUPT_STATUS_R { - pub(crate) fn new(bits: bool) -> Self { - REG_GPIO_28_INTERRUPT_STATUS_R(crate::FieldReader::new(bits)) - } - #[doc = r"Get enumerated values variant"] + #[doc = "Get enumerated values variant"] #[inline(always)] - pub fn variant(&self) -> REG_GPIO_28_INTERRUPT_STATUS_A { + pub fn variant(&self) -> GPIO28INTERRUPT_STATUS_A { match self.bits { - false => REG_GPIO_28_INTERRUPT_STATUS_A::RESET, - true => REG_GPIO_28_INTERRUPT_STATUS_A::SET, + false => GPIO28INTERRUPT_STATUS_A::RESET, + true => GPIO28INTERRUPT_STATUS_A::SET, } } #[doc = "Checks if the value of the field is `RESET`"] #[inline(always)] pub fn is_reset(&self) -> bool { - **self == REG_GPIO_28_INTERRUPT_STATUS_A::RESET + *self == GPIO28INTERRUPT_STATUS_A::RESET } #[doc = "Checks if the value of the field is `SET`"] #[inline(always)] pub fn is_set(&self) -> bool { - **self == REG_GPIO_28_INTERRUPT_STATUS_A::SET - } -} -impl core::ops::Deref for REG_GPIO_28_INTERRUPT_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + *self == GPIO28INTERRUPT_STATUS_A::SET } } impl R { #[doc = "Bit 0 - Interrupt status register for GPIO0."] #[inline(always)] pub fn reg_gpio_0_interrupt_status(&self) -> REG_GPIO_0_INTERRUPT_STATUS_R { - REG_GPIO_0_INTERRUPT_STATUS_R::new((self.bits & 0x01) != 0) + REG_GPIO_0_INTERRUPT_STATUS_R::new((self.bits & 1) != 0) } #[doc = "Bit 1 - Interrupt status register for GPIO1."] #[inline(always)] pub fn reg_gpio_1_interrupt_status(&self) -> REG_GPIO_1_INTERRUPT_STATUS_R { - REG_GPIO_1_INTERRUPT_STATUS_R::new(((self.bits >> 1) & 0x01) != 0) + REG_GPIO_1_INTERRUPT_STATUS_R::new(((self.bits >> 1) & 1) != 0) } #[doc = "Bit 2 - Interrupt status register for GPIO2."] #[inline(always)] pub fn reg_gpio_2_interrupt_status(&self) -> REG_GPIO_2_INTERRUPT_STATUS_R { - REG_GPIO_2_INTERRUPT_STATUS_R::new(((self.bits >> 2) & 0x01) != 0) + REG_GPIO_2_INTERRUPT_STATUS_R::new(((self.bits >> 2) & 1) != 0) } #[doc = "Bit 3 - Interrupt status register for GPIO3."] #[inline(always)] pub fn reg_gpio_3_interrupt_status(&self) -> REG_GPIO_3_INTERRUPT_STATUS_R { - REG_GPIO_3_INTERRUPT_STATUS_R::new(((self.bits >> 3) & 0x01) != 0) + REG_GPIO_3_INTERRUPT_STATUS_R::new(((self.bits >> 3) & 1) != 0) } #[doc = "Bit 4 - Interrupt status register for GPIO4."] #[inline(always)] pub fn reg_gpio_4_interrupt_status(&self) -> REG_GPIO_4_INTERRUPT_STATUS_R { - REG_GPIO_4_INTERRUPT_STATUS_R::new(((self.bits >> 4) & 0x01) != 0) + REG_GPIO_4_INTERRUPT_STATUS_R::new(((self.bits >> 4) & 1) != 0) } #[doc = "Bit 5 - Interrupt status register for GPIO5."] #[inline(always)] pub fn reg_gpio_5_interrupt_status(&self) -> REG_GPIO_5_INTERRUPT_STATUS_R { - REG_GPIO_5_INTERRUPT_STATUS_R::new(((self.bits >> 5) & 0x01) != 0) + REG_GPIO_5_INTERRUPT_STATUS_R::new(((self.bits >> 5) & 1) != 0) } #[doc = "Bit 6 - Interrupt status register for GPIO6."] #[inline(always)] pub fn reg_gpio_6_interrupt_status(&self) -> REG_GPIO_6_INTERRUPT_STATUS_R { - REG_GPIO_6_INTERRUPT_STATUS_R::new(((self.bits >> 6) & 0x01) != 0) + REG_GPIO_6_INTERRUPT_STATUS_R::new(((self.bits >> 6) & 1) != 0) } #[doc = "Bit 7 - Interrupt status register for GPIO7."] #[inline(always)] pub fn reg_gpio_7_interrupt_status(&self) -> REG_GPIO_7_INTERRUPT_STATUS_R { - REG_GPIO_7_INTERRUPT_STATUS_R::new(((self.bits >> 7) & 0x01) != 0) + REG_GPIO_7_INTERRUPT_STATUS_R::new(((self.bits >> 7) & 1) != 0) } #[doc = "Bit 8 - Interrupt status register for GPIO8."] #[inline(always)] pub fn reg_gpio_8_interrupt_status(&self) -> REG_GPIO_8_INTERRUPT_STATUS_R { - REG_GPIO_8_INTERRUPT_STATUS_R::new(((self.bits >> 8) & 0x01) != 0) + REG_GPIO_8_INTERRUPT_STATUS_R::new(((self.bits >> 8) & 1) != 0) } #[doc = "Bit 9 - Interrupt status register for GPIO9."] #[inline(always)] pub fn reg_gpio_9_interrupt_status(&self) -> REG_GPIO_9_INTERRUPT_STATUS_R { - REG_GPIO_9_INTERRUPT_STATUS_R::new(((self.bits >> 9) & 0x01) != 0) + REG_GPIO_9_INTERRUPT_STATUS_R::new(((self.bits >> 9) & 1) != 0) } #[doc = "Bit 10 - Interrupt status register for GPIO10."] #[inline(always)] pub fn reg_gpio_10_interrupt_status(&self) -> REG_GPIO_10_INTERRUPT_STATUS_R { - REG_GPIO_10_INTERRUPT_STATUS_R::new(((self.bits >> 10) & 0x01) != 0) + REG_GPIO_10_INTERRUPT_STATUS_R::new(((self.bits >> 10) & 1) != 0) } #[doc = "Bit 11 - Interrupt status register for GPIO11."] #[inline(always)] pub fn reg_gpio_11_interrupt_status(&self) -> REG_GPIO_11_INTERRUPT_STATUS_R { - REG_GPIO_11_INTERRUPT_STATUS_R::new(((self.bits >> 11) & 0x01) != 0) + REG_GPIO_11_INTERRUPT_STATUS_R::new(((self.bits >> 11) & 1) != 0) } #[doc = "Bit 12 - Interrupt status register for GPIO12."] #[inline(always)] pub fn reg_gpio_12_interrupt_status(&self) -> REG_GPIO_12_INTERRUPT_STATUS_R { - REG_GPIO_12_INTERRUPT_STATUS_R::new(((self.bits >> 12) & 0x01) != 0) + REG_GPIO_12_INTERRUPT_STATUS_R::new(((self.bits >> 12) & 1) != 0) } #[doc = "Bit 13 - Interrupt status register for GPIO13."] #[inline(always)] pub fn reg_gpio_13_interrupt_status(&self) -> REG_GPIO_13_INTERRUPT_STATUS_R { - REG_GPIO_13_INTERRUPT_STATUS_R::new(((self.bits >> 13) & 0x01) != 0) + REG_GPIO_13_INTERRUPT_STATUS_R::new(((self.bits >> 13) & 1) != 0) } #[doc = "Bit 14 - Interrupt status register for GPIO14."] #[inline(always)] pub fn reg_gpio_14_interrupt_status(&self) -> REG_GPIO_14_INTERRUPT_STATUS_R { - REG_GPIO_14_INTERRUPT_STATUS_R::new(((self.bits >> 14) & 0x01) != 0) + REG_GPIO_14_INTERRUPT_STATUS_R::new(((self.bits >> 14) & 1) != 0) } #[doc = "Bit 15 - Interrupt status register for GPIO15."] #[inline(always)] pub fn reg_gpio_15_interrupt_status(&self) -> REG_GPIO_15_INTERRUPT_STATUS_R { - REG_GPIO_15_INTERRUPT_STATUS_R::new(((self.bits >> 15) & 0x01) != 0) + REG_GPIO_15_INTERRUPT_STATUS_R::new(((self.bits >> 15) & 1) != 0) } #[doc = "Bit 16 - Interrupt status register for GPIO16."] #[inline(always)] pub fn reg_gpio_16_interrupt_status(&self) -> REG_GPIO_16_INTERRUPT_STATUS_R { - REG_GPIO_16_INTERRUPT_STATUS_R::new(((self.bits >> 16) & 0x01) != 0) + REG_GPIO_16_INTERRUPT_STATUS_R::new(((self.bits >> 16) & 1) != 0) } #[doc = "Bit 17 - Interrupt status register for GPIO17."] #[inline(always)] pub fn reg_gpio_17_interrupt_status(&self) -> REG_GPIO_17_INTERRUPT_STATUS_R { - REG_GPIO_17_INTERRUPT_STATUS_R::new(((self.bits >> 17) & 0x01) != 0) + REG_GPIO_17_INTERRUPT_STATUS_R::new(((self.bits >> 17) & 1) != 0) } #[doc = "Bit 18 - Interrupt status register for GPIO18."] #[inline(always)] pub fn reg_gpio_18_interrupt_status(&self) -> REG_GPIO_18_INTERRUPT_STATUS_R { - REG_GPIO_18_INTERRUPT_STATUS_R::new(((self.bits >> 18) & 0x01) != 0) + REG_GPIO_18_INTERRUPT_STATUS_R::new(((self.bits >> 18) & 1) != 0) } #[doc = "Bit 19 - Interrupt status register for GPIO19."] #[inline(always)] pub fn reg_gpio_19_interrupt_status(&self) -> REG_GPIO_19_INTERRUPT_STATUS_R { - REG_GPIO_19_INTERRUPT_STATUS_R::new(((self.bits >> 19) & 0x01) != 0) + REG_GPIO_19_INTERRUPT_STATUS_R::new(((self.bits >> 19) & 1) != 0) } #[doc = "Bit 20 - Interrupt status register for GPIO20."] #[inline(always)] pub fn reg_gpio_20_interrupt_status(&self) -> REG_GPIO_20_INTERRUPT_STATUS_R { - REG_GPIO_20_INTERRUPT_STATUS_R::new(((self.bits >> 20) & 0x01) != 0) + REG_GPIO_20_INTERRUPT_STATUS_R::new(((self.bits >> 20) & 1) != 0) } #[doc = "Bit 21 - Interrupt status register for GPIO21."] #[inline(always)] pub fn reg_gpio_21_interrupt_status(&self) -> REG_GPIO_21_INTERRUPT_STATUS_R { - REG_GPIO_21_INTERRUPT_STATUS_R::new(((self.bits >> 21) & 0x01) != 0) + REG_GPIO_21_INTERRUPT_STATUS_R::new(((self.bits >> 21) & 1) != 0) } #[doc = "Bit 22 - Interrupt status register for GPIO22."] #[inline(always)] pub fn reg_gpio_22_interrupt_status(&self) -> REG_GPIO_22_INTERRUPT_STATUS_R { - REG_GPIO_22_INTERRUPT_STATUS_R::new(((self.bits >> 22) & 0x01) != 0) + REG_GPIO_22_INTERRUPT_STATUS_R::new(((self.bits >> 22) & 1) != 0) } #[doc = "Bit 23 - Interrupt status register for GPIO23."] #[inline(always)] pub fn reg_gpio_23_interrupt_status(&self) -> REG_GPIO_23_INTERRUPT_STATUS_R { - REG_GPIO_23_INTERRUPT_STATUS_R::new(((self.bits >> 23) & 0x01) != 0) + REG_GPIO_23_INTERRUPT_STATUS_R::new(((self.bits >> 23) & 1) != 0) } #[doc = "Bit 24 - Interrupt status register for GPIO24."] #[inline(always)] pub fn reg_gpio_24_interrupt_status(&self) -> REG_GPIO_24_INTERRUPT_STATUS_R { - REG_GPIO_24_INTERRUPT_STATUS_R::new(((self.bits >> 24) & 0x01) != 0) + REG_GPIO_24_INTERRUPT_STATUS_R::new(((self.bits >> 24) & 1) != 0) } #[doc = "Bit 25 - Interrupt status register for GPIO25."] #[inline(always)] pub fn reg_gpio_25_interrupt_status(&self) -> REG_GPIO_25_INTERRUPT_STATUS_R { - REG_GPIO_25_INTERRUPT_STATUS_R::new(((self.bits >> 25) & 0x01) != 0) + REG_GPIO_25_INTERRUPT_STATUS_R::new(((self.bits >> 25) & 1) != 0) } #[doc = "Bit 26 - Interrupt status register for GPIO26."] #[inline(always)] pub fn reg_gpio_26_interrupt_status(&self) -> REG_GPIO_26_INTERRUPT_STATUS_R { - REG_GPIO_26_INTERRUPT_STATUS_R::new(((self.bits >> 26) & 0x01) != 0) + REG_GPIO_26_INTERRUPT_STATUS_R::new(((self.bits >> 26) & 1) != 0) } #[doc = "Bit 27 - Interrupt status register for GPIO27."] #[inline(always)] pub fn reg_gpio_27_interrupt_status(&self) -> REG_GPIO_27_INTERRUPT_STATUS_R { - REG_GPIO_27_INTERRUPT_STATUS_R::new(((self.bits >> 27) & 0x01) != 0) + REG_GPIO_27_INTERRUPT_STATUS_R::new(((self.bits >> 27) & 1) != 0) } #[doc = "Bit 28 - Interrupt status register for GPIO28."] #[inline(always)] pub fn reg_gpio_28_interrupt_status(&self) -> REG_GPIO_28_INTERRUPT_STATUS_R { - REG_GPIO_28_INTERRUPT_STATUS_R::new(((self.bits >> 28) & 0x01) != 0) + REG_GPIO_28_INTERRUPT_STATUS_R::new(((self.bits >> 28) & 1) != 0) } } #[doc = "Interrupt status register. The SDK limits the GPIO pins to < 32 although the docs do not mention more than 28 GPIO pins.\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 [gpio_int_stat1](index.html) module"] @@ -1504,8 +1215,5 @@ impl crate::Readable for GPIO_INT_STAT1_SPEC { } #[doc = "`reset()` method sets GPIO_INT_STAT1 to value 0"] impl crate::Resettable for GPIO_INT_STAT1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/led_driver.rs b/src/glb/led_driver.rs index a546ea8..c1e9c7b 100644 --- a/src/glb/led_driver.rs +++ b/src/glb/led_driver.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,271 +28,110 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `pu_leddrv` reader - "] -pub struct PU_LEDDRV_R(crate::FieldReader); -impl PU_LEDDRV_R { - pub(crate) fn new(bits: bool) -> Self { - PU_LEDDRV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_LEDDRV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_leddrv` writer - "] -pub struct PU_LEDDRV_W<'a> { - w: &'a mut W, -} -impl<'a> PU_LEDDRV_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 31)) | ((value as u32 & 0x01) << 31); - self.w - } -} -#[doc = "Field `ir_rx_gpio_sel` reader - "] -pub struct IR_RX_GPIO_SEL_R(crate::FieldReader); -impl IR_RX_GPIO_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - IR_RX_GPIO_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for IR_RX_GPIO_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ir_rx_gpio_sel` writer - "] -pub struct IR_RX_GPIO_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> IR_RX_GPIO_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} -#[doc = "Field `leddrv_ibias` reader - "] -pub struct LEDDRV_IBIAS_R(crate::FieldReader); -impl LEDDRV_IBIAS_R { - pub(crate) fn new(bits: u8) -> Self { - LEDDRV_IBIAS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LEDDRV_IBIAS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `leddrv_ibias` writer - "] -pub struct LEDDRV_IBIAS_W<'a> { - w: &'a mut W, -} -impl<'a> LEDDRV_IBIAS_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 4)) | ((value as u32 & 0x0f) << 4); - self.w - } -} -#[doc = "Field `led_din_polarity_sel` reader - "] -pub struct LED_DIN_POLARITY_SEL_R(crate::FieldReader); -impl LED_DIN_POLARITY_SEL_R { - pub(crate) fn new(bits: bool) -> Self { - LED_DIN_POLARITY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LED_DIN_POLARITY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `led_din_polarity_sel` writer - "] -pub struct LED_DIN_POLARITY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> LED_DIN_POLARITY_SEL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `led_din_sel` reader - "] -pub struct LED_DIN_SEL_R(crate::FieldReader); -impl LED_DIN_SEL_R { - pub(crate) fn new(bits: bool) -> Self { - LED_DIN_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LED_DIN_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `led_din_sel` writer - "] -pub struct LED_DIN_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> LED_DIN_SEL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `led_din_reg` reader - "] -pub struct LED_DIN_REG_R(crate::FieldReader); -impl LED_DIN_REG_R { - pub(crate) fn new(bits: bool) -> Self { - LED_DIN_REG_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LED_DIN_REG_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type LED_DIN_REG_R = crate::BitReader; #[doc = "Field `led_din_reg` writer - "] -pub struct LED_DIN_REG_W<'a> { - w: &'a mut W, -} -impl<'a> LED_DIN_REG_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type LED_DIN_REG_W<'a, const O: u8> = crate::BitWriter<'a, u32, LED_DRIVER_SPEC, bool, O>; +#[doc = "Field `led_din_sel` reader - "] +pub type LED_DIN_SEL_R = crate::BitReader; +#[doc = "Field `led_din_sel` writer - "] +pub type LED_DIN_SEL_W<'a, const O: u8> = crate::BitWriter<'a, u32, LED_DRIVER_SPEC, bool, O>; +#[doc = "Field `led_din_polarity_sel` reader - "] +pub type LED_DIN_POLARITY_SEL_R = crate::BitReader; +#[doc = "Field `led_din_polarity_sel` writer - "] +pub type LED_DIN_POLARITY_SEL_W<'a, const O: u8> = + crate::BitWriter<'a, u32, LED_DRIVER_SPEC, bool, O>; +#[doc = "Field `leddrv_ibias` reader - "] +pub type LEDDRV_IBIAS_R = crate::FieldReader; +#[doc = "Field `leddrv_ibias` writer - "] +pub type LEDDRV_IBIAS_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LED_DRIVER_SPEC, u8, u8, 4, O>; +#[doc = "Field `ir_rx_gpio_sel` reader - "] +pub type IR_RX_GPIO_SEL_R = crate::FieldReader; +#[doc = "Field `ir_rx_gpio_sel` writer - "] +pub type IR_RX_GPIO_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LED_DRIVER_SPEC, u8, u8, 2, O>; +#[doc = "Field `pu_leddrv` reader - "] +pub type PU_LEDDRV_R = crate::BitReader; +#[doc = "Field `pu_leddrv` writer - "] +pub type PU_LEDDRV_W<'a, const O: u8> = crate::BitWriter<'a, u32, LED_DRIVER_SPEC, bool, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn led_din_reg(&self) -> LED_DIN_REG_R { + LED_DIN_REG_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bit 31"] + #[doc = "Bit 1"] #[inline(always)] - pub fn pu_leddrv(&self) -> PU_LEDDRV_R { - PU_LEDDRV_R::new(((self.bits >> 31) & 0x01) != 0) + pub fn led_din_sel(&self) -> LED_DIN_SEL_R { + LED_DIN_SEL_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bits 8:9"] + #[doc = "Bit 2"] #[inline(always)] - pub fn ir_rx_gpio_sel(&self) -> IR_RX_GPIO_SEL_R { - IR_RX_GPIO_SEL_R::new(((self.bits >> 8) & 0x03) as u8) + pub fn led_din_polarity_sel(&self) -> LED_DIN_POLARITY_SEL_R { + LED_DIN_POLARITY_SEL_R::new(((self.bits >> 2) & 1) != 0) } #[doc = "Bits 4:7"] #[inline(always)] pub fn leddrv_ibias(&self) -> LEDDRV_IBIAS_R { LEDDRV_IBIAS_R::new(((self.bits >> 4) & 0x0f) as u8) } - #[doc = "Bit 2"] - #[inline(always)] - pub fn led_din_polarity_sel(&self) -> LED_DIN_POLARITY_SEL_R { - LED_DIN_POLARITY_SEL_R::new(((self.bits >> 2) & 0x01) != 0) - } - #[doc = "Bit 1"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn led_din_sel(&self) -> LED_DIN_SEL_R { - LED_DIN_SEL_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn ir_rx_gpio_sel(&self) -> IR_RX_GPIO_SEL_R { + IR_RX_GPIO_SEL_R::new(((self.bits >> 8) & 3) as u8) } - #[doc = "Bit 0"] + #[doc = "Bit 31"] #[inline(always)] - pub fn led_din_reg(&self) -> LED_DIN_REG_R { - LED_DIN_REG_R::new((self.bits & 0x01) != 0) + pub fn pu_leddrv(&self) -> PU_LEDDRV_R { + PU_LEDDRV_R::new(((self.bits >> 31) & 1) != 0) } } impl W { - #[doc = "Bit 31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn pu_leddrv(&mut self) -> PU_LEDDRV_W { - PU_LEDDRV_W { w: self } + #[must_use] + pub fn led_din_reg(&mut self) -> LED_DIN_REG_W<0> { + LED_DIN_REG_W::new(self) } - #[doc = "Bits 8:9"] + #[doc = "Bit 1"] #[inline(always)] - pub fn ir_rx_gpio_sel(&mut self) -> IR_RX_GPIO_SEL_W { - IR_RX_GPIO_SEL_W { w: self } + #[must_use] + pub fn led_din_sel(&mut self) -> LED_DIN_SEL_W<1> { + LED_DIN_SEL_W::new(self) } - #[doc = "Bits 4:7"] + #[doc = "Bit 2"] #[inline(always)] - pub fn leddrv_ibias(&mut self) -> LEDDRV_IBIAS_W { - LEDDRV_IBIAS_W { w: self } + #[must_use] + pub fn led_din_polarity_sel(&mut self) -> LED_DIN_POLARITY_SEL_W<2> { + LED_DIN_POLARITY_SEL_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bits 4:7"] #[inline(always)] - pub fn led_din_polarity_sel(&mut self) -> LED_DIN_POLARITY_SEL_W { - LED_DIN_POLARITY_SEL_W { w: self } + #[must_use] + pub fn leddrv_ibias(&mut self) -> LEDDRV_IBIAS_W<4> { + LEDDRV_IBIAS_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn led_din_sel(&mut self) -> LED_DIN_SEL_W { - LED_DIN_SEL_W { w: self } + #[must_use] + pub fn ir_rx_gpio_sel(&mut self) -> IR_RX_GPIO_SEL_W<8> { + IR_RX_GPIO_SEL_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 31"] #[inline(always)] - pub fn led_din_reg(&mut self) -> LED_DIN_REG_W { - LED_DIN_REG_W { w: self } + #[must_use] + pub fn pu_leddrv(&mut self) -> PU_LEDDRV_W<31> { + PU_LEDDRV_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -309,11 +149,10 @@ impl crate::Readable for LED_DRIVER_SPEC { #[doc = "`write(|w| ..)` method takes [led_driver::W](W) writer structure"] impl crate::Writable for LED_DRIVER_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets led_driver to value 0x80"] impl crate::Resettable for LED_DRIVER_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x80 - } + const RESET_VALUE: Self::Ux = 0x80; } diff --git a/src/glb/mbist_ctl.rs b/src/glb/mbist_ctl.rs index 183fc48..b1e5cf1 100644 --- a/src/glb/mbist_ctl.rs +++ b/src/glb/mbist_ctl.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,291 +28,107 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `reg_mbist_rst_n` reader - "] -pub struct REG_MBIST_RST_N_R(crate::FieldReader); -impl REG_MBIST_RST_N_R { - pub(crate) fn new(bits: bool) -> Self { - REG_MBIST_RST_N_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_MBIST_RST_N_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_mbist_rst_n` writer - "] -pub struct REG_MBIST_RST_N_W<'a> { - w: &'a mut W, -} -impl<'a> REG_MBIST_RST_N_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 31)) | ((value as u32 & 0x01) << 31); - self.w - } -} -#[doc = "Field `wifi_mbist_mode` reader - "] -pub struct WIFI_MBIST_MODE_R(crate::FieldReader); -impl WIFI_MBIST_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - WIFI_MBIST_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for WIFI_MBIST_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `wifi_mbist_mode` writer - "] -pub struct WIFI_MBIST_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> WIFI_MBIST_MODE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} -#[doc = "Field `ocram_mbist_mode` reader - "] -pub struct OCRAM_MBIST_MODE_R(crate::FieldReader); -impl OCRAM_MBIST_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - OCRAM_MBIST_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for OCRAM_MBIST_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ocram_mbist_mode` writer - "] -pub struct OCRAM_MBIST_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> OCRAM_MBIST_MODE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `tag_mbist_mode` reader - "] -pub struct TAG_MBIST_MODE_R(crate::FieldReader); -impl TAG_MBIST_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - TAG_MBIST_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TAG_MBIST_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tag_mbist_mode` writer - "] -pub struct TAG_MBIST_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> TAG_MBIST_MODE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `hsram_mbist_mode` reader - "] -pub struct HSRAM_MBIST_MODE_R(crate::FieldReader); -impl HSRAM_MBIST_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - HSRAM_MBIST_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for HSRAM_MBIST_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `hsram_mbist_mode` writer - "] -pub struct HSRAM_MBIST_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> HSRAM_MBIST_MODE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `irom_mbist_mode` reader - "] -pub struct IROM_MBIST_MODE_R(crate::FieldReader); -impl IROM_MBIST_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - IROM_MBIST_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for IROM_MBIST_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type IROM_MBIST_MODE_R = crate::BitReader; #[doc = "Field `irom_mbist_mode` writer - "] -pub struct IROM_MBIST_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> IROM_MBIST_MODE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type IROM_MBIST_MODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, MBIST_CTL_SPEC, bool, O>; +#[doc = "Field `hsram_mbist_mode` reader - "] +pub type HSRAM_MBIST_MODE_R = crate::BitReader; +#[doc = "Field `hsram_mbist_mode` writer - "] +pub type HSRAM_MBIST_MODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, MBIST_CTL_SPEC, bool, O>; +#[doc = "Field `tag_mbist_mode` reader - "] +pub type TAG_MBIST_MODE_R = crate::BitReader; +#[doc = "Field `tag_mbist_mode` writer - "] +pub type TAG_MBIST_MODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, MBIST_CTL_SPEC, bool, O>; +#[doc = "Field `ocram_mbist_mode` reader - "] +pub type OCRAM_MBIST_MODE_R = crate::BitReader; +#[doc = "Field `ocram_mbist_mode` writer - "] +pub type OCRAM_MBIST_MODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, MBIST_CTL_SPEC, bool, O>; +#[doc = "Field `wifi_mbist_mode` reader - "] +pub type WIFI_MBIST_MODE_R = crate::BitReader; +#[doc = "Field `wifi_mbist_mode` writer - "] +pub type WIFI_MBIST_MODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, MBIST_CTL_SPEC, bool, O>; +#[doc = "Field `reg_mbist_rst_n` reader - "] +pub type REG_MBIST_RST_N_R = crate::BitReader; +#[doc = "Field `reg_mbist_rst_n` writer - "] +pub type REG_MBIST_RST_N_W<'a, const O: u8> = crate::BitWriter<'a, u32, MBIST_CTL_SPEC, bool, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn irom_mbist_mode(&self) -> IROM_MBIST_MODE_R { + IROM_MBIST_MODE_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bit 31"] + #[doc = "Bit 1"] #[inline(always)] - pub fn reg_mbist_rst_n(&self) -> REG_MBIST_RST_N_R { - REG_MBIST_RST_N_R::new(((self.bits >> 31) & 0x01) != 0) + pub fn hsram_mbist_mode(&self) -> HSRAM_MBIST_MODE_R { + HSRAM_MBIST_MODE_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 4"] + #[doc = "Bit 2"] #[inline(always)] - pub fn wifi_mbist_mode(&self) -> WIFI_MBIST_MODE_R { - WIFI_MBIST_MODE_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn tag_mbist_mode(&self) -> TAG_MBIST_MODE_R { + TAG_MBIST_MODE_R::new(((self.bits >> 2) & 1) != 0) } #[doc = "Bit 3"] #[inline(always)] pub fn ocram_mbist_mode(&self) -> OCRAM_MBIST_MODE_R { - OCRAM_MBIST_MODE_R::new(((self.bits >> 3) & 0x01) != 0) + OCRAM_MBIST_MODE_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bit 2"] - #[inline(always)] - pub fn tag_mbist_mode(&self) -> TAG_MBIST_MODE_R { - TAG_MBIST_MODE_R::new(((self.bits >> 2) & 0x01) != 0) - } - #[doc = "Bit 1"] + #[doc = "Bit 4"] #[inline(always)] - pub fn hsram_mbist_mode(&self) -> HSRAM_MBIST_MODE_R { - HSRAM_MBIST_MODE_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn wifi_mbist_mode(&self) -> WIFI_MBIST_MODE_R { + WIFI_MBIST_MODE_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 31"] #[inline(always)] - pub fn irom_mbist_mode(&self) -> IROM_MBIST_MODE_R { - IROM_MBIST_MODE_R::new((self.bits & 0x01) != 0) + pub fn reg_mbist_rst_n(&self) -> REG_MBIST_RST_N_R { + REG_MBIST_RST_N_R::new(((self.bits >> 31) & 1) != 0) } } impl W { - #[doc = "Bit 31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn reg_mbist_rst_n(&mut self) -> REG_MBIST_RST_N_W { - REG_MBIST_RST_N_W { w: self } + #[must_use] + pub fn irom_mbist_mode(&mut self) -> IROM_MBIST_MODE_W<0> { + IROM_MBIST_MODE_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 1"] #[inline(always)] - pub fn wifi_mbist_mode(&mut self) -> WIFI_MBIST_MODE_W { - WIFI_MBIST_MODE_W { w: self } + #[must_use] + pub fn hsram_mbist_mode(&mut self) -> HSRAM_MBIST_MODE_W<1> { + HSRAM_MBIST_MODE_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bit 2"] #[inline(always)] - pub fn ocram_mbist_mode(&mut self) -> OCRAM_MBIST_MODE_W { - OCRAM_MBIST_MODE_W { w: self } + #[must_use] + pub fn tag_mbist_mode(&mut self) -> TAG_MBIST_MODE_W<2> { + TAG_MBIST_MODE_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bit 3"] #[inline(always)] - pub fn tag_mbist_mode(&mut self) -> TAG_MBIST_MODE_W { - TAG_MBIST_MODE_W { w: self } + #[must_use] + pub fn ocram_mbist_mode(&mut self) -> OCRAM_MBIST_MODE_W<3> { + OCRAM_MBIST_MODE_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 4"] #[inline(always)] - pub fn hsram_mbist_mode(&mut self) -> HSRAM_MBIST_MODE_W { - HSRAM_MBIST_MODE_W { w: self } + #[must_use] + pub fn wifi_mbist_mode(&mut self) -> WIFI_MBIST_MODE_W<4> { + WIFI_MBIST_MODE_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 31"] #[inline(always)] - pub fn irom_mbist_mode(&mut self) -> IROM_MBIST_MODE_W { - IROM_MBIST_MODE_W { w: self } + #[must_use] + pub fn reg_mbist_rst_n(&mut self) -> REG_MBIST_RST_N_W<31> { + REG_MBIST_RST_N_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -329,11 +146,10 @@ impl crate::Readable for MBIST_CTL_SPEC { #[doc = "`write(|w| ..)` method takes [mbist_ctl::W](W) writer structure"] impl crate::Writable for MBIST_CTL_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets MBIST_CTL to value 0"] impl crate::Resettable for MBIST_CTL_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/mbist_stat.rs b/src/glb/mbist_stat.rs index 174d25d..6c2329f 100644 --- a/src/glb/mbist_stat.rs +++ b/src/glb/mbist_stat.rs @@ -7,201 +7,82 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `wifi_mbist_fail` reader - "] -pub struct WIFI_MBIST_FAIL_R(crate::FieldReader); -impl WIFI_MBIST_FAIL_R { - pub(crate) fn new(bits: bool) -> Self { - WIFI_MBIST_FAIL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for WIFI_MBIST_FAIL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ocram_mbist_fail` reader - "] -pub struct OCRAM_MBIST_FAIL_R(crate::FieldReader); -impl OCRAM_MBIST_FAIL_R { - pub(crate) fn new(bits: bool) -> Self { - OCRAM_MBIST_FAIL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for OCRAM_MBIST_FAIL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tag_mbist_fail` reader - "] -pub struct TAG_MBIST_FAIL_R(crate::FieldReader); -impl TAG_MBIST_FAIL_R { - pub(crate) fn new(bits: bool) -> Self { - TAG_MBIST_FAIL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TAG_MBIST_FAIL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `hsram_mbist_fail` reader - "] -pub struct HSRAM_MBIST_FAIL_R(crate::FieldReader); -impl HSRAM_MBIST_FAIL_R { - pub(crate) fn new(bits: bool) -> Self { - HSRAM_MBIST_FAIL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for HSRAM_MBIST_FAIL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `irom_mbist_fail` reader - "] -pub struct IROM_MBIST_FAIL_R(crate::FieldReader); -impl IROM_MBIST_FAIL_R { - pub(crate) fn new(bits: bool) -> Self { - IROM_MBIST_FAIL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for IROM_MBIST_FAIL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `wifi_mbist_done` reader - "] -pub struct WIFI_MBIST_DONE_R(crate::FieldReader); -impl WIFI_MBIST_DONE_R { - pub(crate) fn new(bits: bool) -> Self { - WIFI_MBIST_DONE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for WIFI_MBIST_DONE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ocram_mbist_done` reader - "] -pub struct OCRAM_MBIST_DONE_R(crate::FieldReader); -impl OCRAM_MBIST_DONE_R { - pub(crate) fn new(bits: bool) -> Self { - OCRAM_MBIST_DONE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for OCRAM_MBIST_DONE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tag_mbist_done` reader - "] -pub struct TAG_MBIST_DONE_R(crate::FieldReader); -impl TAG_MBIST_DONE_R { - pub(crate) fn new(bits: bool) -> Self { - TAG_MBIST_DONE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TAG_MBIST_DONE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `hsram_mbist_done` reader - "] -pub struct HSRAM_MBIST_DONE_R(crate::FieldReader); -impl HSRAM_MBIST_DONE_R { - pub(crate) fn new(bits: bool) -> Self { - HSRAM_MBIST_DONE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for HSRAM_MBIST_DONE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} #[doc = "Field `irom_mbist_done` reader - "] -pub struct IROM_MBIST_DONE_R(crate::FieldReader); -impl IROM_MBIST_DONE_R { - pub(crate) fn new(bits: bool) -> Self { - IROM_MBIST_DONE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for IROM_MBIST_DONE_R { - type Target = crate::FieldReader; +pub type IROM_MBIST_DONE_R = crate::BitReader; +#[doc = "Field `hsram_mbist_done` reader - "] +pub type HSRAM_MBIST_DONE_R = crate::BitReader; +#[doc = "Field `tag_mbist_done` reader - "] +pub type TAG_MBIST_DONE_R = crate::BitReader; +#[doc = "Field `ocram_mbist_done` reader - "] +pub type OCRAM_MBIST_DONE_R = crate::BitReader; +#[doc = "Field `wifi_mbist_done` reader - "] +pub type WIFI_MBIST_DONE_R = crate::BitReader; +#[doc = "Field `irom_mbist_fail` reader - "] +pub type IROM_MBIST_FAIL_R = crate::BitReader; +#[doc = "Field `hsram_mbist_fail` reader - "] +pub type HSRAM_MBIST_FAIL_R = crate::BitReader; +#[doc = "Field `tag_mbist_fail` reader - "] +pub type TAG_MBIST_FAIL_R = crate::BitReader; +#[doc = "Field `ocram_mbist_fail` reader - "] +pub type OCRAM_MBIST_FAIL_R = crate::BitReader; +#[doc = "Field `wifi_mbist_fail` reader - "] +pub type WIFI_MBIST_FAIL_R = crate::BitReader; +impl R { + #[doc = "Bit 0"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn irom_mbist_done(&self) -> IROM_MBIST_DONE_R { + IROM_MBIST_DONE_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bit 20"] + #[doc = "Bit 1"] #[inline(always)] - pub fn wifi_mbist_fail(&self) -> WIFI_MBIST_FAIL_R { - WIFI_MBIST_FAIL_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn hsram_mbist_done(&self) -> HSRAM_MBIST_DONE_R { + HSRAM_MBIST_DONE_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 19"] + #[doc = "Bit 2"] #[inline(always)] - pub fn ocram_mbist_fail(&self) -> OCRAM_MBIST_FAIL_R { - OCRAM_MBIST_FAIL_R::new(((self.bits >> 19) & 0x01) != 0) + pub fn tag_mbist_done(&self) -> TAG_MBIST_DONE_R { + TAG_MBIST_DONE_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 18"] + #[doc = "Bit 3"] #[inline(always)] - pub fn tag_mbist_fail(&self) -> TAG_MBIST_FAIL_R { - TAG_MBIST_FAIL_R::new(((self.bits >> 18) & 0x01) != 0) + pub fn ocram_mbist_done(&self) -> OCRAM_MBIST_DONE_R { + OCRAM_MBIST_DONE_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bit 17"] + #[doc = "Bit 4"] #[inline(always)] - pub fn hsram_mbist_fail(&self) -> HSRAM_MBIST_FAIL_R { - HSRAM_MBIST_FAIL_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn wifi_mbist_done(&self) -> WIFI_MBIST_DONE_R { + WIFI_MBIST_DONE_R::new(((self.bits >> 4) & 1) != 0) } #[doc = "Bit 16"] #[inline(always)] pub fn irom_mbist_fail(&self) -> IROM_MBIST_FAIL_R { - IROM_MBIST_FAIL_R::new(((self.bits >> 16) & 0x01) != 0) - } - #[doc = "Bit 4"] - #[inline(always)] - pub fn wifi_mbist_done(&self) -> WIFI_MBIST_DONE_R { - WIFI_MBIST_DONE_R::new(((self.bits >> 4) & 0x01) != 0) + IROM_MBIST_FAIL_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 3"] + #[doc = "Bit 17"] #[inline(always)] - pub fn ocram_mbist_done(&self) -> OCRAM_MBIST_DONE_R { - OCRAM_MBIST_DONE_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn hsram_mbist_fail(&self) -> HSRAM_MBIST_FAIL_R { + HSRAM_MBIST_FAIL_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bit 18"] #[inline(always)] - pub fn tag_mbist_done(&self) -> TAG_MBIST_DONE_R { - TAG_MBIST_DONE_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn tag_mbist_fail(&self) -> TAG_MBIST_FAIL_R { + TAG_MBIST_FAIL_R::new(((self.bits >> 18) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 19"] #[inline(always)] - pub fn hsram_mbist_done(&self) -> HSRAM_MBIST_DONE_R { - HSRAM_MBIST_DONE_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn ocram_mbist_fail(&self) -> OCRAM_MBIST_FAIL_R { + OCRAM_MBIST_FAIL_R::new(((self.bits >> 19) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 20"] #[inline(always)] - pub fn irom_mbist_done(&self) -> IROM_MBIST_DONE_R { - IROM_MBIST_DONE_R::new((self.bits & 0x01) != 0) + pub fn wifi_mbist_fail(&self) -> WIFI_MBIST_FAIL_R { + WIFI_MBIST_FAIL_R::new(((self.bits >> 20) & 1) != 0) } } #[doc = "MBIST_STAT.\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 [mbist_stat](index.html) module"] @@ -215,8 +96,5 @@ impl crate::Readable for MBIST_STAT_SPEC { } #[doc = "`reset()` method sets MBIST_STAT to value 0"] impl crate::Resettable for MBIST_STAT_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/rsv0.rs b/src/glb/rsv0.rs index e8e79b8..caebe59 100644 --- a/src/glb/rsv0.rs +++ b/src/glb/rsv0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,32 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `rsvd_31_0` reader - "] -pub struct RSVD_31_0_R(crate::FieldReader); -impl RSVD_31_0_R { - pub(crate) fn new(bits: u32) -> Self { - RSVD_31_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RSVD_31_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RSVD_31_0_R = crate::FieldReader; #[doc = "Field `rsvd_31_0` writer - "] -pub struct RSVD_31_0_W<'a> { - w: &'a mut W, -} -impl<'a> RSVD_31_0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type RSVD_31_0_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RSV0_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn rsvd_31_0(&self) -> RSVD_31_0_R { - RSVD_31_0_R::new((self.bits & 0xffff_ffff) as u32) + RSVD_31_0_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn rsvd_31_0(&mut self) -> RSVD_31_0_W { - RSVD_31_0_W { w: self } + #[must_use] + pub fn rsvd_31_0(&mut self) -> RSVD_31_0_W<0> { + RSVD_31_0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +71,10 @@ impl crate::Readable for RSV0_SPEC { #[doc = "`write(|w| ..)` method takes [rsv0::W](W) writer structure"] impl crate::Writable for RSV0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rsv0 to value 0"] impl crate::Resettable for RSV0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/rsv1.rs b/src/glb/rsv1.rs index 2a3757b..593c226 100644 --- a/src/glb/rsv1.rs +++ b/src/glb/rsv1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,32 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `rsvd_31_0` reader - "] -pub struct RSVD_31_0_R(crate::FieldReader); -impl RSVD_31_0_R { - pub(crate) fn new(bits: u32) -> Self { - RSVD_31_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RSVD_31_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RSVD_31_0_R = crate::FieldReader; #[doc = "Field `rsvd_31_0` writer - "] -pub struct RSVD_31_0_W<'a> { - w: &'a mut W, -} -impl<'a> RSVD_31_0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type RSVD_31_0_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RSV1_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn rsvd_31_0(&self) -> RSVD_31_0_R { - RSVD_31_0_R::new((self.bits & 0xffff_ffff) as u32) + RSVD_31_0_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn rsvd_31_0(&mut self) -> RSVD_31_0_W { - RSVD_31_0_W { w: self } + #[must_use] + pub fn rsvd_31_0(&mut self) -> RSVD_31_0_W<0> { + RSVD_31_0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +71,10 @@ impl crate::Readable for RSV1_SPEC { #[doc = "`write(|w| ..)` method takes [rsv1::W](W) writer structure"] impl crate::Writable for RSV1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rsv1 to value 0"] impl crate::Resettable for RSV1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/rsv2.rs b/src/glb/rsv2.rs index 4500cd3..db1b0d8 100644 --- a/src/glb/rsv2.rs +++ b/src/glb/rsv2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,32 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `rsvd_31_0` reader - "] -pub struct RSVD_31_0_R(crate::FieldReader); -impl RSVD_31_0_R { - pub(crate) fn new(bits: u32) -> Self { - RSVD_31_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RSVD_31_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RSVD_31_0_R = crate::FieldReader; #[doc = "Field `rsvd_31_0` writer - "] -pub struct RSVD_31_0_W<'a> { - w: &'a mut W, -} -impl<'a> RSVD_31_0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type RSVD_31_0_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RSV2_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn rsvd_31_0(&self) -> RSVD_31_0_R { - RSVD_31_0_R::new((self.bits & 0xffff_ffff) as u32) + RSVD_31_0_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn rsvd_31_0(&mut self) -> RSVD_31_0_W { - RSVD_31_0_W { w: self } + #[must_use] + pub fn rsvd_31_0(&mut self) -> RSVD_31_0_W<0> { + RSVD_31_0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +71,10 @@ impl crate::Readable for RSV2_SPEC { #[doc = "`write(|w| ..)` method takes [rsv2::W](W) writer structure"] impl crate::Writable for RSV2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rsv2 to value 0"] impl crate::Resettable for RSV2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/rsv3.rs b/src/glb/rsv3.rs index 71c9216..db9d642 100644 --- a/src/glb/rsv3.rs +++ b/src/glb/rsv3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,32 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `rsvd_31_0` reader - "] -pub struct RSVD_31_0_R(crate::FieldReader); -impl RSVD_31_0_R { - pub(crate) fn new(bits: u32) -> Self { - RSVD_31_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RSVD_31_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RSVD_31_0_R = crate::FieldReader; #[doc = "Field `rsvd_31_0` writer - "] -pub struct RSVD_31_0_W<'a> { - w: &'a mut W, -} -impl<'a> RSVD_31_0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type RSVD_31_0_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RSV3_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn rsvd_31_0(&self) -> RSVD_31_0_R { - RSVD_31_0_R::new((self.bits & 0xffff_ffff) as u32) + RSVD_31_0_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn rsvd_31_0(&mut self) -> RSVD_31_0_W { - RSVD_31_0_W { w: self } + #[must_use] + pub fn rsvd_31_0(&mut self) -> RSVD_31_0_W<0> { + RSVD_31_0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +71,10 @@ impl crate::Readable for RSV3_SPEC { #[doc = "`write(|w| ..)` method takes [rsv3::W](W) writer structure"] impl crate::Writable for RSV3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rsv3 to value 0"] impl crate::Resettable for RSV3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/seam_misc.rs b/src/glb/seam_misc.rs index d4f275b..3054a8b 100644 --- a/src/glb/seam_misc.rs +++ b/src/glb/seam_misc.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,37 +28,16 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `em_sel` reader - "] -pub struct EM_SEL_R(crate::FieldReader); -impl EM_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - EM_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EM_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type EM_SEL_R = crate::FieldReader; #[doc = "Field `em_sel` writer - "] -pub struct EM_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> EM_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x0f) | (value as u32 & 0x0f); - self.w - } -} +pub type EM_SEL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SEAM_MISC_SPEC, u8, u8, 4, O>; impl R { #[doc = "Bits 0:3"] #[inline(always)] @@ -68,10 +48,12 @@ impl R { impl W { #[doc = "Bits 0:3"] #[inline(always)] - pub fn em_sel(&mut self) -> EM_SEL_W { - EM_SEL_W { w: self } + #[must_use] + pub fn em_sel(&mut self) -> EM_SEL_W<0> { + EM_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +71,10 @@ impl crate::Readable for SEAM_MISC_SPEC { #[doc = "`write(|w| ..)` method takes [seam_misc::W](W) writer structure"] impl crate::Writable for SEAM_MISC_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets seam_misc to value 0x03"] impl crate::Resettable for SEAM_MISC_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x03 - } + const RESET_VALUE: Self::Ux = 0x03; } diff --git a/src/glb/sram_parm.rs b/src/glb/sram_parm.rs index 10a5442..a7b9875 100644 --- a/src/glb/sram_parm.rs +++ b/src/glb/sram_parm.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `reg_sram_parm` reader - "] -pub struct REG_SRAM_PARM_R(crate::FieldReader); -impl REG_SRAM_PARM_R { - pub(crate) fn new(bits: u32) -> Self { - REG_SRAM_PARM_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_SRAM_PARM_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type REG_SRAM_PARM_R = crate::FieldReader; #[doc = "Field `reg_sram_parm` writer - "] -pub struct REG_SRAM_PARM_W<'a> { - w: &'a mut W, -} -impl<'a> REG_SRAM_PARM_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type REG_SRAM_PARM_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SRAM_PARM_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn reg_sram_parm(&self) -> REG_SRAM_PARM_R { - REG_SRAM_PARM_R::new((self.bits & 0xffff_ffff) as u32) + REG_SRAM_PARM_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn reg_sram_parm(&mut self) -> REG_SRAM_PARM_W { - REG_SRAM_PARM_W { w: self } + #[must_use] + pub fn reg_sram_parm(&mut self) -> REG_SRAM_PARM_W<0> { + REG_SRAM_PARM_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SRAM_PARM_SPEC { #[doc = "`write(|w| ..)` method takes [sram_parm::W](W) writer structure"] impl crate::Writable for SRAM_PARM_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sram_parm to value 0x0c0c_0c0c"] impl crate::Resettable for SRAM_PARM_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0c0c_0c0c - } + const RESET_VALUE: Self::Ux = 0x0c0c_0c0c; } diff --git a/src/glb/sram_ret.rs b/src/glb/sram_ret.rs index 78a5808..9e83faa 100644 --- a/src/glb/sram_ret.rs +++ b/src/glb/sram_ret.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `reg_sram_ret` reader - "] -pub struct REG_SRAM_RET_R(crate::FieldReader); -impl REG_SRAM_RET_R { - pub(crate) fn new(bits: u32) -> Self { - REG_SRAM_RET_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_SRAM_RET_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type REG_SRAM_RET_R = crate::FieldReader; #[doc = "Field `reg_sram_ret` writer - "] -pub struct REG_SRAM_RET_W<'a> { - w: &'a mut W, -} -impl<'a> REG_SRAM_RET_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type REG_SRAM_RET_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SRAM_RET_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn reg_sram_ret(&self) -> REG_SRAM_RET_R { - REG_SRAM_RET_R::new((self.bits & 0xffff_ffff) as u32) + REG_SRAM_RET_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn reg_sram_ret(&mut self) -> REG_SRAM_RET_W { - REG_SRAM_RET_W { w: self } + #[must_use] + pub fn reg_sram_ret(&mut self) -> REG_SRAM_RET_W<0> { + REG_SRAM_RET_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SRAM_RET_SPEC { #[doc = "`write(|w| ..)` method takes [sram_ret::W](W) writer structure"] impl crate::Writable for SRAM_RET_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sram_ret to value 0"] impl crate::Resettable for SRAM_RET_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/sram_slp.rs b/src/glb/sram_slp.rs index 6814c3f..baacefc 100644 --- a/src/glb/sram_slp.rs +++ b/src/glb/sram_slp.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `reg_sram_slp` reader - "] -pub struct REG_SRAM_SLP_R(crate::FieldReader); -impl REG_SRAM_SLP_R { - pub(crate) fn new(bits: u32) -> Self { - REG_SRAM_SLP_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_SRAM_SLP_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type REG_SRAM_SLP_R = crate::FieldReader; #[doc = "Field `reg_sram_slp` writer - "] -pub struct REG_SRAM_SLP_W<'a> { - w: &'a mut W, -} -impl<'a> REG_SRAM_SLP_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type REG_SRAM_SLP_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SRAM_SLP_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn reg_sram_slp(&self) -> REG_SRAM_SLP_R { - REG_SRAM_SLP_R::new((self.bits & 0xffff_ffff) as u32) + REG_SRAM_SLP_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn reg_sram_slp(&mut self) -> REG_SRAM_SLP_W { - REG_SRAM_SLP_W { w: self } + #[must_use] + pub fn reg_sram_slp(&mut self) -> REG_SRAM_SLP_W<0> { + REG_SRAM_SLP_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SRAM_SLP_SPEC { #[doc = "`write(|w| ..)` method takes [sram_slp::W](W) writer structure"] impl crate::Writable for SRAM_SLP_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sram_slp to value 0"] impl crate::Resettable for SRAM_SLP_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/swrst_cfg0.rs b/src/glb/swrst_cfg0.rs index 0aece27..6eb8c52 100644 --- a/src/glb/swrst_cfg0.rs +++ b/src/glb/swrst_cfg0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,199 +28,77 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `swrst_s30` reader - "] -pub struct SWRST_S30_R(crate::FieldReader); -impl SWRST_S30_R { - pub(crate) fn new(bits: bool) -> Self { - SWRST_S30_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SWRST_S30_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `swrst_s30` writer - "] -pub struct SWRST_S30_W<'a> { - w: &'a mut W, -} -impl<'a> SWRST_S30_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `swrst_s20` reader - "] -pub struct SWRST_S20_R(crate::FieldReader); -impl SWRST_S20_R { - pub(crate) fn new(bits: bool) -> Self { - SWRST_S20_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SWRST_S20_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `swrst_s20` writer - "] -pub struct SWRST_S20_W<'a> { - w: &'a mut W, -} -impl<'a> SWRST_S20_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} -#[doc = "Field `swrst_s01` reader - "] -pub struct SWRST_S01_R(crate::FieldReader); -impl SWRST_S01_R { - pub(crate) fn new(bits: bool) -> Self { - SWRST_S01_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SWRST_S01_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `swrst_s01` writer - "] -pub struct SWRST_S01_W<'a> { - w: &'a mut W, -} -impl<'a> SWRST_S01_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `swrst_s00` reader - "] -pub struct SWRST_S00_R(crate::FieldReader); -impl SWRST_S00_R { - pub(crate) fn new(bits: bool) -> Self { - SWRST_S00_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SWRST_S00_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SWRST_S00_R = crate::BitReader; #[doc = "Field `swrst_s00` writer - "] -pub struct SWRST_S00_W<'a> { - w: &'a mut W, -} -impl<'a> SWRST_S00_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type SWRST_S00_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWRST_CFG0_SPEC, bool, O>; +#[doc = "Field `swrst_s01` reader - "] +pub type SWRST_S01_R = crate::BitReader; +#[doc = "Field `swrst_s01` writer - "] +pub type SWRST_S01_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWRST_CFG0_SPEC, bool, O>; +#[doc = "Field `swrst_s20` reader - "] +pub type SWRST_S20_R = crate::BitReader; +#[doc = "Field `swrst_s20` writer - "] +pub type SWRST_S20_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWRST_CFG0_SPEC, bool, O>; +#[doc = "Field `swrst_s30` reader - "] +pub type SWRST_S30_R = crate::BitReader; +#[doc = "Field `swrst_s30` writer - "] +pub type SWRST_S30_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWRST_CFG0_SPEC, bool, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn swrst_s00(&self) -> SWRST_S00_R { + SWRST_S00_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bit 8"] + #[doc = "Bit 1"] #[inline(always)] - pub fn swrst_s30(&self) -> SWRST_S30_R { - SWRST_S30_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn swrst_s01(&self) -> SWRST_S01_R { + SWRST_S01_R::new(((self.bits >> 1) & 1) != 0) } #[doc = "Bit 4"] #[inline(always)] pub fn swrst_s20(&self) -> SWRST_S20_R { - SWRST_S20_R::new(((self.bits >> 4) & 0x01) != 0) - } - #[doc = "Bit 1"] - #[inline(always)] - pub fn swrst_s01(&self) -> SWRST_S01_R { - SWRST_S01_R::new(((self.bits >> 1) & 0x01) != 0) + SWRST_S20_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 8"] #[inline(always)] - pub fn swrst_s00(&self) -> SWRST_S00_R { - SWRST_S00_R::new((self.bits & 0x01) != 0) + pub fn swrst_s30(&self) -> SWRST_S30_R { + SWRST_S30_R::new(((self.bits >> 8) & 1) != 0) } } impl W { - #[doc = "Bit 8"] + #[doc = "Bit 0"] #[inline(always)] - pub fn swrst_s30(&mut self) -> SWRST_S30_W { - SWRST_S30_W { w: self } + #[must_use] + pub fn swrst_s00(&mut self) -> SWRST_S00_W<0> { + SWRST_S00_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 1"] #[inline(always)] - pub fn swrst_s20(&mut self) -> SWRST_S20_W { - SWRST_S20_W { w: self } + #[must_use] + pub fn swrst_s01(&mut self) -> SWRST_S01_W<1> { + SWRST_S01_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 4"] #[inline(always)] - pub fn swrst_s01(&mut self) -> SWRST_S01_W { - SWRST_S01_W { w: self } + #[must_use] + pub fn swrst_s20(&mut self) -> SWRST_S20_W<4> { + SWRST_S20_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 8"] #[inline(always)] - pub fn swrst_s00(&mut self) -> SWRST_S00_W { - SWRST_S00_W { w: self } + #[must_use] + pub fn swrst_s30(&mut self) -> SWRST_S30_W<8> { + SWRST_S30_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -237,11 +116,10 @@ impl crate::Readable for SWRST_CFG0_SPEC { #[doc = "`write(|w| ..)` method takes [swrst_cfg0::W](W) writer structure"] impl crate::Writable for SWRST_CFG0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets swrst_cfg0 to value 0"] impl crate::Resettable for SWRST_CFG0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/swrst_cfg1.rs b/src/glb/swrst_cfg1.rs index 70da66c..4db0175 100644 --- a/src/glb/swrst_cfg1.rs +++ b/src/glb/swrst_cfg1.rs @@ -7,1139 +7,398 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { - fn from(reader: crate::R) -> Self { - R(reader) - } -} -#[doc = "Register `swrst_cfg1` writer"] -pub struct W(crate::W); -impl core::ops::Deref for W { - type Target = crate::W; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -impl core::ops::DerefMut for W { - #[inline(always)] - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } -} -impl core::convert::From> for W { - fn from(writer: crate::W) -> Self { - W(writer) - } -} -#[doc = "Field `swrst_s1a7` reader - "] -pub struct SWRST_S1A7_R(crate::FieldReader); -impl SWRST_S1A7_R { - pub(crate) fn new(bits: bool) -> Self { - SWRST_S1A7_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SWRST_S1A7_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `swrst_s1a7` writer - "] -pub struct SWRST_S1A7_W<'a> { - w: &'a mut W, -} -impl<'a> SWRST_S1A7_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23); - self.w - } -} -#[doc = "Field `swrst_s1a6` reader - "] -pub struct SWRST_S1A6_R(crate::FieldReader); -impl SWRST_S1A6_R { - pub(crate) fn new(bits: bool) -> Self { - SWRST_S1A6_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SWRST_S1A6_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `swrst_s1a6` writer - "] -pub struct SWRST_S1A6_W<'a> { - w: &'a mut W, -} -impl<'a> SWRST_S1A6_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 22)) | ((value as u32 & 0x01) << 22); - self.w - } -} -#[doc = "Field `swrst_s1a5` reader - "] -pub struct SWRST_S1A5_R(crate::FieldReader); -impl SWRST_S1A5_R { - pub(crate) fn new(bits: bool) -> Self { - SWRST_S1A5_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SWRST_S1A5_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `swrst_s1a5` writer - "] -pub struct SWRST_S1A5_W<'a> { - w: &'a mut W, -} -impl<'a> SWRST_S1A5_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); - self.w - } -} -#[doc = "Field `swrst_s1a4` reader - "] -pub struct SWRST_S1A4_R(crate::FieldReader); -impl SWRST_S1A4_R { - pub(crate) fn new(bits: bool) -> Self { - SWRST_S1A4_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SWRST_S1A4_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `swrst_s1a4` writer - "] -pub struct SWRST_S1A4_W<'a> { - w: &'a mut W, -} -impl<'a> SWRST_S1A4_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w - } -} -#[doc = "Field `swrst_s1a3` reader - "] -pub struct SWRST_S1A3_R(crate::FieldReader); -impl SWRST_S1A3_R { - pub(crate) fn new(bits: bool) -> Self { - SWRST_S1A3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SWRST_S1A3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `swrst_s1a3` writer - "] -pub struct SWRST_S1A3_W<'a> { - w: &'a mut W, -} -impl<'a> SWRST_S1A3_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 19)) | ((value as u32 & 0x01) << 19); - self.w - } -} -#[doc = "Field `swrst_s1a2` reader - "] -pub struct SWRST_S1A2_R(crate::FieldReader); -impl SWRST_S1A2_R { - pub(crate) fn new(bits: bool) -> Self { - SWRST_S1A2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SWRST_S1A2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `swrst_s1a2` writer - "] -pub struct SWRST_S1A2_W<'a> { - w: &'a mut W, -} -impl<'a> SWRST_S1A2_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18); - self.w - } -} -#[doc = "Field `swrst_s1a1` reader - "] -pub struct SWRST_S1A1_R(crate::FieldReader); -impl SWRST_S1A1_R { - pub(crate) fn new(bits: bool) -> Self { - SWRST_S1A1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SWRST_S1A1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `swrst_s1a1` writer - "] -pub struct SWRST_S1A1_W<'a> { - w: &'a mut W, -} -impl<'a> SWRST_S1A1_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w - } -} -#[doc = "Field `swrst_s1a0` reader - "] -pub struct SWRST_S1A0_R(crate::FieldReader); -impl SWRST_S1A0_R { - pub(crate) fn new(bits: bool) -> Self { - SWRST_S1A0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SWRST_S1A0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `swrst_s1a0` writer - "] -pub struct SWRST_S1A0_W<'a> { - w: &'a mut W, -} -impl<'a> SWRST_S1A0_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `swrst_s1f` reader - "] -pub struct SWRST_S1F_R(crate::FieldReader); -impl SWRST_S1F_R { - pub(crate) fn new(bits: bool) -> Self { - SWRST_S1F_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SWRST_S1F_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `swrst_s1f` writer - "] -pub struct SWRST_S1F_W<'a> { - w: &'a mut W, -} -impl<'a> SWRST_S1F_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15); - self.w - } -} -#[doc = "Field `swrst_s1e` reader - "] -pub struct SWRST_S1E_R(crate::FieldReader); -impl SWRST_S1E_R { - pub(crate) fn new(bits: bool) -> Self { - SWRST_S1E_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SWRST_S1E_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `swrst_s1e` writer - "] -pub struct SWRST_S1E_W<'a> { - w: &'a mut W, -} -impl<'a> SWRST_S1E_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14); - self.w - } -} -#[doc = "Field `swrst_s1d` reader - "] -pub struct SWRST_S1D_R(crate::FieldReader); -impl SWRST_S1D_R { - pub(crate) fn new(bits: bool) -> Self { - SWRST_S1D_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SWRST_S1D_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `swrst_s1d` writer - "] -pub struct SWRST_S1D_W<'a> { - w: &'a mut W, -} -impl<'a> SWRST_S1D_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13); - self.w - } -} -#[doc = "Field `swrst_s1c` reader - "] -pub struct SWRST_S1C_R(crate::FieldReader); -impl SWRST_S1C_R { - pub(crate) fn new(bits: bool) -> Self { - SWRST_S1C_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SWRST_S1C_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `swrst_s1c` writer - "] -pub struct SWRST_S1C_W<'a> { - w: &'a mut W, -} -impl<'a> SWRST_S1C_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} -#[doc = "Field `swrst_s1b` reader - "] -pub struct SWRST_S1B_R(crate::FieldReader); -impl SWRST_S1B_R { - pub(crate) fn new(bits: bool) -> Self { - SWRST_S1B_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SWRST_S1B_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `swrst_s1b` writer - "] -pub struct SWRST_S1B_W<'a> { - w: &'a mut W, -} -impl<'a> SWRST_S1B_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w - } -} -#[doc = "Field `swrst_s1a` reader - "] -pub struct SWRST_S1A_R(crate::FieldReader); -impl SWRST_S1A_R { - pub(crate) fn new(bits: bool) -> Self { - SWRST_S1A_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SWRST_S1A_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `swrst_s1a` writer - "] -pub struct SWRST_S1A_W<'a> { - w: &'a mut W, -} -impl<'a> SWRST_S1A_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); - self.w - } -} -#[doc = "Field `swrst_s19` reader - "] -pub struct SWRST_S19_R(crate::FieldReader); -impl SWRST_S19_R { - pub(crate) fn new(bits: bool) -> Self { - SWRST_S19_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SWRST_S19_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `swrst_s19` writer - "] -pub struct SWRST_S19_W<'a> { - w: &'a mut W, -} -impl<'a> SWRST_S19_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w - } -} -#[doc = "Field `swrst_s18` reader - "] -pub struct SWRST_S18_R(crate::FieldReader); -impl SWRST_S18_R { - pub(crate) fn new(bits: bool) -> Self { - SWRST_S18_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SWRST_S18_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `swrst_s18` writer - "] -pub struct SWRST_S18_W<'a> { - w: &'a mut W, -} -impl<'a> SWRST_S18_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `swrst_s17` reader - "] -pub struct SWRST_S17_R(crate::FieldReader); -impl SWRST_S17_R { - pub(crate) fn new(bits: bool) -> Self { - SWRST_S17_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SWRST_S17_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `swrst_s17` writer - "] -pub struct SWRST_S17_W<'a> { - w: &'a mut W, -} -impl<'a> SWRST_S17_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7); - self.w - } -} -#[doc = "Field `swrst_s16` reader - "] -pub struct SWRST_S16_R(crate::FieldReader); -impl SWRST_S16_R { - pub(crate) fn new(bits: bool) -> Self { - SWRST_S16_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SWRST_S16_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `swrst_s16` writer - "] -pub struct SWRST_S16_W<'a> { - w: &'a mut W, -} -impl<'a> SWRST_S16_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w - } -} -#[doc = "Field `swrst_s15` reader - "] -pub struct SWRST_S15_R(crate::FieldReader); -impl SWRST_S15_R { - pub(crate) fn new(bits: bool) -> Self { - SWRST_S15_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SWRST_S15_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `swrst_s15` writer - "] -pub struct SWRST_S15_W<'a> { - w: &'a mut W, -} -impl<'a> SWRST_S15_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w - } -} -#[doc = "Field `swrst_s14` reader - "] -pub struct SWRST_S14_R(crate::FieldReader); -impl SWRST_S14_R { - pub(crate) fn new(bits: bool) -> Self { - SWRST_S14_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SWRST_S14_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `swrst_s14` writer - "] -pub struct SWRST_S14_W<'a> { - w: &'a mut W, -} -impl<'a> SWRST_S14_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} -#[doc = "Field `swrst_s13` reader - "] -pub struct SWRST_S13_R(crate::FieldReader); -impl SWRST_S13_R { - pub(crate) fn new(bits: bool) -> Self { - SWRST_S13_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SWRST_S13_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `swrst_s13` writer - "] -pub struct SWRST_S13_W<'a> { - w: &'a mut W, -} -impl<'a> SWRST_S13_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +impl From> for R { #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `swrst_s12` reader - "] -pub struct SWRST_S12_R(crate::FieldReader); -impl SWRST_S12_R { - pub(crate) fn new(bits: bool) -> Self { - SWRST_S12_R(crate::FieldReader::new(bits)) + fn from(reader: crate::R) -> Self { + R(reader) } } -impl core::ops::Deref for SWRST_S12_R { - type Target = crate::FieldReader; +#[doc = "Register `swrst_cfg1` writer"] +pub struct W(crate::W); +impl core::ops::Deref for W { + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } -#[doc = "Field `swrst_s12` writer - "] -pub struct SWRST_S12_W<'a> { - w: &'a mut W, -} -impl<'a> SWRST_S12_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `swrst_s11` reader - "] -pub struct SWRST_S11_R(crate::FieldReader); -impl SWRST_S11_R { - pub(crate) fn new(bits: bool) -> Self { - SWRST_S11_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SWRST_S11_R { - type Target = crate::FieldReader; +impl core::ops::DerefMut for W { #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 } } -#[doc = "Field `swrst_s11` writer - "] -pub struct SWRST_S11_W<'a> { - w: &'a mut W, -} -impl<'a> SWRST_S11_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +impl From> for W { #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w + fn from(writer: crate::W) -> Self { + W(writer) } } #[doc = "Field `swrst_s10` reader - "] -pub struct SWRST_S10_R(crate::FieldReader); -impl SWRST_S10_R { - pub(crate) fn new(bits: bool) -> Self { - SWRST_S10_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SWRST_S10_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SWRST_S10_R = crate::BitReader; #[doc = "Field `swrst_s10` writer - "] -pub struct SWRST_S10_W<'a> { - w: &'a mut W, -} -impl<'a> SWRST_S10_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type SWRST_S10_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWRST_CFG1_SPEC, bool, O>; +#[doc = "Field `swrst_s11` reader - "] +pub type SWRST_S11_R = crate::BitReader; +#[doc = "Field `swrst_s11` writer - "] +pub type SWRST_S11_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWRST_CFG1_SPEC, bool, O>; +#[doc = "Field `swrst_s12` reader - "] +pub type SWRST_S12_R = crate::BitReader; +#[doc = "Field `swrst_s12` writer - "] +pub type SWRST_S12_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWRST_CFG1_SPEC, bool, O>; +#[doc = "Field `swrst_s13` reader - "] +pub type SWRST_S13_R = crate::BitReader; +#[doc = "Field `swrst_s13` writer - "] +pub type SWRST_S13_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWRST_CFG1_SPEC, bool, O>; +#[doc = "Field `swrst_s14` reader - "] +pub type SWRST_S14_R = crate::BitReader; +#[doc = "Field `swrst_s14` writer - "] +pub type SWRST_S14_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWRST_CFG1_SPEC, bool, O>; +#[doc = "Field `swrst_s15` reader - "] +pub type SWRST_S15_R = crate::BitReader; +#[doc = "Field `swrst_s15` writer - "] +pub type SWRST_S15_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWRST_CFG1_SPEC, bool, O>; +#[doc = "Field `swrst_s16` reader - "] +pub type SWRST_S16_R = crate::BitReader; +#[doc = "Field `swrst_s16` writer - "] +pub type SWRST_S16_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWRST_CFG1_SPEC, bool, O>; +#[doc = "Field `swrst_s17` reader - "] +pub type SWRST_S17_R = crate::BitReader; +#[doc = "Field `swrst_s17` writer - "] +pub type SWRST_S17_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWRST_CFG1_SPEC, bool, O>; +#[doc = "Field `swrst_s18` reader - "] +pub type SWRST_S18_R = crate::BitReader; +#[doc = "Field `swrst_s18` writer - "] +pub type SWRST_S18_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWRST_CFG1_SPEC, bool, O>; +#[doc = "Field `swrst_s19` reader - "] +pub type SWRST_S19_R = crate::BitReader; +#[doc = "Field `swrst_s19` writer - "] +pub type SWRST_S19_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWRST_CFG1_SPEC, bool, O>; +#[doc = "Field `swrst_s1a` reader - "] +pub type SWRST_S1A_R = crate::BitReader; +#[doc = "Field `swrst_s1a` writer - "] +pub type SWRST_S1A_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWRST_CFG1_SPEC, bool, O>; +#[doc = "Field `swrst_s1b` reader - "] +pub type SWRST_S1B_R = crate::BitReader; +#[doc = "Field `swrst_s1b` writer - "] +pub type SWRST_S1B_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWRST_CFG1_SPEC, bool, O>; +#[doc = "Field `swrst_s1c` reader - "] +pub type SWRST_S1C_R = crate::BitReader; +#[doc = "Field `swrst_s1c` writer - "] +pub type SWRST_S1C_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWRST_CFG1_SPEC, bool, O>; +#[doc = "Field `swrst_s1d` reader - "] +pub type SWRST_S1D_R = crate::BitReader; +#[doc = "Field `swrst_s1d` writer - "] +pub type SWRST_S1D_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWRST_CFG1_SPEC, bool, O>; +#[doc = "Field `swrst_s1e` reader - "] +pub type SWRST_S1E_R = crate::BitReader; +#[doc = "Field `swrst_s1e` writer - "] +pub type SWRST_S1E_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWRST_CFG1_SPEC, bool, O>; +#[doc = "Field `swrst_s1f` reader - "] +pub type SWRST_S1F_R = crate::BitReader; +#[doc = "Field `swrst_s1f` writer - "] +pub type SWRST_S1F_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWRST_CFG1_SPEC, bool, O>; +#[doc = "Field `swrst_s1a0` reader - "] +pub type SWRST_S1A0_R = crate::BitReader; +#[doc = "Field `swrst_s1a0` writer - "] +pub type SWRST_S1A0_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWRST_CFG1_SPEC, bool, O>; +#[doc = "Field `swrst_s1a1` reader - "] +pub type SWRST_S1A1_R = crate::BitReader; +#[doc = "Field `swrst_s1a1` writer - "] +pub type SWRST_S1A1_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWRST_CFG1_SPEC, bool, O>; +#[doc = "Field `swrst_s1a2` reader - "] +pub type SWRST_S1A2_R = crate::BitReader; +#[doc = "Field `swrst_s1a2` writer - "] +pub type SWRST_S1A2_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWRST_CFG1_SPEC, bool, O>; +#[doc = "Field `swrst_s1a3` reader - "] +pub type SWRST_S1A3_R = crate::BitReader; +#[doc = "Field `swrst_s1a3` writer - "] +pub type SWRST_S1A3_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWRST_CFG1_SPEC, bool, O>; +#[doc = "Field `swrst_s1a4` reader - "] +pub type SWRST_S1A4_R = crate::BitReader; +#[doc = "Field `swrst_s1a4` writer - "] +pub type SWRST_S1A4_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWRST_CFG1_SPEC, bool, O>; +#[doc = "Field `swrst_s1a5` reader - "] +pub type SWRST_S1A5_R = crate::BitReader; +#[doc = "Field `swrst_s1a5` writer - "] +pub type SWRST_S1A5_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWRST_CFG1_SPEC, bool, O>; +#[doc = "Field `swrst_s1a6` reader - "] +pub type SWRST_S1A6_R = crate::BitReader; +#[doc = "Field `swrst_s1a6` writer - "] +pub type SWRST_S1A6_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWRST_CFG1_SPEC, bool, O>; +#[doc = "Field `swrst_s1a7` reader - "] +pub type SWRST_S1A7_R = crate::BitReader; +#[doc = "Field `swrst_s1a7` writer - "] +pub type SWRST_S1A7_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWRST_CFG1_SPEC, bool, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn swrst_s10(&self) -> SWRST_S10_R { + SWRST_S10_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bit 23"] + #[doc = "Bit 1"] #[inline(always)] - pub fn swrst_s1a7(&self) -> SWRST_S1A7_R { - SWRST_S1A7_R::new(((self.bits >> 23) & 0x01) != 0) + pub fn swrst_s11(&self) -> SWRST_S11_R { + SWRST_S11_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 22"] + #[doc = "Bit 2"] #[inline(always)] - pub fn swrst_s1a6(&self) -> SWRST_S1A6_R { - SWRST_S1A6_R::new(((self.bits >> 22) & 0x01) != 0) + pub fn swrst_s12(&self) -> SWRST_S12_R { + SWRST_S12_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 21"] + #[doc = "Bit 3"] #[inline(always)] - pub fn swrst_s1a5(&self) -> SWRST_S1A5_R { - SWRST_S1A5_R::new(((self.bits >> 21) & 0x01) != 0) + pub fn swrst_s13(&self) -> SWRST_S13_R { + SWRST_S13_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bit 20"] + #[doc = "Bit 4"] #[inline(always)] - pub fn swrst_s1a4(&self) -> SWRST_S1A4_R { - SWRST_S1A4_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn swrst_s14(&self) -> SWRST_S14_R { + SWRST_S14_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 19"] + #[doc = "Bit 5"] #[inline(always)] - pub fn swrst_s1a3(&self) -> SWRST_S1A3_R { - SWRST_S1A3_R::new(((self.bits >> 19) & 0x01) != 0) + pub fn swrst_s15(&self) -> SWRST_S15_R { + SWRST_S15_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 18"] + #[doc = "Bit 6"] #[inline(always)] - pub fn swrst_s1a2(&self) -> SWRST_S1A2_R { - SWRST_S1A2_R::new(((self.bits >> 18) & 0x01) != 0) + pub fn swrst_s16(&self) -> SWRST_S16_R { + SWRST_S16_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = "Bit 17"] + #[doc = "Bit 7"] #[inline(always)] - pub fn swrst_s1a1(&self) -> SWRST_S1A1_R { - SWRST_S1A1_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn swrst_s17(&self) -> SWRST_S17_R { + SWRST_S17_R::new(((self.bits >> 7) & 1) != 0) } - #[doc = "Bit 16"] + #[doc = "Bit 8"] #[inline(always)] - pub fn swrst_s1a0(&self) -> SWRST_S1A0_R { - SWRST_S1A0_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn swrst_s18(&self) -> SWRST_S18_R { + SWRST_S18_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bit 15"] + #[doc = "Bit 9"] #[inline(always)] - pub fn swrst_s1f(&self) -> SWRST_S1F_R { - SWRST_S1F_R::new(((self.bits >> 15) & 0x01) != 0) + pub fn swrst_s19(&self) -> SWRST_S19_R { + SWRST_S19_R::new(((self.bits >> 9) & 1) != 0) } - #[doc = "Bit 14"] + #[doc = "Bit 10"] #[inline(always)] - pub fn swrst_s1e(&self) -> SWRST_S1E_R { - SWRST_S1E_R::new(((self.bits >> 14) & 0x01) != 0) + pub fn swrst_s1a(&self) -> SWRST_S1A_R { + SWRST_S1A_R::new(((self.bits >> 10) & 1) != 0) } - #[doc = "Bit 13"] + #[doc = "Bit 11"] #[inline(always)] - pub fn swrst_s1d(&self) -> SWRST_S1D_R { - SWRST_S1D_R::new(((self.bits >> 13) & 0x01) != 0) + pub fn swrst_s1b(&self) -> SWRST_S1B_R { + SWRST_S1B_R::new(((self.bits >> 11) & 1) != 0) } #[doc = "Bit 12"] #[inline(always)] pub fn swrst_s1c(&self) -> SWRST_S1C_R { - SWRST_S1C_R::new(((self.bits >> 12) & 0x01) != 0) - } - #[doc = "Bit 11"] - #[inline(always)] - pub fn swrst_s1b(&self) -> SWRST_S1B_R { - SWRST_S1B_R::new(((self.bits >> 11) & 0x01) != 0) + SWRST_S1C_R::new(((self.bits >> 12) & 1) != 0) } - #[doc = "Bit 10"] + #[doc = "Bit 13"] #[inline(always)] - pub fn swrst_s1a(&self) -> SWRST_S1A_R { - SWRST_S1A_R::new(((self.bits >> 10) & 0x01) != 0) + pub fn swrst_s1d(&self) -> SWRST_S1D_R { + SWRST_S1D_R::new(((self.bits >> 13) & 1) != 0) } - #[doc = "Bit 9"] + #[doc = "Bit 14"] #[inline(always)] - pub fn swrst_s19(&self) -> SWRST_S19_R { - SWRST_S19_R::new(((self.bits >> 9) & 0x01) != 0) + pub fn swrst_s1e(&self) -> SWRST_S1E_R { + SWRST_S1E_R::new(((self.bits >> 14) & 1) != 0) } - #[doc = "Bit 8"] + #[doc = "Bit 15"] #[inline(always)] - pub fn swrst_s18(&self) -> SWRST_S18_R { - SWRST_S18_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn swrst_s1f(&self) -> SWRST_S1F_R { + SWRST_S1F_R::new(((self.bits >> 15) & 1) != 0) } - #[doc = "Bit 7"] + #[doc = "Bit 16"] #[inline(always)] - pub fn swrst_s17(&self) -> SWRST_S17_R { - SWRST_S17_R::new(((self.bits >> 7) & 0x01) != 0) + pub fn swrst_s1a0(&self) -> SWRST_S1A0_R { + SWRST_S1A0_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 6"] + #[doc = "Bit 17"] #[inline(always)] - pub fn swrst_s16(&self) -> SWRST_S16_R { - SWRST_S16_R::new(((self.bits >> 6) & 0x01) != 0) + pub fn swrst_s1a1(&self) -> SWRST_S1A1_R { + SWRST_S1A1_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bit 5"] + #[doc = "Bit 18"] #[inline(always)] - pub fn swrst_s15(&self) -> SWRST_S15_R { - SWRST_S15_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn swrst_s1a2(&self) -> SWRST_S1A2_R { + SWRST_S1A2_R::new(((self.bits >> 18) & 1) != 0) } - #[doc = "Bit 4"] + #[doc = "Bit 19"] #[inline(always)] - pub fn swrst_s14(&self) -> SWRST_S14_R { - SWRST_S14_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn swrst_s1a3(&self) -> SWRST_S1A3_R { + SWRST_S1A3_R::new(((self.bits >> 19) & 1) != 0) } - #[doc = "Bit 3"] + #[doc = "Bit 20"] #[inline(always)] - pub fn swrst_s13(&self) -> SWRST_S13_R { - SWRST_S13_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn swrst_s1a4(&self) -> SWRST_S1A4_R { + SWRST_S1A4_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bit 21"] #[inline(always)] - pub fn swrst_s12(&self) -> SWRST_S12_R { - SWRST_S12_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn swrst_s1a5(&self) -> SWRST_S1A5_R { + SWRST_S1A5_R::new(((self.bits >> 21) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 22"] #[inline(always)] - pub fn swrst_s11(&self) -> SWRST_S11_R { - SWRST_S11_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn swrst_s1a6(&self) -> SWRST_S1A6_R { + SWRST_S1A6_R::new(((self.bits >> 22) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 23"] #[inline(always)] - pub fn swrst_s10(&self) -> SWRST_S10_R { - SWRST_S10_R::new((self.bits & 0x01) != 0) + pub fn swrst_s1a7(&self) -> SWRST_S1A7_R { + SWRST_S1A7_R::new(((self.bits >> 23) & 1) != 0) } } impl W { - #[doc = "Bit 23"] + #[doc = "Bit 0"] #[inline(always)] - pub fn swrst_s1a7(&mut self) -> SWRST_S1A7_W { - SWRST_S1A7_W { w: self } + #[must_use] + pub fn swrst_s10(&mut self) -> SWRST_S10_W<0> { + SWRST_S10_W::new(self) } - #[doc = "Bit 22"] + #[doc = "Bit 1"] #[inline(always)] - pub fn swrst_s1a6(&mut self) -> SWRST_S1A6_W { - SWRST_S1A6_W { w: self } + #[must_use] + pub fn swrst_s11(&mut self) -> SWRST_S11_W<1> { + SWRST_S11_W::new(self) } - #[doc = "Bit 21"] + #[doc = "Bit 2"] #[inline(always)] - pub fn swrst_s1a5(&mut self) -> SWRST_S1A5_W { - SWRST_S1A5_W { w: self } + #[must_use] + pub fn swrst_s12(&mut self) -> SWRST_S12_W<2> { + SWRST_S12_W::new(self) } - #[doc = "Bit 20"] + #[doc = "Bit 3"] #[inline(always)] - pub fn swrst_s1a4(&mut self) -> SWRST_S1A4_W { - SWRST_S1A4_W { w: self } + #[must_use] + pub fn swrst_s13(&mut self) -> SWRST_S13_W<3> { + SWRST_S13_W::new(self) } - #[doc = "Bit 19"] + #[doc = "Bit 4"] #[inline(always)] - pub fn swrst_s1a3(&mut self) -> SWRST_S1A3_W { - SWRST_S1A3_W { w: self } + #[must_use] + pub fn swrst_s14(&mut self) -> SWRST_S14_W<4> { + SWRST_S14_W::new(self) } - #[doc = "Bit 18"] + #[doc = "Bit 5"] #[inline(always)] - pub fn swrst_s1a2(&mut self) -> SWRST_S1A2_W { - SWRST_S1A2_W { w: self } + #[must_use] + pub fn swrst_s15(&mut self) -> SWRST_S15_W<5> { + SWRST_S15_W::new(self) } - #[doc = "Bit 17"] + #[doc = "Bit 6"] #[inline(always)] - pub fn swrst_s1a1(&mut self) -> SWRST_S1A1_W { - SWRST_S1A1_W { w: self } + #[must_use] + pub fn swrst_s16(&mut self) -> SWRST_S16_W<6> { + SWRST_S16_W::new(self) } - #[doc = "Bit 16"] + #[doc = "Bit 7"] #[inline(always)] - pub fn swrst_s1a0(&mut self) -> SWRST_S1A0_W { - SWRST_S1A0_W { w: self } + #[must_use] + pub fn swrst_s17(&mut self) -> SWRST_S17_W<7> { + SWRST_S17_W::new(self) } - #[doc = "Bit 15"] + #[doc = "Bit 8"] #[inline(always)] - pub fn swrst_s1f(&mut self) -> SWRST_S1F_W { - SWRST_S1F_W { w: self } + #[must_use] + pub fn swrst_s18(&mut self) -> SWRST_S18_W<8> { + SWRST_S18_W::new(self) } - #[doc = "Bit 14"] + #[doc = "Bit 9"] #[inline(always)] - pub fn swrst_s1e(&mut self) -> SWRST_S1E_W { - SWRST_S1E_W { w: self } + #[must_use] + pub fn swrst_s19(&mut self) -> SWRST_S19_W<9> { + SWRST_S19_W::new(self) } - #[doc = "Bit 13"] + #[doc = "Bit 10"] #[inline(always)] - pub fn swrst_s1d(&mut self) -> SWRST_S1D_W { - SWRST_S1D_W { w: self } + #[must_use] + pub fn swrst_s1a(&mut self) -> SWRST_S1A_W<10> { + SWRST_S1A_W::new(self) } - #[doc = "Bit 12"] + #[doc = "Bit 11"] #[inline(always)] - pub fn swrst_s1c(&mut self) -> SWRST_S1C_W { - SWRST_S1C_W { w: self } + #[must_use] + pub fn swrst_s1b(&mut self) -> SWRST_S1B_W<11> { + SWRST_S1B_W::new(self) } - #[doc = "Bit 11"] + #[doc = "Bit 12"] #[inline(always)] - pub fn swrst_s1b(&mut self) -> SWRST_S1B_W { - SWRST_S1B_W { w: self } + #[must_use] + pub fn swrst_s1c(&mut self) -> SWRST_S1C_W<12> { + SWRST_S1C_W::new(self) } - #[doc = "Bit 10"] + #[doc = "Bit 13"] #[inline(always)] - pub fn swrst_s1a(&mut self) -> SWRST_S1A_W { - SWRST_S1A_W { w: self } + #[must_use] + pub fn swrst_s1d(&mut self) -> SWRST_S1D_W<13> { + SWRST_S1D_W::new(self) } - #[doc = "Bit 9"] + #[doc = "Bit 14"] #[inline(always)] - pub fn swrst_s19(&mut self) -> SWRST_S19_W { - SWRST_S19_W { w: self } + #[must_use] + pub fn swrst_s1e(&mut self) -> SWRST_S1E_W<14> { + SWRST_S1E_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bit 15"] #[inline(always)] - pub fn swrst_s18(&mut self) -> SWRST_S18_W { - SWRST_S18_W { w: self } + #[must_use] + pub fn swrst_s1f(&mut self) -> SWRST_S1F_W<15> { + SWRST_S1F_W::new(self) } - #[doc = "Bit 7"] + #[doc = "Bit 16"] #[inline(always)] - pub fn swrst_s17(&mut self) -> SWRST_S17_W { - SWRST_S17_W { w: self } + #[must_use] + pub fn swrst_s1a0(&mut self) -> SWRST_S1A0_W<16> { + SWRST_S1A0_W::new(self) } - #[doc = "Bit 6"] + #[doc = "Bit 17"] #[inline(always)] - pub fn swrst_s16(&mut self) -> SWRST_S16_W { - SWRST_S16_W { w: self } + #[must_use] + pub fn swrst_s1a1(&mut self) -> SWRST_S1A1_W<17> { + SWRST_S1A1_W::new(self) } - #[doc = "Bit 5"] + #[doc = "Bit 18"] #[inline(always)] - pub fn swrst_s15(&mut self) -> SWRST_S15_W { - SWRST_S15_W { w: self } + #[must_use] + pub fn swrst_s1a2(&mut self) -> SWRST_S1A2_W<18> { + SWRST_S1A2_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 19"] #[inline(always)] - pub fn swrst_s14(&mut self) -> SWRST_S14_W { - SWRST_S14_W { w: self } + #[must_use] + pub fn swrst_s1a3(&mut self) -> SWRST_S1A3_W<19> { + SWRST_S1A3_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bit 20"] #[inline(always)] - pub fn swrst_s13(&mut self) -> SWRST_S13_W { - SWRST_S13_W { w: self } + #[must_use] + pub fn swrst_s1a4(&mut self) -> SWRST_S1A4_W<20> { + SWRST_S1A4_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bit 21"] #[inline(always)] - pub fn swrst_s12(&mut self) -> SWRST_S12_W { - SWRST_S12_W { w: self } + #[must_use] + pub fn swrst_s1a5(&mut self) -> SWRST_S1A5_W<21> { + SWRST_S1A5_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 22"] #[inline(always)] - pub fn swrst_s11(&mut self) -> SWRST_S11_W { - SWRST_S11_W { w: self } + #[must_use] + pub fn swrst_s1a6(&mut self) -> SWRST_S1A6_W<22> { + SWRST_S1A6_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 23"] #[inline(always)] - pub fn swrst_s10(&mut self) -> SWRST_S10_W { - SWRST_S10_W { w: self } + #[must_use] + pub fn swrst_s1a7(&mut self) -> SWRST_S1A7_W<23> { + SWRST_S1A7_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -1157,11 +416,10 @@ impl crate::Readable for SWRST_CFG1_SPEC { #[doc = "`write(|w| ..)` method takes [swrst_cfg1::W](W) writer structure"] impl crate::Writable for SWRST_CFG1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets swrst_cfg1 to value 0"] impl crate::Resettable for SWRST_CFG1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/swrst_cfg2.rs b/src/glb/swrst_cfg2.rs index c45cdbc..f6f9594 100644 --- a/src/glb/swrst_cfg2.rs +++ b/src/glb/swrst_cfg2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,235 +28,96 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `pka_clk_sel` reader - "] -pub struct PKA_CLK_SEL_R(crate::FieldReader); -impl PKA_CLK_SEL_R { - pub(crate) fn new(bits: bool) -> Self { - PKA_CLK_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PKA_CLK_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pka_clk_sel` writer - "] -pub struct PKA_CLK_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> PKA_CLK_SEL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24); - self.w - } -} -#[doc = "Field `reg_ctrl_reset_dummy` reader - "] -pub struct REG_CTRL_RESET_DUMMY_R(crate::FieldReader); -impl REG_CTRL_RESET_DUMMY_R { - pub(crate) fn new(bits: u8) -> Self { - REG_CTRL_RESET_DUMMY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_CTRL_RESET_DUMMY_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_ctrl_reset_dummy` writer - "] -pub struct REG_CTRL_RESET_DUMMY_W<'a> { - w: &'a mut W, -} -impl<'a> REG_CTRL_RESET_DUMMY_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 4)) | ((value as u32 & 0x0f) << 4); - self.w - } -} -#[doc = "Field `reg_ctrl_sys_reset` reader - "] -pub struct REG_CTRL_SYS_RESET_R(crate::FieldReader); -impl REG_CTRL_SYS_RESET_R { - pub(crate) fn new(bits: bool) -> Self { - REG_CTRL_SYS_RESET_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_CTRL_SYS_RESET_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_ctrl_sys_reset` writer - "] -pub struct REG_CTRL_SYS_RESET_W<'a> { - w: &'a mut W, -} -impl<'a> REG_CTRL_SYS_RESET_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `reg_ctrl_cpu_reset` reader - "] -pub struct REG_CTRL_CPU_RESET_R(crate::FieldReader); -impl REG_CTRL_CPU_RESET_R { - pub(crate) fn new(bits: bool) -> Self { - REG_CTRL_CPU_RESET_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_CTRL_CPU_RESET_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_ctrl_cpu_reset` writer - "] -pub struct REG_CTRL_CPU_RESET_W<'a> { - w: &'a mut W, -} -impl<'a> REG_CTRL_CPU_RESET_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `reg_ctrl_pwron_rst` reader - "] -pub struct REG_CTRL_PWRON_RST_R(crate::FieldReader); -impl REG_CTRL_PWRON_RST_R { - pub(crate) fn new(bits: bool) -> Self { - REG_CTRL_PWRON_RST_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_CTRL_PWRON_RST_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type REG_CTRL_PWRON_RST_R = crate::BitReader; #[doc = "Field `reg_ctrl_pwron_rst` writer - "] -pub struct REG_CTRL_PWRON_RST_W<'a> { - w: &'a mut W, -} -impl<'a> REG_CTRL_PWRON_RST_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type REG_CTRL_PWRON_RST_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SWRST_CFG2_SPEC, bool, O>; +#[doc = "Field `reg_ctrl_cpu_reset` reader - "] +pub type REG_CTRL_CPU_RESET_R = crate::BitReader; +#[doc = "Field `reg_ctrl_cpu_reset` writer - "] +pub type REG_CTRL_CPU_RESET_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SWRST_CFG2_SPEC, bool, O>; +#[doc = "Field `reg_ctrl_sys_reset` reader - "] +pub type REG_CTRL_SYS_RESET_R = crate::BitReader; +#[doc = "Field `reg_ctrl_sys_reset` writer - "] +pub type REG_CTRL_SYS_RESET_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SWRST_CFG2_SPEC, bool, O>; +#[doc = "Field `reg_ctrl_reset_dummy` reader - "] +pub type REG_CTRL_RESET_DUMMY_R = crate::FieldReader; +#[doc = "Field `reg_ctrl_reset_dummy` writer - "] +pub type REG_CTRL_RESET_DUMMY_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SWRST_CFG2_SPEC, u8, u8, 4, O>; +#[doc = "Field `pka_clk_sel` reader - "] +pub type PKA_CLK_SEL_R = crate::BitReader; +#[doc = "Field `pka_clk_sel` writer - "] +pub type PKA_CLK_SEL_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWRST_CFG2_SPEC, bool, O>; impl R { - #[doc = "Bit 24"] + #[doc = "Bit 0"] #[inline(always)] - pub fn pka_clk_sel(&self) -> PKA_CLK_SEL_R { - PKA_CLK_SEL_R::new(((self.bits >> 24) & 0x01) != 0) + pub fn reg_ctrl_pwron_rst(&self) -> REG_CTRL_PWRON_RST_R { + REG_CTRL_PWRON_RST_R::new((self.bits & 1) != 0) } - #[doc = "Bits 4:7"] + #[doc = "Bit 1"] #[inline(always)] - pub fn reg_ctrl_reset_dummy(&self) -> REG_CTRL_RESET_DUMMY_R { - REG_CTRL_RESET_DUMMY_R::new(((self.bits >> 4) & 0x0f) as u8) + pub fn reg_ctrl_cpu_reset(&self) -> REG_CTRL_CPU_RESET_R { + REG_CTRL_CPU_RESET_R::new(((self.bits >> 1) & 1) != 0) } #[doc = "Bit 2"] #[inline(always)] pub fn reg_ctrl_sys_reset(&self) -> REG_CTRL_SYS_RESET_R { - REG_CTRL_SYS_RESET_R::new(((self.bits >> 2) & 0x01) != 0) + REG_CTRL_SYS_RESET_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bits 4:7"] #[inline(always)] - pub fn reg_ctrl_cpu_reset(&self) -> REG_CTRL_CPU_RESET_R { - REG_CTRL_CPU_RESET_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn reg_ctrl_reset_dummy(&self) -> REG_CTRL_RESET_DUMMY_R { + REG_CTRL_RESET_DUMMY_R::new(((self.bits >> 4) & 0x0f) as u8) } - #[doc = "Bit 0"] + #[doc = "Bit 24"] #[inline(always)] - pub fn reg_ctrl_pwron_rst(&self) -> REG_CTRL_PWRON_RST_R { - REG_CTRL_PWRON_RST_R::new((self.bits & 0x01) != 0) + pub fn pka_clk_sel(&self) -> PKA_CLK_SEL_R { + PKA_CLK_SEL_R::new(((self.bits >> 24) & 1) != 0) } } impl W { - #[doc = "Bit 24"] + #[doc = "Bit 0"] #[inline(always)] - pub fn pka_clk_sel(&mut self) -> PKA_CLK_SEL_W { - PKA_CLK_SEL_W { w: self } + #[must_use] + pub fn reg_ctrl_pwron_rst(&mut self) -> REG_CTRL_PWRON_RST_W<0> { + REG_CTRL_PWRON_RST_W::new(self) } - #[doc = "Bits 4:7"] + #[doc = "Bit 1"] #[inline(always)] - pub fn reg_ctrl_reset_dummy(&mut self) -> REG_CTRL_RESET_DUMMY_W { - REG_CTRL_RESET_DUMMY_W { w: self } + #[must_use] + pub fn reg_ctrl_cpu_reset(&mut self) -> REG_CTRL_CPU_RESET_W<1> { + REG_CTRL_CPU_RESET_W::new(self) } #[doc = "Bit 2"] #[inline(always)] - pub fn reg_ctrl_sys_reset(&mut self) -> REG_CTRL_SYS_RESET_W { - REG_CTRL_SYS_RESET_W { w: self } + #[must_use] + pub fn reg_ctrl_sys_reset(&mut self) -> REG_CTRL_SYS_RESET_W<2> { + REG_CTRL_SYS_RESET_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bits 4:7"] #[inline(always)] - pub fn reg_ctrl_cpu_reset(&mut self) -> REG_CTRL_CPU_RESET_W { - REG_CTRL_CPU_RESET_W { w: self } + #[must_use] + pub fn reg_ctrl_reset_dummy(&mut self) -> REG_CTRL_RESET_DUMMY_W<4> { + REG_CTRL_RESET_DUMMY_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 24"] #[inline(always)] - pub fn reg_ctrl_pwron_rst(&mut self) -> REG_CTRL_PWRON_RST_W { - REG_CTRL_PWRON_RST_W { w: self } + #[must_use] + pub fn pka_clk_sel(&mut self) -> PKA_CLK_SEL_W<24> { + PKA_CLK_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -273,11 +135,10 @@ impl crate::Readable for SWRST_CFG2_SPEC { #[doc = "`write(|w| ..)` method takes [swrst_cfg2::W](W) writer structure"] impl crate::Writable for SWRST_CFG2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets swrst_cfg2 to value 0"] impl crate::Resettable for SWRST_CFG2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/swrst_cfg3.rs b/src/glb/swrst_cfg3.rs index 6c652d6..bd225f1 100644 --- a/src/glb/swrst_cfg3.rs +++ b/src/glb/swrst_cfg3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,13 +28,15 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } impl W { #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -51,11 +54,10 @@ impl crate::Readable for SWRST_CFG3_SPEC { #[doc = "`write(|w| ..)` method takes [swrst_cfg3::W](W) writer structure"] impl crate::Writable for SWRST_CFG3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets swrst_cfg3 to value 0"] impl crate::Resettable for SWRST_CFG3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/tzc_glb_ctrl_0.rs b/src/glb/tzc_glb_ctrl_0.rs index ba59ee5..dd31fa4 100644 --- a/src/glb/tzc_glb_ctrl_0.rs +++ b/src/glb/tzc_glb_ctrl_0.rs @@ -7,277 +7,110 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `tzc_glb_clk_lock` reader - "] -pub struct TZC_GLB_CLK_LOCK_R(crate::FieldReader); -impl TZC_GLB_CLK_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_CLK_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_CLK_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_mbist_lock` reader - "] -pub struct TZC_GLB_MBIST_LOCK_R(crate::FieldReader); -impl TZC_GLB_MBIST_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_MBIST_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_MBIST_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_dbg_lock` reader - "] -pub struct TZC_GLB_DBG_LOCK_R(crate::FieldReader); -impl TZC_GLB_DBG_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_DBG_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_DBG_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_bmx_lock` reader - "] -pub struct TZC_GLB_BMX_LOCK_R(crate::FieldReader); -impl TZC_GLB_BMX_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_BMX_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_BMX_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_l2c_lock` reader - "] -pub struct TZC_GLB_L2C_LOCK_R(crate::FieldReader); -impl TZC_GLB_L2C_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_L2C_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_L2C_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_sram_lock` reader - "] -pub struct TZC_GLB_SRAM_LOCK_R(crate::FieldReader); -impl TZC_GLB_SRAM_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_SRAM_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_SRAM_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_misc_lock` reader - "] -pub struct TZC_GLB_MISC_LOCK_R(crate::FieldReader); -impl TZC_GLB_MISC_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_MISC_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_MISC_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_ctrl_ungated_ap_lock` reader - "] -pub struct TZC_GLB_CTRL_UNGATED_AP_LOCK_R(crate::FieldReader); -impl TZC_GLB_CTRL_UNGATED_AP_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_CTRL_UNGATED_AP_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_CTRL_UNGATED_AP_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_ctrl_sys_reset_lock` reader - "] -pub struct TZC_GLB_CTRL_SYS_RESET_LOCK_R(crate::FieldReader); -impl TZC_GLB_CTRL_SYS_RESET_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_CTRL_SYS_RESET_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_CTRL_SYS_RESET_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_ctrl_cpu_reset_lock` reader - "] -pub struct TZC_GLB_CTRL_CPU_RESET_LOCK_R(crate::FieldReader); -impl TZC_GLB_CTRL_CPU_RESET_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_CTRL_CPU_RESET_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_CTRL_CPU_RESET_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_ctrl_pwron_rst_lock` reader - "] -pub struct TZC_GLB_CTRL_PWRON_RST_LOCK_R(crate::FieldReader); -impl TZC_GLB_CTRL_PWRON_RST_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_CTRL_PWRON_RST_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_CTRL_PWRON_RST_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_swrst_s30_lock` reader - "] -pub struct TZC_GLB_SWRST_S30_LOCK_R(crate::FieldReader); -impl TZC_GLB_SWRST_S30_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_SWRST_S30_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_SWRST_S30_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_swrst_s01_lock` reader - "] -pub struct TZC_GLB_SWRST_S01_LOCK_R(crate::FieldReader); -impl TZC_GLB_SWRST_S01_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_SWRST_S01_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_SWRST_S01_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} #[doc = "Field `tzc_glb_swrst_s00_lock` reader - "] -pub struct TZC_GLB_SWRST_S00_LOCK_R(crate::FieldReader); -impl TZC_GLB_SWRST_S00_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_SWRST_S00_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_SWRST_S00_LOCK_R { - type Target = crate::FieldReader; +pub type TZC_GLB_SWRST_S00_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_swrst_s01_lock` reader - "] +pub type TZC_GLB_SWRST_S01_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_swrst_s30_lock` reader - "] +pub type TZC_GLB_SWRST_S30_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_ctrl_pwron_rst_lock` reader - "] +pub type TZC_GLB_CTRL_PWRON_RST_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_ctrl_cpu_reset_lock` reader - "] +pub type TZC_GLB_CTRL_CPU_RESET_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_ctrl_sys_reset_lock` reader - "] +pub type TZC_GLB_CTRL_SYS_RESET_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_ctrl_ungated_ap_lock` reader - "] +pub type TZC_GLB_CTRL_UNGATED_AP_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_misc_lock` reader - "] +pub type TZC_GLB_MISC_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_sram_lock` reader - "] +pub type TZC_GLB_SRAM_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_l2c_lock` reader - "] +pub type TZC_GLB_L2C_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_bmx_lock` reader - "] +pub type TZC_GLB_BMX_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_dbg_lock` reader - "] +pub type TZC_GLB_DBG_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_mbist_lock` reader - "] +pub type TZC_GLB_MBIST_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_clk_lock` reader - "] +pub type TZC_GLB_CLK_LOCK_R = crate::BitReader; +impl R { + #[doc = "Bit 0"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn tzc_glb_swrst_s00_lock(&self) -> TZC_GLB_SWRST_S00_LOCK_R { + TZC_GLB_SWRST_S00_LOCK_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bit 31"] + #[doc = "Bit 1"] #[inline(always)] - pub fn tzc_glb_clk_lock(&self) -> TZC_GLB_CLK_LOCK_R { - TZC_GLB_CLK_LOCK_R::new(((self.bits >> 31) & 0x01) != 0) + pub fn tzc_glb_swrst_s01_lock(&self) -> TZC_GLB_SWRST_S01_LOCK_R { + TZC_GLB_SWRST_S01_LOCK_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 30"] + #[doc = "Bit 8"] #[inline(always)] - pub fn tzc_glb_mbist_lock(&self) -> TZC_GLB_MBIST_LOCK_R { - TZC_GLB_MBIST_LOCK_R::new(((self.bits >> 30) & 0x01) != 0) + pub fn tzc_glb_swrst_s30_lock(&self) -> TZC_GLB_SWRST_S30_LOCK_R { + TZC_GLB_SWRST_S30_LOCK_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bit 29"] + #[doc = "Bit 12"] #[inline(always)] - pub fn tzc_glb_dbg_lock(&self) -> TZC_GLB_DBG_LOCK_R { - TZC_GLB_DBG_LOCK_R::new(((self.bits >> 29) & 0x01) != 0) + pub fn tzc_glb_ctrl_pwron_rst_lock(&self) -> TZC_GLB_CTRL_PWRON_RST_LOCK_R { + TZC_GLB_CTRL_PWRON_RST_LOCK_R::new(((self.bits >> 12) & 1) != 0) } - #[doc = "Bit 28"] + #[doc = "Bit 13"] #[inline(always)] - pub fn tzc_glb_bmx_lock(&self) -> TZC_GLB_BMX_LOCK_R { - TZC_GLB_BMX_LOCK_R::new(((self.bits >> 28) & 0x01) != 0) + pub fn tzc_glb_ctrl_cpu_reset_lock(&self) -> TZC_GLB_CTRL_CPU_RESET_LOCK_R { + TZC_GLB_CTRL_CPU_RESET_LOCK_R::new(((self.bits >> 13) & 1) != 0) } - #[doc = "Bit 27"] + #[doc = "Bit 14"] #[inline(always)] - pub fn tzc_glb_l2c_lock(&self) -> TZC_GLB_L2C_LOCK_R { - TZC_GLB_L2C_LOCK_R::new(((self.bits >> 27) & 0x01) != 0) + pub fn tzc_glb_ctrl_sys_reset_lock(&self) -> TZC_GLB_CTRL_SYS_RESET_LOCK_R { + TZC_GLB_CTRL_SYS_RESET_LOCK_R::new(((self.bits >> 14) & 1) != 0) } - #[doc = "Bit 26"] + #[doc = "Bit 15"] #[inline(always)] - pub fn tzc_glb_sram_lock(&self) -> TZC_GLB_SRAM_LOCK_R { - TZC_GLB_SRAM_LOCK_R::new(((self.bits >> 26) & 0x01) != 0) + pub fn tzc_glb_ctrl_ungated_ap_lock(&self) -> TZC_GLB_CTRL_UNGATED_AP_LOCK_R { + TZC_GLB_CTRL_UNGATED_AP_LOCK_R::new(((self.bits >> 15) & 1) != 0) } #[doc = "Bit 25"] #[inline(always)] pub fn tzc_glb_misc_lock(&self) -> TZC_GLB_MISC_LOCK_R { - TZC_GLB_MISC_LOCK_R::new(((self.bits >> 25) & 0x01) != 0) + TZC_GLB_MISC_LOCK_R::new(((self.bits >> 25) & 1) != 0) } - #[doc = "Bit 15"] - #[inline(always)] - pub fn tzc_glb_ctrl_ungated_ap_lock(&self) -> TZC_GLB_CTRL_UNGATED_AP_LOCK_R { - TZC_GLB_CTRL_UNGATED_AP_LOCK_R::new(((self.bits >> 15) & 0x01) != 0) - } - #[doc = "Bit 14"] + #[doc = "Bit 26"] #[inline(always)] - pub fn tzc_glb_ctrl_sys_reset_lock(&self) -> TZC_GLB_CTRL_SYS_RESET_LOCK_R { - TZC_GLB_CTRL_SYS_RESET_LOCK_R::new(((self.bits >> 14) & 0x01) != 0) + pub fn tzc_glb_sram_lock(&self) -> TZC_GLB_SRAM_LOCK_R { + TZC_GLB_SRAM_LOCK_R::new(((self.bits >> 26) & 1) != 0) } - #[doc = "Bit 13"] + #[doc = "Bit 27"] #[inline(always)] - pub fn tzc_glb_ctrl_cpu_reset_lock(&self) -> TZC_GLB_CTRL_CPU_RESET_LOCK_R { - TZC_GLB_CTRL_CPU_RESET_LOCK_R::new(((self.bits >> 13) & 0x01) != 0) + pub fn tzc_glb_l2c_lock(&self) -> TZC_GLB_L2C_LOCK_R { + TZC_GLB_L2C_LOCK_R::new(((self.bits >> 27) & 1) != 0) } - #[doc = "Bit 12"] + #[doc = "Bit 28"] #[inline(always)] - pub fn tzc_glb_ctrl_pwron_rst_lock(&self) -> TZC_GLB_CTRL_PWRON_RST_LOCK_R { - TZC_GLB_CTRL_PWRON_RST_LOCK_R::new(((self.bits >> 12) & 0x01) != 0) + pub fn tzc_glb_bmx_lock(&self) -> TZC_GLB_BMX_LOCK_R { + TZC_GLB_BMX_LOCK_R::new(((self.bits >> 28) & 1) != 0) } - #[doc = "Bit 8"] + #[doc = "Bit 29"] #[inline(always)] - pub fn tzc_glb_swrst_s30_lock(&self) -> TZC_GLB_SWRST_S30_LOCK_R { - TZC_GLB_SWRST_S30_LOCK_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn tzc_glb_dbg_lock(&self) -> TZC_GLB_DBG_LOCK_R { + TZC_GLB_DBG_LOCK_R::new(((self.bits >> 29) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 30"] #[inline(always)] - pub fn tzc_glb_swrst_s01_lock(&self) -> TZC_GLB_SWRST_S01_LOCK_R { - TZC_GLB_SWRST_S01_LOCK_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn tzc_glb_mbist_lock(&self) -> TZC_GLB_MBIST_LOCK_R { + TZC_GLB_MBIST_LOCK_R::new(((self.bits >> 30) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 31"] #[inline(always)] - pub fn tzc_glb_swrst_s00_lock(&self) -> TZC_GLB_SWRST_S00_LOCK_R { - TZC_GLB_SWRST_S00_LOCK_R::new((self.bits & 0x01) != 0) + pub fn tzc_glb_clk_lock(&self) -> TZC_GLB_CLK_LOCK_R { + TZC_GLB_CLK_LOCK_R::new(((self.bits >> 31) & 1) != 0) } } #[doc = "tzc_glb_ctrl_0.\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 [tzc_glb_ctrl_0](index.html) module"] @@ -291,8 +124,5 @@ impl crate::Readable for TZC_GLB_CTRL_0_SPEC { } #[doc = "`reset()` method sets tzc_glb_ctrl_0 to value 0"] impl crate::Resettable for TZC_GLB_CTRL_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/tzc_glb_ctrl_1.rs b/src/glb/tzc_glb_ctrl_1.rs index b26c5be..cebe9a7 100644 --- a/src/glb/tzc_glb_ctrl_1.rs +++ b/src/glb/tzc_glb_ctrl_1.rs @@ -7,619 +7,236 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `tzc_glb_swrst_s1f_lock` reader - "] -pub struct TZC_GLB_SWRST_S1F_LOCK_R(crate::FieldReader); -impl TZC_GLB_SWRST_S1F_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_SWRST_S1F_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_SWRST_S1F_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_swrst_s1e_lock` reader - "] -pub struct TZC_GLB_SWRST_S1E_LOCK_R(crate::FieldReader); -impl TZC_GLB_SWRST_S1E_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_SWRST_S1E_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_SWRST_S1E_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_swrst_s1d_lock` reader - "] -pub struct TZC_GLB_SWRST_S1D_LOCK_R(crate::FieldReader); -impl TZC_GLB_SWRST_S1D_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_SWRST_S1D_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_SWRST_S1D_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_swrst_s1c_lock` reader - "] -pub struct TZC_GLB_SWRST_S1C_LOCK_R(crate::FieldReader); -impl TZC_GLB_SWRST_S1C_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_SWRST_S1C_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_SWRST_S1C_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_swrst_s1b_lock` reader - "] -pub struct TZC_GLB_SWRST_S1B_LOCK_R(crate::FieldReader); -impl TZC_GLB_SWRST_S1B_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_SWRST_S1B_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_SWRST_S1B_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_swrst_s1a_lock` reader - "] -pub struct TZC_GLB_SWRST_S1A_LOCK_R(crate::FieldReader); -impl TZC_GLB_SWRST_S1A_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_SWRST_S1A_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_SWRST_S1A_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_swrst_s19_lock` reader - "] -pub struct TZC_GLB_SWRST_S19_LOCK_R(crate::FieldReader); -impl TZC_GLB_SWRST_S19_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_SWRST_S19_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_SWRST_S19_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_swrst_s18_lock` reader - "] -pub struct TZC_GLB_SWRST_S18_LOCK_R(crate::FieldReader); -impl TZC_GLB_SWRST_S18_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_SWRST_S18_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_SWRST_S18_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_swrst_s17_lock` reader - "] -pub struct TZC_GLB_SWRST_S17_LOCK_R(crate::FieldReader); -impl TZC_GLB_SWRST_S17_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_SWRST_S17_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_SWRST_S17_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_swrst_s16_lock` reader - "] -pub struct TZC_GLB_SWRST_S16_LOCK_R(crate::FieldReader); -impl TZC_GLB_SWRST_S16_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_SWRST_S16_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_SWRST_S16_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_swrst_s15_lock` reader - "] -pub struct TZC_GLB_SWRST_S15_LOCK_R(crate::FieldReader); -impl TZC_GLB_SWRST_S15_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_SWRST_S15_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_SWRST_S15_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_swrst_s14_lock` reader - "] -pub struct TZC_GLB_SWRST_S14_LOCK_R(crate::FieldReader); -impl TZC_GLB_SWRST_S14_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_SWRST_S14_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_SWRST_S14_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_swrst_s13_lock` reader - "] -pub struct TZC_GLB_SWRST_S13_LOCK_R(crate::FieldReader); -impl TZC_GLB_SWRST_S13_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_SWRST_S13_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_SWRST_S13_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_swrst_s12_lock` reader - "] -pub struct TZC_GLB_SWRST_S12_LOCK_R(crate::FieldReader); -impl TZC_GLB_SWRST_S12_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_SWRST_S12_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_SWRST_S12_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_swrst_s11_lock` reader - "] -pub struct TZC_GLB_SWRST_S11_LOCK_R(crate::FieldReader); -impl TZC_GLB_SWRST_S11_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_SWRST_S11_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_SWRST_S11_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_swrst_s10_lock` reader - "] -pub struct TZC_GLB_SWRST_S10_LOCK_R(crate::FieldReader); -impl TZC_GLB_SWRST_S10_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_SWRST_S10_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_SWRST_S10_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_swrst_s2f_lock` reader - "] -pub struct TZC_GLB_SWRST_S2F_LOCK_R(crate::FieldReader); -impl TZC_GLB_SWRST_S2F_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_SWRST_S2F_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_SWRST_S2F_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_swrst_s2e_lock` reader - "] -pub struct TZC_GLB_SWRST_S2E_LOCK_R(crate::FieldReader); -impl TZC_GLB_SWRST_S2E_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_SWRST_S2E_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_SWRST_S2E_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_swrst_s2d_lock` reader - "] -pub struct TZC_GLB_SWRST_S2D_LOCK_R(crate::FieldReader); -impl TZC_GLB_SWRST_S2D_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_SWRST_S2D_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_SWRST_S2D_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_swrst_s2c_lock` reader - "] -pub struct TZC_GLB_SWRST_S2C_LOCK_R(crate::FieldReader); -impl TZC_GLB_SWRST_S2C_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_SWRST_S2C_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_SWRST_S2C_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_swrst_s2b_lock` reader - "] -pub struct TZC_GLB_SWRST_S2B_LOCK_R(crate::FieldReader); -impl TZC_GLB_SWRST_S2B_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_SWRST_S2B_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_SWRST_S2B_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_swrst_s2a_lock` reader - "] -pub struct TZC_GLB_SWRST_S2A_LOCK_R(crate::FieldReader); -impl TZC_GLB_SWRST_S2A_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_SWRST_S2A_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_SWRST_S2A_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_swrst_s29_lock` reader - "] -pub struct TZC_GLB_SWRST_S29_LOCK_R(crate::FieldReader); -impl TZC_GLB_SWRST_S29_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_SWRST_S29_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_SWRST_S29_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_swrst_s28_lock` reader - "] -pub struct TZC_GLB_SWRST_S28_LOCK_R(crate::FieldReader); -impl TZC_GLB_SWRST_S28_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_SWRST_S28_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_SWRST_S28_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_swrst_s27_lock` reader - "] -pub struct TZC_GLB_SWRST_S27_LOCK_R(crate::FieldReader); -impl TZC_GLB_SWRST_S27_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_SWRST_S27_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_SWRST_S27_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_swrst_s26_lock` reader - "] -pub struct TZC_GLB_SWRST_S26_LOCK_R(crate::FieldReader); -impl TZC_GLB_SWRST_S26_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_SWRST_S26_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_SWRST_S26_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_swrst_s25_lock` reader - "] -pub struct TZC_GLB_SWRST_S25_LOCK_R(crate::FieldReader); -impl TZC_GLB_SWRST_S25_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_SWRST_S25_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_SWRST_S25_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_swrst_s24_lock` reader - "] -pub struct TZC_GLB_SWRST_S24_LOCK_R(crate::FieldReader); -impl TZC_GLB_SWRST_S24_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_SWRST_S24_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_SWRST_S24_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_swrst_s23_lock` reader - "] -pub struct TZC_GLB_SWRST_S23_LOCK_R(crate::FieldReader); -impl TZC_GLB_SWRST_S23_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_SWRST_S23_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_SWRST_S23_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_swrst_s22_lock` reader - "] -pub struct TZC_GLB_SWRST_S22_LOCK_R(crate::FieldReader); -impl TZC_GLB_SWRST_S22_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_SWRST_S22_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_SWRST_S22_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_swrst_s21_lock` reader - "] -pub struct TZC_GLB_SWRST_S21_LOCK_R(crate::FieldReader); -impl TZC_GLB_SWRST_S21_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_SWRST_S21_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_SWRST_S21_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} #[doc = "Field `tzc_glb_swrst_s20_lock` reader - "] -pub struct TZC_GLB_SWRST_S20_LOCK_R(crate::FieldReader); -impl TZC_GLB_SWRST_S20_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_SWRST_S20_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_SWRST_S20_LOCK_R { - type Target = crate::FieldReader; +pub type TZC_GLB_SWRST_S20_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_swrst_s21_lock` reader - "] +pub type TZC_GLB_SWRST_S21_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_swrst_s22_lock` reader - "] +pub type TZC_GLB_SWRST_S22_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_swrst_s23_lock` reader - "] +pub type TZC_GLB_SWRST_S23_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_swrst_s24_lock` reader - "] +pub type TZC_GLB_SWRST_S24_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_swrst_s25_lock` reader - "] +pub type TZC_GLB_SWRST_S25_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_swrst_s26_lock` reader - "] +pub type TZC_GLB_SWRST_S26_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_swrst_s27_lock` reader - "] +pub type TZC_GLB_SWRST_S27_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_swrst_s28_lock` reader - "] +pub type TZC_GLB_SWRST_S28_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_swrst_s29_lock` reader - "] +pub type TZC_GLB_SWRST_S29_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_swrst_s2a_lock` reader - "] +pub type TZC_GLB_SWRST_S2A_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_swrst_s2b_lock` reader - "] +pub type TZC_GLB_SWRST_S2B_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_swrst_s2c_lock` reader - "] +pub type TZC_GLB_SWRST_S2C_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_swrst_s2d_lock` reader - "] +pub type TZC_GLB_SWRST_S2D_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_swrst_s2e_lock` reader - "] +pub type TZC_GLB_SWRST_S2E_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_swrst_s2f_lock` reader - "] +pub type TZC_GLB_SWRST_S2F_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_swrst_s10_lock` reader - "] +pub type TZC_GLB_SWRST_S10_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_swrst_s11_lock` reader - "] +pub type TZC_GLB_SWRST_S11_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_swrst_s12_lock` reader - "] +pub type TZC_GLB_SWRST_S12_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_swrst_s13_lock` reader - "] +pub type TZC_GLB_SWRST_S13_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_swrst_s14_lock` reader - "] +pub type TZC_GLB_SWRST_S14_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_swrst_s15_lock` reader - "] +pub type TZC_GLB_SWRST_S15_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_swrst_s16_lock` reader - "] +pub type TZC_GLB_SWRST_S16_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_swrst_s17_lock` reader - "] +pub type TZC_GLB_SWRST_S17_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_swrst_s18_lock` reader - "] +pub type TZC_GLB_SWRST_S18_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_swrst_s19_lock` reader - "] +pub type TZC_GLB_SWRST_S19_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_swrst_s1a_lock` reader - "] +pub type TZC_GLB_SWRST_S1A_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_swrst_s1b_lock` reader - "] +pub type TZC_GLB_SWRST_S1B_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_swrst_s1c_lock` reader - "] +pub type TZC_GLB_SWRST_S1C_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_swrst_s1d_lock` reader - "] +pub type TZC_GLB_SWRST_S1D_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_swrst_s1e_lock` reader - "] +pub type TZC_GLB_SWRST_S1E_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_swrst_s1f_lock` reader - "] +pub type TZC_GLB_SWRST_S1F_LOCK_R = crate::BitReader; +impl R { + #[doc = "Bit 0"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn tzc_glb_swrst_s20_lock(&self) -> TZC_GLB_SWRST_S20_LOCK_R { + TZC_GLB_SWRST_S20_LOCK_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bit 31"] + #[doc = "Bit 1"] #[inline(always)] - pub fn tzc_glb_swrst_s1f_lock(&self) -> TZC_GLB_SWRST_S1F_LOCK_R { - TZC_GLB_SWRST_S1F_LOCK_R::new(((self.bits >> 31) & 0x01) != 0) + pub fn tzc_glb_swrst_s21_lock(&self) -> TZC_GLB_SWRST_S21_LOCK_R { + TZC_GLB_SWRST_S21_LOCK_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 30"] + #[doc = "Bit 2"] #[inline(always)] - pub fn tzc_glb_swrst_s1e_lock(&self) -> TZC_GLB_SWRST_S1E_LOCK_R { - TZC_GLB_SWRST_S1E_LOCK_R::new(((self.bits >> 30) & 0x01) != 0) + pub fn tzc_glb_swrst_s22_lock(&self) -> TZC_GLB_SWRST_S22_LOCK_R { + TZC_GLB_SWRST_S22_LOCK_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 29"] + #[doc = "Bit 3"] #[inline(always)] - pub fn tzc_glb_swrst_s1d_lock(&self) -> TZC_GLB_SWRST_S1D_LOCK_R { - TZC_GLB_SWRST_S1D_LOCK_R::new(((self.bits >> 29) & 0x01) != 0) + pub fn tzc_glb_swrst_s23_lock(&self) -> TZC_GLB_SWRST_S23_LOCK_R { + TZC_GLB_SWRST_S23_LOCK_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bit 28"] + #[doc = "Bit 4"] #[inline(always)] - pub fn tzc_glb_swrst_s1c_lock(&self) -> TZC_GLB_SWRST_S1C_LOCK_R { - TZC_GLB_SWRST_S1C_LOCK_R::new(((self.bits >> 28) & 0x01) != 0) + pub fn tzc_glb_swrst_s24_lock(&self) -> TZC_GLB_SWRST_S24_LOCK_R { + TZC_GLB_SWRST_S24_LOCK_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 27"] + #[doc = "Bit 5"] #[inline(always)] - pub fn tzc_glb_swrst_s1b_lock(&self) -> TZC_GLB_SWRST_S1B_LOCK_R { - TZC_GLB_SWRST_S1B_LOCK_R::new(((self.bits >> 27) & 0x01) != 0) + pub fn tzc_glb_swrst_s25_lock(&self) -> TZC_GLB_SWRST_S25_LOCK_R { + TZC_GLB_SWRST_S25_LOCK_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 26"] + #[doc = "Bit 6"] #[inline(always)] - pub fn tzc_glb_swrst_s1a_lock(&self) -> TZC_GLB_SWRST_S1A_LOCK_R { - TZC_GLB_SWRST_S1A_LOCK_R::new(((self.bits >> 26) & 0x01) != 0) + pub fn tzc_glb_swrst_s26_lock(&self) -> TZC_GLB_SWRST_S26_LOCK_R { + TZC_GLB_SWRST_S26_LOCK_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = "Bit 25"] + #[doc = "Bit 7"] #[inline(always)] - pub fn tzc_glb_swrst_s19_lock(&self) -> TZC_GLB_SWRST_S19_LOCK_R { - TZC_GLB_SWRST_S19_LOCK_R::new(((self.bits >> 25) & 0x01) != 0) + pub fn tzc_glb_swrst_s27_lock(&self) -> TZC_GLB_SWRST_S27_LOCK_R { + TZC_GLB_SWRST_S27_LOCK_R::new(((self.bits >> 7) & 1) != 0) } - #[doc = "Bit 24"] + #[doc = "Bit 8"] #[inline(always)] - pub fn tzc_glb_swrst_s18_lock(&self) -> TZC_GLB_SWRST_S18_LOCK_R { - TZC_GLB_SWRST_S18_LOCK_R::new(((self.bits >> 24) & 0x01) != 0) + pub fn tzc_glb_swrst_s28_lock(&self) -> TZC_GLB_SWRST_S28_LOCK_R { + TZC_GLB_SWRST_S28_LOCK_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bit 23"] + #[doc = "Bit 9"] #[inline(always)] - pub fn tzc_glb_swrst_s17_lock(&self) -> TZC_GLB_SWRST_S17_LOCK_R { - TZC_GLB_SWRST_S17_LOCK_R::new(((self.bits >> 23) & 0x01) != 0) + pub fn tzc_glb_swrst_s29_lock(&self) -> TZC_GLB_SWRST_S29_LOCK_R { + TZC_GLB_SWRST_S29_LOCK_R::new(((self.bits >> 9) & 1) != 0) } - #[doc = "Bit 22"] + #[doc = "Bit 10"] #[inline(always)] - pub fn tzc_glb_swrst_s16_lock(&self) -> TZC_GLB_SWRST_S16_LOCK_R { - TZC_GLB_SWRST_S16_LOCK_R::new(((self.bits >> 22) & 0x01) != 0) + pub fn tzc_glb_swrst_s2a_lock(&self) -> TZC_GLB_SWRST_S2A_LOCK_R { + TZC_GLB_SWRST_S2A_LOCK_R::new(((self.bits >> 10) & 1) != 0) } - #[doc = "Bit 21"] + #[doc = "Bit 11"] #[inline(always)] - pub fn tzc_glb_swrst_s15_lock(&self) -> TZC_GLB_SWRST_S15_LOCK_R { - TZC_GLB_SWRST_S15_LOCK_R::new(((self.bits >> 21) & 0x01) != 0) + pub fn tzc_glb_swrst_s2b_lock(&self) -> TZC_GLB_SWRST_S2B_LOCK_R { + TZC_GLB_SWRST_S2B_LOCK_R::new(((self.bits >> 11) & 1) != 0) } - #[doc = "Bit 20"] + #[doc = "Bit 12"] #[inline(always)] - pub fn tzc_glb_swrst_s14_lock(&self) -> TZC_GLB_SWRST_S14_LOCK_R { - TZC_GLB_SWRST_S14_LOCK_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn tzc_glb_swrst_s2c_lock(&self) -> TZC_GLB_SWRST_S2C_LOCK_R { + TZC_GLB_SWRST_S2C_LOCK_R::new(((self.bits >> 12) & 1) != 0) } - #[doc = "Bit 19"] + #[doc = "Bit 13"] #[inline(always)] - pub fn tzc_glb_swrst_s13_lock(&self) -> TZC_GLB_SWRST_S13_LOCK_R { - TZC_GLB_SWRST_S13_LOCK_R::new(((self.bits >> 19) & 0x01) != 0) + pub fn tzc_glb_swrst_s2d_lock(&self) -> TZC_GLB_SWRST_S2D_LOCK_R { + TZC_GLB_SWRST_S2D_LOCK_R::new(((self.bits >> 13) & 1) != 0) } - #[doc = "Bit 18"] + #[doc = "Bit 14"] #[inline(always)] - pub fn tzc_glb_swrst_s12_lock(&self) -> TZC_GLB_SWRST_S12_LOCK_R { - TZC_GLB_SWRST_S12_LOCK_R::new(((self.bits >> 18) & 0x01) != 0) + pub fn tzc_glb_swrst_s2e_lock(&self) -> TZC_GLB_SWRST_S2E_LOCK_R { + TZC_GLB_SWRST_S2E_LOCK_R::new(((self.bits >> 14) & 1) != 0) } - #[doc = "Bit 17"] + #[doc = "Bit 15"] #[inline(always)] - pub fn tzc_glb_swrst_s11_lock(&self) -> TZC_GLB_SWRST_S11_LOCK_R { - TZC_GLB_SWRST_S11_LOCK_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn tzc_glb_swrst_s2f_lock(&self) -> TZC_GLB_SWRST_S2F_LOCK_R { + TZC_GLB_SWRST_S2F_LOCK_R::new(((self.bits >> 15) & 1) != 0) } #[doc = "Bit 16"] #[inline(always)] pub fn tzc_glb_swrst_s10_lock(&self) -> TZC_GLB_SWRST_S10_LOCK_R { - TZC_GLB_SWRST_S10_LOCK_R::new(((self.bits >> 16) & 0x01) != 0) - } - #[doc = "Bit 15"] - #[inline(always)] - pub fn tzc_glb_swrst_s2f_lock(&self) -> TZC_GLB_SWRST_S2F_LOCK_R { - TZC_GLB_SWRST_S2F_LOCK_R::new(((self.bits >> 15) & 0x01) != 0) + TZC_GLB_SWRST_S10_LOCK_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 14"] + #[doc = "Bit 17"] #[inline(always)] - pub fn tzc_glb_swrst_s2e_lock(&self) -> TZC_GLB_SWRST_S2E_LOCK_R { - TZC_GLB_SWRST_S2E_LOCK_R::new(((self.bits >> 14) & 0x01) != 0) + pub fn tzc_glb_swrst_s11_lock(&self) -> TZC_GLB_SWRST_S11_LOCK_R { + TZC_GLB_SWRST_S11_LOCK_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bit 13"] + #[doc = "Bit 18"] #[inline(always)] - pub fn tzc_glb_swrst_s2d_lock(&self) -> TZC_GLB_SWRST_S2D_LOCK_R { - TZC_GLB_SWRST_S2D_LOCK_R::new(((self.bits >> 13) & 0x01) != 0) + pub fn tzc_glb_swrst_s12_lock(&self) -> TZC_GLB_SWRST_S12_LOCK_R { + TZC_GLB_SWRST_S12_LOCK_R::new(((self.bits >> 18) & 1) != 0) } - #[doc = "Bit 12"] + #[doc = "Bit 19"] #[inline(always)] - pub fn tzc_glb_swrst_s2c_lock(&self) -> TZC_GLB_SWRST_S2C_LOCK_R { - TZC_GLB_SWRST_S2C_LOCK_R::new(((self.bits >> 12) & 0x01) != 0) + pub fn tzc_glb_swrst_s13_lock(&self) -> TZC_GLB_SWRST_S13_LOCK_R { + TZC_GLB_SWRST_S13_LOCK_R::new(((self.bits >> 19) & 1) != 0) } - #[doc = "Bit 11"] + #[doc = "Bit 20"] #[inline(always)] - pub fn tzc_glb_swrst_s2b_lock(&self) -> TZC_GLB_SWRST_S2B_LOCK_R { - TZC_GLB_SWRST_S2B_LOCK_R::new(((self.bits >> 11) & 0x01) != 0) + pub fn tzc_glb_swrst_s14_lock(&self) -> TZC_GLB_SWRST_S14_LOCK_R { + TZC_GLB_SWRST_S14_LOCK_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bit 10"] + #[doc = "Bit 21"] #[inline(always)] - pub fn tzc_glb_swrst_s2a_lock(&self) -> TZC_GLB_SWRST_S2A_LOCK_R { - TZC_GLB_SWRST_S2A_LOCK_R::new(((self.bits >> 10) & 0x01) != 0) + pub fn tzc_glb_swrst_s15_lock(&self) -> TZC_GLB_SWRST_S15_LOCK_R { + TZC_GLB_SWRST_S15_LOCK_R::new(((self.bits >> 21) & 1) != 0) } - #[doc = "Bit 9"] + #[doc = "Bit 22"] #[inline(always)] - pub fn tzc_glb_swrst_s29_lock(&self) -> TZC_GLB_SWRST_S29_LOCK_R { - TZC_GLB_SWRST_S29_LOCK_R::new(((self.bits >> 9) & 0x01) != 0) + pub fn tzc_glb_swrst_s16_lock(&self) -> TZC_GLB_SWRST_S16_LOCK_R { + TZC_GLB_SWRST_S16_LOCK_R::new(((self.bits >> 22) & 1) != 0) } - #[doc = "Bit 8"] + #[doc = "Bit 23"] #[inline(always)] - pub fn tzc_glb_swrst_s28_lock(&self) -> TZC_GLB_SWRST_S28_LOCK_R { - TZC_GLB_SWRST_S28_LOCK_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn tzc_glb_swrst_s17_lock(&self) -> TZC_GLB_SWRST_S17_LOCK_R { + TZC_GLB_SWRST_S17_LOCK_R::new(((self.bits >> 23) & 1) != 0) } - #[doc = "Bit 7"] + #[doc = "Bit 24"] #[inline(always)] - pub fn tzc_glb_swrst_s27_lock(&self) -> TZC_GLB_SWRST_S27_LOCK_R { - TZC_GLB_SWRST_S27_LOCK_R::new(((self.bits >> 7) & 0x01) != 0) + pub fn tzc_glb_swrst_s18_lock(&self) -> TZC_GLB_SWRST_S18_LOCK_R { + TZC_GLB_SWRST_S18_LOCK_R::new(((self.bits >> 24) & 1) != 0) } - #[doc = "Bit 6"] + #[doc = "Bit 25"] #[inline(always)] - pub fn tzc_glb_swrst_s26_lock(&self) -> TZC_GLB_SWRST_S26_LOCK_R { - TZC_GLB_SWRST_S26_LOCK_R::new(((self.bits >> 6) & 0x01) != 0) + pub fn tzc_glb_swrst_s19_lock(&self) -> TZC_GLB_SWRST_S19_LOCK_R { + TZC_GLB_SWRST_S19_LOCK_R::new(((self.bits >> 25) & 1) != 0) } - #[doc = "Bit 5"] + #[doc = "Bit 26"] #[inline(always)] - pub fn tzc_glb_swrst_s25_lock(&self) -> TZC_GLB_SWRST_S25_LOCK_R { - TZC_GLB_SWRST_S25_LOCK_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn tzc_glb_swrst_s1a_lock(&self) -> TZC_GLB_SWRST_S1A_LOCK_R { + TZC_GLB_SWRST_S1A_LOCK_R::new(((self.bits >> 26) & 1) != 0) } - #[doc = "Bit 4"] + #[doc = "Bit 27"] #[inline(always)] - pub fn tzc_glb_swrst_s24_lock(&self) -> TZC_GLB_SWRST_S24_LOCK_R { - TZC_GLB_SWRST_S24_LOCK_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn tzc_glb_swrst_s1b_lock(&self) -> TZC_GLB_SWRST_S1B_LOCK_R { + TZC_GLB_SWRST_S1B_LOCK_R::new(((self.bits >> 27) & 1) != 0) } - #[doc = "Bit 3"] + #[doc = "Bit 28"] #[inline(always)] - pub fn tzc_glb_swrst_s23_lock(&self) -> TZC_GLB_SWRST_S23_LOCK_R { - TZC_GLB_SWRST_S23_LOCK_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn tzc_glb_swrst_s1c_lock(&self) -> TZC_GLB_SWRST_S1C_LOCK_R { + TZC_GLB_SWRST_S1C_LOCK_R::new(((self.bits >> 28) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bit 29"] #[inline(always)] - pub fn tzc_glb_swrst_s22_lock(&self) -> TZC_GLB_SWRST_S22_LOCK_R { - TZC_GLB_SWRST_S22_LOCK_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn tzc_glb_swrst_s1d_lock(&self) -> TZC_GLB_SWRST_S1D_LOCK_R { + TZC_GLB_SWRST_S1D_LOCK_R::new(((self.bits >> 29) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 30"] #[inline(always)] - pub fn tzc_glb_swrst_s21_lock(&self) -> TZC_GLB_SWRST_S21_LOCK_R { - TZC_GLB_SWRST_S21_LOCK_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn tzc_glb_swrst_s1e_lock(&self) -> TZC_GLB_SWRST_S1E_LOCK_R { + TZC_GLB_SWRST_S1E_LOCK_R::new(((self.bits >> 30) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 31"] #[inline(always)] - pub fn tzc_glb_swrst_s20_lock(&self) -> TZC_GLB_SWRST_S20_LOCK_R { - TZC_GLB_SWRST_S20_LOCK_R::new((self.bits & 0x01) != 0) + pub fn tzc_glb_swrst_s1f_lock(&self) -> TZC_GLB_SWRST_S1F_LOCK_R { + TZC_GLB_SWRST_S1F_LOCK_R::new(((self.bits >> 31) & 1) != 0) } } #[doc = "tzc_glb_ctrl_1.\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 [tzc_glb_ctrl_1](index.html) module"] @@ -633,8 +250,5 @@ impl crate::Readable for TZC_GLB_CTRL_1_SPEC { } #[doc = "`reset()` method sets tzc_glb_ctrl_1 to value 0"] impl crate::Resettable for TZC_GLB_CTRL_1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/tzc_glb_ctrl_2.rs b/src/glb/tzc_glb_ctrl_2.rs index d4d15a6..ac2ff9f 100644 --- a/src/glb/tzc_glb_ctrl_2.rs +++ b/src/glb/tzc_glb_ctrl_2.rs @@ -7,562 +7,215 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `tzc_glb_gpio_28_lock` reader - "] -pub struct TZC_GLB_GPIO_28_LOCK_R(crate::FieldReader); -impl TZC_GLB_GPIO_28_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_GPIO_28_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_GPIO_28_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_gpio_27_lock` reader - "] -pub struct TZC_GLB_GPIO_27_LOCK_R(crate::FieldReader); -impl TZC_GLB_GPIO_27_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_GPIO_27_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_GPIO_27_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_gpio_26_lock` reader - "] -pub struct TZC_GLB_GPIO_26_LOCK_R(crate::FieldReader); -impl TZC_GLB_GPIO_26_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_GPIO_26_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_GPIO_26_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_gpio_25_lock` reader - "] -pub struct TZC_GLB_GPIO_25_LOCK_R(crate::FieldReader); -impl TZC_GLB_GPIO_25_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_GPIO_25_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_GPIO_25_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_gpio_24_lock` reader - "] -pub struct TZC_GLB_GPIO_24_LOCK_R(crate::FieldReader); -impl TZC_GLB_GPIO_24_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_GPIO_24_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_GPIO_24_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_gpio_23_lock` reader - "] -pub struct TZC_GLB_GPIO_23_LOCK_R(crate::FieldReader); -impl TZC_GLB_GPIO_23_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_GPIO_23_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_GPIO_23_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_gpio_22_lock` reader - "] -pub struct TZC_GLB_GPIO_22_LOCK_R(crate::FieldReader); -impl TZC_GLB_GPIO_22_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_GPIO_22_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_GPIO_22_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_gpio_21_lock` reader - "] -pub struct TZC_GLB_GPIO_21_LOCK_R(crate::FieldReader); -impl TZC_GLB_GPIO_21_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_GPIO_21_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_GPIO_21_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_gpio_20_lock` reader - "] -pub struct TZC_GLB_GPIO_20_LOCK_R(crate::FieldReader); -impl TZC_GLB_GPIO_20_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_GPIO_20_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_GPIO_20_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_gpio_19_lock` reader - "] -pub struct TZC_GLB_GPIO_19_LOCK_R(crate::FieldReader); -impl TZC_GLB_GPIO_19_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_GPIO_19_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_GPIO_19_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_gpio_18_lock` reader - "] -pub struct TZC_GLB_GPIO_18_LOCK_R(crate::FieldReader); -impl TZC_GLB_GPIO_18_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_GPIO_18_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_GPIO_18_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_gpio_17_lock` reader - "] -pub struct TZC_GLB_GPIO_17_LOCK_R(crate::FieldReader); -impl TZC_GLB_GPIO_17_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_GPIO_17_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_GPIO_17_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_gpio_16_lock` reader - "] -pub struct TZC_GLB_GPIO_16_LOCK_R(crate::FieldReader); -impl TZC_GLB_GPIO_16_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_GPIO_16_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_GPIO_16_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_gpio_15_lock` reader - "] -pub struct TZC_GLB_GPIO_15_LOCK_R(crate::FieldReader); -impl TZC_GLB_GPIO_15_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_GPIO_15_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_GPIO_15_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_gpio_14_lock` reader - "] -pub struct TZC_GLB_GPIO_14_LOCK_R(crate::FieldReader); -impl TZC_GLB_GPIO_14_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_GPIO_14_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_GPIO_14_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_gpio_13_lock` reader - "] -pub struct TZC_GLB_GPIO_13_LOCK_R(crate::FieldReader); -impl TZC_GLB_GPIO_13_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_GPIO_13_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_GPIO_13_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_gpio_12_lock` reader - "] -pub struct TZC_GLB_GPIO_12_LOCK_R(crate::FieldReader); -impl TZC_GLB_GPIO_12_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_GPIO_12_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_GPIO_12_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_gpio_11_lock` reader - "] -pub struct TZC_GLB_GPIO_11_LOCK_R(crate::FieldReader); -impl TZC_GLB_GPIO_11_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_GPIO_11_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_GPIO_11_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_gpio_10_lock` reader - "] -pub struct TZC_GLB_GPIO_10_LOCK_R(crate::FieldReader); -impl TZC_GLB_GPIO_10_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_GPIO_10_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_GPIO_10_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_gpio_9_lock` reader - "] -pub struct TZC_GLB_GPIO_9_LOCK_R(crate::FieldReader); -impl TZC_GLB_GPIO_9_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_GPIO_9_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_GPIO_9_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_gpio_8_lock` reader - "] -pub struct TZC_GLB_GPIO_8_LOCK_R(crate::FieldReader); -impl TZC_GLB_GPIO_8_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_GPIO_8_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_GPIO_8_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_gpio_7_lock` reader - "] -pub struct TZC_GLB_GPIO_7_LOCK_R(crate::FieldReader); -impl TZC_GLB_GPIO_7_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_GPIO_7_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_GPIO_7_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_gpio_6_lock` reader - "] -pub struct TZC_GLB_GPIO_6_LOCK_R(crate::FieldReader); -impl TZC_GLB_GPIO_6_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_GPIO_6_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_GPIO_6_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_gpio_5_lock` reader - "] -pub struct TZC_GLB_GPIO_5_LOCK_R(crate::FieldReader); -impl TZC_GLB_GPIO_5_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_GPIO_5_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_GPIO_5_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_gpio_4_lock` reader - "] -pub struct TZC_GLB_GPIO_4_LOCK_R(crate::FieldReader); -impl TZC_GLB_GPIO_4_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_GPIO_4_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_GPIO_4_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_gpio_3_lock` reader - "] -pub struct TZC_GLB_GPIO_3_LOCK_R(crate::FieldReader); -impl TZC_GLB_GPIO_3_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_GPIO_3_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_GPIO_3_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_gpio_2_lock` reader - "] -pub struct TZC_GLB_GPIO_2_LOCK_R(crate::FieldReader); -impl TZC_GLB_GPIO_2_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_GPIO_2_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_GPIO_2_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_glb_gpio_1_lock` reader - "] -pub struct TZC_GLB_GPIO_1_LOCK_R(crate::FieldReader); -impl TZC_GLB_GPIO_1_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_GPIO_1_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_GPIO_1_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} #[doc = "Field `tzc_glb_gpio_0_lock` reader - "] -pub struct TZC_GLB_GPIO_0_LOCK_R(crate::FieldReader); -impl TZC_GLB_GPIO_0_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_GLB_GPIO_0_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_GLB_GPIO_0_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TZC_GLB_GPIO_0_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_gpio_1_lock` reader - "] +pub type TZC_GLB_GPIO_1_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_gpio_2_lock` reader - "] +pub type TZC_GLB_GPIO_2_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_gpio_3_lock` reader - "] +pub type TZC_GLB_GPIO_3_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_gpio_4_lock` reader - "] +pub type TZC_GLB_GPIO_4_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_gpio_5_lock` reader - "] +pub type TZC_GLB_GPIO_5_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_gpio_6_lock` reader - "] +pub type TZC_GLB_GPIO_6_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_gpio_7_lock` reader - "] +pub type TZC_GLB_GPIO_7_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_gpio_8_lock` reader - "] +pub type TZC_GLB_GPIO_8_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_gpio_9_lock` reader - "] +pub type TZC_GLB_GPIO_9_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_gpio_10_lock` reader - "] +pub type TZC_GLB_GPIO_10_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_gpio_11_lock` reader - "] +pub type TZC_GLB_GPIO_11_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_gpio_12_lock` reader - "] +pub type TZC_GLB_GPIO_12_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_gpio_13_lock` reader - "] +pub type TZC_GLB_GPIO_13_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_gpio_14_lock` reader - "] +pub type TZC_GLB_GPIO_14_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_gpio_15_lock` reader - "] +pub type TZC_GLB_GPIO_15_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_gpio_16_lock` reader - "] +pub type TZC_GLB_GPIO_16_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_gpio_17_lock` reader - "] +pub type TZC_GLB_GPIO_17_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_gpio_18_lock` reader - "] +pub type TZC_GLB_GPIO_18_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_gpio_19_lock` reader - "] +pub type TZC_GLB_GPIO_19_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_gpio_20_lock` reader - "] +pub type TZC_GLB_GPIO_20_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_gpio_21_lock` reader - "] +pub type TZC_GLB_GPIO_21_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_gpio_22_lock` reader - "] +pub type TZC_GLB_GPIO_22_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_gpio_23_lock` reader - "] +pub type TZC_GLB_GPIO_23_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_gpio_24_lock` reader - "] +pub type TZC_GLB_GPIO_24_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_gpio_25_lock` reader - "] +pub type TZC_GLB_GPIO_25_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_gpio_26_lock` reader - "] +pub type TZC_GLB_GPIO_26_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_gpio_27_lock` reader - "] +pub type TZC_GLB_GPIO_27_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_glb_gpio_28_lock` reader - "] +pub type TZC_GLB_GPIO_28_LOCK_R = crate::BitReader; impl R { - #[doc = "Bit 28"] + #[doc = "Bit 0"] #[inline(always)] - pub fn tzc_glb_gpio_28_lock(&self) -> TZC_GLB_GPIO_28_LOCK_R { - TZC_GLB_GPIO_28_LOCK_R::new(((self.bits >> 28) & 0x01) != 0) + pub fn tzc_glb_gpio_0_lock(&self) -> TZC_GLB_GPIO_0_LOCK_R { + TZC_GLB_GPIO_0_LOCK_R::new((self.bits & 1) != 0) } - #[doc = "Bit 27"] + #[doc = "Bit 1"] #[inline(always)] - pub fn tzc_glb_gpio_27_lock(&self) -> TZC_GLB_GPIO_27_LOCK_R { - TZC_GLB_GPIO_27_LOCK_R::new(((self.bits >> 27) & 0x01) != 0) + pub fn tzc_glb_gpio_1_lock(&self) -> TZC_GLB_GPIO_1_LOCK_R { + TZC_GLB_GPIO_1_LOCK_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 26"] + #[doc = "Bit 2"] #[inline(always)] - pub fn tzc_glb_gpio_26_lock(&self) -> TZC_GLB_GPIO_26_LOCK_R { - TZC_GLB_GPIO_26_LOCK_R::new(((self.bits >> 26) & 0x01) != 0) + pub fn tzc_glb_gpio_2_lock(&self) -> TZC_GLB_GPIO_2_LOCK_R { + TZC_GLB_GPIO_2_LOCK_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 25"] + #[doc = "Bit 3"] #[inline(always)] - pub fn tzc_glb_gpio_25_lock(&self) -> TZC_GLB_GPIO_25_LOCK_R { - TZC_GLB_GPIO_25_LOCK_R::new(((self.bits >> 25) & 0x01) != 0) + pub fn tzc_glb_gpio_3_lock(&self) -> TZC_GLB_GPIO_3_LOCK_R { + TZC_GLB_GPIO_3_LOCK_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bit 24"] + #[doc = "Bit 4"] #[inline(always)] - pub fn tzc_glb_gpio_24_lock(&self) -> TZC_GLB_GPIO_24_LOCK_R { - TZC_GLB_GPIO_24_LOCK_R::new(((self.bits >> 24) & 0x01) != 0) + pub fn tzc_glb_gpio_4_lock(&self) -> TZC_GLB_GPIO_4_LOCK_R { + TZC_GLB_GPIO_4_LOCK_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 23"] + #[doc = "Bit 5"] #[inline(always)] - pub fn tzc_glb_gpio_23_lock(&self) -> TZC_GLB_GPIO_23_LOCK_R { - TZC_GLB_GPIO_23_LOCK_R::new(((self.bits >> 23) & 0x01) != 0) + pub fn tzc_glb_gpio_5_lock(&self) -> TZC_GLB_GPIO_5_LOCK_R { + TZC_GLB_GPIO_5_LOCK_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 22"] + #[doc = "Bit 6"] #[inline(always)] - pub fn tzc_glb_gpio_22_lock(&self) -> TZC_GLB_GPIO_22_LOCK_R { - TZC_GLB_GPIO_22_LOCK_R::new(((self.bits >> 22) & 0x01) != 0) + pub fn tzc_glb_gpio_6_lock(&self) -> TZC_GLB_GPIO_6_LOCK_R { + TZC_GLB_GPIO_6_LOCK_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = "Bit 21"] + #[doc = "Bit 7"] #[inline(always)] - pub fn tzc_glb_gpio_21_lock(&self) -> TZC_GLB_GPIO_21_LOCK_R { - TZC_GLB_GPIO_21_LOCK_R::new(((self.bits >> 21) & 0x01) != 0) + pub fn tzc_glb_gpio_7_lock(&self) -> TZC_GLB_GPIO_7_LOCK_R { + TZC_GLB_GPIO_7_LOCK_R::new(((self.bits >> 7) & 1) != 0) } - #[doc = "Bit 20"] + #[doc = "Bit 8"] #[inline(always)] - pub fn tzc_glb_gpio_20_lock(&self) -> TZC_GLB_GPIO_20_LOCK_R { - TZC_GLB_GPIO_20_LOCK_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn tzc_glb_gpio_8_lock(&self) -> TZC_GLB_GPIO_8_LOCK_R { + TZC_GLB_GPIO_8_LOCK_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bit 19"] + #[doc = "Bit 9"] #[inline(always)] - pub fn tzc_glb_gpio_19_lock(&self) -> TZC_GLB_GPIO_19_LOCK_R { - TZC_GLB_GPIO_19_LOCK_R::new(((self.bits >> 19) & 0x01) != 0) + pub fn tzc_glb_gpio_9_lock(&self) -> TZC_GLB_GPIO_9_LOCK_R { + TZC_GLB_GPIO_9_LOCK_R::new(((self.bits >> 9) & 1) != 0) } - #[doc = "Bit 18"] + #[doc = "Bit 10"] #[inline(always)] - pub fn tzc_glb_gpio_18_lock(&self) -> TZC_GLB_GPIO_18_LOCK_R { - TZC_GLB_GPIO_18_LOCK_R::new(((self.bits >> 18) & 0x01) != 0) + pub fn tzc_glb_gpio_10_lock(&self) -> TZC_GLB_GPIO_10_LOCK_R { + TZC_GLB_GPIO_10_LOCK_R::new(((self.bits >> 10) & 1) != 0) } - #[doc = "Bit 17"] + #[doc = "Bit 11"] #[inline(always)] - pub fn tzc_glb_gpio_17_lock(&self) -> TZC_GLB_GPIO_17_LOCK_R { - TZC_GLB_GPIO_17_LOCK_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn tzc_glb_gpio_11_lock(&self) -> TZC_GLB_GPIO_11_LOCK_R { + TZC_GLB_GPIO_11_LOCK_R::new(((self.bits >> 11) & 1) != 0) } - #[doc = "Bit 16"] + #[doc = "Bit 12"] #[inline(always)] - pub fn tzc_glb_gpio_16_lock(&self) -> TZC_GLB_GPIO_16_LOCK_R { - TZC_GLB_GPIO_16_LOCK_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn tzc_glb_gpio_12_lock(&self) -> TZC_GLB_GPIO_12_LOCK_R { + TZC_GLB_GPIO_12_LOCK_R::new(((self.bits >> 12) & 1) != 0) } - #[doc = "Bit 15"] + #[doc = "Bit 13"] #[inline(always)] - pub fn tzc_glb_gpio_15_lock(&self) -> TZC_GLB_GPIO_15_LOCK_R { - TZC_GLB_GPIO_15_LOCK_R::new(((self.bits >> 15) & 0x01) != 0) + pub fn tzc_glb_gpio_13_lock(&self) -> TZC_GLB_GPIO_13_LOCK_R { + TZC_GLB_GPIO_13_LOCK_R::new(((self.bits >> 13) & 1) != 0) } #[doc = "Bit 14"] #[inline(always)] pub fn tzc_glb_gpio_14_lock(&self) -> TZC_GLB_GPIO_14_LOCK_R { - TZC_GLB_GPIO_14_LOCK_R::new(((self.bits >> 14) & 0x01) != 0) + TZC_GLB_GPIO_14_LOCK_R::new(((self.bits >> 14) & 1) != 0) } - #[doc = "Bit 13"] + #[doc = "Bit 15"] #[inline(always)] - pub fn tzc_glb_gpio_13_lock(&self) -> TZC_GLB_GPIO_13_LOCK_R { - TZC_GLB_GPIO_13_LOCK_R::new(((self.bits >> 13) & 0x01) != 0) + pub fn tzc_glb_gpio_15_lock(&self) -> TZC_GLB_GPIO_15_LOCK_R { + TZC_GLB_GPIO_15_LOCK_R::new(((self.bits >> 15) & 1) != 0) } - #[doc = "Bit 12"] + #[doc = "Bit 16"] #[inline(always)] - pub fn tzc_glb_gpio_12_lock(&self) -> TZC_GLB_GPIO_12_LOCK_R { - TZC_GLB_GPIO_12_LOCK_R::new(((self.bits >> 12) & 0x01) != 0) + pub fn tzc_glb_gpio_16_lock(&self) -> TZC_GLB_GPIO_16_LOCK_R { + TZC_GLB_GPIO_16_LOCK_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 11"] + #[doc = "Bit 17"] #[inline(always)] - pub fn tzc_glb_gpio_11_lock(&self) -> TZC_GLB_GPIO_11_LOCK_R { - TZC_GLB_GPIO_11_LOCK_R::new(((self.bits >> 11) & 0x01) != 0) + pub fn tzc_glb_gpio_17_lock(&self) -> TZC_GLB_GPIO_17_LOCK_R { + TZC_GLB_GPIO_17_LOCK_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bit 10"] + #[doc = "Bit 18"] #[inline(always)] - pub fn tzc_glb_gpio_10_lock(&self) -> TZC_GLB_GPIO_10_LOCK_R { - TZC_GLB_GPIO_10_LOCK_R::new(((self.bits >> 10) & 0x01) != 0) + pub fn tzc_glb_gpio_18_lock(&self) -> TZC_GLB_GPIO_18_LOCK_R { + TZC_GLB_GPIO_18_LOCK_R::new(((self.bits >> 18) & 1) != 0) } - #[doc = "Bit 9"] + #[doc = "Bit 19"] #[inline(always)] - pub fn tzc_glb_gpio_9_lock(&self) -> TZC_GLB_GPIO_9_LOCK_R { - TZC_GLB_GPIO_9_LOCK_R::new(((self.bits >> 9) & 0x01) != 0) + pub fn tzc_glb_gpio_19_lock(&self) -> TZC_GLB_GPIO_19_LOCK_R { + TZC_GLB_GPIO_19_LOCK_R::new(((self.bits >> 19) & 1) != 0) } - #[doc = "Bit 8"] + #[doc = "Bit 20"] #[inline(always)] - pub fn tzc_glb_gpio_8_lock(&self) -> TZC_GLB_GPIO_8_LOCK_R { - TZC_GLB_GPIO_8_LOCK_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn tzc_glb_gpio_20_lock(&self) -> TZC_GLB_GPIO_20_LOCK_R { + TZC_GLB_GPIO_20_LOCK_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bit 7"] + #[doc = "Bit 21"] #[inline(always)] - pub fn tzc_glb_gpio_7_lock(&self) -> TZC_GLB_GPIO_7_LOCK_R { - TZC_GLB_GPIO_7_LOCK_R::new(((self.bits >> 7) & 0x01) != 0) + pub fn tzc_glb_gpio_21_lock(&self) -> TZC_GLB_GPIO_21_LOCK_R { + TZC_GLB_GPIO_21_LOCK_R::new(((self.bits >> 21) & 1) != 0) } - #[doc = "Bit 6"] + #[doc = "Bit 22"] #[inline(always)] - pub fn tzc_glb_gpio_6_lock(&self) -> TZC_GLB_GPIO_6_LOCK_R { - TZC_GLB_GPIO_6_LOCK_R::new(((self.bits >> 6) & 0x01) != 0) + pub fn tzc_glb_gpio_22_lock(&self) -> TZC_GLB_GPIO_22_LOCK_R { + TZC_GLB_GPIO_22_LOCK_R::new(((self.bits >> 22) & 1) != 0) } - #[doc = "Bit 5"] + #[doc = "Bit 23"] #[inline(always)] - pub fn tzc_glb_gpio_5_lock(&self) -> TZC_GLB_GPIO_5_LOCK_R { - TZC_GLB_GPIO_5_LOCK_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn tzc_glb_gpio_23_lock(&self) -> TZC_GLB_GPIO_23_LOCK_R { + TZC_GLB_GPIO_23_LOCK_R::new(((self.bits >> 23) & 1) != 0) } - #[doc = "Bit 4"] + #[doc = "Bit 24"] #[inline(always)] - pub fn tzc_glb_gpio_4_lock(&self) -> TZC_GLB_GPIO_4_LOCK_R { - TZC_GLB_GPIO_4_LOCK_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn tzc_glb_gpio_24_lock(&self) -> TZC_GLB_GPIO_24_LOCK_R { + TZC_GLB_GPIO_24_LOCK_R::new(((self.bits >> 24) & 1) != 0) } - #[doc = "Bit 3"] + #[doc = "Bit 25"] #[inline(always)] - pub fn tzc_glb_gpio_3_lock(&self) -> TZC_GLB_GPIO_3_LOCK_R { - TZC_GLB_GPIO_3_LOCK_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn tzc_glb_gpio_25_lock(&self) -> TZC_GLB_GPIO_25_LOCK_R { + TZC_GLB_GPIO_25_LOCK_R::new(((self.bits >> 25) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bit 26"] #[inline(always)] - pub fn tzc_glb_gpio_2_lock(&self) -> TZC_GLB_GPIO_2_LOCK_R { - TZC_GLB_GPIO_2_LOCK_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn tzc_glb_gpio_26_lock(&self) -> TZC_GLB_GPIO_26_LOCK_R { + TZC_GLB_GPIO_26_LOCK_R::new(((self.bits >> 26) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 27"] #[inline(always)] - pub fn tzc_glb_gpio_1_lock(&self) -> TZC_GLB_GPIO_1_LOCK_R { - TZC_GLB_GPIO_1_LOCK_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn tzc_glb_gpio_27_lock(&self) -> TZC_GLB_GPIO_27_LOCK_R { + TZC_GLB_GPIO_27_LOCK_R::new(((self.bits >> 27) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 28"] #[inline(always)] - pub fn tzc_glb_gpio_0_lock(&self) -> TZC_GLB_GPIO_0_LOCK_R { - TZC_GLB_GPIO_0_LOCK_R::new((self.bits & 0x01) != 0) + pub fn tzc_glb_gpio_28_lock(&self) -> TZC_GLB_GPIO_28_LOCK_R { + TZC_GLB_GPIO_28_LOCK_R::new(((self.bits >> 28) & 1) != 0) } } #[doc = "tzc_glb_ctrl_2.\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 [tzc_glb_ctrl_2](index.html) module"] @@ -576,8 +229,5 @@ impl crate::Readable for TZC_GLB_CTRL_2_SPEC { } #[doc = "`reset()` method sets tzc_glb_ctrl_2 to value 0"] impl crate::Resettable for TZC_GLB_CTRL_2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/tzc_glb_ctrl_3.rs b/src/glb/tzc_glb_ctrl_3.rs index 6a1f209..2c3cbf8 100644 --- a/src/glb/tzc_glb_ctrl_3.rs +++ b/src/glb/tzc_glb_ctrl_3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,13 +28,15 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } impl W { #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -51,11 +54,10 @@ impl crate::Readable for TZC_GLB_CTRL_3_SPEC { #[doc = "`write(|w| ..)` method takes [tzc_glb_ctrl_3::W](W) writer structure"] impl crate::Writable for TZC_GLB_CTRL_3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets tzc_glb_ctrl_3 to value 0"] impl crate::Resettable for TZC_GLB_CTRL_3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/glb/uart_sig_sel_0.rs b/src/glb/uart_sig_sel_0.rs index 1db9775..35e3897 100644 --- a/src/glb/uart_sig_sel_0.rs +++ b/src/glb/uart_sig_sel_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,303 +28,145 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `uart_sig_7_sel` reader - "] -pub struct UART_SIG_7_SEL_R(crate::FieldReader); -impl UART_SIG_7_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - UART_SIG_7_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for UART_SIG_7_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `uart_sig_7_sel` writer - "] -pub struct UART_SIG_7_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> UART_SIG_7_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 28)) | ((value as u32 & 0x0f) << 28); - self.w - } -} -#[doc = "Field `uart_sig_6_sel` reader - "] -pub struct UART_SIG_6_SEL_R(crate::FieldReader); -impl UART_SIG_6_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - UART_SIG_6_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for UART_SIG_6_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `uart_sig_6_sel` writer - "] -pub struct UART_SIG_6_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> UART_SIG_6_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 24)) | ((value as u32 & 0x0f) << 24); - self.w - } -} -#[doc = "Field `uart_sig_5_sel` reader - "] -pub struct UART_SIG_5_SEL_R(crate::FieldReader); -impl UART_SIG_5_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - UART_SIG_5_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for UART_SIG_5_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `uart_sig_5_sel` writer - "] -pub struct UART_SIG_5_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> UART_SIG_5_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 20)) | ((value as u32 & 0x0f) << 20); - self.w - } -} -#[doc = "Field `uart_sig_4_sel` reader - "] -pub struct UART_SIG_4_SEL_R(crate::FieldReader); -impl UART_SIG_4_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - UART_SIG_4_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for UART_SIG_4_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `uart_sig_4_sel` writer - "] -pub struct UART_SIG_4_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> UART_SIG_4_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 16)) | ((value as u32 & 0x0f) << 16); - self.w - } -} -#[doc = "Field `uart_sig_3_sel` reader - "] -pub struct UART_SIG_3_SEL_R(crate::FieldReader); -impl UART_SIG_3_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - UART_SIG_3_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for UART_SIG_3_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `uart_sig_3_sel` writer - "] -pub struct UART_SIG_3_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> UART_SIG_3_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 12)) | ((value as u32 & 0x0f) << 12); - self.w - } -} -#[doc = "Field `uart_sig_2_sel` reader - "] -pub struct UART_SIG_2_SEL_R(crate::FieldReader); -impl UART_SIG_2_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - UART_SIG_2_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for UART_SIG_2_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `uart_sig_2_sel` writer - "] -pub struct UART_SIG_2_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> UART_SIG_2_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 8)) | ((value as u32 & 0x0f) << 8); - self.w - } -} -#[doc = "Field `uart_sig_1_sel` reader - "] -pub struct UART_SIG_1_SEL_R(crate::FieldReader); -impl UART_SIG_1_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - UART_SIG_1_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for UART_SIG_1_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `uart_sig_1_sel` writer - "] -pub struct UART_SIG_1_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> UART_SIG_1_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 4)) | ((value as u32 & 0x0f) << 4); - self.w - } -} #[doc = "Field `uart_sig_0_sel` reader - "] -pub struct UART_SIG_0_SEL_R(crate::FieldReader); -impl UART_SIG_0_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - UART_SIG_0_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for UART_SIG_0_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type UART_SIG_0_SEL_R = crate::FieldReader; #[doc = "Field `uart_sig_0_sel` writer - "] -pub struct UART_SIG_0_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> UART_SIG_0_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type UART_SIG_0_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, UART_SIG_SEL_0_SPEC, u8, u8, 4, O>; +#[doc = "Field `uart_sig_1_sel` reader - "] +pub type UART_SIG_1_SEL_R = crate::FieldReader; +#[doc = "Field `uart_sig_1_sel` writer - "] +pub type UART_SIG_1_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, UART_SIG_SEL_0_SPEC, u8, u8, 4, O>; +#[doc = "Field `uart_sig_2_sel` reader - "] +pub type UART_SIG_2_SEL_R = crate::FieldReader; +#[doc = "Field `uart_sig_2_sel` writer - "] +pub type UART_SIG_2_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, UART_SIG_SEL_0_SPEC, u8, u8, 4, O>; +#[doc = "Field `uart_sig_3_sel` reader - "] +pub type UART_SIG_3_SEL_R = crate::FieldReader; +#[doc = "Field `uart_sig_3_sel` writer - "] +pub type UART_SIG_3_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, UART_SIG_SEL_0_SPEC, u8, u8, 4, O>; +#[doc = "Field `uart_sig_4_sel` reader - "] +pub type UART_SIG_4_SEL_R = crate::FieldReader; +#[doc = "Field `uart_sig_4_sel` writer - "] +pub type UART_SIG_4_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, UART_SIG_SEL_0_SPEC, u8, u8, 4, O>; +#[doc = "Field `uart_sig_5_sel` reader - "] +pub type UART_SIG_5_SEL_R = crate::FieldReader; +#[doc = "Field `uart_sig_5_sel` writer - "] +pub type UART_SIG_5_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, UART_SIG_SEL_0_SPEC, u8, u8, 4, O>; +#[doc = "Field `uart_sig_6_sel` reader - "] +pub type UART_SIG_6_SEL_R = crate::FieldReader; +#[doc = "Field `uart_sig_6_sel` writer - "] +pub type UART_SIG_6_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, UART_SIG_SEL_0_SPEC, u8, u8, 4, O>; +#[doc = "Field `uart_sig_7_sel` reader - "] +pub type UART_SIG_7_SEL_R = crate::FieldReader; +#[doc = "Field `uart_sig_7_sel` writer - "] +pub type UART_SIG_7_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, UART_SIG_SEL_0_SPEC, u8, u8, 4, O>; +impl R { + #[doc = "Bits 0:3"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x0f) | (value as u32 & 0x0f); - self.w + pub fn uart_sig_0_sel(&self) -> UART_SIG_0_SEL_R { + UART_SIG_0_SEL_R::new((self.bits & 0x0f) as u8) } -} -impl R { - #[doc = "Bits 28:31"] + #[doc = "Bits 4:7"] #[inline(always)] - pub fn uart_sig_7_sel(&self) -> UART_SIG_7_SEL_R { - UART_SIG_7_SEL_R::new(((self.bits >> 28) & 0x0f) as u8) + pub fn uart_sig_1_sel(&self) -> UART_SIG_1_SEL_R { + UART_SIG_1_SEL_R::new(((self.bits >> 4) & 0x0f) as u8) } - #[doc = "Bits 24:27"] + #[doc = "Bits 8:11"] #[inline(always)] - pub fn uart_sig_6_sel(&self) -> UART_SIG_6_SEL_R { - UART_SIG_6_SEL_R::new(((self.bits >> 24) & 0x0f) as u8) + pub fn uart_sig_2_sel(&self) -> UART_SIG_2_SEL_R { + UART_SIG_2_SEL_R::new(((self.bits >> 8) & 0x0f) as u8) } - #[doc = "Bits 20:23"] + #[doc = "Bits 12:15"] #[inline(always)] - pub fn uart_sig_5_sel(&self) -> UART_SIG_5_SEL_R { - UART_SIG_5_SEL_R::new(((self.bits >> 20) & 0x0f) as u8) + pub fn uart_sig_3_sel(&self) -> UART_SIG_3_SEL_R { + UART_SIG_3_SEL_R::new(((self.bits >> 12) & 0x0f) as u8) } #[doc = "Bits 16:19"] #[inline(always)] pub fn uart_sig_4_sel(&self) -> UART_SIG_4_SEL_R { UART_SIG_4_SEL_R::new(((self.bits >> 16) & 0x0f) as u8) } - #[doc = "Bits 12:15"] - #[inline(always)] - pub fn uart_sig_3_sel(&self) -> UART_SIG_3_SEL_R { - UART_SIG_3_SEL_R::new(((self.bits >> 12) & 0x0f) as u8) - } - #[doc = "Bits 8:11"] + #[doc = "Bits 20:23"] #[inline(always)] - pub fn uart_sig_2_sel(&self) -> UART_SIG_2_SEL_R { - UART_SIG_2_SEL_R::new(((self.bits >> 8) & 0x0f) as u8) + pub fn uart_sig_5_sel(&self) -> UART_SIG_5_SEL_R { + UART_SIG_5_SEL_R::new(((self.bits >> 20) & 0x0f) as u8) } - #[doc = "Bits 4:7"] + #[doc = "Bits 24:27"] #[inline(always)] - pub fn uart_sig_1_sel(&self) -> UART_SIG_1_SEL_R { - UART_SIG_1_SEL_R::new(((self.bits >> 4) & 0x0f) as u8) + pub fn uart_sig_6_sel(&self) -> UART_SIG_6_SEL_R { + UART_SIG_6_SEL_R::new(((self.bits >> 24) & 0x0f) as u8) } - #[doc = "Bits 0:3"] + #[doc = "Bits 28:31"] #[inline(always)] - pub fn uart_sig_0_sel(&self) -> UART_SIG_0_SEL_R { - UART_SIG_0_SEL_R::new((self.bits & 0x0f) as u8) + pub fn uart_sig_7_sel(&self) -> UART_SIG_7_SEL_R { + UART_SIG_7_SEL_R::new(((self.bits >> 28) & 0x0f) as u8) } } impl W { - #[doc = "Bits 28:31"] + #[doc = "Bits 0:3"] #[inline(always)] - pub fn uart_sig_7_sel(&mut self) -> UART_SIG_7_SEL_W { - UART_SIG_7_SEL_W { w: self } + #[must_use] + pub fn uart_sig_0_sel(&mut self) -> UART_SIG_0_SEL_W<0> { + UART_SIG_0_SEL_W::new(self) } - #[doc = "Bits 24:27"] + #[doc = "Bits 4:7"] #[inline(always)] - pub fn uart_sig_6_sel(&mut self) -> UART_SIG_6_SEL_W { - UART_SIG_6_SEL_W { w: self } + #[must_use] + pub fn uart_sig_1_sel(&mut self) -> UART_SIG_1_SEL_W<4> { + UART_SIG_1_SEL_W::new(self) } - #[doc = "Bits 20:23"] + #[doc = "Bits 8:11"] #[inline(always)] - pub fn uart_sig_5_sel(&mut self) -> UART_SIG_5_SEL_W { - UART_SIG_5_SEL_W { w: self } + #[must_use] + pub fn uart_sig_2_sel(&mut self) -> UART_SIG_2_SEL_W<8> { + UART_SIG_2_SEL_W::new(self) } - #[doc = "Bits 16:19"] + #[doc = "Bits 12:15"] #[inline(always)] - pub fn uart_sig_4_sel(&mut self) -> UART_SIG_4_SEL_W { - UART_SIG_4_SEL_W { w: self } + #[must_use] + pub fn uart_sig_3_sel(&mut self) -> UART_SIG_3_SEL_W<12> { + UART_SIG_3_SEL_W::new(self) } - #[doc = "Bits 12:15"] + #[doc = "Bits 16:19"] #[inline(always)] - pub fn uart_sig_3_sel(&mut self) -> UART_SIG_3_SEL_W { - UART_SIG_3_SEL_W { w: self } + #[must_use] + pub fn uart_sig_4_sel(&mut self) -> UART_SIG_4_SEL_W<16> { + UART_SIG_4_SEL_W::new(self) } - #[doc = "Bits 8:11"] + #[doc = "Bits 20:23"] #[inline(always)] - pub fn uart_sig_2_sel(&mut self) -> UART_SIG_2_SEL_W { - UART_SIG_2_SEL_W { w: self } + #[must_use] + pub fn uart_sig_5_sel(&mut self) -> UART_SIG_5_SEL_W<20> { + UART_SIG_5_SEL_W::new(self) } - #[doc = "Bits 4:7"] + #[doc = "Bits 24:27"] #[inline(always)] - pub fn uart_sig_1_sel(&mut self) -> UART_SIG_1_SEL_W { - UART_SIG_1_SEL_W { w: self } + #[must_use] + pub fn uart_sig_6_sel(&mut self) -> UART_SIG_6_SEL_W<24> { + UART_SIG_6_SEL_W::new(self) } - #[doc = "Bits 0:3"] + #[doc = "Bits 28:31"] #[inline(always)] - pub fn uart_sig_0_sel(&mut self) -> UART_SIG_0_SEL_W { - UART_SIG_0_SEL_W { w: self } + #[must_use] + pub fn uart_sig_7_sel(&mut self) -> UART_SIG_7_SEL_W<28> { + UART_SIG_7_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -341,11 +184,10 @@ impl crate::Readable for UART_SIG_SEL_0_SPEC { #[doc = "`write(|w| ..)` method takes [uart_sig_sel_0::W](W) writer structure"] impl crate::Writable for UART_SIG_SEL_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets UART_SIG_SEL_0 to value 0x7654_3210"] impl crate::Resettable for UART_SIG_SEL_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x7654_3210 - } + const RESET_VALUE: Self::Ux = 0x7654_3210; } diff --git a/src/glb/wifi_bt_coex_ctrl.rs b/src/glb/wifi_bt_coex_ctrl.rs index 8937b15..98d7b10 100644 --- a/src/glb/wifi_bt_coex_ctrl.rs +++ b/src/glb/wifi_bt_coex_ctrl.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,179 +28,80 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `en_gpio_bt_coex` reader - "] -pub struct EN_GPIO_BT_COEX_R(crate::FieldReader); -impl EN_GPIO_BT_COEX_R { - pub(crate) fn new(bits: bool) -> Self { - EN_GPIO_BT_COEX_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EN_GPIO_BT_COEX_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `en_gpio_bt_coex` writer - "] -pub struct EN_GPIO_BT_COEX_W<'a> { - w: &'a mut W, -} -impl<'a> EN_GPIO_BT_COEX_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} -#[doc = "Field `coex_bt_bw` reader - "] -pub struct COEX_BT_BW_R(crate::FieldReader); -impl COEX_BT_BW_R { - pub(crate) fn new(bits: bool) -> Self { - COEX_BT_BW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for COEX_BT_BW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `coex_bt_bw` writer - "] -pub struct COEX_BT_BW_W<'a> { - w: &'a mut W, -} -impl<'a> COEX_BT_BW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w - } -} -#[doc = "Field `coex_bt_pti` reader - "] -pub struct COEX_BT_PTI_R(crate::FieldReader); -impl COEX_BT_PTI_R { - pub(crate) fn new(bits: u8) -> Self { - COEX_BT_PTI_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for COEX_BT_PTI_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `coex_bt_pti` writer - "] -pub struct COEX_BT_PTI_W<'a> { - w: &'a mut W, -} -impl<'a> COEX_BT_PTI_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 7)) | ((value as u32 & 0x0f) << 7); - self.w - } -} #[doc = "Field `coex_bt_channel` reader - "] -pub struct COEX_BT_CHANNEL_R(crate::FieldReader); -impl COEX_BT_CHANNEL_R { - pub(crate) fn new(bits: u8) -> Self { - COEX_BT_CHANNEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for COEX_BT_CHANNEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type COEX_BT_CHANNEL_R = crate::FieldReader; #[doc = "Field `coex_bt_channel` writer - "] -pub struct COEX_BT_CHANNEL_W<'a> { - w: &'a mut W, -} -impl<'a> COEX_BT_CHANNEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x7f) | (value as u32 & 0x7f); - self.w - } -} +pub type COEX_BT_CHANNEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, WIFI_BT_COEX_CTRL_SPEC, u8, u8, 7, O>; +#[doc = "Field `coex_bt_pti` reader - "] +pub type COEX_BT_PTI_R = crate::FieldReader; +#[doc = "Field `coex_bt_pti` writer - "] +pub type COEX_BT_PTI_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, WIFI_BT_COEX_CTRL_SPEC, u8, u8, 4, O>; +#[doc = "Field `coex_bt_bw` reader - "] +pub type COEX_BT_BW_R = crate::BitReader; +#[doc = "Field `coex_bt_bw` writer - "] +pub type COEX_BT_BW_W<'a, const O: u8> = crate::BitWriter<'a, u32, WIFI_BT_COEX_CTRL_SPEC, bool, O>; +#[doc = "Field `en_gpio_bt_coex` reader - "] +pub type EN_GPIO_BT_COEX_R = crate::BitReader; +#[doc = "Field `en_gpio_bt_coex` writer - "] +pub type EN_GPIO_BT_COEX_W<'a, const O: u8> = + crate::BitWriter<'a, u32, WIFI_BT_COEX_CTRL_SPEC, bool, O>; impl R { - #[doc = "Bit 12"] - #[inline(always)] - pub fn en_gpio_bt_coex(&self) -> EN_GPIO_BT_COEX_R { - EN_GPIO_BT_COEX_R::new(((self.bits >> 12) & 0x01) != 0) - } - #[doc = "Bit 11"] + #[doc = "Bits 0:6"] #[inline(always)] - pub fn coex_bt_bw(&self) -> COEX_BT_BW_R { - COEX_BT_BW_R::new(((self.bits >> 11) & 0x01) != 0) + pub fn coex_bt_channel(&self) -> COEX_BT_CHANNEL_R { + COEX_BT_CHANNEL_R::new((self.bits & 0x7f) as u8) } #[doc = "Bits 7:10"] #[inline(always)] pub fn coex_bt_pti(&self) -> COEX_BT_PTI_R { COEX_BT_PTI_R::new(((self.bits >> 7) & 0x0f) as u8) } - #[doc = "Bits 0:6"] + #[doc = "Bit 11"] #[inline(always)] - pub fn coex_bt_channel(&self) -> COEX_BT_CHANNEL_R { - COEX_BT_CHANNEL_R::new((self.bits & 0x7f) as u8) + pub fn coex_bt_bw(&self) -> COEX_BT_BW_R { + COEX_BT_BW_R::new(((self.bits >> 11) & 1) != 0) } -} -impl W { #[doc = "Bit 12"] #[inline(always)] - pub fn en_gpio_bt_coex(&mut self) -> EN_GPIO_BT_COEX_W { - EN_GPIO_BT_COEX_W { w: self } + pub fn en_gpio_bt_coex(&self) -> EN_GPIO_BT_COEX_R { + EN_GPIO_BT_COEX_R::new(((self.bits >> 12) & 1) != 0) } - #[doc = "Bit 11"] +} +impl W { + #[doc = "Bits 0:6"] #[inline(always)] - pub fn coex_bt_bw(&mut self) -> COEX_BT_BW_W { - COEX_BT_BW_W { w: self } + #[must_use] + pub fn coex_bt_channel(&mut self) -> COEX_BT_CHANNEL_W<0> { + COEX_BT_CHANNEL_W::new(self) } #[doc = "Bits 7:10"] #[inline(always)] - pub fn coex_bt_pti(&mut self) -> COEX_BT_PTI_W { - COEX_BT_PTI_W { w: self } + #[must_use] + pub fn coex_bt_pti(&mut self) -> COEX_BT_PTI_W<7> { + COEX_BT_PTI_W::new(self) } - #[doc = "Bits 0:6"] + #[doc = "Bit 11"] #[inline(always)] - pub fn coex_bt_channel(&mut self) -> COEX_BT_CHANNEL_W { - COEX_BT_CHANNEL_W { w: self } + #[must_use] + pub fn coex_bt_bw(&mut self) -> COEX_BT_BW_W<11> { + COEX_BT_BW_W::new(self) + } + #[doc = "Bit 12"] + #[inline(always)] + #[must_use] + pub fn en_gpio_bt_coex(&mut self) -> EN_GPIO_BT_COEX_W<12> { + EN_GPIO_BT_COEX_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -217,11 +119,10 @@ impl crate::Readable for WIFI_BT_COEX_CTRL_SPEC { #[doc = "`write(|w| ..)` method takes [wifi_bt_coex_ctrl::W](W) writer structure"] impl crate::Writable for WIFI_BT_COEX_CTRL_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets WIFI_BT_COEX_CTRL to value 0"] impl crate::Resettable for WIFI_BT_COEX_CTRL_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/gpip.rs b/src/gpip.rs index d1e6ea3..599aaeb 100644 --- a/src/gpip.rs +++ b/src/gpip.rs @@ -2,40 +2,40 @@ #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - gpadc_config."] - pub gpadc_config: crate::Reg, + pub gpadc_config: GPADC_CONFIG, #[doc = "0x04 - gpadc_dma_rdata."] - pub gpadc_dma_rdata: crate::Reg, - _reserved2: [u8; 56usize], + pub gpadc_dma_rdata: GPADC_DMA_RDATA, + _reserved2: [u8; 0x38], #[doc = "0x40 - gpdac_config."] - pub gpdac_config: crate::Reg, + pub gpdac_config: GPDAC_CONFIG, #[doc = "0x44 - gpdac_dma_config."] - pub gpdac_dma_config: crate::Reg, + pub gpdac_dma_config: GPDAC_DMA_CONFIG, #[doc = "0x48 - gpdac_dma_wdata."] - pub gpdac_dma_wdata: crate::Reg, + pub gpdac_dma_wdata: GPDAC_DMA_WDATA, #[doc = "0x4c - gpdac_tx_fifo_status."] - pub gpdac_tx_fifo_status: crate::Reg, + pub gpdac_tx_fifo_status: GPDAC_TX_FIFO_STATUS, } -#[doc = "gpadc_config register accessor: an alias for `Reg`"] +#[doc = "gpadc_config (rw) register accessor: an alias for `Reg`"] pub type GPADC_CONFIG = crate::Reg; #[doc = "gpadc_config."] pub mod gpadc_config; -#[doc = "gpadc_dma_rdata register accessor: an alias for `Reg`"] +#[doc = "gpadc_dma_rdata (r) register accessor: an alias for `Reg`"] pub type GPADC_DMA_RDATA = crate::Reg; #[doc = "gpadc_dma_rdata."] pub mod gpadc_dma_rdata; -#[doc = "gpdac_config register accessor: an alias for `Reg`"] +#[doc = "gpdac_config (rw) register accessor: an alias for `Reg`"] pub type GPDAC_CONFIG = crate::Reg; #[doc = "gpdac_config."] pub mod gpdac_config; -#[doc = "gpdac_dma_config register accessor: an alias for `Reg`"] +#[doc = "gpdac_dma_config (rw) register accessor: an alias for `Reg`"] pub type GPDAC_DMA_CONFIG = crate::Reg; #[doc = "gpdac_dma_config."] pub mod gpdac_dma_config; -#[doc = "gpdac_dma_wdata register accessor: an alias for `Reg`"] +#[doc = "gpdac_dma_wdata (w) register accessor: an alias for `Reg`"] pub type GPDAC_DMA_WDATA = crate::Reg; #[doc = "gpdac_dma_wdata."] pub mod gpdac_dma_wdata; -#[doc = "gpdac_tx_fifo_status register accessor: an alias for `Reg`"] +#[doc = "gpdac_tx_fifo_status (r) register accessor: an alias for `Reg`"] pub type GPDAC_TX_FIFO_STATUS = crate::Reg; #[doc = "gpdac_tx_fifo_status."] pub mod gpdac_tx_fifo_status; diff --git a/src/gpip/gpadc_config.rs b/src/gpip/gpadc_config.rs index dbbcfbf..0c5d8a1 100644 --- a/src/gpip/gpadc_config.rs +++ b/src/gpip/gpadc_config.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,569 +28,215 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rsvd_31_24` reader - "] -pub struct RSVD_31_24_R(crate::FieldReader); -impl RSVD_31_24_R { - pub(crate) fn new(bits: u8) -> Self { - RSVD_31_24_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RSVD_31_24_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rsvd_31_24` writer - "] -pub struct RSVD_31_24_W<'a> { - w: &'a mut W, -} -impl<'a> RSVD_31_24_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 24)) | ((value as u32 & 0xff) << 24); - self.w - } -} -#[doc = "Field `gpadc_fifo_thl` reader - "] -pub struct GPADC_FIFO_THL_R(crate::FieldReader); -impl GPADC_FIFO_THL_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_FIFO_THL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_FIFO_THL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_fifo_thl` writer - "] -pub struct GPADC_FIFO_THL_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_FIFO_THL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 22)) | ((value as u32 & 0x03) << 22); - self.w - } -} -#[doc = "Field `gpadc_fifo_data_count` reader - "] -pub struct GPADC_FIFO_DATA_COUNT_R(crate::FieldReader); -impl GPADC_FIFO_DATA_COUNT_R { - pub(crate) fn new(bits: u8) -> Self { - GPADC_FIFO_DATA_COUNT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_FIFO_DATA_COUNT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_fifo_underrun_mask` reader - "] -pub struct GPADC_FIFO_UNDERRUN_MASK_R(crate::FieldReader); -impl GPADC_FIFO_UNDERRUN_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_FIFO_UNDERRUN_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_FIFO_UNDERRUN_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_fifo_underrun_mask` writer - "] -pub struct GPADC_FIFO_UNDERRUN_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_FIFO_UNDERRUN_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14); - self.w - } -} -#[doc = "Field `gpadc_fifo_overrun_mask` reader - "] -pub struct GPADC_FIFO_OVERRUN_MASK_R(crate::FieldReader); -impl GPADC_FIFO_OVERRUN_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_FIFO_OVERRUN_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_FIFO_OVERRUN_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_fifo_overrun_mask` writer - "] -pub struct GPADC_FIFO_OVERRUN_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_FIFO_OVERRUN_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13); - self.w - } -} -#[doc = "Field `gpadc_rdy_mask` reader - "] -pub struct GPADC_RDY_MASK_R(crate::FieldReader); -impl GPADC_RDY_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_RDY_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_RDY_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_rdy_mask` writer - "] -pub struct GPADC_RDY_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_RDY_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} -#[doc = "Field `gpadc_fifo_underrun_clr` reader - "] -pub struct GPADC_FIFO_UNDERRUN_CLR_R(crate::FieldReader); -impl GPADC_FIFO_UNDERRUN_CLR_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_FIFO_UNDERRUN_CLR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_FIFO_UNDERRUN_CLR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_fifo_underrun_clr` writer - "] -pub struct GPADC_FIFO_UNDERRUN_CLR_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_FIFO_UNDERRUN_CLR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); - self.w - } -} -#[doc = "Field `gpadc_fifo_overrun_clr` reader - "] -pub struct GPADC_FIFO_OVERRUN_CLR_R(crate::FieldReader); -impl GPADC_FIFO_OVERRUN_CLR_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_FIFO_OVERRUN_CLR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_FIFO_OVERRUN_CLR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_fifo_overrun_clr` writer - "] -pub struct GPADC_FIFO_OVERRUN_CLR_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_FIFO_OVERRUN_CLR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w - } -} +#[doc = "Field `gpadc_dma_en` reader - "] +pub type GPADC_DMA_EN_R = crate::BitReader; +#[doc = "Field `gpadc_dma_en` writer - "] +pub type GPADC_DMA_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, GPADC_CONFIG_SPEC, bool, O>; +#[doc = "Field `gpadc_fifo_clr` reader - "] +pub type GPADC_FIFO_CLR_R = crate::BitReader; +#[doc = "Field `gpadc_fifo_clr` writer - "] +pub type GPADC_FIFO_CLR_W<'a, const O: u8> = crate::BitWriter<'a, u32, GPADC_CONFIG_SPEC, bool, O>; +#[doc = "Field `gpadc_fifo_ne` reader - "] +pub type GPADC_FIFO_NE_R = crate::BitReader; +#[doc = "Field `gpadc_fifo_full` reader - "] +pub type GPADC_FIFO_FULL_R = crate::BitReader; +#[doc = "Field `gpadc_rdy` reader - "] +pub type GPADC_RDY_R = crate::BitReader; +#[doc = "Field `gpadc_fifo_overrun` reader - "] +pub type GPADC_FIFO_OVERRUN_R = crate::BitReader; +#[doc = "Field `gpadc_fifo_underrun` reader - "] +pub type GPADC_FIFO_UNDERRUN_R = crate::BitReader; #[doc = "Field `gpadc_rdy_clr` reader - "] -pub struct GPADC_RDY_CLR_R(crate::FieldReader); -impl GPADC_RDY_CLR_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_RDY_CLR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_RDY_CLR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type GPADC_RDY_CLR_R = crate::BitReader; #[doc = "Field `gpadc_rdy_clr` writer - "] -pub struct GPADC_RDY_CLR_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_RDY_CLR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `gpadc_fifo_underrun` reader - "] -pub struct GPADC_FIFO_UNDERRUN_R(crate::FieldReader); -impl GPADC_FIFO_UNDERRUN_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_FIFO_UNDERRUN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_FIFO_UNDERRUN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_fifo_overrun` reader - "] -pub struct GPADC_FIFO_OVERRUN_R(crate::FieldReader); -impl GPADC_FIFO_OVERRUN_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_FIFO_OVERRUN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_FIFO_OVERRUN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_rdy` reader - "] -pub struct GPADC_RDY_R(crate::FieldReader); -impl GPADC_RDY_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_RDY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_RDY_R { - type Target = crate::FieldReader; +pub type GPADC_RDY_CLR_W<'a, const O: u8> = crate::BitWriter<'a, u32, GPADC_CONFIG_SPEC, bool, O>; +#[doc = "Field `gpadc_fifo_overrun_clr` reader - "] +pub type GPADC_FIFO_OVERRUN_CLR_R = crate::BitReader; +#[doc = "Field `gpadc_fifo_overrun_clr` writer - "] +pub type GPADC_FIFO_OVERRUN_CLR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPADC_CONFIG_SPEC, bool, O>; +#[doc = "Field `gpadc_fifo_underrun_clr` reader - "] +pub type GPADC_FIFO_UNDERRUN_CLR_R = crate::BitReader; +#[doc = "Field `gpadc_fifo_underrun_clr` writer - "] +pub type GPADC_FIFO_UNDERRUN_CLR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPADC_CONFIG_SPEC, bool, O>; +#[doc = "Field `gpadc_rdy_mask` reader - "] +pub type GPADC_RDY_MASK_R = crate::BitReader; +#[doc = "Field `gpadc_rdy_mask` writer - "] +pub type GPADC_RDY_MASK_W<'a, const O: u8> = crate::BitWriter<'a, u32, GPADC_CONFIG_SPEC, bool, O>; +#[doc = "Field `gpadc_fifo_overrun_mask` reader - "] +pub type GPADC_FIFO_OVERRUN_MASK_R = crate::BitReader; +#[doc = "Field `gpadc_fifo_overrun_mask` writer - "] +pub type GPADC_FIFO_OVERRUN_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPADC_CONFIG_SPEC, bool, O>; +#[doc = "Field `gpadc_fifo_underrun_mask` reader - "] +pub type GPADC_FIFO_UNDERRUN_MASK_R = crate::BitReader; +#[doc = "Field `gpadc_fifo_underrun_mask` writer - "] +pub type GPADC_FIFO_UNDERRUN_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPADC_CONFIG_SPEC, bool, O>; +#[doc = "Field `gpadc_fifo_data_count` reader - "] +pub type GPADC_FIFO_DATA_COUNT_R = crate::FieldReader; +#[doc = "Field `gpadc_fifo_thl` reader - "] +pub type GPADC_FIFO_THL_R = crate::FieldReader; +#[doc = "Field `gpadc_fifo_thl` writer - "] +pub type GPADC_FIFO_THL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_CONFIG_SPEC, u8, u8, 2, O>; +#[doc = "Field `rsvd_31_24` reader - "] +pub type RSVD_31_24_R = crate::FieldReader; +#[doc = "Field `rsvd_31_24` writer - "] +pub type RSVD_31_24_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPADC_CONFIG_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_fifo_full` reader - "] -pub struct GPADC_FIFO_FULL_R(crate::FieldReader); -impl GPADC_FIFO_FULL_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_FIFO_FULL_R(crate::FieldReader::new(bits)) + pub fn gpadc_dma_en(&self) -> GPADC_DMA_EN_R { + GPADC_DMA_EN_R::new((self.bits & 1) != 0) } -} -impl core::ops::Deref for GPADC_FIFO_FULL_R { - type Target = crate::FieldReader; + #[doc = "Bit 1"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_fifo_ne` reader - "] -pub struct GPADC_FIFO_NE_R(crate::FieldReader); -impl GPADC_FIFO_NE_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_FIFO_NE_R(crate::FieldReader::new(bits)) + pub fn gpadc_fifo_clr(&self) -> GPADC_FIFO_CLR_R { + GPADC_FIFO_CLR_R::new(((self.bits >> 1) & 1) != 0) } -} -impl core::ops::Deref for GPADC_FIFO_NE_R { - type Target = crate::FieldReader; + #[doc = "Bit 2"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_fifo_clr` reader - "] -pub struct GPADC_FIFO_CLR_R(crate::FieldReader); -impl GPADC_FIFO_CLR_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_FIFO_CLR_R(crate::FieldReader::new(bits)) + pub fn gpadc_fifo_ne(&self) -> GPADC_FIFO_NE_R { + GPADC_FIFO_NE_R::new(((self.bits >> 2) & 1) != 0) } -} -impl core::ops::Deref for GPADC_FIFO_CLR_R { - type Target = crate::FieldReader; + #[doc = "Bit 3"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn gpadc_fifo_full(&self) -> GPADC_FIFO_FULL_R { + GPADC_FIFO_FULL_R::new(((self.bits >> 3) & 1) != 0) } -} -#[doc = "Field `gpadc_fifo_clr` writer - "] -pub struct GPADC_FIFO_CLR_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_FIFO_CLR_W<'a> { - #[doc = r"Sets the field bit"] + #[doc = "Bit 4"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn gpadc_rdy(&self) -> GPADC_RDY_R { + GPADC_RDY_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = r"Clears the field bit"] + #[doc = "Bit 5"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn gpadc_fifo_overrun(&self) -> GPADC_FIFO_OVERRUN_R { + GPADC_FIFO_OVERRUN_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = r"Writes raw bits to the field"] + #[doc = "Bit 6"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} -#[doc = "Field `gpadc_dma_en` reader - "] -pub struct GPADC_DMA_EN_R(crate::FieldReader); -impl GPADC_DMA_EN_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_DMA_EN_R(crate::FieldReader::new(bits)) + pub fn gpadc_fifo_underrun(&self) -> GPADC_FIFO_UNDERRUN_R { + GPADC_FIFO_UNDERRUN_R::new(((self.bits >> 6) & 1) != 0) } -} -impl core::ops::Deref for GPADC_DMA_EN_R { - type Target = crate::FieldReader; + #[doc = "Bit 8"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn gpadc_rdy_clr(&self) -> GPADC_RDY_CLR_R { + GPADC_RDY_CLR_R::new(((self.bits >> 8) & 1) != 0) } -} -#[doc = "Field `gpadc_dma_en` writer - "] -pub struct GPADC_DMA_EN_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_DMA_EN_W<'a> { - #[doc = r"Sets the field bit"] + #[doc = "Bit 9"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn gpadc_fifo_overrun_clr(&self) -> GPADC_FIFO_OVERRUN_CLR_R { + GPADC_FIFO_OVERRUN_CLR_R::new(((self.bits >> 9) & 1) != 0) } - #[doc = r"Clears the field bit"] + #[doc = "Bit 10"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn gpadc_fifo_underrun_clr(&self) -> GPADC_FIFO_UNDERRUN_CLR_R { + GPADC_FIFO_UNDERRUN_CLR_R::new(((self.bits >> 10) & 1) != 0) } - #[doc = r"Writes raw bits to the field"] + #[doc = "Bit 12"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn gpadc_rdy_mask(&self) -> GPADC_RDY_MASK_R { + GPADC_RDY_MASK_R::new(((self.bits >> 12) & 1) != 0) } -} -impl R { - #[doc = "Bits 24:31"] + #[doc = "Bit 13"] #[inline(always)] - pub fn rsvd_31_24(&self) -> RSVD_31_24_R { - RSVD_31_24_R::new(((self.bits >> 24) & 0xff) as u8) + pub fn gpadc_fifo_overrun_mask(&self) -> GPADC_FIFO_OVERRUN_MASK_R { + GPADC_FIFO_OVERRUN_MASK_R::new(((self.bits >> 13) & 1) != 0) } - #[doc = "Bits 22:23"] + #[doc = "Bit 14"] #[inline(always)] - pub fn gpadc_fifo_thl(&self) -> GPADC_FIFO_THL_R { - GPADC_FIFO_THL_R::new(((self.bits >> 22) & 0x03) as u8) + pub fn gpadc_fifo_underrun_mask(&self) -> GPADC_FIFO_UNDERRUN_MASK_R { + GPADC_FIFO_UNDERRUN_MASK_R::new(((self.bits >> 14) & 1) != 0) } #[doc = "Bits 16:21"] #[inline(always)] pub fn gpadc_fifo_data_count(&self) -> GPADC_FIFO_DATA_COUNT_R { GPADC_FIFO_DATA_COUNT_R::new(((self.bits >> 16) & 0x3f) as u8) } - #[doc = "Bit 14"] - #[inline(always)] - pub fn gpadc_fifo_underrun_mask(&self) -> GPADC_FIFO_UNDERRUN_MASK_R { - GPADC_FIFO_UNDERRUN_MASK_R::new(((self.bits >> 14) & 0x01) != 0) - } - #[doc = "Bit 13"] - #[inline(always)] - pub fn gpadc_fifo_overrun_mask(&self) -> GPADC_FIFO_OVERRUN_MASK_R { - GPADC_FIFO_OVERRUN_MASK_R::new(((self.bits >> 13) & 0x01) != 0) - } - #[doc = "Bit 12"] - #[inline(always)] - pub fn gpadc_rdy_mask(&self) -> GPADC_RDY_MASK_R { - GPADC_RDY_MASK_R::new(((self.bits >> 12) & 0x01) != 0) - } - #[doc = "Bit 10"] - #[inline(always)] - pub fn gpadc_fifo_underrun_clr(&self) -> GPADC_FIFO_UNDERRUN_CLR_R { - GPADC_FIFO_UNDERRUN_CLR_R::new(((self.bits >> 10) & 0x01) != 0) - } - #[doc = "Bit 9"] - #[inline(always)] - pub fn gpadc_fifo_overrun_clr(&self) -> GPADC_FIFO_OVERRUN_CLR_R { - GPADC_FIFO_OVERRUN_CLR_R::new(((self.bits >> 9) & 0x01) != 0) - } - #[doc = "Bit 8"] - #[inline(always)] - pub fn gpadc_rdy_clr(&self) -> GPADC_RDY_CLR_R { - GPADC_RDY_CLR_R::new(((self.bits >> 8) & 0x01) != 0) - } - #[doc = "Bit 6"] - #[inline(always)] - pub fn gpadc_fifo_underrun(&self) -> GPADC_FIFO_UNDERRUN_R { - GPADC_FIFO_UNDERRUN_R::new(((self.bits >> 6) & 0x01) != 0) - } - #[doc = "Bit 5"] - #[inline(always)] - pub fn gpadc_fifo_overrun(&self) -> GPADC_FIFO_OVERRUN_R { - GPADC_FIFO_OVERRUN_R::new(((self.bits >> 5) & 0x01) != 0) - } - #[doc = "Bit 4"] - #[inline(always)] - pub fn gpadc_rdy(&self) -> GPADC_RDY_R { - GPADC_RDY_R::new(((self.bits >> 4) & 0x01) != 0) - } - #[doc = "Bit 3"] - #[inline(always)] - pub fn gpadc_fifo_full(&self) -> GPADC_FIFO_FULL_R { - GPADC_FIFO_FULL_R::new(((self.bits >> 3) & 0x01) != 0) - } - #[doc = "Bit 2"] - #[inline(always)] - pub fn gpadc_fifo_ne(&self) -> GPADC_FIFO_NE_R { - GPADC_FIFO_NE_R::new(((self.bits >> 2) & 0x01) != 0) - } - #[doc = "Bit 1"] + #[doc = "Bits 22:23"] #[inline(always)] - pub fn gpadc_fifo_clr(&self) -> GPADC_FIFO_CLR_R { - GPADC_FIFO_CLR_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn gpadc_fifo_thl(&self) -> GPADC_FIFO_THL_R { + GPADC_FIFO_THL_R::new(((self.bits >> 22) & 3) as u8) } - #[doc = "Bit 0"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn gpadc_dma_en(&self) -> GPADC_DMA_EN_R { - GPADC_DMA_EN_R::new((self.bits & 0x01) != 0) + pub fn rsvd_31_24(&self) -> RSVD_31_24_R { + RSVD_31_24_R::new(((self.bits >> 24) & 0xff) as u8) } } impl W { - #[doc = "Bits 24:31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn rsvd_31_24(&mut self) -> RSVD_31_24_W { - RSVD_31_24_W { w: self } + #[must_use] + pub fn gpadc_dma_en(&mut self) -> GPADC_DMA_EN_W<0> { + GPADC_DMA_EN_W::new(self) } - #[doc = "Bits 22:23"] + #[doc = "Bit 1"] #[inline(always)] - pub fn gpadc_fifo_thl(&mut self) -> GPADC_FIFO_THL_W { - GPADC_FIFO_THL_W { w: self } + #[must_use] + pub fn gpadc_fifo_clr(&mut self) -> GPADC_FIFO_CLR_W<1> { + GPADC_FIFO_CLR_W::new(self) } - #[doc = "Bit 14"] + #[doc = "Bit 8"] #[inline(always)] - pub fn gpadc_fifo_underrun_mask(&mut self) -> GPADC_FIFO_UNDERRUN_MASK_W { - GPADC_FIFO_UNDERRUN_MASK_W { w: self } + #[must_use] + pub fn gpadc_rdy_clr(&mut self) -> GPADC_RDY_CLR_W<8> { + GPADC_RDY_CLR_W::new(self) } - #[doc = "Bit 13"] + #[doc = "Bit 9"] #[inline(always)] - pub fn gpadc_fifo_overrun_mask(&mut self) -> GPADC_FIFO_OVERRUN_MASK_W { - GPADC_FIFO_OVERRUN_MASK_W { w: self } + #[must_use] + pub fn gpadc_fifo_overrun_clr(&mut self) -> GPADC_FIFO_OVERRUN_CLR_W<9> { + GPADC_FIFO_OVERRUN_CLR_W::new(self) } - #[doc = "Bit 12"] + #[doc = "Bit 10"] #[inline(always)] - pub fn gpadc_rdy_mask(&mut self) -> GPADC_RDY_MASK_W { - GPADC_RDY_MASK_W { w: self } + #[must_use] + pub fn gpadc_fifo_underrun_clr(&mut self) -> GPADC_FIFO_UNDERRUN_CLR_W<10> { + GPADC_FIFO_UNDERRUN_CLR_W::new(self) } - #[doc = "Bit 10"] + #[doc = "Bit 12"] #[inline(always)] - pub fn gpadc_fifo_underrun_clr(&mut self) -> GPADC_FIFO_UNDERRUN_CLR_W { - GPADC_FIFO_UNDERRUN_CLR_W { w: self } + #[must_use] + pub fn gpadc_rdy_mask(&mut self) -> GPADC_RDY_MASK_W<12> { + GPADC_RDY_MASK_W::new(self) } - #[doc = "Bit 9"] + #[doc = "Bit 13"] #[inline(always)] - pub fn gpadc_fifo_overrun_clr(&mut self) -> GPADC_FIFO_OVERRUN_CLR_W { - GPADC_FIFO_OVERRUN_CLR_W { w: self } + #[must_use] + pub fn gpadc_fifo_overrun_mask(&mut self) -> GPADC_FIFO_OVERRUN_MASK_W<13> { + GPADC_FIFO_OVERRUN_MASK_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bit 14"] #[inline(always)] - pub fn gpadc_rdy_clr(&mut self) -> GPADC_RDY_CLR_W { - GPADC_RDY_CLR_W { w: self } + #[must_use] + pub fn gpadc_fifo_underrun_mask(&mut self) -> GPADC_FIFO_UNDERRUN_MASK_W<14> { + GPADC_FIFO_UNDERRUN_MASK_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bits 22:23"] #[inline(always)] - pub fn gpadc_fifo_clr(&mut self) -> GPADC_FIFO_CLR_W { - GPADC_FIFO_CLR_W { w: self } + #[must_use] + pub fn gpadc_fifo_thl(&mut self) -> GPADC_FIFO_THL_W<22> { + GPADC_FIFO_THL_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn gpadc_dma_en(&mut self) -> GPADC_DMA_EN_W { - GPADC_DMA_EN_W { w: self } + #[must_use] + pub fn rsvd_31_24(&mut self) -> RSVD_31_24_W<24> { + RSVD_31_24_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -607,11 +254,10 @@ impl crate::Readable for GPADC_CONFIG_SPEC { #[doc = "`write(|w| ..)` method takes [gpadc_config::W](W) writer structure"] impl crate::Writable for GPADC_CONFIG_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets gpadc_config to value 0"] impl crate::Resettable for GPADC_CONFIG_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/gpip/gpadc_dma_rdata.rs b/src/gpip/gpadc_dma_rdata.rs index 0f14954..c0f5d8f 100644 --- a/src/gpip/gpadc_dma_rdata.rs +++ b/src/gpip/gpadc_dma_rdata.rs @@ -7,50 +7,27 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `rsvd_31_26` reader - "] -pub struct RSVD_31_26_R(crate::FieldReader); -impl RSVD_31_26_R { - pub(crate) fn new(bits: u8) -> Self { - RSVD_31_26_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RSVD_31_26_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} #[doc = "Field `gpadc_dma_rdata` reader - "] -pub struct GPADC_DMA_RDATA_R(crate::FieldReader); -impl GPADC_DMA_RDATA_R { - pub(crate) fn new(bits: u32) -> Self { - GPADC_DMA_RDATA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_DMA_RDATA_R { - type Target = crate::FieldReader; +pub type GPADC_DMA_RDATA_R = crate::FieldReader; +#[doc = "Field `rsvd_31_26` reader - "] +pub type RSVD_31_26_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:25"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn gpadc_dma_rdata(&self) -> GPADC_DMA_RDATA_R { + GPADC_DMA_RDATA_R::new(self.bits & 0x03ff_ffff) } -} -impl R { #[doc = "Bits 26:31"] #[inline(always)] pub fn rsvd_31_26(&self) -> RSVD_31_26_R { RSVD_31_26_R::new(((self.bits >> 26) & 0x3f) as u8) } - #[doc = "Bits 0:25"] - #[inline(always)] - pub fn gpadc_dma_rdata(&self) -> GPADC_DMA_RDATA_R { - GPADC_DMA_RDATA_R::new((self.bits & 0x03ff_ffff) as u32) - } } #[doc = "gpadc_dma_rdata.\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 [gpadc_dma_rdata](index.html) module"] pub struct GPADC_DMA_RDATA_SPEC; @@ -63,8 +40,5 @@ impl crate::Readable for GPADC_DMA_RDATA_SPEC { } #[doc = "`reset()` method sets gpadc_dma_rdata to value 0"] impl crate::Resettable for GPADC_DMA_RDATA_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/gpip/gpdac_config.rs b/src/gpip/gpdac_config.rs index 618bc6d..5fb537d 100644 --- a/src/gpip/gpdac_config.rs +++ b/src/gpip/gpdac_config.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,287 +28,126 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rsvd_31_24` reader - "] -pub struct RSVD_31_24_R(crate::FieldReader); -impl RSVD_31_24_R { - pub(crate) fn new(bits: u8) -> Self { - RSVD_31_24_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RSVD_31_24_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rsvd_31_24` writer - "] -pub struct RSVD_31_24_W<'a> { - w: &'a mut W, -} -impl<'a> RSVD_31_24_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 24)) | ((value as u32 & 0xff) << 24); - self.w - } -} -#[doc = "Field `gpdac_ch_b_sel` reader - "] -pub struct GPDAC_CH_B_SEL_R(crate::FieldReader); -impl GPDAC_CH_B_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - GPDAC_CH_B_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPDAC_CH_B_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpdac_ch_b_sel` writer - "] -pub struct GPDAC_CH_B_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> GPDAC_CH_B_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 20)) | ((value as u32 & 0x0f) << 20); - self.w - } -} -#[doc = "Field `gpdac_ch_a_sel` reader - "] -pub struct GPDAC_CH_A_SEL_R(crate::FieldReader); -impl GPDAC_CH_A_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - GPDAC_CH_A_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPDAC_CH_A_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpdac_ch_a_sel` writer - "] -pub struct GPDAC_CH_A_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> GPDAC_CH_A_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 16)) | ((value as u32 & 0x0f) << 16); - self.w - } -} -#[doc = "Field `gpdac_mode` reader - "] -pub struct GPDAC_MODE_R(crate::FieldReader); -impl GPDAC_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - GPDAC_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPDAC_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpdac_mode` writer - "] -pub struct GPDAC_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> GPDAC_MODE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 8)) | ((value as u32 & 0x07) << 8); - self.w - } -} -#[doc = "Field `dsm_mode` reader - "] -pub struct DSM_MODE_R(crate::FieldReader); -impl DSM_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - DSM_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DSM_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dsm_mode` writer - "] -pub struct DSM_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> DSM_MODE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 4)) | ((value as u32 & 0x03) << 4); - self.w - } -} -#[doc = "Field `gpdac_en2` reader - "] -pub struct GPDAC_EN2_R(crate::FieldReader); -impl GPDAC_EN2_R { - pub(crate) fn new(bits: bool) -> Self { - GPDAC_EN2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPDAC_EN2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpdac_en2` writer - "] -pub struct GPDAC_EN2_W<'a> { - w: &'a mut W, -} -impl<'a> GPDAC_EN2_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `gpdac_en` reader - "] -pub struct GPDAC_EN_R(crate::FieldReader); -impl GPDAC_EN_R { - pub(crate) fn new(bits: bool) -> Self { - GPDAC_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPDAC_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type GPDAC_EN_R = crate::BitReader; #[doc = "Field `gpdac_en` writer - "] -pub struct GPDAC_EN_W<'a> { - w: &'a mut W, -} -impl<'a> GPDAC_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type GPDAC_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, GPDAC_CONFIG_SPEC, bool, O>; +#[doc = "Field `gpdac_en2` reader - "] +pub type GPDAC_EN2_R = crate::BitReader; +#[doc = "Field `gpdac_en2` writer - "] +pub type GPDAC_EN2_W<'a, const O: u8> = crate::BitWriter<'a, u32, GPDAC_CONFIG_SPEC, bool, O>; +#[doc = "Field `dsm_mode` reader - "] +pub type DSM_MODE_R = crate::FieldReader; +#[doc = "Field `dsm_mode` writer - "] +pub type DSM_MODE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, GPDAC_CONFIG_SPEC, u8, u8, 2, O>; +#[doc = "Field `gpdac_mode` reader - "] +pub type GPDAC_MODE_R = crate::FieldReader; +#[doc = "Field `gpdac_mode` writer - "] +pub type GPDAC_MODE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPDAC_CONFIG_SPEC, u8, u8, 3, O>; +#[doc = "Field `gpdac_ch_a_sel` reader - "] +pub type GPDAC_CH_A_SEL_R = crate::FieldReader; +#[doc = "Field `gpdac_ch_a_sel` writer - "] +pub type GPDAC_CH_A_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPDAC_CONFIG_SPEC, u8, u8, 4, O>; +#[doc = "Field `gpdac_ch_b_sel` reader - "] +pub type GPDAC_CH_B_SEL_R = crate::FieldReader; +#[doc = "Field `gpdac_ch_b_sel` writer - "] +pub type GPDAC_CH_B_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPDAC_CONFIG_SPEC, u8, u8, 4, O>; +#[doc = "Field `rsvd_31_24` reader - "] +pub type RSVD_31_24_R = crate::FieldReader; +#[doc = "Field `rsvd_31_24` writer - "] +pub type RSVD_31_24_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPDAC_CONFIG_SPEC, u8, u8, 8, O>; impl R { - #[doc = "Bits 24:31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn rsvd_31_24(&self) -> RSVD_31_24_R { - RSVD_31_24_R::new(((self.bits >> 24) & 0xff) as u8) + pub fn gpdac_en(&self) -> GPDAC_EN_R { + GPDAC_EN_R::new((self.bits & 1) != 0) } - #[doc = "Bits 20:23"] + #[doc = "Bit 1"] #[inline(always)] - pub fn gpdac_ch_b_sel(&self) -> GPDAC_CH_B_SEL_R { - GPDAC_CH_B_SEL_R::new(((self.bits >> 20) & 0x0f) as u8) + pub fn gpdac_en2(&self) -> GPDAC_EN2_R { + GPDAC_EN2_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bits 16:19"] + #[doc = "Bits 4:5"] #[inline(always)] - pub fn gpdac_ch_a_sel(&self) -> GPDAC_CH_A_SEL_R { - GPDAC_CH_A_SEL_R::new(((self.bits >> 16) & 0x0f) as u8) + pub fn dsm_mode(&self) -> DSM_MODE_R { + DSM_MODE_R::new(((self.bits >> 4) & 3) as u8) } #[doc = "Bits 8:10"] #[inline(always)] pub fn gpdac_mode(&self) -> GPDAC_MODE_R { - GPDAC_MODE_R::new(((self.bits >> 8) & 0x07) as u8) + GPDAC_MODE_R::new(((self.bits >> 8) & 7) as u8) } - #[doc = "Bits 4:5"] + #[doc = "Bits 16:19"] #[inline(always)] - pub fn dsm_mode(&self) -> DSM_MODE_R { - DSM_MODE_R::new(((self.bits >> 4) & 0x03) as u8) + pub fn gpdac_ch_a_sel(&self) -> GPDAC_CH_A_SEL_R { + GPDAC_CH_A_SEL_R::new(((self.bits >> 16) & 0x0f) as u8) } - #[doc = "Bit 1"] + #[doc = "Bits 20:23"] #[inline(always)] - pub fn gpdac_en2(&self) -> GPDAC_EN2_R { - GPDAC_EN2_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn gpdac_ch_b_sel(&self) -> GPDAC_CH_B_SEL_R { + GPDAC_CH_B_SEL_R::new(((self.bits >> 20) & 0x0f) as u8) } - #[doc = "Bit 0"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn gpdac_en(&self) -> GPDAC_EN_R { - GPDAC_EN_R::new((self.bits & 0x01) != 0) + pub fn rsvd_31_24(&self) -> RSVD_31_24_R { + RSVD_31_24_R::new(((self.bits >> 24) & 0xff) as u8) } } impl W { - #[doc = "Bits 24:31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn rsvd_31_24(&mut self) -> RSVD_31_24_W { - RSVD_31_24_W { w: self } + #[must_use] + pub fn gpdac_en(&mut self) -> GPDAC_EN_W<0> { + GPDAC_EN_W::new(self) } - #[doc = "Bits 20:23"] + #[doc = "Bit 1"] #[inline(always)] - pub fn gpdac_ch_b_sel(&mut self) -> GPDAC_CH_B_SEL_W { - GPDAC_CH_B_SEL_W { w: self } + #[must_use] + pub fn gpdac_en2(&mut self) -> GPDAC_EN2_W<1> { + GPDAC_EN2_W::new(self) } - #[doc = "Bits 16:19"] + #[doc = "Bits 4:5"] #[inline(always)] - pub fn gpdac_ch_a_sel(&mut self) -> GPDAC_CH_A_SEL_W { - GPDAC_CH_A_SEL_W { w: self } + #[must_use] + pub fn dsm_mode(&mut self) -> DSM_MODE_W<4> { + DSM_MODE_W::new(self) } #[doc = "Bits 8:10"] #[inline(always)] - pub fn gpdac_mode(&mut self) -> GPDAC_MODE_W { - GPDAC_MODE_W { w: self } + #[must_use] + pub fn gpdac_mode(&mut self) -> GPDAC_MODE_W<8> { + GPDAC_MODE_W::new(self) } - #[doc = "Bits 4:5"] + #[doc = "Bits 16:19"] #[inline(always)] - pub fn dsm_mode(&mut self) -> DSM_MODE_W { - DSM_MODE_W { w: self } + #[must_use] + pub fn gpdac_ch_a_sel(&mut self) -> GPDAC_CH_A_SEL_W<16> { + GPDAC_CH_A_SEL_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bits 20:23"] #[inline(always)] - pub fn gpdac_en2(&mut self) -> GPDAC_EN2_W { - GPDAC_EN2_W { w: self } + #[must_use] + pub fn gpdac_ch_b_sel(&mut self) -> GPDAC_CH_B_SEL_W<20> { + GPDAC_CH_B_SEL_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn gpdac_en(&mut self) -> GPDAC_EN_W { - GPDAC_EN_W { w: self } + #[must_use] + pub fn rsvd_31_24(&mut self) -> RSVD_31_24_W<24> { + RSVD_31_24_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -325,11 +165,10 @@ impl crate::Readable for GPDAC_CONFIG_SPEC { #[doc = "`write(|w| ..)` method takes [gpdac_config::W](W) writer structure"] impl crate::Writable for GPDAC_CONFIG_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets gpdac_config to value 0"] impl crate::Resettable for GPDAC_CONFIG_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/gpip/gpdac_dma_config.rs b/src/gpip/gpdac_dma_config.rs index bc17cfa..cba5658 100644 --- a/src/gpip/gpdac_dma_config.rs +++ b/src/gpip/gpdac_dma_config.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,97 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `gpdac_dma_format` reader - "] -pub struct GPDAC_DMA_FORMAT_R(crate::FieldReader); -impl GPDAC_DMA_FORMAT_R { - pub(crate) fn new(bits: u8) -> Self { - GPDAC_DMA_FORMAT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPDAC_DMA_FORMAT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpdac_dma_format` writer - "] -pub struct GPDAC_DMA_FORMAT_W<'a> { - w: &'a mut W, -} -impl<'a> GPDAC_DMA_FORMAT_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 4)) | ((value as u32 & 0x03) << 4); - self.w - } -} #[doc = "Field `gpdac_dma_tx_en` reader - "] -pub struct GPDAC_DMA_TX_EN_R(crate::FieldReader); -impl GPDAC_DMA_TX_EN_R { - pub(crate) fn new(bits: bool) -> Self { - GPDAC_DMA_TX_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPDAC_DMA_TX_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type GPDAC_DMA_TX_EN_R = crate::BitReader; #[doc = "Field `gpdac_dma_tx_en` writer - "] -pub struct GPDAC_DMA_TX_EN_W<'a> { - w: &'a mut W, -} -impl<'a> GPDAC_DMA_TX_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type GPDAC_DMA_TX_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, GPDAC_DMA_CONFIG_SPEC, bool, O>; +#[doc = "Field `gpdac_dma_format` reader - "] +pub type GPDAC_DMA_FORMAT_R = crate::FieldReader; +#[doc = "Field `gpdac_dma_format` writer - "] +pub type GPDAC_DMA_FORMAT_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPDAC_DMA_CONFIG_SPEC, u8, u8, 2, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn gpdac_dma_tx_en(&self) -> GPDAC_DMA_TX_EN_R { + GPDAC_DMA_TX_EN_R::new((self.bits & 1) != 0) } -} -impl R { #[doc = "Bits 4:5"] #[inline(always)] pub fn gpdac_dma_format(&self) -> GPDAC_DMA_FORMAT_R { - GPDAC_DMA_FORMAT_R::new(((self.bits >> 4) & 0x03) as u8) - } - #[doc = "Bit 0"] - #[inline(always)] - pub fn gpdac_dma_tx_en(&self) -> GPDAC_DMA_TX_EN_R { - GPDAC_DMA_TX_EN_R::new((self.bits & 0x01) != 0) + GPDAC_DMA_FORMAT_R::new(((self.bits >> 4) & 3) as u8) } } impl W { - #[doc = "Bits 4:5"] + #[doc = "Bit 0"] #[inline(always)] - pub fn gpdac_dma_format(&mut self) -> GPDAC_DMA_FORMAT_W { - GPDAC_DMA_FORMAT_W { w: self } + #[must_use] + pub fn gpdac_dma_tx_en(&mut self) -> GPDAC_DMA_TX_EN_W<0> { + GPDAC_DMA_TX_EN_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bits 4:5"] #[inline(always)] - pub fn gpdac_dma_tx_en(&mut self) -> GPDAC_DMA_TX_EN_W { - GPDAC_DMA_TX_EN_W { w: self } + #[must_use] + pub fn gpdac_dma_format(&mut self) -> GPDAC_DMA_FORMAT_W<4> { + GPDAC_DMA_FORMAT_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -135,11 +88,10 @@ impl crate::Readable for GPDAC_DMA_CONFIG_SPEC { #[doc = "`write(|w| ..)` method takes [gpdac_dma_config::W](W) writer structure"] impl crate::Writable for GPDAC_DMA_CONFIG_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets gpdac_dma_config to value 0"] impl crate::Resettable for GPDAC_DMA_CONFIG_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/gpip/gpdac_dma_wdata.rs b/src/gpip/gpdac_dma_wdata.rs index 4c29df2..914624e 100644 --- a/src/gpip/gpdac_dma_wdata.rs +++ b/src/gpip/gpdac_dma_wdata.rs @@ -13,30 +13,24 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `gpdac_dma_wdata` writer - "] -pub struct GPDAC_DMA_WDATA_W<'a> { - w: &'a mut W, -} -impl<'a> GPDAC_DMA_WDATA_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type GPDAC_DMA_WDATA_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, GPDAC_DMA_WDATA_SPEC, u32, u32, 32, O>; impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn gpdac_dma_wdata(&mut self) -> GPDAC_DMA_WDATA_W { - GPDAC_DMA_WDATA_W { w: self } + #[must_use] + pub fn gpdac_dma_wdata(&mut self) -> GPDAC_DMA_WDATA_W<0> { + GPDAC_DMA_WDATA_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -50,11 +44,10 @@ impl crate::RegisterSpec for GPDAC_DMA_WDATA_SPEC { #[doc = "`write(|w| ..)` method takes [gpdac_dma_wdata::W](W) writer structure"] impl crate::Writable for GPDAC_DMA_WDATA_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets gpdac_dma_wdata to value 0"] impl crate::Resettable for GPDAC_DMA_WDATA_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/gpip/gpdac_tx_fifo_status.rs b/src/gpip/gpdac_tx_fifo_status.rs index 8762851..7c7ee63 100644 --- a/src/gpip/gpdac_tx_fifo_status.rs +++ b/src/gpip/gpdac_tx_fifo_status.rs @@ -7,106 +7,47 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `TxFifoWrPtr` reader - "] -pub struct TXFIFOWRPTR_R(crate::FieldReader); -impl TXFIFOWRPTR_R { - pub(crate) fn new(bits: u8) -> Self { - TXFIFOWRPTR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TXFIFOWRPTR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `TxFifoRdPtr` reader - "] -pub struct TXFIFORDPTR_R(crate::FieldReader); -impl TXFIFORDPTR_R { - pub(crate) fn new(bits: u8) -> Self { - TXFIFORDPTR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TXFIFORDPTR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_cs` reader - "] -pub struct TX_CS_R(crate::FieldReader); -impl TX_CS_R { - pub(crate) fn new(bits: u8) -> Self { - TX_CS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_CS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_fifo_full` reader - "] -pub struct TX_FIFO_FULL_R(crate::FieldReader); -impl TX_FIFO_FULL_R { - pub(crate) fn new(bits: bool) -> Self { - TX_FIFO_FULL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_FIFO_FULL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} #[doc = "Field `tx_fifo_empty` reader - "] -pub struct TX_FIFO_EMPTY_R(crate::FieldReader); -impl TX_FIFO_EMPTY_R { - pub(crate) fn new(bits: bool) -> Self { - TX_FIFO_EMPTY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_FIFO_EMPTY_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TX_FIFO_EMPTY_R = crate::BitReader; +#[doc = "Field `tx_fifo_full` reader - "] +pub type TX_FIFO_FULL_R = crate::BitReader; +#[doc = "Field `tx_cs` reader - "] +pub type TX_CS_R = crate::FieldReader; +#[doc = "Field `TxFifoRdPtr` reader - "] +pub type TX_FIFO_RD_PTR_R = crate::FieldReader; +#[doc = "Field `TxFifoWrPtr` reader - "] +pub type TX_FIFO_WR_PTR_R = crate::FieldReader; impl R { - #[doc = "Bits 8:9"] + #[doc = "Bit 0"] #[inline(always)] - pub fn tx_fifo_wr_ptr(&self) -> TXFIFOWRPTR_R { - TXFIFOWRPTR_R::new(((self.bits >> 8) & 0x03) as u8) + pub fn tx_fifo_empty(&self) -> TX_FIFO_EMPTY_R { + TX_FIFO_EMPTY_R::new((self.bits & 1) != 0) } - #[doc = "Bits 4:6"] + #[doc = "Bit 1"] #[inline(always)] - pub fn tx_fifo_rd_ptr(&self) -> TXFIFORDPTR_R { - TXFIFORDPTR_R::new(((self.bits >> 4) & 0x07) as u8) + pub fn tx_fifo_full(&self) -> TX_FIFO_FULL_R { + TX_FIFO_FULL_R::new(((self.bits >> 1) & 1) != 0) } #[doc = "Bits 2:3"] #[inline(always)] pub fn tx_cs(&self) -> TX_CS_R { - TX_CS_R::new(((self.bits >> 2) & 0x03) as u8) + TX_CS_R::new(((self.bits >> 2) & 3) as u8) } - #[doc = "Bit 1"] + #[doc = "Bits 4:6"] #[inline(always)] - pub fn tx_fifo_full(&self) -> TX_FIFO_FULL_R { - TX_FIFO_FULL_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn tx_fifo_rd_ptr(&self) -> TX_FIFO_RD_PTR_R { + TX_FIFO_RD_PTR_R::new(((self.bits >> 4) & 7) as u8) } - #[doc = "Bit 0"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn tx_fifo_empty(&self) -> TX_FIFO_EMPTY_R { - TX_FIFO_EMPTY_R::new((self.bits & 0x01) != 0) + pub fn tx_fifo_wr_ptr(&self) -> TX_FIFO_WR_PTR_R { + TX_FIFO_WR_PTR_R::new(((self.bits >> 8) & 3) as u8) } } #[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"] @@ -120,8 +61,5 @@ impl crate::Readable for GPDAC_TX_FIFO_STATUS_SPEC { } #[doc = "`reset()` method sets gpdac_tx_fifo_status to value 0x40"] impl crate::Resettable for GPDAC_TX_FIFO_STATUS_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x40 - } + const RESET_VALUE: Self::Ux = 0x40; } diff --git a/src/hbn.rs b/src/hbn.rs index 01baaf5..a1ec891 100644 --- a/src/hbn.rs +++ b/src/hbn.rs @@ -2,125 +2,125 @@ #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - HBN_CTL."] - pub hbn_ctl: crate::Reg, + pub hbn_ctl: HBN_CTL, #[doc = "0x04 - HBN_TIME_L."] - pub hbn_time_l: crate::Reg, + pub hbn_time_l: HBN_TIME_L, #[doc = "0x08 - HBN_TIME_H."] - pub hbn_time_h: crate::Reg, + pub hbn_time_h: HBN_TIME_H, #[doc = "0x0c - RTC_TIME_L."] - pub rtc_time_l: crate::Reg, + pub rtc_time_l: RTC_TIME_L, #[doc = "0x10 - RTC_TIME_H."] - pub rtc_time_h: crate::Reg, + pub rtc_time_h: RTC_TIME_H, #[doc = "0x14 - HBN_IRQ_MODE."] - pub hbn_irq_mode: crate::Reg, + pub hbn_irq_mode: HBN_IRQ_MODE, #[doc = "0x18 - HBN_IRQ_STAT."] - pub hbn_irq_stat: crate::Reg, + pub hbn_irq_stat: HBN_IRQ_STAT, #[doc = "0x1c - HBN_IRQ_CLR."] - pub hbn_irq_clr: crate::Reg, + pub hbn_irq_clr: HBN_IRQ_CLR, #[doc = "0x20 - HBN_PIR_CFG."] - pub hbn_pir_cfg: crate::Reg, + pub hbn_pir_cfg: HBN_PIR_CFG, #[doc = "0x24 - HBN_PIR_VTH."] - pub hbn_pir_vth: crate::Reg, + pub hbn_pir_vth: HBN_PIR_VTH, #[doc = "0x28 - HBN_PIR_INTERVAL."] - pub hbn_pir_interval: crate::Reg, + pub hbn_pir_interval: HBN_PIR_INTERVAL, #[doc = "0x2c - HBN_BOR_CFG."] - pub hbn_bor_cfg: crate::Reg, + pub hbn_bor_cfg: HBN_BOR_CFG, #[doc = "0x30 - HBN_GLB."] - pub hbn_glb: crate::Reg, + pub hbn_glb: HBN_GLB, #[doc = "0x34 - HBN_SRAM."] - pub hbn_sram: crate::Reg, - _reserved14: [u8; 200usize], + pub hbn_sram: HBN_SRAM, + _reserved14: [u8; 0xc8], #[doc = "0x100 - HBN_RSV0."] - pub hbn_rsv0: crate::Reg, + pub hbn_rsv0: HBN_RSV0, #[doc = "0x104 - HBN_RSV1."] - pub hbn_rsv1: crate::Reg, + pub hbn_rsv1: HBN_RSV1, #[doc = "0x108 - HBN_RSV2."] - pub hbn_rsv2: crate::Reg, + pub hbn_rsv2: HBN_RSV2, #[doc = "0x10c - HBN_RSV3."] - pub hbn_rsv3: crate::Reg, - _reserved18: [u8; 240usize], + pub hbn_rsv3: HBN_RSV3, + _reserved18: [u8; 0xf0], #[doc = "0x200 - rc32k_ctrl0."] - pub rc32k_ctrl0: crate::Reg, + pub rc32k_ctrl0: RC32K_CTRL0, #[doc = "0x204 - xtal32k."] - pub xtal32k: crate::Reg, + pub xtal32k: XTAL32K, } -#[doc = "HBN_CTL register accessor: an alias for `Reg`"] +#[doc = "HBN_CTL (rw) register accessor: an alias for `Reg`"] pub type HBN_CTL = crate::Reg; #[doc = "HBN_CTL."] pub mod hbn_ctl; -#[doc = "HBN_TIME_L register accessor: an alias for `Reg`"] +#[doc = "HBN_TIME_L (rw) register accessor: an alias for `Reg`"] pub type HBN_TIME_L = crate::Reg; #[doc = "HBN_TIME_L."] pub mod hbn_time_l; -#[doc = "HBN_TIME_H register accessor: an alias for `Reg`"] +#[doc = "HBN_TIME_H (rw) register accessor: an alias for `Reg`"] pub type HBN_TIME_H = crate::Reg; #[doc = "HBN_TIME_H."] pub mod hbn_time_h; -#[doc = "RTC_TIME_L register accessor: an alias for `Reg`"] +#[doc = "RTC_TIME_L (r) register accessor: an alias for `Reg`"] pub type RTC_TIME_L = crate::Reg; #[doc = "RTC_TIME_L."] pub mod rtc_time_l; -#[doc = "RTC_TIME_H register accessor: an alias for `Reg`"] +#[doc = "RTC_TIME_H (rw) register accessor: an alias for `Reg`"] pub type RTC_TIME_H = crate::Reg; #[doc = "RTC_TIME_H."] pub mod rtc_time_h; -#[doc = "HBN_IRQ_MODE register accessor: an alias for `Reg`"] +#[doc = "HBN_IRQ_MODE (rw) register accessor: an alias for `Reg`"] pub type HBN_IRQ_MODE = crate::Reg; #[doc = "HBN_IRQ_MODE."] pub mod hbn_irq_mode; -#[doc = "HBN_IRQ_STAT register accessor: an alias for `Reg`"] +#[doc = "HBN_IRQ_STAT (r) register accessor: an alias for `Reg`"] pub type HBN_IRQ_STAT = crate::Reg; #[doc = "HBN_IRQ_STAT."] pub mod hbn_irq_stat; -#[doc = "HBN_IRQ_CLR register accessor: an alias for `Reg`"] +#[doc = "HBN_IRQ_CLR (w) register accessor: an alias for `Reg`"] pub type HBN_IRQ_CLR = crate::Reg; #[doc = "HBN_IRQ_CLR."] pub mod hbn_irq_clr; -#[doc = "HBN_PIR_CFG register accessor: an alias for `Reg`"] +#[doc = "HBN_PIR_CFG (rw) register accessor: an alias for `Reg`"] pub type HBN_PIR_CFG = crate::Reg; #[doc = "HBN_PIR_CFG."] pub mod hbn_pir_cfg; -#[doc = "HBN_PIR_VTH register accessor: an alias for `Reg`"] +#[doc = "HBN_PIR_VTH (rw) register accessor: an alias for `Reg`"] pub type HBN_PIR_VTH = crate::Reg; #[doc = "HBN_PIR_VTH."] pub mod hbn_pir_vth; -#[doc = "HBN_PIR_INTERVAL register accessor: an alias for `Reg`"] +#[doc = "HBN_PIR_INTERVAL (rw) register accessor: an alias for `Reg`"] pub type HBN_PIR_INTERVAL = crate::Reg; #[doc = "HBN_PIR_INTERVAL."] pub mod hbn_pir_interval; -#[doc = "HBN_BOR_CFG register accessor: an alias for `Reg`"] +#[doc = "HBN_BOR_CFG (rw) register accessor: an alias for `Reg`"] pub type HBN_BOR_CFG = crate::Reg; #[doc = "HBN_BOR_CFG."] pub mod hbn_bor_cfg; -#[doc = "HBN_GLB register accessor: an alias for `Reg`"] +#[doc = "HBN_GLB (rw) register accessor: an alias for `Reg`"] pub type HBN_GLB = crate::Reg; #[doc = "HBN_GLB."] pub mod hbn_glb; -#[doc = "HBN_SRAM register accessor: an alias for `Reg`"] +#[doc = "HBN_SRAM (rw) register accessor: an alias for `Reg`"] pub type HBN_SRAM = crate::Reg; #[doc = "HBN_SRAM."] pub mod hbn_sram; -#[doc = "HBN_RSV0 register accessor: an alias for `Reg`"] +#[doc = "HBN_RSV0 (rw) register accessor: an alias for `Reg`"] pub type HBN_RSV0 = crate::Reg; #[doc = "HBN_RSV0."] pub mod hbn_rsv0; -#[doc = "HBN_RSV1 register accessor: an alias for `Reg`"] +#[doc = "HBN_RSV1 (rw) register accessor: an alias for `Reg`"] pub type HBN_RSV1 = crate::Reg; #[doc = "HBN_RSV1."] pub mod hbn_rsv1; -#[doc = "HBN_RSV2 register accessor: an alias for `Reg`"] +#[doc = "HBN_RSV2 (rw) register accessor: an alias for `Reg`"] pub type HBN_RSV2 = crate::Reg; #[doc = "HBN_RSV2."] pub mod hbn_rsv2; -#[doc = "HBN_RSV3 register accessor: an alias for `Reg`"] +#[doc = "HBN_RSV3 (rw) register accessor: an alias for `Reg`"] pub type HBN_RSV3 = crate::Reg; #[doc = "HBN_RSV3."] pub mod hbn_rsv3; -#[doc = "rc32k_ctrl0 register accessor: an alias for `Reg`"] +#[doc = "rc32k_ctrl0 (rw) register accessor: an alias for `Reg`"] pub type RC32K_CTRL0 = crate::Reg; #[doc = "rc32k_ctrl0."] pub mod rc32k_ctrl0; -#[doc = "xtal32k register accessor: an alias for `Reg`"] +#[doc = "xtal32k (rw) register accessor: an alias for `Reg`"] pub type XTAL32K = crate::Reg; #[doc = "xtal32k."] pub mod xtal32k; diff --git a/src/hbn/hbn_bor_cfg.rs b/src/hbn/hbn_bor_cfg.rs index c74f538..2be2578 100644 --- a/src/hbn/hbn_bor_cfg.rs +++ b/src/hbn/hbn_bor_cfg.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,172 +28,69 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `r_bor_out` reader - "] -pub struct R_BOR_OUT_R(crate::FieldReader); -impl R_BOR_OUT_R { - pub(crate) fn new(bits: bool) -> Self { - R_BOR_OUT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for R_BOR_OUT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_bor` reader - "] -pub struct PU_BOR_R(crate::FieldReader); -impl PU_BOR_R { - pub(crate) fn new(bits: bool) -> Self { - PU_BOR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_BOR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_bor` writer - "] -pub struct PU_BOR_W<'a> { - w: &'a mut W, -} -impl<'a> PU_BOR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `bor_vth` reader - "] -pub struct BOR_VTH_R(crate::FieldReader); -impl BOR_VTH_R { - pub(crate) fn new(bits: bool) -> Self { - BOR_VTH_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for BOR_VTH_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `bor_vth` writer - "] -pub struct BOR_VTH_W<'a> { - w: &'a mut W, -} -impl<'a> BOR_VTH_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `bor_sel` reader - "] -pub struct BOR_SEL_R(crate::FieldReader); -impl BOR_SEL_R { - pub(crate) fn new(bits: bool) -> Self { - BOR_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for BOR_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type BOR_SEL_R = crate::BitReader; #[doc = "Field `bor_sel` writer - "] -pub struct BOR_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> BOR_SEL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type BOR_SEL_W<'a, const O: u8> = crate::BitWriter<'a, u32, HBN_BOR_CFG_SPEC, bool, O>; +#[doc = "Field `bor_vth` reader - "] +pub type BOR_VTH_R = crate::BitReader; +#[doc = "Field `bor_vth` writer - "] +pub type BOR_VTH_W<'a, const O: u8> = crate::BitWriter<'a, u32, HBN_BOR_CFG_SPEC, bool, O>; +#[doc = "Field `pu_bor` reader - "] +pub type PU_BOR_R = crate::BitReader; +#[doc = "Field `pu_bor` writer - "] +pub type PU_BOR_W<'a, const O: u8> = crate::BitWriter<'a, u32, HBN_BOR_CFG_SPEC, bool, O>; +#[doc = "Field `r_bor_out` reader - "] +pub type R_BOR_OUT_R = crate::BitReader; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn bor_sel(&self) -> BOR_SEL_R { + BOR_SEL_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bit 3"] + #[doc = "Bit 1"] #[inline(always)] - pub fn r_bor_out(&self) -> R_BOR_OUT_R { - R_BOR_OUT_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn bor_vth(&self) -> BOR_VTH_R { + BOR_VTH_R::new(((self.bits >> 1) & 1) != 0) } #[doc = "Bit 2"] #[inline(always)] pub fn pu_bor(&self) -> PU_BOR_R { - PU_BOR_R::new(((self.bits >> 2) & 0x01) != 0) + PU_BOR_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 1"] - #[inline(always)] - pub fn bor_vth(&self) -> BOR_VTH_R { - BOR_VTH_R::new(((self.bits >> 1) & 0x01) != 0) - } - #[doc = "Bit 0"] + #[doc = "Bit 3"] #[inline(always)] - pub fn bor_sel(&self) -> BOR_SEL_R { - BOR_SEL_R::new((self.bits & 0x01) != 0) + pub fn r_bor_out(&self) -> R_BOR_OUT_R { + R_BOR_OUT_R::new(((self.bits >> 3) & 1) != 0) } } impl W { - #[doc = "Bit 2"] + #[doc = "Bit 0"] #[inline(always)] - pub fn pu_bor(&mut self) -> PU_BOR_W { - PU_BOR_W { w: self } + #[must_use] + pub fn bor_sel(&mut self) -> BOR_SEL_W<0> { + BOR_SEL_W::new(self) } #[doc = "Bit 1"] #[inline(always)] - pub fn bor_vth(&mut self) -> BOR_VTH_W { - BOR_VTH_W { w: self } + #[must_use] + pub fn bor_vth(&mut self) -> BOR_VTH_W<1> { + BOR_VTH_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 2"] #[inline(always)] - pub fn bor_sel(&mut self) -> BOR_SEL_W { - BOR_SEL_W { w: self } + #[must_use] + pub fn pu_bor(&mut self) -> PU_BOR_W<2> { + PU_BOR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -210,11 +108,10 @@ impl crate::Readable for HBN_BOR_CFG_SPEC { #[doc = "`write(|w| ..)` method takes [hbn_bor_cfg::W](W) writer structure"] impl crate::Writable for HBN_BOR_CFG_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets HBN_BOR_CFG to value 0x02"] impl crate::Resettable for HBN_BOR_CFG_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x02 - } + const RESET_VALUE: Self::Ux = 0x02; } diff --git a/src/hbn/hbn_ctl.rs b/src/hbn/hbn_ctl.rs index 49ece9d..3e64a75 100644 --- a/src/hbn/hbn_ctl.rs +++ b/src/hbn/hbn_ctl.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,621 +28,230 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `hbn_state` reader - "] -pub struct HBN_STATE_R(crate::FieldReader); -impl HBN_STATE_R { - pub(crate) fn new(bits: u8) -> Self { - HBN_STATE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for HBN_STATE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sram_slp` reader - "] -pub struct SRAM_SLP_R(crate::FieldReader); -impl SRAM_SLP_R { - pub(crate) fn new(bits: bool) -> Self { - SRAM_SLP_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SRAM_SLP_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sram_slp_option` reader - "] -pub struct SRAM_SLP_OPTION_R(crate::FieldReader); -impl SRAM_SLP_OPTION_R { - pub(crate) fn new(bits: bool) -> Self { - SRAM_SLP_OPTION_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SRAM_SLP_OPTION_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sram_slp_option` writer - "] -pub struct SRAM_SLP_OPTION_W<'a> { - w: &'a mut W, -} -impl<'a> SRAM_SLP_OPTION_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 26)) | ((value as u32 & 0x01) << 26); - self.w - } -} -#[doc = "Field `pwr_on_option` reader - "] -pub struct PWR_ON_OPTION_R(crate::FieldReader); -impl PWR_ON_OPTION_R { - pub(crate) fn new(bits: bool) -> Self { - PWR_ON_OPTION_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWR_ON_OPTION_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwr_on_option` writer - "] -pub struct PWR_ON_OPTION_W<'a> { - w: &'a mut W, -} -impl<'a> PWR_ON_OPTION_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 25)) | ((value as u32 & 0x01) << 25); - self.w - } -} -#[doc = "Field `rtc_dly_option` reader - "] -pub struct RTC_DLY_OPTION_R(crate::FieldReader); -impl RTC_DLY_OPTION_R { - pub(crate) fn new(bits: bool) -> Self { - RTC_DLY_OPTION_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RTC_DLY_OPTION_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rtc_dly_option` writer - "] -pub struct RTC_DLY_OPTION_W<'a> { - w: &'a mut W, -} -impl<'a> RTC_DLY_OPTION_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24); - self.w - } -} -#[doc = "Field `pu_dcdc18_aon` reader - "] -pub struct PU_DCDC18_AON_R(crate::FieldReader); -impl PU_DCDC18_AON_R { - pub(crate) fn new(bits: bool) -> Self { - PU_DCDC18_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_DCDC18_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_dcdc18_aon` writer - "] -pub struct PU_DCDC18_AON_W<'a> { - w: &'a mut W, -} -impl<'a> PU_DCDC18_AON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23); - self.w - } -} -#[doc = "Field `hbn_ldo11_aon_vout_sel` reader - "] -pub struct HBN_LDO11_AON_VOUT_SEL_R(crate::FieldReader); -impl HBN_LDO11_AON_VOUT_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - HBN_LDO11_AON_VOUT_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for HBN_LDO11_AON_VOUT_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `hbn_ldo11_aon_vout_sel` writer - "] -pub struct HBN_LDO11_AON_VOUT_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> HBN_LDO11_AON_VOUT_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 19)) | ((value as u32 & 0x0f) << 19); - self.w - } -} -#[doc = "Field `hbn_ldo11_rt_vout_sel` reader - "] -pub struct HBN_LDO11_RT_VOUT_SEL_R(crate::FieldReader); -impl HBN_LDO11_RT_VOUT_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - HBN_LDO11_RT_VOUT_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for HBN_LDO11_RT_VOUT_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `hbn_ldo11_rt_vout_sel` writer - "] -pub struct HBN_LDO11_RT_VOUT_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> HBN_LDO11_RT_VOUT_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 15)) | ((value as u32 & 0x0f) << 15); - self.w - } -} -#[doc = "Field `hbn_dis_pwr_off_ldo11_rt` reader - "] -pub struct HBN_DIS_PWR_OFF_LDO11_RT_R(crate::FieldReader); -impl HBN_DIS_PWR_OFF_LDO11_RT_R { - pub(crate) fn new(bits: bool) -> Self { - HBN_DIS_PWR_OFF_LDO11_RT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for HBN_DIS_PWR_OFF_LDO11_RT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `hbn_dis_pwr_off_ldo11_rt` writer - "] -pub struct HBN_DIS_PWR_OFF_LDO11_RT_W<'a> { - w: &'a mut W, -} -impl<'a> HBN_DIS_PWR_OFF_LDO11_RT_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14); - self.w - } -} -#[doc = "Field `hbn_dis_pwr_off_ldo11` reader - "] -pub struct HBN_DIS_PWR_OFF_LDO11_R(crate::FieldReader); -impl HBN_DIS_PWR_OFF_LDO11_R { - pub(crate) fn new(bits: bool) -> Self { - HBN_DIS_PWR_OFF_LDO11_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for HBN_DIS_PWR_OFF_LDO11_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `hbn_dis_pwr_off_ldo11` writer - "] -pub struct HBN_DIS_PWR_OFF_LDO11_W<'a> { - w: &'a mut W, -} -impl<'a> HBN_DIS_PWR_OFF_LDO11_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13); - self.w - } -} -#[doc = "Field `sw_rst` reader - "] -pub struct SW_RST_R(crate::FieldReader); -impl SW_RST_R { - pub(crate) fn new(bits: bool) -> Self { - SW_RST_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SW_RST_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sw_rst` writer - "] -pub struct SW_RST_W<'a> { - w: &'a mut W, -} -impl<'a> SW_RST_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} -#[doc = "Field `pwrdn_hbn_rtc` reader - "] -pub struct PWRDN_HBN_RTC_R(crate::FieldReader); -impl PWRDN_HBN_RTC_R { - pub(crate) fn new(bits: bool) -> Self { - PWRDN_HBN_RTC_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWRDN_HBN_RTC_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwrdn_hbn_rtc` writer - "] -pub struct PWRDN_HBN_RTC_W<'a> { - w: &'a mut W, -} -impl<'a> PWRDN_HBN_RTC_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w - } -} -#[doc = "Field `pwrdn_hbn_core` reader - "] -pub struct PWRDN_HBN_CORE_R(crate::FieldReader); -impl PWRDN_HBN_CORE_R { - pub(crate) fn new(bits: bool) -> Self { - PWRDN_HBN_CORE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWRDN_HBN_CORE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwrdn_hbn_core` writer - "] -pub struct PWRDN_HBN_CORE_W<'a> { - w: &'a mut W, -} -impl<'a> PWRDN_HBN_CORE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w - } -} -#[doc = "Field `trap_mode` reader - "] -pub struct TRAP_MODE_R(crate::FieldReader); -impl TRAP_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - TRAP_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TRAP_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `hbn_mode` writer - "] -pub struct HBN_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> HBN_MODE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7); - self.w - } -} #[doc = "Field `rtc_ctl` reader - "] -pub struct RTC_CTL_R(crate::FieldReader); -impl RTC_CTL_R { - pub(crate) fn new(bits: u8) -> Self { - RTC_CTL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RTC_CTL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RTC_CTL_R = crate::FieldReader; #[doc = "Field `rtc_ctl` writer - "] -pub struct RTC_CTL_W<'a> { - w: &'a mut W, -} -impl<'a> RTC_CTL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x7f) | (value as u32 & 0x7f); - self.w - } -} +pub type RTC_CTL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, HBN_CTL_SPEC, u8, u8, 7, O>; +#[doc = "Field `hbn_mode` writer - "] +pub type HBN_MODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, HBN_CTL_SPEC, bool, O>; +#[doc = "Field `trap_mode` reader - "] +pub type TRAP_MODE_R = crate::BitReader; +#[doc = "Field `pwrdn_hbn_core` reader - "] +pub type PWRDN_HBN_CORE_R = crate::BitReader; +#[doc = "Field `pwrdn_hbn_core` writer - "] +pub type PWRDN_HBN_CORE_W<'a, const O: u8> = crate::BitWriter<'a, u32, HBN_CTL_SPEC, bool, O>; +#[doc = "Field `pwrdn_hbn_rtc` reader - "] +pub type PWRDN_HBN_RTC_R = crate::BitReader; +#[doc = "Field `pwrdn_hbn_rtc` writer - "] +pub type PWRDN_HBN_RTC_W<'a, const O: u8> = crate::BitWriter<'a, u32, HBN_CTL_SPEC, bool, O>; +#[doc = "Field `sw_rst` reader - "] +pub type SW_RST_R = crate::BitReader; +#[doc = "Field `sw_rst` writer - "] +pub type SW_RST_W<'a, const O: u8> = crate::BitWriter<'a, u32, HBN_CTL_SPEC, bool, O>; +#[doc = "Field `hbn_dis_pwr_off_ldo11` reader - "] +pub type HBN_DIS_PWR_OFF_LDO11_R = crate::BitReader; +#[doc = "Field `hbn_dis_pwr_off_ldo11` writer - "] +pub type HBN_DIS_PWR_OFF_LDO11_W<'a, const O: u8> = + crate::BitWriter<'a, u32, HBN_CTL_SPEC, bool, O>; +#[doc = "Field `hbn_dis_pwr_off_ldo11_rt` reader - "] +pub type HBN_DIS_PWR_OFF_LDO11_RT_R = crate::BitReader; +#[doc = "Field `hbn_dis_pwr_off_ldo11_rt` writer - "] +pub type HBN_DIS_PWR_OFF_LDO11_RT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, HBN_CTL_SPEC, bool, O>; +#[doc = "Field `hbn_ldo11_rt_vout_sel` reader - "] +pub type HBN_LDO11_RT_VOUT_SEL_R = crate::FieldReader; +#[doc = "Field `hbn_ldo11_rt_vout_sel` writer - "] +pub type HBN_LDO11_RT_VOUT_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, HBN_CTL_SPEC, u8, u8, 4, O>; +#[doc = "Field `hbn_ldo11_aon_vout_sel` reader - "] +pub type HBN_LDO11_AON_VOUT_SEL_R = crate::FieldReader; +#[doc = "Field `hbn_ldo11_aon_vout_sel` writer - "] +pub type HBN_LDO11_AON_VOUT_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, HBN_CTL_SPEC, u8, u8, 4, O>; +#[doc = "Field `pu_dcdc18_aon` reader - "] +pub type PU_DCDC18_AON_R = crate::BitReader; +#[doc = "Field `pu_dcdc18_aon` writer - "] +pub type PU_DCDC18_AON_W<'a, const O: u8> = crate::BitWriter<'a, u32, HBN_CTL_SPEC, bool, O>; +#[doc = "Field `rtc_dly_option` reader - "] +pub type RTC_DLY_OPTION_R = crate::BitReader; +#[doc = "Field `rtc_dly_option` writer - "] +pub type RTC_DLY_OPTION_W<'a, const O: u8> = crate::BitWriter<'a, u32, HBN_CTL_SPEC, bool, O>; +#[doc = "Field `pwr_on_option` reader - "] +pub type PWR_ON_OPTION_R = crate::BitReader; +#[doc = "Field `pwr_on_option` writer - "] +pub type PWR_ON_OPTION_W<'a, const O: u8> = crate::BitWriter<'a, u32, HBN_CTL_SPEC, bool, O>; +#[doc = "Field `sram_slp_option` reader - "] +pub type SRAM_SLP_OPTION_R = crate::BitReader; +#[doc = "Field `sram_slp_option` writer - "] +pub type SRAM_SLP_OPTION_W<'a, const O: u8> = crate::BitWriter<'a, u32, HBN_CTL_SPEC, bool, O>; +#[doc = "Field `sram_slp` reader - "] +pub type SRAM_SLP_R = crate::BitReader; +#[doc = "Field `hbn_state` reader - "] +pub type HBN_STATE_R = crate::FieldReader; impl R { - #[doc = "Bits 28:31"] + #[doc = "Bits 0:6"] #[inline(always)] - pub fn hbn_state(&self) -> HBN_STATE_R { - HBN_STATE_R::new(((self.bits >> 28) & 0x0f) as u8) + pub fn rtc_ctl(&self) -> RTC_CTL_R { + RTC_CTL_R::new((self.bits & 0x7f) as u8) } - #[doc = "Bit 27"] + #[doc = "Bit 8"] #[inline(always)] - pub fn sram_slp(&self) -> SRAM_SLP_R { - SRAM_SLP_R::new(((self.bits >> 27) & 0x01) != 0) + pub fn trap_mode(&self) -> TRAP_MODE_R { + TRAP_MODE_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bit 26"] + #[doc = "Bit 9"] #[inline(always)] - pub fn sram_slp_option(&self) -> SRAM_SLP_OPTION_R { - SRAM_SLP_OPTION_R::new(((self.bits >> 26) & 0x01) != 0) + pub fn pwrdn_hbn_core(&self) -> PWRDN_HBN_CORE_R { + PWRDN_HBN_CORE_R::new(((self.bits >> 9) & 1) != 0) } - #[doc = "Bit 25"] + #[doc = "Bit 11"] #[inline(always)] - pub fn pwr_on_option(&self) -> PWR_ON_OPTION_R { - PWR_ON_OPTION_R::new(((self.bits >> 25) & 0x01) != 0) + pub fn pwrdn_hbn_rtc(&self) -> PWRDN_HBN_RTC_R { + PWRDN_HBN_RTC_R::new(((self.bits >> 11) & 1) != 0) } - #[doc = "Bit 24"] + #[doc = "Bit 12"] #[inline(always)] - pub fn rtc_dly_option(&self) -> RTC_DLY_OPTION_R { - RTC_DLY_OPTION_R::new(((self.bits >> 24) & 0x01) != 0) + pub fn sw_rst(&self) -> SW_RST_R { + SW_RST_R::new(((self.bits >> 12) & 1) != 0) } - #[doc = "Bit 23"] + #[doc = "Bit 13"] #[inline(always)] - pub fn pu_dcdc18_aon(&self) -> PU_DCDC18_AON_R { - PU_DCDC18_AON_R::new(((self.bits >> 23) & 0x01) != 0) + pub fn hbn_dis_pwr_off_ldo11(&self) -> HBN_DIS_PWR_OFF_LDO11_R { + HBN_DIS_PWR_OFF_LDO11_R::new(((self.bits >> 13) & 1) != 0) } - #[doc = "Bits 19:22"] + #[doc = "Bit 14"] #[inline(always)] - pub fn hbn_ldo11_aon_vout_sel(&self) -> HBN_LDO11_AON_VOUT_SEL_R { - HBN_LDO11_AON_VOUT_SEL_R::new(((self.bits >> 19) & 0x0f) as u8) + pub fn hbn_dis_pwr_off_ldo11_rt(&self) -> HBN_DIS_PWR_OFF_LDO11_RT_R { + HBN_DIS_PWR_OFF_LDO11_RT_R::new(((self.bits >> 14) & 1) != 0) } #[doc = "Bits 15:18"] #[inline(always)] pub fn hbn_ldo11_rt_vout_sel(&self) -> HBN_LDO11_RT_VOUT_SEL_R { HBN_LDO11_RT_VOUT_SEL_R::new(((self.bits >> 15) & 0x0f) as u8) } - #[doc = "Bit 14"] + #[doc = "Bits 19:22"] #[inline(always)] - pub fn hbn_dis_pwr_off_ldo11_rt(&self) -> HBN_DIS_PWR_OFF_LDO11_RT_R { - HBN_DIS_PWR_OFF_LDO11_RT_R::new(((self.bits >> 14) & 0x01) != 0) + pub fn hbn_ldo11_aon_vout_sel(&self) -> HBN_LDO11_AON_VOUT_SEL_R { + HBN_LDO11_AON_VOUT_SEL_R::new(((self.bits >> 19) & 0x0f) as u8) } - #[doc = "Bit 13"] + #[doc = "Bit 23"] #[inline(always)] - pub fn hbn_dis_pwr_off_ldo11(&self) -> HBN_DIS_PWR_OFF_LDO11_R { - HBN_DIS_PWR_OFF_LDO11_R::new(((self.bits >> 13) & 0x01) != 0) + pub fn pu_dcdc18_aon(&self) -> PU_DCDC18_AON_R { + PU_DCDC18_AON_R::new(((self.bits >> 23) & 1) != 0) } - #[doc = "Bit 12"] + #[doc = "Bit 24"] #[inline(always)] - pub fn sw_rst(&self) -> SW_RST_R { - SW_RST_R::new(((self.bits >> 12) & 0x01) != 0) + pub fn rtc_dly_option(&self) -> RTC_DLY_OPTION_R { + RTC_DLY_OPTION_R::new(((self.bits >> 24) & 1) != 0) } - #[doc = "Bit 11"] + #[doc = "Bit 25"] #[inline(always)] - pub fn pwrdn_hbn_rtc(&self) -> PWRDN_HBN_RTC_R { - PWRDN_HBN_RTC_R::new(((self.bits >> 11) & 0x01) != 0) + pub fn pwr_on_option(&self) -> PWR_ON_OPTION_R { + PWR_ON_OPTION_R::new(((self.bits >> 25) & 1) != 0) } - #[doc = "Bit 9"] + #[doc = "Bit 26"] #[inline(always)] - pub fn pwrdn_hbn_core(&self) -> PWRDN_HBN_CORE_R { - PWRDN_HBN_CORE_R::new(((self.bits >> 9) & 0x01) != 0) + pub fn sram_slp_option(&self) -> SRAM_SLP_OPTION_R { + SRAM_SLP_OPTION_R::new(((self.bits >> 26) & 1) != 0) } - #[doc = "Bit 8"] + #[doc = "Bit 27"] #[inline(always)] - pub fn trap_mode(&self) -> TRAP_MODE_R { - TRAP_MODE_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn sram_slp(&self) -> SRAM_SLP_R { + SRAM_SLP_R::new(((self.bits >> 27) & 1) != 0) } - #[doc = "Bits 0:6"] + #[doc = "Bits 28:31"] #[inline(always)] - pub fn rtc_ctl(&self) -> RTC_CTL_R { - RTC_CTL_R::new((self.bits & 0x7f) as u8) + pub fn hbn_state(&self) -> HBN_STATE_R { + HBN_STATE_R::new(((self.bits >> 28) & 0x0f) as u8) } } impl W { - #[doc = "Bit 26"] + #[doc = "Bits 0:6"] #[inline(always)] - pub fn sram_slp_option(&mut self) -> SRAM_SLP_OPTION_W { - SRAM_SLP_OPTION_W { w: self } + #[must_use] + pub fn rtc_ctl(&mut self) -> RTC_CTL_W<0> { + RTC_CTL_W::new(self) } - #[doc = "Bit 25"] + #[doc = "Bit 7"] #[inline(always)] - pub fn pwr_on_option(&mut self) -> PWR_ON_OPTION_W { - PWR_ON_OPTION_W { w: self } + #[must_use] + pub fn hbn_mode(&mut self) -> HBN_MODE_W<7> { + HBN_MODE_W::new(self) } - #[doc = "Bit 24"] + #[doc = "Bit 9"] #[inline(always)] - pub fn rtc_dly_option(&mut self) -> RTC_DLY_OPTION_W { - RTC_DLY_OPTION_W { w: self } + #[must_use] + pub fn pwrdn_hbn_core(&mut self) -> PWRDN_HBN_CORE_W<9> { + PWRDN_HBN_CORE_W::new(self) } - #[doc = "Bit 23"] + #[doc = "Bit 11"] #[inline(always)] - pub fn pu_dcdc18_aon(&mut self) -> PU_DCDC18_AON_W { - PU_DCDC18_AON_W { w: self } + #[must_use] + pub fn pwrdn_hbn_rtc(&mut self) -> PWRDN_HBN_RTC_W<11> { + PWRDN_HBN_RTC_W::new(self) } - #[doc = "Bits 19:22"] + #[doc = "Bit 12"] #[inline(always)] - pub fn hbn_ldo11_aon_vout_sel(&mut self) -> HBN_LDO11_AON_VOUT_SEL_W { - HBN_LDO11_AON_VOUT_SEL_W { w: self } + #[must_use] + pub fn sw_rst(&mut self) -> SW_RST_W<12> { + SW_RST_W::new(self) } - #[doc = "Bits 15:18"] + #[doc = "Bit 13"] #[inline(always)] - pub fn hbn_ldo11_rt_vout_sel(&mut self) -> HBN_LDO11_RT_VOUT_SEL_W { - HBN_LDO11_RT_VOUT_SEL_W { w: self } + #[must_use] + pub fn hbn_dis_pwr_off_ldo11(&mut self) -> HBN_DIS_PWR_OFF_LDO11_W<13> { + HBN_DIS_PWR_OFF_LDO11_W::new(self) } #[doc = "Bit 14"] #[inline(always)] - pub fn hbn_dis_pwr_off_ldo11_rt(&mut self) -> HBN_DIS_PWR_OFF_LDO11_RT_W { - HBN_DIS_PWR_OFF_LDO11_RT_W { w: self } + #[must_use] + pub fn hbn_dis_pwr_off_ldo11_rt(&mut self) -> HBN_DIS_PWR_OFF_LDO11_RT_W<14> { + HBN_DIS_PWR_OFF_LDO11_RT_W::new(self) } - #[doc = "Bit 13"] + #[doc = "Bits 15:18"] #[inline(always)] - pub fn hbn_dis_pwr_off_ldo11(&mut self) -> HBN_DIS_PWR_OFF_LDO11_W { - HBN_DIS_PWR_OFF_LDO11_W { w: self } + #[must_use] + pub fn hbn_ldo11_rt_vout_sel(&mut self) -> HBN_LDO11_RT_VOUT_SEL_W<15> { + HBN_LDO11_RT_VOUT_SEL_W::new(self) } - #[doc = "Bit 12"] + #[doc = "Bits 19:22"] #[inline(always)] - pub fn sw_rst(&mut self) -> SW_RST_W { - SW_RST_W { w: self } + #[must_use] + pub fn hbn_ldo11_aon_vout_sel(&mut self) -> HBN_LDO11_AON_VOUT_SEL_W<19> { + HBN_LDO11_AON_VOUT_SEL_W::new(self) } - #[doc = "Bit 11"] + #[doc = "Bit 23"] #[inline(always)] - pub fn pwrdn_hbn_rtc(&mut self) -> PWRDN_HBN_RTC_W { - PWRDN_HBN_RTC_W { w: self } + #[must_use] + pub fn pu_dcdc18_aon(&mut self) -> PU_DCDC18_AON_W<23> { + PU_DCDC18_AON_W::new(self) } - #[doc = "Bit 9"] + #[doc = "Bit 24"] #[inline(always)] - pub fn pwrdn_hbn_core(&mut self) -> PWRDN_HBN_CORE_W { - PWRDN_HBN_CORE_W { w: self } + #[must_use] + pub fn rtc_dly_option(&mut self) -> RTC_DLY_OPTION_W<24> { + RTC_DLY_OPTION_W::new(self) } - #[doc = "Bit 7"] + #[doc = "Bit 25"] #[inline(always)] - pub fn hbn_mode(&mut self) -> HBN_MODE_W { - HBN_MODE_W { w: self } + #[must_use] + pub fn pwr_on_option(&mut self) -> PWR_ON_OPTION_W<25> { + PWR_ON_OPTION_W::new(self) } - #[doc = "Bits 0:6"] + #[doc = "Bit 26"] #[inline(always)] - pub fn rtc_ctl(&mut self) -> RTC_CTL_W { - RTC_CTL_W { w: self } + #[must_use] + pub fn sram_slp_option(&mut self) -> SRAM_SLP_OPTION_W<26> { + SRAM_SLP_OPTION_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -659,11 +269,10 @@ impl crate::Readable for HBN_CTL_SPEC { #[doc = "`write(|w| ..)` method takes [hbn_ctl::W](W) writer structure"] impl crate::Writable for HBN_CTL_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets HBN_CTL to value 0x00d5_0000"] impl crate::Resettable for HBN_CTL_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x00d5_0000 - } + const RESET_VALUE: Self::Ux = 0x00d5_0000; } diff --git a/src/hbn/hbn_glb.rs b/src/hbn/hbn_glb.rs index 26ec332..245172b 100644 --- a/src/hbn/hbn_glb.rs +++ b/src/hbn/hbn_glb.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,287 +28,126 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `sw_ldo11_aon_vout_sel` reader - "] -pub struct SW_LDO11_AON_VOUT_SEL_R(crate::FieldReader); -impl SW_LDO11_AON_VOUT_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SW_LDO11_AON_VOUT_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SW_LDO11_AON_VOUT_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sw_ldo11_aon_vout_sel` writer - "] -pub struct SW_LDO11_AON_VOUT_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SW_LDO11_AON_VOUT_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 28)) | ((value as u32 & 0x0f) << 28); - self.w - } -} -#[doc = "Field `sw_ldo11_rt_vout_sel` reader - "] -pub struct SW_LDO11_RT_VOUT_SEL_R(crate::FieldReader); -impl SW_LDO11_RT_VOUT_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SW_LDO11_RT_VOUT_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SW_LDO11_RT_VOUT_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sw_ldo11_rt_vout_sel` writer - "] -pub struct SW_LDO11_RT_VOUT_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SW_LDO11_RT_VOUT_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 24)) | ((value as u32 & 0x0f) << 24); - self.w - } -} -#[doc = "Field `sw_ldo11soc_vout_sel_aon` reader - "] -pub struct SW_LDO11SOC_VOUT_SEL_AON_R(crate::FieldReader); -impl SW_LDO11SOC_VOUT_SEL_AON_R { - pub(crate) fn new(bits: u8) -> Self { - SW_LDO11SOC_VOUT_SEL_AON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SW_LDO11SOC_VOUT_SEL_AON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sw_ldo11soc_vout_sel_aon` writer - "] -pub struct SW_LDO11SOC_VOUT_SEL_AON_W<'a> { - w: &'a mut W, -} -impl<'a> SW_LDO11SOC_VOUT_SEL_AON_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 16)) | ((value as u32 & 0x0f) << 16); - self.w - } -} -#[doc = "Field `hbn_pu_rc32k` reader - "] -pub struct HBN_PU_RC32K_R(crate::FieldReader); -impl HBN_PU_RC32K_R { - pub(crate) fn new(bits: bool) -> Self { - HBN_PU_RC32K_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for HBN_PU_RC32K_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `hbn_pu_rc32k` writer - "] -pub struct HBN_PU_RC32K_W<'a> { - w: &'a mut W, -} -impl<'a> HBN_PU_RC32K_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w - } -} -#[doc = "Field `hbn_f32k_sel` reader - "] -pub struct HBN_F32K_SEL_R(crate::FieldReader); -impl HBN_F32K_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - HBN_F32K_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for HBN_F32K_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `hbn_f32k_sel` writer - "] -pub struct HBN_F32K_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> HBN_F32K_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 3)) | ((value as u32 & 0x03) << 3); - self.w - } -} -#[doc = "Field `hbn_uart_clk_sel` reader - "] -pub struct HBN_UART_CLK_SEL_R(crate::FieldReader); -impl HBN_UART_CLK_SEL_R { - pub(crate) fn new(bits: bool) -> Self { - HBN_UART_CLK_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for HBN_UART_CLK_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `hbn_uart_clk_sel` writer - "] -pub struct HBN_UART_CLK_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> HBN_UART_CLK_SEL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} #[doc = "Field `hbn_root_clk_sel` reader - "] -pub struct HBN_ROOT_CLK_SEL_R(crate::FieldReader); -impl HBN_ROOT_CLK_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - HBN_ROOT_CLK_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for HBN_ROOT_CLK_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type HBN_ROOT_CLK_SEL_R = crate::FieldReader; #[doc = "Field `hbn_root_clk_sel` writer - "] -pub struct HBN_ROOT_CLK_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> HBN_ROOT_CLK_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w - } -} +pub type HBN_ROOT_CLK_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, HBN_GLB_SPEC, u8, u8, 2, O>; +#[doc = "Field `hbn_uart_clk_sel` reader - "] +pub type HBN_UART_CLK_SEL_R = crate::BitReader; +#[doc = "Field `hbn_uart_clk_sel` writer - "] +pub type HBN_UART_CLK_SEL_W<'a, const O: u8> = crate::BitWriter<'a, u32, HBN_GLB_SPEC, bool, O>; +#[doc = "Field `hbn_f32k_sel` reader - "] +pub type HBN_F32K_SEL_R = crate::FieldReader; +#[doc = "Field `hbn_f32k_sel` writer - "] +pub type HBN_F32K_SEL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, HBN_GLB_SPEC, u8, u8, 2, O>; +#[doc = "Field `hbn_pu_rc32k` reader - "] +pub type HBN_PU_RC32K_R = crate::BitReader; +#[doc = "Field `hbn_pu_rc32k` writer - "] +pub type HBN_PU_RC32K_W<'a, const O: u8> = crate::BitWriter<'a, u32, HBN_GLB_SPEC, bool, O>; +#[doc = "Field `sw_ldo11soc_vout_sel_aon` reader - "] +pub type SW_LDO11SOC_VOUT_SEL_AON_R = crate::FieldReader; +#[doc = "Field `sw_ldo11soc_vout_sel_aon` writer - "] +pub type SW_LDO11SOC_VOUT_SEL_AON_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, HBN_GLB_SPEC, u8, u8, 4, O>; +#[doc = "Field `sw_ldo11_rt_vout_sel` reader - "] +pub type SW_LDO11_RT_VOUT_SEL_R = crate::FieldReader; +#[doc = "Field `sw_ldo11_rt_vout_sel` writer - "] +pub type SW_LDO11_RT_VOUT_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, HBN_GLB_SPEC, u8, u8, 4, O>; +#[doc = "Field `sw_ldo11_aon_vout_sel` reader - "] +pub type SW_LDO11_AON_VOUT_SEL_R = crate::FieldReader; +#[doc = "Field `sw_ldo11_aon_vout_sel` writer - "] +pub type SW_LDO11_AON_VOUT_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, HBN_GLB_SPEC, u8, u8, 4, O>; impl R { - #[doc = "Bits 28:31"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn sw_ldo11_aon_vout_sel(&self) -> SW_LDO11_AON_VOUT_SEL_R { - SW_LDO11_AON_VOUT_SEL_R::new(((self.bits >> 28) & 0x0f) as u8) + pub fn hbn_root_clk_sel(&self) -> HBN_ROOT_CLK_SEL_R { + HBN_ROOT_CLK_SEL_R::new((self.bits & 3) as u8) } - #[doc = "Bits 24:27"] + #[doc = "Bit 2"] #[inline(always)] - pub fn sw_ldo11_rt_vout_sel(&self) -> SW_LDO11_RT_VOUT_SEL_R { - SW_LDO11_RT_VOUT_SEL_R::new(((self.bits >> 24) & 0x0f) as u8) + pub fn hbn_uart_clk_sel(&self) -> HBN_UART_CLK_SEL_R { + HBN_UART_CLK_SEL_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bits 16:19"] + #[doc = "Bits 3:4"] #[inline(always)] - pub fn sw_ldo11soc_vout_sel_aon(&self) -> SW_LDO11SOC_VOUT_SEL_AON_R { - SW_LDO11SOC_VOUT_SEL_AON_R::new(((self.bits >> 16) & 0x0f) as u8) + pub fn hbn_f32k_sel(&self) -> HBN_F32K_SEL_R { + HBN_F32K_SEL_R::new(((self.bits >> 3) & 3) as u8) } #[doc = "Bit 5"] #[inline(always)] pub fn hbn_pu_rc32k(&self) -> HBN_PU_RC32K_R { - HBN_PU_RC32K_R::new(((self.bits >> 5) & 0x01) != 0) + HBN_PU_RC32K_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bits 3:4"] + #[doc = "Bits 16:19"] #[inline(always)] - pub fn hbn_f32k_sel(&self) -> HBN_F32K_SEL_R { - HBN_F32K_SEL_R::new(((self.bits >> 3) & 0x03) as u8) + pub fn sw_ldo11soc_vout_sel_aon(&self) -> SW_LDO11SOC_VOUT_SEL_AON_R { + SW_LDO11SOC_VOUT_SEL_AON_R::new(((self.bits >> 16) & 0x0f) as u8) } - #[doc = "Bit 2"] + #[doc = "Bits 24:27"] #[inline(always)] - pub fn hbn_uart_clk_sel(&self) -> HBN_UART_CLK_SEL_R { - HBN_UART_CLK_SEL_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn sw_ldo11_rt_vout_sel(&self) -> SW_LDO11_RT_VOUT_SEL_R { + SW_LDO11_RT_VOUT_SEL_R::new(((self.bits >> 24) & 0x0f) as u8) } - #[doc = "Bits 0:1"] + #[doc = "Bits 28:31"] #[inline(always)] - pub fn hbn_root_clk_sel(&self) -> HBN_ROOT_CLK_SEL_R { - HBN_ROOT_CLK_SEL_R::new((self.bits & 0x03) as u8) + pub fn sw_ldo11_aon_vout_sel(&self) -> SW_LDO11_AON_VOUT_SEL_R { + SW_LDO11_AON_VOUT_SEL_R::new(((self.bits >> 28) & 0x0f) as u8) } } impl W { - #[doc = "Bits 28:31"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn sw_ldo11_aon_vout_sel(&mut self) -> SW_LDO11_AON_VOUT_SEL_W { - SW_LDO11_AON_VOUT_SEL_W { w: self } + #[must_use] + pub fn hbn_root_clk_sel(&mut self) -> HBN_ROOT_CLK_SEL_W<0> { + HBN_ROOT_CLK_SEL_W::new(self) } - #[doc = "Bits 24:27"] + #[doc = "Bit 2"] #[inline(always)] - pub fn sw_ldo11_rt_vout_sel(&mut self) -> SW_LDO11_RT_VOUT_SEL_W { - SW_LDO11_RT_VOUT_SEL_W { w: self } + #[must_use] + pub fn hbn_uart_clk_sel(&mut self) -> HBN_UART_CLK_SEL_W<2> { + HBN_UART_CLK_SEL_W::new(self) } - #[doc = "Bits 16:19"] + #[doc = "Bits 3:4"] #[inline(always)] - pub fn sw_ldo11soc_vout_sel_aon(&mut self) -> SW_LDO11SOC_VOUT_SEL_AON_W { - SW_LDO11SOC_VOUT_SEL_AON_W { w: self } + #[must_use] + pub fn hbn_f32k_sel(&mut self) -> HBN_F32K_SEL_W<3> { + HBN_F32K_SEL_W::new(self) } #[doc = "Bit 5"] #[inline(always)] - pub fn hbn_pu_rc32k(&mut self) -> HBN_PU_RC32K_W { - HBN_PU_RC32K_W { w: self } + #[must_use] + pub fn hbn_pu_rc32k(&mut self) -> HBN_PU_RC32K_W<5> { + HBN_PU_RC32K_W::new(self) } - #[doc = "Bits 3:4"] + #[doc = "Bits 16:19"] #[inline(always)] - pub fn hbn_f32k_sel(&mut self) -> HBN_F32K_SEL_W { - HBN_F32K_SEL_W { w: self } + #[must_use] + pub fn sw_ldo11soc_vout_sel_aon(&mut self) -> SW_LDO11SOC_VOUT_SEL_AON_W<16> { + SW_LDO11SOC_VOUT_SEL_AON_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bits 24:27"] #[inline(always)] - pub fn hbn_uart_clk_sel(&mut self) -> HBN_UART_CLK_SEL_W { - HBN_UART_CLK_SEL_W { w: self } + #[must_use] + pub fn sw_ldo11_rt_vout_sel(&mut self) -> SW_LDO11_RT_VOUT_SEL_W<24> { + SW_LDO11_RT_VOUT_SEL_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bits 28:31"] #[inline(always)] - pub fn hbn_root_clk_sel(&mut self) -> HBN_ROOT_CLK_SEL_W { - HBN_ROOT_CLK_SEL_W { w: self } + #[must_use] + pub fn sw_ldo11_aon_vout_sel(&mut self) -> SW_LDO11_AON_VOUT_SEL_W<28> { + SW_LDO11_AON_VOUT_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -325,11 +165,10 @@ impl crate::Readable for HBN_GLB_SPEC { #[doc = "`write(|w| ..)` method takes [hbn_glb::W](W) writer structure"] impl crate::Writable for HBN_GLB_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets HBN_GLB to value 0xaa0a_0020"] impl crate::Resettable for HBN_GLB_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xaa0a_0020 - } + const RESET_VALUE: Self::Ux = 0xaa0a_0020; } diff --git a/src/hbn/hbn_irq_clr.rs b/src/hbn/hbn_irq_clr.rs index 2fbb11e..f3bef02 100644 --- a/src/hbn/hbn_irq_clr.rs +++ b/src/hbn/hbn_irq_clr.rs @@ -13,30 +13,24 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `irq_clr` writer - "] -pub struct IRQ_CLR_W<'a> { - w: &'a mut W, -} -impl<'a> IRQ_CLR_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type IRQ_CLR_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, HBN_IRQ_CLR_SPEC, u32, u32, 32, O>; impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn irq_clr(&mut self) -> IRQ_CLR_W { - IRQ_CLR_W { w: self } + #[must_use] + pub fn irq_clr(&mut self) -> IRQ_CLR_W<0> { + IRQ_CLR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -50,11 +44,10 @@ impl crate::RegisterSpec for HBN_IRQ_CLR_SPEC { #[doc = "`write(|w| ..)` method takes [hbn_irq_clr::W](W) writer structure"] impl crate::Writable for HBN_IRQ_CLR_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets HBN_IRQ_CLR to value 0"] impl crate::Resettable for HBN_IRQ_CLR_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/hbn/hbn_irq_mode.rs b/src/hbn/hbn_irq_mode.rs index 07fb75a..f87033d 100644 --- a/src/hbn/hbn_irq_mode.rs +++ b/src/hbn/hbn_irq_mode.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,379 +28,158 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `pin_wakeup_en` reader - "] -pub struct PIN_WAKEUP_EN_R(crate::FieldReader); -impl PIN_WAKEUP_EN_R { - pub(crate) fn new(bits: bool) -> Self { - PIN_WAKEUP_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PIN_WAKEUP_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pin_wakeup_en` writer - "] -pub struct PIN_WAKEUP_EN_W<'a> { - w: &'a mut W, -} -impl<'a> PIN_WAKEUP_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 27)) | ((value as u32 & 0x01) << 27); - self.w - } -} -#[doc = "Field `pin_wakeup_sel` reader - "] -pub struct PIN_WAKEUP_SEL_R(crate::FieldReader); -impl PIN_WAKEUP_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - PIN_WAKEUP_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PIN_WAKEUP_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pin_wakeup_sel` writer - "] -pub struct PIN_WAKEUP_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> PIN_WAKEUP_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 24)) | ((value as u32 & 0x07) << 24); - self.w - } -} -#[doc = "Field `irq_acomp1_en` reader - "] -pub struct IRQ_ACOMP1_EN_R(crate::FieldReader); -impl IRQ_ACOMP1_EN_R { - pub(crate) fn new(bits: u8) -> Self { - IRQ_ACOMP1_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for IRQ_ACOMP1_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `irq_acomp1_en` writer - "] -pub struct IRQ_ACOMP1_EN_W<'a> { - w: &'a mut W, -} -impl<'a> IRQ_ACOMP1_EN_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 22)) | ((value as u32 & 0x03) << 22); - self.w - } -} -#[doc = "Field `irq_acomp0_en` reader - "] -pub struct IRQ_ACOMP0_EN_R(crate::FieldReader); -impl IRQ_ACOMP0_EN_R { - pub(crate) fn new(bits: u8) -> Self { - IRQ_ACOMP0_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for IRQ_ACOMP0_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `irq_acomp0_en` writer - "] -pub struct IRQ_ACOMP0_EN_W<'a> { - w: &'a mut W, -} -impl<'a> IRQ_ACOMP0_EN_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 20)) | ((value as u32 & 0x03) << 20); - self.w - } -} -#[doc = "Field `irq_bor_en` reader - "] -pub struct IRQ_BOR_EN_R(crate::FieldReader); -impl IRQ_BOR_EN_R { - pub(crate) fn new(bits: bool) -> Self { - IRQ_BOR_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for IRQ_BOR_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `irq_bor_en` writer - "] -pub struct IRQ_BOR_EN_W<'a> { - w: &'a mut W, -} -impl<'a> IRQ_BOR_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18); - self.w - } -} -#[doc = "Field `reg_en_hw_pu_pd` reader - "] -pub struct REG_EN_HW_PU_PD_R(crate::FieldReader); -impl REG_EN_HW_PU_PD_R { - pub(crate) fn new(bits: bool) -> Self { - REG_EN_HW_PU_PD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_EN_HW_PU_PD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_en_hw_pu_pd` writer - "] -pub struct REG_EN_HW_PU_PD_W<'a> { - w: &'a mut W, -} -impl<'a> REG_EN_HW_PU_PD_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `reg_aon_pad_ie_smt` reader - "] -pub struct REG_AON_PAD_IE_SMT_R(crate::FieldReader); -impl REG_AON_PAD_IE_SMT_R { - pub(crate) fn new(bits: bool) -> Self { - REG_AON_PAD_IE_SMT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_AON_PAD_IE_SMT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `reg_aon_pad_ie_smt` writer - "] -pub struct REG_AON_PAD_IE_SMT_W<'a> { - w: &'a mut W, -} -impl<'a> REG_AON_PAD_IE_SMT_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `hbn_pin_wakeup_mask` reader - "] -pub struct HBN_PIN_WAKEUP_MASK_R(crate::FieldReader); -impl HBN_PIN_WAKEUP_MASK_R { - pub(crate) fn new(bits: u8) -> Self { - HBN_PIN_WAKEUP_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for HBN_PIN_WAKEUP_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `hbn_pin_wakeup_mask` writer - "] -pub struct HBN_PIN_WAKEUP_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> HBN_PIN_WAKEUP_MASK_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 3)) | ((value as u32 & 0x03) << 3); - self.w - } -} #[doc = "Field `hbn_pin_wakeup_mode` reader - "] -pub struct HBN_PIN_WAKEUP_MODE_R(crate::FieldReader); -impl HBN_PIN_WAKEUP_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - HBN_PIN_WAKEUP_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for HBN_PIN_WAKEUP_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type HBN_PIN_WAKEUP_MODE_R = crate::FieldReader; #[doc = "Field `hbn_pin_wakeup_mode` writer - "] -pub struct HBN_PIN_WAKEUP_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> HBN_PIN_WAKEUP_MODE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x07) | (value as u32 & 0x07); - self.w - } -} +pub type HBN_PIN_WAKEUP_MODE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, HBN_IRQ_MODE_SPEC, u8, u8, 3, O>; +#[doc = "Field `hbn_pin_wakeup_mask` reader - "] +pub type HBN_PIN_WAKEUP_MASK_R = crate::FieldReader; +#[doc = "Field `hbn_pin_wakeup_mask` writer - "] +pub type HBN_PIN_WAKEUP_MASK_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, HBN_IRQ_MODE_SPEC, u8, u8, 2, O>; +#[doc = "Field `reg_aon_pad_ie_smt` reader - "] +pub type REG_AON_PAD_IE_SMT_R = crate::BitReader; +#[doc = "Field `reg_aon_pad_ie_smt` writer - "] +pub type REG_AON_PAD_IE_SMT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, HBN_IRQ_MODE_SPEC, bool, O>; +#[doc = "Field `reg_en_hw_pu_pd` reader - "] +pub type REG_EN_HW_PU_PD_R = crate::BitReader; +#[doc = "Field `reg_en_hw_pu_pd` writer - "] +pub type REG_EN_HW_PU_PD_W<'a, const O: u8> = crate::BitWriter<'a, u32, HBN_IRQ_MODE_SPEC, bool, O>; +#[doc = "Field `irq_bor_en` reader - "] +pub type IRQ_BOR_EN_R = crate::BitReader; +#[doc = "Field `irq_bor_en` writer - "] +pub type IRQ_BOR_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, HBN_IRQ_MODE_SPEC, bool, O>; +#[doc = "Field `irq_acomp0_en` reader - "] +pub type IRQ_ACOMP0_EN_R = crate::FieldReader; +#[doc = "Field `irq_acomp0_en` writer - "] +pub type IRQ_ACOMP0_EN_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, HBN_IRQ_MODE_SPEC, u8, u8, 2, O>; +#[doc = "Field `irq_acomp1_en` reader - "] +pub type IRQ_ACOMP1_EN_R = crate::FieldReader; +#[doc = "Field `irq_acomp1_en` writer - "] +pub type IRQ_ACOMP1_EN_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, HBN_IRQ_MODE_SPEC, u8, u8, 2, O>; +#[doc = "Field `pin_wakeup_sel` reader - "] +pub type PIN_WAKEUP_SEL_R = crate::FieldReader; +#[doc = "Field `pin_wakeup_sel` writer - "] +pub type PIN_WAKEUP_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, HBN_IRQ_MODE_SPEC, u8, u8, 3, O>; +#[doc = "Field `pin_wakeup_en` reader - "] +pub type PIN_WAKEUP_EN_R = crate::BitReader; +#[doc = "Field `pin_wakeup_en` writer - "] +pub type PIN_WAKEUP_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, HBN_IRQ_MODE_SPEC, bool, O>; impl R { - #[doc = "Bit 27"] + #[doc = "Bits 0:2"] #[inline(always)] - pub fn pin_wakeup_en(&self) -> PIN_WAKEUP_EN_R { - PIN_WAKEUP_EN_R::new(((self.bits >> 27) & 0x01) != 0) + pub fn hbn_pin_wakeup_mode(&self) -> HBN_PIN_WAKEUP_MODE_R { + HBN_PIN_WAKEUP_MODE_R::new((self.bits & 7) as u8) } - #[doc = "Bits 24:26"] + #[doc = "Bits 3:4"] #[inline(always)] - pub fn pin_wakeup_sel(&self) -> PIN_WAKEUP_SEL_R { - PIN_WAKEUP_SEL_R::new(((self.bits >> 24) & 0x07) as u8) + pub fn hbn_pin_wakeup_mask(&self) -> HBN_PIN_WAKEUP_MASK_R { + HBN_PIN_WAKEUP_MASK_R::new(((self.bits >> 3) & 3) as u8) } - #[doc = "Bits 22:23"] + #[doc = "Bit 8"] #[inline(always)] - pub fn irq_acomp1_en(&self) -> IRQ_ACOMP1_EN_R { - IRQ_ACOMP1_EN_R::new(((self.bits >> 22) & 0x03) as u8) + pub fn reg_aon_pad_ie_smt(&self) -> REG_AON_PAD_IE_SMT_R { + REG_AON_PAD_IE_SMT_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bits 20:21"] + #[doc = "Bit 16"] #[inline(always)] - pub fn irq_acomp0_en(&self) -> IRQ_ACOMP0_EN_R { - IRQ_ACOMP0_EN_R::new(((self.bits >> 20) & 0x03) as u8) + pub fn reg_en_hw_pu_pd(&self) -> REG_EN_HW_PU_PD_R { + REG_EN_HW_PU_PD_R::new(((self.bits >> 16) & 1) != 0) } #[doc = "Bit 18"] #[inline(always)] pub fn irq_bor_en(&self) -> IRQ_BOR_EN_R { - IRQ_BOR_EN_R::new(((self.bits >> 18) & 0x01) != 0) + IRQ_BOR_EN_R::new(((self.bits >> 18) & 1) != 0) } - #[doc = "Bit 16"] + #[doc = "Bits 20:21"] #[inline(always)] - pub fn reg_en_hw_pu_pd(&self) -> REG_EN_HW_PU_PD_R { - REG_EN_HW_PU_PD_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn irq_acomp0_en(&self) -> IRQ_ACOMP0_EN_R { + IRQ_ACOMP0_EN_R::new(((self.bits >> 20) & 3) as u8) } - #[doc = "Bit 8"] + #[doc = "Bits 22:23"] #[inline(always)] - pub fn reg_aon_pad_ie_smt(&self) -> REG_AON_PAD_IE_SMT_R { - REG_AON_PAD_IE_SMT_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn irq_acomp1_en(&self) -> IRQ_ACOMP1_EN_R { + IRQ_ACOMP1_EN_R::new(((self.bits >> 22) & 3) as u8) } - #[doc = "Bits 3:4"] + #[doc = "Bits 24:26"] #[inline(always)] - pub fn hbn_pin_wakeup_mask(&self) -> HBN_PIN_WAKEUP_MASK_R { - HBN_PIN_WAKEUP_MASK_R::new(((self.bits >> 3) & 0x03) as u8) + pub fn pin_wakeup_sel(&self) -> PIN_WAKEUP_SEL_R { + PIN_WAKEUP_SEL_R::new(((self.bits >> 24) & 7) as u8) } - #[doc = "Bits 0:2"] + #[doc = "Bit 27"] #[inline(always)] - pub fn hbn_pin_wakeup_mode(&self) -> HBN_PIN_WAKEUP_MODE_R { - HBN_PIN_WAKEUP_MODE_R::new((self.bits & 0x07) as u8) + pub fn pin_wakeup_en(&self) -> PIN_WAKEUP_EN_R { + PIN_WAKEUP_EN_R::new(((self.bits >> 27) & 1) != 0) } } impl W { - #[doc = "Bit 27"] + #[doc = "Bits 0:2"] #[inline(always)] - pub fn pin_wakeup_en(&mut self) -> PIN_WAKEUP_EN_W { - PIN_WAKEUP_EN_W { w: self } + #[must_use] + pub fn hbn_pin_wakeup_mode(&mut self) -> HBN_PIN_WAKEUP_MODE_W<0> { + HBN_PIN_WAKEUP_MODE_W::new(self) } - #[doc = "Bits 24:26"] + #[doc = "Bits 3:4"] #[inline(always)] - pub fn pin_wakeup_sel(&mut self) -> PIN_WAKEUP_SEL_W { - PIN_WAKEUP_SEL_W { w: self } + #[must_use] + pub fn hbn_pin_wakeup_mask(&mut self) -> HBN_PIN_WAKEUP_MASK_W<3> { + HBN_PIN_WAKEUP_MASK_W::new(self) } - #[doc = "Bits 22:23"] + #[doc = "Bit 8"] #[inline(always)] - pub fn irq_acomp1_en(&mut self) -> IRQ_ACOMP1_EN_W { - IRQ_ACOMP1_EN_W { w: self } + #[must_use] + pub fn reg_aon_pad_ie_smt(&mut self) -> REG_AON_PAD_IE_SMT_W<8> { + REG_AON_PAD_IE_SMT_W::new(self) } - #[doc = "Bits 20:21"] + #[doc = "Bit 16"] #[inline(always)] - pub fn irq_acomp0_en(&mut self) -> IRQ_ACOMP0_EN_W { - IRQ_ACOMP0_EN_W { w: self } + #[must_use] + pub fn reg_en_hw_pu_pd(&mut self) -> REG_EN_HW_PU_PD_W<16> { + REG_EN_HW_PU_PD_W::new(self) } #[doc = "Bit 18"] #[inline(always)] - pub fn irq_bor_en(&mut self) -> IRQ_BOR_EN_W { - IRQ_BOR_EN_W { w: self } + #[must_use] + pub fn irq_bor_en(&mut self) -> IRQ_BOR_EN_W<18> { + IRQ_BOR_EN_W::new(self) } - #[doc = "Bit 16"] + #[doc = "Bits 20:21"] #[inline(always)] - pub fn reg_en_hw_pu_pd(&mut self) -> REG_EN_HW_PU_PD_W { - REG_EN_HW_PU_PD_W { w: self } + #[must_use] + pub fn irq_acomp0_en(&mut self) -> IRQ_ACOMP0_EN_W<20> { + IRQ_ACOMP0_EN_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bits 22:23"] #[inline(always)] - pub fn reg_aon_pad_ie_smt(&mut self) -> REG_AON_PAD_IE_SMT_W { - REG_AON_PAD_IE_SMT_W { w: self } + #[must_use] + pub fn irq_acomp1_en(&mut self) -> IRQ_ACOMP1_EN_W<22> { + IRQ_ACOMP1_EN_W::new(self) } - #[doc = "Bits 3:4"] + #[doc = "Bits 24:26"] #[inline(always)] - pub fn hbn_pin_wakeup_mask(&mut self) -> HBN_PIN_WAKEUP_MASK_W { - HBN_PIN_WAKEUP_MASK_W { w: self } + #[must_use] + pub fn pin_wakeup_sel(&mut self) -> PIN_WAKEUP_SEL_W<24> { + PIN_WAKEUP_SEL_W::new(self) } - #[doc = "Bits 0:2"] + #[doc = "Bit 27"] #[inline(always)] - pub fn hbn_pin_wakeup_mode(&mut self) -> HBN_PIN_WAKEUP_MODE_W { - HBN_PIN_WAKEUP_MODE_W { w: self } + #[must_use] + pub fn pin_wakeup_en(&mut self) -> PIN_WAKEUP_EN_W<27> { + PIN_WAKEUP_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -417,11 +197,10 @@ impl crate::Readable for HBN_IRQ_MODE_SPEC { #[doc = "`write(|w| ..)` method takes [hbn_irq_mode::W](W) writer structure"] impl crate::Writable for HBN_IRQ_MODE_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets HBN_IRQ_MODE to value 0x0301_0105"] impl crate::Resettable for HBN_IRQ_MODE_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0301_0105 - } + const RESET_VALUE: Self::Ux = 0x0301_0105; } diff --git a/src/hbn/hbn_irq_stat.rs b/src/hbn/hbn_irq_stat.rs index 82d469f..fc32b1f 100644 --- a/src/hbn/hbn_irq_stat.rs +++ b/src/hbn/hbn_irq_stat.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `irq_stat` reader - "] -pub struct IRQ_STAT_R(crate::FieldReader); -impl IRQ_STAT_R { - pub(crate) fn new(bits: u32) -> Self { - IRQ_STAT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for IRQ_STAT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type IRQ_STAT_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn irq_stat(&self) -> IRQ_STAT_R { - IRQ_STAT_R::new((self.bits & 0xffff_ffff) as u32) + IRQ_STAT_R::new(self.bits) } } #[doc = "HBN_IRQ_STAT.\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 [hbn_irq_stat](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for HBN_IRQ_STAT_SPEC { } #[doc = "`reset()` method sets HBN_IRQ_STAT to value 0"] impl crate::Resettable for HBN_IRQ_STAT_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/hbn/hbn_pir_cfg.rs b/src/hbn/hbn_pir_cfg.rs index 032e1ee..e5ee4a4 100644 --- a/src/hbn/hbn_pir_cfg.rs +++ b/src/hbn/hbn_pir_cfg.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,271 +28,108 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `gpadc_nosync` reader - "] -pub struct GPADC_NOSYNC_R(crate::FieldReader); -impl GPADC_NOSYNC_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_NOSYNC_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_NOSYNC_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_nosync` writer - "] -pub struct GPADC_NOSYNC_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_NOSYNC_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w - } -} -#[doc = "Field `gpadc_cgen` reader - "] -pub struct GPADC_CGEN_R(crate::FieldReader); -impl GPADC_CGEN_R { - pub(crate) fn new(bits: bool) -> Self { - GPADC_CGEN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GPADC_CGEN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gpadc_cgen` writer - "] -pub struct GPADC_CGEN_W<'a> { - w: &'a mut W, -} -impl<'a> GPADC_CGEN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `pir_en` reader - "] -pub struct PIR_EN_R(crate::FieldReader); -impl PIR_EN_R { - pub(crate) fn new(bits: bool) -> Self { - PIR_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PIR_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pir_en` writer - "] -pub struct PIR_EN_W<'a> { - w: &'a mut W, -} -impl<'a> PIR_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7); - self.w - } -} -#[doc = "Field `pir_dis` reader - "] -pub struct PIR_DIS_R(crate::FieldReader); -impl PIR_DIS_R { - pub(crate) fn new(bits: u8) -> Self { - PIR_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PIR_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pir_dis` writer - "] -pub struct PIR_DIS_W<'a> { - w: &'a mut W, -} -impl<'a> PIR_DIS_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 4)) | ((value as u32 & 0x03) << 4); - self.w - } -} -#[doc = "Field `pir_lpf_sel` reader - "] -pub struct PIR_LPF_SEL_R(crate::FieldReader); -impl PIR_LPF_SEL_R { - pub(crate) fn new(bits: bool) -> Self { - PIR_LPF_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PIR_LPF_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pir_lpf_sel` writer - "] -pub struct PIR_LPF_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> PIR_LPF_SEL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} #[doc = "Field `pir_hpf_sel` reader - "] -pub struct PIR_HPF_SEL_R(crate::FieldReader); -impl PIR_HPF_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - PIR_HPF_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PIR_HPF_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PIR_HPF_SEL_R = crate::FieldReader; #[doc = "Field `pir_hpf_sel` writer - "] -pub struct PIR_HPF_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> PIR_HPF_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type PIR_HPF_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, HBN_PIR_CFG_SPEC, u8, u8, 2, O>; +#[doc = "Field `pir_lpf_sel` reader - "] +pub type PIR_LPF_SEL_R = crate::BitReader; +#[doc = "Field `pir_lpf_sel` writer - "] +pub type PIR_LPF_SEL_W<'a, const O: u8> = crate::BitWriter<'a, u32, HBN_PIR_CFG_SPEC, bool, O>; +#[doc = "Field `pir_dis` reader - "] +pub type PIR_DIS_R = crate::FieldReader; +#[doc = "Field `pir_dis` writer - "] +pub type PIR_DIS_W<'a, const O: u8> = crate::FieldWriter<'a, u32, HBN_PIR_CFG_SPEC, u8, u8, 2, O>; +#[doc = "Field `pir_en` reader - "] +pub type PIR_EN_R = crate::BitReader; +#[doc = "Field `pir_en` writer - "] +pub type PIR_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, HBN_PIR_CFG_SPEC, bool, O>; +#[doc = "Field `gpadc_cgen` reader - "] +pub type GPADC_CGEN_R = crate::BitReader; +#[doc = "Field `gpadc_cgen` writer - "] +pub type GPADC_CGEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, HBN_PIR_CFG_SPEC, bool, O>; +#[doc = "Field `gpadc_nosync` reader - "] +pub type GPADC_NOSYNC_R = crate::BitReader; +#[doc = "Field `gpadc_nosync` writer - "] +pub type GPADC_NOSYNC_W<'a, const O: u8> = crate::BitWriter<'a, u32, HBN_PIR_CFG_SPEC, bool, O>; +impl R { + #[doc = "Bits 0:1"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w + pub fn pir_hpf_sel(&self) -> PIR_HPF_SEL_R { + PIR_HPF_SEL_R::new((self.bits & 3) as u8) } -} -impl R { - #[doc = "Bit 9"] + #[doc = "Bit 2"] #[inline(always)] - pub fn gpadc_nosync(&self) -> GPADC_NOSYNC_R { - GPADC_NOSYNC_R::new(((self.bits >> 9) & 0x01) != 0) + pub fn pir_lpf_sel(&self) -> PIR_LPF_SEL_R { + PIR_LPF_SEL_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 8"] + #[doc = "Bits 4:5"] #[inline(always)] - pub fn gpadc_cgen(&self) -> GPADC_CGEN_R { - GPADC_CGEN_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn pir_dis(&self) -> PIR_DIS_R { + PIR_DIS_R::new(((self.bits >> 4) & 3) as u8) } #[doc = "Bit 7"] #[inline(always)] pub fn pir_en(&self) -> PIR_EN_R { - PIR_EN_R::new(((self.bits >> 7) & 0x01) != 0) - } - #[doc = "Bits 4:5"] - #[inline(always)] - pub fn pir_dis(&self) -> PIR_DIS_R { - PIR_DIS_R::new(((self.bits >> 4) & 0x03) as u8) + PIR_EN_R::new(((self.bits >> 7) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bit 8"] #[inline(always)] - pub fn pir_lpf_sel(&self) -> PIR_LPF_SEL_R { - PIR_LPF_SEL_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn gpadc_cgen(&self) -> GPADC_CGEN_R { + GPADC_CGEN_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bits 0:1"] + #[doc = "Bit 9"] #[inline(always)] - pub fn pir_hpf_sel(&self) -> PIR_HPF_SEL_R { - PIR_HPF_SEL_R::new((self.bits & 0x03) as u8) + pub fn gpadc_nosync(&self) -> GPADC_NOSYNC_R { + GPADC_NOSYNC_R::new(((self.bits >> 9) & 1) != 0) } } impl W { - #[doc = "Bit 9"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn gpadc_nosync(&mut self) -> GPADC_NOSYNC_W { - GPADC_NOSYNC_W { w: self } + #[must_use] + pub fn pir_hpf_sel(&mut self) -> PIR_HPF_SEL_W<0> { + PIR_HPF_SEL_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bit 2"] #[inline(always)] - pub fn gpadc_cgen(&mut self) -> GPADC_CGEN_W { - GPADC_CGEN_W { w: self } + #[must_use] + pub fn pir_lpf_sel(&mut self) -> PIR_LPF_SEL_W<2> { + PIR_LPF_SEL_W::new(self) } - #[doc = "Bit 7"] + #[doc = "Bits 4:5"] #[inline(always)] - pub fn pir_en(&mut self) -> PIR_EN_W { - PIR_EN_W { w: self } + #[must_use] + pub fn pir_dis(&mut self) -> PIR_DIS_W<4> { + PIR_DIS_W::new(self) } - #[doc = "Bits 4:5"] + #[doc = "Bit 7"] #[inline(always)] - pub fn pir_dis(&mut self) -> PIR_DIS_W { - PIR_DIS_W { w: self } + #[must_use] + pub fn pir_en(&mut self) -> PIR_EN_W<7> { + PIR_EN_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bit 8"] #[inline(always)] - pub fn pir_lpf_sel(&mut self) -> PIR_LPF_SEL_W { - PIR_LPF_SEL_W { w: self } + #[must_use] + pub fn gpadc_cgen(&mut self) -> GPADC_CGEN_W<8> { + GPADC_CGEN_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bit 9"] #[inline(always)] - pub fn pir_hpf_sel(&mut self) -> PIR_HPF_SEL_W { - PIR_HPF_SEL_W { w: self } + #[must_use] + pub fn gpadc_nosync(&mut self) -> GPADC_NOSYNC_W<9> { + GPADC_NOSYNC_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -309,11 +147,10 @@ impl crate::Readable for HBN_PIR_CFG_SPEC { #[doc = "`write(|w| ..)` method takes [hbn_pir_cfg::W](W) writer structure"] impl crate::Writable for HBN_PIR_CFG_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets HBN_PIR_CFG to value 0"] impl crate::Resettable for HBN_PIR_CFG_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/hbn/hbn_pir_interval.rs b/src/hbn/hbn_pir_interval.rs index 63bfdd7..30f80bc 100644 --- a/src/hbn/hbn_pir_interval.rs +++ b/src/hbn/hbn_pir_interval.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,37 +28,17 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `pir_interval` reader - "] -pub struct PIR_INTERVAL_R(crate::FieldReader); -impl PIR_INTERVAL_R { - pub(crate) fn new(bits: u16) -> Self { - PIR_INTERVAL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PIR_INTERVAL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PIR_INTERVAL_R = crate::FieldReader; #[doc = "Field `pir_interval` writer - "] -pub struct PIR_INTERVAL_W<'a> { - w: &'a mut W, -} -impl<'a> PIR_INTERVAL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x0fff) | (value as u32 & 0x0fff); - self.w - } -} +pub type PIR_INTERVAL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, HBN_PIR_INTERVAL_SPEC, u16, u16, 12, O>; impl R { #[doc = "Bits 0:11"] #[inline(always)] @@ -68,10 +49,12 @@ impl R { impl W { #[doc = "Bits 0:11"] #[inline(always)] - pub fn pir_interval(&mut self) -> PIR_INTERVAL_W { - PIR_INTERVAL_W { w: self } + #[must_use] + pub fn pir_interval(&mut self) -> PIR_INTERVAL_W<0> { + PIR_INTERVAL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for HBN_PIR_INTERVAL_SPEC { #[doc = "`write(|w| ..)` method takes [hbn_pir_interval::W](W) writer structure"] impl crate::Writable for HBN_PIR_INTERVAL_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets HBN_PIR_INTERVAL to value 0x0a3d"] impl crate::Resettable for HBN_PIR_INTERVAL_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0a3d - } + const RESET_VALUE: Self::Ux = 0x0a3d; } diff --git a/src/hbn/hbn_pir_vth.rs b/src/hbn/hbn_pir_vth.rs index d5ec983..ac8d84c 100644 --- a/src/hbn/hbn_pir_vth.rs +++ b/src/hbn/hbn_pir_vth.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,37 +28,17 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `pir_vth` reader - "] -pub struct PIR_VTH_R(crate::FieldReader); -impl PIR_VTH_R { - pub(crate) fn new(bits: u16) -> Self { - PIR_VTH_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PIR_VTH_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PIR_VTH_R = crate::FieldReader; #[doc = "Field `pir_vth` writer - "] -pub struct PIR_VTH_W<'a> { - w: &'a mut W, -} -impl<'a> PIR_VTH_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x3fff) | (value as u32 & 0x3fff); - self.w - } -} +pub type PIR_VTH_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, HBN_PIR_VTH_SPEC, u16, u16, 14, O>; impl R { #[doc = "Bits 0:13"] #[inline(always)] @@ -68,10 +49,12 @@ impl R { impl W { #[doc = "Bits 0:13"] #[inline(always)] - pub fn pir_vth(&mut self) -> PIR_VTH_W { - PIR_VTH_W { w: self } + #[must_use] + pub fn pir_vth(&mut self) -> PIR_VTH_W<0> { + PIR_VTH_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for HBN_PIR_VTH_SPEC { #[doc = "`write(|w| ..)` method takes [hbn_pir_vth::W](W) writer structure"] impl crate::Writable for HBN_PIR_VTH_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets HBN_PIR_VTH to value 0x03ff"] impl crate::Resettable for HBN_PIR_VTH_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x03ff - } + const RESET_VALUE: Self::Ux = 0x03ff; } diff --git a/src/hbn/hbn_rsv0.rs b/src/hbn/hbn_rsv0.rs index 24c9a4c..3589661 100644 --- a/src/hbn/hbn_rsv0.rs +++ b/src/hbn/hbn_rsv0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,32 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `HBN_RSV0` reader - "] -pub struct HBN_RSV0_R(crate::FieldReader); -impl HBN_RSV0_R { - pub(crate) fn new(bits: u32) -> Self { - HBN_RSV0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for HBN_RSV0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type HBN_RSV0_R = crate::FieldReader; #[doc = "Field `HBN_RSV0` writer - "] -pub struct HBN_RSV0_W<'a> { - w: &'a mut W, -} -impl<'a> HBN_RSV0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type HBN_RSV0_W<'a, const O: u8> = crate::FieldWriter<'a, u32, HBN_RSV0_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn hbn_rsv0(&self) -> HBN_RSV0_R { - HBN_RSV0_R::new((self.bits & 0xffff_ffff) as u32) + HBN_RSV0_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn hbn_rsv0(&mut self) -> HBN_RSV0_W { - HBN_RSV0_W { w: self } + #[must_use] + pub fn hbn_rsv0(&mut self) -> HBN_RSV0_W<0> { + HBN_RSV0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +71,10 @@ impl crate::Readable for HBN_RSV0_SPEC { #[doc = "`write(|w| ..)` method takes [hbn_rsv0::W](W) writer structure"] impl crate::Writable for HBN_RSV0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets HBN_RSV0 to value 0"] impl crate::Resettable for HBN_RSV0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/hbn/hbn_rsv1.rs b/src/hbn/hbn_rsv1.rs index 6a4266d..46f2b8f 100644 --- a/src/hbn/hbn_rsv1.rs +++ b/src/hbn/hbn_rsv1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,32 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `HBN_RSV1` reader - "] -pub struct HBN_RSV1_R(crate::FieldReader); -impl HBN_RSV1_R { - pub(crate) fn new(bits: u32) -> Self { - HBN_RSV1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for HBN_RSV1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type HBN_RSV1_R = crate::FieldReader; #[doc = "Field `HBN_RSV1` writer - "] -pub struct HBN_RSV1_W<'a> { - w: &'a mut W, -} -impl<'a> HBN_RSV1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type HBN_RSV1_W<'a, const O: u8> = crate::FieldWriter<'a, u32, HBN_RSV1_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn hbn_rsv1(&self) -> HBN_RSV1_R { - HBN_RSV1_R::new((self.bits & 0xffff_ffff) as u32) + HBN_RSV1_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn hbn_rsv1(&mut self) -> HBN_RSV1_W { - HBN_RSV1_W { w: self } + #[must_use] + pub fn hbn_rsv1(&mut self) -> HBN_RSV1_W<0> { + HBN_RSV1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +71,10 @@ impl crate::Readable for HBN_RSV1_SPEC { #[doc = "`write(|w| ..)` method takes [hbn_rsv1::W](W) writer structure"] impl crate::Writable for HBN_RSV1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets HBN_RSV1 to value 0xffff_ffff"] impl crate::Resettable for HBN_RSV1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xffff_ffff - } + const RESET_VALUE: Self::Ux = 0xffff_ffff; } diff --git a/src/hbn/hbn_rsv2.rs b/src/hbn/hbn_rsv2.rs index de4e1ac..9bf8832 100644 --- a/src/hbn/hbn_rsv2.rs +++ b/src/hbn/hbn_rsv2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,32 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `HBN_RSV2` reader - "] -pub struct HBN_RSV2_R(crate::FieldReader); -impl HBN_RSV2_R { - pub(crate) fn new(bits: u32) -> Self { - HBN_RSV2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for HBN_RSV2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type HBN_RSV2_R = crate::FieldReader; #[doc = "Field `HBN_RSV2` writer - "] -pub struct HBN_RSV2_W<'a> { - w: &'a mut W, -} -impl<'a> HBN_RSV2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type HBN_RSV2_W<'a, const O: u8> = crate::FieldWriter<'a, u32, HBN_RSV2_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn hbn_rsv2(&self) -> HBN_RSV2_R { - HBN_RSV2_R::new((self.bits & 0xffff_ffff) as u32) + HBN_RSV2_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn hbn_rsv2(&mut self) -> HBN_RSV2_W { - HBN_RSV2_W { w: self } + #[must_use] + pub fn hbn_rsv2(&mut self) -> HBN_RSV2_W<0> { + HBN_RSV2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +71,10 @@ impl crate::Readable for HBN_RSV2_SPEC { #[doc = "`write(|w| ..)` method takes [hbn_rsv2::W](W) writer structure"] impl crate::Writable for HBN_RSV2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets HBN_RSV2 to value 0"] impl crate::Resettable for HBN_RSV2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/hbn/hbn_rsv3.rs b/src/hbn/hbn_rsv3.rs index 4d21e63..d728325 100644 --- a/src/hbn/hbn_rsv3.rs +++ b/src/hbn/hbn_rsv3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,32 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `HBN_RSV3` reader - "] -pub struct HBN_RSV3_R(crate::FieldReader); -impl HBN_RSV3_R { - pub(crate) fn new(bits: u32) -> Self { - HBN_RSV3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for HBN_RSV3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type HBN_RSV3_R = crate::FieldReader; #[doc = "Field `HBN_RSV3` writer - "] -pub struct HBN_RSV3_W<'a> { - w: &'a mut W, -} -impl<'a> HBN_RSV3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type HBN_RSV3_W<'a, const O: u8> = crate::FieldWriter<'a, u32, HBN_RSV3_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn hbn_rsv3(&self) -> HBN_RSV3_R { - HBN_RSV3_R::new((self.bits & 0xffff_ffff) as u32) + HBN_RSV3_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn hbn_rsv3(&mut self) -> HBN_RSV3_W { - HBN_RSV3_W { w: self } + #[must_use] + pub fn hbn_rsv3(&mut self) -> HBN_RSV3_W<0> { + HBN_RSV3_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +71,10 @@ impl crate::Readable for HBN_RSV3_SPEC { #[doc = "`write(|w| ..)` method takes [hbn_rsv3::W](W) writer structure"] impl crate::Writable for HBN_RSV3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets HBN_RSV3 to value 0xffff_ffff"] impl crate::Resettable for HBN_RSV3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xffff_ffff - } + const RESET_VALUE: Self::Ux = 0xffff_ffff; } diff --git a/src/hbn/hbn_sram.rs b/src/hbn/hbn_sram.rs index 102a7b8..6a49f93 100644 --- a/src/hbn/hbn_sram.rs +++ b/src/hbn/hbn_sram.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,107 +28,47 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `retram_slp` reader - "] -pub struct RETRAM_SLP_R(crate::FieldReader); -impl RETRAM_SLP_R { - pub(crate) fn new(bits: bool) -> Self { - RETRAM_SLP_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RETRAM_SLP_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `retram_slp` writer - "] -pub struct RETRAM_SLP_W<'a> { - w: &'a mut W, -} -impl<'a> RETRAM_SLP_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7); - self.w - } -} #[doc = "Field `retram_ret` reader - "] -pub struct RETRAM_RET_R(crate::FieldReader); -impl RETRAM_RET_R { - pub(crate) fn new(bits: bool) -> Self { - RETRAM_RET_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RETRAM_RET_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RETRAM_RET_R = crate::BitReader; #[doc = "Field `retram_ret` writer - "] -pub struct RETRAM_RET_W<'a> { - w: &'a mut W, -} -impl<'a> RETRAM_RET_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type RETRAM_RET_W<'a, const O: u8> = crate::BitWriter<'a, u32, HBN_SRAM_SPEC, bool, O>; +#[doc = "Field `retram_slp` reader - "] +pub type RETRAM_SLP_R = crate::BitReader; +#[doc = "Field `retram_slp` writer - "] +pub type RETRAM_SLP_W<'a, const O: u8> = crate::BitWriter<'a, u32, HBN_SRAM_SPEC, bool, O>; +impl R { + #[doc = "Bit 6"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w + pub fn retram_ret(&self) -> RETRAM_RET_R { + RETRAM_RET_R::new(((self.bits >> 6) & 1) != 0) } -} -impl R { #[doc = "Bit 7"] #[inline(always)] pub fn retram_slp(&self) -> RETRAM_SLP_R { - RETRAM_SLP_R::new(((self.bits >> 7) & 0x01) != 0) - } - #[doc = "Bit 6"] - #[inline(always)] - pub fn retram_ret(&self) -> RETRAM_RET_R { - RETRAM_RET_R::new(((self.bits >> 6) & 0x01) != 0) + RETRAM_SLP_R::new(((self.bits >> 7) & 1) != 0) } } impl W { - #[doc = "Bit 7"] + #[doc = "Bit 6"] #[inline(always)] - pub fn retram_slp(&mut self) -> RETRAM_SLP_W { - RETRAM_SLP_W { w: self } + #[must_use] + pub fn retram_ret(&mut self) -> RETRAM_RET_W<6> { + RETRAM_RET_W::new(self) } - #[doc = "Bit 6"] + #[doc = "Bit 7"] #[inline(always)] - pub fn retram_ret(&mut self) -> RETRAM_RET_W { - RETRAM_RET_W { w: self } + #[must_use] + pub fn retram_slp(&mut self) -> RETRAM_SLP_W<7> { + RETRAM_SLP_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -145,11 +86,10 @@ impl crate::Readable for HBN_SRAM_SPEC { #[doc = "`write(|w| ..)` method takes [hbn_sram::W](W) writer structure"] impl crate::Writable for HBN_SRAM_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets HBN_SRAM to value 0"] impl crate::Resettable for HBN_SRAM_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/hbn/hbn_time_h.rs b/src/hbn/hbn_time_h.rs index 521c778..51067c5 100644 --- a/src/hbn/hbn_time_h.rs +++ b/src/hbn/hbn_time_h.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,37 +28,16 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `hbn_time_h` reader - "] -pub struct HBN_TIME_H_R(crate::FieldReader); -impl HBN_TIME_H_R { - pub(crate) fn new(bits: u8) -> Self { - HBN_TIME_H_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for HBN_TIME_H_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type HBN_TIME_H_R = crate::FieldReader; #[doc = "Field `hbn_time_h` writer - "] -pub struct HBN_TIME_H_W<'a> { - w: &'a mut W, -} -impl<'a> HBN_TIME_H_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff); - self.w - } -} +pub type HBN_TIME_H_W<'a, const O: u8> = crate::FieldWriter<'a, u32, HBN_TIME_H_SPEC, u8, u8, 8, O>; impl R { #[doc = "Bits 0:7"] #[inline(always)] @@ -68,10 +48,12 @@ impl R { impl W { #[doc = "Bits 0:7"] #[inline(always)] - pub fn hbn_time_h(&mut self) -> HBN_TIME_H_W { - HBN_TIME_H_W { w: self } + #[must_use] + pub fn hbn_time_h(&mut self) -> HBN_TIME_H_W<0> { + HBN_TIME_H_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +71,10 @@ impl crate::Readable for HBN_TIME_H_SPEC { #[doc = "`write(|w| ..)` method takes [hbn_time_h::W](W) writer structure"] impl crate::Writable for HBN_TIME_H_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets HBN_TIME_H to value 0"] impl crate::Resettable for HBN_TIME_H_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/hbn/hbn_time_l.rs b/src/hbn/hbn_time_l.rs index 20b3a99..af50e2d 100644 --- a/src/hbn/hbn_time_l.rs +++ b/src/hbn/hbn_time_l.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `hbn_time_l` reader - "] -pub struct HBN_TIME_L_R(crate::FieldReader); -impl HBN_TIME_L_R { - pub(crate) fn new(bits: u32) -> Self { - HBN_TIME_L_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for HBN_TIME_L_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type HBN_TIME_L_R = crate::FieldReader; #[doc = "Field `hbn_time_l` writer - "] -pub struct HBN_TIME_L_W<'a> { - w: &'a mut W, -} -impl<'a> HBN_TIME_L_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type HBN_TIME_L_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, HBN_TIME_L_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn hbn_time_l(&self) -> HBN_TIME_L_R { - HBN_TIME_L_R::new((self.bits & 0xffff_ffff) as u32) + HBN_TIME_L_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn hbn_time_l(&mut self) -> HBN_TIME_L_W { - HBN_TIME_L_W { w: self } + #[must_use] + pub fn hbn_time_l(&mut self) -> HBN_TIME_L_W<0> { + HBN_TIME_L_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for HBN_TIME_L_SPEC { #[doc = "`write(|w| ..)` method takes [hbn_time_l::W](W) writer structure"] impl crate::Writable for HBN_TIME_L_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets HBN_TIME_L to value 0"] impl crate::Resettable for HBN_TIME_L_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/hbn/rc32k_ctrl0.rs b/src/hbn/rc32k_ctrl0.rs index 85f8ed3..91af3b3 100644 --- a/src/hbn/rc32k_ctrl0.rs +++ b/src/hbn/rc32k_ctrl0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,356 +28,146 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rc32k_code_fr_ext` reader - "] -pub struct RC32K_CODE_FR_EXT_R(crate::FieldReader); -impl RC32K_CODE_FR_EXT_R { - pub(crate) fn new(bits: u16) -> Self { - RC32K_CODE_FR_EXT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RC32K_CODE_FR_EXT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rc32k_code_fr_ext` writer - "] -pub struct RC32K_CODE_FR_EXT_W<'a> { - w: &'a mut W, -} -impl<'a> RC32K_CODE_FR_EXT_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03ff << 22)) | ((value as u32 & 0x03ff) << 22); - self.w - } -} -#[doc = "Field `rc32k_cal_en` reader - "] -pub struct RC32K_CAL_EN_R(crate::FieldReader); -impl RC32K_CAL_EN_R { - pub(crate) fn new(bits: bool) -> Self { - RC32K_CAL_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RC32K_CAL_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rc32k_cal_en` writer - "] -pub struct RC32K_CAL_EN_W<'a> { - w: &'a mut W, -} -impl<'a> RC32K_CAL_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w - } -} -#[doc = "Field `rc32k_ext_code_en` reader - "] -pub struct RC32K_EXT_CODE_EN_R(crate::FieldReader); -impl RC32K_EXT_CODE_EN_R { - pub(crate) fn new(bits: bool) -> Self { - RC32K_EXT_CODE_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RC32K_EXT_CODE_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rc32k_ext_code_en` writer - "] -pub struct RC32K_EXT_CODE_EN_W<'a> { - w: &'a mut W, -} -impl<'a> RC32K_EXT_CODE_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 19)) | ((value as u32 & 0x01) << 19); - self.w - } -} -#[doc = "Field `rc32k_allow_cal` reader - "] -pub struct RC32K_ALLOW_CAL_R(crate::FieldReader); -impl RC32K_ALLOW_CAL_R { - pub(crate) fn new(bits: bool) -> Self { - RC32K_ALLOW_CAL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RC32K_ALLOW_CAL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rc32k_allow_cal` writer - "] -pub struct RC32K_ALLOW_CAL_W<'a> { - w: &'a mut W, -} -impl<'a> RC32K_ALLOW_CAL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18); - self.w - } -} -#[doc = "Field `rc32k_vref_dly` reader - "] -pub struct RC32K_VREF_DLY_R(crate::FieldReader); -impl RC32K_VREF_DLY_R { - pub(crate) fn new(bits: u8) -> Self { - RC32K_VREF_DLY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RC32K_VREF_DLY_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rc32k_vref_dly` writer - "] -pub struct RC32K_VREF_DLY_W<'a> { - w: &'a mut W, -} -impl<'a> RC32K_VREF_DLY_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 16)) | ((value as u32 & 0x03) << 16); - self.w - } -} -#[doc = "Field `rc32k_dig_code_fr_cal` reader - "] -pub struct RC32K_DIG_CODE_FR_CAL_R(crate::FieldReader); -impl RC32K_DIG_CODE_FR_CAL_R { - pub(crate) fn new(bits: u16) -> Self { - RC32K_DIG_CODE_FR_CAL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RC32K_DIG_CODE_FR_CAL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rc32k_cal_precharge` reader - "] -pub struct RC32K_CAL_PRECHARGE_R(crate::FieldReader); -impl RC32K_CAL_PRECHARGE_R { - pub(crate) fn new(bits: bool) -> Self { - RC32K_CAL_PRECHARGE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RC32K_CAL_PRECHARGE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +#[doc = "Field `rc32k_cal_done` reader - "] +pub type RC32K_CAL_DONE_R = crate::BitReader; +#[doc = "Field `rc32k_rdy` reader - "] +pub type RC32K_RDY_R = crate::BitReader; +#[doc = "Field `rc32k_cal_inprogress` reader - "] +pub type RC32K_CAL_INPROGRESS_R = crate::BitReader; #[doc = "Field `rc32k_cal_div` reader - "] -pub struct RC32K_CAL_DIV_R(crate::FieldReader); -impl RC32K_CAL_DIV_R { - pub(crate) fn new(bits: u8) -> Self { - RC32K_CAL_DIV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RC32K_CAL_DIV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RC32K_CAL_DIV_R = crate::FieldReader; #[doc = "Field `rc32k_cal_div` writer - "] -pub struct RC32K_CAL_DIV_W<'a> { - w: &'a mut W, -} -impl<'a> RC32K_CAL_DIV_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 3)) | ((value as u32 & 0x03) << 3); - self.w - } -} -#[doc = "Field `rc32k_cal_inprogress` reader - "] -pub struct RC32K_CAL_INPROGRESS_R(crate::FieldReader); -impl RC32K_CAL_INPROGRESS_R { - pub(crate) fn new(bits: bool) -> Self { - RC32K_CAL_INPROGRESS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RC32K_CAL_INPROGRESS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rc32k_rdy` reader - "] -pub struct RC32K_RDY_R(crate::FieldReader); -impl RC32K_RDY_R { - pub(crate) fn new(bits: bool) -> Self { - RC32K_RDY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RC32K_RDY_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rc32k_cal_done` reader - "] -pub struct RC32K_CAL_DONE_R(crate::FieldReader); -impl RC32K_CAL_DONE_R { - pub(crate) fn new(bits: bool) -> Self { - RC32K_CAL_DONE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RC32K_CAL_DONE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RC32K_CAL_DIV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RC32K_CTRL0_SPEC, u8, u8, 2, O>; +#[doc = "Field `rc32k_cal_precharge` reader - "] +pub type RC32K_CAL_PRECHARGE_R = crate::BitReader; +#[doc = "Field `rc32k_dig_code_fr_cal` reader - "] +pub type RC32K_DIG_CODE_FR_CAL_R = crate::FieldReader; +#[doc = "Field `rc32k_vref_dly` reader - "] +pub type RC32K_VREF_DLY_R = crate::FieldReader; +#[doc = "Field `rc32k_vref_dly` writer - "] +pub type RC32K_VREF_DLY_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RC32K_CTRL0_SPEC, u8, u8, 2, O>; +#[doc = "Field `rc32k_allow_cal` reader - "] +pub type RC32K_ALLOW_CAL_R = crate::BitReader; +#[doc = "Field `rc32k_allow_cal` writer - "] +pub type RC32K_ALLOW_CAL_W<'a, const O: u8> = crate::BitWriter<'a, u32, RC32K_CTRL0_SPEC, bool, O>; +#[doc = "Field `rc32k_ext_code_en` reader - "] +pub type RC32K_EXT_CODE_EN_R = crate::BitReader; +#[doc = "Field `rc32k_ext_code_en` writer - "] +pub type RC32K_EXT_CODE_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RC32K_CTRL0_SPEC, bool, O>; +#[doc = "Field `rc32k_cal_en` reader - "] +pub type RC32K_CAL_EN_R = crate::BitReader; +#[doc = "Field `rc32k_cal_en` writer - "] +pub type RC32K_CAL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RC32K_CTRL0_SPEC, bool, O>; +#[doc = "Field `rc32k_code_fr_ext` reader - "] +pub type RC32K_CODE_FR_EXT_R = crate::FieldReader; +#[doc = "Field `rc32k_code_fr_ext` writer - "] +pub type RC32K_CODE_FR_EXT_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RC32K_CTRL0_SPEC, u16, u16, 10, O>; impl R { - #[doc = "Bits 22:31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn rc32k_code_fr_ext(&self) -> RC32K_CODE_FR_EXT_R { - RC32K_CODE_FR_EXT_R::new(((self.bits >> 22) & 0x03ff) as u16) + pub fn rc32k_cal_done(&self) -> RC32K_CAL_DONE_R { + RC32K_CAL_DONE_R::new((self.bits & 1) != 0) } - #[doc = "Bit 20"] + #[doc = "Bit 1"] #[inline(always)] - pub fn rc32k_cal_en(&self) -> RC32K_CAL_EN_R { - RC32K_CAL_EN_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn rc32k_rdy(&self) -> RC32K_RDY_R { + RC32K_RDY_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 19"] + #[doc = "Bit 2"] #[inline(always)] - pub fn rc32k_ext_code_en(&self) -> RC32K_EXT_CODE_EN_R { - RC32K_EXT_CODE_EN_R::new(((self.bits >> 19) & 0x01) != 0) + pub fn rc32k_cal_inprogress(&self) -> RC32K_CAL_INPROGRESS_R { + RC32K_CAL_INPROGRESS_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 18"] + #[doc = "Bits 3:4"] #[inline(always)] - pub fn rc32k_allow_cal(&self) -> RC32K_ALLOW_CAL_R { - RC32K_ALLOW_CAL_R::new(((self.bits >> 18) & 0x01) != 0) + pub fn rc32k_cal_div(&self) -> RC32K_CAL_DIV_R { + RC32K_CAL_DIV_R::new(((self.bits >> 3) & 3) as u8) } - #[doc = "Bits 16:17"] + #[doc = "Bit 5"] #[inline(always)] - pub fn rc32k_vref_dly(&self) -> RC32K_VREF_DLY_R { - RC32K_VREF_DLY_R::new(((self.bits >> 16) & 0x03) as u8) + pub fn rc32k_cal_precharge(&self) -> RC32K_CAL_PRECHARGE_R { + RC32K_CAL_PRECHARGE_R::new(((self.bits >> 5) & 1) != 0) } #[doc = "Bits 6:15"] #[inline(always)] pub fn rc32k_dig_code_fr_cal(&self) -> RC32K_DIG_CODE_FR_CAL_R { RC32K_DIG_CODE_FR_CAL_R::new(((self.bits >> 6) & 0x03ff) as u16) } - #[doc = "Bit 5"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn rc32k_cal_precharge(&self) -> RC32K_CAL_PRECHARGE_R { - RC32K_CAL_PRECHARGE_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn rc32k_vref_dly(&self) -> RC32K_VREF_DLY_R { + RC32K_VREF_DLY_R::new(((self.bits >> 16) & 3) as u8) } - #[doc = "Bits 3:4"] + #[doc = "Bit 18"] #[inline(always)] - pub fn rc32k_cal_div(&self) -> RC32K_CAL_DIV_R { - RC32K_CAL_DIV_R::new(((self.bits >> 3) & 0x03) as u8) + pub fn rc32k_allow_cal(&self) -> RC32K_ALLOW_CAL_R { + RC32K_ALLOW_CAL_R::new(((self.bits >> 18) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bit 19"] #[inline(always)] - pub fn rc32k_cal_inprogress(&self) -> RC32K_CAL_INPROGRESS_R { - RC32K_CAL_INPROGRESS_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn rc32k_ext_code_en(&self) -> RC32K_EXT_CODE_EN_R { + RC32K_EXT_CODE_EN_R::new(((self.bits >> 19) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 20"] #[inline(always)] - pub fn rc32k_rdy(&self) -> RC32K_RDY_R { - RC32K_RDY_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn rc32k_cal_en(&self) -> RC32K_CAL_EN_R { + RC32K_CAL_EN_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bits 22:31"] #[inline(always)] - pub fn rc32k_cal_done(&self) -> RC32K_CAL_DONE_R { - RC32K_CAL_DONE_R::new((self.bits & 0x01) != 0) + pub fn rc32k_code_fr_ext(&self) -> RC32K_CODE_FR_EXT_R { + RC32K_CODE_FR_EXT_R::new(((self.bits >> 22) & 0x03ff) as u16) } } impl W { - #[doc = "Bits 22:31"] + #[doc = "Bits 3:4"] #[inline(always)] - pub fn rc32k_code_fr_ext(&mut self) -> RC32K_CODE_FR_EXT_W { - RC32K_CODE_FR_EXT_W { w: self } + #[must_use] + pub fn rc32k_cal_div(&mut self) -> RC32K_CAL_DIV_W<3> { + RC32K_CAL_DIV_W::new(self) } - #[doc = "Bit 20"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn rc32k_cal_en(&mut self) -> RC32K_CAL_EN_W { - RC32K_CAL_EN_W { w: self } + #[must_use] + pub fn rc32k_vref_dly(&mut self) -> RC32K_VREF_DLY_W<16> { + RC32K_VREF_DLY_W::new(self) } - #[doc = "Bit 19"] + #[doc = "Bit 18"] #[inline(always)] - pub fn rc32k_ext_code_en(&mut self) -> RC32K_EXT_CODE_EN_W { - RC32K_EXT_CODE_EN_W { w: self } + #[must_use] + pub fn rc32k_allow_cal(&mut self) -> RC32K_ALLOW_CAL_W<18> { + RC32K_ALLOW_CAL_W::new(self) } - #[doc = "Bit 18"] + #[doc = "Bit 19"] #[inline(always)] - pub fn rc32k_allow_cal(&mut self) -> RC32K_ALLOW_CAL_W { - RC32K_ALLOW_CAL_W { w: self } + #[must_use] + pub fn rc32k_ext_code_en(&mut self) -> RC32K_EXT_CODE_EN_W<19> { + RC32K_EXT_CODE_EN_W::new(self) } - #[doc = "Bits 16:17"] + #[doc = "Bit 20"] #[inline(always)] - pub fn rc32k_vref_dly(&mut self) -> RC32K_VREF_DLY_W { - RC32K_VREF_DLY_W { w: self } + #[must_use] + pub fn rc32k_cal_en(&mut self) -> RC32K_CAL_EN_W<20> { + RC32K_CAL_EN_W::new(self) } - #[doc = "Bits 3:4"] + #[doc = "Bits 22:31"] #[inline(always)] - pub fn rc32k_cal_div(&mut self) -> RC32K_CAL_DIV_W { - RC32K_CAL_DIV_W { w: self } + #[must_use] + pub fn rc32k_code_fr_ext(&mut self) -> RC32K_CODE_FR_EXT_W<22> { + RC32K_CODE_FR_EXT_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -394,11 +185,10 @@ impl crate::Readable for RC32K_CTRL0_SPEC { #[doc = "`write(|w| ..)` method takes [rc32k_ctrl0::W](W) writer structure"] impl crate::Writable for RC32K_CTRL0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rc32k_ctrl0 to value 0x5008_801b"] impl crate::Resettable for RC32K_CTRL0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x5008_801b - } + const RESET_VALUE: Self::Ux = 0x5008_801b; } diff --git a/src/hbn/rtc_time_h.rs b/src/hbn/rtc_time_h.rs index 1cc885c..7bed2da 100644 --- a/src/hbn/rtc_time_h.rs +++ b/src/hbn/rtc_time_h.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,47 +28,16 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rtc_time_latch` writer - "] -pub struct RTC_TIME_LATCH_W<'a> { - w: &'a mut W, -} -impl<'a> RTC_TIME_LATCH_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 31)) | ((value as u32 & 0x01) << 31); - self.w - } -} #[doc = "Field `rtc_time_latch_h` reader - "] -pub struct RTC_TIME_LATCH_H_R(crate::FieldReader); -impl RTC_TIME_LATCH_H_R { - pub(crate) fn new(bits: u8) -> Self { - RTC_TIME_LATCH_H_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RTC_TIME_LATCH_H_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RTC_TIME_LATCH_H_R = crate::FieldReader; +#[doc = "Field `rtc_time_latch` writer - "] +pub type RTC_TIME_LATCH_W<'a, const O: u8> = crate::BitWriter<'a, u32, RTC_TIME_H_SPEC, bool, O>; impl R { #[doc = "Bits 0:7"] #[inline(always)] @@ -78,10 +48,12 @@ impl R { impl W { #[doc = "Bit 31"] #[inline(always)] - pub fn rtc_time_latch(&mut self) -> RTC_TIME_LATCH_W { - RTC_TIME_LATCH_W { w: self } + #[must_use] + pub fn rtc_time_latch(&mut self) -> RTC_TIME_LATCH_W<31> { + RTC_TIME_LATCH_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -99,11 +71,10 @@ impl crate::Readable for RTC_TIME_H_SPEC { #[doc = "`write(|w| ..)` method takes [rtc_time_h::W](W) writer structure"] impl crate::Writable for RTC_TIME_H_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets RTC_TIME_H to value 0"] impl crate::Resettable for RTC_TIME_H_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/hbn/rtc_time_l.rs b/src/hbn/rtc_time_l.rs index 0609629..0d4a219 100644 --- a/src/hbn/rtc_time_l.rs +++ b/src/hbn/rtc_time_l.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `rtc_time_latch_l` reader - "] -pub struct RTC_TIME_LATCH_L_R(crate::FieldReader); -impl RTC_TIME_LATCH_L_R { - pub(crate) fn new(bits: u32) -> Self { - RTC_TIME_LATCH_L_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RTC_TIME_LATCH_L_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RTC_TIME_LATCH_L_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn rtc_time_latch_l(&self) -> RTC_TIME_LATCH_L_R { - RTC_TIME_LATCH_L_R::new((self.bits & 0xffff_ffff) as u32) + RTC_TIME_LATCH_L_R::new(self.bits) } } #[doc = "RTC_TIME_L.\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 [rtc_time_l](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for RTC_TIME_L_SPEC { } #[doc = "`reset()` method sets RTC_TIME_L to value 0"] impl crate::Resettable for RTC_TIME_L_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/hbn/xtal32k.rs b/src/hbn/xtal32k.rs index f9038ec..f7a214c 100644 --- a/src/hbn/xtal32k.rs +++ b/src/hbn/xtal32k.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,435 +28,170 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `pu_xtal32k` reader - "] -pub struct PU_XTAL32K_R(crate::FieldReader); -impl PU_XTAL32K_R { - pub(crate) fn new(bits: bool) -> Self { - PU_XTAL32K_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_XTAL32K_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_xtal32k` writer - "] -pub struct PU_XTAL32K_W<'a> { - w: &'a mut W, -} -impl<'a> PU_XTAL32K_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 19)) | ((value as u32 & 0x01) << 19); - self.w - } -} -#[doc = "Field `pu_xtal32k_buf` reader - "] -pub struct PU_XTAL32K_BUF_R(crate::FieldReader); -impl PU_XTAL32K_BUF_R { - pub(crate) fn new(bits: bool) -> Self { - PU_XTAL32K_BUF_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_XTAL32K_BUF_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_xtal32k_buf` writer - "] -pub struct PU_XTAL32K_BUF_W<'a> { - w: &'a mut W, -} -impl<'a> PU_XTAL32K_BUF_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18); - self.w - } -} -#[doc = "Field `xtal32k_ac_cap_short` reader - "] -pub struct XTAL32K_AC_CAP_SHORT_R(crate::FieldReader); -impl XTAL32K_AC_CAP_SHORT_R { - pub(crate) fn new(bits: bool) -> Self { - XTAL32K_AC_CAP_SHORT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for XTAL32K_AC_CAP_SHORT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `xtal32k_ac_cap_short` writer - "] -pub struct XTAL32K_AC_CAP_SHORT_W<'a> { - w: &'a mut W, -} -impl<'a> XTAL32K_AC_CAP_SHORT_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w - } -} -#[doc = "Field `xtal32k_capbank` reader - "] -pub struct XTAL32K_CAPBANK_R(crate::FieldReader); -impl XTAL32K_CAPBANK_R { - pub(crate) fn new(bits: u8) -> Self { - XTAL32K_CAPBANK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for XTAL32K_CAPBANK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `xtal32k_capbank` writer - "] -pub struct XTAL32K_CAPBANK_W<'a> { - w: &'a mut W, -} -impl<'a> XTAL32K_CAPBANK_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 11)) | ((value as u32 & 0x3f) << 11); - self.w - } -} -#[doc = "Field `xtal32k_inv_stre` reader - "] -pub struct XTAL32K_INV_STRE_R(crate::FieldReader); -impl XTAL32K_INV_STRE_R { - pub(crate) fn new(bits: u8) -> Self { - XTAL32K_INV_STRE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for XTAL32K_INV_STRE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `xtal32k_inv_stre` writer - "] -pub struct XTAL32K_INV_STRE_W<'a> { - w: &'a mut W, -} -impl<'a> XTAL32K_INV_STRE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 9)) | ((value as u32 & 0x03) << 9); - self.w - } -} -#[doc = "Field `xtal32k_otf_short` reader - "] -pub struct XTAL32K_OTF_SHORT_R(crate::FieldReader); -impl XTAL32K_OTF_SHORT_R { - pub(crate) fn new(bits: bool) -> Self { - XTAL32K_OTF_SHORT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for XTAL32K_OTF_SHORT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `xtal32k_otf_short` writer - "] -pub struct XTAL32K_OTF_SHORT_W<'a> { - w: &'a mut W, -} -impl<'a> XTAL32K_OTF_SHORT_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `xtal32k_outbuf_stre` reader - "] -pub struct XTAL32K_OUTBUF_STRE_R(crate::FieldReader); -impl XTAL32K_OUTBUF_STRE_R { - pub(crate) fn new(bits: bool) -> Self { - XTAL32K_OUTBUF_STRE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for XTAL32K_OUTBUF_STRE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `xtal32k_outbuf_stre` writer - "] -pub struct XTAL32K_OUTBUF_STRE_W<'a> { - w: &'a mut W, -} -impl<'a> XTAL32K_OUTBUF_STRE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7); - self.w - } -} -#[doc = "Field `xtal32k_reg` reader - "] -pub struct XTAL32K_REG_R(crate::FieldReader); -impl XTAL32K_REG_R { - pub(crate) fn new(bits: u8) -> Self { - XTAL32K_REG_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for XTAL32K_REG_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `xtal32k_reg` writer - "] -pub struct XTAL32K_REG_W<'a> { - w: &'a mut W, -} -impl<'a> XTAL32K_REG_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 5)) | ((value as u32 & 0x03) << 5); - self.w - } -} -#[doc = "Field `xtal32k_amp_ctrl` reader - "] -pub struct XTAL32K_AMP_CTRL_R(crate::FieldReader); -impl XTAL32K_AMP_CTRL_R { - pub(crate) fn new(bits: u8) -> Self { - XTAL32K_AMP_CTRL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for XTAL32K_AMP_CTRL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `xtal32k_amp_ctrl` writer - "] -pub struct XTAL32K_AMP_CTRL_W<'a> { - w: &'a mut W, -} -impl<'a> XTAL32K_AMP_CTRL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 3)) | ((value as u32 & 0x03) << 3); - self.w - } -} #[doc = "Field `xtal32k_ext_sel` reader - "] -pub struct XTAL32K_EXT_SEL_R(crate::FieldReader); -impl XTAL32K_EXT_SEL_R { - pub(crate) fn new(bits: bool) -> Self { - XTAL32K_EXT_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for XTAL32K_EXT_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type XTAL32K_EXT_SEL_R = crate::BitReader; #[doc = "Field `xtal32k_ext_sel` writer - "] -pub struct XTAL32K_EXT_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> XTAL32K_EXT_SEL_W<'a> { - #[doc = r"Sets the field bit"] +pub type XTAL32K_EXT_SEL_W<'a, const O: u8> = crate::BitWriter<'a, u32, XTAL32K_SPEC, bool, O>; +#[doc = "Field `xtal32k_amp_ctrl` reader - "] +pub type XTAL32K_AMP_CTRL_R = crate::FieldReader; +#[doc = "Field `xtal32k_amp_ctrl` writer - "] +pub type XTAL32K_AMP_CTRL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, XTAL32K_SPEC, u8, u8, 2, O>; +#[doc = "Field `xtal32k_reg` reader - "] +pub type XTAL32K_REG_R = crate::FieldReader; +#[doc = "Field `xtal32k_reg` writer - "] +pub type XTAL32K_REG_W<'a, const O: u8> = crate::FieldWriter<'a, u32, XTAL32K_SPEC, u8, u8, 2, O>; +#[doc = "Field `xtal32k_outbuf_stre` reader - "] +pub type XTAL32K_OUTBUF_STRE_R = crate::BitReader; +#[doc = "Field `xtal32k_outbuf_stre` writer - "] +pub type XTAL32K_OUTBUF_STRE_W<'a, const O: u8> = crate::BitWriter<'a, u32, XTAL32K_SPEC, bool, O>; +#[doc = "Field `xtal32k_otf_short` reader - "] +pub type XTAL32K_OTF_SHORT_R = crate::BitReader; +#[doc = "Field `xtal32k_otf_short` writer - "] +pub type XTAL32K_OTF_SHORT_W<'a, const O: u8> = crate::BitWriter<'a, u32, XTAL32K_SPEC, bool, O>; +#[doc = "Field `xtal32k_inv_stre` reader - "] +pub type XTAL32K_INV_STRE_R = crate::FieldReader; +#[doc = "Field `xtal32k_inv_stre` writer - "] +pub type XTAL32K_INV_STRE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, XTAL32K_SPEC, u8, u8, 2, O>; +#[doc = "Field `xtal32k_capbank` reader - "] +pub type XTAL32K_CAPBANK_R = crate::FieldReader; +#[doc = "Field `xtal32k_capbank` writer - "] +pub type XTAL32K_CAPBANK_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, XTAL32K_SPEC, u8, u8, 6, O>; +#[doc = "Field `xtal32k_ac_cap_short` reader - "] +pub type XTAL32K_AC_CAP_SHORT_R = crate::BitReader; +#[doc = "Field `xtal32k_ac_cap_short` writer - "] +pub type XTAL32K_AC_CAP_SHORT_W<'a, const O: u8> = crate::BitWriter<'a, u32, XTAL32K_SPEC, bool, O>; +#[doc = "Field `pu_xtal32k_buf` reader - "] +pub type PU_XTAL32K_BUF_R = crate::BitReader; +#[doc = "Field `pu_xtal32k_buf` writer - "] +pub type PU_XTAL32K_BUF_W<'a, const O: u8> = crate::BitWriter<'a, u32, XTAL32K_SPEC, bool, O>; +#[doc = "Field `pu_xtal32k` reader - "] +pub type PU_XTAL32K_R = crate::BitReader; +#[doc = "Field `pu_xtal32k` writer - "] +pub type PU_XTAL32K_W<'a, const O: u8> = crate::BitWriter<'a, u32, XTAL32K_SPEC, bool, O>; +impl R { + #[doc = "Bit 2"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn xtal32k_ext_sel(&self) -> XTAL32K_EXT_SEL_R { + XTAL32K_EXT_SEL_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = r"Clears the field bit"] + #[doc = "Bits 3:4"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn xtal32k_amp_ctrl(&self) -> XTAL32K_AMP_CTRL_R { + XTAL32K_AMP_CTRL_R::new(((self.bits >> 3) & 3) as u8) } - #[doc = r"Writes raw bits to the field"] + #[doc = "Bits 5:6"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w + pub fn xtal32k_reg(&self) -> XTAL32K_REG_R { + XTAL32K_REG_R::new(((self.bits >> 5) & 3) as u8) } -} -impl R { - #[doc = "Bit 19"] + #[doc = "Bit 7"] #[inline(always)] - pub fn pu_xtal32k(&self) -> PU_XTAL32K_R { - PU_XTAL32K_R::new(((self.bits >> 19) & 0x01) != 0) + pub fn xtal32k_outbuf_stre(&self) -> XTAL32K_OUTBUF_STRE_R { + XTAL32K_OUTBUF_STRE_R::new(((self.bits >> 7) & 1) != 0) } - #[doc = "Bit 18"] + #[doc = "Bit 8"] #[inline(always)] - pub fn pu_xtal32k_buf(&self) -> PU_XTAL32K_BUF_R { - PU_XTAL32K_BUF_R::new(((self.bits >> 18) & 0x01) != 0) + pub fn xtal32k_otf_short(&self) -> XTAL32K_OTF_SHORT_R { + XTAL32K_OTF_SHORT_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bit 17"] + #[doc = "Bits 9:10"] #[inline(always)] - pub fn xtal32k_ac_cap_short(&self) -> XTAL32K_AC_CAP_SHORT_R { - XTAL32K_AC_CAP_SHORT_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn xtal32k_inv_stre(&self) -> XTAL32K_INV_STRE_R { + XTAL32K_INV_STRE_R::new(((self.bits >> 9) & 3) as u8) } #[doc = "Bits 11:16"] #[inline(always)] pub fn xtal32k_capbank(&self) -> XTAL32K_CAPBANK_R { XTAL32K_CAPBANK_R::new(((self.bits >> 11) & 0x3f) as u8) } - #[doc = "Bits 9:10"] - #[inline(always)] - pub fn xtal32k_inv_stre(&self) -> XTAL32K_INV_STRE_R { - XTAL32K_INV_STRE_R::new(((self.bits >> 9) & 0x03) as u8) - } - #[doc = "Bit 8"] - #[inline(always)] - pub fn xtal32k_otf_short(&self) -> XTAL32K_OTF_SHORT_R { - XTAL32K_OTF_SHORT_R::new(((self.bits >> 8) & 0x01) != 0) - } - #[doc = "Bit 7"] - #[inline(always)] - pub fn xtal32k_outbuf_stre(&self) -> XTAL32K_OUTBUF_STRE_R { - XTAL32K_OUTBUF_STRE_R::new(((self.bits >> 7) & 0x01) != 0) - } - #[doc = "Bits 5:6"] + #[doc = "Bit 17"] #[inline(always)] - pub fn xtal32k_reg(&self) -> XTAL32K_REG_R { - XTAL32K_REG_R::new(((self.bits >> 5) & 0x03) as u8) + pub fn xtal32k_ac_cap_short(&self) -> XTAL32K_AC_CAP_SHORT_R { + XTAL32K_AC_CAP_SHORT_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bits 3:4"] + #[doc = "Bit 18"] #[inline(always)] - pub fn xtal32k_amp_ctrl(&self) -> XTAL32K_AMP_CTRL_R { - XTAL32K_AMP_CTRL_R::new(((self.bits >> 3) & 0x03) as u8) + pub fn pu_xtal32k_buf(&self) -> PU_XTAL32K_BUF_R { + PU_XTAL32K_BUF_R::new(((self.bits >> 18) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bit 19"] #[inline(always)] - pub fn xtal32k_ext_sel(&self) -> XTAL32K_EXT_SEL_R { - XTAL32K_EXT_SEL_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn pu_xtal32k(&self) -> PU_XTAL32K_R { + PU_XTAL32K_R::new(((self.bits >> 19) & 1) != 0) } } impl W { - #[doc = "Bit 19"] + #[doc = "Bit 2"] #[inline(always)] - pub fn pu_xtal32k(&mut self) -> PU_XTAL32K_W { - PU_XTAL32K_W { w: self } + #[must_use] + pub fn xtal32k_ext_sel(&mut self) -> XTAL32K_EXT_SEL_W<2> { + XTAL32K_EXT_SEL_W::new(self) } - #[doc = "Bit 18"] + #[doc = "Bits 3:4"] #[inline(always)] - pub fn pu_xtal32k_buf(&mut self) -> PU_XTAL32K_BUF_W { - PU_XTAL32K_BUF_W { w: self } + #[must_use] + pub fn xtal32k_amp_ctrl(&mut self) -> XTAL32K_AMP_CTRL_W<3> { + XTAL32K_AMP_CTRL_W::new(self) } - #[doc = "Bit 17"] + #[doc = "Bits 5:6"] #[inline(always)] - pub fn xtal32k_ac_cap_short(&mut self) -> XTAL32K_AC_CAP_SHORT_W { - XTAL32K_AC_CAP_SHORT_W { w: self } + #[must_use] + pub fn xtal32k_reg(&mut self) -> XTAL32K_REG_W<5> { + XTAL32K_REG_W::new(self) } - #[doc = "Bits 11:16"] + #[doc = "Bit 7"] #[inline(always)] - pub fn xtal32k_capbank(&mut self) -> XTAL32K_CAPBANK_W { - XTAL32K_CAPBANK_W { w: self } + #[must_use] + pub fn xtal32k_outbuf_stre(&mut self) -> XTAL32K_OUTBUF_STRE_W<7> { + XTAL32K_OUTBUF_STRE_W::new(self) } - #[doc = "Bits 9:10"] + #[doc = "Bit 8"] #[inline(always)] - pub fn xtal32k_inv_stre(&mut self) -> XTAL32K_INV_STRE_W { - XTAL32K_INV_STRE_W { w: self } + #[must_use] + pub fn xtal32k_otf_short(&mut self) -> XTAL32K_OTF_SHORT_W<8> { + XTAL32K_OTF_SHORT_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bits 9:10"] #[inline(always)] - pub fn xtal32k_otf_short(&mut self) -> XTAL32K_OTF_SHORT_W { - XTAL32K_OTF_SHORT_W { w: self } + #[must_use] + pub fn xtal32k_inv_stre(&mut self) -> XTAL32K_INV_STRE_W<9> { + XTAL32K_INV_STRE_W::new(self) } - #[doc = "Bit 7"] + #[doc = "Bits 11:16"] #[inline(always)] - pub fn xtal32k_outbuf_stre(&mut self) -> XTAL32K_OUTBUF_STRE_W { - XTAL32K_OUTBUF_STRE_W { w: self } + #[must_use] + pub fn xtal32k_capbank(&mut self) -> XTAL32K_CAPBANK_W<11> { + XTAL32K_CAPBANK_W::new(self) } - #[doc = "Bits 5:6"] + #[doc = "Bit 17"] #[inline(always)] - pub fn xtal32k_reg(&mut self) -> XTAL32K_REG_W { - XTAL32K_REG_W { w: self } + #[must_use] + pub fn xtal32k_ac_cap_short(&mut self) -> XTAL32K_AC_CAP_SHORT_W<17> { + XTAL32K_AC_CAP_SHORT_W::new(self) } - #[doc = "Bits 3:4"] + #[doc = "Bit 18"] #[inline(always)] - pub fn xtal32k_amp_ctrl(&mut self) -> XTAL32K_AMP_CTRL_W { - XTAL32K_AMP_CTRL_W { w: self } + #[must_use] + pub fn pu_xtal32k_buf(&mut self) -> PU_XTAL32K_BUF_W<18> { + PU_XTAL32K_BUF_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bit 19"] #[inline(always)] - pub fn xtal32k_ext_sel(&mut self) -> XTAL32K_EXT_SEL_W { - XTAL32K_EXT_SEL_W { w: self } + #[must_use] + pub fn pu_xtal32k(&mut self) -> PU_XTAL32K_W<19> { + PU_XTAL32K_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -473,11 +209,10 @@ impl crate::Readable for XTAL32K_SPEC { #[doc = "`write(|w| ..)` method takes [xtal32k::W](W) writer structure"] impl crate::Writable for XTAL32K_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets xtal32k to value 0x000f_0228"] impl crate::Resettable for XTAL32K_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x000f_0228 - } + const RESET_VALUE: Self::Ux = 0x000f_0228; } diff --git a/src/i2c.rs b/src/i2c.rs index f0a8874..a6a33df 100644 --- a/src/i2c.rs +++ b/src/i2c.rs @@ -2,70 +2,70 @@ #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - i2c_config."] - pub i2c_config: crate::Reg, + pub i2c_config: I2C_CONFIG, #[doc = "0x04 - i2c_int_sts."] - pub i2c_int_sts: crate::Reg, + pub i2c_int_sts: I2C_INT_STS, #[doc = "0x08 - i2c_sub_addr."] - pub i2c_sub_addr: crate::Reg, + pub i2c_sub_addr: I2C_SUB_ADDR, #[doc = "0x0c - i2c_bus_busy."] - pub i2c_bus_busy: crate::Reg, + pub i2c_bus_busy: I2C_BUS_BUSY, #[doc = "0x10 - i2c_prd_start."] - pub i2c_prd_start: crate::Reg, + pub i2c_prd_start: I2C_PRD_START, #[doc = "0x14 - i2c_prd_stop."] - pub i2c_prd_stop: crate::Reg, + pub i2c_prd_stop: I2C_PRD_STOP, #[doc = "0x18 - i2c_prd_data."] - pub i2c_prd_data: crate::Reg, - _reserved7: [u8; 100usize], + pub i2c_prd_data: I2C_PRD_DATA, + _reserved7: [u8; 0x64], #[doc = "0x80 - i2c_fifo_config_0."] - pub i2c_fifo_config_0: crate::Reg, + pub i2c_fifo_config_0: I2C_FIFO_CONFIG_0, #[doc = "0x84 - i2c_fifo_config_1."] - pub i2c_fifo_config_1: crate::Reg, + pub i2c_fifo_config_1: I2C_FIFO_CONFIG_1, #[doc = "0x88 - i2c_fifo_wdata."] - pub i2c_fifo_wdata: crate::Reg, + pub i2c_fifo_wdata: I2C_FIFO_WDATA, #[doc = "0x8c - i2c_fifo_rdata."] - pub i2c_fifo_rdata: crate::Reg, + pub i2c_fifo_rdata: I2C_FIFO_RDATA, } -#[doc = "i2c_config register accessor: an alias for `Reg`"] +#[doc = "i2c_config (rw) register accessor: an alias for `Reg`"] pub type I2C_CONFIG = crate::Reg; #[doc = "i2c_config."] pub mod i2c_config; -#[doc = "i2c_int_sts register accessor: an alias for `Reg`"] +#[doc = "i2c_int_sts (rw) register accessor: an alias for `Reg`"] pub type I2C_INT_STS = crate::Reg; #[doc = "i2c_int_sts."] pub mod i2c_int_sts; -#[doc = "i2c_sub_addr register accessor: an alias for `Reg`"] +#[doc = "i2c_sub_addr (rw) register accessor: an alias for `Reg`"] pub type I2C_SUB_ADDR = crate::Reg; #[doc = "i2c_sub_addr."] pub mod i2c_sub_addr; -#[doc = "i2c_bus_busy register accessor: an alias for `Reg`"] +#[doc = "i2c_bus_busy (rw) register accessor: an alias for `Reg`"] pub type I2C_BUS_BUSY = crate::Reg; #[doc = "i2c_bus_busy."] pub mod i2c_bus_busy; -#[doc = "i2c_prd_start register accessor: an alias for `Reg`"] +#[doc = "i2c_prd_start (rw) register accessor: an alias for `Reg`"] pub type I2C_PRD_START = crate::Reg; #[doc = "i2c_prd_start."] pub mod i2c_prd_start; -#[doc = "i2c_prd_stop register accessor: an alias for `Reg`"] +#[doc = "i2c_prd_stop (rw) register accessor: an alias for `Reg`"] pub type I2C_PRD_STOP = crate::Reg; #[doc = "i2c_prd_stop."] pub mod i2c_prd_stop; -#[doc = "i2c_prd_data register accessor: an alias for `Reg`"] +#[doc = "i2c_prd_data (rw) register accessor: an alias for `Reg`"] pub type I2C_PRD_DATA = crate::Reg; #[doc = "i2c_prd_data."] pub mod i2c_prd_data; -#[doc = "i2c_fifo_config_0 register accessor: an alias for `Reg`"] +#[doc = "i2c_fifo_config_0 (rw) register accessor: an alias for `Reg`"] pub type I2C_FIFO_CONFIG_0 = crate::Reg; #[doc = "i2c_fifo_config_0."] pub mod i2c_fifo_config_0; -#[doc = "i2c_fifo_config_1 register accessor: an alias for `Reg`"] +#[doc = "i2c_fifo_config_1 (rw) register accessor: an alias for `Reg`"] pub type I2C_FIFO_CONFIG_1 = crate::Reg; #[doc = "i2c_fifo_config_1."] pub mod i2c_fifo_config_1; -#[doc = "i2c_fifo_wdata register accessor: an alias for `Reg`"] +#[doc = "i2c_fifo_wdata (w) register accessor: an alias for `Reg`"] pub type I2C_FIFO_WDATA = crate::Reg; #[doc = "i2c_fifo_wdata."] pub mod i2c_fifo_wdata; -#[doc = "i2c_fifo_rdata register accessor: an alias for `Reg`"] +#[doc = "i2c_fifo_rdata (r) register accessor: an alias for `Reg`"] pub type I2C_FIFO_RDATA = crate::Reg; #[doc = "i2c_fifo_rdata."] pub mod i2c_fifo_rdata; diff --git a/src/i2c/i2c_bus_busy.rs b/src/i2c/i2c_bus_busy.rs index 29ff05d..1190101 100644 --- a/src/i2c/i2c_bus_busy.rs +++ b/src/i2c/i2c_bus_busy.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,80 +28,40 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } +#[doc = "Field `sts_i2c_bus_busy` reader - "] +pub type STS_I2C_BUS_BUSY_R = crate::BitReader; #[doc = "Field `cr_i2c_bus_busy_clr` reader - "] -pub struct CR_I2C_BUS_BUSY_CLR_R(crate::FieldReader); -impl CR_I2C_BUS_BUSY_CLR_R { - pub(crate) fn new(bits: bool) -> Self { - CR_I2C_BUS_BUSY_CLR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_BUS_BUSY_CLR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_I2C_BUS_BUSY_CLR_R = crate::BitReader; #[doc = "Field `cr_i2c_bus_busy_clr` writer - "] -pub struct CR_I2C_BUS_BUSY_CLR_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_BUS_BUSY_CLR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} -#[doc = "Field `sts_i2c_bus_busy` reader - "] -pub struct STS_I2C_BUS_BUSY_R(crate::FieldReader); -impl STS_I2C_BUS_BUSY_R { - pub(crate) fn new(bits: bool) -> Self { - STS_I2C_BUS_BUSY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for STS_I2C_BUS_BUSY_R { - type Target = crate::FieldReader; +pub type CR_I2C_BUS_BUSY_CLR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, I2C_BUS_BUSY_SPEC, bool, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn sts_i2c_bus_busy(&self) -> STS_I2C_BUS_BUSY_R { + STS_I2C_BUS_BUSY_R::new((self.bits & 1) != 0) } -} -impl R { #[doc = "Bit 1"] #[inline(always)] pub fn cr_i2c_bus_busy_clr(&self) -> CR_I2C_BUS_BUSY_CLR_R { - CR_I2C_BUS_BUSY_CLR_R::new(((self.bits >> 1) & 0x01) != 0) - } - #[doc = "Bit 0"] - #[inline(always)] - pub fn sts_i2c_bus_busy(&self) -> STS_I2C_BUS_BUSY_R { - STS_I2C_BUS_BUSY_R::new((self.bits & 0x01) != 0) + CR_I2C_BUS_BUSY_CLR_R::new(((self.bits >> 1) & 1) != 0) } } impl W { #[doc = "Bit 1"] #[inline(always)] - pub fn cr_i2c_bus_busy_clr(&mut self) -> CR_I2C_BUS_BUSY_CLR_W { - CR_I2C_BUS_BUSY_CLR_W { w: self } + #[must_use] + pub fn cr_i2c_bus_busy_clr(&mut self) -> CR_I2C_BUS_BUSY_CLR_W<1> { + CR_I2C_BUS_BUSY_CLR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -118,11 +79,10 @@ impl crate::Readable for I2C_BUS_BUSY_SPEC { #[doc = "`write(|w| ..)` method takes [i2c_bus_busy::W](W) writer structure"] impl crate::Writable for I2C_BUS_BUSY_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets i2c_bus_busy to value 0"] impl crate::Resettable for I2C_BUS_BUSY_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/i2c/i2c_config.rs b/src/i2c/i2c_config.rs index 1001873..bcd7eaa 100644 --- a/src/i2c/i2c_config.rs +++ b/src/i2c/i2c_config.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,389 +28,158 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `cr_i2c_deg_cnt` reader - "] -pub struct CR_I2C_DEG_CNT_R(crate::FieldReader); -impl CR_I2C_DEG_CNT_R { - pub(crate) fn new(bits: u8) -> Self { - CR_I2C_DEG_CNT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_DEG_CNT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_i2c_deg_cnt` writer - "] -pub struct CR_I2C_DEG_CNT_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_DEG_CNT_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 28)) | ((value as u32 & 0x0f) << 28); - self.w - } -} -#[doc = "Field `cr_i2c_pkt_len` reader - "] -pub struct CR_I2C_PKT_LEN_R(crate::FieldReader); -impl CR_I2C_PKT_LEN_R { - pub(crate) fn new(bits: u8) -> Self { - CR_I2C_PKT_LEN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_PKT_LEN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_i2c_pkt_len` writer - "] -pub struct CR_I2C_PKT_LEN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_PKT_LEN_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 16)) | ((value as u32 & 0xff) << 16); - self.w - } -} -#[doc = "Field `cr_i2c_slv_addr` reader - "] -pub struct CR_I2C_SLV_ADDR_R(crate::FieldReader); -impl CR_I2C_SLV_ADDR_R { - pub(crate) fn new(bits: u8) -> Self { - CR_I2C_SLV_ADDR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_SLV_ADDR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_i2c_slv_addr` writer - "] -pub struct CR_I2C_SLV_ADDR_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_SLV_ADDR_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x7f << 8)) | ((value as u32 & 0x7f) << 8); - self.w - } -} -#[doc = "Field `cr_i2c_sub_addr_bc` reader - "] -pub struct CR_I2C_SUB_ADDR_BC_R(crate::FieldReader); -impl CR_I2C_SUB_ADDR_BC_R { - pub(crate) fn new(bits: u8) -> Self { - CR_I2C_SUB_ADDR_BC_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_SUB_ADDR_BC_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_i2c_sub_addr_bc` writer - "] -pub struct CR_I2C_SUB_ADDR_BC_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_SUB_ADDR_BC_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 5)) | ((value as u32 & 0x03) << 5); - self.w - } -} -#[doc = "Field `cr_i2c_sub_addr_en` reader - "] -pub struct CR_I2C_SUB_ADDR_EN_R(crate::FieldReader); -impl CR_I2C_SUB_ADDR_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_I2C_SUB_ADDR_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_SUB_ADDR_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_i2c_sub_addr_en` writer - "] -pub struct CR_I2C_SUB_ADDR_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_SUB_ADDR_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} -#[doc = "Field `cr_i2c_scl_sync_en` reader - "] -pub struct CR_I2C_SCL_SYNC_EN_R(crate::FieldReader); -impl CR_I2C_SCL_SYNC_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_I2C_SCL_SYNC_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_SCL_SYNC_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_i2c_scl_sync_en` writer - "] -pub struct CR_I2C_SCL_SYNC_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_SCL_SYNC_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `cr_i2c_deg_en` reader - "] -pub struct CR_I2C_DEG_EN_R(crate::FieldReader); -impl CR_I2C_DEG_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_I2C_DEG_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_DEG_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_i2c_deg_en` writer - "] -pub struct CR_I2C_DEG_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_DEG_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `cr_i2c_pkt_dir` reader - "] -pub struct CR_I2C_PKT_DIR_R(crate::FieldReader); -impl CR_I2C_PKT_DIR_R { - pub(crate) fn new(bits: bool) -> Self { - CR_I2C_PKT_DIR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_PKT_DIR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_i2c_pkt_dir` writer - "] -pub struct CR_I2C_PKT_DIR_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_PKT_DIR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `cr_i2c_m_en` reader - "] -pub struct CR_I2C_M_EN_R(crate::FieldReader); -impl CR_I2C_M_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_I2C_M_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_M_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_I2C_M_EN_R = crate::BitReader; #[doc = "Field `cr_i2c_m_en` writer - "] -pub struct CR_I2C_M_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_M_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type CR_I2C_M_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, I2C_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_i2c_pkt_dir` reader - "] +pub type CR_I2C_PKT_DIR_R = crate::BitReader; +#[doc = "Field `cr_i2c_pkt_dir` writer - "] +pub type CR_I2C_PKT_DIR_W<'a, const O: u8> = crate::BitWriter<'a, u32, I2C_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_i2c_deg_en` reader - "] +pub type CR_I2C_DEG_EN_R = crate::BitReader; +#[doc = "Field `cr_i2c_deg_en` writer - "] +pub type CR_I2C_DEG_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, I2C_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_i2c_scl_sync_en` reader - "] +pub type CR_I2C_SCL_SYNC_EN_R = crate::BitReader; +#[doc = "Field `cr_i2c_scl_sync_en` writer - "] +pub type CR_I2C_SCL_SYNC_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, I2C_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_i2c_sub_addr_en` reader - "] +pub type CR_I2C_SUB_ADDR_EN_R = crate::BitReader; +#[doc = "Field `cr_i2c_sub_addr_en` writer - "] +pub type CR_I2C_SUB_ADDR_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, I2C_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_i2c_sub_addr_bc` reader - "] +pub type CR_I2C_SUB_ADDR_BC_R = crate::FieldReader; +#[doc = "Field `cr_i2c_sub_addr_bc` writer - "] +pub type CR_I2C_SUB_ADDR_BC_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, I2C_CONFIG_SPEC, u8, u8, 2, O>; +#[doc = "Field `cr_i2c_slv_addr` reader - "] +pub type CR_I2C_SLV_ADDR_R = crate::FieldReader; +#[doc = "Field `cr_i2c_slv_addr` writer - "] +pub type CR_I2C_SLV_ADDR_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, I2C_CONFIG_SPEC, u8, u8, 7, O>; +#[doc = "Field `cr_i2c_pkt_len` reader - "] +pub type CR_I2C_PKT_LEN_R = crate::FieldReader; +#[doc = "Field `cr_i2c_pkt_len` writer - "] +pub type CR_I2C_PKT_LEN_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, I2C_CONFIG_SPEC, u8, u8, 8, O>; +#[doc = "Field `cr_i2c_deg_cnt` reader - "] +pub type CR_I2C_DEG_CNT_R = crate::FieldReader; +#[doc = "Field `cr_i2c_deg_cnt` writer - "] +pub type CR_I2C_DEG_CNT_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, I2C_CONFIG_SPEC, u8, u8, 4, O>; impl R { - #[doc = "Bits 28:31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn cr_i2c_deg_cnt(&self) -> CR_I2C_DEG_CNT_R { - CR_I2C_DEG_CNT_R::new(((self.bits >> 28) & 0x0f) as u8) + pub fn cr_i2c_m_en(&self) -> CR_I2C_M_EN_R { + CR_I2C_M_EN_R::new((self.bits & 1) != 0) } - #[doc = "Bits 16:23"] + #[doc = "Bit 1"] #[inline(always)] - pub fn cr_i2c_pkt_len(&self) -> CR_I2C_PKT_LEN_R { - CR_I2C_PKT_LEN_R::new(((self.bits >> 16) & 0xff) as u8) + pub fn cr_i2c_pkt_dir(&self) -> CR_I2C_PKT_DIR_R { + CR_I2C_PKT_DIR_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bits 8:14"] + #[doc = "Bit 2"] #[inline(always)] - pub fn cr_i2c_slv_addr(&self) -> CR_I2C_SLV_ADDR_R { - CR_I2C_SLV_ADDR_R::new(((self.bits >> 8) & 0x7f) as u8) + pub fn cr_i2c_deg_en(&self) -> CR_I2C_DEG_EN_R { + CR_I2C_DEG_EN_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bits 5:6"] + #[doc = "Bit 3"] #[inline(always)] - pub fn cr_i2c_sub_addr_bc(&self) -> CR_I2C_SUB_ADDR_BC_R { - CR_I2C_SUB_ADDR_BC_R::new(((self.bits >> 5) & 0x03) as u8) + pub fn cr_i2c_scl_sync_en(&self) -> CR_I2C_SCL_SYNC_EN_R { + CR_I2C_SCL_SYNC_EN_R::new(((self.bits >> 3) & 1) != 0) } #[doc = "Bit 4"] #[inline(always)] pub fn cr_i2c_sub_addr_en(&self) -> CR_I2C_SUB_ADDR_EN_R { - CR_I2C_SUB_ADDR_EN_R::new(((self.bits >> 4) & 0x01) != 0) + CR_I2C_SUB_ADDR_EN_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 3"] + #[doc = "Bits 5:6"] #[inline(always)] - pub fn cr_i2c_scl_sync_en(&self) -> CR_I2C_SCL_SYNC_EN_R { - CR_I2C_SCL_SYNC_EN_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn cr_i2c_sub_addr_bc(&self) -> CR_I2C_SUB_ADDR_BC_R { + CR_I2C_SUB_ADDR_BC_R::new(((self.bits >> 5) & 3) as u8) } - #[doc = "Bit 2"] + #[doc = "Bits 8:14"] #[inline(always)] - pub fn cr_i2c_deg_en(&self) -> CR_I2C_DEG_EN_R { - CR_I2C_DEG_EN_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn cr_i2c_slv_addr(&self) -> CR_I2C_SLV_ADDR_R { + CR_I2C_SLV_ADDR_R::new(((self.bits >> 8) & 0x7f) as u8) } - #[doc = "Bit 1"] + #[doc = "Bits 16:23"] #[inline(always)] - pub fn cr_i2c_pkt_dir(&self) -> CR_I2C_PKT_DIR_R { - CR_I2C_PKT_DIR_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn cr_i2c_pkt_len(&self) -> CR_I2C_PKT_LEN_R { + CR_I2C_PKT_LEN_R::new(((self.bits >> 16) & 0xff) as u8) } - #[doc = "Bit 0"] + #[doc = "Bits 28:31"] #[inline(always)] - pub fn cr_i2c_m_en(&self) -> CR_I2C_M_EN_R { - CR_I2C_M_EN_R::new((self.bits & 0x01) != 0) + pub fn cr_i2c_deg_cnt(&self) -> CR_I2C_DEG_CNT_R { + CR_I2C_DEG_CNT_R::new(((self.bits >> 28) & 0x0f) as u8) } } impl W { - #[doc = "Bits 28:31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn cr_i2c_deg_cnt(&mut self) -> CR_I2C_DEG_CNT_W { - CR_I2C_DEG_CNT_W { w: self } + #[must_use] + pub fn cr_i2c_m_en(&mut self) -> CR_I2C_M_EN_W<0> { + CR_I2C_M_EN_W::new(self) } - #[doc = "Bits 16:23"] + #[doc = "Bit 1"] #[inline(always)] - pub fn cr_i2c_pkt_len(&mut self) -> CR_I2C_PKT_LEN_W { - CR_I2C_PKT_LEN_W { w: self } + #[must_use] + pub fn cr_i2c_pkt_dir(&mut self) -> CR_I2C_PKT_DIR_W<1> { + CR_I2C_PKT_DIR_W::new(self) } - #[doc = "Bits 8:14"] + #[doc = "Bit 2"] #[inline(always)] - pub fn cr_i2c_slv_addr(&mut self) -> CR_I2C_SLV_ADDR_W { - CR_I2C_SLV_ADDR_W { w: self } + #[must_use] + pub fn cr_i2c_deg_en(&mut self) -> CR_I2C_DEG_EN_W<2> { + CR_I2C_DEG_EN_W::new(self) } - #[doc = "Bits 5:6"] + #[doc = "Bit 3"] #[inline(always)] - pub fn cr_i2c_sub_addr_bc(&mut self) -> CR_I2C_SUB_ADDR_BC_W { - CR_I2C_SUB_ADDR_BC_W { w: self } + #[must_use] + pub fn cr_i2c_scl_sync_en(&mut self) -> CR_I2C_SCL_SYNC_EN_W<3> { + CR_I2C_SCL_SYNC_EN_W::new(self) } #[doc = "Bit 4"] #[inline(always)] - pub fn cr_i2c_sub_addr_en(&mut self) -> CR_I2C_SUB_ADDR_EN_W { - CR_I2C_SUB_ADDR_EN_W { w: self } + #[must_use] + pub fn cr_i2c_sub_addr_en(&mut self) -> CR_I2C_SUB_ADDR_EN_W<4> { + CR_I2C_SUB_ADDR_EN_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bits 5:6"] #[inline(always)] - pub fn cr_i2c_scl_sync_en(&mut self) -> CR_I2C_SCL_SYNC_EN_W { - CR_I2C_SCL_SYNC_EN_W { w: self } + #[must_use] + pub fn cr_i2c_sub_addr_bc(&mut self) -> CR_I2C_SUB_ADDR_BC_W<5> { + CR_I2C_SUB_ADDR_BC_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bits 8:14"] #[inline(always)] - pub fn cr_i2c_deg_en(&mut self) -> CR_I2C_DEG_EN_W { - CR_I2C_DEG_EN_W { w: self } + #[must_use] + pub fn cr_i2c_slv_addr(&mut self) -> CR_I2C_SLV_ADDR_W<8> { + CR_I2C_SLV_ADDR_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bits 16:23"] #[inline(always)] - pub fn cr_i2c_pkt_dir(&mut self) -> CR_I2C_PKT_DIR_W { - CR_I2C_PKT_DIR_W { w: self } + #[must_use] + pub fn cr_i2c_pkt_len(&mut self) -> CR_I2C_PKT_LEN_W<16> { + CR_I2C_PKT_LEN_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bits 28:31"] #[inline(always)] - pub fn cr_i2c_m_en(&mut self) -> CR_I2C_M_EN_W { - CR_I2C_M_EN_W { w: self } + #[must_use] + pub fn cr_i2c_deg_cnt(&mut self) -> CR_I2C_DEG_CNT_W<28> { + CR_I2C_DEG_CNT_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -427,11 +197,10 @@ impl crate::Readable for I2C_CONFIG_SPEC { #[doc = "`write(|w| ..)` method takes [i2c_config::W](W) writer structure"] impl crate::Writable for I2C_CONFIG_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets i2c_config to value 0x0a"] impl crate::Resettable for I2C_CONFIG_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0a - } + const RESET_VALUE: Self::Ux = 0x0a; } diff --git a/src/i2c/i2c_fifo_config_0.rs b/src/i2c/i2c_fifo_config_0.rs index 6f271d6..67efca1 100644 --- a/src/i2c/i2c_fifo_config_0.rs +++ b/src/i2c/i2c_fifo_config_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,275 +28,109 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rx_fifo_underflow` reader - "] -pub struct RX_FIFO_UNDERFLOW_R(crate::FieldReader); -impl RX_FIFO_UNDERFLOW_R { - pub(crate) fn new(bits: bool) -> Self { - RX_FIFO_UNDERFLOW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_FIFO_UNDERFLOW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_fifo_overflow` reader - "] -pub struct RX_FIFO_OVERFLOW_R(crate::FieldReader); -impl RX_FIFO_OVERFLOW_R { - pub(crate) fn new(bits: bool) -> Self { - RX_FIFO_OVERFLOW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_FIFO_OVERFLOW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_fifo_underflow` reader - "] -pub struct TX_FIFO_UNDERFLOW_R(crate::FieldReader); -impl TX_FIFO_UNDERFLOW_R { - pub(crate) fn new(bits: bool) -> Self { - TX_FIFO_UNDERFLOW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_FIFO_UNDERFLOW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_fifo_overflow` reader - "] -pub struct TX_FIFO_OVERFLOW_R(crate::FieldReader); -impl TX_FIFO_OVERFLOW_R { - pub(crate) fn new(bits: bool) -> Self { - TX_FIFO_OVERFLOW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_FIFO_OVERFLOW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_fifo_clr` reader - "] -pub struct RX_FIFO_CLR_R(crate::FieldReader); -impl RX_FIFO_CLR_R { - pub(crate) fn new(bits: bool) -> Self { - RX_FIFO_CLR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_FIFO_CLR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_fifo_clr` writer - "] -pub struct RX_FIFO_CLR_W<'a> { - w: &'a mut W, -} -impl<'a> RX_FIFO_CLR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `tx_fifo_clr` reader - "] -pub struct TX_FIFO_CLR_R(crate::FieldReader); -impl TX_FIFO_CLR_R { - pub(crate) fn new(bits: bool) -> Self { - TX_FIFO_CLR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_FIFO_CLR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_fifo_clr` writer - "] -pub struct TX_FIFO_CLR_W<'a> { - w: &'a mut W, -} -impl<'a> TX_FIFO_CLR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `i2c_dma_rx_en` reader - "] -pub struct I2C_DMA_RX_EN_R(crate::FieldReader); -impl I2C_DMA_RX_EN_R { - pub(crate) fn new(bits: bool) -> Self { - I2C_DMA_RX_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for I2C_DMA_RX_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `i2c_dma_rx_en` writer - "] -pub struct I2C_DMA_RX_EN_W<'a> { - w: &'a mut W, -} -impl<'a> I2C_DMA_RX_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `i2c_dma_tx_en` reader - "] -pub struct I2C_DMA_TX_EN_R(crate::FieldReader); -impl I2C_DMA_TX_EN_R { - pub(crate) fn new(bits: bool) -> Self { - I2C_DMA_TX_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for I2C_DMA_TX_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type I2C_DMA_TX_EN_R = crate::BitReader; #[doc = "Field `i2c_dma_tx_en` writer - "] -pub struct I2C_DMA_TX_EN_W<'a> { - w: &'a mut W, -} -impl<'a> I2C_DMA_TX_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type I2C_DMA_TX_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, I2C_FIFO_CONFIG_0_SPEC, bool, O>; +#[doc = "Field `i2c_dma_rx_en` reader - "] +pub type I2C_DMA_RX_EN_R = crate::BitReader; +#[doc = "Field `i2c_dma_rx_en` writer - "] +pub type I2C_DMA_RX_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, I2C_FIFO_CONFIG_0_SPEC, bool, O>; +#[doc = "Field `tx_fifo_clr` reader - "] +pub type TX_FIFO_CLR_R = crate::BitReader; +#[doc = "Field `tx_fifo_clr` writer - "] +pub type TX_FIFO_CLR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, I2C_FIFO_CONFIG_0_SPEC, bool, O>; +#[doc = "Field `rx_fifo_clr` reader - "] +pub type RX_FIFO_CLR_R = crate::BitReader; +#[doc = "Field `rx_fifo_clr` writer - "] +pub type RX_FIFO_CLR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, I2C_FIFO_CONFIG_0_SPEC, bool, O>; +#[doc = "Field `tx_fifo_overflow` reader - "] +pub type TX_FIFO_OVERFLOW_R = crate::BitReader; +#[doc = "Field `tx_fifo_underflow` reader - "] +pub type TX_FIFO_UNDERFLOW_R = crate::BitReader; +#[doc = "Field `rx_fifo_overflow` reader - "] +pub type RX_FIFO_OVERFLOW_R = crate::BitReader; +#[doc = "Field `rx_fifo_underflow` reader - "] +pub type RX_FIFO_UNDERFLOW_R = crate::BitReader; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn i2c_dma_tx_en(&self) -> I2C_DMA_TX_EN_R { + I2C_DMA_TX_EN_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bit 7"] + #[doc = "Bit 1"] #[inline(always)] - pub fn rx_fifo_underflow(&self) -> RX_FIFO_UNDERFLOW_R { - RX_FIFO_UNDERFLOW_R::new(((self.bits >> 7) & 0x01) != 0) + pub fn i2c_dma_rx_en(&self) -> I2C_DMA_RX_EN_R { + I2C_DMA_RX_EN_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 6"] + #[doc = "Bit 2"] #[inline(always)] - pub fn rx_fifo_overflow(&self) -> RX_FIFO_OVERFLOW_R { - RX_FIFO_OVERFLOW_R::new(((self.bits >> 6) & 0x01) != 0) + pub fn tx_fifo_clr(&self) -> TX_FIFO_CLR_R { + TX_FIFO_CLR_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 5"] + #[doc = "Bit 3"] #[inline(always)] - pub fn tx_fifo_underflow(&self) -> TX_FIFO_UNDERFLOW_R { - TX_FIFO_UNDERFLOW_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn rx_fifo_clr(&self) -> RX_FIFO_CLR_R { + RX_FIFO_CLR_R::new(((self.bits >> 3) & 1) != 0) } #[doc = "Bit 4"] #[inline(always)] pub fn tx_fifo_overflow(&self) -> TX_FIFO_OVERFLOW_R { - TX_FIFO_OVERFLOW_R::new(((self.bits >> 4) & 0x01) != 0) + TX_FIFO_OVERFLOW_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 3"] - #[inline(always)] - pub fn rx_fifo_clr(&self) -> RX_FIFO_CLR_R { - RX_FIFO_CLR_R::new(((self.bits >> 3) & 0x01) != 0) - } - #[doc = "Bit 2"] + #[doc = "Bit 5"] #[inline(always)] - pub fn tx_fifo_clr(&self) -> TX_FIFO_CLR_R { - TX_FIFO_CLR_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn tx_fifo_underflow(&self) -> TX_FIFO_UNDERFLOW_R { + TX_FIFO_UNDERFLOW_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 6"] #[inline(always)] - pub fn i2c_dma_rx_en(&self) -> I2C_DMA_RX_EN_R { - I2C_DMA_RX_EN_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn rx_fifo_overflow(&self) -> RX_FIFO_OVERFLOW_R { + RX_FIFO_OVERFLOW_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 7"] #[inline(always)] - pub fn i2c_dma_tx_en(&self) -> I2C_DMA_TX_EN_R { - I2C_DMA_TX_EN_R::new((self.bits & 0x01) != 0) + pub fn rx_fifo_underflow(&self) -> RX_FIFO_UNDERFLOW_R { + RX_FIFO_UNDERFLOW_R::new(((self.bits >> 7) & 1) != 0) } } impl W { - #[doc = "Bit 3"] + #[doc = "Bit 0"] #[inline(always)] - pub fn rx_fifo_clr(&mut self) -> RX_FIFO_CLR_W { - RX_FIFO_CLR_W { w: self } + #[must_use] + pub fn i2c_dma_tx_en(&mut self) -> I2C_DMA_TX_EN_W<0> { + I2C_DMA_TX_EN_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bit 1"] #[inline(always)] - pub fn tx_fifo_clr(&mut self) -> TX_FIFO_CLR_W { - TX_FIFO_CLR_W { w: self } + #[must_use] + pub fn i2c_dma_rx_en(&mut self) -> I2C_DMA_RX_EN_W<1> { + I2C_DMA_RX_EN_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 2"] #[inline(always)] - pub fn i2c_dma_rx_en(&mut self) -> I2C_DMA_RX_EN_W { - I2C_DMA_RX_EN_W { w: self } + #[must_use] + pub fn tx_fifo_clr(&mut self) -> TX_FIFO_CLR_W<2> { + TX_FIFO_CLR_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 3"] #[inline(always)] - pub fn i2c_dma_tx_en(&mut self) -> I2C_DMA_TX_EN_W { - I2C_DMA_TX_EN_W { w: self } + #[must_use] + pub fn rx_fifo_clr(&mut self) -> RX_FIFO_CLR_W<3> { + RX_FIFO_CLR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -313,11 +148,10 @@ impl crate::Readable for I2C_FIFO_CONFIG_0_SPEC { #[doc = "`write(|w| ..)` method takes [i2c_fifo_config_0::W](W) writer structure"] impl crate::Writable for I2C_FIFO_CONFIG_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets i2c_fifo_config_0 to value 0"] impl crate::Resettable for I2C_FIFO_CONFIG_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/i2c/i2c_fifo_config_1.rs b/src/i2c/i2c_fifo_config_1.rs index 183406c..7622aa1 100644 --- a/src/i2c/i2c_fifo_config_1.rs +++ b/src/i2c/i2c_fifo_config_1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,145 +28,61 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rx_fifo_th` reader - "] -pub struct RX_FIFO_TH_R(crate::FieldReader); -impl RX_FIFO_TH_R { - pub(crate) fn new(bits: bool) -> Self { - RX_FIFO_TH_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_FIFO_TH_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_fifo_th` writer - "] -pub struct RX_FIFO_TH_W<'a> { - w: &'a mut W, -} -impl<'a> RX_FIFO_TH_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24); - self.w - } -} +#[doc = "Field `tx_fifo_cnt` reader - "] +pub type TX_FIFO_CNT_R = crate::FieldReader; +#[doc = "Field `rx_fifo_cnt` reader - "] +pub type RX_FIFO_CNT_R = crate::FieldReader; #[doc = "Field `tx_fifo_th` reader - "] -pub struct TX_FIFO_TH_R(crate::FieldReader); -impl TX_FIFO_TH_R { - pub(crate) fn new(bits: bool) -> Self { - TX_FIFO_TH_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_FIFO_TH_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TX_FIFO_TH_R = crate::BitReader; #[doc = "Field `tx_fifo_th` writer - "] -pub struct TX_FIFO_TH_W<'a> { - w: &'a mut W, -} -impl<'a> TX_FIFO_TH_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `rx_fifo_cnt` reader - "] -pub struct RX_FIFO_CNT_R(crate::FieldReader); -impl RX_FIFO_CNT_R { - pub(crate) fn new(bits: u8) -> Self { - RX_FIFO_CNT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_FIFO_CNT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_fifo_cnt` reader - "] -pub struct TX_FIFO_CNT_R(crate::FieldReader); -impl TX_FIFO_CNT_R { - pub(crate) fn new(bits: u8) -> Self { - TX_FIFO_CNT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_FIFO_CNT_R { - type Target = crate::FieldReader; +pub type TX_FIFO_TH_W<'a, const O: u8> = crate::BitWriter<'a, u32, I2C_FIFO_CONFIG_1_SPEC, bool, O>; +#[doc = "Field `rx_fifo_th` reader - "] +pub type RX_FIFO_TH_R = crate::BitReader; +#[doc = "Field `rx_fifo_th` writer - "] +pub type RX_FIFO_TH_W<'a, const O: u8> = crate::BitWriter<'a, u32, I2C_FIFO_CONFIG_1_SPEC, bool, O>; +impl R { + #[doc = "Bits 0:1"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn tx_fifo_cnt(&self) -> TX_FIFO_CNT_R { + TX_FIFO_CNT_R::new((self.bits & 3) as u8) } -} -impl R { - #[doc = "Bit 24"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn rx_fifo_th(&self) -> RX_FIFO_TH_R { - RX_FIFO_TH_R::new(((self.bits >> 24) & 0x01) != 0) + pub fn rx_fifo_cnt(&self) -> RX_FIFO_CNT_R { + RX_FIFO_CNT_R::new(((self.bits >> 8) & 3) as u8) } #[doc = "Bit 16"] #[inline(always)] pub fn tx_fifo_th(&self) -> TX_FIFO_TH_R { - TX_FIFO_TH_R::new(((self.bits >> 16) & 0x01) != 0) + TX_FIFO_TH_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bits 8:9"] - #[inline(always)] - pub fn rx_fifo_cnt(&self) -> RX_FIFO_CNT_R { - RX_FIFO_CNT_R::new(((self.bits >> 8) & 0x03) as u8) - } - #[doc = "Bits 0:1"] + #[doc = "Bit 24"] #[inline(always)] - pub fn tx_fifo_cnt(&self) -> TX_FIFO_CNT_R { - TX_FIFO_CNT_R::new((self.bits & 0x03) as u8) + pub fn rx_fifo_th(&self) -> RX_FIFO_TH_R { + RX_FIFO_TH_R::new(((self.bits >> 24) & 1) != 0) } } impl W { - #[doc = "Bit 24"] + #[doc = "Bit 16"] #[inline(always)] - pub fn rx_fifo_th(&mut self) -> RX_FIFO_TH_W { - RX_FIFO_TH_W { w: self } + #[must_use] + pub fn tx_fifo_th(&mut self) -> TX_FIFO_TH_W<16> { + TX_FIFO_TH_W::new(self) } - #[doc = "Bit 16"] + #[doc = "Bit 24"] #[inline(always)] - pub fn tx_fifo_th(&mut self) -> TX_FIFO_TH_W { - TX_FIFO_TH_W { w: self } + #[must_use] + pub fn rx_fifo_th(&mut self) -> RX_FIFO_TH_W<24> { + RX_FIFO_TH_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -183,11 +100,10 @@ impl crate::Readable for I2C_FIFO_CONFIG_1_SPEC { #[doc = "`write(|w| ..)` method takes [i2c_fifo_config_1::W](W) writer structure"] impl crate::Writable for I2C_FIFO_CONFIG_1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets i2c_fifo_config_1 to value 0x02"] impl crate::Resettable for I2C_FIFO_CONFIG_1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x02 - } + const RESET_VALUE: Self::Ux = 0x02; } diff --git a/src/i2c/i2c_fifo_rdata.rs b/src/i2c/i2c_fifo_rdata.rs index 7b5dc9e..5d88d82 100644 --- a/src/i2c/i2c_fifo_rdata.rs +++ b/src/i2c/i2c_fifo_rdata.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `i2c_fifo_rdata` reader - "] -pub struct I2C_FIFO_RDATA_R(crate::FieldReader); -impl I2C_FIFO_RDATA_R { - pub(crate) fn new(bits: u32) -> Self { - I2C_FIFO_RDATA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for I2C_FIFO_RDATA_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type I2C_FIFO_RDATA_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn i2c_fifo_rdata(&self) -> I2C_FIFO_RDATA_R { - I2C_FIFO_RDATA_R::new((self.bits & 0xffff_ffff) as u32) + I2C_FIFO_RDATA_R::new(self.bits) } } #[doc = "i2c_fifo_rdata.\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 [i2c_fifo_rdata](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for I2C_FIFO_RDATA_SPEC { } #[doc = "`reset()` method sets i2c_fifo_rdata to value 0"] impl crate::Resettable for I2C_FIFO_RDATA_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/i2c/i2c_fifo_wdata.rs b/src/i2c/i2c_fifo_wdata.rs index b499d55..91a4398 100644 --- a/src/i2c/i2c_fifo_wdata.rs +++ b/src/i2c/i2c_fifo_wdata.rs @@ -13,30 +13,24 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `i2c_fifo_wdata` writer - "] -pub struct I2C_FIFO_WDATA_W<'a> { - w: &'a mut W, -} -impl<'a> I2C_FIFO_WDATA_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type I2C_FIFO_WDATA_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, I2C_FIFO_WDATA_SPEC, u32, u32, 32, O>; impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn i2c_fifo_wdata(&mut self) -> I2C_FIFO_WDATA_W { - I2C_FIFO_WDATA_W { w: self } + #[must_use] + pub fn i2c_fifo_wdata(&mut self) -> I2C_FIFO_WDATA_W<0> { + I2C_FIFO_WDATA_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -50,11 +44,10 @@ impl crate::RegisterSpec for I2C_FIFO_WDATA_SPEC { #[doc = "`write(|w| ..)` method takes [i2c_fifo_wdata::W](W) writer structure"] impl crate::Writable for I2C_FIFO_WDATA_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets i2c_fifo_wdata to value 0"] impl crate::Resettable for I2C_FIFO_WDATA_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/i2c/i2c_int_sts.rs b/src/i2c/i2c_int_sts.rs index f718c8a..5e5a698 100644 --- a/src/i2c/i2c_int_sts.rs +++ b/src/i2c/i2c_int_sts.rs @@ -7,977 +7,350 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { - fn from(reader: crate::R) -> Self { - R(reader) - } -} -#[doc = "Register `i2c_int_sts` writer"] -pub struct W(crate::W); -impl core::ops::Deref for W { - type Target = crate::W; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -impl core::ops::DerefMut for W { - #[inline(always)] - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } -} -impl core::convert::From> for W { - fn from(writer: crate::W) -> Self { - W(writer) - } -} -#[doc = "Field `cr_i2c_fer_en` reader - "] -pub struct CR_I2C_FER_EN_R(crate::FieldReader); -impl CR_I2C_FER_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_I2C_FER_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_FER_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_i2c_fer_en` writer - "] -pub struct CR_I2C_FER_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_FER_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 29)) | ((value as u32 & 0x01) << 29); - self.w - } -} -#[doc = "Field `cr_i2c_arb_en` reader - "] -pub struct CR_I2C_ARB_EN_R(crate::FieldReader); -impl CR_I2C_ARB_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_I2C_ARB_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_ARB_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_i2c_arb_en` writer - "] -pub struct CR_I2C_ARB_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_ARB_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 28)) | ((value as u32 & 0x01) << 28); - self.w - } -} -#[doc = "Field `cr_i2c_nak_en` reader - "] -pub struct CR_I2C_NAK_EN_R(crate::FieldReader); -impl CR_I2C_NAK_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_I2C_NAK_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_NAK_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_i2c_nak_en` writer - "] -pub struct CR_I2C_NAK_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_NAK_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 27)) | ((value as u32 & 0x01) << 27); - self.w - } -} -#[doc = "Field `cr_i2c_rxf_en` reader - "] -pub struct CR_I2C_RXF_EN_R(crate::FieldReader); -impl CR_I2C_RXF_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_I2C_RXF_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_RXF_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_i2c_rxf_en` writer - "] -pub struct CR_I2C_RXF_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_RXF_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 26)) | ((value as u32 & 0x01) << 26); - self.w - } -} -#[doc = "Field `cr_i2c_txf_en` reader - "] -pub struct CR_I2C_TXF_EN_R(crate::FieldReader); -impl CR_I2C_TXF_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_I2C_TXF_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_TXF_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_i2c_txf_en` writer - "] -pub struct CR_I2C_TXF_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_TXF_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 25)) | ((value as u32 & 0x01) << 25); - self.w - } -} -#[doc = "Field `cr_i2c_end_en` reader - "] -pub struct CR_I2C_END_EN_R(crate::FieldReader); -impl CR_I2C_END_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_I2C_END_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_END_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_i2c_end_en` writer - "] -pub struct CR_I2C_END_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_END_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24); - self.w - } -} -#[doc = "Field `rsvd_21` reader - "] -pub struct RSVD_21_R(crate::FieldReader); -impl RSVD_21_R { - pub(crate) fn new(bits: bool) -> Self { - RSVD_21_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RSVD_21_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rsvd_21` writer - "] -pub struct RSVD_21_W<'a> { - w: &'a mut W, -} -impl<'a> RSVD_21_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); - self.w - } -} -#[doc = "Field `cr_i2c_arb_clr` reader - "] -pub struct CR_I2C_ARB_CLR_R(crate::FieldReader); -impl CR_I2C_ARB_CLR_R { - pub(crate) fn new(bits: bool) -> Self { - CR_I2C_ARB_CLR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_ARB_CLR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_i2c_arb_clr` writer - "] -pub struct CR_I2C_ARB_CLR_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_ARB_CLR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w - } -} -#[doc = "Field `cr_i2c_nak_clr` reader - "] -pub struct CR_I2C_NAK_CLR_R(crate::FieldReader); -impl CR_I2C_NAK_CLR_R { - pub(crate) fn new(bits: bool) -> Self { - CR_I2C_NAK_CLR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_NAK_CLR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_i2c_nak_clr` writer - "] -pub struct CR_I2C_NAK_CLR_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_NAK_CLR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 19)) | ((value as u32 & 0x01) << 19); - self.w - } -} -#[doc = "Field `rsvd_18` reader - "] -pub struct RSVD_18_R(crate::FieldReader); -impl RSVD_18_R { - pub(crate) fn new(bits: bool) -> Self { - RSVD_18_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RSVD_18_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rsvd_18` writer - "] -pub struct RSVD_18_W<'a> { - w: &'a mut W, -} -impl<'a> RSVD_18_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18); - self.w - } -} -#[doc = "Field `rsvd_17` reader - "] -pub struct RSVD_17_R(crate::FieldReader); -impl RSVD_17_R { - pub(crate) fn new(bits: bool) -> Self { - RSVD_17_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RSVD_17_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rsvd_17` writer - "] -pub struct RSVD_17_W<'a> { - w: &'a mut W, -} -impl<'a> RSVD_17_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w - } -} -#[doc = "Field `cr_i2c_end_clr` reader - "] -pub struct CR_I2C_END_CLR_R(crate::FieldReader); -impl CR_I2C_END_CLR_R { - pub(crate) fn new(bits: bool) -> Self { - CR_I2C_END_CLR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_END_CLR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_i2c_end_clr` writer - "] -pub struct CR_I2C_END_CLR_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_END_CLR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `cr_i2c_fer_mask` reader - "] -pub struct CR_I2C_FER_MASK_R(crate::FieldReader); -impl CR_I2C_FER_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - CR_I2C_FER_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_FER_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_i2c_fer_mask` writer - "] -pub struct CR_I2C_FER_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_FER_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13); - self.w - } -} -#[doc = "Field `cr_i2c_arb_mask` reader - "] -pub struct CR_I2C_ARB_MASK_R(crate::FieldReader); -impl CR_I2C_ARB_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - CR_I2C_ARB_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_ARB_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_i2c_arb_mask` writer - "] -pub struct CR_I2C_ARB_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_ARB_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} -#[doc = "Field `cr_i2c_nak_mask` reader - "] -pub struct CR_I2C_NAK_MASK_R(crate::FieldReader); -impl CR_I2C_NAK_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - CR_I2C_NAK_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_NAK_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_i2c_nak_mask` writer - "] -pub struct CR_I2C_NAK_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_NAK_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w - } -} -#[doc = "Field `cr_i2c_rxf_mask` reader - "] -pub struct CR_I2C_RXF_MASK_R(crate::FieldReader); -impl CR_I2C_RXF_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - CR_I2C_RXF_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_RXF_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_i2c_rxf_mask` writer - "] -pub struct CR_I2C_RXF_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_RXF_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); - self.w - } -} -#[doc = "Field `cr_i2c_txf_mask` reader - "] -pub struct CR_I2C_TXF_MASK_R(crate::FieldReader); -impl CR_I2C_TXF_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - CR_I2C_TXF_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_TXF_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_i2c_txf_mask` writer - "] -pub struct CR_I2C_TXF_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_TXF_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w - } -} -#[doc = "Field `cr_i2c_end_mask` reader - "] -pub struct CR_I2C_END_MASK_R(crate::FieldReader); -impl CR_I2C_END_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - CR_I2C_END_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_END_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_i2c_end_mask` writer - "] -pub struct CR_I2C_END_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_END_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `i2c_fer_int` reader - "] -pub struct I2C_FER_INT_R(crate::FieldReader); -impl I2C_FER_INT_R { - pub(crate) fn new(bits: bool) -> Self { - I2C_FER_INT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for I2C_FER_INT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `i2c_arb_int` reader - "] -pub struct I2C_ARB_INT_R(crate::FieldReader); -impl I2C_ARB_INT_R { - pub(crate) fn new(bits: bool) -> Self { - I2C_ARB_INT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for I2C_ARB_INT_R { - type Target = crate::FieldReader; +impl From> for R { #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `i2c_nak_int` reader - "] -pub struct I2C_NAK_INT_R(crate::FieldReader); -impl I2C_NAK_INT_R { - pub(crate) fn new(bits: bool) -> Self { - I2C_NAK_INT_R(crate::FieldReader::new(bits)) + fn from(reader: crate::R) -> Self { + R(reader) } } -impl core::ops::Deref for I2C_NAK_INT_R { - type Target = crate::FieldReader; +#[doc = "Register `i2c_int_sts` writer"] +pub struct W(crate::W); +impl core::ops::Deref for W { + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } -#[doc = "Field `i2c_rxf_int` reader - "] -pub struct I2C_RXF_INT_R(crate::FieldReader); -impl I2C_RXF_INT_R { - pub(crate) fn new(bits: bool) -> Self { - I2C_RXF_INT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for I2C_RXF_INT_R { - type Target = crate::FieldReader; +impl core::ops::DerefMut for W { #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `i2c_txf_int` reader - "] -pub struct I2C_TXF_INT_R(crate::FieldReader); -impl I2C_TXF_INT_R { - pub(crate) fn new(bits: bool) -> Self { - I2C_TXF_INT_R(crate::FieldReader::new(bits)) + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 } } -impl core::ops::Deref for I2C_TXF_INT_R { - type Target = crate::FieldReader; +impl From> for W { #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + fn from(writer: crate::W) -> Self { + W(writer) } } #[doc = "Field `i2c_end_int` reader - "] -pub struct I2C_END_INT_R(crate::FieldReader); -impl I2C_END_INT_R { - pub(crate) fn new(bits: bool) -> Self { - I2C_END_INT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for I2C_END_INT_R { - type Target = crate::FieldReader; +pub type I2C_END_INT_R = crate::BitReader; +#[doc = "Field `i2c_txf_int` reader - "] +pub type I2C_TXF_INT_R = crate::BitReader; +#[doc = "Field `i2c_rxf_int` reader - "] +pub type I2C_RXF_INT_R = crate::BitReader; +#[doc = "Field `i2c_nak_int` reader - "] +pub type I2C_NAK_INT_R = crate::BitReader; +#[doc = "Field `i2c_arb_int` reader - "] +pub type I2C_ARB_INT_R = crate::BitReader; +#[doc = "Field `i2c_fer_int` reader - "] +pub type I2C_FER_INT_R = crate::BitReader; +#[doc = "Field `cr_i2c_end_mask` reader - "] +pub type CR_I2C_END_MASK_R = crate::BitReader; +#[doc = "Field `cr_i2c_end_mask` writer - "] +pub type CR_I2C_END_MASK_W<'a, const O: u8> = crate::BitWriter<'a, u32, I2C_INT_STS_SPEC, bool, O>; +#[doc = "Field `cr_i2c_txf_mask` reader - "] +pub type CR_I2C_TXF_MASK_R = crate::BitReader; +#[doc = "Field `cr_i2c_txf_mask` writer - "] +pub type CR_I2C_TXF_MASK_W<'a, const O: u8> = crate::BitWriter<'a, u32, I2C_INT_STS_SPEC, bool, O>; +#[doc = "Field `cr_i2c_rxf_mask` reader - "] +pub type CR_I2C_RXF_MASK_R = crate::BitReader; +#[doc = "Field `cr_i2c_rxf_mask` writer - "] +pub type CR_I2C_RXF_MASK_W<'a, const O: u8> = crate::BitWriter<'a, u32, I2C_INT_STS_SPEC, bool, O>; +#[doc = "Field `cr_i2c_nak_mask` reader - "] +pub type CR_I2C_NAK_MASK_R = crate::BitReader; +#[doc = "Field `cr_i2c_nak_mask` writer - "] +pub type CR_I2C_NAK_MASK_W<'a, const O: u8> = crate::BitWriter<'a, u32, I2C_INT_STS_SPEC, bool, O>; +#[doc = "Field `cr_i2c_arb_mask` reader - "] +pub type CR_I2C_ARB_MASK_R = crate::BitReader; +#[doc = "Field `cr_i2c_arb_mask` writer - "] +pub type CR_I2C_ARB_MASK_W<'a, const O: u8> = crate::BitWriter<'a, u32, I2C_INT_STS_SPEC, bool, O>; +#[doc = "Field `cr_i2c_fer_mask` reader - "] +pub type CR_I2C_FER_MASK_R = crate::BitReader; +#[doc = "Field `cr_i2c_fer_mask` writer - "] +pub type CR_I2C_FER_MASK_W<'a, const O: u8> = crate::BitWriter<'a, u32, I2C_INT_STS_SPEC, bool, O>; +#[doc = "Field `cr_i2c_end_clr` reader - "] +pub type CR_I2C_END_CLR_R = crate::BitReader; +#[doc = "Field `cr_i2c_end_clr` writer - "] +pub type CR_I2C_END_CLR_W<'a, const O: u8> = crate::BitWriter<'a, u32, I2C_INT_STS_SPEC, bool, O>; +#[doc = "Field `rsvd_17` reader - "] +pub type RSVD_17_R = crate::BitReader; +#[doc = "Field `rsvd_17` writer - "] +pub type RSVD_17_W<'a, const O: u8> = crate::BitWriter<'a, u32, I2C_INT_STS_SPEC, bool, O>; +#[doc = "Field `rsvd_18` reader - "] +pub type RSVD_18_R = crate::BitReader; +#[doc = "Field `rsvd_18` writer - "] +pub type RSVD_18_W<'a, const O: u8> = crate::BitWriter<'a, u32, I2C_INT_STS_SPEC, bool, O>; +#[doc = "Field `cr_i2c_nak_clr` reader - "] +pub type CR_I2C_NAK_CLR_R = crate::BitReader; +#[doc = "Field `cr_i2c_nak_clr` writer - "] +pub type CR_I2C_NAK_CLR_W<'a, const O: u8> = crate::BitWriter<'a, u32, I2C_INT_STS_SPEC, bool, O>; +#[doc = "Field `cr_i2c_arb_clr` reader - "] +pub type CR_I2C_ARB_CLR_R = crate::BitReader; +#[doc = "Field `cr_i2c_arb_clr` writer - "] +pub type CR_I2C_ARB_CLR_W<'a, const O: u8> = crate::BitWriter<'a, u32, I2C_INT_STS_SPEC, bool, O>; +#[doc = "Field `rsvd_21` reader - "] +pub type RSVD_21_R = crate::BitReader; +#[doc = "Field `rsvd_21` writer - "] +pub type RSVD_21_W<'a, const O: u8> = crate::BitWriter<'a, u32, I2C_INT_STS_SPEC, bool, O>; +#[doc = "Field `cr_i2c_end_en` reader - "] +pub type CR_I2C_END_EN_R = crate::BitReader; +#[doc = "Field `cr_i2c_end_en` writer - "] +pub type CR_I2C_END_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, I2C_INT_STS_SPEC, bool, O>; +#[doc = "Field `cr_i2c_txf_en` reader - "] +pub type CR_I2C_TXF_EN_R = crate::BitReader; +#[doc = "Field `cr_i2c_txf_en` writer - "] +pub type CR_I2C_TXF_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, I2C_INT_STS_SPEC, bool, O>; +#[doc = "Field `cr_i2c_rxf_en` reader - "] +pub type CR_I2C_RXF_EN_R = crate::BitReader; +#[doc = "Field `cr_i2c_rxf_en` writer - "] +pub type CR_I2C_RXF_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, I2C_INT_STS_SPEC, bool, O>; +#[doc = "Field `cr_i2c_nak_en` reader - "] +pub type CR_I2C_NAK_EN_R = crate::BitReader; +#[doc = "Field `cr_i2c_nak_en` writer - "] +pub type CR_I2C_NAK_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, I2C_INT_STS_SPEC, bool, O>; +#[doc = "Field `cr_i2c_arb_en` reader - "] +pub type CR_I2C_ARB_EN_R = crate::BitReader; +#[doc = "Field `cr_i2c_arb_en` writer - "] +pub type CR_I2C_ARB_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, I2C_INT_STS_SPEC, bool, O>; +#[doc = "Field `cr_i2c_fer_en` reader - "] +pub type CR_I2C_FER_EN_R = crate::BitReader; +#[doc = "Field `cr_i2c_fer_en` writer - "] +pub type CR_I2C_FER_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, I2C_INT_STS_SPEC, bool, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn i2c_end_int(&self) -> I2C_END_INT_R { + I2C_END_INT_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bit 29"] + #[doc = "Bit 1"] #[inline(always)] - pub fn cr_i2c_fer_en(&self) -> CR_I2C_FER_EN_R { - CR_I2C_FER_EN_R::new(((self.bits >> 29) & 0x01) != 0) + pub fn i2c_txf_int(&self) -> I2C_TXF_INT_R { + I2C_TXF_INT_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 28"] + #[doc = "Bit 2"] #[inline(always)] - pub fn cr_i2c_arb_en(&self) -> CR_I2C_ARB_EN_R { - CR_I2C_ARB_EN_R::new(((self.bits >> 28) & 0x01) != 0) + pub fn i2c_rxf_int(&self) -> I2C_RXF_INT_R { + I2C_RXF_INT_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 27"] + #[doc = "Bit 3"] #[inline(always)] - pub fn cr_i2c_nak_en(&self) -> CR_I2C_NAK_EN_R { - CR_I2C_NAK_EN_R::new(((self.bits >> 27) & 0x01) != 0) + pub fn i2c_nak_int(&self) -> I2C_NAK_INT_R { + I2C_NAK_INT_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bit 26"] + #[doc = "Bit 4"] #[inline(always)] - pub fn cr_i2c_rxf_en(&self) -> CR_I2C_RXF_EN_R { - CR_I2C_RXF_EN_R::new(((self.bits >> 26) & 0x01) != 0) + pub fn i2c_arb_int(&self) -> I2C_ARB_INT_R { + I2C_ARB_INT_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 25"] + #[doc = "Bit 5"] #[inline(always)] - pub fn cr_i2c_txf_en(&self) -> CR_I2C_TXF_EN_R { - CR_I2C_TXF_EN_R::new(((self.bits >> 25) & 0x01) != 0) + pub fn i2c_fer_int(&self) -> I2C_FER_INT_R { + I2C_FER_INT_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 24"] + #[doc = "Bit 8"] #[inline(always)] - pub fn cr_i2c_end_en(&self) -> CR_I2C_END_EN_R { - CR_I2C_END_EN_R::new(((self.bits >> 24) & 0x01) != 0) + pub fn cr_i2c_end_mask(&self) -> CR_I2C_END_MASK_R { + CR_I2C_END_MASK_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bit 21"] + #[doc = "Bit 9"] #[inline(always)] - pub fn rsvd_21(&self) -> RSVD_21_R { - RSVD_21_R::new(((self.bits >> 21) & 0x01) != 0) + pub fn cr_i2c_txf_mask(&self) -> CR_I2C_TXF_MASK_R { + CR_I2C_TXF_MASK_R::new(((self.bits >> 9) & 1) != 0) } - #[doc = "Bit 20"] + #[doc = "Bit 10"] #[inline(always)] - pub fn cr_i2c_arb_clr(&self) -> CR_I2C_ARB_CLR_R { - CR_I2C_ARB_CLR_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn cr_i2c_rxf_mask(&self) -> CR_I2C_RXF_MASK_R { + CR_I2C_RXF_MASK_R::new(((self.bits >> 10) & 1) != 0) } - #[doc = "Bit 19"] + #[doc = "Bit 11"] #[inline(always)] - pub fn cr_i2c_nak_clr(&self) -> CR_I2C_NAK_CLR_R { - CR_I2C_NAK_CLR_R::new(((self.bits >> 19) & 0x01) != 0) + pub fn cr_i2c_nak_mask(&self) -> CR_I2C_NAK_MASK_R { + CR_I2C_NAK_MASK_R::new(((self.bits >> 11) & 1) != 0) } - #[doc = "Bit 18"] + #[doc = "Bit 12"] #[inline(always)] - pub fn rsvd_18(&self) -> RSVD_18_R { - RSVD_18_R::new(((self.bits >> 18) & 0x01) != 0) + pub fn cr_i2c_arb_mask(&self) -> CR_I2C_ARB_MASK_R { + CR_I2C_ARB_MASK_R::new(((self.bits >> 12) & 1) != 0) } - #[doc = "Bit 17"] + #[doc = "Bit 13"] #[inline(always)] - pub fn rsvd_17(&self) -> RSVD_17_R { - RSVD_17_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn cr_i2c_fer_mask(&self) -> CR_I2C_FER_MASK_R { + CR_I2C_FER_MASK_R::new(((self.bits >> 13) & 1) != 0) } #[doc = "Bit 16"] #[inline(always)] pub fn cr_i2c_end_clr(&self) -> CR_I2C_END_CLR_R { - CR_I2C_END_CLR_R::new(((self.bits >> 16) & 0x01) != 0) - } - #[doc = "Bit 13"] - #[inline(always)] - pub fn cr_i2c_fer_mask(&self) -> CR_I2C_FER_MASK_R { - CR_I2C_FER_MASK_R::new(((self.bits >> 13) & 0x01) != 0) + CR_I2C_END_CLR_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 12"] + #[doc = "Bit 17"] #[inline(always)] - pub fn cr_i2c_arb_mask(&self) -> CR_I2C_ARB_MASK_R { - CR_I2C_ARB_MASK_R::new(((self.bits >> 12) & 0x01) != 0) + pub fn rsvd_17(&self) -> RSVD_17_R { + RSVD_17_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bit 11"] + #[doc = "Bit 18"] #[inline(always)] - pub fn cr_i2c_nak_mask(&self) -> CR_I2C_NAK_MASK_R { - CR_I2C_NAK_MASK_R::new(((self.bits >> 11) & 0x01) != 0) + pub fn rsvd_18(&self) -> RSVD_18_R { + RSVD_18_R::new(((self.bits >> 18) & 1) != 0) } - #[doc = "Bit 10"] + #[doc = "Bit 19"] #[inline(always)] - pub fn cr_i2c_rxf_mask(&self) -> CR_I2C_RXF_MASK_R { - CR_I2C_RXF_MASK_R::new(((self.bits >> 10) & 0x01) != 0) + pub fn cr_i2c_nak_clr(&self) -> CR_I2C_NAK_CLR_R { + CR_I2C_NAK_CLR_R::new(((self.bits >> 19) & 1) != 0) } - #[doc = "Bit 9"] + #[doc = "Bit 20"] #[inline(always)] - pub fn cr_i2c_txf_mask(&self) -> CR_I2C_TXF_MASK_R { - CR_I2C_TXF_MASK_R::new(((self.bits >> 9) & 0x01) != 0) + pub fn cr_i2c_arb_clr(&self) -> CR_I2C_ARB_CLR_R { + CR_I2C_ARB_CLR_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bit 8"] + #[doc = "Bit 21"] #[inline(always)] - pub fn cr_i2c_end_mask(&self) -> CR_I2C_END_MASK_R { - CR_I2C_END_MASK_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn rsvd_21(&self) -> RSVD_21_R { + RSVD_21_R::new(((self.bits >> 21) & 1) != 0) } - #[doc = "Bit 5"] + #[doc = "Bit 24"] #[inline(always)] - pub fn i2c_fer_int(&self) -> I2C_FER_INT_R { - I2C_FER_INT_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn cr_i2c_end_en(&self) -> CR_I2C_END_EN_R { + CR_I2C_END_EN_R::new(((self.bits >> 24) & 1) != 0) } - #[doc = "Bit 4"] + #[doc = "Bit 25"] #[inline(always)] - pub fn i2c_arb_int(&self) -> I2C_ARB_INT_R { - I2C_ARB_INT_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn cr_i2c_txf_en(&self) -> CR_I2C_TXF_EN_R { + CR_I2C_TXF_EN_R::new(((self.bits >> 25) & 1) != 0) } - #[doc = "Bit 3"] + #[doc = "Bit 26"] #[inline(always)] - pub fn i2c_nak_int(&self) -> I2C_NAK_INT_R { - I2C_NAK_INT_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn cr_i2c_rxf_en(&self) -> CR_I2C_RXF_EN_R { + CR_I2C_RXF_EN_R::new(((self.bits >> 26) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bit 27"] #[inline(always)] - pub fn i2c_rxf_int(&self) -> I2C_RXF_INT_R { - I2C_RXF_INT_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn cr_i2c_nak_en(&self) -> CR_I2C_NAK_EN_R { + CR_I2C_NAK_EN_R::new(((self.bits >> 27) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 28"] #[inline(always)] - pub fn i2c_txf_int(&self) -> I2C_TXF_INT_R { - I2C_TXF_INT_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn cr_i2c_arb_en(&self) -> CR_I2C_ARB_EN_R { + CR_I2C_ARB_EN_R::new(((self.bits >> 28) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 29"] #[inline(always)] - pub fn i2c_end_int(&self) -> I2C_END_INT_R { - I2C_END_INT_R::new((self.bits & 0x01) != 0) + pub fn cr_i2c_fer_en(&self) -> CR_I2C_FER_EN_R { + CR_I2C_FER_EN_R::new(((self.bits >> 29) & 1) != 0) } } impl W { - #[doc = "Bit 29"] + #[doc = "Bit 8"] #[inline(always)] - pub fn cr_i2c_fer_en(&mut self) -> CR_I2C_FER_EN_W { - CR_I2C_FER_EN_W { w: self } + #[must_use] + pub fn cr_i2c_end_mask(&mut self) -> CR_I2C_END_MASK_W<8> { + CR_I2C_END_MASK_W::new(self) } - #[doc = "Bit 28"] + #[doc = "Bit 9"] #[inline(always)] - pub fn cr_i2c_arb_en(&mut self) -> CR_I2C_ARB_EN_W { - CR_I2C_ARB_EN_W { w: self } + #[must_use] + pub fn cr_i2c_txf_mask(&mut self) -> CR_I2C_TXF_MASK_W<9> { + CR_I2C_TXF_MASK_W::new(self) } - #[doc = "Bit 27"] + #[doc = "Bit 10"] #[inline(always)] - pub fn cr_i2c_nak_en(&mut self) -> CR_I2C_NAK_EN_W { - CR_I2C_NAK_EN_W { w: self } + #[must_use] + pub fn cr_i2c_rxf_mask(&mut self) -> CR_I2C_RXF_MASK_W<10> { + CR_I2C_RXF_MASK_W::new(self) } - #[doc = "Bit 26"] + #[doc = "Bit 11"] #[inline(always)] - pub fn cr_i2c_rxf_en(&mut self) -> CR_I2C_RXF_EN_W { - CR_I2C_RXF_EN_W { w: self } + #[must_use] + pub fn cr_i2c_nak_mask(&mut self) -> CR_I2C_NAK_MASK_W<11> { + CR_I2C_NAK_MASK_W::new(self) } - #[doc = "Bit 25"] + #[doc = "Bit 12"] #[inline(always)] - pub fn cr_i2c_txf_en(&mut self) -> CR_I2C_TXF_EN_W { - CR_I2C_TXF_EN_W { w: self } + #[must_use] + pub fn cr_i2c_arb_mask(&mut self) -> CR_I2C_ARB_MASK_W<12> { + CR_I2C_ARB_MASK_W::new(self) } - #[doc = "Bit 24"] + #[doc = "Bit 13"] #[inline(always)] - pub fn cr_i2c_end_en(&mut self) -> CR_I2C_END_EN_W { - CR_I2C_END_EN_W { w: self } + #[must_use] + pub fn cr_i2c_fer_mask(&mut self) -> CR_I2C_FER_MASK_W<13> { + CR_I2C_FER_MASK_W::new(self) } - #[doc = "Bit 21"] + #[doc = "Bit 16"] #[inline(always)] - pub fn rsvd_21(&mut self) -> RSVD_21_W { - RSVD_21_W { w: self } + #[must_use] + pub fn cr_i2c_end_clr(&mut self) -> CR_I2C_END_CLR_W<16> { + CR_I2C_END_CLR_W::new(self) } - #[doc = "Bit 20"] + #[doc = "Bit 17"] #[inline(always)] - pub fn cr_i2c_arb_clr(&mut self) -> CR_I2C_ARB_CLR_W { - CR_I2C_ARB_CLR_W { w: self } + #[must_use] + pub fn rsvd_17(&mut self) -> RSVD_17_W<17> { + RSVD_17_W::new(self) } - #[doc = "Bit 19"] + #[doc = "Bit 18"] #[inline(always)] - pub fn cr_i2c_nak_clr(&mut self) -> CR_I2C_NAK_CLR_W { - CR_I2C_NAK_CLR_W { w: self } + #[must_use] + pub fn rsvd_18(&mut self) -> RSVD_18_W<18> { + RSVD_18_W::new(self) } - #[doc = "Bit 18"] + #[doc = "Bit 19"] #[inline(always)] - pub fn rsvd_18(&mut self) -> RSVD_18_W { - RSVD_18_W { w: self } + #[must_use] + pub fn cr_i2c_nak_clr(&mut self) -> CR_I2C_NAK_CLR_W<19> { + CR_I2C_NAK_CLR_W::new(self) } - #[doc = "Bit 17"] + #[doc = "Bit 20"] #[inline(always)] - pub fn rsvd_17(&mut self) -> RSVD_17_W { - RSVD_17_W { w: self } + #[must_use] + pub fn cr_i2c_arb_clr(&mut self) -> CR_I2C_ARB_CLR_W<20> { + CR_I2C_ARB_CLR_W::new(self) } - #[doc = "Bit 16"] + #[doc = "Bit 21"] #[inline(always)] - pub fn cr_i2c_end_clr(&mut self) -> CR_I2C_END_CLR_W { - CR_I2C_END_CLR_W { w: self } + #[must_use] + pub fn rsvd_21(&mut self) -> RSVD_21_W<21> { + RSVD_21_W::new(self) } - #[doc = "Bit 13"] + #[doc = "Bit 24"] #[inline(always)] - pub fn cr_i2c_fer_mask(&mut self) -> CR_I2C_FER_MASK_W { - CR_I2C_FER_MASK_W { w: self } + #[must_use] + pub fn cr_i2c_end_en(&mut self) -> CR_I2C_END_EN_W<24> { + CR_I2C_END_EN_W::new(self) } - #[doc = "Bit 12"] + #[doc = "Bit 25"] #[inline(always)] - pub fn cr_i2c_arb_mask(&mut self) -> CR_I2C_ARB_MASK_W { - CR_I2C_ARB_MASK_W { w: self } + #[must_use] + pub fn cr_i2c_txf_en(&mut self) -> CR_I2C_TXF_EN_W<25> { + CR_I2C_TXF_EN_W::new(self) } - #[doc = "Bit 11"] + #[doc = "Bit 26"] #[inline(always)] - pub fn cr_i2c_nak_mask(&mut self) -> CR_I2C_NAK_MASK_W { - CR_I2C_NAK_MASK_W { w: self } + #[must_use] + pub fn cr_i2c_rxf_en(&mut self) -> CR_I2C_RXF_EN_W<26> { + CR_I2C_RXF_EN_W::new(self) } - #[doc = "Bit 10"] + #[doc = "Bit 27"] #[inline(always)] - pub fn cr_i2c_rxf_mask(&mut self) -> CR_I2C_RXF_MASK_W { - CR_I2C_RXF_MASK_W { w: self } + #[must_use] + pub fn cr_i2c_nak_en(&mut self) -> CR_I2C_NAK_EN_W<27> { + CR_I2C_NAK_EN_W::new(self) } - #[doc = "Bit 9"] + #[doc = "Bit 28"] #[inline(always)] - pub fn cr_i2c_txf_mask(&mut self) -> CR_I2C_TXF_MASK_W { - CR_I2C_TXF_MASK_W { w: self } + #[must_use] + pub fn cr_i2c_arb_en(&mut self) -> CR_I2C_ARB_EN_W<28> { + CR_I2C_ARB_EN_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bit 29"] #[inline(always)] - pub fn cr_i2c_end_mask(&mut self) -> CR_I2C_END_MASK_W { - CR_I2C_END_MASK_W { w: self } + #[must_use] + pub fn cr_i2c_fer_en(&mut self) -> CR_I2C_FER_EN_W<29> { + CR_I2C_FER_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -995,11 +368,10 @@ impl crate::Readable for I2C_INT_STS_SPEC { #[doc = "`write(|w| ..)` method takes [i2c_int_sts::W](W) writer structure"] impl crate::Writable for I2C_INT_STS_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets i2c_int_sts to value 0x3f00_3f00"] impl crate::Resettable for I2C_INT_STS_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x3f00_3f00 - } + const RESET_VALUE: Self::Ux = 0x3f00_3f00; } diff --git a/src/i2c/i2c_prd_data.rs b/src/i2c/i2c_prd_data.rs index 8edb3f9..c7da98a 100644 --- a/src/i2c/i2c_prd_data.rs +++ b/src/i2c/i2c_prd_data.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,159 +28,81 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `cr_i2c_prd_d_ph_3` reader - "] -pub struct CR_I2C_PRD_D_PH_3_R(crate::FieldReader); -impl CR_I2C_PRD_D_PH_3_R { - pub(crate) fn new(bits: u8) -> Self { - CR_I2C_PRD_D_PH_3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_PRD_D_PH_3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_i2c_prd_d_ph_3` writer - "] -pub struct CR_I2C_PRD_D_PH_3_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_PRD_D_PH_3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 24)) | ((value as u32 & 0xff) << 24); - self.w - } -} -#[doc = "Field `cr_i2c_prd_d_ph_2` reader - "] -pub struct CR_I2C_PRD_D_PH_2_R(crate::FieldReader); -impl CR_I2C_PRD_D_PH_2_R { - pub(crate) fn new(bits: u8) -> Self { - CR_I2C_PRD_D_PH_2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_PRD_D_PH_2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_i2c_prd_d_ph_2` writer - "] -pub struct CR_I2C_PRD_D_PH_2_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_PRD_D_PH_2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 16)) | ((value as u32 & 0xff) << 16); - self.w - } -} -#[doc = "Field `cr_i2c_prd_d_ph_1` reader - "] -pub struct CR_I2C_PRD_D_PH_1_R(crate::FieldReader); -impl CR_I2C_PRD_D_PH_1_R { - pub(crate) fn new(bits: u8) -> Self { - CR_I2C_PRD_D_PH_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_PRD_D_PH_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_i2c_prd_d_ph_1` writer - "] -pub struct CR_I2C_PRD_D_PH_1_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_PRD_D_PH_1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8); - self.w - } -} #[doc = "Field `cr_i2c_prd_d_ph_0` reader - "] -pub struct CR_I2C_PRD_D_PH_0_R(crate::FieldReader); -impl CR_I2C_PRD_D_PH_0_R { - pub(crate) fn new(bits: u8) -> Self { - CR_I2C_PRD_D_PH_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_PRD_D_PH_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_I2C_PRD_D_PH_0_R = crate::FieldReader; #[doc = "Field `cr_i2c_prd_d_ph_0` writer - "] -pub struct CR_I2C_PRD_D_PH_0_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_PRD_D_PH_0_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type CR_I2C_PRD_D_PH_0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, I2C_PRD_DATA_SPEC, u8, u8, 8, O>; +#[doc = "Field `cr_i2c_prd_d_ph_1` reader - "] +pub type CR_I2C_PRD_D_PH_1_R = crate::FieldReader; +#[doc = "Field `cr_i2c_prd_d_ph_1` writer - "] +pub type CR_I2C_PRD_D_PH_1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, I2C_PRD_DATA_SPEC, u8, u8, 8, O>; +#[doc = "Field `cr_i2c_prd_d_ph_2` reader - "] +pub type CR_I2C_PRD_D_PH_2_R = crate::FieldReader; +#[doc = "Field `cr_i2c_prd_d_ph_2` writer - "] +pub type CR_I2C_PRD_D_PH_2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, I2C_PRD_DATA_SPEC, u8, u8, 8, O>; +#[doc = "Field `cr_i2c_prd_d_ph_3` reader - "] +pub type CR_I2C_PRD_D_PH_3_R = crate::FieldReader; +#[doc = "Field `cr_i2c_prd_d_ph_3` writer - "] +pub type CR_I2C_PRD_D_PH_3_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, I2C_PRD_DATA_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:7"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff); - self.w + pub fn cr_i2c_prd_d_ph_0(&self) -> CR_I2C_PRD_D_PH_0_R { + CR_I2C_PRD_D_PH_0_R::new((self.bits & 0xff) as u8) } -} -impl R { - #[doc = "Bits 24:31"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn cr_i2c_prd_d_ph_3(&self) -> CR_I2C_PRD_D_PH_3_R { - CR_I2C_PRD_D_PH_3_R::new(((self.bits >> 24) & 0xff) as u8) + pub fn cr_i2c_prd_d_ph_1(&self) -> CR_I2C_PRD_D_PH_1_R { + CR_I2C_PRD_D_PH_1_R::new(((self.bits >> 8) & 0xff) as u8) } #[doc = "Bits 16:23"] #[inline(always)] pub fn cr_i2c_prd_d_ph_2(&self) -> CR_I2C_PRD_D_PH_2_R { CR_I2C_PRD_D_PH_2_R::new(((self.bits >> 16) & 0xff) as u8) } - #[doc = "Bits 8:15"] - #[inline(always)] - pub fn cr_i2c_prd_d_ph_1(&self) -> CR_I2C_PRD_D_PH_1_R { - CR_I2C_PRD_D_PH_1_R::new(((self.bits >> 8) & 0xff) as u8) - } - #[doc = "Bits 0:7"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn cr_i2c_prd_d_ph_0(&self) -> CR_I2C_PRD_D_PH_0_R { - CR_I2C_PRD_D_PH_0_R::new((self.bits & 0xff) as u8) + pub fn cr_i2c_prd_d_ph_3(&self) -> CR_I2C_PRD_D_PH_3_R { + CR_I2C_PRD_D_PH_3_R::new(((self.bits >> 24) & 0xff) as u8) } } impl W { - #[doc = "Bits 24:31"] + #[doc = "Bits 0:7"] #[inline(always)] - pub fn cr_i2c_prd_d_ph_3(&mut self) -> CR_I2C_PRD_D_PH_3_W { - CR_I2C_PRD_D_PH_3_W { w: self } + #[must_use] + pub fn cr_i2c_prd_d_ph_0(&mut self) -> CR_I2C_PRD_D_PH_0_W<0> { + CR_I2C_PRD_D_PH_0_W::new(self) } - #[doc = "Bits 16:23"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn cr_i2c_prd_d_ph_2(&mut self) -> CR_I2C_PRD_D_PH_2_W { - CR_I2C_PRD_D_PH_2_W { w: self } + #[must_use] + pub fn cr_i2c_prd_d_ph_1(&mut self) -> CR_I2C_PRD_D_PH_1_W<8> { + CR_I2C_PRD_D_PH_1_W::new(self) } - #[doc = "Bits 8:15"] + #[doc = "Bits 16:23"] #[inline(always)] - pub fn cr_i2c_prd_d_ph_1(&mut self) -> CR_I2C_PRD_D_PH_1_W { - CR_I2C_PRD_D_PH_1_W { w: self } + #[must_use] + pub fn cr_i2c_prd_d_ph_2(&mut self) -> CR_I2C_PRD_D_PH_2_W<16> { + CR_I2C_PRD_D_PH_2_W::new(self) } - #[doc = "Bits 0:7"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn cr_i2c_prd_d_ph_0(&mut self) -> CR_I2C_PRD_D_PH_0_W { - CR_I2C_PRD_D_PH_0_W { w: self } + #[must_use] + pub fn cr_i2c_prd_d_ph_3(&mut self) -> CR_I2C_PRD_D_PH_3_W<24> { + CR_I2C_PRD_D_PH_3_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -197,11 +120,10 @@ impl crate::Readable for I2C_PRD_DATA_SPEC { #[doc = "`write(|w| ..)` method takes [i2c_prd_data::W](W) writer structure"] impl crate::Writable for I2C_PRD_DATA_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets i2c_prd_data to value 0x0f0f_0f0f"] impl crate::Resettable for I2C_PRD_DATA_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0f0f_0f0f - } + const RESET_VALUE: Self::Ux = 0x0f0f_0f0f; } diff --git a/src/i2c/i2c_prd_start.rs b/src/i2c/i2c_prd_start.rs index b0c29d6..90a66d5 100644 --- a/src/i2c/i2c_prd_start.rs +++ b/src/i2c/i2c_prd_start.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,159 +28,81 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `cr_i2c_prd_s_ph_3` reader - "] -pub struct CR_I2C_PRD_S_PH_3_R(crate::FieldReader); -impl CR_I2C_PRD_S_PH_3_R { - pub(crate) fn new(bits: u8) -> Self { - CR_I2C_PRD_S_PH_3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_PRD_S_PH_3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_i2c_prd_s_ph_3` writer - "] -pub struct CR_I2C_PRD_S_PH_3_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_PRD_S_PH_3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 24)) | ((value as u32 & 0xff) << 24); - self.w - } -} -#[doc = "Field `cr_i2c_prd_s_ph_2` reader - "] -pub struct CR_I2C_PRD_S_PH_2_R(crate::FieldReader); -impl CR_I2C_PRD_S_PH_2_R { - pub(crate) fn new(bits: u8) -> Self { - CR_I2C_PRD_S_PH_2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_PRD_S_PH_2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_i2c_prd_s_ph_2` writer - "] -pub struct CR_I2C_PRD_S_PH_2_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_PRD_S_PH_2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 16)) | ((value as u32 & 0xff) << 16); - self.w - } -} -#[doc = "Field `cr_i2c_prd_s_ph_1` reader - "] -pub struct CR_I2C_PRD_S_PH_1_R(crate::FieldReader); -impl CR_I2C_PRD_S_PH_1_R { - pub(crate) fn new(bits: u8) -> Self { - CR_I2C_PRD_S_PH_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_PRD_S_PH_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_i2c_prd_s_ph_1` writer - "] -pub struct CR_I2C_PRD_S_PH_1_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_PRD_S_PH_1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8); - self.w - } -} #[doc = "Field `cr_i2c_prd_s_ph_0` reader - "] -pub struct CR_I2C_PRD_S_PH_0_R(crate::FieldReader); -impl CR_I2C_PRD_S_PH_0_R { - pub(crate) fn new(bits: u8) -> Self { - CR_I2C_PRD_S_PH_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_PRD_S_PH_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_I2C_PRD_S_PH_0_R = crate::FieldReader; #[doc = "Field `cr_i2c_prd_s_ph_0` writer - "] -pub struct CR_I2C_PRD_S_PH_0_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_PRD_S_PH_0_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type CR_I2C_PRD_S_PH_0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, I2C_PRD_START_SPEC, u8, u8, 8, O>; +#[doc = "Field `cr_i2c_prd_s_ph_1` reader - "] +pub type CR_I2C_PRD_S_PH_1_R = crate::FieldReader; +#[doc = "Field `cr_i2c_prd_s_ph_1` writer - "] +pub type CR_I2C_PRD_S_PH_1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, I2C_PRD_START_SPEC, u8, u8, 8, O>; +#[doc = "Field `cr_i2c_prd_s_ph_2` reader - "] +pub type CR_I2C_PRD_S_PH_2_R = crate::FieldReader; +#[doc = "Field `cr_i2c_prd_s_ph_2` writer - "] +pub type CR_I2C_PRD_S_PH_2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, I2C_PRD_START_SPEC, u8, u8, 8, O>; +#[doc = "Field `cr_i2c_prd_s_ph_3` reader - "] +pub type CR_I2C_PRD_S_PH_3_R = crate::FieldReader; +#[doc = "Field `cr_i2c_prd_s_ph_3` writer - "] +pub type CR_I2C_PRD_S_PH_3_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, I2C_PRD_START_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:7"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff); - self.w + pub fn cr_i2c_prd_s_ph_0(&self) -> CR_I2C_PRD_S_PH_0_R { + CR_I2C_PRD_S_PH_0_R::new((self.bits & 0xff) as u8) } -} -impl R { - #[doc = "Bits 24:31"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn cr_i2c_prd_s_ph_3(&self) -> CR_I2C_PRD_S_PH_3_R { - CR_I2C_PRD_S_PH_3_R::new(((self.bits >> 24) & 0xff) as u8) + pub fn cr_i2c_prd_s_ph_1(&self) -> CR_I2C_PRD_S_PH_1_R { + CR_I2C_PRD_S_PH_1_R::new(((self.bits >> 8) & 0xff) as u8) } #[doc = "Bits 16:23"] #[inline(always)] pub fn cr_i2c_prd_s_ph_2(&self) -> CR_I2C_PRD_S_PH_2_R { CR_I2C_PRD_S_PH_2_R::new(((self.bits >> 16) & 0xff) as u8) } - #[doc = "Bits 8:15"] - #[inline(always)] - pub fn cr_i2c_prd_s_ph_1(&self) -> CR_I2C_PRD_S_PH_1_R { - CR_I2C_PRD_S_PH_1_R::new(((self.bits >> 8) & 0xff) as u8) - } - #[doc = "Bits 0:7"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn cr_i2c_prd_s_ph_0(&self) -> CR_I2C_PRD_S_PH_0_R { - CR_I2C_PRD_S_PH_0_R::new((self.bits & 0xff) as u8) + pub fn cr_i2c_prd_s_ph_3(&self) -> CR_I2C_PRD_S_PH_3_R { + CR_I2C_PRD_S_PH_3_R::new(((self.bits >> 24) & 0xff) as u8) } } impl W { - #[doc = "Bits 24:31"] + #[doc = "Bits 0:7"] #[inline(always)] - pub fn cr_i2c_prd_s_ph_3(&mut self) -> CR_I2C_PRD_S_PH_3_W { - CR_I2C_PRD_S_PH_3_W { w: self } + #[must_use] + pub fn cr_i2c_prd_s_ph_0(&mut self) -> CR_I2C_PRD_S_PH_0_W<0> { + CR_I2C_PRD_S_PH_0_W::new(self) } - #[doc = "Bits 16:23"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn cr_i2c_prd_s_ph_2(&mut self) -> CR_I2C_PRD_S_PH_2_W { - CR_I2C_PRD_S_PH_2_W { w: self } + #[must_use] + pub fn cr_i2c_prd_s_ph_1(&mut self) -> CR_I2C_PRD_S_PH_1_W<8> { + CR_I2C_PRD_S_PH_1_W::new(self) } - #[doc = "Bits 8:15"] + #[doc = "Bits 16:23"] #[inline(always)] - pub fn cr_i2c_prd_s_ph_1(&mut self) -> CR_I2C_PRD_S_PH_1_W { - CR_I2C_PRD_S_PH_1_W { w: self } + #[must_use] + pub fn cr_i2c_prd_s_ph_2(&mut self) -> CR_I2C_PRD_S_PH_2_W<16> { + CR_I2C_PRD_S_PH_2_W::new(self) } - #[doc = "Bits 0:7"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn cr_i2c_prd_s_ph_0(&mut self) -> CR_I2C_PRD_S_PH_0_W { - CR_I2C_PRD_S_PH_0_W { w: self } + #[must_use] + pub fn cr_i2c_prd_s_ph_3(&mut self) -> CR_I2C_PRD_S_PH_3_W<24> { + CR_I2C_PRD_S_PH_3_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -197,11 +120,10 @@ impl crate::Readable for I2C_PRD_START_SPEC { #[doc = "`write(|w| ..)` method takes [i2c_prd_start::W](W) writer structure"] impl crate::Writable for I2C_PRD_START_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets i2c_prd_start to value 0x0f0f_0f0f"] impl crate::Resettable for I2C_PRD_START_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0f0f_0f0f - } + const RESET_VALUE: Self::Ux = 0x0f0f_0f0f; } diff --git a/src/i2c/i2c_prd_stop.rs b/src/i2c/i2c_prd_stop.rs index b675a42..3421956 100644 --- a/src/i2c/i2c_prd_stop.rs +++ b/src/i2c/i2c_prd_stop.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,159 +28,81 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `cr_i2c_prd_p_ph_3` reader - "] -pub struct CR_I2C_PRD_P_PH_3_R(crate::FieldReader); -impl CR_I2C_PRD_P_PH_3_R { - pub(crate) fn new(bits: u8) -> Self { - CR_I2C_PRD_P_PH_3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_PRD_P_PH_3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_i2c_prd_p_ph_3` writer - "] -pub struct CR_I2C_PRD_P_PH_3_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_PRD_P_PH_3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 24)) | ((value as u32 & 0xff) << 24); - self.w - } -} -#[doc = "Field `cr_i2c_prd_p_ph_2` reader - "] -pub struct CR_I2C_PRD_P_PH_2_R(crate::FieldReader); -impl CR_I2C_PRD_P_PH_2_R { - pub(crate) fn new(bits: u8) -> Self { - CR_I2C_PRD_P_PH_2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_PRD_P_PH_2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_i2c_prd_p_ph_2` writer - "] -pub struct CR_I2C_PRD_P_PH_2_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_PRD_P_PH_2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 16)) | ((value as u32 & 0xff) << 16); - self.w - } -} -#[doc = "Field `cr_i2c_prd_p_ph_1` reader - "] -pub struct CR_I2C_PRD_P_PH_1_R(crate::FieldReader); -impl CR_I2C_PRD_P_PH_1_R { - pub(crate) fn new(bits: u8) -> Self { - CR_I2C_PRD_P_PH_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_PRD_P_PH_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_i2c_prd_p_ph_1` writer - "] -pub struct CR_I2C_PRD_P_PH_1_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_PRD_P_PH_1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8); - self.w - } -} #[doc = "Field `cr_i2c_prd_p_ph_0` reader - "] -pub struct CR_I2C_PRD_P_PH_0_R(crate::FieldReader); -impl CR_I2C_PRD_P_PH_0_R { - pub(crate) fn new(bits: u8) -> Self { - CR_I2C_PRD_P_PH_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_PRD_P_PH_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_I2C_PRD_P_PH_0_R = crate::FieldReader; #[doc = "Field `cr_i2c_prd_p_ph_0` writer - "] -pub struct CR_I2C_PRD_P_PH_0_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_PRD_P_PH_0_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type CR_I2C_PRD_P_PH_0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, I2C_PRD_STOP_SPEC, u8, u8, 8, O>; +#[doc = "Field `cr_i2c_prd_p_ph_1` reader - "] +pub type CR_I2C_PRD_P_PH_1_R = crate::FieldReader; +#[doc = "Field `cr_i2c_prd_p_ph_1` writer - "] +pub type CR_I2C_PRD_P_PH_1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, I2C_PRD_STOP_SPEC, u8, u8, 8, O>; +#[doc = "Field `cr_i2c_prd_p_ph_2` reader - "] +pub type CR_I2C_PRD_P_PH_2_R = crate::FieldReader; +#[doc = "Field `cr_i2c_prd_p_ph_2` writer - "] +pub type CR_I2C_PRD_P_PH_2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, I2C_PRD_STOP_SPEC, u8, u8, 8, O>; +#[doc = "Field `cr_i2c_prd_p_ph_3` reader - "] +pub type CR_I2C_PRD_P_PH_3_R = crate::FieldReader; +#[doc = "Field `cr_i2c_prd_p_ph_3` writer - "] +pub type CR_I2C_PRD_P_PH_3_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, I2C_PRD_STOP_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:7"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff); - self.w + pub fn cr_i2c_prd_p_ph_0(&self) -> CR_I2C_PRD_P_PH_0_R { + CR_I2C_PRD_P_PH_0_R::new((self.bits & 0xff) as u8) } -} -impl R { - #[doc = "Bits 24:31"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn cr_i2c_prd_p_ph_3(&self) -> CR_I2C_PRD_P_PH_3_R { - CR_I2C_PRD_P_PH_3_R::new(((self.bits >> 24) & 0xff) as u8) + pub fn cr_i2c_prd_p_ph_1(&self) -> CR_I2C_PRD_P_PH_1_R { + CR_I2C_PRD_P_PH_1_R::new(((self.bits >> 8) & 0xff) as u8) } #[doc = "Bits 16:23"] #[inline(always)] pub fn cr_i2c_prd_p_ph_2(&self) -> CR_I2C_PRD_P_PH_2_R { CR_I2C_PRD_P_PH_2_R::new(((self.bits >> 16) & 0xff) as u8) } - #[doc = "Bits 8:15"] - #[inline(always)] - pub fn cr_i2c_prd_p_ph_1(&self) -> CR_I2C_PRD_P_PH_1_R { - CR_I2C_PRD_P_PH_1_R::new(((self.bits >> 8) & 0xff) as u8) - } - #[doc = "Bits 0:7"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn cr_i2c_prd_p_ph_0(&self) -> CR_I2C_PRD_P_PH_0_R { - CR_I2C_PRD_P_PH_0_R::new((self.bits & 0xff) as u8) + pub fn cr_i2c_prd_p_ph_3(&self) -> CR_I2C_PRD_P_PH_3_R { + CR_I2C_PRD_P_PH_3_R::new(((self.bits >> 24) & 0xff) as u8) } } impl W { - #[doc = "Bits 24:31"] + #[doc = "Bits 0:7"] #[inline(always)] - pub fn cr_i2c_prd_p_ph_3(&mut self) -> CR_I2C_PRD_P_PH_3_W { - CR_I2C_PRD_P_PH_3_W { w: self } + #[must_use] + pub fn cr_i2c_prd_p_ph_0(&mut self) -> CR_I2C_PRD_P_PH_0_W<0> { + CR_I2C_PRD_P_PH_0_W::new(self) } - #[doc = "Bits 16:23"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn cr_i2c_prd_p_ph_2(&mut self) -> CR_I2C_PRD_P_PH_2_W { - CR_I2C_PRD_P_PH_2_W { w: self } + #[must_use] + pub fn cr_i2c_prd_p_ph_1(&mut self) -> CR_I2C_PRD_P_PH_1_W<8> { + CR_I2C_PRD_P_PH_1_W::new(self) } - #[doc = "Bits 8:15"] + #[doc = "Bits 16:23"] #[inline(always)] - pub fn cr_i2c_prd_p_ph_1(&mut self) -> CR_I2C_PRD_P_PH_1_W { - CR_I2C_PRD_P_PH_1_W { w: self } + #[must_use] + pub fn cr_i2c_prd_p_ph_2(&mut self) -> CR_I2C_PRD_P_PH_2_W<16> { + CR_I2C_PRD_P_PH_2_W::new(self) } - #[doc = "Bits 0:7"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn cr_i2c_prd_p_ph_0(&mut self) -> CR_I2C_PRD_P_PH_0_W { - CR_I2C_PRD_P_PH_0_W { w: self } + #[must_use] + pub fn cr_i2c_prd_p_ph_3(&mut self) -> CR_I2C_PRD_P_PH_3_W<24> { + CR_I2C_PRD_P_PH_3_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -197,11 +120,10 @@ impl crate::Readable for I2C_PRD_STOP_SPEC { #[doc = "`write(|w| ..)` method takes [i2c_prd_stop::W](W) writer structure"] impl crate::Writable for I2C_PRD_STOP_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets i2c_prd_stop to value 0x0f0f_0f0f"] impl crate::Resettable for I2C_PRD_STOP_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0f0f_0f0f - } + const RESET_VALUE: Self::Ux = 0x0f0f_0f0f; } diff --git a/src/i2c/i2c_sub_addr.rs b/src/i2c/i2c_sub_addr.rs index b8d06fb..862098c 100644 --- a/src/i2c/i2c_sub_addr.rs +++ b/src/i2c/i2c_sub_addr.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,159 +28,81 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `cr_i2c_sub_addr_b3` reader - "] -pub struct CR_I2C_SUB_ADDR_B3_R(crate::FieldReader); -impl CR_I2C_SUB_ADDR_B3_R { - pub(crate) fn new(bits: u8) -> Self { - CR_I2C_SUB_ADDR_B3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_SUB_ADDR_B3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_i2c_sub_addr_b3` writer - "] -pub struct CR_I2C_SUB_ADDR_B3_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_SUB_ADDR_B3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 24)) | ((value as u32 & 0xff) << 24); - self.w - } -} -#[doc = "Field `cr_i2c_sub_addr_b2` reader - "] -pub struct CR_I2C_SUB_ADDR_B2_R(crate::FieldReader); -impl CR_I2C_SUB_ADDR_B2_R { - pub(crate) fn new(bits: u8) -> Self { - CR_I2C_SUB_ADDR_B2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_SUB_ADDR_B2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_i2c_sub_addr_b2` writer - "] -pub struct CR_I2C_SUB_ADDR_B2_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_SUB_ADDR_B2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 16)) | ((value as u32 & 0xff) << 16); - self.w - } -} -#[doc = "Field `cr_i2c_sub_addr_b1` reader - "] -pub struct CR_I2C_SUB_ADDR_B1_R(crate::FieldReader); -impl CR_I2C_SUB_ADDR_B1_R { - pub(crate) fn new(bits: u8) -> Self { - CR_I2C_SUB_ADDR_B1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_SUB_ADDR_B1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_i2c_sub_addr_b1` writer - "] -pub struct CR_I2C_SUB_ADDR_B1_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_SUB_ADDR_B1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8); - self.w - } -} #[doc = "Field `cr_i2c_sub_addr_b0` reader - "] -pub struct CR_I2C_SUB_ADDR_B0_R(crate::FieldReader); -impl CR_I2C_SUB_ADDR_B0_R { - pub(crate) fn new(bits: u8) -> Self { - CR_I2C_SUB_ADDR_B0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_I2C_SUB_ADDR_B0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_I2C_SUB_ADDR_B0_R = crate::FieldReader; #[doc = "Field `cr_i2c_sub_addr_b0` writer - "] -pub struct CR_I2C_SUB_ADDR_B0_W<'a> { - w: &'a mut W, -} -impl<'a> CR_I2C_SUB_ADDR_B0_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type CR_I2C_SUB_ADDR_B0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, I2C_SUB_ADDR_SPEC, u8, u8, 8, O>; +#[doc = "Field `cr_i2c_sub_addr_b1` reader - "] +pub type CR_I2C_SUB_ADDR_B1_R = crate::FieldReader; +#[doc = "Field `cr_i2c_sub_addr_b1` writer - "] +pub type CR_I2C_SUB_ADDR_B1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, I2C_SUB_ADDR_SPEC, u8, u8, 8, O>; +#[doc = "Field `cr_i2c_sub_addr_b2` reader - "] +pub type CR_I2C_SUB_ADDR_B2_R = crate::FieldReader; +#[doc = "Field `cr_i2c_sub_addr_b2` writer - "] +pub type CR_I2C_SUB_ADDR_B2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, I2C_SUB_ADDR_SPEC, u8, u8, 8, O>; +#[doc = "Field `cr_i2c_sub_addr_b3` reader - "] +pub type CR_I2C_SUB_ADDR_B3_R = crate::FieldReader; +#[doc = "Field `cr_i2c_sub_addr_b3` writer - "] +pub type CR_I2C_SUB_ADDR_B3_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, I2C_SUB_ADDR_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:7"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff); - self.w + pub fn cr_i2c_sub_addr_b0(&self) -> CR_I2C_SUB_ADDR_B0_R { + CR_I2C_SUB_ADDR_B0_R::new((self.bits & 0xff) as u8) } -} -impl R { - #[doc = "Bits 24:31"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn cr_i2c_sub_addr_b3(&self) -> CR_I2C_SUB_ADDR_B3_R { - CR_I2C_SUB_ADDR_B3_R::new(((self.bits >> 24) & 0xff) as u8) + pub fn cr_i2c_sub_addr_b1(&self) -> CR_I2C_SUB_ADDR_B1_R { + CR_I2C_SUB_ADDR_B1_R::new(((self.bits >> 8) & 0xff) as u8) } #[doc = "Bits 16:23"] #[inline(always)] pub fn cr_i2c_sub_addr_b2(&self) -> CR_I2C_SUB_ADDR_B2_R { CR_I2C_SUB_ADDR_B2_R::new(((self.bits >> 16) & 0xff) as u8) } - #[doc = "Bits 8:15"] - #[inline(always)] - pub fn cr_i2c_sub_addr_b1(&self) -> CR_I2C_SUB_ADDR_B1_R { - CR_I2C_SUB_ADDR_B1_R::new(((self.bits >> 8) & 0xff) as u8) - } - #[doc = "Bits 0:7"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn cr_i2c_sub_addr_b0(&self) -> CR_I2C_SUB_ADDR_B0_R { - CR_I2C_SUB_ADDR_B0_R::new((self.bits & 0xff) as u8) + pub fn cr_i2c_sub_addr_b3(&self) -> CR_I2C_SUB_ADDR_B3_R { + CR_I2C_SUB_ADDR_B3_R::new(((self.bits >> 24) & 0xff) as u8) } } impl W { - #[doc = "Bits 24:31"] + #[doc = "Bits 0:7"] #[inline(always)] - pub fn cr_i2c_sub_addr_b3(&mut self) -> CR_I2C_SUB_ADDR_B3_W { - CR_I2C_SUB_ADDR_B3_W { w: self } + #[must_use] + pub fn cr_i2c_sub_addr_b0(&mut self) -> CR_I2C_SUB_ADDR_B0_W<0> { + CR_I2C_SUB_ADDR_B0_W::new(self) } - #[doc = "Bits 16:23"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn cr_i2c_sub_addr_b2(&mut self) -> CR_I2C_SUB_ADDR_B2_W { - CR_I2C_SUB_ADDR_B2_W { w: self } + #[must_use] + pub fn cr_i2c_sub_addr_b1(&mut self) -> CR_I2C_SUB_ADDR_B1_W<8> { + CR_I2C_SUB_ADDR_B1_W::new(self) } - #[doc = "Bits 8:15"] + #[doc = "Bits 16:23"] #[inline(always)] - pub fn cr_i2c_sub_addr_b1(&mut self) -> CR_I2C_SUB_ADDR_B1_W { - CR_I2C_SUB_ADDR_B1_W { w: self } + #[must_use] + pub fn cr_i2c_sub_addr_b2(&mut self) -> CR_I2C_SUB_ADDR_B2_W<16> { + CR_I2C_SUB_ADDR_B2_W::new(self) } - #[doc = "Bits 0:7"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn cr_i2c_sub_addr_b0(&mut self) -> CR_I2C_SUB_ADDR_B0_W { - CR_I2C_SUB_ADDR_B0_W { w: self } + #[must_use] + pub fn cr_i2c_sub_addr_b3(&mut self) -> CR_I2C_SUB_ADDR_B3_W<24> { + CR_I2C_SUB_ADDR_B3_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -197,11 +120,10 @@ impl crate::Readable for I2C_SUB_ADDR_SPEC { #[doc = "`write(|w| ..)` method takes [i2c_sub_addr::W](W) writer structure"] impl crate::Writable for I2C_SUB_ADDR_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets i2c_sub_addr to value 0"] impl crate::Resettable for I2C_SUB_ADDR_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ir.rs b/src/ir.rs index 6c5cd56..2c2c8b5 100644 --- a/src/ir.rs +++ b/src/ir.rs @@ -2,139 +2,139 @@ #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - irtx_config."] - pub irtx_config: crate::Reg, + pub irtx_config: IRTX_CONFIG, #[doc = "0x04 - irtx_int_sts."] - pub irtx_int_sts: crate::Reg, + pub irtx_int_sts: IRTX_INT_STS, #[doc = "0x08 - irtx_data_word0."] - pub irtx_data_word0: crate::Reg, + pub irtx_data_word0: IRTX_DATA_WORD0, #[doc = "0x0c - irtx_data_word1."] - pub irtx_data_word1: crate::Reg, + pub irtx_data_word1: IRTX_DATA_WORD1, #[doc = "0x10 - irtx_pulse_width."] - pub irtx_pulse_width: crate::Reg, + pub irtx_pulse_width: IRTX_PULSE_WIDTH, #[doc = "0x14 - irtx_pw."] - pub irtx_pw: crate::Reg, - _reserved6: [u8; 40usize], + pub irtx_pw: IRTX_PW, + _reserved6: [u8; 0x28], #[doc = "0x40 - irtx_swm_pw_0."] - pub irtx_swm_pw_0: crate::Reg, + pub irtx_swm_pw_0: IRTX_SWM_PW_0, #[doc = "0x44 - irtx_swm_pw_1."] - pub irtx_swm_pw_1: crate::Reg, + pub irtx_swm_pw_1: IRTX_SWM_PW_1, #[doc = "0x48 - irtx_swm_pw_2."] - pub irtx_swm_pw_2: crate::Reg, + pub irtx_swm_pw_2: IRTX_SWM_PW_2, #[doc = "0x4c - irtx_swm_pw_3."] - pub irtx_swm_pw_3: crate::Reg, + pub irtx_swm_pw_3: IRTX_SWM_PW_3, #[doc = "0x50 - irtx_swm_pw_4."] - pub irtx_swm_pw_4: crate::Reg, + pub irtx_swm_pw_4: IRTX_SWM_PW_4, #[doc = "0x54 - irtx_swm_pw_5."] - pub irtx_swm_pw_5: crate::Reg, + pub irtx_swm_pw_5: IRTX_SWM_PW_5, #[doc = "0x58 - irtx_swm_pw_6."] - pub irtx_swm_pw_6: crate::Reg, + pub irtx_swm_pw_6: IRTX_SWM_PW_6, #[doc = "0x5c - irtx_swm_pw_7."] - pub irtx_swm_pw_7: crate::Reg, - _reserved14: [u8; 32usize], + pub irtx_swm_pw_7: IRTX_SWM_PW_7, + _reserved14: [u8; 0x20], #[doc = "0x80 - irrx_config."] - pub irrx_config: crate::Reg, + pub irrx_config: IRRX_CONFIG, #[doc = "0x84 - irrx_int_sts."] - pub irrx_int_sts: crate::Reg, + pub irrx_int_sts: IRRX_INT_STS, #[doc = "0x88 - irrx_pw_config."] - pub irrx_pw_config: crate::Reg, - _reserved17: [u8; 4usize], + pub irrx_pw_config: IRRX_PW_CONFIG, + _reserved17: [u8; 0x04], #[doc = "0x90 - irrx_data_count."] - pub irrx_data_count: crate::Reg, + pub irrx_data_count: IRRX_DATA_COUNT, #[doc = "0x94 - irrx_data_word0."] - pub irrx_data_word0: crate::Reg, + pub irrx_data_word0: IRRX_DATA_WORD0, #[doc = "0x98 - irrx_data_word1."] - pub irrx_data_word1: crate::Reg, - _reserved20: [u8; 36usize], + pub irrx_data_word1: IRRX_DATA_WORD1, + _reserved20: [u8; 0x24], #[doc = "0xc0 - irrx_swm_fifo_config_0."] - pub irrx_swm_fifo_config_0: crate::Reg, + pub irrx_swm_fifo_config_0: IRRX_SWM_FIFO_CONFIG_0, #[doc = "0xc4 - irrx_swm_fifo_rdata."] - pub irrx_swm_fifo_rdata: crate::Reg, + pub irrx_swm_fifo_rdata: IRRX_SWM_FIFO_RDATA, } -#[doc = "irtx_config register accessor: an alias for `Reg`"] +#[doc = "irtx_config (rw) register accessor: an alias for `Reg`"] pub type IRTX_CONFIG = crate::Reg; #[doc = "irtx_config."] pub mod irtx_config; -#[doc = "irtx_int_sts register accessor: an alias for `Reg`"] +#[doc = "irtx_int_sts (rw) register accessor: an alias for `Reg`"] pub type IRTX_INT_STS = crate::Reg; #[doc = "irtx_int_sts."] pub mod irtx_int_sts; -#[doc = "irtx_data_word0 register accessor: an alias for `Reg`"] +#[doc = "irtx_data_word0 (rw) register accessor: an alias for `Reg`"] pub type IRTX_DATA_WORD0 = crate::Reg; #[doc = "irtx_data_word0."] pub mod irtx_data_word0; -#[doc = "irtx_data_word1 register accessor: an alias for `Reg`"] +#[doc = "irtx_data_word1 (rw) register accessor: an alias for `Reg`"] pub type IRTX_DATA_WORD1 = crate::Reg; #[doc = "irtx_data_word1."] pub mod irtx_data_word1; -#[doc = "irtx_pulse_width register accessor: an alias for `Reg`"] +#[doc = "irtx_pulse_width (rw) register accessor: an alias for `Reg`"] pub type IRTX_PULSE_WIDTH = crate::Reg; #[doc = "irtx_pulse_width."] pub mod irtx_pulse_width; -#[doc = "irtx_pw register accessor: an alias for `Reg`"] +#[doc = "irtx_pw (rw) register accessor: an alias for `Reg`"] pub type IRTX_PW = crate::Reg; #[doc = "irtx_pw."] pub mod irtx_pw; -#[doc = "irtx_swm_pw_0 register accessor: an alias for `Reg`"] +#[doc = "irtx_swm_pw_0 (rw) register accessor: an alias for `Reg`"] pub type IRTX_SWM_PW_0 = crate::Reg; #[doc = "irtx_swm_pw_0."] pub mod irtx_swm_pw_0; -#[doc = "irtx_swm_pw_1 register accessor: an alias for `Reg`"] +#[doc = "irtx_swm_pw_1 (rw) register accessor: an alias for `Reg`"] pub type IRTX_SWM_PW_1 = crate::Reg; #[doc = "irtx_swm_pw_1."] pub mod irtx_swm_pw_1; -#[doc = "irtx_swm_pw_2 register accessor: an alias for `Reg`"] +#[doc = "irtx_swm_pw_2 (rw) register accessor: an alias for `Reg`"] pub type IRTX_SWM_PW_2 = crate::Reg; #[doc = "irtx_swm_pw_2."] pub mod irtx_swm_pw_2; -#[doc = "irtx_swm_pw_3 register accessor: an alias for `Reg`"] +#[doc = "irtx_swm_pw_3 (rw) register accessor: an alias for `Reg`"] pub type IRTX_SWM_PW_3 = crate::Reg; #[doc = "irtx_swm_pw_3."] pub mod irtx_swm_pw_3; -#[doc = "irtx_swm_pw_4 register accessor: an alias for `Reg`"] +#[doc = "irtx_swm_pw_4 (rw) register accessor: an alias for `Reg`"] pub type IRTX_SWM_PW_4 = crate::Reg; #[doc = "irtx_swm_pw_4."] pub mod irtx_swm_pw_4; -#[doc = "irtx_swm_pw_5 register accessor: an alias for `Reg`"] +#[doc = "irtx_swm_pw_5 (rw) register accessor: an alias for `Reg`"] pub type IRTX_SWM_PW_5 = crate::Reg; #[doc = "irtx_swm_pw_5."] pub mod irtx_swm_pw_5; -#[doc = "irtx_swm_pw_6 register accessor: an alias for `Reg`"] +#[doc = "irtx_swm_pw_6 (rw) register accessor: an alias for `Reg`"] pub type IRTX_SWM_PW_6 = crate::Reg; #[doc = "irtx_swm_pw_6."] pub mod irtx_swm_pw_6; -#[doc = "irtx_swm_pw_7 register accessor: an alias for `Reg`"] +#[doc = "irtx_swm_pw_7 (rw) register accessor: an alias for `Reg`"] pub type IRTX_SWM_PW_7 = crate::Reg; #[doc = "irtx_swm_pw_7."] pub mod irtx_swm_pw_7; -#[doc = "irrx_config register accessor: an alias for `Reg`"] +#[doc = "irrx_config (rw) register accessor: an alias for `Reg`"] pub type IRRX_CONFIG = crate::Reg; #[doc = "irrx_config."] pub mod irrx_config; -#[doc = "irrx_int_sts register accessor: an alias for `Reg`"] +#[doc = "irrx_int_sts (rw) register accessor: an alias for `Reg`"] pub type IRRX_INT_STS = crate::Reg; #[doc = "irrx_int_sts."] pub mod irrx_int_sts; -#[doc = "irrx_pw_config register accessor: an alias for `Reg`"] +#[doc = "irrx_pw_config (rw) register accessor: an alias for `Reg`"] pub type IRRX_PW_CONFIG = crate::Reg; #[doc = "irrx_pw_config."] pub mod irrx_pw_config; -#[doc = "irrx_data_count register accessor: an alias for `Reg`"] +#[doc = "irrx_data_count (rw) register accessor: an alias for `Reg`"] pub type IRRX_DATA_COUNT = crate::Reg; #[doc = "irrx_data_count."] pub mod irrx_data_count; -#[doc = "irrx_data_word0 register accessor: an alias for `Reg`"] +#[doc = "irrx_data_word0 (rw) register accessor: an alias for `Reg`"] pub type IRRX_DATA_WORD0 = crate::Reg; #[doc = "irrx_data_word0."] pub mod irrx_data_word0; -#[doc = "irrx_data_word1 register accessor: an alias for `Reg`"] +#[doc = "irrx_data_word1 (rw) register accessor: an alias for `Reg`"] pub type IRRX_DATA_WORD1 = crate::Reg; #[doc = "irrx_data_word1."] pub mod irrx_data_word1; -#[doc = "irrx_swm_fifo_config_0 register accessor: an alias for `Reg`"] +#[doc = "irrx_swm_fifo_config_0 (rw) register accessor: an alias for `Reg`"] pub type IRRX_SWM_FIFO_CONFIG_0 = crate::Reg; #[doc = "irrx_swm_fifo_config_0."] pub mod irrx_swm_fifo_config_0; -#[doc = "irrx_swm_fifo_rdata register accessor: an alias for `Reg`"] +#[doc = "irrx_swm_fifo_rdata (r) register accessor: an alias for `Reg`"] pub type IRRX_SWM_FIFO_RDATA = crate::Reg; #[doc = "irrx_swm_fifo_rdata."] pub mod irrx_swm_fifo_rdata; diff --git a/src/ir/irrx_config.rs b/src/ir/irrx_config.rs index 1ea900a..b2ae66a 100644 --- a/src/ir/irrx_config.rs +++ b/src/ir/irrx_config.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,225 +28,94 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `cr_irrx_deg_cnt` reader - "] -pub struct CR_IRRX_DEG_CNT_R(crate::FieldReader); -impl CR_IRRX_DEG_CNT_R { - pub(crate) fn new(bits: u8) -> Self { - CR_IRRX_DEG_CNT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRRX_DEG_CNT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_irrx_deg_cnt` writer - "] -pub struct CR_IRRX_DEG_CNT_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRRX_DEG_CNT_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 8)) | ((value as u32 & 0x0f) << 8); - self.w - } -} -#[doc = "Field `cr_irrx_deg_en` reader - "] -pub struct CR_IRRX_DEG_EN_R(crate::FieldReader); -impl CR_IRRX_DEG_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_IRRX_DEG_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRRX_DEG_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_irrx_deg_en` writer - "] -pub struct CR_IRRX_DEG_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRRX_DEG_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} -#[doc = "Field `cr_irrx_mode` reader - "] -pub struct CR_IRRX_MODE_R(crate::FieldReader); -impl CR_IRRX_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - CR_IRRX_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRRX_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_irrx_mode` writer - "] -pub struct CR_IRRX_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRRX_MODE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 2)) | ((value as u32 & 0x03) << 2); - self.w - } -} -#[doc = "Field `cr_irrx_in_inv` reader - "] -pub struct CR_IRRX_IN_INV_R(crate::FieldReader); -impl CR_IRRX_IN_INV_R { - pub(crate) fn new(bits: bool) -> Self { - CR_IRRX_IN_INV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRRX_IN_INV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_irrx_in_inv` writer - "] -pub struct CR_IRRX_IN_INV_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRRX_IN_INV_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `cr_irrx_en` reader - "] -pub struct CR_IRRX_EN_R(crate::FieldReader); -impl CR_IRRX_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_IRRX_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRRX_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_IRRX_EN_R = crate::BitReader; #[doc = "Field `cr_irrx_en` writer - "] -pub struct CR_IRRX_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRRX_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type CR_IRRX_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, IRRX_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_irrx_in_inv` reader - "] +pub type CR_IRRX_IN_INV_R = crate::BitReader; +#[doc = "Field `cr_irrx_in_inv` writer - "] +pub type CR_IRRX_IN_INV_W<'a, const O: u8> = crate::BitWriter<'a, u32, IRRX_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_irrx_mode` reader - "] +pub type CR_IRRX_MODE_R = crate::FieldReader; +#[doc = "Field `cr_irrx_mode` writer - "] +pub type CR_IRRX_MODE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, IRRX_CONFIG_SPEC, u8, u8, 2, O>; +#[doc = "Field `cr_irrx_deg_en` reader - "] +pub type CR_IRRX_DEG_EN_R = crate::BitReader; +#[doc = "Field `cr_irrx_deg_en` writer - "] +pub type CR_IRRX_DEG_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, IRRX_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_irrx_deg_cnt` reader - "] +pub type CR_IRRX_DEG_CNT_R = crate::FieldReader; +#[doc = "Field `cr_irrx_deg_cnt` writer - "] +pub type CR_IRRX_DEG_CNT_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, IRRX_CONFIG_SPEC, u8, u8, 4, O>; impl R { - #[doc = "Bits 8:11"] + #[doc = "Bit 0"] #[inline(always)] - pub fn cr_irrx_deg_cnt(&self) -> CR_IRRX_DEG_CNT_R { - CR_IRRX_DEG_CNT_R::new(((self.bits >> 8) & 0x0f) as u8) + pub fn cr_irrx_en(&self) -> CR_IRRX_EN_R { + CR_IRRX_EN_R::new((self.bits & 1) != 0) } - #[doc = "Bit 4"] + #[doc = "Bit 1"] #[inline(always)] - pub fn cr_irrx_deg_en(&self) -> CR_IRRX_DEG_EN_R { - CR_IRRX_DEG_EN_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn cr_irrx_in_inv(&self) -> CR_IRRX_IN_INV_R { + CR_IRRX_IN_INV_R::new(((self.bits >> 1) & 1) != 0) } #[doc = "Bits 2:3"] #[inline(always)] pub fn cr_irrx_mode(&self) -> CR_IRRX_MODE_R { - CR_IRRX_MODE_R::new(((self.bits >> 2) & 0x03) as u8) + CR_IRRX_MODE_R::new(((self.bits >> 2) & 3) as u8) } - #[doc = "Bit 1"] + #[doc = "Bit 4"] #[inline(always)] - pub fn cr_irrx_in_inv(&self) -> CR_IRRX_IN_INV_R { - CR_IRRX_IN_INV_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn cr_irrx_deg_en(&self) -> CR_IRRX_DEG_EN_R { + CR_IRRX_DEG_EN_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bits 8:11"] #[inline(always)] - pub fn cr_irrx_en(&self) -> CR_IRRX_EN_R { - CR_IRRX_EN_R::new((self.bits & 0x01) != 0) + pub fn cr_irrx_deg_cnt(&self) -> CR_IRRX_DEG_CNT_R { + CR_IRRX_DEG_CNT_R::new(((self.bits >> 8) & 0x0f) as u8) } } impl W { - #[doc = "Bits 8:11"] + #[doc = "Bit 0"] #[inline(always)] - pub fn cr_irrx_deg_cnt(&mut self) -> CR_IRRX_DEG_CNT_W { - CR_IRRX_DEG_CNT_W { w: self } + #[must_use] + pub fn cr_irrx_en(&mut self) -> CR_IRRX_EN_W<0> { + CR_IRRX_EN_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 1"] #[inline(always)] - pub fn cr_irrx_deg_en(&mut self) -> CR_IRRX_DEG_EN_W { - CR_IRRX_DEG_EN_W { w: self } + #[must_use] + pub fn cr_irrx_in_inv(&mut self) -> CR_IRRX_IN_INV_W<1> { + CR_IRRX_IN_INV_W::new(self) } #[doc = "Bits 2:3"] #[inline(always)] - pub fn cr_irrx_mode(&mut self) -> CR_IRRX_MODE_W { - CR_IRRX_MODE_W { w: self } + #[must_use] + pub fn cr_irrx_mode(&mut self) -> CR_IRRX_MODE_W<2> { + CR_IRRX_MODE_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 4"] #[inline(always)] - pub fn cr_irrx_in_inv(&mut self) -> CR_IRRX_IN_INV_W { - CR_IRRX_IN_INV_W { w: self } + #[must_use] + pub fn cr_irrx_deg_en(&mut self) -> CR_IRRX_DEG_EN_W<4> { + CR_IRRX_DEG_EN_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bits 8:11"] #[inline(always)] - pub fn cr_irrx_en(&mut self) -> CR_IRRX_EN_W { - CR_IRRX_EN_W { w: self } + #[must_use] + pub fn cr_irrx_deg_cnt(&mut self) -> CR_IRRX_DEG_CNT_W<8> { + CR_IRRX_DEG_CNT_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -263,11 +133,10 @@ impl crate::Readable for IRRX_CONFIG_SPEC { #[doc = "`write(|w| ..)` method takes [irrx_config::W](W) writer structure"] impl crate::Writable for IRRX_CONFIG_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets irrx_config to value 0x02"] impl crate::Resettable for IRRX_CONFIG_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x02 - } + const RESET_VALUE: Self::Ux = 0x02; } diff --git a/src/ir/irrx_data_count.rs b/src/ir/irrx_data_count.rs index 997e60c..a761a12 100644 --- a/src/ir/irrx_data_count.rs +++ b/src/ir/irrx_data_count.rs @@ -7,25 +7,35 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `sts_irrx_data_cnt` reader - "] -pub struct STS_IRRX_DATA_CNT_R(crate::FieldReader); -impl STS_IRRX_DATA_CNT_R { - pub(crate) fn new(bits: u8) -> Self { - STS_IRRX_DATA_CNT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for STS_IRRX_DATA_CNT_R { - type Target = crate::FieldReader; +#[doc = "Register `irrx_data_count` writer"] +pub struct W(crate::W); +impl core::ops::Deref for W { + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } +impl core::ops::DerefMut for W { + #[inline(always)] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } +} +impl From> for W { + #[inline(always)] + fn from(writer: crate::W) -> Self { + W(writer) + } +} +#[doc = "Field `sts_irrx_data_cnt` reader - "] +pub type STS_IRRX_DATA_CNT_R = crate::FieldReader; impl R { #[doc = "Bits 0:6"] #[inline(always)] @@ -33,7 +43,15 @@ impl R { STS_IRRX_DATA_CNT_R::new((self.bits & 0x7f) as u8) } } -#[doc = "irrx_data_count.\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 [irrx_data_count](index.html) module"] +impl W { + #[doc = "Writes raw bits to the register."] + #[inline(always)] + pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { + self.0.bits(bits); + self + } +} +#[doc = "irrx_data_count.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [irrx_data_count](index.html) module"] pub struct IRRX_DATA_COUNT_SPEC; impl crate::RegisterSpec for IRRX_DATA_COUNT_SPEC { type Ux = u32; @@ -42,10 +60,13 @@ impl crate::RegisterSpec for IRRX_DATA_COUNT_SPEC { impl crate::Readable for IRRX_DATA_COUNT_SPEC { type Reader = R; } +#[doc = "`write(|w| ..)` method takes [irrx_data_count::W](W) writer structure"] +impl crate::Writable for IRRX_DATA_COUNT_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} #[doc = "`reset()` method sets irrx_data_count to value 0"] impl crate::Resettable for IRRX_DATA_COUNT_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ir/irrx_data_word0.rs b/src/ir/irrx_data_word0.rs index 8043882..b6d8875 100644 --- a/src/ir/irrx_data_word0.rs +++ b/src/ir/irrx_data_word0.rs @@ -7,33 +7,51 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `sts_irrx_data_word0` reader - "] -pub struct STS_IRRX_DATA_WORD0_R(crate::FieldReader); -impl STS_IRRX_DATA_WORD0_R { - pub(crate) fn new(bits: u32) -> Self { - STS_IRRX_DATA_WORD0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for STS_IRRX_DATA_WORD0_R { - type Target = crate::FieldReader; +#[doc = "Register `irrx_data_word0` writer"] +pub struct W(crate::W); +impl core::ops::Deref for W { + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } +impl core::ops::DerefMut for W { + #[inline(always)] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } +} +impl From> for W { + #[inline(always)] + fn from(writer: crate::W) -> Self { + W(writer) + } +} +#[doc = "Field `sts_irrx_data_word0` reader - "] +pub type STS_IRRX_DATA_WORD0_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sts_irrx_data_word0(&self) -> STS_IRRX_DATA_WORD0_R { - STS_IRRX_DATA_WORD0_R::new((self.bits & 0xffff_ffff) as u32) + STS_IRRX_DATA_WORD0_R::new(self.bits) + } +} +impl W { + #[doc = "Writes raw bits to the register."] + #[inline(always)] + pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { + self.0.bits(bits); + self } } -#[doc = "irrx_data_word0.\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 [irrx_data_word0](index.html) module"] +#[doc = "irrx_data_word0.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [irrx_data_word0](index.html) module"] pub struct IRRX_DATA_WORD0_SPEC; impl crate::RegisterSpec for IRRX_DATA_WORD0_SPEC { type Ux = u32; @@ -42,10 +60,13 @@ impl crate::RegisterSpec for IRRX_DATA_WORD0_SPEC { impl crate::Readable for IRRX_DATA_WORD0_SPEC { type Reader = R; } +#[doc = "`write(|w| ..)` method takes [irrx_data_word0::W](W) writer structure"] +impl crate::Writable for IRRX_DATA_WORD0_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} #[doc = "`reset()` method sets irrx_data_word0 to value 0"] impl crate::Resettable for IRRX_DATA_WORD0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ir/irrx_data_word1.rs b/src/ir/irrx_data_word1.rs index 8e41be3..b5b083c 100644 --- a/src/ir/irrx_data_word1.rs +++ b/src/ir/irrx_data_word1.rs @@ -7,33 +7,51 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `sts_irrx_data_word1` reader - "] -pub struct STS_IRRX_DATA_WORD1_R(crate::FieldReader); -impl STS_IRRX_DATA_WORD1_R { - pub(crate) fn new(bits: u32) -> Self { - STS_IRRX_DATA_WORD1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for STS_IRRX_DATA_WORD1_R { - type Target = crate::FieldReader; +#[doc = "Register `irrx_data_word1` writer"] +pub struct W(crate::W); +impl core::ops::Deref for W { + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } +impl core::ops::DerefMut for W { + #[inline(always)] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } +} +impl From> for W { + #[inline(always)] + fn from(writer: crate::W) -> Self { + W(writer) + } +} +#[doc = "Field `sts_irrx_data_word1` reader - "] +pub type STS_IRRX_DATA_WORD1_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sts_irrx_data_word1(&self) -> STS_IRRX_DATA_WORD1_R { - STS_IRRX_DATA_WORD1_R::new((self.bits & 0xffff_ffff) as u32) + STS_IRRX_DATA_WORD1_R::new(self.bits) + } +} +impl W { + #[doc = "Writes raw bits to the register."] + #[inline(always)] + pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { + self.0.bits(bits); + self } } -#[doc = "irrx_data_word1.\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 [irrx_data_word1](index.html) module"] +#[doc = "irrx_data_word1.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [irrx_data_word1](index.html) module"] pub struct IRRX_DATA_WORD1_SPEC; impl crate::RegisterSpec for IRRX_DATA_WORD1_SPEC { type Ux = u32; @@ -42,10 +60,13 @@ impl crate::RegisterSpec for IRRX_DATA_WORD1_SPEC { impl crate::Readable for IRRX_DATA_WORD1_SPEC { type Reader = R; } +#[doc = "`write(|w| ..)` method takes [irrx_data_word1::W](W) writer structure"] +impl crate::Writable for IRRX_DATA_WORD1_SPEC { + type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; +} #[doc = "`reset()` method sets irrx_data_word1 to value 0"] impl crate::Resettable for IRRX_DATA_WORD1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ir/irrx_int_sts.rs b/src/ir/irrx_int_sts.rs index d126117..13be33a 100644 --- a/src/ir/irrx_int_sts.rs +++ b/src/ir/irrx_int_sts.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,172 +28,70 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `cr_irrx_end_en` reader - "] -pub struct CR_IRRX_END_EN_R(crate::FieldReader); -impl CR_IRRX_END_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_IRRX_END_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRRX_END_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_irrx_end_en` writer - "] -pub struct CR_IRRX_END_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRRX_END_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24); - self.w - } -} -#[doc = "Field `cr_irrx_end_clr` reader - "] -pub struct CR_IRRX_END_CLR_R(crate::FieldReader); -impl CR_IRRX_END_CLR_R { - pub(crate) fn new(bits: bool) -> Self { - CR_IRRX_END_CLR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRRX_END_CLR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_irrx_end_clr` writer - "] -pub struct CR_IRRX_END_CLR_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRRX_END_CLR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} +#[doc = "Field `irrx_end_int` reader - "] +pub type IRRX_END_INT_R = crate::BitReader; #[doc = "Field `cr_irrx_end_mask` reader - "] -pub struct CR_IRRX_END_MASK_R(crate::FieldReader); -impl CR_IRRX_END_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - CR_IRRX_END_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRRX_END_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_IRRX_END_MASK_R = crate::BitReader; #[doc = "Field `cr_irrx_end_mask` writer - "] -pub struct CR_IRRX_END_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRRX_END_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `irrx_end_int` reader - "] -pub struct IRRX_END_INT_R(crate::FieldReader); -impl IRRX_END_INT_R { - pub(crate) fn new(bits: bool) -> Self { - IRRX_END_INT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for IRRX_END_INT_R { - type Target = crate::FieldReader; +pub type CR_IRRX_END_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, IRRX_INT_STS_SPEC, bool, O>; +#[doc = "Field `cr_irrx_end_clr` reader - "] +pub type CR_IRRX_END_CLR_R = crate::BitReader; +#[doc = "Field `cr_irrx_end_clr` writer - "] +pub type CR_IRRX_END_CLR_W<'a, const O: u8> = crate::BitWriter<'a, u32, IRRX_INT_STS_SPEC, bool, O>; +#[doc = "Field `cr_irrx_end_en` reader - "] +pub type CR_IRRX_END_EN_R = crate::BitReader; +#[doc = "Field `cr_irrx_end_en` writer - "] +pub type CR_IRRX_END_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, IRRX_INT_STS_SPEC, bool, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn irrx_end_int(&self) -> IRRX_END_INT_R { + IRRX_END_INT_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bit 24"] + #[doc = "Bit 8"] #[inline(always)] - pub fn cr_irrx_end_en(&self) -> CR_IRRX_END_EN_R { - CR_IRRX_END_EN_R::new(((self.bits >> 24) & 0x01) != 0) + pub fn cr_irrx_end_mask(&self) -> CR_IRRX_END_MASK_R { + CR_IRRX_END_MASK_R::new(((self.bits >> 8) & 1) != 0) } #[doc = "Bit 16"] #[inline(always)] pub fn cr_irrx_end_clr(&self) -> CR_IRRX_END_CLR_R { - CR_IRRX_END_CLR_R::new(((self.bits >> 16) & 0x01) != 0) + CR_IRRX_END_CLR_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 8"] - #[inline(always)] - pub fn cr_irrx_end_mask(&self) -> CR_IRRX_END_MASK_R { - CR_IRRX_END_MASK_R::new(((self.bits >> 8) & 0x01) != 0) - } - #[doc = "Bit 0"] + #[doc = "Bit 24"] #[inline(always)] - pub fn irrx_end_int(&self) -> IRRX_END_INT_R { - IRRX_END_INT_R::new((self.bits & 0x01) != 0) + pub fn cr_irrx_end_en(&self) -> CR_IRRX_END_EN_R { + CR_IRRX_END_EN_R::new(((self.bits >> 24) & 1) != 0) } } impl W { - #[doc = "Bit 24"] + #[doc = "Bit 8"] #[inline(always)] - pub fn cr_irrx_end_en(&mut self) -> CR_IRRX_END_EN_W { - CR_IRRX_END_EN_W { w: self } + #[must_use] + pub fn cr_irrx_end_mask(&mut self) -> CR_IRRX_END_MASK_W<8> { + CR_IRRX_END_MASK_W::new(self) } #[doc = "Bit 16"] #[inline(always)] - pub fn cr_irrx_end_clr(&mut self) -> CR_IRRX_END_CLR_W { - CR_IRRX_END_CLR_W { w: self } + #[must_use] + pub fn cr_irrx_end_clr(&mut self) -> CR_IRRX_END_CLR_W<16> { + CR_IRRX_END_CLR_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bit 24"] #[inline(always)] - pub fn cr_irrx_end_mask(&mut self) -> CR_IRRX_END_MASK_W { - CR_IRRX_END_MASK_W { w: self } + #[must_use] + pub fn cr_irrx_end_en(&mut self) -> CR_IRRX_END_EN_W<24> { + CR_IRRX_END_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -210,11 +109,10 @@ impl crate::Readable for IRRX_INT_STS_SPEC { #[doc = "`write(|w| ..)` method takes [irrx_int_sts::W](W) writer structure"] impl crate::Writable for IRRX_INT_STS_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets irrx_int_sts to value 0x0100_0100"] impl crate::Resettable for IRRX_INT_STS_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0100_0100 - } + const RESET_VALUE: Self::Ux = 0x0100_0100; } diff --git a/src/ir/irrx_pw_config.rs b/src/ir/irrx_pw_config.rs index bedba59..f21db08 100644 --- a/src/ir/irrx_pw_config.rs +++ b/src/ir/irrx_pw_config.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,87 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `cr_irrx_end_th` reader - "] -pub struct CR_IRRX_END_TH_R(crate::FieldReader); -impl CR_IRRX_END_TH_R { - pub(crate) fn new(bits: u16) -> Self { - CR_IRRX_END_TH_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRRX_END_TH_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_irrx_end_th` writer - "] -pub struct CR_IRRX_END_TH_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRRX_END_TH_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xffff << 16)) | ((value as u32 & 0xffff) << 16); - self.w - } -} #[doc = "Field `cr_irrx_data_th` reader - "] -pub struct CR_IRRX_DATA_TH_R(crate::FieldReader); -impl CR_IRRX_DATA_TH_R { - pub(crate) fn new(bits: u16) -> Self { - CR_IRRX_DATA_TH_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRRX_DATA_TH_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_IRRX_DATA_TH_R = crate::FieldReader; #[doc = "Field `cr_irrx_data_th` writer - "] -pub struct CR_IRRX_DATA_TH_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRRX_DATA_TH_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type CR_IRRX_DATA_TH_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, IRRX_PW_CONFIG_SPEC, u16, u16, 16, O>; +#[doc = "Field `cr_irrx_end_th` reader - "] +pub type CR_IRRX_END_TH_R = crate::FieldReader; +#[doc = "Field `cr_irrx_end_th` writer - "] +pub type CR_IRRX_END_TH_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, IRRX_PW_CONFIG_SPEC, u16, u16, 16, O>; +impl R { + #[doc = "Bits 0:15"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w + pub fn cr_irrx_data_th(&self) -> CR_IRRX_DATA_TH_R { + CR_IRRX_DATA_TH_R::new((self.bits & 0xffff) as u16) } -} -impl R { #[doc = "Bits 16:31"] #[inline(always)] pub fn cr_irrx_end_th(&self) -> CR_IRRX_END_TH_R { CR_IRRX_END_TH_R::new(((self.bits >> 16) & 0xffff) as u16) } - #[doc = "Bits 0:15"] - #[inline(always)] - pub fn cr_irrx_data_th(&self) -> CR_IRRX_DATA_TH_R { - CR_IRRX_DATA_TH_R::new((self.bits & 0xffff) as u16) - } } impl W { - #[doc = "Bits 16:31"] + #[doc = "Bits 0:15"] #[inline(always)] - pub fn cr_irrx_end_th(&mut self) -> CR_IRRX_END_TH_W { - CR_IRRX_END_TH_W { w: self } + #[must_use] + pub fn cr_irrx_data_th(&mut self) -> CR_IRRX_DATA_TH_W<0> { + CR_IRRX_DATA_TH_W::new(self) } - #[doc = "Bits 0:15"] + #[doc = "Bits 16:31"] #[inline(always)] - pub fn cr_irrx_data_th(&mut self) -> CR_IRRX_DATA_TH_W { - CR_IRRX_DATA_TH_W { w: self } + #[must_use] + pub fn cr_irrx_end_th(&mut self) -> CR_IRRX_END_TH_W<16> { + CR_IRRX_END_TH_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -125,11 +88,10 @@ impl crate::Readable for IRRX_PW_CONFIG_SPEC { #[doc = "`write(|w| ..)` method takes [irrx_pw_config::W](W) writer structure"] impl crate::Writable for IRRX_PW_CONFIG_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets irrx_pw_config to value 0x2327_0d47"] impl crate::Resettable for IRRX_PW_CONFIG_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x2327_0d47 - } + const RESET_VALUE: Self::Ux = 0x2327_0d47; } diff --git a/src/ir/irrx_swm_fifo_config_0.rs b/src/ir/irrx_swm_fifo_config_0.rs index 201b9ce..b7a1da9 100644 --- a/src/ir/irrx_swm_fifo_config_0.rs +++ b/src/ir/irrx_swm_fifo_config_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,118 +28,54 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rx_fifo_cnt` reader - "] -pub struct RX_FIFO_CNT_R(crate::FieldReader); -impl RX_FIFO_CNT_R { - pub(crate) fn new(bits: u8) -> Self { - RX_FIFO_CNT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_FIFO_CNT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_fifo_underflow` reader - "] -pub struct RX_FIFO_UNDERFLOW_R(crate::FieldReader); -impl RX_FIFO_UNDERFLOW_R { - pub(crate) fn new(bits: bool) -> Self { - RX_FIFO_UNDERFLOW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_FIFO_UNDERFLOW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_fifo_overflow` reader - "] -pub struct RX_FIFO_OVERFLOW_R(crate::FieldReader); -impl RX_FIFO_OVERFLOW_R { - pub(crate) fn new(bits: bool) -> Self { - RX_FIFO_OVERFLOW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_FIFO_OVERFLOW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} #[doc = "Field `rx_fifo_clr` reader - "] -pub struct RX_FIFO_CLR_R(crate::FieldReader); -impl RX_FIFO_CLR_R { - pub(crate) fn new(bits: bool) -> Self { - RX_FIFO_CLR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_FIFO_CLR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RX_FIFO_CLR_R = crate::BitReader; #[doc = "Field `rx_fifo_clr` writer - "] -pub struct RX_FIFO_CLR_W<'a> { - w: &'a mut W, -} -impl<'a> RX_FIFO_CLR_W<'a> { - #[doc = r"Sets the field bit"] +pub type RX_FIFO_CLR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, IRRX_SWM_FIFO_CONFIG_0_SPEC, bool, O>; +#[doc = "Field `rx_fifo_overflow` reader - "] +pub type RX_FIFO_OVERFLOW_R = crate::BitReader; +#[doc = "Field `rx_fifo_underflow` reader - "] +pub type RX_FIFO_UNDERFLOW_R = crate::BitReader; +#[doc = "Field `rx_fifo_cnt` reader - "] +pub type RX_FIFO_CNT_R = crate::FieldReader; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn rx_fifo_clr(&self) -> RX_FIFO_CLR_R { + RX_FIFO_CLR_R::new((self.bits & 1) != 0) } - #[doc = r"Clears the field bit"] + #[doc = "Bit 2"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn rx_fifo_overflow(&self) -> RX_FIFO_OVERFLOW_R { + RX_FIFO_OVERFLOW_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = r"Writes raw bits to the field"] + #[doc = "Bit 3"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn rx_fifo_underflow(&self) -> RX_FIFO_UNDERFLOW_R { + RX_FIFO_UNDERFLOW_R::new(((self.bits >> 3) & 1) != 0) } -} -impl R { #[doc = "Bits 4:10"] #[inline(always)] pub fn rx_fifo_cnt(&self) -> RX_FIFO_CNT_R { RX_FIFO_CNT_R::new(((self.bits >> 4) & 0x7f) as u8) } - #[doc = "Bit 3"] - #[inline(always)] - pub fn rx_fifo_underflow(&self) -> RX_FIFO_UNDERFLOW_R { - RX_FIFO_UNDERFLOW_R::new(((self.bits >> 3) & 0x01) != 0) - } - #[doc = "Bit 2"] - #[inline(always)] - pub fn rx_fifo_overflow(&self) -> RX_FIFO_OVERFLOW_R { - RX_FIFO_OVERFLOW_R::new(((self.bits >> 2) & 0x01) != 0) - } - #[doc = "Bit 0"] - #[inline(always)] - pub fn rx_fifo_clr(&self) -> RX_FIFO_CLR_R { - RX_FIFO_CLR_R::new((self.bits & 0x01) != 0) - } } impl W { #[doc = "Bit 0"] #[inline(always)] - pub fn rx_fifo_clr(&mut self) -> RX_FIFO_CLR_W { - RX_FIFO_CLR_W { w: self } + #[must_use] + pub fn rx_fifo_clr(&mut self) -> RX_FIFO_CLR_W<0> { + RX_FIFO_CLR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -156,11 +93,10 @@ impl crate::Readable for IRRX_SWM_FIFO_CONFIG_0_SPEC { #[doc = "`write(|w| ..)` method takes [irrx_swm_fifo_config_0::W](W) writer structure"] impl crate::Writable for IRRX_SWM_FIFO_CONFIG_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets irrx_swm_fifo_config_0 to value 0"] impl crate::Resettable for IRRX_SWM_FIFO_CONFIG_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ir/irrx_swm_fifo_rdata.rs b/src/ir/irrx_swm_fifo_rdata.rs index 9c0abe8..07fb26a 100644 --- a/src/ir/irrx_swm_fifo_rdata.rs +++ b/src/ir/irrx_swm_fifo_rdata.rs @@ -7,25 +7,14 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `rx_fifo_rdata` reader - "] -pub struct RX_FIFO_RDATA_R(crate::FieldReader); -impl RX_FIFO_RDATA_R { - pub(crate) fn new(bits: u16) -> Self { - RX_FIFO_RDATA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_FIFO_RDATA_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RX_FIFO_RDATA_R = crate::FieldReader; impl R { #[doc = "Bits 0:15"] #[inline(always)] @@ -44,8 +33,5 @@ impl crate::Readable for IRRX_SWM_FIFO_RDATA_SPEC { } #[doc = "`reset()` method sets irrx_swm_fifo_rdata to value 0"] impl crate::Resettable for IRRX_SWM_FIFO_RDATA_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ir/irtx_config.rs b/src/ir/irtx_config.rs index 90da115..794131e 100644 --- a/src/ir/irtx_config.rs +++ b/src/ir/irtx_config.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,557 +28,202 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `cr_irtx_data_num` reader - "] -pub struct CR_IRTX_DATA_NUM_R(crate::FieldReader); -impl CR_IRTX_DATA_NUM_R { - pub(crate) fn new(bits: u8) -> Self { - CR_IRTX_DATA_NUM_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRTX_DATA_NUM_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_irtx_data_num` writer - "] -pub struct CR_IRTX_DATA_NUM_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRTX_DATA_NUM_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 12)) | ((value as u32 & 0x3f) << 12); - self.w - } -} -#[doc = "Field `cr_irtx_tail_hl_inv` reader - "] -pub struct CR_IRTX_TAIL_HL_INV_R(crate::FieldReader); -impl CR_IRTX_TAIL_HL_INV_R { - pub(crate) fn new(bits: bool) -> Self { - CR_IRTX_TAIL_HL_INV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRTX_TAIL_HL_INV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_irtx_tail_hl_inv` writer - "] -pub struct CR_IRTX_TAIL_HL_INV_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRTX_TAIL_HL_INV_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w - } -} -#[doc = "Field `cr_irtx_tail_en` reader - "] -pub struct CR_IRTX_TAIL_EN_R(crate::FieldReader); -impl CR_IRTX_TAIL_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_IRTX_TAIL_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRTX_TAIL_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_irtx_tail_en` writer - "] -pub struct CR_IRTX_TAIL_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRTX_TAIL_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); - self.w - } -} -#[doc = "Field `cr_irtx_head_hl_inv` reader - "] -pub struct CR_IRTX_HEAD_HL_INV_R(crate::FieldReader); -impl CR_IRTX_HEAD_HL_INV_R { - pub(crate) fn new(bits: bool) -> Self { - CR_IRTX_HEAD_HL_INV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRTX_HEAD_HL_INV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_irtx_head_hl_inv` writer - "] -pub struct CR_IRTX_HEAD_HL_INV_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRTX_HEAD_HL_INV_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w - } -} -#[doc = "Field `cr_irtx_head_en` reader - "] -pub struct CR_IRTX_HEAD_EN_R(crate::FieldReader); -impl CR_IRTX_HEAD_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_IRTX_HEAD_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRTX_HEAD_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_irtx_head_en` writer - "] -pub struct CR_IRTX_HEAD_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRTX_HEAD_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `cr_irtx_logic1_hl_inv` reader - "] -pub struct CR_IRTX_LOGIC1_HL_INV_R(crate::FieldReader); -impl CR_IRTX_LOGIC1_HL_INV_R { - pub(crate) fn new(bits: bool) -> Self { - CR_IRTX_LOGIC1_HL_INV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRTX_LOGIC1_HL_INV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_irtx_logic1_hl_inv` writer - "] -pub struct CR_IRTX_LOGIC1_HL_INV_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRTX_LOGIC1_HL_INV_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w - } -} -#[doc = "Field `cr_irtx_logic0_hl_inv` reader - "] -pub struct CR_IRTX_LOGIC0_HL_INV_R(crate::FieldReader); -impl CR_IRTX_LOGIC0_HL_INV_R { - pub(crate) fn new(bits: bool) -> Self { - CR_IRTX_LOGIC0_HL_INV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRTX_LOGIC0_HL_INV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_irtx_logic0_hl_inv` writer - "] -pub struct CR_IRTX_LOGIC0_HL_INV_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRTX_LOGIC0_HL_INV_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w - } -} -#[doc = "Field `cr_irtx_data_en` reader - "] -pub struct CR_IRTX_DATA_EN_R(crate::FieldReader); -impl CR_IRTX_DATA_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_IRTX_DATA_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRTX_DATA_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_irtx_data_en` writer - "] -pub struct CR_IRTX_DATA_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRTX_DATA_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} -#[doc = "Field `cr_irtx_swm_en` reader - "] -pub struct CR_IRTX_SWM_EN_R(crate::FieldReader); -impl CR_IRTX_SWM_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_IRTX_SWM_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRTX_SWM_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_irtx_swm_en` writer - "] -pub struct CR_IRTX_SWM_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRTX_SWM_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} +#[doc = "Field `cr_irtx_en` reader - "] +pub type CR_IRTX_EN_R = crate::BitReader; +#[doc = "Field `cr_irtx_en` writer - "] +pub type CR_IRTX_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, IRTX_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_irtx_out_inv` reader - "] +pub type CR_IRTX_OUT_INV_R = crate::BitReader; +#[doc = "Field `cr_irtx_out_inv` writer - "] +pub type CR_IRTX_OUT_INV_W<'a, const O: u8> = crate::BitWriter<'a, u32, IRTX_CONFIG_SPEC, bool, O>; #[doc = "Field `cr_irtx_mod_en` reader - "] -pub struct CR_IRTX_MOD_EN_R(crate::FieldReader); -impl CR_IRTX_MOD_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_IRTX_MOD_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRTX_MOD_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_IRTX_MOD_EN_R = crate::BitReader; #[doc = "Field `cr_irtx_mod_en` writer - "] -pub struct CR_IRTX_MOD_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRTX_MOD_EN_W<'a> { - #[doc = r"Sets the field bit"] +pub type CR_IRTX_MOD_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, IRTX_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_irtx_swm_en` reader - "] +pub type CR_IRTX_SWM_EN_R = crate::BitReader; +#[doc = "Field `cr_irtx_swm_en` writer - "] +pub type CR_IRTX_SWM_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, IRTX_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_irtx_data_en` reader - "] +pub type CR_IRTX_DATA_EN_R = crate::BitReader; +#[doc = "Field `cr_irtx_data_en` writer - "] +pub type CR_IRTX_DATA_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, IRTX_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_irtx_logic0_hl_inv` reader - "] +pub type CR_IRTX_LOGIC0_HL_INV_R = crate::BitReader; +#[doc = "Field `cr_irtx_logic0_hl_inv` writer - "] +pub type CR_IRTX_LOGIC0_HL_INV_W<'a, const O: u8> = + crate::BitWriter<'a, u32, IRTX_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_irtx_logic1_hl_inv` reader - "] +pub type CR_IRTX_LOGIC1_HL_INV_R = crate::BitReader; +#[doc = "Field `cr_irtx_logic1_hl_inv` writer - "] +pub type CR_IRTX_LOGIC1_HL_INV_W<'a, const O: u8> = + crate::BitWriter<'a, u32, IRTX_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_irtx_head_en` reader - "] +pub type CR_IRTX_HEAD_EN_R = crate::BitReader; +#[doc = "Field `cr_irtx_head_en` writer - "] +pub type CR_IRTX_HEAD_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, IRTX_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_irtx_head_hl_inv` reader - "] +pub type CR_IRTX_HEAD_HL_INV_R = crate::BitReader; +#[doc = "Field `cr_irtx_head_hl_inv` writer - "] +pub type CR_IRTX_HEAD_HL_INV_W<'a, const O: u8> = + crate::BitWriter<'a, u32, IRTX_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_irtx_tail_en` reader - "] +pub type CR_IRTX_TAIL_EN_R = crate::BitReader; +#[doc = "Field `cr_irtx_tail_en` writer - "] +pub type CR_IRTX_TAIL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, IRTX_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_irtx_tail_hl_inv` reader - "] +pub type CR_IRTX_TAIL_HL_INV_R = crate::BitReader; +#[doc = "Field `cr_irtx_tail_hl_inv` writer - "] +pub type CR_IRTX_TAIL_HL_INV_W<'a, const O: u8> = + crate::BitWriter<'a, u32, IRTX_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_irtx_data_num` reader - "] +pub type CR_IRTX_DATA_NUM_R = crate::FieldReader; +#[doc = "Field `cr_irtx_data_num` writer - "] +pub type CR_IRTX_DATA_NUM_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, IRTX_CONFIG_SPEC, u8, u8, 6, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn cr_irtx_en(&self) -> CR_IRTX_EN_R { + CR_IRTX_EN_R::new((self.bits & 1) != 0) } - #[doc = r"Clears the field bit"] + #[doc = "Bit 1"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn cr_irtx_out_inv(&self) -> CR_IRTX_OUT_INV_R { + CR_IRTX_OUT_INV_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = r"Writes raw bits to the field"] + #[doc = "Bit 2"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `cr_irtx_out_inv` reader - "] -pub struct CR_IRTX_OUT_INV_R(crate::FieldReader); -impl CR_IRTX_OUT_INV_R { - pub(crate) fn new(bits: bool) -> Self { - CR_IRTX_OUT_INV_R(crate::FieldReader::new(bits)) + pub fn cr_irtx_mod_en(&self) -> CR_IRTX_MOD_EN_R { + CR_IRTX_MOD_EN_R::new(((self.bits >> 2) & 1) != 0) } -} -impl core::ops::Deref for CR_IRTX_OUT_INV_R { - type Target = crate::FieldReader; + #[doc = "Bit 3"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn cr_irtx_swm_en(&self) -> CR_IRTX_SWM_EN_R { + CR_IRTX_SWM_EN_R::new(((self.bits >> 3) & 1) != 0) } -} -#[doc = "Field `cr_irtx_out_inv` writer - "] -pub struct CR_IRTX_OUT_INV_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRTX_OUT_INV_W<'a> { - #[doc = r"Sets the field bit"] + #[doc = "Bit 4"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn cr_irtx_data_en(&self) -> CR_IRTX_DATA_EN_R { + CR_IRTX_DATA_EN_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = r"Clears the field bit"] + #[doc = "Bit 5"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn cr_irtx_logic0_hl_inv(&self) -> CR_IRTX_LOGIC0_HL_INV_R { + CR_IRTX_LOGIC0_HL_INV_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = r"Writes raw bits to the field"] + #[doc = "Bit 6"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} -#[doc = "Field `cr_irtx_en` reader - "] -pub struct CR_IRTX_EN_R(crate::FieldReader); -impl CR_IRTX_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_IRTX_EN_R(crate::FieldReader::new(bits)) + pub fn cr_irtx_logic1_hl_inv(&self) -> CR_IRTX_LOGIC1_HL_INV_R { + CR_IRTX_LOGIC1_HL_INV_R::new(((self.bits >> 6) & 1) != 0) } -} -impl core::ops::Deref for CR_IRTX_EN_R { - type Target = crate::FieldReader; + #[doc = "Bit 8"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn cr_irtx_head_en(&self) -> CR_IRTX_HEAD_EN_R { + CR_IRTX_HEAD_EN_R::new(((self.bits >> 8) & 1) != 0) } -} -#[doc = "Field `cr_irtx_en` writer - "] -pub struct CR_IRTX_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRTX_EN_W<'a> { - #[doc = r"Sets the field bit"] + #[doc = "Bit 9"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn cr_irtx_head_hl_inv(&self) -> CR_IRTX_HEAD_HL_INV_R { + CR_IRTX_HEAD_HL_INV_R::new(((self.bits >> 9) & 1) != 0) } - #[doc = r"Clears the field bit"] + #[doc = "Bit 10"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn cr_irtx_tail_en(&self) -> CR_IRTX_TAIL_EN_R { + CR_IRTX_TAIL_EN_R::new(((self.bits >> 10) & 1) != 0) } - #[doc = r"Writes raw bits to the field"] + #[doc = "Bit 11"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn cr_irtx_tail_hl_inv(&self) -> CR_IRTX_TAIL_HL_INV_R { + CR_IRTX_TAIL_HL_INV_R::new(((self.bits >> 11) & 1) != 0) } -} -impl R { #[doc = "Bits 12:17"] #[inline(always)] pub fn cr_irtx_data_num(&self) -> CR_IRTX_DATA_NUM_R { CR_IRTX_DATA_NUM_R::new(((self.bits >> 12) & 0x3f) as u8) } - #[doc = "Bit 11"] - #[inline(always)] - pub fn cr_irtx_tail_hl_inv(&self) -> CR_IRTX_TAIL_HL_INV_R { - CR_IRTX_TAIL_HL_INV_R::new(((self.bits >> 11) & 0x01) != 0) - } - #[doc = "Bit 10"] - #[inline(always)] - pub fn cr_irtx_tail_en(&self) -> CR_IRTX_TAIL_EN_R { - CR_IRTX_TAIL_EN_R::new(((self.bits >> 10) & 0x01) != 0) - } - #[doc = "Bit 9"] - #[inline(always)] - pub fn cr_irtx_head_hl_inv(&self) -> CR_IRTX_HEAD_HL_INV_R { - CR_IRTX_HEAD_HL_INV_R::new(((self.bits >> 9) & 0x01) != 0) - } - #[doc = "Bit 8"] - #[inline(always)] - pub fn cr_irtx_head_en(&self) -> CR_IRTX_HEAD_EN_R { - CR_IRTX_HEAD_EN_R::new(((self.bits >> 8) & 0x01) != 0) - } - #[doc = "Bit 6"] - #[inline(always)] - pub fn cr_irtx_logic1_hl_inv(&self) -> CR_IRTX_LOGIC1_HL_INV_R { - CR_IRTX_LOGIC1_HL_INV_R::new(((self.bits >> 6) & 0x01) != 0) - } - #[doc = "Bit 5"] - #[inline(always)] - pub fn cr_irtx_logic0_hl_inv(&self) -> CR_IRTX_LOGIC0_HL_INV_R { - CR_IRTX_LOGIC0_HL_INV_R::new(((self.bits >> 5) & 0x01) != 0) - } - #[doc = "Bit 4"] - #[inline(always)] - pub fn cr_irtx_data_en(&self) -> CR_IRTX_DATA_EN_R { - CR_IRTX_DATA_EN_R::new(((self.bits >> 4) & 0x01) != 0) - } - #[doc = "Bit 3"] - #[inline(always)] - pub fn cr_irtx_swm_en(&self) -> CR_IRTX_SWM_EN_R { - CR_IRTX_SWM_EN_R::new(((self.bits >> 3) & 0x01) != 0) - } - #[doc = "Bit 2"] - #[inline(always)] - pub fn cr_irtx_mod_en(&self) -> CR_IRTX_MOD_EN_R { - CR_IRTX_MOD_EN_R::new(((self.bits >> 2) & 0x01) != 0) - } - #[doc = "Bit 1"] - #[inline(always)] - pub fn cr_irtx_out_inv(&self) -> CR_IRTX_OUT_INV_R { - CR_IRTX_OUT_INV_R::new(((self.bits >> 1) & 0x01) != 0) - } - #[doc = "Bit 0"] - #[inline(always)] - pub fn cr_irtx_en(&self) -> CR_IRTX_EN_R { - CR_IRTX_EN_R::new((self.bits & 0x01) != 0) - } } impl W { - #[doc = "Bits 12:17"] + #[doc = "Bit 0"] #[inline(always)] - pub fn cr_irtx_data_num(&mut self) -> CR_IRTX_DATA_NUM_W { - CR_IRTX_DATA_NUM_W { w: self } + #[must_use] + pub fn cr_irtx_en(&mut self) -> CR_IRTX_EN_W<0> { + CR_IRTX_EN_W::new(self) } - #[doc = "Bit 11"] + #[doc = "Bit 1"] #[inline(always)] - pub fn cr_irtx_tail_hl_inv(&mut self) -> CR_IRTX_TAIL_HL_INV_W { - CR_IRTX_TAIL_HL_INV_W { w: self } + #[must_use] + pub fn cr_irtx_out_inv(&mut self) -> CR_IRTX_OUT_INV_W<1> { + CR_IRTX_OUT_INV_W::new(self) } - #[doc = "Bit 10"] + #[doc = "Bit 2"] #[inline(always)] - pub fn cr_irtx_tail_en(&mut self) -> CR_IRTX_TAIL_EN_W { - CR_IRTX_TAIL_EN_W { w: self } + #[must_use] + pub fn cr_irtx_mod_en(&mut self) -> CR_IRTX_MOD_EN_W<2> { + CR_IRTX_MOD_EN_W::new(self) } - #[doc = "Bit 9"] + #[doc = "Bit 3"] #[inline(always)] - pub fn cr_irtx_head_hl_inv(&mut self) -> CR_IRTX_HEAD_HL_INV_W { - CR_IRTX_HEAD_HL_INV_W { w: self } + #[must_use] + pub fn cr_irtx_swm_en(&mut self) -> CR_IRTX_SWM_EN_W<3> { + CR_IRTX_SWM_EN_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bit 4"] #[inline(always)] - pub fn cr_irtx_head_en(&mut self) -> CR_IRTX_HEAD_EN_W { - CR_IRTX_HEAD_EN_W { w: self } + #[must_use] + pub fn cr_irtx_data_en(&mut self) -> CR_IRTX_DATA_EN_W<4> { + CR_IRTX_DATA_EN_W::new(self) } - #[doc = "Bit 6"] + #[doc = "Bit 5"] #[inline(always)] - pub fn cr_irtx_logic1_hl_inv(&mut self) -> CR_IRTX_LOGIC1_HL_INV_W { - CR_IRTX_LOGIC1_HL_INV_W { w: self } + #[must_use] + pub fn cr_irtx_logic0_hl_inv(&mut self) -> CR_IRTX_LOGIC0_HL_INV_W<5> { + CR_IRTX_LOGIC0_HL_INV_W::new(self) } - #[doc = "Bit 5"] + #[doc = "Bit 6"] #[inline(always)] - pub fn cr_irtx_logic0_hl_inv(&mut self) -> CR_IRTX_LOGIC0_HL_INV_W { - CR_IRTX_LOGIC0_HL_INV_W { w: self } + #[must_use] + pub fn cr_irtx_logic1_hl_inv(&mut self) -> CR_IRTX_LOGIC1_HL_INV_W<6> { + CR_IRTX_LOGIC1_HL_INV_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 8"] #[inline(always)] - pub fn cr_irtx_data_en(&mut self) -> CR_IRTX_DATA_EN_W { - CR_IRTX_DATA_EN_W { w: self } + #[must_use] + pub fn cr_irtx_head_en(&mut self) -> CR_IRTX_HEAD_EN_W<8> { + CR_IRTX_HEAD_EN_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bit 9"] #[inline(always)] - pub fn cr_irtx_swm_en(&mut self) -> CR_IRTX_SWM_EN_W { - CR_IRTX_SWM_EN_W { w: self } + #[must_use] + pub fn cr_irtx_head_hl_inv(&mut self) -> CR_IRTX_HEAD_HL_INV_W<9> { + CR_IRTX_HEAD_HL_INV_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bit 10"] #[inline(always)] - pub fn cr_irtx_mod_en(&mut self) -> CR_IRTX_MOD_EN_W { - CR_IRTX_MOD_EN_W { w: self } + #[must_use] + pub fn cr_irtx_tail_en(&mut self) -> CR_IRTX_TAIL_EN_W<10> { + CR_IRTX_TAIL_EN_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 11"] #[inline(always)] - pub fn cr_irtx_out_inv(&mut self) -> CR_IRTX_OUT_INV_W { - CR_IRTX_OUT_INV_W { w: self } + #[must_use] + pub fn cr_irtx_tail_hl_inv(&mut self) -> CR_IRTX_TAIL_HL_INV_W<11> { + CR_IRTX_TAIL_HL_INV_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bits 12:17"] #[inline(always)] - pub fn cr_irtx_en(&mut self) -> CR_IRTX_EN_W { - CR_IRTX_EN_W { w: self } + #[must_use] + pub fn cr_irtx_data_num(&mut self) -> CR_IRTX_DATA_NUM_W<12> { + CR_IRTX_DATA_NUM_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -595,11 +241,10 @@ impl crate::Readable for IRTX_CONFIG_SPEC { #[doc = "`write(|w| ..)` method takes [irtx_config::W](W) writer structure"] impl crate::Writable for IRTX_CONFIG_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets irtx_config to value 0x0001_f510"] impl crate::Resettable for IRTX_CONFIG_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0001_f510 - } + const RESET_VALUE: Self::Ux = 0x0001_f510; } diff --git a/src/ir/irtx_data_word0.rs b/src/ir/irtx_data_word0.rs index 4e1870b..d1e7f2c 100644 --- a/src/ir/irtx_data_word0.rs +++ b/src/ir/irtx_data_word0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `cr_irtx_data_word0` reader - "] -pub struct CR_IRTX_DATA_WORD0_R(crate::FieldReader); -impl CR_IRTX_DATA_WORD0_R { - pub(crate) fn new(bits: u32) -> Self { - CR_IRTX_DATA_WORD0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRTX_DATA_WORD0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_IRTX_DATA_WORD0_R = crate::FieldReader; #[doc = "Field `cr_irtx_data_word0` writer - "] -pub struct CR_IRTX_DATA_WORD0_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRTX_DATA_WORD0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type CR_IRTX_DATA_WORD0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, IRTX_DATA_WORD0_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn cr_irtx_data_word0(&self) -> CR_IRTX_DATA_WORD0_R { - CR_IRTX_DATA_WORD0_R::new((self.bits & 0xffff_ffff) as u32) + CR_IRTX_DATA_WORD0_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn cr_irtx_data_word0(&mut self) -> CR_IRTX_DATA_WORD0_W { - CR_IRTX_DATA_WORD0_W { w: self } + #[must_use] + pub fn cr_irtx_data_word0(&mut self) -> CR_IRTX_DATA_WORD0_W<0> { + CR_IRTX_DATA_WORD0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for IRTX_DATA_WORD0_SPEC { #[doc = "`write(|w| ..)` method takes [irtx_data_word0::W](W) writer structure"] impl crate::Writable for IRTX_DATA_WORD0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets irtx_data_word0 to value 0"] impl crate::Resettable for IRTX_DATA_WORD0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ir/irtx_data_word1.rs b/src/ir/irtx_data_word1.rs index f945c80..502ed90 100644 --- a/src/ir/irtx_data_word1.rs +++ b/src/ir/irtx_data_word1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `cr_irtx_data_word1` reader - "] -pub struct CR_IRTX_DATA_WORD1_R(crate::FieldReader); -impl CR_IRTX_DATA_WORD1_R { - pub(crate) fn new(bits: u32) -> Self { - CR_IRTX_DATA_WORD1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRTX_DATA_WORD1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_IRTX_DATA_WORD1_R = crate::FieldReader; #[doc = "Field `cr_irtx_data_word1` writer - "] -pub struct CR_IRTX_DATA_WORD1_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRTX_DATA_WORD1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type CR_IRTX_DATA_WORD1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, IRTX_DATA_WORD1_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn cr_irtx_data_word1(&self) -> CR_IRTX_DATA_WORD1_R { - CR_IRTX_DATA_WORD1_R::new((self.bits & 0xffff_ffff) as u32) + CR_IRTX_DATA_WORD1_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn cr_irtx_data_word1(&mut self) -> CR_IRTX_DATA_WORD1_W { - CR_IRTX_DATA_WORD1_W { w: self } + #[must_use] + pub fn cr_irtx_data_word1(&mut self) -> CR_IRTX_DATA_WORD1_W<0> { + CR_IRTX_DATA_WORD1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for IRTX_DATA_WORD1_SPEC { #[doc = "`write(|w| ..)` method takes [irtx_data_word1::W](W) writer structure"] impl crate::Writable for IRTX_DATA_WORD1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets irtx_data_word1 to value 0"] impl crate::Resettable for IRTX_DATA_WORD1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ir/irtx_int_sts.rs b/src/ir/irtx_int_sts.rs index c1dc48f..f7acfe2 100644 --- a/src/ir/irtx_int_sts.rs +++ b/src/ir/irtx_int_sts.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,172 +28,70 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `cr_irtx_end_en` reader - "] -pub struct CR_IRTX_END_EN_R(crate::FieldReader); -impl CR_IRTX_END_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_IRTX_END_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRTX_END_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_irtx_end_en` writer - "] -pub struct CR_IRTX_END_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRTX_END_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24); - self.w - } -} -#[doc = "Field `cr_irtx_end_clr` reader - "] -pub struct CR_IRTX_END_CLR_R(crate::FieldReader); -impl CR_IRTX_END_CLR_R { - pub(crate) fn new(bits: bool) -> Self { - CR_IRTX_END_CLR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRTX_END_CLR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_irtx_end_clr` writer - "] -pub struct CR_IRTX_END_CLR_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRTX_END_CLR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} +#[doc = "Field `irtx_end_int` reader - "] +pub type IRTX_END_INT_R = crate::BitReader; #[doc = "Field `cr_irtx_end_mask` reader - "] -pub struct CR_IRTX_END_MASK_R(crate::FieldReader); -impl CR_IRTX_END_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - CR_IRTX_END_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRTX_END_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_IRTX_END_MASK_R = crate::BitReader; #[doc = "Field `cr_irtx_end_mask` writer - "] -pub struct CR_IRTX_END_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRTX_END_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `irtx_end_int` reader - "] -pub struct IRTX_END_INT_R(crate::FieldReader); -impl IRTX_END_INT_R { - pub(crate) fn new(bits: bool) -> Self { - IRTX_END_INT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for IRTX_END_INT_R { - type Target = crate::FieldReader; +pub type CR_IRTX_END_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, IRTX_INT_STS_SPEC, bool, O>; +#[doc = "Field `cr_irtx_end_clr` reader - "] +pub type CR_IRTX_END_CLR_R = crate::BitReader; +#[doc = "Field `cr_irtx_end_clr` writer - "] +pub type CR_IRTX_END_CLR_W<'a, const O: u8> = crate::BitWriter<'a, u32, IRTX_INT_STS_SPEC, bool, O>; +#[doc = "Field `cr_irtx_end_en` reader - "] +pub type CR_IRTX_END_EN_R = crate::BitReader; +#[doc = "Field `cr_irtx_end_en` writer - "] +pub type CR_IRTX_END_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, IRTX_INT_STS_SPEC, bool, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn irtx_end_int(&self) -> IRTX_END_INT_R { + IRTX_END_INT_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bit 24"] + #[doc = "Bit 8"] #[inline(always)] - pub fn cr_irtx_end_en(&self) -> CR_IRTX_END_EN_R { - CR_IRTX_END_EN_R::new(((self.bits >> 24) & 0x01) != 0) + pub fn cr_irtx_end_mask(&self) -> CR_IRTX_END_MASK_R { + CR_IRTX_END_MASK_R::new(((self.bits >> 8) & 1) != 0) } #[doc = "Bit 16"] #[inline(always)] pub fn cr_irtx_end_clr(&self) -> CR_IRTX_END_CLR_R { - CR_IRTX_END_CLR_R::new(((self.bits >> 16) & 0x01) != 0) + CR_IRTX_END_CLR_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 8"] - #[inline(always)] - pub fn cr_irtx_end_mask(&self) -> CR_IRTX_END_MASK_R { - CR_IRTX_END_MASK_R::new(((self.bits >> 8) & 0x01) != 0) - } - #[doc = "Bit 0"] + #[doc = "Bit 24"] #[inline(always)] - pub fn irtx_end_int(&self) -> IRTX_END_INT_R { - IRTX_END_INT_R::new((self.bits & 0x01) != 0) + pub fn cr_irtx_end_en(&self) -> CR_IRTX_END_EN_R { + CR_IRTX_END_EN_R::new(((self.bits >> 24) & 1) != 0) } } impl W { - #[doc = "Bit 24"] + #[doc = "Bit 8"] #[inline(always)] - pub fn cr_irtx_end_en(&mut self) -> CR_IRTX_END_EN_W { - CR_IRTX_END_EN_W { w: self } + #[must_use] + pub fn cr_irtx_end_mask(&mut self) -> CR_IRTX_END_MASK_W<8> { + CR_IRTX_END_MASK_W::new(self) } #[doc = "Bit 16"] #[inline(always)] - pub fn cr_irtx_end_clr(&mut self) -> CR_IRTX_END_CLR_W { - CR_IRTX_END_CLR_W { w: self } + #[must_use] + pub fn cr_irtx_end_clr(&mut self) -> CR_IRTX_END_CLR_W<16> { + CR_IRTX_END_CLR_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bit 24"] #[inline(always)] - pub fn cr_irtx_end_mask(&mut self) -> CR_IRTX_END_MASK_W { - CR_IRTX_END_MASK_W { w: self } + #[must_use] + pub fn cr_irtx_end_en(&mut self) -> CR_IRTX_END_EN_W<24> { + CR_IRTX_END_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -210,11 +109,10 @@ impl crate::Readable for IRTX_INT_STS_SPEC { #[doc = "`write(|w| ..)` method takes [irtx_int_sts::W](W) writer structure"] impl crate::Writable for IRTX_INT_STS_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets irtx_int_sts to value 0x0100_0100"] impl crate::Resettable for IRTX_INT_STS_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0100_0100 - } + const RESET_VALUE: Self::Ux = 0x0100_0100; } diff --git a/src/ir/irtx_pulse_width.rs b/src/ir/irtx_pulse_width.rs index db1f69a..2c86bfd 100644 --- a/src/ir/irtx_pulse_width.rs +++ b/src/ir/irtx_pulse_width.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,123 +28,65 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `cr_irtx_mod_ph1_w` reader - "] -pub struct CR_IRTX_MOD_PH1_W_R(crate::FieldReader); -impl CR_IRTX_MOD_PH1_W_R { - pub(crate) fn new(bits: u8) -> Self { - CR_IRTX_MOD_PH1_W_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRTX_MOD_PH1_W_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_irtx_mod_ph1_w` writer - "] -pub struct CR_IRTX_MOD_PH1_W_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRTX_MOD_PH1_W_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 24)) | ((value as u32 & 0xff) << 24); - self.w - } -} -#[doc = "Field `cr_irtx_mod_ph0_w` reader - "] -pub struct CR_IRTX_MOD_PH0_W_R(crate::FieldReader); -impl CR_IRTX_MOD_PH0_W_R { - pub(crate) fn new(bits: u8) -> Self { - CR_IRTX_MOD_PH0_W_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRTX_MOD_PH0_W_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_irtx_mod_ph0_w` writer - "] -pub struct CR_IRTX_MOD_PH0_W_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRTX_MOD_PH0_W_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 16)) | ((value as u32 & 0xff) << 16); - self.w - } -} #[doc = "Field `cr_irtx_pw_unit` reader - "] -pub struct CR_IRTX_PW_UNIT_R(crate::FieldReader); -impl CR_IRTX_PW_UNIT_R { - pub(crate) fn new(bits: u16) -> Self { - CR_IRTX_PW_UNIT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRTX_PW_UNIT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_IRTX_PW_UNIT_R = crate::FieldReader; #[doc = "Field `cr_irtx_pw_unit` writer - "] -pub struct CR_IRTX_PW_UNIT_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRTX_PW_UNIT_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x0fff) | (value as u32 & 0x0fff); - self.w - } -} +pub type CR_IRTX_PW_UNIT_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, IRTX_PULSE_WIDTH_SPEC, u16, u16, 12, O>; +#[doc = "Field `cr_irtx_mod_ph0_w` reader - "] +pub type CR_IRTX_MOD_PH0_W_R = crate::FieldReader; +#[doc = "Field `cr_irtx_mod_ph0_w` writer - "] +pub type CR_IRTX_MOD_PH0_W_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, IRTX_PULSE_WIDTH_SPEC, u8, u8, 8, O>; +#[doc = "Field `cr_irtx_mod_ph1_w` reader - "] +pub type CR_IRTX_MOD_PH1_W_R = crate::FieldReader; +#[doc = "Field `cr_irtx_mod_ph1_w` writer - "] +pub type CR_IRTX_MOD_PH1_W_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, IRTX_PULSE_WIDTH_SPEC, u8, u8, 8, O>; impl R { - #[doc = "Bits 24:31"] + #[doc = "Bits 0:11"] #[inline(always)] - pub fn cr_irtx_mod_ph1_w(&self) -> CR_IRTX_MOD_PH1_W_R { - CR_IRTX_MOD_PH1_W_R::new(((self.bits >> 24) & 0xff) as u8) + pub fn cr_irtx_pw_unit(&self) -> CR_IRTX_PW_UNIT_R { + CR_IRTX_PW_UNIT_R::new((self.bits & 0x0fff) as u16) } #[doc = "Bits 16:23"] #[inline(always)] pub fn cr_irtx_mod_ph0_w(&self) -> CR_IRTX_MOD_PH0_W_R { CR_IRTX_MOD_PH0_W_R::new(((self.bits >> 16) & 0xff) as u8) } - #[doc = "Bits 0:11"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn cr_irtx_pw_unit(&self) -> CR_IRTX_PW_UNIT_R { - CR_IRTX_PW_UNIT_R::new((self.bits & 0x0fff) as u16) + pub fn cr_irtx_mod_ph1_w(&self) -> CR_IRTX_MOD_PH1_W_R { + CR_IRTX_MOD_PH1_W_R::new(((self.bits >> 24) & 0xff) as u8) } } impl W { - #[doc = "Bits 24:31"] + #[doc = "Bits 0:11"] #[inline(always)] - pub fn cr_irtx_mod_ph1_w(&mut self) -> CR_IRTX_MOD_PH1_W_W { - CR_IRTX_MOD_PH1_W_W { w: self } + #[must_use] + pub fn cr_irtx_pw_unit(&mut self) -> CR_IRTX_PW_UNIT_W<0> { + CR_IRTX_PW_UNIT_W::new(self) } #[doc = "Bits 16:23"] #[inline(always)] - pub fn cr_irtx_mod_ph0_w(&mut self) -> CR_IRTX_MOD_PH0_W_W { - CR_IRTX_MOD_PH0_W_W { w: self } + #[must_use] + pub fn cr_irtx_mod_ph0_w(&mut self) -> CR_IRTX_MOD_PH0_W_W<16> { + CR_IRTX_MOD_PH0_W_W::new(self) } - #[doc = "Bits 0:11"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn cr_irtx_pw_unit(&mut self) -> CR_IRTX_PW_UNIT_W { - CR_IRTX_PW_UNIT_W { w: self } + #[must_use] + pub fn cr_irtx_mod_ph1_w(&mut self) -> CR_IRTX_MOD_PH1_W_W<24> { + CR_IRTX_MOD_PH1_W_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -161,11 +104,10 @@ impl crate::Readable for IRTX_PULSE_WIDTH_SPEC { #[doc = "`write(|w| ..)` method takes [irtx_pulse_width::W](W) writer structure"] impl crate::Writable for IRTX_PULSE_WIDTH_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets irtx_pulse_width to value 0x2211_0464"] impl crate::Resettable for IRTX_PULSE_WIDTH_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x2211_0464 - } + const RESET_VALUE: Self::Ux = 0x2211_0464; } diff --git a/src/ir/irtx_pw.rs b/src/ir/irtx_pw.rs index a7326a2..54b3131 100644 --- a/src/ir/irtx_pw.rs +++ b/src/ir/irtx_pw.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,303 +28,145 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `cr_irtx_tail_ph1_w` reader - "] -pub struct CR_IRTX_TAIL_PH1_W_R(crate::FieldReader); -impl CR_IRTX_TAIL_PH1_W_R { - pub(crate) fn new(bits: u8) -> Self { - CR_IRTX_TAIL_PH1_W_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRTX_TAIL_PH1_W_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_irtx_tail_ph1_w` writer - "] -pub struct CR_IRTX_TAIL_PH1_W_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRTX_TAIL_PH1_W_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 28)) | ((value as u32 & 0x0f) << 28); - self.w - } -} -#[doc = "Field `cr_irtx_tail_ph0_w` reader - "] -pub struct CR_IRTX_TAIL_PH0_W_R(crate::FieldReader); -impl CR_IRTX_TAIL_PH0_W_R { - pub(crate) fn new(bits: u8) -> Self { - CR_IRTX_TAIL_PH0_W_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRTX_TAIL_PH0_W_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_irtx_tail_ph0_w` writer - "] -pub struct CR_IRTX_TAIL_PH0_W_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRTX_TAIL_PH0_W_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 24)) | ((value as u32 & 0x0f) << 24); - self.w - } -} -#[doc = "Field `cr_irtx_head_ph1_w` reader - "] -pub struct CR_IRTX_HEAD_PH1_W_R(crate::FieldReader); -impl CR_IRTX_HEAD_PH1_W_R { - pub(crate) fn new(bits: u8) -> Self { - CR_IRTX_HEAD_PH1_W_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRTX_HEAD_PH1_W_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_irtx_head_ph1_w` writer - "] -pub struct CR_IRTX_HEAD_PH1_W_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRTX_HEAD_PH1_W_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 20)) | ((value as u32 & 0x0f) << 20); - self.w - } -} -#[doc = "Field `cr_irtx_head_ph0_w` reader - "] -pub struct CR_IRTX_HEAD_PH0_W_R(crate::FieldReader); -impl CR_IRTX_HEAD_PH0_W_R { - pub(crate) fn new(bits: u8) -> Self { - CR_IRTX_HEAD_PH0_W_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRTX_HEAD_PH0_W_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_irtx_head_ph0_w` writer - "] -pub struct CR_IRTX_HEAD_PH0_W_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRTX_HEAD_PH0_W_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 16)) | ((value as u32 & 0x0f) << 16); - self.w - } -} -#[doc = "Field `cr_irtx_logic1_ph1_w` reader - "] -pub struct CR_IRTX_LOGIC1_PH1_W_R(crate::FieldReader); -impl CR_IRTX_LOGIC1_PH1_W_R { - pub(crate) fn new(bits: u8) -> Self { - CR_IRTX_LOGIC1_PH1_W_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRTX_LOGIC1_PH1_W_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_irtx_logic1_ph1_w` writer - "] -pub struct CR_IRTX_LOGIC1_PH1_W_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRTX_LOGIC1_PH1_W_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 12)) | ((value as u32 & 0x0f) << 12); - self.w - } -} -#[doc = "Field `cr_irtx_logic1_ph0_w` reader - "] -pub struct CR_IRTX_LOGIC1_PH0_W_R(crate::FieldReader); -impl CR_IRTX_LOGIC1_PH0_W_R { - pub(crate) fn new(bits: u8) -> Self { - CR_IRTX_LOGIC1_PH0_W_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRTX_LOGIC1_PH0_W_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_irtx_logic1_ph0_w` writer - "] -pub struct CR_IRTX_LOGIC1_PH0_W_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRTX_LOGIC1_PH0_W_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 8)) | ((value as u32 & 0x0f) << 8); - self.w - } -} -#[doc = "Field `cr_irtx_logic0_ph1_w` reader - "] -pub struct CR_IRTX_LOGIC0_PH1_W_R(crate::FieldReader); -impl CR_IRTX_LOGIC0_PH1_W_R { - pub(crate) fn new(bits: u8) -> Self { - CR_IRTX_LOGIC0_PH1_W_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRTX_LOGIC0_PH1_W_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_irtx_logic0_ph1_w` writer - "] -pub struct CR_IRTX_LOGIC0_PH1_W_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRTX_LOGIC0_PH1_W_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 4)) | ((value as u32 & 0x0f) << 4); - self.w - } -} #[doc = "Field `cr_irtx_logic0_ph0_w` reader - "] -pub struct CR_IRTX_LOGIC0_PH0_W_R(crate::FieldReader); -impl CR_IRTX_LOGIC0_PH0_W_R { - pub(crate) fn new(bits: u8) -> Self { - CR_IRTX_LOGIC0_PH0_W_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRTX_LOGIC0_PH0_W_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_IRTX_LOGIC0_PH0_W_R = crate::FieldReader; #[doc = "Field `cr_irtx_logic0_ph0_w` writer - "] -pub struct CR_IRTX_LOGIC0_PH0_W_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRTX_LOGIC0_PH0_W_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type CR_IRTX_LOGIC0_PH0_W_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, IRTX_PW_SPEC, u8, u8, 4, O>; +#[doc = "Field `cr_irtx_logic0_ph1_w` reader - "] +pub type CR_IRTX_LOGIC0_PH1_W_R = crate::FieldReader; +#[doc = "Field `cr_irtx_logic0_ph1_w` writer - "] +pub type CR_IRTX_LOGIC0_PH1_W_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, IRTX_PW_SPEC, u8, u8, 4, O>; +#[doc = "Field `cr_irtx_logic1_ph0_w` reader - "] +pub type CR_IRTX_LOGIC1_PH0_W_R = crate::FieldReader; +#[doc = "Field `cr_irtx_logic1_ph0_w` writer - "] +pub type CR_IRTX_LOGIC1_PH0_W_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, IRTX_PW_SPEC, u8, u8, 4, O>; +#[doc = "Field `cr_irtx_logic1_ph1_w` reader - "] +pub type CR_IRTX_LOGIC1_PH1_W_R = crate::FieldReader; +#[doc = "Field `cr_irtx_logic1_ph1_w` writer - "] +pub type CR_IRTX_LOGIC1_PH1_W_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, IRTX_PW_SPEC, u8, u8, 4, O>; +#[doc = "Field `cr_irtx_head_ph0_w` reader - "] +pub type CR_IRTX_HEAD_PH0_W_R = crate::FieldReader; +#[doc = "Field `cr_irtx_head_ph0_w` writer - "] +pub type CR_IRTX_HEAD_PH0_W_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, IRTX_PW_SPEC, u8, u8, 4, O>; +#[doc = "Field `cr_irtx_head_ph1_w` reader - "] +pub type CR_IRTX_HEAD_PH1_W_R = crate::FieldReader; +#[doc = "Field `cr_irtx_head_ph1_w` writer - "] +pub type CR_IRTX_HEAD_PH1_W_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, IRTX_PW_SPEC, u8, u8, 4, O>; +#[doc = "Field `cr_irtx_tail_ph0_w` reader - "] +pub type CR_IRTX_TAIL_PH0_W_R = crate::FieldReader; +#[doc = "Field `cr_irtx_tail_ph0_w` writer - "] +pub type CR_IRTX_TAIL_PH0_W_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, IRTX_PW_SPEC, u8, u8, 4, O>; +#[doc = "Field `cr_irtx_tail_ph1_w` reader - "] +pub type CR_IRTX_TAIL_PH1_W_R = crate::FieldReader; +#[doc = "Field `cr_irtx_tail_ph1_w` writer - "] +pub type CR_IRTX_TAIL_PH1_W_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, IRTX_PW_SPEC, u8, u8, 4, O>; +impl R { + #[doc = "Bits 0:3"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x0f) | (value as u32 & 0x0f); - self.w + pub fn cr_irtx_logic0_ph0_w(&self) -> CR_IRTX_LOGIC0_PH0_W_R { + CR_IRTX_LOGIC0_PH0_W_R::new((self.bits & 0x0f) as u8) } -} -impl R { - #[doc = "Bits 28:31"] + #[doc = "Bits 4:7"] #[inline(always)] - pub fn cr_irtx_tail_ph1_w(&self) -> CR_IRTX_TAIL_PH1_W_R { - CR_IRTX_TAIL_PH1_W_R::new(((self.bits >> 28) & 0x0f) as u8) + pub fn cr_irtx_logic0_ph1_w(&self) -> CR_IRTX_LOGIC0_PH1_W_R { + CR_IRTX_LOGIC0_PH1_W_R::new(((self.bits >> 4) & 0x0f) as u8) } - #[doc = "Bits 24:27"] + #[doc = "Bits 8:11"] #[inline(always)] - pub fn cr_irtx_tail_ph0_w(&self) -> CR_IRTX_TAIL_PH0_W_R { - CR_IRTX_TAIL_PH0_W_R::new(((self.bits >> 24) & 0x0f) as u8) + pub fn cr_irtx_logic1_ph0_w(&self) -> CR_IRTX_LOGIC1_PH0_W_R { + CR_IRTX_LOGIC1_PH0_W_R::new(((self.bits >> 8) & 0x0f) as u8) } - #[doc = "Bits 20:23"] + #[doc = "Bits 12:15"] #[inline(always)] - pub fn cr_irtx_head_ph1_w(&self) -> CR_IRTX_HEAD_PH1_W_R { - CR_IRTX_HEAD_PH1_W_R::new(((self.bits >> 20) & 0x0f) as u8) + pub fn cr_irtx_logic1_ph1_w(&self) -> CR_IRTX_LOGIC1_PH1_W_R { + CR_IRTX_LOGIC1_PH1_W_R::new(((self.bits >> 12) & 0x0f) as u8) } #[doc = "Bits 16:19"] #[inline(always)] pub fn cr_irtx_head_ph0_w(&self) -> CR_IRTX_HEAD_PH0_W_R { CR_IRTX_HEAD_PH0_W_R::new(((self.bits >> 16) & 0x0f) as u8) } - #[doc = "Bits 12:15"] - #[inline(always)] - pub fn cr_irtx_logic1_ph1_w(&self) -> CR_IRTX_LOGIC1_PH1_W_R { - CR_IRTX_LOGIC1_PH1_W_R::new(((self.bits >> 12) & 0x0f) as u8) - } - #[doc = "Bits 8:11"] + #[doc = "Bits 20:23"] #[inline(always)] - pub fn cr_irtx_logic1_ph0_w(&self) -> CR_IRTX_LOGIC1_PH0_W_R { - CR_IRTX_LOGIC1_PH0_W_R::new(((self.bits >> 8) & 0x0f) as u8) + pub fn cr_irtx_head_ph1_w(&self) -> CR_IRTX_HEAD_PH1_W_R { + CR_IRTX_HEAD_PH1_W_R::new(((self.bits >> 20) & 0x0f) as u8) } - #[doc = "Bits 4:7"] + #[doc = "Bits 24:27"] #[inline(always)] - pub fn cr_irtx_logic0_ph1_w(&self) -> CR_IRTX_LOGIC0_PH1_W_R { - CR_IRTX_LOGIC0_PH1_W_R::new(((self.bits >> 4) & 0x0f) as u8) + pub fn cr_irtx_tail_ph0_w(&self) -> CR_IRTX_TAIL_PH0_W_R { + CR_IRTX_TAIL_PH0_W_R::new(((self.bits >> 24) & 0x0f) as u8) } - #[doc = "Bits 0:3"] + #[doc = "Bits 28:31"] #[inline(always)] - pub fn cr_irtx_logic0_ph0_w(&self) -> CR_IRTX_LOGIC0_PH0_W_R { - CR_IRTX_LOGIC0_PH0_W_R::new((self.bits & 0x0f) as u8) + pub fn cr_irtx_tail_ph1_w(&self) -> CR_IRTX_TAIL_PH1_W_R { + CR_IRTX_TAIL_PH1_W_R::new(((self.bits >> 28) & 0x0f) as u8) } } impl W { - #[doc = "Bits 28:31"] + #[doc = "Bits 0:3"] #[inline(always)] - pub fn cr_irtx_tail_ph1_w(&mut self) -> CR_IRTX_TAIL_PH1_W_W { - CR_IRTX_TAIL_PH1_W_W { w: self } + #[must_use] + pub fn cr_irtx_logic0_ph0_w(&mut self) -> CR_IRTX_LOGIC0_PH0_W_W<0> { + CR_IRTX_LOGIC0_PH0_W_W::new(self) } - #[doc = "Bits 24:27"] + #[doc = "Bits 4:7"] #[inline(always)] - pub fn cr_irtx_tail_ph0_w(&mut self) -> CR_IRTX_TAIL_PH0_W_W { - CR_IRTX_TAIL_PH0_W_W { w: self } + #[must_use] + pub fn cr_irtx_logic0_ph1_w(&mut self) -> CR_IRTX_LOGIC0_PH1_W_W<4> { + CR_IRTX_LOGIC0_PH1_W_W::new(self) } - #[doc = "Bits 20:23"] + #[doc = "Bits 8:11"] #[inline(always)] - pub fn cr_irtx_head_ph1_w(&mut self) -> CR_IRTX_HEAD_PH1_W_W { - CR_IRTX_HEAD_PH1_W_W { w: self } + #[must_use] + pub fn cr_irtx_logic1_ph0_w(&mut self) -> CR_IRTX_LOGIC1_PH0_W_W<8> { + CR_IRTX_LOGIC1_PH0_W_W::new(self) } - #[doc = "Bits 16:19"] + #[doc = "Bits 12:15"] #[inline(always)] - pub fn cr_irtx_head_ph0_w(&mut self) -> CR_IRTX_HEAD_PH0_W_W { - CR_IRTX_HEAD_PH0_W_W { w: self } + #[must_use] + pub fn cr_irtx_logic1_ph1_w(&mut self) -> CR_IRTX_LOGIC1_PH1_W_W<12> { + CR_IRTX_LOGIC1_PH1_W_W::new(self) } - #[doc = "Bits 12:15"] + #[doc = "Bits 16:19"] #[inline(always)] - pub fn cr_irtx_logic1_ph1_w(&mut self) -> CR_IRTX_LOGIC1_PH1_W_W { - CR_IRTX_LOGIC1_PH1_W_W { w: self } + #[must_use] + pub fn cr_irtx_head_ph0_w(&mut self) -> CR_IRTX_HEAD_PH0_W_W<16> { + CR_IRTX_HEAD_PH0_W_W::new(self) } - #[doc = "Bits 8:11"] + #[doc = "Bits 20:23"] #[inline(always)] - pub fn cr_irtx_logic1_ph0_w(&mut self) -> CR_IRTX_LOGIC1_PH0_W_W { - CR_IRTX_LOGIC1_PH0_W_W { w: self } + #[must_use] + pub fn cr_irtx_head_ph1_w(&mut self) -> CR_IRTX_HEAD_PH1_W_W<20> { + CR_IRTX_HEAD_PH1_W_W::new(self) } - #[doc = "Bits 4:7"] + #[doc = "Bits 24:27"] #[inline(always)] - pub fn cr_irtx_logic0_ph1_w(&mut self) -> CR_IRTX_LOGIC0_PH1_W_W { - CR_IRTX_LOGIC0_PH1_W_W { w: self } + #[must_use] + pub fn cr_irtx_tail_ph0_w(&mut self) -> CR_IRTX_TAIL_PH0_W_W<24> { + CR_IRTX_TAIL_PH0_W_W::new(self) } - #[doc = "Bits 0:3"] + #[doc = "Bits 28:31"] #[inline(always)] - pub fn cr_irtx_logic0_ph0_w(&mut self) -> CR_IRTX_LOGIC0_PH0_W_W { - CR_IRTX_LOGIC0_PH0_W_W { w: self } + #[must_use] + pub fn cr_irtx_tail_ph1_w(&mut self) -> CR_IRTX_TAIL_PH1_W_W<28> { + CR_IRTX_TAIL_PH1_W_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -341,11 +184,10 @@ impl crate::Readable for IRTX_PW_SPEC { #[doc = "`write(|w| ..)` method takes [irtx_pw::W](W) writer structure"] impl crate::Writable for IRTX_PW_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets irtx_pw to value 0x007f_2000"] impl crate::Resettable for IRTX_PW_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x007f_2000 - } + const RESET_VALUE: Self::Ux = 0x007f_2000; } diff --git a/src/ir/irtx_swm_pw_0.rs b/src/ir/irtx_swm_pw_0.rs index eeb6672..c64cd90 100644 --- a/src/ir/irtx_swm_pw_0.rs +++ b/src/ir/irtx_swm_pw_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `cr_irtx_swm_pw_0` reader - "] -pub struct CR_IRTX_SWM_PW_0_R(crate::FieldReader); -impl CR_IRTX_SWM_PW_0_R { - pub(crate) fn new(bits: u32) -> Self { - CR_IRTX_SWM_PW_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRTX_SWM_PW_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_IRTX_SWM_PW_0_R = crate::FieldReader; #[doc = "Field `cr_irtx_swm_pw_0` writer - "] -pub struct CR_IRTX_SWM_PW_0_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRTX_SWM_PW_0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type CR_IRTX_SWM_PW_0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, IRTX_SWM_PW_0_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn cr_irtx_swm_pw_0(&self) -> CR_IRTX_SWM_PW_0_R { - CR_IRTX_SWM_PW_0_R::new((self.bits & 0xffff_ffff) as u32) + CR_IRTX_SWM_PW_0_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn cr_irtx_swm_pw_0(&mut self) -> CR_IRTX_SWM_PW_0_W { - CR_IRTX_SWM_PW_0_W { w: self } + #[must_use] + pub fn cr_irtx_swm_pw_0(&mut self) -> CR_IRTX_SWM_PW_0_W<0> { + CR_IRTX_SWM_PW_0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for IRTX_SWM_PW_0_SPEC { #[doc = "`write(|w| ..)` method takes [irtx_swm_pw_0::W](W) writer structure"] impl crate::Writable for IRTX_SWM_PW_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets irtx_swm_pw_0 to value 0"] impl crate::Resettable for IRTX_SWM_PW_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ir/irtx_swm_pw_1.rs b/src/ir/irtx_swm_pw_1.rs index aaecb4e..222ac74 100644 --- a/src/ir/irtx_swm_pw_1.rs +++ b/src/ir/irtx_swm_pw_1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `cr_irtx_swm_pw_1` reader - "] -pub struct CR_IRTX_SWM_PW_1_R(crate::FieldReader); -impl CR_IRTX_SWM_PW_1_R { - pub(crate) fn new(bits: u32) -> Self { - CR_IRTX_SWM_PW_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRTX_SWM_PW_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_IRTX_SWM_PW_1_R = crate::FieldReader; #[doc = "Field `cr_irtx_swm_pw_1` writer - "] -pub struct CR_IRTX_SWM_PW_1_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRTX_SWM_PW_1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type CR_IRTX_SWM_PW_1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, IRTX_SWM_PW_1_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn cr_irtx_swm_pw_1(&self) -> CR_IRTX_SWM_PW_1_R { - CR_IRTX_SWM_PW_1_R::new((self.bits & 0xffff_ffff) as u32) + CR_IRTX_SWM_PW_1_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn cr_irtx_swm_pw_1(&mut self) -> CR_IRTX_SWM_PW_1_W { - CR_IRTX_SWM_PW_1_W { w: self } + #[must_use] + pub fn cr_irtx_swm_pw_1(&mut self) -> CR_IRTX_SWM_PW_1_W<0> { + CR_IRTX_SWM_PW_1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for IRTX_SWM_PW_1_SPEC { #[doc = "`write(|w| ..)` method takes [irtx_swm_pw_1::W](W) writer structure"] impl crate::Writable for IRTX_SWM_PW_1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets irtx_swm_pw_1 to value 0"] impl crate::Resettable for IRTX_SWM_PW_1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ir/irtx_swm_pw_2.rs b/src/ir/irtx_swm_pw_2.rs index 4ad1f97..f1c36ef 100644 --- a/src/ir/irtx_swm_pw_2.rs +++ b/src/ir/irtx_swm_pw_2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `cr_irtx_swm_pw_2` reader - "] -pub struct CR_IRTX_SWM_PW_2_R(crate::FieldReader); -impl CR_IRTX_SWM_PW_2_R { - pub(crate) fn new(bits: u32) -> Self { - CR_IRTX_SWM_PW_2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRTX_SWM_PW_2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_IRTX_SWM_PW_2_R = crate::FieldReader; #[doc = "Field `cr_irtx_swm_pw_2` writer - "] -pub struct CR_IRTX_SWM_PW_2_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRTX_SWM_PW_2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type CR_IRTX_SWM_PW_2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, IRTX_SWM_PW_2_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn cr_irtx_swm_pw_2(&self) -> CR_IRTX_SWM_PW_2_R { - CR_IRTX_SWM_PW_2_R::new((self.bits & 0xffff_ffff) as u32) + CR_IRTX_SWM_PW_2_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn cr_irtx_swm_pw_2(&mut self) -> CR_IRTX_SWM_PW_2_W { - CR_IRTX_SWM_PW_2_W { w: self } + #[must_use] + pub fn cr_irtx_swm_pw_2(&mut self) -> CR_IRTX_SWM_PW_2_W<0> { + CR_IRTX_SWM_PW_2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for IRTX_SWM_PW_2_SPEC { #[doc = "`write(|w| ..)` method takes [irtx_swm_pw_2::W](W) writer structure"] impl crate::Writable for IRTX_SWM_PW_2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets irtx_swm_pw_2 to value 0"] impl crate::Resettable for IRTX_SWM_PW_2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ir/irtx_swm_pw_3.rs b/src/ir/irtx_swm_pw_3.rs index 09d2046..bdf861c 100644 --- a/src/ir/irtx_swm_pw_3.rs +++ b/src/ir/irtx_swm_pw_3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `cr_irtx_swm_pw_3` reader - "] -pub struct CR_IRTX_SWM_PW_3_R(crate::FieldReader); -impl CR_IRTX_SWM_PW_3_R { - pub(crate) fn new(bits: u32) -> Self { - CR_IRTX_SWM_PW_3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRTX_SWM_PW_3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_IRTX_SWM_PW_3_R = crate::FieldReader; #[doc = "Field `cr_irtx_swm_pw_3` writer - "] -pub struct CR_IRTX_SWM_PW_3_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRTX_SWM_PW_3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type CR_IRTX_SWM_PW_3_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, IRTX_SWM_PW_3_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn cr_irtx_swm_pw_3(&self) -> CR_IRTX_SWM_PW_3_R { - CR_IRTX_SWM_PW_3_R::new((self.bits & 0xffff_ffff) as u32) + CR_IRTX_SWM_PW_3_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn cr_irtx_swm_pw_3(&mut self) -> CR_IRTX_SWM_PW_3_W { - CR_IRTX_SWM_PW_3_W { w: self } + #[must_use] + pub fn cr_irtx_swm_pw_3(&mut self) -> CR_IRTX_SWM_PW_3_W<0> { + CR_IRTX_SWM_PW_3_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for IRTX_SWM_PW_3_SPEC { #[doc = "`write(|w| ..)` method takes [irtx_swm_pw_3::W](W) writer structure"] impl crate::Writable for IRTX_SWM_PW_3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets irtx_swm_pw_3 to value 0"] impl crate::Resettable for IRTX_SWM_PW_3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ir/irtx_swm_pw_4.rs b/src/ir/irtx_swm_pw_4.rs index bd50638..decfb27 100644 --- a/src/ir/irtx_swm_pw_4.rs +++ b/src/ir/irtx_swm_pw_4.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `cr_irtx_swm_pw_4` reader - "] -pub struct CR_IRTX_SWM_PW_4_R(crate::FieldReader); -impl CR_IRTX_SWM_PW_4_R { - pub(crate) fn new(bits: u32) -> Self { - CR_IRTX_SWM_PW_4_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRTX_SWM_PW_4_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_IRTX_SWM_PW_4_R = crate::FieldReader; #[doc = "Field `cr_irtx_swm_pw_4` writer - "] -pub struct CR_IRTX_SWM_PW_4_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRTX_SWM_PW_4_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type CR_IRTX_SWM_PW_4_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, IRTX_SWM_PW_4_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn cr_irtx_swm_pw_4(&self) -> CR_IRTX_SWM_PW_4_R { - CR_IRTX_SWM_PW_4_R::new((self.bits & 0xffff_ffff) as u32) + CR_IRTX_SWM_PW_4_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn cr_irtx_swm_pw_4(&mut self) -> CR_IRTX_SWM_PW_4_W { - CR_IRTX_SWM_PW_4_W { w: self } + #[must_use] + pub fn cr_irtx_swm_pw_4(&mut self) -> CR_IRTX_SWM_PW_4_W<0> { + CR_IRTX_SWM_PW_4_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for IRTX_SWM_PW_4_SPEC { #[doc = "`write(|w| ..)` method takes [irtx_swm_pw_4::W](W) writer structure"] impl crate::Writable for IRTX_SWM_PW_4_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets irtx_swm_pw_4 to value 0"] impl crate::Resettable for IRTX_SWM_PW_4_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ir/irtx_swm_pw_5.rs b/src/ir/irtx_swm_pw_5.rs index 553ff4d..e12890c 100644 --- a/src/ir/irtx_swm_pw_5.rs +++ b/src/ir/irtx_swm_pw_5.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `cr_irtx_swm_pw_5` reader - "] -pub struct CR_IRTX_SWM_PW_5_R(crate::FieldReader); -impl CR_IRTX_SWM_PW_5_R { - pub(crate) fn new(bits: u32) -> Self { - CR_IRTX_SWM_PW_5_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRTX_SWM_PW_5_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_IRTX_SWM_PW_5_R = crate::FieldReader; #[doc = "Field `cr_irtx_swm_pw_5` writer - "] -pub struct CR_IRTX_SWM_PW_5_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRTX_SWM_PW_5_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type CR_IRTX_SWM_PW_5_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, IRTX_SWM_PW_5_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn cr_irtx_swm_pw_5(&self) -> CR_IRTX_SWM_PW_5_R { - CR_IRTX_SWM_PW_5_R::new((self.bits & 0xffff_ffff) as u32) + CR_IRTX_SWM_PW_5_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn cr_irtx_swm_pw_5(&mut self) -> CR_IRTX_SWM_PW_5_W { - CR_IRTX_SWM_PW_5_W { w: self } + #[must_use] + pub fn cr_irtx_swm_pw_5(&mut self) -> CR_IRTX_SWM_PW_5_W<0> { + CR_IRTX_SWM_PW_5_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for IRTX_SWM_PW_5_SPEC { #[doc = "`write(|w| ..)` method takes [irtx_swm_pw_5::W](W) writer structure"] impl crate::Writable for IRTX_SWM_PW_5_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets irtx_swm_pw_5 to value 0"] impl crate::Resettable for IRTX_SWM_PW_5_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ir/irtx_swm_pw_6.rs b/src/ir/irtx_swm_pw_6.rs index cfbdcaa..31324ea 100644 --- a/src/ir/irtx_swm_pw_6.rs +++ b/src/ir/irtx_swm_pw_6.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `cr_irtx_swm_pw_6` reader - "] -pub struct CR_IRTX_SWM_PW_6_R(crate::FieldReader); -impl CR_IRTX_SWM_PW_6_R { - pub(crate) fn new(bits: u32) -> Self { - CR_IRTX_SWM_PW_6_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRTX_SWM_PW_6_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_IRTX_SWM_PW_6_R = crate::FieldReader; #[doc = "Field `cr_irtx_swm_pw_6` writer - "] -pub struct CR_IRTX_SWM_PW_6_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRTX_SWM_PW_6_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type CR_IRTX_SWM_PW_6_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, IRTX_SWM_PW_6_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn cr_irtx_swm_pw_6(&self) -> CR_IRTX_SWM_PW_6_R { - CR_IRTX_SWM_PW_6_R::new((self.bits & 0xffff_ffff) as u32) + CR_IRTX_SWM_PW_6_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn cr_irtx_swm_pw_6(&mut self) -> CR_IRTX_SWM_PW_6_W { - CR_IRTX_SWM_PW_6_W { w: self } + #[must_use] + pub fn cr_irtx_swm_pw_6(&mut self) -> CR_IRTX_SWM_PW_6_W<0> { + CR_IRTX_SWM_PW_6_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for IRTX_SWM_PW_6_SPEC { #[doc = "`write(|w| ..)` method takes [irtx_swm_pw_6::W](W) writer structure"] impl crate::Writable for IRTX_SWM_PW_6_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets irtx_swm_pw_6 to value 0"] impl crate::Resettable for IRTX_SWM_PW_6_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/ir/irtx_swm_pw_7.rs b/src/ir/irtx_swm_pw_7.rs index 1f3938b..bd3bf17 100644 --- a/src/ir/irtx_swm_pw_7.rs +++ b/src/ir/irtx_swm_pw_7.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `cr_irtx_swm_pw_7` reader - "] -pub struct CR_IRTX_SWM_PW_7_R(crate::FieldReader); -impl CR_IRTX_SWM_PW_7_R { - pub(crate) fn new(bits: u32) -> Self { - CR_IRTX_SWM_PW_7_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_IRTX_SWM_PW_7_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_IRTX_SWM_PW_7_R = crate::FieldReader; #[doc = "Field `cr_irtx_swm_pw_7` writer - "] -pub struct CR_IRTX_SWM_PW_7_W<'a> { - w: &'a mut W, -} -impl<'a> CR_IRTX_SWM_PW_7_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type CR_IRTX_SWM_PW_7_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, IRTX_SWM_PW_7_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn cr_irtx_swm_pw_7(&self) -> CR_IRTX_SWM_PW_7_R { - CR_IRTX_SWM_PW_7_R::new((self.bits & 0xffff_ffff) as u32) + CR_IRTX_SWM_PW_7_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn cr_irtx_swm_pw_7(&mut self) -> CR_IRTX_SWM_PW_7_W { - CR_IRTX_SWM_PW_7_W { w: self } + #[must_use] + pub fn cr_irtx_swm_pw_7(&mut self) -> CR_IRTX_SWM_PW_7_W<0> { + CR_IRTX_SWM_PW_7_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for IRTX_SWM_PW_7_SPEC { #[doc = "`write(|w| ..)` method takes [irtx_swm_pw_7::W](W) writer structure"] impl crate::Writable for IRTX_SWM_PW_7_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets irtx_swm_pw_7 to value 0"] impl crate::Resettable for IRTX_SWM_PW_7_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/l1c.rs b/src/l1c.rs index d5f3aa2..ea54096 100644 --- a/src/l1c.rs +++ b/src/l1c.rs @@ -2,64 +2,64 @@ #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - l1c_config."] - pub l1c_config: crate::Reg, + pub l1c_config: L1C_CONFIG, #[doc = "0x04 - hit_cnt_lsb."] - pub hit_cnt_lsb: crate::Reg, + pub hit_cnt_lsb: HIT_CNT_LSB, #[doc = "0x08 - hit_cnt_msb."] - pub hit_cnt_msb: crate::Reg, + pub hit_cnt_msb: HIT_CNT_MSB, #[doc = "0x0c - miss_cnt."] - pub miss_cnt: crate::Reg, + pub miss_cnt: MISS_CNT, #[doc = "0x10 - l1c_range."] - pub l1c_range: crate::Reg, - _reserved5: [u8; 492usize], + pub l1c_range: L1C_RANGE, + _reserved5: [u8; 0x01ec], #[doc = "0x200 - l1c_bmx_err_addr_en."] - pub l1c_bmx_err_addr_en: crate::Reg, + pub l1c_bmx_err_addr_en: L1C_BMX_ERR_ADDR_EN, #[doc = "0x204 - l1c_bmx_err_addr."] - pub l1c_bmx_err_addr: crate::Reg, + pub l1c_bmx_err_addr: L1C_BMX_ERR_ADDR, #[doc = "0x208 - irom1_misr_dataout_0."] - pub irom1_misr_dataout_0: crate::Reg, + pub irom1_misr_dataout_0: IROM1_MISR_DATAOUT_0, #[doc = "0x20c - irom1_misr_dataout_1."] - pub irom1_misr_dataout_1: crate::Reg, + pub irom1_misr_dataout_1: IROM1_MISR_DATAOUT_1, #[doc = "0x210 - cpu_clk_gate."] - pub cpu_clk_gate: crate::Reg, + pub cpu_clk_gate: CPU_CLK_GATE, } -#[doc = "l1c_config register accessor: an alias for `Reg`"] +#[doc = "l1c_config (rw) register accessor: an alias for `Reg`"] pub type L1C_CONFIG = crate::Reg; #[doc = "l1c_config."] pub mod l1c_config; -#[doc = "hit_cnt_lsb register accessor: an alias for `Reg`"] +#[doc = "hit_cnt_lsb (r) register accessor: an alias for `Reg`"] pub type HIT_CNT_LSB = crate::Reg; #[doc = "hit_cnt_lsb."] pub mod hit_cnt_lsb; -#[doc = "hit_cnt_msb register accessor: an alias for `Reg`"] +#[doc = "hit_cnt_msb (r) register accessor: an alias for `Reg`"] pub type HIT_CNT_MSB = crate::Reg; #[doc = "hit_cnt_msb."] pub mod hit_cnt_msb; -#[doc = "miss_cnt register accessor: an alias for `Reg`"] +#[doc = "miss_cnt (r) register accessor: an alias for `Reg`"] pub type MISS_CNT = crate::Reg; #[doc = "miss_cnt."] pub mod miss_cnt; -#[doc = "l1c_range register accessor: an alias for `Reg`"] +#[doc = "l1c_range (rw) register accessor: an alias for `Reg`"] pub type L1C_RANGE = crate::Reg; #[doc = "l1c_range."] pub mod l1c_range; -#[doc = "l1c_bmx_err_addr_en register accessor: an alias for `Reg`"] +#[doc = "l1c_bmx_err_addr_en (rw) register accessor: an alias for `Reg`"] pub type L1C_BMX_ERR_ADDR_EN = crate::Reg; #[doc = "l1c_bmx_err_addr_en."] pub mod l1c_bmx_err_addr_en; -#[doc = "l1c_bmx_err_addr register accessor: an alias for `Reg`"] +#[doc = "l1c_bmx_err_addr (r) register accessor: an alias for `Reg`"] pub type L1C_BMX_ERR_ADDR = crate::Reg; #[doc = "l1c_bmx_err_addr."] pub mod l1c_bmx_err_addr; -#[doc = "irom1_misr_dataout_0 register accessor: an alias for `Reg`"] +#[doc = "irom1_misr_dataout_0 (r) register accessor: an alias for `Reg`"] pub type IROM1_MISR_DATAOUT_0 = crate::Reg; #[doc = "irom1_misr_dataout_0."] pub mod irom1_misr_dataout_0; -#[doc = "irom1_misr_dataout_1 register accessor: an alias for `Reg`"] +#[doc = "irom1_misr_dataout_1 (rw) register accessor: an alias for `Reg`"] pub type IROM1_MISR_DATAOUT_1 = crate::Reg; #[doc = "irom1_misr_dataout_1."] pub mod irom1_misr_dataout_1; -#[doc = "cpu_clk_gate register accessor: an alias for `Reg`"] +#[doc = "cpu_clk_gate (rw) register accessor: an alias for `Reg`"] pub type CPU_CLK_GATE = crate::Reg; #[doc = "cpu_clk_gate."] pub mod cpu_clk_gate; diff --git a/src/l1c/cpu_clk_gate.rs b/src/l1c/cpu_clk_gate.rs index 091610a..964913f 100644 --- a/src/l1c/cpu_clk_gate.rs +++ b/src/l1c/cpu_clk_gate.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,153 +28,65 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `force_e21_clock_on_2` reader - "] -pub struct FORCE_E21_CLOCK_ON_2_R(crate::FieldReader); -impl FORCE_E21_CLOCK_ON_2_R { - pub(crate) fn new(bits: bool) -> Self { - FORCE_E21_CLOCK_ON_2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for FORCE_E21_CLOCK_ON_2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `force_e21_clock_on_2` writer - "] -pub struct FORCE_E21_CLOCK_ON_2_W<'a> { - w: &'a mut W, -} -impl<'a> FORCE_E21_CLOCK_ON_2_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `force_e21_clock_on_1` reader - "] -pub struct FORCE_E21_CLOCK_ON_1_R(crate::FieldReader); -impl FORCE_E21_CLOCK_ON_1_R { - pub(crate) fn new(bits: bool) -> Self { - FORCE_E21_CLOCK_ON_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for FORCE_E21_CLOCK_ON_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `force_e21_clock_on_1` writer - "] -pub struct FORCE_E21_CLOCK_ON_1_W<'a> { - w: &'a mut W, -} -impl<'a> FORCE_E21_CLOCK_ON_1_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `force_e21_clock_on_0` reader - "] -pub struct FORCE_E21_CLOCK_ON_0_R(crate::FieldReader); -impl FORCE_E21_CLOCK_ON_0_R { - pub(crate) fn new(bits: bool) -> Self { - FORCE_E21_CLOCK_ON_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for FORCE_E21_CLOCK_ON_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type FORCE_E21_CLOCK_ON_0_R = crate::BitReader; #[doc = "Field `force_e21_clock_on_0` writer - "] -pub struct FORCE_E21_CLOCK_ON_0_W<'a> { - w: &'a mut W, -} -impl<'a> FORCE_E21_CLOCK_ON_0_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type FORCE_E21_CLOCK_ON_0_W<'a, const O: u8> = + crate::BitWriter<'a, u32, CPU_CLK_GATE_SPEC, bool, O>; +#[doc = "Field `force_e21_clock_on_1` reader - "] +pub type FORCE_E21_CLOCK_ON_1_R = crate::BitReader; +#[doc = "Field `force_e21_clock_on_1` writer - "] +pub type FORCE_E21_CLOCK_ON_1_W<'a, const O: u8> = + crate::BitWriter<'a, u32, CPU_CLK_GATE_SPEC, bool, O>; +#[doc = "Field `force_e21_clock_on_2` reader - "] +pub type FORCE_E21_CLOCK_ON_2_R = crate::BitReader; +#[doc = "Field `force_e21_clock_on_2` writer - "] +pub type FORCE_E21_CLOCK_ON_2_W<'a, const O: u8> = + crate::BitWriter<'a, u32, CPU_CLK_GATE_SPEC, bool, O>; impl R { - #[doc = "Bit 2"] + #[doc = "Bit 0"] #[inline(always)] - pub fn force_e21_clock_on_2(&self) -> FORCE_E21_CLOCK_ON_2_R { - FORCE_E21_CLOCK_ON_2_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn force_e21_clock_on_0(&self) -> FORCE_E21_CLOCK_ON_0_R { + FORCE_E21_CLOCK_ON_0_R::new((self.bits & 1) != 0) } #[doc = "Bit 1"] #[inline(always)] pub fn force_e21_clock_on_1(&self) -> FORCE_E21_CLOCK_ON_1_R { - FORCE_E21_CLOCK_ON_1_R::new(((self.bits >> 1) & 0x01) != 0) + FORCE_E21_CLOCK_ON_1_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 2"] #[inline(always)] - pub fn force_e21_clock_on_0(&self) -> FORCE_E21_CLOCK_ON_0_R { - FORCE_E21_CLOCK_ON_0_R::new((self.bits & 0x01) != 0) + pub fn force_e21_clock_on_2(&self) -> FORCE_E21_CLOCK_ON_2_R { + FORCE_E21_CLOCK_ON_2_R::new(((self.bits >> 2) & 1) != 0) } } impl W { - #[doc = "Bit 2"] + #[doc = "Bit 0"] #[inline(always)] - pub fn force_e21_clock_on_2(&mut self) -> FORCE_E21_CLOCK_ON_2_W { - FORCE_E21_CLOCK_ON_2_W { w: self } + #[must_use] + pub fn force_e21_clock_on_0(&mut self) -> FORCE_E21_CLOCK_ON_0_W<0> { + FORCE_E21_CLOCK_ON_0_W::new(self) } #[doc = "Bit 1"] #[inline(always)] - pub fn force_e21_clock_on_1(&mut self) -> FORCE_E21_CLOCK_ON_1_W { - FORCE_E21_CLOCK_ON_1_W { w: self } + #[must_use] + pub fn force_e21_clock_on_1(&mut self) -> FORCE_E21_CLOCK_ON_1_W<1> { + FORCE_E21_CLOCK_ON_1_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 2"] #[inline(always)] - pub fn force_e21_clock_on_0(&mut self) -> FORCE_E21_CLOCK_ON_0_W { - FORCE_E21_CLOCK_ON_0_W { w: self } + #[must_use] + pub fn force_e21_clock_on_2(&mut self) -> FORCE_E21_CLOCK_ON_2_W<2> { + FORCE_E21_CLOCK_ON_2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -191,11 +104,10 @@ impl crate::Readable for CPU_CLK_GATE_SPEC { #[doc = "`write(|w| ..)` method takes [cpu_clk_gate::W](W) writer structure"] impl crate::Writable for CPU_CLK_GATE_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets cpu_clk_gate to value 0"] impl crate::Resettable for CPU_CLK_GATE_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/l1c/hit_cnt_lsb.rs b/src/l1c/hit_cnt_lsb.rs index 0f542ac..7f1616c 100644 --- a/src/l1c/hit_cnt_lsb.rs +++ b/src/l1c/hit_cnt_lsb.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `hit_cnt_lsb` reader - "] -pub struct HIT_CNT_LSB_R(crate::FieldReader); -impl HIT_CNT_LSB_R { - pub(crate) fn new(bits: u32) -> Self { - HIT_CNT_LSB_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for HIT_CNT_LSB_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type HIT_CNT_LSB_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn hit_cnt_lsb(&self) -> HIT_CNT_LSB_R { - HIT_CNT_LSB_R::new((self.bits & 0xffff_ffff) as u32) + HIT_CNT_LSB_R::new(self.bits) } } #[doc = "hit_cnt_lsb.\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 [hit_cnt_lsb](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for HIT_CNT_LSB_SPEC { } #[doc = "`reset()` method sets hit_cnt_lsb to value 0"] impl crate::Resettable for HIT_CNT_LSB_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/l1c/hit_cnt_msb.rs b/src/l1c/hit_cnt_msb.rs index 32873e3..1ee5c8a 100644 --- a/src/l1c/hit_cnt_msb.rs +++ b/src/l1c/hit_cnt_msb.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `hit_cnt_msb` reader - "] -pub struct HIT_CNT_MSB_R(crate::FieldReader); -impl HIT_CNT_MSB_R { - pub(crate) fn new(bits: u32) -> Self { - HIT_CNT_MSB_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for HIT_CNT_MSB_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type HIT_CNT_MSB_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn hit_cnt_msb(&self) -> HIT_CNT_MSB_R { - HIT_CNT_MSB_R::new((self.bits & 0xffff_ffff) as u32) + HIT_CNT_MSB_R::new(self.bits) } } #[doc = "hit_cnt_msb.\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 [hit_cnt_msb](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for HIT_CNT_MSB_SPEC { } #[doc = "`reset()` method sets hit_cnt_msb to value 0"] impl crate::Resettable for HIT_CNT_MSB_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/l1c/irom1_misr_dataout_0.rs b/src/l1c/irom1_misr_dataout_0.rs index 9ce8597..a728280 100644 --- a/src/l1c/irom1_misr_dataout_0.rs +++ b/src/l1c/irom1_misr_dataout_0.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `irom1_misr_dataout_0` reader - "] -pub struct IROM1_MISR_DATAOUT_0_R(crate::FieldReader); -impl IROM1_MISR_DATAOUT_0_R { - pub(crate) fn new(bits: u32) -> Self { - IROM1_MISR_DATAOUT_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for IROM1_MISR_DATAOUT_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type IROM1_MISR_DATAOUT_0_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn irom1_misr_dataout_0(&self) -> IROM1_MISR_DATAOUT_0_R { - IROM1_MISR_DATAOUT_0_R::new((self.bits & 0xffff_ffff) as u32) + IROM1_MISR_DATAOUT_0_R::new(self.bits) } } #[doc = "irom1_misr_dataout_0.\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 [irom1_misr_dataout_0](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for IROM1_MISR_DATAOUT_0_SPEC { } #[doc = "`reset()` method sets irom1_misr_dataout_0 to value 0"] impl crate::Resettable for IROM1_MISR_DATAOUT_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/l1c/irom1_misr_dataout_1.rs b/src/l1c/irom1_misr_dataout_1.rs index 2fb6b28..4d83242 100644 --- a/src/l1c/irom1_misr_dataout_1.rs +++ b/src/l1c/irom1_misr_dataout_1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,13 +28,15 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } impl W { #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -51,11 +54,10 @@ impl crate::Readable for IROM1_MISR_DATAOUT_1_SPEC { #[doc = "`write(|w| ..)` method takes [irom1_misr_dataout_1::W](W) writer structure"] impl crate::Writable for IROM1_MISR_DATAOUT_1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets irom1_misr_dataout_1 to value 0"] impl crate::Resettable for IROM1_MISR_DATAOUT_1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/l1c/l1c_bmx_err_addr.rs b/src/l1c/l1c_bmx_err_addr.rs index 94c3b7c..cbc7b6d 100644 --- a/src/l1c/l1c_bmx_err_addr.rs +++ b/src/l1c/l1c_bmx_err_addr.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `l1c_bmx_err_addr` reader - "] -pub struct L1C_BMX_ERR_ADDR_R(crate::FieldReader); -impl L1C_BMX_ERR_ADDR_R { - pub(crate) fn new(bits: u32) -> Self { - L1C_BMX_ERR_ADDR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for L1C_BMX_ERR_ADDR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type L1C_BMX_ERR_ADDR_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn l1c_bmx_err_addr(&self) -> L1C_BMX_ERR_ADDR_R { - L1C_BMX_ERR_ADDR_R::new((self.bits & 0xffff_ffff) as u32) + L1C_BMX_ERR_ADDR_R::new(self.bits) } } #[doc = "l1c_bmx_err_addr.\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 [l1c_bmx_err_addr](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for L1C_BMX_ERR_ADDR_SPEC { } #[doc = "`reset()` method sets l1c_bmx_err_addr to value 0"] impl crate::Resettable for L1C_BMX_ERR_ADDR_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/l1c/l1c_bmx_err_addr_en.rs b/src/l1c/l1c_bmx_err_addr_en.rs index 84b89f5..0b6dbfb 100644 --- a/src/l1c/l1c_bmx_err_addr_en.rs +++ b/src/l1c/l1c_bmx_err_addr_en.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,135 +28,63 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `l1c_hsel_option` reader - "] -pub struct L1C_HSEL_OPTION_R(crate::FieldReader); -impl L1C_HSEL_OPTION_R { - pub(crate) fn new(bits: u8) -> Self { - L1C_HSEL_OPTION_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for L1C_HSEL_OPTION_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `l1c_hsel_option` writer - "] -pub struct L1C_HSEL_OPTION_W<'a> { - w: &'a mut W, -} -impl<'a> L1C_HSEL_OPTION_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 16)) | ((value as u32 & 0x0f) << 16); - self.w - } -} -#[doc = "Field `l1c_bmx_err_tz` reader - "] -pub struct L1C_BMX_ERR_TZ_R(crate::FieldReader); -impl L1C_BMX_ERR_TZ_R { - pub(crate) fn new(bits: bool) -> Self { - L1C_BMX_ERR_TZ_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for L1C_BMX_ERR_TZ_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `l1c_bmx_err_dec` reader - "] -pub struct L1C_BMX_ERR_DEC_R(crate::FieldReader); -impl L1C_BMX_ERR_DEC_R { - pub(crate) fn new(bits: bool) -> Self { - L1C_BMX_ERR_DEC_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for L1C_BMX_ERR_DEC_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} #[doc = "Field `l1c_bmx_err_addr_dis` reader - "] -pub struct L1C_BMX_ERR_ADDR_DIS_R(crate::FieldReader); -impl L1C_BMX_ERR_ADDR_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - L1C_BMX_ERR_ADDR_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for L1C_BMX_ERR_ADDR_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type L1C_BMX_ERR_ADDR_DIS_R = crate::BitReader; #[doc = "Field `l1c_bmx_err_addr_dis` writer - "] -pub struct L1C_BMX_ERR_ADDR_DIS_W<'a> { - w: &'a mut W, -} -impl<'a> L1C_BMX_ERR_ADDR_DIS_W<'a> { - #[doc = r"Sets the field bit"] +pub type L1C_BMX_ERR_ADDR_DIS_W<'a, const O: u8> = + crate::BitWriter<'a, u32, L1C_BMX_ERR_ADDR_EN_SPEC, bool, O>; +#[doc = "Field `l1c_bmx_err_dec` reader - "] +pub type L1C_BMX_ERR_DEC_R = crate::BitReader; +#[doc = "Field `l1c_bmx_err_tz` reader - "] +pub type L1C_BMX_ERR_TZ_R = crate::BitReader; +#[doc = "Field `l1c_hsel_option` reader - "] +pub type L1C_HSEL_OPTION_R = crate::FieldReader; +#[doc = "Field `l1c_hsel_option` writer - "] +pub type L1C_HSEL_OPTION_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, L1C_BMX_ERR_ADDR_EN_SPEC, u8, u8, 4, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn l1c_bmx_err_addr_dis(&self) -> L1C_BMX_ERR_ADDR_DIS_R { + L1C_BMX_ERR_ADDR_DIS_R::new((self.bits & 1) != 0) } - #[doc = r"Clears the field bit"] + #[doc = "Bit 4"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn l1c_bmx_err_dec(&self) -> L1C_BMX_ERR_DEC_R { + L1C_BMX_ERR_DEC_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = r"Writes raw bits to the field"] + #[doc = "Bit 5"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn l1c_bmx_err_tz(&self) -> L1C_BMX_ERR_TZ_R { + L1C_BMX_ERR_TZ_R::new(((self.bits >> 5) & 1) != 0) } -} -impl R { #[doc = "Bits 16:19"] #[inline(always)] pub fn l1c_hsel_option(&self) -> L1C_HSEL_OPTION_R { L1C_HSEL_OPTION_R::new(((self.bits >> 16) & 0x0f) as u8) } - #[doc = "Bit 5"] - #[inline(always)] - pub fn l1c_bmx_err_tz(&self) -> L1C_BMX_ERR_TZ_R { - L1C_BMX_ERR_TZ_R::new(((self.bits >> 5) & 0x01) != 0) - } - #[doc = "Bit 4"] - #[inline(always)] - pub fn l1c_bmx_err_dec(&self) -> L1C_BMX_ERR_DEC_R { - L1C_BMX_ERR_DEC_R::new(((self.bits >> 4) & 0x01) != 0) - } - #[doc = "Bit 0"] - #[inline(always)] - pub fn l1c_bmx_err_addr_dis(&self) -> L1C_BMX_ERR_ADDR_DIS_R { - L1C_BMX_ERR_ADDR_DIS_R::new((self.bits & 0x01) != 0) - } } impl W { - #[doc = "Bits 16:19"] + #[doc = "Bit 0"] #[inline(always)] - pub fn l1c_hsel_option(&mut self) -> L1C_HSEL_OPTION_W { - L1C_HSEL_OPTION_W { w: self } + #[must_use] + pub fn l1c_bmx_err_addr_dis(&mut self) -> L1C_BMX_ERR_ADDR_DIS_W<0> { + L1C_BMX_ERR_ADDR_DIS_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bits 16:19"] #[inline(always)] - pub fn l1c_bmx_err_addr_dis(&mut self) -> L1C_BMX_ERR_ADDR_DIS_W { - L1C_BMX_ERR_ADDR_DIS_W { w: self } + #[must_use] + pub fn l1c_hsel_option(&mut self) -> L1C_HSEL_OPTION_W<16> { + L1C_HSEL_OPTION_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -173,11 +102,10 @@ impl crate::Readable for L1C_BMX_ERR_ADDR_EN_SPEC { #[doc = "`write(|w| ..)` method takes [l1c_bmx_err_addr_en::W](W) writer structure"] impl crate::Writable for L1C_BMX_ERR_ADDR_EN_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets l1c_bmx_err_addr_en to value 0"] impl crate::Resettable for L1C_BMX_ERR_ADDR_EN_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/l1c/l1c_config.rs b/src/l1c/l1c_config.rs index add0471..3277940 100644 --- a/src/l1c/l1c_config.rs +++ b/src/l1c/l1c_config.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,556 +28,208 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `wrap_dis` reader - "] -pub struct WRAP_DIS_R(crate::FieldReader); -impl WRAP_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - WRAP_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for WRAP_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `wrap_dis` writer - "] -pub struct WRAP_DIS_W<'a> { - w: &'a mut W, -} -impl<'a> WRAP_DIS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 26)) | ((value as u32 & 0x01) << 26); - self.w - } -} -#[doc = "Field `early_resp_dis` reader - "] -pub struct EARLY_RESP_DIS_R(crate::FieldReader); -impl EARLY_RESP_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - EARLY_RESP_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for EARLY_RESP_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `early_resp_dis` writer - "] -pub struct EARLY_RESP_DIS_W<'a> { - w: &'a mut W, -} -impl<'a> EARLY_RESP_DIS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 25)) | ((value as u32 & 0x01) << 25); - self.w - } -} -#[doc = "Field `l1c_bmx_busy_option_dis` reader - "] -pub struct L1C_BMX_BUSY_OPTION_DIS_R(crate::FieldReader); -impl L1C_BMX_BUSY_OPTION_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - L1C_BMX_BUSY_OPTION_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for L1C_BMX_BUSY_OPTION_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `l1c_bmx_busy_option_dis` writer - "] -pub struct L1C_BMX_BUSY_OPTION_DIS_W<'a> { - w: &'a mut W, -} -impl<'a> L1C_BMX_BUSY_OPTION_DIS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24); - self.w - } -} -#[doc = "Field `l1c_bmx_timeout_en` reader - "] -pub struct L1C_BMX_TIMEOUT_EN_R(crate::FieldReader); -impl L1C_BMX_TIMEOUT_EN_R { - pub(crate) fn new(bits: u8) -> Self { - L1C_BMX_TIMEOUT_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for L1C_BMX_TIMEOUT_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `l1c_bmx_timeout_en` writer - "] -pub struct L1C_BMX_TIMEOUT_EN_W<'a> { - w: &'a mut W, -} -impl<'a> L1C_BMX_TIMEOUT_EN_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 20)) | ((value as u32 & 0x0f) << 20); - self.w - } -} -#[doc = "Field `l1c_bmx_arb_mode` reader - "] -pub struct L1C_BMX_ARB_MODE_R(crate::FieldReader); -impl L1C_BMX_ARB_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - L1C_BMX_ARB_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for L1C_BMX_ARB_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `l1c_bmx_arb_mode` writer - "] -pub struct L1C_BMX_ARB_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> L1C_BMX_ARB_MODE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 16)) | ((value as u32 & 0x03) << 16); - self.w - } -} -#[doc = "Field `l1c_bmx_err_en` reader - "] -pub struct L1C_BMX_ERR_EN_R(crate::FieldReader); -impl L1C_BMX_ERR_EN_R { - pub(crate) fn new(bits: bool) -> Self { - L1C_BMX_ERR_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for L1C_BMX_ERR_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `l1c_bmx_err_en` writer - "] -pub struct L1C_BMX_ERR_EN_W<'a> { - w: &'a mut W, -} -impl<'a> L1C_BMX_ERR_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15); - self.w - } -} -#[doc = "Field `l1c_bypass` reader - "] -pub struct L1C_BYPASS_R(crate::FieldReader); -impl L1C_BYPASS_R { - pub(crate) fn new(bits: bool) -> Self { - L1C_BYPASS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for L1C_BYPASS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `l1c_bypass` writer - "] -pub struct L1C_BYPASS_W<'a> { - w: &'a mut W, -} -impl<'a> L1C_BYPASS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14); - self.w - } -} -#[doc = "Field `irom_2t_access` reader - "] -pub struct IROM_2T_ACCESS_R(crate::FieldReader); -impl IROM_2T_ACCESS_R { - pub(crate) fn new(bits: bool) -> Self { - IROM_2T_ACCESS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for IROM_2T_ACCESS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `irom_2t_access` writer - "] -pub struct IROM_2T_ACCESS_W<'a> { - w: &'a mut W, -} -impl<'a> IROM_2T_ACCESS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} -#[doc = "Field `l1c_way_dis` reader - "] -pub struct L1C_WAY_DIS_R(crate::FieldReader); -impl L1C_WAY_DIS_R { - pub(crate) fn new(bits: u8) -> Self { - L1C_WAY_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for L1C_WAY_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `l1c_way_dis` writer - "] -pub struct L1C_WAY_DIS_W<'a> { - w: &'a mut W, -} -impl<'a> L1C_WAY_DIS_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 8)) | ((value as u32 & 0x0f) << 8); - self.w - } -} -#[doc = "Field `l1c_invalid_done` reader - "] -pub struct L1C_INVALID_DONE_R(crate::FieldReader); -impl L1C_INVALID_DONE_R { - pub(crate) fn new(bits: bool) -> Self { - L1C_INVALID_DONE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for L1C_INVALID_DONE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `l1c_invalid_en` reader - "] -pub struct L1C_INVALID_EN_R(crate::FieldReader); -impl L1C_INVALID_EN_R { - pub(crate) fn new(bits: bool) -> Self { - L1C_INVALID_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for L1C_INVALID_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `l1c_invalid_en` writer - "] -pub struct L1C_INVALID_EN_W<'a> { - w: &'a mut W, -} -impl<'a> L1C_INVALID_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `l1c_cnt_en` reader - "] -pub struct L1C_CNT_EN_R(crate::FieldReader); -impl L1C_CNT_EN_R { - pub(crate) fn new(bits: bool) -> Self { - L1C_CNT_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for L1C_CNT_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `l1c_cnt_en` writer - "] -pub struct L1C_CNT_EN_W<'a> { - w: &'a mut W, -} -impl<'a> L1C_CNT_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `l1c_cacheable` reader - "] -pub struct L1C_CACHEABLE_R(crate::FieldReader); -impl L1C_CACHEABLE_R { - pub(crate) fn new(bits: bool) -> Self { - L1C_CACHEABLE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for L1C_CACHEABLE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type L1C_CACHEABLE_R = crate::BitReader; #[doc = "Field `l1c_cacheable` writer - "] -pub struct L1C_CACHEABLE_W<'a> { - w: &'a mut W, -} -impl<'a> L1C_CACHEABLE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type L1C_CACHEABLE_W<'a, const O: u8> = crate::BitWriter<'a, u32, L1C_CONFIG_SPEC, bool, O>; +#[doc = "Field `l1c_cnt_en` reader - "] +pub type L1C_CNT_EN_R = crate::BitReader; +#[doc = "Field `l1c_cnt_en` writer - "] +pub type L1C_CNT_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, L1C_CONFIG_SPEC, bool, O>; +#[doc = "Field `l1c_invalid_en` reader - "] +pub type L1C_INVALID_EN_R = crate::BitReader; +#[doc = "Field `l1c_invalid_en` writer - "] +pub type L1C_INVALID_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, L1C_CONFIG_SPEC, bool, O>; +#[doc = "Field `l1c_invalid_done` reader - "] +pub type L1C_INVALID_DONE_R = crate::BitReader; +#[doc = "Field `l1c_way_dis` reader - "] +pub type L1C_WAY_DIS_R = crate::FieldReader; +#[doc = "Field `l1c_way_dis` writer - "] +pub type L1C_WAY_DIS_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, L1C_CONFIG_SPEC, u8, u8, 4, O>; +#[doc = "Field `irom_2t_access` reader - "] +pub type IROM_2T_ACCESS_R = crate::BitReader; +#[doc = "Field `irom_2t_access` writer - "] +pub type IROM_2T_ACCESS_W<'a, const O: u8> = crate::BitWriter<'a, u32, L1C_CONFIG_SPEC, bool, O>; +#[doc = "Field `l1c_bypass` reader - "] +pub type L1C_BYPASS_R = crate::BitReader; +#[doc = "Field `l1c_bypass` writer - "] +pub type L1C_BYPASS_W<'a, const O: u8> = crate::BitWriter<'a, u32, L1C_CONFIG_SPEC, bool, O>; +#[doc = "Field `l1c_bmx_err_en` reader - "] +pub type L1C_BMX_ERR_EN_R = crate::BitReader; +#[doc = "Field `l1c_bmx_err_en` writer - "] +pub type L1C_BMX_ERR_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, L1C_CONFIG_SPEC, bool, O>; +#[doc = "Field `l1c_bmx_arb_mode` reader - "] +pub type L1C_BMX_ARB_MODE_R = crate::FieldReader; +#[doc = "Field `l1c_bmx_arb_mode` writer - "] +pub type L1C_BMX_ARB_MODE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, L1C_CONFIG_SPEC, u8, u8, 2, O>; +#[doc = "Field `l1c_bmx_timeout_en` reader - "] +pub type L1C_BMX_TIMEOUT_EN_R = crate::FieldReader; +#[doc = "Field `l1c_bmx_timeout_en` writer - "] +pub type L1C_BMX_TIMEOUT_EN_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, L1C_CONFIG_SPEC, u8, u8, 4, O>; +#[doc = "Field `l1c_bmx_busy_option_dis` reader - "] +pub type L1C_BMX_BUSY_OPTION_DIS_R = crate::BitReader; +#[doc = "Field `l1c_bmx_busy_option_dis` writer - "] +pub type L1C_BMX_BUSY_OPTION_DIS_W<'a, const O: u8> = + crate::BitWriter<'a, u32, L1C_CONFIG_SPEC, bool, O>; +#[doc = "Field `early_resp_dis` reader - "] +pub type EARLY_RESP_DIS_R = crate::BitReader; +#[doc = "Field `early_resp_dis` writer - "] +pub type EARLY_RESP_DIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, L1C_CONFIG_SPEC, bool, O>; +#[doc = "Field `wrap_dis` reader - "] +pub type WRAP_DIS_R = crate::BitReader; +#[doc = "Field `wrap_dis` writer - "] +pub type WRAP_DIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, L1C_CONFIG_SPEC, bool, O>; impl R { - #[doc = "Bit 26"] + #[doc = "Bit 0"] #[inline(always)] - pub fn wrap_dis(&self) -> WRAP_DIS_R { - WRAP_DIS_R::new(((self.bits >> 26) & 0x01) != 0) + pub fn l1c_cacheable(&self) -> L1C_CACHEABLE_R { + L1C_CACHEABLE_R::new((self.bits & 1) != 0) } - #[doc = "Bit 25"] + #[doc = "Bit 1"] #[inline(always)] - pub fn early_resp_dis(&self) -> EARLY_RESP_DIS_R { - EARLY_RESP_DIS_R::new(((self.bits >> 25) & 0x01) != 0) + pub fn l1c_cnt_en(&self) -> L1C_CNT_EN_R { + L1C_CNT_EN_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 24"] + #[doc = "Bit 2"] #[inline(always)] - pub fn l1c_bmx_busy_option_dis(&self) -> L1C_BMX_BUSY_OPTION_DIS_R { - L1C_BMX_BUSY_OPTION_DIS_R::new(((self.bits >> 24) & 0x01) != 0) + pub fn l1c_invalid_en(&self) -> L1C_INVALID_EN_R { + L1C_INVALID_EN_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bits 20:23"] + #[doc = "Bit 3"] #[inline(always)] - pub fn l1c_bmx_timeout_en(&self) -> L1C_BMX_TIMEOUT_EN_R { - L1C_BMX_TIMEOUT_EN_R::new(((self.bits >> 20) & 0x0f) as u8) + pub fn l1c_invalid_done(&self) -> L1C_INVALID_DONE_R { + L1C_INVALID_DONE_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bits 16:17"] + #[doc = "Bits 8:11"] #[inline(always)] - pub fn l1c_bmx_arb_mode(&self) -> L1C_BMX_ARB_MODE_R { - L1C_BMX_ARB_MODE_R::new(((self.bits >> 16) & 0x03) as u8) + pub fn l1c_way_dis(&self) -> L1C_WAY_DIS_R { + L1C_WAY_DIS_R::new(((self.bits >> 8) & 0x0f) as u8) } - #[doc = "Bit 15"] + #[doc = "Bit 12"] #[inline(always)] - pub fn l1c_bmx_err_en(&self) -> L1C_BMX_ERR_EN_R { - L1C_BMX_ERR_EN_R::new(((self.bits >> 15) & 0x01) != 0) + pub fn irom_2t_access(&self) -> IROM_2T_ACCESS_R { + IROM_2T_ACCESS_R::new(((self.bits >> 12) & 1) != 0) } #[doc = "Bit 14"] #[inline(always)] pub fn l1c_bypass(&self) -> L1C_BYPASS_R { - L1C_BYPASS_R::new(((self.bits >> 14) & 0x01) != 0) + L1C_BYPASS_R::new(((self.bits >> 14) & 1) != 0) } - #[doc = "Bit 12"] + #[doc = "Bit 15"] #[inline(always)] - pub fn irom_2t_access(&self) -> IROM_2T_ACCESS_R { - IROM_2T_ACCESS_R::new(((self.bits >> 12) & 0x01) != 0) + pub fn l1c_bmx_err_en(&self) -> L1C_BMX_ERR_EN_R { + L1C_BMX_ERR_EN_R::new(((self.bits >> 15) & 1) != 0) } - #[doc = "Bits 8:11"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn l1c_way_dis(&self) -> L1C_WAY_DIS_R { - L1C_WAY_DIS_R::new(((self.bits >> 8) & 0x0f) as u8) + pub fn l1c_bmx_arb_mode(&self) -> L1C_BMX_ARB_MODE_R { + L1C_BMX_ARB_MODE_R::new(((self.bits >> 16) & 3) as u8) } - #[doc = "Bit 3"] + #[doc = "Bits 20:23"] #[inline(always)] - pub fn l1c_invalid_done(&self) -> L1C_INVALID_DONE_R { - L1C_INVALID_DONE_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn l1c_bmx_timeout_en(&self) -> L1C_BMX_TIMEOUT_EN_R { + L1C_BMX_TIMEOUT_EN_R::new(((self.bits >> 20) & 0x0f) as u8) } - #[doc = "Bit 2"] + #[doc = "Bit 24"] #[inline(always)] - pub fn l1c_invalid_en(&self) -> L1C_INVALID_EN_R { - L1C_INVALID_EN_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn l1c_bmx_busy_option_dis(&self) -> L1C_BMX_BUSY_OPTION_DIS_R { + L1C_BMX_BUSY_OPTION_DIS_R::new(((self.bits >> 24) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 25"] #[inline(always)] - pub fn l1c_cnt_en(&self) -> L1C_CNT_EN_R { - L1C_CNT_EN_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn early_resp_dis(&self) -> EARLY_RESP_DIS_R { + EARLY_RESP_DIS_R::new(((self.bits >> 25) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 26"] #[inline(always)] - pub fn l1c_cacheable(&self) -> L1C_CACHEABLE_R { - L1C_CACHEABLE_R::new((self.bits & 0x01) != 0) + pub fn wrap_dis(&self) -> WRAP_DIS_R { + WRAP_DIS_R::new(((self.bits >> 26) & 1) != 0) } } impl W { - #[doc = "Bit 26"] + #[doc = "Bit 0"] #[inline(always)] - pub fn wrap_dis(&mut self) -> WRAP_DIS_W { - WRAP_DIS_W { w: self } + #[must_use] + pub fn l1c_cacheable(&mut self) -> L1C_CACHEABLE_W<0> { + L1C_CACHEABLE_W::new(self) } - #[doc = "Bit 25"] + #[doc = "Bit 1"] #[inline(always)] - pub fn early_resp_dis(&mut self) -> EARLY_RESP_DIS_W { - EARLY_RESP_DIS_W { w: self } + #[must_use] + pub fn l1c_cnt_en(&mut self) -> L1C_CNT_EN_W<1> { + L1C_CNT_EN_W::new(self) } - #[doc = "Bit 24"] + #[doc = "Bit 2"] #[inline(always)] - pub fn l1c_bmx_busy_option_dis(&mut self) -> L1C_BMX_BUSY_OPTION_DIS_W { - L1C_BMX_BUSY_OPTION_DIS_W { w: self } + #[must_use] + pub fn l1c_invalid_en(&mut self) -> L1C_INVALID_EN_W<2> { + L1C_INVALID_EN_W::new(self) } - #[doc = "Bits 20:23"] + #[doc = "Bits 8:11"] #[inline(always)] - pub fn l1c_bmx_timeout_en(&mut self) -> L1C_BMX_TIMEOUT_EN_W { - L1C_BMX_TIMEOUT_EN_W { w: self } + #[must_use] + pub fn l1c_way_dis(&mut self) -> L1C_WAY_DIS_W<8> { + L1C_WAY_DIS_W::new(self) } - #[doc = "Bits 16:17"] + #[doc = "Bit 12"] #[inline(always)] - pub fn l1c_bmx_arb_mode(&mut self) -> L1C_BMX_ARB_MODE_W { - L1C_BMX_ARB_MODE_W { w: self } + #[must_use] + pub fn irom_2t_access(&mut self) -> IROM_2T_ACCESS_W<12> { + IROM_2T_ACCESS_W::new(self) } - #[doc = "Bit 15"] + #[doc = "Bit 14"] #[inline(always)] - pub fn l1c_bmx_err_en(&mut self) -> L1C_BMX_ERR_EN_W { - L1C_BMX_ERR_EN_W { w: self } + #[must_use] + pub fn l1c_bypass(&mut self) -> L1C_BYPASS_W<14> { + L1C_BYPASS_W::new(self) } - #[doc = "Bit 14"] + #[doc = "Bit 15"] #[inline(always)] - pub fn l1c_bypass(&mut self) -> L1C_BYPASS_W { - L1C_BYPASS_W { w: self } + #[must_use] + pub fn l1c_bmx_err_en(&mut self) -> L1C_BMX_ERR_EN_W<15> { + L1C_BMX_ERR_EN_W::new(self) } - #[doc = "Bit 12"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn irom_2t_access(&mut self) -> IROM_2T_ACCESS_W { - IROM_2T_ACCESS_W { w: self } + #[must_use] + pub fn l1c_bmx_arb_mode(&mut self) -> L1C_BMX_ARB_MODE_W<16> { + L1C_BMX_ARB_MODE_W::new(self) } - #[doc = "Bits 8:11"] + #[doc = "Bits 20:23"] #[inline(always)] - pub fn l1c_way_dis(&mut self) -> L1C_WAY_DIS_W { - L1C_WAY_DIS_W { w: self } + #[must_use] + pub fn l1c_bmx_timeout_en(&mut self) -> L1C_BMX_TIMEOUT_EN_W<20> { + L1C_BMX_TIMEOUT_EN_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bit 24"] #[inline(always)] - pub fn l1c_invalid_en(&mut self) -> L1C_INVALID_EN_W { - L1C_INVALID_EN_W { w: self } + #[must_use] + pub fn l1c_bmx_busy_option_dis(&mut self) -> L1C_BMX_BUSY_OPTION_DIS_W<24> { + L1C_BMX_BUSY_OPTION_DIS_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 25"] #[inline(always)] - pub fn l1c_cnt_en(&mut self) -> L1C_CNT_EN_W { - L1C_CNT_EN_W { w: self } + #[must_use] + pub fn early_resp_dis(&mut self) -> EARLY_RESP_DIS_W<25> { + EARLY_RESP_DIS_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 26"] #[inline(always)] - pub fn l1c_cacheable(&mut self) -> L1C_CACHEABLE_W { - L1C_CACHEABLE_W { w: self } + #[must_use] + pub fn wrap_dis(&mut self) -> WRAP_DIS_W<26> { + WRAP_DIS_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -594,11 +247,10 @@ impl crate::Readable for L1C_CONFIG_SPEC { #[doc = "`write(|w| ..)` method takes [l1c_config::W](W) writer structure"] impl crate::Writable for L1C_CONFIG_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets l1c_config to value 0x0600_0f00"] impl crate::Resettable for L1C_CONFIG_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0600_0f00 - } + const RESET_VALUE: Self::Ux = 0x0600_0f00; } diff --git a/src/l1c/l1c_range.rs b/src/l1c/l1c_range.rs index fb65caf..536eb8c 100644 --- a/src/l1c/l1c_range.rs +++ b/src/l1c/l1c_range.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,13 +28,15 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } impl W { #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -51,11 +54,10 @@ impl crate::Readable for L1C_RANGE_SPEC { #[doc = "`write(|w| ..)` method takes [l1c_range::W](W) writer structure"] impl crate::Writable for L1C_RANGE_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets l1c_range to value 0"] impl crate::Resettable for L1C_RANGE_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/l1c/miss_cnt.rs b/src/l1c/miss_cnt.rs index 0da5340..5c5329b 100644 --- a/src/l1c/miss_cnt.rs +++ b/src/l1c/miss_cnt.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `miss_cnt` reader - "] -pub struct MISS_CNT_R(crate::FieldReader); -impl MISS_CNT_R { - pub(crate) fn new(bits: u32) -> Self { - MISS_CNT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for MISS_CNT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type MISS_CNT_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn miss_cnt(&self) -> MISS_CNT_R { - MISS_CNT_R::new((self.bits & 0xffff_ffff) as u32) + MISS_CNT_R::new(self.bits) } } #[doc = "miss_cnt.\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 [miss_cnt](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for MISS_CNT_SPEC { } #[doc = "`reset()` method sets miss_cnt to value 0"] impl crate::Resettable for MISS_CNT_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/lib.rs b/src/lib.rs index 2352f17..d198c47 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,5 @@ -#![doc = "Peripheral access API for BL602 microcontrollers (generated using svd2rust v0.18.0 ( ))\n\nYou can find an overview of the generated API [here].\n\nAPI features to be included in the [next] -svd2rust release can be generated by cloning the svd2rust [repository], checking out the above commit, and running `cargo doc --open`.\n\n[here]: https://docs.rs/svd2rust/0.18.0/svd2rust/#peripheral-api\n[next]: https://github.com/rust-embedded/svd2rust/blob/master/CHANGELOG.md#unreleased\n[repository]: https://github.com/rust-embedded/svd2rust"] -#![deny(const_err)] +#![doc = "Peripheral access API for BL602 microcontrollers (generated using svd2rust v0.28.0 ( ))\n\nYou can find an overview of the generated API [here].\n\nAPI features to be included in the [next] +svd2rust release can be generated by cloning the svd2rust [repository], checking out the above commit, and running `cargo doc --open`.\n\n[here]: https://docs.rs/svd2rust/0.28.0/svd2rust/#peripheral-api\n[next]: https://github.com/rust-embedded/svd2rust/blob/master/CHANGELOG.md#unreleased\n[repository]: https://github.com/rust-embedded/svd2rust"] #![deny(dead_code)] #![deny(improper_ctypes)] #![deny(missing_docs)] @@ -24,6 +23,17 @@ use core::ops::Deref; use generic::*; #[doc = r"Common register and bit access and modify traits"] pub mod generic; +#[cfg(feature = "rt")] +extern "C" {} +#[doc(hidden)] +pub union Vector { + pub _handler: unsafe extern "C" fn(), + pub _reserved: usize, +} +#[cfg(feature = "rt")] +#[doc(hidden)] +#[no_mangle] +pub static __EXTERNAL_INTERRUPTS: [Vector; 0] = []; #[doc = "Global register"] pub struct GLB { _marker: PhantomData<*const ()>, @@ -698,7 +708,7 @@ impl core::fmt::Debug for AON { pub mod aon; #[no_mangle] static mut DEVICE_PERIPHERALS: bool = false; -#[doc = r"All the peripherals"] +#[doc = r" All the peripherals."] #[allow(non_snake_case)] pub struct Peripherals { #[doc = "GLB"] @@ -751,18 +761,22 @@ pub struct Peripherals { pub AON: AON, } impl Peripherals { - #[doc = r"Returns all the peripherals *once*"] + #[doc = r" Returns all the peripherals *once*."] + #[cfg(feature = "critical-section")] #[inline] pub fn take() -> Option { - riscv::interrupt::free(|_| { + critical_section::with(|_| { if unsafe { DEVICE_PERIPHERALS } { - None - } else { - Some(unsafe { Peripherals::steal() }) + return None; } + Some(unsafe { Peripherals::steal() }) }) } - #[doc = r"Unchecked version of `Peripherals::take`"] + #[doc = r" Unchecked version of `Peripherals::take`."] + #[doc = r""] + #[doc = r" # Safety"] + #[doc = r""] + #[doc = r" Each of the returned peripherals must be used at most once."] #[inline] pub unsafe fn steal() -> Self { DEVICE_PERIPHERALS = true; diff --git a/src/pds.rs b/src/pds.rs index d49211a..a53f0ea 100644 --- a/src/pds.rs +++ b/src/pds.rs @@ -2,114 +2,114 @@ #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - PDS_CTL."] - pub pds_ctl: crate::Reg, + pub pds_ctl: PDS_CTL, #[doc = "0x04 - PDS_TIME1."] - pub pds_time1: crate::Reg, - _reserved2: [u8; 4usize], + pub pds_time1: PDS_TIME1, + _reserved2: [u8; 0x04], #[doc = "0x0c - PDS_INT."] - pub pds_int: crate::Reg, + pub pds_int: PDS_INT, #[doc = "0x10 - PDS_CTL2."] - pub pds_ctl2: crate::Reg, + pub pds_ctl2: PDS_CTL2, #[doc = "0x14 - PDS_CTL3."] - pub pds_ctl3: crate::Reg, + pub pds_ctl3: PDS_CTL3, #[doc = "0x18 - PDS_CTL4."] - pub pds_ctl4: crate::Reg, + pub pds_ctl4: PDS_CTL4, #[doc = "0x1c - pds_stat."] - pub pds_stat: crate::Reg, + pub pds_stat: PDS_STAT, #[doc = "0x20 - pds_ram1."] - pub pds_ram1: crate::Reg, - _reserved8: [u8; 732usize], + pub pds_ram1: PDS_RAM1, + _reserved8: [u8; 0x02dc], #[doc = "0x300 - rc32m_ctrl0."] - pub rc32m_ctrl0: crate::Reg, + pub rc32m_ctrl0: RC32M_CTRL0, #[doc = "0x304 - rc32m_ctrl1."] - pub rc32m_ctrl1: crate::Reg, - _reserved10: [u8; 248usize], + pub rc32m_ctrl1: RC32M_CTRL1, + _reserved10: [u8; 0xf8], #[doc = "0x400 - pu_rst_clkpll."] - pub pu_rst_clkpll: crate::Reg, + pub pu_rst_clkpll: PU_RST_CLKPLL, #[doc = "0x404 - clkpll_top_ctrl."] - pub clkpll_top_ctrl: crate::Reg, + pub clkpll_top_ctrl: CLKPLL_TOP_CTRL, #[doc = "0x408 - clkpll_cp."] - pub clkpll_cp: crate::Reg, + pub clkpll_cp: CLKPLL_CP, #[doc = "0x40c - clkpll_rz."] - pub clkpll_rz: crate::Reg, + pub clkpll_rz: CLKPLL_RZ, #[doc = "0x410 - clkpll_fbdv."] - pub clkpll_fbdv: crate::Reg, + pub clkpll_fbdv: CLKPLL_FBDV, #[doc = "0x414 - clkpll_vco."] - pub clkpll_vco: crate::Reg, + pub clkpll_vco: CLKPLL_VCO, #[doc = "0x418 - clkpll_sdm."] - pub clkpll_sdm: crate::Reg, + pub clkpll_sdm: CLKPLL_SDM, #[doc = "0x41c - clkpll_output_en."] - pub clkpll_output_en: crate::Reg, + pub clkpll_output_en: CLKPLL_OUTPUT_EN, } -#[doc = "PDS_CTL register accessor: an alias for `Reg`"] +#[doc = "PDS_CTL (rw) register accessor: an alias for `Reg`"] pub type PDS_CTL = crate::Reg; #[doc = "PDS_CTL."] pub mod pds_ctl; -#[doc = "PDS_TIME1 register accessor: an alias for `Reg`"] +#[doc = "PDS_TIME1 (rw) register accessor: an alias for `Reg`"] pub type PDS_TIME1 = crate::Reg; #[doc = "PDS_TIME1."] pub mod pds_time1; -#[doc = "PDS_INT register accessor: an alias for `Reg`"] +#[doc = "PDS_INT (rw) register accessor: an alias for `Reg`"] pub type PDS_INT = crate::Reg; #[doc = "PDS_INT."] pub mod pds_int; -#[doc = "PDS_CTL2 register accessor: an alias for `Reg`"] +#[doc = "PDS_CTL2 (rw) register accessor: an alias for `Reg`"] pub type PDS_CTL2 = crate::Reg; #[doc = "PDS_CTL2."] pub mod pds_ctl2; -#[doc = "PDS_CTL3 register accessor: an alias for `Reg`"] +#[doc = "PDS_CTL3 (rw) register accessor: an alias for `Reg`"] pub type PDS_CTL3 = crate::Reg; #[doc = "PDS_CTL3."] pub mod pds_ctl3; -#[doc = "PDS_CTL4 register accessor: an alias for `Reg`"] +#[doc = "PDS_CTL4 (rw) register accessor: an alias for `Reg`"] pub type PDS_CTL4 = crate::Reg; #[doc = "PDS_CTL4."] pub mod pds_ctl4; -#[doc = "pds_stat register accessor: an alias for `Reg`"] +#[doc = "pds_stat (r) register accessor: an alias for `Reg`"] pub type PDS_STAT = crate::Reg; #[doc = "pds_stat."] pub mod pds_stat; -#[doc = "pds_ram1 register accessor: an alias for `Reg`"] +#[doc = "pds_ram1 (rw) register accessor: an alias for `Reg`"] pub type PDS_RAM1 = crate::Reg; #[doc = "pds_ram1."] pub mod pds_ram1; -#[doc = "rc32m_ctrl0 register accessor: an alias for `Reg`"] +#[doc = "rc32m_ctrl0 (rw) register accessor: an alias for `Reg`"] pub type RC32M_CTRL0 = crate::Reg; #[doc = "rc32m_ctrl0."] pub mod rc32m_ctrl0; -#[doc = "rc32m_ctrl1 register accessor: an alias for `Reg`"] +#[doc = "rc32m_ctrl1 (rw) register accessor: an alias for `Reg`"] pub type RC32M_CTRL1 = crate::Reg; #[doc = "rc32m_ctrl1."] pub mod rc32m_ctrl1; -#[doc = "pu_rst_clkpll register accessor: an alias for `Reg`"] +#[doc = "pu_rst_clkpll (rw) register accessor: an alias for `Reg`"] pub type PU_RST_CLKPLL = crate::Reg; #[doc = "pu_rst_clkpll."] pub mod pu_rst_clkpll; -#[doc = "clkpll_top_ctrl register accessor: an alias for `Reg`"] +#[doc = "clkpll_top_ctrl (rw) register accessor: an alias for `Reg`"] pub type CLKPLL_TOP_CTRL = crate::Reg; #[doc = "clkpll_top_ctrl."] pub mod clkpll_top_ctrl; -#[doc = "clkpll_cp register accessor: an alias for `Reg`"] +#[doc = "clkpll_cp (rw) register accessor: an alias for `Reg`"] pub type CLKPLL_CP = crate::Reg; #[doc = "clkpll_cp."] pub mod clkpll_cp; -#[doc = "clkpll_rz register accessor: an alias for `Reg`"] +#[doc = "clkpll_rz (rw) register accessor: an alias for `Reg`"] pub type CLKPLL_RZ = crate::Reg; #[doc = "clkpll_rz."] pub mod clkpll_rz; -#[doc = "clkpll_fbdv register accessor: an alias for `Reg`"] +#[doc = "clkpll_fbdv (rw) register accessor: an alias for `Reg`"] pub type CLKPLL_FBDV = crate::Reg; #[doc = "clkpll_fbdv."] pub mod clkpll_fbdv; -#[doc = "clkpll_vco register accessor: an alias for `Reg`"] +#[doc = "clkpll_vco (rw) register accessor: an alias for `Reg`"] pub type CLKPLL_VCO = crate::Reg; #[doc = "clkpll_vco."] pub mod clkpll_vco; -#[doc = "clkpll_sdm register accessor: an alias for `Reg`"] +#[doc = "clkpll_sdm (rw) register accessor: an alias for `Reg`"] pub type CLKPLL_SDM = crate::Reg; #[doc = "clkpll_sdm."] pub mod clkpll_sdm; -#[doc = "clkpll_output_en register accessor: an alias for `Reg`"] +#[doc = "clkpll_output_en (rw) register accessor: an alias for `Reg`"] pub type CLKPLL_OUTPUT_EN = crate::Reg; #[doc = "clkpll_output_en."] pub mod clkpll_output_en; diff --git a/src/pds/clkpll_cp.rs b/src/pds/clkpll_cp.rs index 809190e..23e5466 100644 --- a/src/pds/clkpll_cp.rs +++ b/src/pds/clkpll_cp.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,271 +28,110 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `clkpll_cp_opamp_en` reader - "] -pub struct CLKPLL_CP_OPAMP_EN_R(crate::FieldReader); -impl CLKPLL_CP_OPAMP_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CLKPLL_CP_OPAMP_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_CP_OPAMP_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_cp_opamp_en` writer - "] -pub struct CLKPLL_CP_OPAMP_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_CP_OPAMP_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); - self.w - } -} -#[doc = "Field `clkpll_cp_startup_en` reader - "] -pub struct CLKPLL_CP_STARTUP_EN_R(crate::FieldReader); -impl CLKPLL_CP_STARTUP_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CLKPLL_CP_STARTUP_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_CP_STARTUP_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_cp_startup_en` writer - "] -pub struct CLKPLL_CP_STARTUP_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_CP_STARTUP_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w - } -} -#[doc = "Field `clkpll_int_frac_sw` reader - "] -pub struct CLKPLL_INT_FRAC_SW_R(crate::FieldReader); -impl CLKPLL_INT_FRAC_SW_R { - pub(crate) fn new(bits: bool) -> Self { - CLKPLL_INT_FRAC_SW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_INT_FRAC_SW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_int_frac_sw` writer - "] -pub struct CLKPLL_INT_FRAC_SW_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_INT_FRAC_SW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `clkpll_icp_1u` reader - "] -pub struct CLKPLL_ICP_1U_R(crate::FieldReader); -impl CLKPLL_ICP_1U_R { - pub(crate) fn new(bits: u8) -> Self { - CLKPLL_ICP_1U_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_ICP_1U_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_icp_1u` writer - "] -pub struct CLKPLL_ICP_1U_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_ICP_1U_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 6)) | ((value as u32 & 0x03) << 6); - self.w - } -} -#[doc = "Field `clkpll_icp_5u` reader - "] -pub struct CLKPLL_ICP_5U_R(crate::FieldReader); -impl CLKPLL_ICP_5U_R { - pub(crate) fn new(bits: u8) -> Self { - CLKPLL_ICP_5U_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_ICP_5U_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_icp_5u` writer - "] -pub struct CLKPLL_ICP_5U_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_ICP_5U_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 4)) | ((value as u32 & 0x03) << 4); - self.w - } -} #[doc = "Field `clkpll_sel_cp_bias` reader - "] -pub struct CLKPLL_SEL_CP_BIAS_R(crate::FieldReader); -impl CLKPLL_SEL_CP_BIAS_R { - pub(crate) fn new(bits: bool) -> Self { - CLKPLL_SEL_CP_BIAS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_SEL_CP_BIAS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CLKPLL_SEL_CP_BIAS_R = crate::BitReader; #[doc = "Field `clkpll_sel_cp_bias` writer - "] -pub struct CLKPLL_SEL_CP_BIAS_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_SEL_CP_BIAS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type CLKPLL_SEL_CP_BIAS_W<'a, const O: u8> = crate::BitWriter<'a, u32, CLKPLL_CP_SPEC, bool, O>; +#[doc = "Field `clkpll_icp_5u` reader - "] +pub type CLKPLL_ICP_5U_R = crate::FieldReader; +#[doc = "Field `clkpll_icp_5u` writer - "] +pub type CLKPLL_ICP_5U_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, CLKPLL_CP_SPEC, u8, u8, 2, O>; +#[doc = "Field `clkpll_icp_1u` reader - "] +pub type CLKPLL_ICP_1U_R = crate::FieldReader; +#[doc = "Field `clkpll_icp_1u` writer - "] +pub type CLKPLL_ICP_1U_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, CLKPLL_CP_SPEC, u8, u8, 2, O>; +#[doc = "Field `clkpll_int_frac_sw` reader - "] +pub type CLKPLL_INT_FRAC_SW_R = crate::BitReader; +#[doc = "Field `clkpll_int_frac_sw` writer - "] +pub type CLKPLL_INT_FRAC_SW_W<'a, const O: u8> = crate::BitWriter<'a, u32, CLKPLL_CP_SPEC, bool, O>; +#[doc = "Field `clkpll_cp_startup_en` reader - "] +pub type CLKPLL_CP_STARTUP_EN_R = crate::BitReader; +#[doc = "Field `clkpll_cp_startup_en` writer - "] +pub type CLKPLL_CP_STARTUP_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, CLKPLL_CP_SPEC, bool, O>; +#[doc = "Field `clkpll_cp_opamp_en` reader - "] +pub type CLKPLL_CP_OPAMP_EN_R = crate::BitReader; +#[doc = "Field `clkpll_cp_opamp_en` writer - "] +pub type CLKPLL_CP_OPAMP_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, CLKPLL_CP_SPEC, bool, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn clkpll_sel_cp_bias(&self) -> CLKPLL_SEL_CP_BIAS_R { + CLKPLL_SEL_CP_BIAS_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bit 10"] + #[doc = "Bits 4:5"] #[inline(always)] - pub fn clkpll_cp_opamp_en(&self) -> CLKPLL_CP_OPAMP_EN_R { - CLKPLL_CP_OPAMP_EN_R::new(((self.bits >> 10) & 0x01) != 0) + pub fn clkpll_icp_5u(&self) -> CLKPLL_ICP_5U_R { + CLKPLL_ICP_5U_R::new(((self.bits >> 4) & 3) as u8) } - #[doc = "Bit 9"] + #[doc = "Bits 6:7"] #[inline(always)] - pub fn clkpll_cp_startup_en(&self) -> CLKPLL_CP_STARTUP_EN_R { - CLKPLL_CP_STARTUP_EN_R::new(((self.bits >> 9) & 0x01) != 0) + pub fn clkpll_icp_1u(&self) -> CLKPLL_ICP_1U_R { + CLKPLL_ICP_1U_R::new(((self.bits >> 6) & 3) as u8) } #[doc = "Bit 8"] #[inline(always)] pub fn clkpll_int_frac_sw(&self) -> CLKPLL_INT_FRAC_SW_R { - CLKPLL_INT_FRAC_SW_R::new(((self.bits >> 8) & 0x01) != 0) - } - #[doc = "Bits 6:7"] - #[inline(always)] - pub fn clkpll_icp_1u(&self) -> CLKPLL_ICP_1U_R { - CLKPLL_ICP_1U_R::new(((self.bits >> 6) & 0x03) as u8) + CLKPLL_INT_FRAC_SW_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bits 4:5"] + #[doc = "Bit 9"] #[inline(always)] - pub fn clkpll_icp_5u(&self) -> CLKPLL_ICP_5U_R { - CLKPLL_ICP_5U_R::new(((self.bits >> 4) & 0x03) as u8) + pub fn clkpll_cp_startup_en(&self) -> CLKPLL_CP_STARTUP_EN_R { + CLKPLL_CP_STARTUP_EN_R::new(((self.bits >> 9) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 10"] #[inline(always)] - pub fn clkpll_sel_cp_bias(&self) -> CLKPLL_SEL_CP_BIAS_R { - CLKPLL_SEL_CP_BIAS_R::new((self.bits & 0x01) != 0) + pub fn clkpll_cp_opamp_en(&self) -> CLKPLL_CP_OPAMP_EN_R { + CLKPLL_CP_OPAMP_EN_R::new(((self.bits >> 10) & 1) != 0) } } impl W { - #[doc = "Bit 10"] + #[doc = "Bit 0"] #[inline(always)] - pub fn clkpll_cp_opamp_en(&mut self) -> CLKPLL_CP_OPAMP_EN_W { - CLKPLL_CP_OPAMP_EN_W { w: self } + #[must_use] + pub fn clkpll_sel_cp_bias(&mut self) -> CLKPLL_SEL_CP_BIAS_W<0> { + CLKPLL_SEL_CP_BIAS_W::new(self) } - #[doc = "Bit 9"] + #[doc = "Bits 4:5"] #[inline(always)] - pub fn clkpll_cp_startup_en(&mut self) -> CLKPLL_CP_STARTUP_EN_W { - CLKPLL_CP_STARTUP_EN_W { w: self } + #[must_use] + pub fn clkpll_icp_5u(&mut self) -> CLKPLL_ICP_5U_W<4> { + CLKPLL_ICP_5U_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bits 6:7"] #[inline(always)] - pub fn clkpll_int_frac_sw(&mut self) -> CLKPLL_INT_FRAC_SW_W { - CLKPLL_INT_FRAC_SW_W { w: self } + #[must_use] + pub fn clkpll_icp_1u(&mut self) -> CLKPLL_ICP_1U_W<6> { + CLKPLL_ICP_1U_W::new(self) } - #[doc = "Bits 6:7"] + #[doc = "Bit 8"] #[inline(always)] - pub fn clkpll_icp_1u(&mut self) -> CLKPLL_ICP_1U_W { - CLKPLL_ICP_1U_W { w: self } + #[must_use] + pub fn clkpll_int_frac_sw(&mut self) -> CLKPLL_INT_FRAC_SW_W<8> { + CLKPLL_INT_FRAC_SW_W::new(self) } - #[doc = "Bits 4:5"] + #[doc = "Bit 9"] #[inline(always)] - pub fn clkpll_icp_5u(&mut self) -> CLKPLL_ICP_5U_W { - CLKPLL_ICP_5U_W { w: self } + #[must_use] + pub fn clkpll_cp_startup_en(&mut self) -> CLKPLL_CP_STARTUP_EN_W<9> { + CLKPLL_CP_STARTUP_EN_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 10"] #[inline(always)] - pub fn clkpll_sel_cp_bias(&mut self) -> CLKPLL_SEL_CP_BIAS_W { - CLKPLL_SEL_CP_BIAS_W { w: self } + #[must_use] + pub fn clkpll_cp_opamp_en(&mut self) -> CLKPLL_CP_OPAMP_EN_W<10> { + CLKPLL_CP_OPAMP_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -309,11 +149,10 @@ impl crate::Readable for CLKPLL_CP_SPEC { #[doc = "`write(|w| ..)` method takes [clkpll_cp::W](W) writer structure"] impl crate::Writable for CLKPLL_CP_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets clkpll_cp to value 0x0741"] impl crate::Resettable for CLKPLL_CP_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0741 - } + const RESET_VALUE: Self::Ux = 0x0741; } diff --git a/src/pds/clkpll_fbdv.rs b/src/pds/clkpll_fbdv.rs index a7eaa9e..5431048 100644 --- a/src/pds/clkpll_fbdv.rs +++ b/src/pds/clkpll_fbdv.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,87 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `clkpll_sel_fb_clk` reader - "] -pub struct CLKPLL_SEL_FB_CLK_R(crate::FieldReader); -impl CLKPLL_SEL_FB_CLK_R { - pub(crate) fn new(bits: u8) -> Self { - CLKPLL_SEL_FB_CLK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_SEL_FB_CLK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_sel_fb_clk` writer - "] -pub struct CLKPLL_SEL_FB_CLK_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_SEL_FB_CLK_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 2)) | ((value as u32 & 0x03) << 2); - self.w - } -} #[doc = "Field `clkpll_sel_sample_clk` reader - "] -pub struct CLKPLL_SEL_SAMPLE_CLK_R(crate::FieldReader); -impl CLKPLL_SEL_SAMPLE_CLK_R { - pub(crate) fn new(bits: u8) -> Self { - CLKPLL_SEL_SAMPLE_CLK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_SEL_SAMPLE_CLK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CLKPLL_SEL_SAMPLE_CLK_R = crate::FieldReader; #[doc = "Field `clkpll_sel_sample_clk` writer - "] -pub struct CLKPLL_SEL_SAMPLE_CLK_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_SEL_SAMPLE_CLK_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type CLKPLL_SEL_SAMPLE_CLK_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, CLKPLL_FBDV_SPEC, u8, u8, 2, O>; +#[doc = "Field `clkpll_sel_fb_clk` reader - "] +pub type CLKPLL_SEL_FB_CLK_R = crate::FieldReader; +#[doc = "Field `clkpll_sel_fb_clk` writer - "] +pub type CLKPLL_SEL_FB_CLK_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, CLKPLL_FBDV_SPEC, u8, u8, 2, O>; +impl R { + #[doc = "Bits 0:1"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w + pub fn clkpll_sel_sample_clk(&self) -> CLKPLL_SEL_SAMPLE_CLK_R { + CLKPLL_SEL_SAMPLE_CLK_R::new((self.bits & 3) as u8) } -} -impl R { #[doc = "Bits 2:3"] #[inline(always)] pub fn clkpll_sel_fb_clk(&self) -> CLKPLL_SEL_FB_CLK_R { - CLKPLL_SEL_FB_CLK_R::new(((self.bits >> 2) & 0x03) as u8) - } - #[doc = "Bits 0:1"] - #[inline(always)] - pub fn clkpll_sel_sample_clk(&self) -> CLKPLL_SEL_SAMPLE_CLK_R { - CLKPLL_SEL_SAMPLE_CLK_R::new((self.bits & 0x03) as u8) + CLKPLL_SEL_FB_CLK_R::new(((self.bits >> 2) & 3) as u8) } } impl W { - #[doc = "Bits 2:3"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn clkpll_sel_fb_clk(&mut self) -> CLKPLL_SEL_FB_CLK_W { - CLKPLL_SEL_FB_CLK_W { w: self } + #[must_use] + pub fn clkpll_sel_sample_clk(&mut self) -> CLKPLL_SEL_SAMPLE_CLK_W<0> { + CLKPLL_SEL_SAMPLE_CLK_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bits 2:3"] #[inline(always)] - pub fn clkpll_sel_sample_clk(&mut self) -> CLKPLL_SEL_SAMPLE_CLK_W { - CLKPLL_SEL_SAMPLE_CLK_W { w: self } + #[must_use] + pub fn clkpll_sel_fb_clk(&mut self) -> CLKPLL_SEL_FB_CLK_W<2> { + CLKPLL_SEL_FB_CLK_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -125,11 +88,10 @@ impl crate::Readable for CLKPLL_FBDV_SPEC { #[doc = "`write(|w| ..)` method takes [clkpll_fbdv::W](W) writer structure"] impl crate::Writable for CLKPLL_FBDV_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets clkpll_fbdv to value 0x05"] impl crate::Resettable for CLKPLL_FBDV_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x05 - } + const RESET_VALUE: Self::Ux = 0x05; } diff --git a/src/pds/clkpll_output_en.rs b/src/pds/clkpll_output_en.rs index 2c8edcd..c701bef 100644 --- a/src/pds/clkpll_output_en.rs +++ b/src/pds/clkpll_output_en.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,475 +28,177 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `clkpll_en_div2_480m` reader - "] -pub struct CLKPLL_EN_DIV2_480M_R(crate::FieldReader); -impl CLKPLL_EN_DIV2_480M_R { - pub(crate) fn new(bits: bool) -> Self { - CLKPLL_EN_DIV2_480M_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_EN_DIV2_480M_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_en_div2_480m` writer - "] -pub struct CLKPLL_EN_DIV2_480M_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_EN_DIV2_480M_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w - } -} -#[doc = "Field `clkpll_en_32m` reader - "] -pub struct CLKPLL_EN_32M_R(crate::FieldReader); -impl CLKPLL_EN_32M_R { - pub(crate) fn new(bits: bool) -> Self { - CLKPLL_EN_32M_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_EN_32M_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_en_32m` writer - "] -pub struct CLKPLL_EN_32M_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_EN_32M_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `clkpll_en_48m` reader - "] -pub struct CLKPLL_EN_48M_R(crate::FieldReader); -impl CLKPLL_EN_48M_R { - pub(crate) fn new(bits: bool) -> Self { - CLKPLL_EN_48M_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_EN_48M_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_en_48m` writer - "] -pub struct CLKPLL_EN_48M_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_EN_48M_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7); - self.w - } -} -#[doc = "Field `clkpll_en_80m` reader - "] -pub struct CLKPLL_EN_80M_R(crate::FieldReader); -impl CLKPLL_EN_80M_R { - pub(crate) fn new(bits: bool) -> Self { - CLKPLL_EN_80M_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_EN_80M_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_en_80m` writer - "] -pub struct CLKPLL_EN_80M_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_EN_80M_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w - } -} -#[doc = "Field `clkpll_en_96m` reader - "] -pub struct CLKPLL_EN_96M_R(crate::FieldReader); -impl CLKPLL_EN_96M_R { - pub(crate) fn new(bits: bool) -> Self { - CLKPLL_EN_96M_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_EN_96M_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_en_96m` writer - "] -pub struct CLKPLL_EN_96M_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_EN_96M_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w - } -} -#[doc = "Field `clkpll_en_120m` reader - "] -pub struct CLKPLL_EN_120M_R(crate::FieldReader); -impl CLKPLL_EN_120M_R { - pub(crate) fn new(bits: bool) -> Self { - CLKPLL_EN_120M_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_EN_120M_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_en_120m` writer - "] -pub struct CLKPLL_EN_120M_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_EN_120M_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} -#[doc = "Field `clkpll_en_160m` reader - "] -pub struct CLKPLL_EN_160M_R(crate::FieldReader); -impl CLKPLL_EN_160M_R { - pub(crate) fn new(bits: bool) -> Self { - CLKPLL_EN_160M_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_EN_160M_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_en_160m` writer - "] -pub struct CLKPLL_EN_160M_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_EN_160M_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `clkpll_en_192m` reader - "] -pub struct CLKPLL_EN_192M_R(crate::FieldReader); -impl CLKPLL_EN_192M_R { - pub(crate) fn new(bits: bool) -> Self { - CLKPLL_EN_192M_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_EN_192M_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_en_192m` writer - "] -pub struct CLKPLL_EN_192M_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_EN_192M_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `clkpll_en_240m` reader - "] -pub struct CLKPLL_EN_240M_R(crate::FieldReader); -impl CLKPLL_EN_240M_R { - pub(crate) fn new(bits: bool) -> Self { - CLKPLL_EN_240M_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_EN_240M_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_en_240m` writer - "] -pub struct CLKPLL_EN_240M_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_EN_240M_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `clkpll_en_480m` reader - "] -pub struct CLKPLL_EN_480M_R(crate::FieldReader); -impl CLKPLL_EN_480M_R { - pub(crate) fn new(bits: bool) -> Self { - CLKPLL_EN_480M_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_EN_480M_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CLKPLL_EN_480M_R = crate::BitReader; #[doc = "Field `clkpll_en_480m` writer - "] -pub struct CLKPLL_EN_480M_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_EN_480M_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type CLKPLL_EN_480M_W<'a, const O: u8> = + crate::BitWriter<'a, u32, CLKPLL_OUTPUT_EN_SPEC, bool, O>; +#[doc = "Field `clkpll_en_240m` reader - "] +pub type CLKPLL_EN_240M_R = crate::BitReader; +#[doc = "Field `clkpll_en_240m` writer - "] +pub type CLKPLL_EN_240M_W<'a, const O: u8> = + crate::BitWriter<'a, u32, CLKPLL_OUTPUT_EN_SPEC, bool, O>; +#[doc = "Field `clkpll_en_192m` reader - "] +pub type CLKPLL_EN_192M_R = crate::BitReader; +#[doc = "Field `clkpll_en_192m` writer - "] +pub type CLKPLL_EN_192M_W<'a, const O: u8> = + crate::BitWriter<'a, u32, CLKPLL_OUTPUT_EN_SPEC, bool, O>; +#[doc = "Field `clkpll_en_160m` reader - "] +pub type CLKPLL_EN_160M_R = crate::BitReader; +#[doc = "Field `clkpll_en_160m` writer - "] +pub type CLKPLL_EN_160M_W<'a, const O: u8> = + crate::BitWriter<'a, u32, CLKPLL_OUTPUT_EN_SPEC, bool, O>; +#[doc = "Field `clkpll_en_120m` reader - "] +pub type CLKPLL_EN_120M_R = crate::BitReader; +#[doc = "Field `clkpll_en_120m` writer - "] +pub type CLKPLL_EN_120M_W<'a, const O: u8> = + crate::BitWriter<'a, u32, CLKPLL_OUTPUT_EN_SPEC, bool, O>; +#[doc = "Field `clkpll_en_96m` reader - "] +pub type CLKPLL_EN_96M_R = crate::BitReader; +#[doc = "Field `clkpll_en_96m` writer - "] +pub type CLKPLL_EN_96M_W<'a, const O: u8> = + crate::BitWriter<'a, u32, CLKPLL_OUTPUT_EN_SPEC, bool, O>; +#[doc = "Field `clkpll_en_80m` reader - "] +pub type CLKPLL_EN_80M_R = crate::BitReader; +#[doc = "Field `clkpll_en_80m` writer - "] +pub type CLKPLL_EN_80M_W<'a, const O: u8> = + crate::BitWriter<'a, u32, CLKPLL_OUTPUT_EN_SPEC, bool, O>; +#[doc = "Field `clkpll_en_48m` reader - "] +pub type CLKPLL_EN_48M_R = crate::BitReader; +#[doc = "Field `clkpll_en_48m` writer - "] +pub type CLKPLL_EN_48M_W<'a, const O: u8> = + crate::BitWriter<'a, u32, CLKPLL_OUTPUT_EN_SPEC, bool, O>; +#[doc = "Field `clkpll_en_32m` reader - "] +pub type CLKPLL_EN_32M_R = crate::BitReader; +#[doc = "Field `clkpll_en_32m` writer - "] +pub type CLKPLL_EN_32M_W<'a, const O: u8> = + crate::BitWriter<'a, u32, CLKPLL_OUTPUT_EN_SPEC, bool, O>; +#[doc = "Field `clkpll_en_div2_480m` reader - "] +pub type CLKPLL_EN_DIV2_480M_R = crate::BitReader; +#[doc = "Field `clkpll_en_div2_480m` writer - "] +pub type CLKPLL_EN_DIV2_480M_W<'a, const O: u8> = + crate::BitWriter<'a, u32, CLKPLL_OUTPUT_EN_SPEC, bool, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn clkpll_en_480m(&self) -> CLKPLL_EN_480M_R { + CLKPLL_EN_480M_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bit 9"] + #[doc = "Bit 1"] #[inline(always)] - pub fn clkpll_en_div2_480m(&self) -> CLKPLL_EN_DIV2_480M_R { - CLKPLL_EN_DIV2_480M_R::new(((self.bits >> 9) & 0x01) != 0) + pub fn clkpll_en_240m(&self) -> CLKPLL_EN_240M_R { + CLKPLL_EN_240M_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 8"] + #[doc = "Bit 2"] #[inline(always)] - pub fn clkpll_en_32m(&self) -> CLKPLL_EN_32M_R { - CLKPLL_EN_32M_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn clkpll_en_192m(&self) -> CLKPLL_EN_192M_R { + CLKPLL_EN_192M_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 7"] + #[doc = "Bit 3"] #[inline(always)] - pub fn clkpll_en_48m(&self) -> CLKPLL_EN_48M_R { - CLKPLL_EN_48M_R::new(((self.bits >> 7) & 0x01) != 0) + pub fn clkpll_en_160m(&self) -> CLKPLL_EN_160M_R { + CLKPLL_EN_160M_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bit 6"] + #[doc = "Bit 4"] #[inline(always)] - pub fn clkpll_en_80m(&self) -> CLKPLL_EN_80M_R { - CLKPLL_EN_80M_R::new(((self.bits >> 6) & 0x01) != 0) + pub fn clkpll_en_120m(&self) -> CLKPLL_EN_120M_R { + CLKPLL_EN_120M_R::new(((self.bits >> 4) & 1) != 0) } #[doc = "Bit 5"] #[inline(always)] pub fn clkpll_en_96m(&self) -> CLKPLL_EN_96M_R { - CLKPLL_EN_96M_R::new(((self.bits >> 5) & 0x01) != 0) - } - #[doc = "Bit 4"] - #[inline(always)] - pub fn clkpll_en_120m(&self) -> CLKPLL_EN_120M_R { - CLKPLL_EN_120M_R::new(((self.bits >> 4) & 0x01) != 0) + CLKPLL_EN_96M_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 3"] + #[doc = "Bit 6"] #[inline(always)] - pub fn clkpll_en_160m(&self) -> CLKPLL_EN_160M_R { - CLKPLL_EN_160M_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn clkpll_en_80m(&self) -> CLKPLL_EN_80M_R { + CLKPLL_EN_80M_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bit 7"] #[inline(always)] - pub fn clkpll_en_192m(&self) -> CLKPLL_EN_192M_R { - CLKPLL_EN_192M_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn clkpll_en_48m(&self) -> CLKPLL_EN_48M_R { + CLKPLL_EN_48M_R::new(((self.bits >> 7) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 8"] #[inline(always)] - pub fn clkpll_en_240m(&self) -> CLKPLL_EN_240M_R { - CLKPLL_EN_240M_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn clkpll_en_32m(&self) -> CLKPLL_EN_32M_R { + CLKPLL_EN_32M_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 9"] #[inline(always)] - pub fn clkpll_en_480m(&self) -> CLKPLL_EN_480M_R { - CLKPLL_EN_480M_R::new((self.bits & 0x01) != 0) + pub fn clkpll_en_div2_480m(&self) -> CLKPLL_EN_DIV2_480M_R { + CLKPLL_EN_DIV2_480M_R::new(((self.bits >> 9) & 1) != 0) } } impl W { - #[doc = "Bit 9"] + #[doc = "Bit 0"] #[inline(always)] - pub fn clkpll_en_div2_480m(&mut self) -> CLKPLL_EN_DIV2_480M_W { - CLKPLL_EN_DIV2_480M_W { w: self } + #[must_use] + pub fn clkpll_en_480m(&mut self) -> CLKPLL_EN_480M_W<0> { + CLKPLL_EN_480M_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bit 1"] #[inline(always)] - pub fn clkpll_en_32m(&mut self) -> CLKPLL_EN_32M_W { - CLKPLL_EN_32M_W { w: self } + #[must_use] + pub fn clkpll_en_240m(&mut self) -> CLKPLL_EN_240M_W<1> { + CLKPLL_EN_240M_W::new(self) } - #[doc = "Bit 7"] + #[doc = "Bit 2"] #[inline(always)] - pub fn clkpll_en_48m(&mut self) -> CLKPLL_EN_48M_W { - CLKPLL_EN_48M_W { w: self } + #[must_use] + pub fn clkpll_en_192m(&mut self) -> CLKPLL_EN_192M_W<2> { + CLKPLL_EN_192M_W::new(self) } - #[doc = "Bit 6"] + #[doc = "Bit 3"] #[inline(always)] - pub fn clkpll_en_80m(&mut self) -> CLKPLL_EN_80M_W { - CLKPLL_EN_80M_W { w: self } + #[must_use] + pub fn clkpll_en_160m(&mut self) -> CLKPLL_EN_160M_W<3> { + CLKPLL_EN_160M_W::new(self) } - #[doc = "Bit 5"] + #[doc = "Bit 4"] #[inline(always)] - pub fn clkpll_en_96m(&mut self) -> CLKPLL_EN_96M_W { - CLKPLL_EN_96M_W { w: self } + #[must_use] + pub fn clkpll_en_120m(&mut self) -> CLKPLL_EN_120M_W<4> { + CLKPLL_EN_120M_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 5"] #[inline(always)] - pub fn clkpll_en_120m(&mut self) -> CLKPLL_EN_120M_W { - CLKPLL_EN_120M_W { w: self } + #[must_use] + pub fn clkpll_en_96m(&mut self) -> CLKPLL_EN_96M_W<5> { + CLKPLL_EN_96M_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bit 6"] #[inline(always)] - pub fn clkpll_en_160m(&mut self) -> CLKPLL_EN_160M_W { - CLKPLL_EN_160M_W { w: self } + #[must_use] + pub fn clkpll_en_80m(&mut self) -> CLKPLL_EN_80M_W<6> { + CLKPLL_EN_80M_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bit 7"] #[inline(always)] - pub fn clkpll_en_192m(&mut self) -> CLKPLL_EN_192M_W { - CLKPLL_EN_192M_W { w: self } + #[must_use] + pub fn clkpll_en_48m(&mut self) -> CLKPLL_EN_48M_W<7> { + CLKPLL_EN_48M_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 8"] #[inline(always)] - pub fn clkpll_en_240m(&mut self) -> CLKPLL_EN_240M_W { - CLKPLL_EN_240M_W { w: self } + #[must_use] + pub fn clkpll_en_32m(&mut self) -> CLKPLL_EN_32M_W<8> { + CLKPLL_EN_32M_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 9"] #[inline(always)] - pub fn clkpll_en_480m(&mut self) -> CLKPLL_EN_480M_W { - CLKPLL_EN_480M_W { w: self } + #[must_use] + pub fn clkpll_en_div2_480m(&mut self) -> CLKPLL_EN_DIV2_480M_W<9> { + CLKPLL_EN_DIV2_480M_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -513,11 +216,10 @@ impl crate::Readable for CLKPLL_OUTPUT_EN_SPEC { #[doc = "`write(|w| ..)` method takes [clkpll_output_en::W](W) writer structure"] impl crate::Writable for CLKPLL_OUTPUT_EN_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets clkpll_output_en to value 0x0100"] impl crate::Resettable for CLKPLL_OUTPUT_EN_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0100 - } + const RESET_VALUE: Self::Ux = 0x0100; } diff --git a/src/pds/clkpll_rz.rs b/src/pds/clkpll_rz.rs index 1edf777..a387a9d 100644 --- a/src/pds/clkpll_rz.rs +++ b/src/pds/clkpll_rz.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,251 +28,107 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `clkpll_rz` reader - "] -pub struct CLKPLL_RZ_R(crate::FieldReader); -impl CLKPLL_RZ_R { - pub(crate) fn new(bits: u8) -> Self { - CLKPLL_RZ_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_RZ_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_rz` writer - "] -pub struct CLKPLL_RZ_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_RZ_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 16)) | ((value as u32 & 0x07) << 16); - self.w - } -} -#[doc = "Field `clkpll_cz` reader - "] -pub struct CLKPLL_CZ_R(crate::FieldReader); -impl CLKPLL_CZ_R { - pub(crate) fn new(bits: u8) -> Self { - CLKPLL_CZ_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_CZ_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_cz` writer - "] -pub struct CLKPLL_CZ_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_CZ_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 14)) | ((value as u32 & 0x03) << 14); - self.w - } -} -#[doc = "Field `clkpll_c3` reader - "] -pub struct CLKPLL_C3_R(crate::FieldReader); -impl CLKPLL_C3_R { - pub(crate) fn new(bits: u8) -> Self { - CLKPLL_C3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_C3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_c3` writer - "] -pub struct CLKPLL_C3_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_C3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 12)) | ((value as u32 & 0x03) << 12); - self.w - } -} -#[doc = "Field `clkpll_r4_short` reader - "] -pub struct CLKPLL_R4_SHORT_R(crate::FieldReader); -impl CLKPLL_R4_SHORT_R { - pub(crate) fn new(bits: bool) -> Self { - CLKPLL_R4_SHORT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_R4_SHORT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_r4_short` writer - "] -pub struct CLKPLL_R4_SHORT_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_R4_SHORT_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `clkpll_r4` reader - "] -pub struct CLKPLL_R4_R(crate::FieldReader); -impl CLKPLL_R4_R { - pub(crate) fn new(bits: u8) -> Self { - CLKPLL_R4_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_R4_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_r4` writer - "] -pub struct CLKPLL_R4_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_R4_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 4)) | ((value as u32 & 0x03) << 4); - self.w - } -} #[doc = "Field `clkpll_c4_en` reader - "] -pub struct CLKPLL_C4_EN_R(crate::FieldReader); -impl CLKPLL_C4_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CLKPLL_C4_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_C4_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CLKPLL_C4_EN_R = crate::BitReader; #[doc = "Field `clkpll_c4_en` writer - "] -pub struct CLKPLL_C4_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_C4_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type CLKPLL_C4_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, CLKPLL_RZ_SPEC, bool, O>; +#[doc = "Field `clkpll_r4` reader - "] +pub type CLKPLL_R4_R = crate::FieldReader; +#[doc = "Field `clkpll_r4` writer - "] +pub type CLKPLL_R4_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CLKPLL_RZ_SPEC, u8, u8, 2, O>; +#[doc = "Field `clkpll_r4_short` reader - "] +pub type CLKPLL_R4_SHORT_R = crate::BitReader; +#[doc = "Field `clkpll_r4_short` writer - "] +pub type CLKPLL_R4_SHORT_W<'a, const O: u8> = crate::BitWriter<'a, u32, CLKPLL_RZ_SPEC, bool, O>; +#[doc = "Field `clkpll_c3` reader - "] +pub type CLKPLL_C3_R = crate::FieldReader; +#[doc = "Field `clkpll_c3` writer - "] +pub type CLKPLL_C3_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CLKPLL_RZ_SPEC, u8, u8, 2, O>; +#[doc = "Field `clkpll_cz` reader - "] +pub type CLKPLL_CZ_R = crate::FieldReader; +#[doc = "Field `clkpll_cz` writer - "] +pub type CLKPLL_CZ_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CLKPLL_RZ_SPEC, u8, u8, 2, O>; +#[doc = "Field `clkpll_rz` reader - "] +pub type CLKPLL_RZ_R = crate::FieldReader; +#[doc = "Field `clkpll_rz` writer - "] +pub type CLKPLL_RZ_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CLKPLL_RZ_SPEC, u8, u8, 3, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn clkpll_c4_en(&self) -> CLKPLL_C4_EN_R { + CLKPLL_C4_EN_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bits 16:18"] + #[doc = "Bits 4:5"] #[inline(always)] - pub fn clkpll_rz(&self) -> CLKPLL_RZ_R { - CLKPLL_RZ_R::new(((self.bits >> 16) & 0x07) as u8) + pub fn clkpll_r4(&self) -> CLKPLL_R4_R { + CLKPLL_R4_R::new(((self.bits >> 4) & 3) as u8) } - #[doc = "Bits 14:15"] + #[doc = "Bit 8"] #[inline(always)] - pub fn clkpll_cz(&self) -> CLKPLL_CZ_R { - CLKPLL_CZ_R::new(((self.bits >> 14) & 0x03) as u8) + pub fn clkpll_r4_short(&self) -> CLKPLL_R4_SHORT_R { + CLKPLL_R4_SHORT_R::new(((self.bits >> 8) & 1) != 0) } #[doc = "Bits 12:13"] #[inline(always)] pub fn clkpll_c3(&self) -> CLKPLL_C3_R { - CLKPLL_C3_R::new(((self.bits >> 12) & 0x03) as u8) + CLKPLL_C3_R::new(((self.bits >> 12) & 3) as u8) } - #[doc = "Bit 8"] - #[inline(always)] - pub fn clkpll_r4_short(&self) -> CLKPLL_R4_SHORT_R { - CLKPLL_R4_SHORT_R::new(((self.bits >> 8) & 0x01) != 0) - } - #[doc = "Bits 4:5"] + #[doc = "Bits 14:15"] #[inline(always)] - pub fn clkpll_r4(&self) -> CLKPLL_R4_R { - CLKPLL_R4_R::new(((self.bits >> 4) & 0x03) as u8) + pub fn clkpll_cz(&self) -> CLKPLL_CZ_R { + CLKPLL_CZ_R::new(((self.bits >> 14) & 3) as u8) } - #[doc = "Bit 0"] + #[doc = "Bits 16:18"] #[inline(always)] - pub fn clkpll_c4_en(&self) -> CLKPLL_C4_EN_R { - CLKPLL_C4_EN_R::new((self.bits & 0x01) != 0) + pub fn clkpll_rz(&self) -> CLKPLL_RZ_R { + CLKPLL_RZ_R::new(((self.bits >> 16) & 7) as u8) } } impl W { - #[doc = "Bits 16:18"] + #[doc = "Bit 0"] #[inline(always)] - pub fn clkpll_rz(&mut self) -> CLKPLL_RZ_W { - CLKPLL_RZ_W { w: self } + #[must_use] + pub fn clkpll_c4_en(&mut self) -> CLKPLL_C4_EN_W<0> { + CLKPLL_C4_EN_W::new(self) } - #[doc = "Bits 14:15"] + #[doc = "Bits 4:5"] #[inline(always)] - pub fn clkpll_cz(&mut self) -> CLKPLL_CZ_W { - CLKPLL_CZ_W { w: self } + #[must_use] + pub fn clkpll_r4(&mut self) -> CLKPLL_R4_W<4> { + CLKPLL_R4_W::new(self) } - #[doc = "Bits 12:13"] + #[doc = "Bit 8"] #[inline(always)] - pub fn clkpll_c3(&mut self) -> CLKPLL_C3_W { - CLKPLL_C3_W { w: self } + #[must_use] + pub fn clkpll_r4_short(&mut self) -> CLKPLL_R4_SHORT_W<8> { + CLKPLL_R4_SHORT_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn clkpll_r4_short(&mut self) -> CLKPLL_R4_SHORT_W { - CLKPLL_R4_SHORT_W { w: self } + #[must_use] + pub fn clkpll_c3(&mut self) -> CLKPLL_C3_W<12> { + CLKPLL_C3_W::new(self) } - #[doc = "Bits 4:5"] + #[doc = "Bits 14:15"] #[inline(always)] - pub fn clkpll_r4(&mut self) -> CLKPLL_R4_W { - CLKPLL_R4_W { w: self } + #[must_use] + pub fn clkpll_cz(&mut self) -> CLKPLL_CZ_W<14> { + CLKPLL_CZ_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bits 16:18"] #[inline(always)] - pub fn clkpll_c4_en(&mut self) -> CLKPLL_C4_EN_W { - CLKPLL_C4_EN_W { w: self } + #[must_use] + pub fn clkpll_rz(&mut self) -> CLKPLL_RZ_W<16> { + CLKPLL_RZ_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -289,11 +146,10 @@ impl crate::Readable for CLKPLL_RZ_SPEC { #[doc = "`write(|w| ..)` method takes [clkpll_rz::W](W) writer structure"] impl crate::Writable for CLKPLL_RZ_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets clkpll_rz to value 0x0005_a020"] impl crate::Resettable for CLKPLL_RZ_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0005_a020 - } + const RESET_VALUE: Self::Ux = 0x0005_a020; } diff --git a/src/pds/clkpll_sdm.rs b/src/pds/clkpll_sdm.rs index a38ab5f..a6a885d 100644 --- a/src/pds/clkpll_sdm.rs +++ b/src/pds/clkpll_sdm.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,179 +28,79 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `clkpll_sdm_bypass` reader - "] -pub struct CLKPLL_SDM_BYPASS_R(crate::FieldReader); -impl CLKPLL_SDM_BYPASS_R { - pub(crate) fn new(bits: bool) -> Self { - CLKPLL_SDM_BYPASS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_SDM_BYPASS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_sdm_bypass` writer - "] -pub struct CLKPLL_SDM_BYPASS_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_SDM_BYPASS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 29)) | ((value as u32 & 0x01) << 29); - self.w - } -} -#[doc = "Field `clkpll_sdm_flag` reader - "] -pub struct CLKPLL_SDM_FLAG_R(crate::FieldReader); -impl CLKPLL_SDM_FLAG_R { - pub(crate) fn new(bits: bool) -> Self { - CLKPLL_SDM_FLAG_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_SDM_FLAG_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_sdm_flag` writer - "] -pub struct CLKPLL_SDM_FLAG_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_SDM_FLAG_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 28)) | ((value as u32 & 0x01) << 28); - self.w - } -} -#[doc = "Field `clkpll_dither_sel` reader - "] -pub struct CLKPLL_DITHER_SEL_R(crate::FieldReader); -impl CLKPLL_DITHER_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - CLKPLL_DITHER_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_DITHER_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_dither_sel` writer - "] -pub struct CLKPLL_DITHER_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_DITHER_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 24)) | ((value as u32 & 0x03) << 24); - self.w - } -} #[doc = "Field `clkpll_sdmin` reader - "] -pub struct CLKPLL_SDMIN_R(crate::FieldReader); -impl CLKPLL_SDMIN_R { - pub(crate) fn new(bits: u32) -> Self { - CLKPLL_SDMIN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_SDMIN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CLKPLL_SDMIN_R = crate::FieldReader; #[doc = "Field `clkpll_sdmin` writer - "] -pub struct CLKPLL_SDMIN_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_SDMIN_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type CLKPLL_SDMIN_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, CLKPLL_SDM_SPEC, u32, u32, 24, O>; +#[doc = "Field `clkpll_dither_sel` reader - "] +pub type CLKPLL_DITHER_SEL_R = crate::FieldReader; +#[doc = "Field `clkpll_dither_sel` writer - "] +pub type CLKPLL_DITHER_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, CLKPLL_SDM_SPEC, u8, u8, 2, O>; +#[doc = "Field `clkpll_sdm_flag` reader - "] +pub type CLKPLL_SDM_FLAG_R = crate::BitReader; +#[doc = "Field `clkpll_sdm_flag` writer - "] +pub type CLKPLL_SDM_FLAG_W<'a, const O: u8> = crate::BitWriter<'a, u32, CLKPLL_SDM_SPEC, bool, O>; +#[doc = "Field `clkpll_sdm_bypass` reader - "] +pub type CLKPLL_SDM_BYPASS_R = crate::BitReader; +#[doc = "Field `clkpll_sdm_bypass` writer - "] +pub type CLKPLL_SDM_BYPASS_W<'a, const O: u8> = crate::BitWriter<'a, u32, CLKPLL_SDM_SPEC, bool, O>; +impl R { + #[doc = "Bits 0:23"] #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0x00ff_ffff) | (value as u32 & 0x00ff_ffff); - self.w + pub fn clkpll_sdmin(&self) -> CLKPLL_SDMIN_R { + CLKPLL_SDMIN_R::new(self.bits & 0x00ff_ffff) } -} -impl R { - #[doc = "Bit 29"] + #[doc = "Bits 24:25"] #[inline(always)] - pub fn clkpll_sdm_bypass(&self) -> CLKPLL_SDM_BYPASS_R { - CLKPLL_SDM_BYPASS_R::new(((self.bits >> 29) & 0x01) != 0) + pub fn clkpll_dither_sel(&self) -> CLKPLL_DITHER_SEL_R { + CLKPLL_DITHER_SEL_R::new(((self.bits >> 24) & 3) as u8) } #[doc = "Bit 28"] #[inline(always)] pub fn clkpll_sdm_flag(&self) -> CLKPLL_SDM_FLAG_R { - CLKPLL_SDM_FLAG_R::new(((self.bits >> 28) & 0x01) != 0) + CLKPLL_SDM_FLAG_R::new(((self.bits >> 28) & 1) != 0) } - #[doc = "Bits 24:25"] - #[inline(always)] - pub fn clkpll_dither_sel(&self) -> CLKPLL_DITHER_SEL_R { - CLKPLL_DITHER_SEL_R::new(((self.bits >> 24) & 0x03) as u8) - } - #[doc = "Bits 0:23"] + #[doc = "Bit 29"] #[inline(always)] - pub fn clkpll_sdmin(&self) -> CLKPLL_SDMIN_R { - CLKPLL_SDMIN_R::new((self.bits & 0x00ff_ffff) as u32) + pub fn clkpll_sdm_bypass(&self) -> CLKPLL_SDM_BYPASS_R { + CLKPLL_SDM_BYPASS_R::new(((self.bits >> 29) & 1) != 0) } } impl W { - #[doc = "Bit 29"] + #[doc = "Bits 0:23"] #[inline(always)] - pub fn clkpll_sdm_bypass(&mut self) -> CLKPLL_SDM_BYPASS_W { - CLKPLL_SDM_BYPASS_W { w: self } + #[must_use] + pub fn clkpll_sdmin(&mut self) -> CLKPLL_SDMIN_W<0> { + CLKPLL_SDMIN_W::new(self) } - #[doc = "Bit 28"] + #[doc = "Bits 24:25"] #[inline(always)] - pub fn clkpll_sdm_flag(&mut self) -> CLKPLL_SDM_FLAG_W { - CLKPLL_SDM_FLAG_W { w: self } + #[must_use] + pub fn clkpll_dither_sel(&mut self) -> CLKPLL_DITHER_SEL_W<24> { + CLKPLL_DITHER_SEL_W::new(self) } - #[doc = "Bits 24:25"] + #[doc = "Bit 28"] #[inline(always)] - pub fn clkpll_dither_sel(&mut self) -> CLKPLL_DITHER_SEL_W { - CLKPLL_DITHER_SEL_W { w: self } + #[must_use] + pub fn clkpll_sdm_flag(&mut self) -> CLKPLL_SDM_FLAG_W<28> { + CLKPLL_SDM_FLAG_W::new(self) } - #[doc = "Bits 0:23"] + #[doc = "Bit 29"] #[inline(always)] - pub fn clkpll_sdmin(&mut self) -> CLKPLL_SDMIN_W { - CLKPLL_SDMIN_W { w: self } + #[must_use] + pub fn clkpll_sdm_bypass(&mut self) -> CLKPLL_SDM_BYPASS_W<29> { + CLKPLL_SDM_BYPASS_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -217,11 +118,10 @@ impl crate::Readable for CLKPLL_SDM_SPEC { #[doc = "`write(|w| ..)` method takes [clkpll_sdm::W](W) writer structure"] impl crate::Writable for CLKPLL_SDM_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets clkpll_sdm to value 0x1060_0000"] impl crate::Resettable for CLKPLL_SDM_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x1060_0000 - } + const RESET_VALUE: Self::Ux = 0x1060_0000; } diff --git a/src/pds/clkpll_top_ctrl.rs b/src/pds/clkpll_top_ctrl.rs index c6ffb13..fe56236 100644 --- a/src/pds/clkpll_top_ctrl.rs +++ b/src/pds/clkpll_top_ctrl.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,251 +28,113 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `clkpll_vg13_sel` reader - "] -pub struct CLKPLL_VG13_SEL_R(crate::FieldReader); -impl CLKPLL_VG13_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - CLKPLL_VG13_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_VG13_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_vg13_sel` writer - "] -pub struct CLKPLL_VG13_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_VG13_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 24)) | ((value as u32 & 0x03) << 24); - self.w - } -} -#[doc = "Field `clkpll_vg11_sel` reader - "] -pub struct CLKPLL_VG11_SEL_R(crate::FieldReader); -impl CLKPLL_VG11_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - CLKPLL_VG11_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_VG11_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_vg11_sel` writer - "] -pub struct CLKPLL_VG11_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_VG11_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 20)) | ((value as u32 & 0x03) << 20); - self.w - } -} -#[doc = "Field `clkpll_refclk_sel` reader - "] -pub struct CLKPLL_REFCLK_SEL_R(crate::FieldReader); -impl CLKPLL_REFCLK_SEL_R { - pub(crate) fn new(bits: bool) -> Self { - CLKPLL_REFCLK_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_REFCLK_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_refclk_sel` writer - "] -pub struct CLKPLL_REFCLK_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_REFCLK_SEL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `clkpll_xtal_rc32m_sel` reader - "] -pub struct CLKPLL_XTAL_RC32M_SEL_R(crate::FieldReader); -impl CLKPLL_XTAL_RC32M_SEL_R { - pub(crate) fn new(bits: bool) -> Self { - CLKPLL_XTAL_RC32M_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_XTAL_RC32M_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_xtal_rc32m_sel` writer - "] -pub struct CLKPLL_XTAL_RC32M_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_XTAL_RC32M_SEL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} -#[doc = "Field `clkpll_refdiv_ratio` reader - "] -pub struct CLKPLL_REFDIV_RATIO_R(crate::FieldReader); -impl CLKPLL_REFDIV_RATIO_R { - pub(crate) fn new(bits: u8) -> Self { - CLKPLL_REFDIV_RATIO_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_REFDIV_RATIO_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_refdiv_ratio` writer - "] -pub struct CLKPLL_REFDIV_RATIO_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_REFDIV_RATIO_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 8)) | ((value as u32 & 0x0f) << 8); - self.w - } -} #[doc = "Field `clkpll_postdiv` reader - "] -pub struct CLKPLL_POSTDIV_R(crate::FieldReader); -impl CLKPLL_POSTDIV_R { - pub(crate) fn new(bits: u8) -> Self { - CLKPLL_POSTDIV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_POSTDIV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CLKPLL_POSTDIV_R = crate::FieldReader; #[doc = "Field `clkpll_postdiv` writer - "] -pub struct CLKPLL_POSTDIV_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_POSTDIV_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type CLKPLL_POSTDIV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, CLKPLL_TOP_CTRL_SPEC, u8, u8, 7, O>; +#[doc = "Field `clkpll_refdiv_ratio` reader - "] +pub type CLKPLL_REFDIV_RATIO_R = crate::FieldReader; +#[doc = "Field `clkpll_refdiv_ratio` writer - "] +pub type CLKPLL_REFDIV_RATIO_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, CLKPLL_TOP_CTRL_SPEC, u8, u8, 4, O>; +#[doc = "Field `clkpll_xtal_rc32m_sel` reader - "] +pub type CLKPLL_XTAL_RC32M_SEL_R = crate::BitReader; +#[doc = "Field `clkpll_xtal_rc32m_sel` writer - "] +pub type CLKPLL_XTAL_RC32M_SEL_W<'a, const O: u8> = + crate::BitWriter<'a, u32, CLKPLL_TOP_CTRL_SPEC, bool, O>; +#[doc = "Field `clkpll_refclk_sel` reader - "] +pub type CLKPLL_REFCLK_SEL_R = crate::BitReader; +#[doc = "Field `clkpll_refclk_sel` writer - "] +pub type CLKPLL_REFCLK_SEL_W<'a, const O: u8> = + crate::BitWriter<'a, u32, CLKPLL_TOP_CTRL_SPEC, bool, O>; +#[doc = "Field `clkpll_vg11_sel` reader - "] +pub type CLKPLL_VG11_SEL_R = crate::FieldReader; +#[doc = "Field `clkpll_vg11_sel` writer - "] +pub type CLKPLL_VG11_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, CLKPLL_TOP_CTRL_SPEC, u8, u8, 2, O>; +#[doc = "Field `clkpll_vg13_sel` reader - "] +pub type CLKPLL_VG13_SEL_R = crate::FieldReader; +#[doc = "Field `clkpll_vg13_sel` writer - "] +pub type CLKPLL_VG13_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, CLKPLL_TOP_CTRL_SPEC, u8, u8, 2, O>; +impl R { + #[doc = "Bits 0:6"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x7f) | (value as u32 & 0x7f); - self.w + pub fn clkpll_postdiv(&self) -> CLKPLL_POSTDIV_R { + CLKPLL_POSTDIV_R::new((self.bits & 0x7f) as u8) } -} -impl R { - #[doc = "Bits 24:25"] + #[doc = "Bits 8:11"] #[inline(always)] - pub fn clkpll_vg13_sel(&self) -> CLKPLL_VG13_SEL_R { - CLKPLL_VG13_SEL_R::new(((self.bits >> 24) & 0x03) as u8) + pub fn clkpll_refdiv_ratio(&self) -> CLKPLL_REFDIV_RATIO_R { + CLKPLL_REFDIV_RATIO_R::new(((self.bits >> 8) & 0x0f) as u8) } - #[doc = "Bits 20:21"] + #[doc = "Bit 12"] #[inline(always)] - pub fn clkpll_vg11_sel(&self) -> CLKPLL_VG11_SEL_R { - CLKPLL_VG11_SEL_R::new(((self.bits >> 20) & 0x03) as u8) + pub fn clkpll_xtal_rc32m_sel(&self) -> CLKPLL_XTAL_RC32M_SEL_R { + CLKPLL_XTAL_RC32M_SEL_R::new(((self.bits >> 12) & 1) != 0) } #[doc = "Bit 16"] #[inline(always)] pub fn clkpll_refclk_sel(&self) -> CLKPLL_REFCLK_SEL_R { - CLKPLL_REFCLK_SEL_R::new(((self.bits >> 16) & 0x01) != 0) - } - #[doc = "Bit 12"] - #[inline(always)] - pub fn clkpll_xtal_rc32m_sel(&self) -> CLKPLL_XTAL_RC32M_SEL_R { - CLKPLL_XTAL_RC32M_SEL_R::new(((self.bits >> 12) & 0x01) != 0) + CLKPLL_REFCLK_SEL_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bits 8:11"] + #[doc = "Bits 20:21"] #[inline(always)] - pub fn clkpll_refdiv_ratio(&self) -> CLKPLL_REFDIV_RATIO_R { - CLKPLL_REFDIV_RATIO_R::new(((self.bits >> 8) & 0x0f) as u8) + pub fn clkpll_vg11_sel(&self) -> CLKPLL_VG11_SEL_R { + CLKPLL_VG11_SEL_R::new(((self.bits >> 20) & 3) as u8) } - #[doc = "Bits 0:6"] + #[doc = "Bits 24:25"] #[inline(always)] - pub fn clkpll_postdiv(&self) -> CLKPLL_POSTDIV_R { - CLKPLL_POSTDIV_R::new((self.bits & 0x7f) as u8) + pub fn clkpll_vg13_sel(&self) -> CLKPLL_VG13_SEL_R { + CLKPLL_VG13_SEL_R::new(((self.bits >> 24) & 3) as u8) } } impl W { - #[doc = "Bits 24:25"] + #[doc = "Bits 0:6"] #[inline(always)] - pub fn clkpll_vg13_sel(&mut self) -> CLKPLL_VG13_SEL_W { - CLKPLL_VG13_SEL_W { w: self } + #[must_use] + pub fn clkpll_postdiv(&mut self) -> CLKPLL_POSTDIV_W<0> { + CLKPLL_POSTDIV_W::new(self) } - #[doc = "Bits 20:21"] + #[doc = "Bits 8:11"] #[inline(always)] - pub fn clkpll_vg11_sel(&mut self) -> CLKPLL_VG11_SEL_W { - CLKPLL_VG11_SEL_W { w: self } + #[must_use] + pub fn clkpll_refdiv_ratio(&mut self) -> CLKPLL_REFDIV_RATIO_W<8> { + CLKPLL_REFDIV_RATIO_W::new(self) } - #[doc = "Bit 16"] + #[doc = "Bit 12"] #[inline(always)] - pub fn clkpll_refclk_sel(&mut self) -> CLKPLL_REFCLK_SEL_W { - CLKPLL_REFCLK_SEL_W { w: self } + #[must_use] + pub fn clkpll_xtal_rc32m_sel(&mut self) -> CLKPLL_XTAL_RC32M_SEL_W<12> { + CLKPLL_XTAL_RC32M_SEL_W::new(self) } - #[doc = "Bit 12"] + #[doc = "Bit 16"] #[inline(always)] - pub fn clkpll_xtal_rc32m_sel(&mut self) -> CLKPLL_XTAL_RC32M_SEL_W { - CLKPLL_XTAL_RC32M_SEL_W { w: self } + #[must_use] + pub fn clkpll_refclk_sel(&mut self) -> CLKPLL_REFCLK_SEL_W<16> { + CLKPLL_REFCLK_SEL_W::new(self) } - #[doc = "Bits 8:11"] + #[doc = "Bits 20:21"] #[inline(always)] - pub fn clkpll_refdiv_ratio(&mut self) -> CLKPLL_REFDIV_RATIO_W { - CLKPLL_REFDIV_RATIO_W { w: self } + #[must_use] + pub fn clkpll_vg11_sel(&mut self) -> CLKPLL_VG11_SEL_W<20> { + CLKPLL_VG11_SEL_W::new(self) } - #[doc = "Bits 0:6"] + #[doc = "Bits 24:25"] #[inline(always)] - pub fn clkpll_postdiv(&mut self) -> CLKPLL_POSTDIV_W { - CLKPLL_POSTDIV_W { w: self } + #[must_use] + pub fn clkpll_vg13_sel(&mut self) -> CLKPLL_VG13_SEL_W<24> { + CLKPLL_VG13_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -289,11 +152,10 @@ impl crate::Readable for CLKPLL_TOP_CTRL_SPEC { #[doc = "`write(|w| ..)` method takes [clkpll_top_ctrl::W](W) writer structure"] impl crate::Writable for CLKPLL_TOP_CTRL_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets clkpll_top_ctrl to value 0x0110_0414"] impl crate::Resettable for CLKPLL_TOP_CTRL_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0110_0414 - } + const RESET_VALUE: Self::Ux = 0x0110_0414; } diff --git a/src/pds/clkpll_vco.rs b/src/pds/clkpll_vco.rs index 20ebe8e..23b7760 100644 --- a/src/pds/clkpll_vco.rs +++ b/src/pds/clkpll_vco.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,97 +28,48 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `clkpll_shrtr` reader - "] -pub struct CLKPLL_SHRTR_R(crate::FieldReader); -impl CLKPLL_SHRTR_R { - pub(crate) fn new(bits: bool) -> Self { - CLKPLL_SHRTR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_SHRTR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_shrtr` writer - "] -pub struct CLKPLL_SHRTR_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_SHRTR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} #[doc = "Field `clkpll_vco_speed` reader - "] -pub struct CLKPLL_VCO_SPEED_R(crate::FieldReader); -impl CLKPLL_VCO_SPEED_R { - pub(crate) fn new(bits: u8) -> Self { - CLKPLL_VCO_SPEED_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_VCO_SPEED_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CLKPLL_VCO_SPEED_R = crate::FieldReader; #[doc = "Field `clkpll_vco_speed` writer - "] -pub struct CLKPLL_VCO_SPEED_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_VCO_SPEED_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type CLKPLL_VCO_SPEED_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, CLKPLL_VCO_SPEC, u8, u8, 3, O>; +#[doc = "Field `clkpll_shrtr` reader - "] +pub type CLKPLL_SHRTR_R = crate::BitReader; +#[doc = "Field `clkpll_shrtr` writer - "] +pub type CLKPLL_SHRTR_W<'a, const O: u8> = crate::BitWriter<'a, u32, CLKPLL_VCO_SPEC, bool, O>; +impl R { + #[doc = "Bits 0:2"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x07) | (value as u32 & 0x07); - self.w + pub fn clkpll_vco_speed(&self) -> CLKPLL_VCO_SPEED_R { + CLKPLL_VCO_SPEED_R::new((self.bits & 7) as u8) } -} -impl R { #[doc = "Bit 3"] #[inline(always)] pub fn clkpll_shrtr(&self) -> CLKPLL_SHRTR_R { - CLKPLL_SHRTR_R::new(((self.bits >> 3) & 0x01) != 0) - } - #[doc = "Bits 0:2"] - #[inline(always)] - pub fn clkpll_vco_speed(&self) -> CLKPLL_VCO_SPEED_R { - CLKPLL_VCO_SPEED_R::new((self.bits & 0x07) as u8) + CLKPLL_SHRTR_R::new(((self.bits >> 3) & 1) != 0) } } impl W { - #[doc = "Bit 3"] + #[doc = "Bits 0:2"] #[inline(always)] - pub fn clkpll_shrtr(&mut self) -> CLKPLL_SHRTR_W { - CLKPLL_SHRTR_W { w: self } + #[must_use] + pub fn clkpll_vco_speed(&mut self) -> CLKPLL_VCO_SPEED_W<0> { + CLKPLL_VCO_SPEED_W::new(self) } - #[doc = "Bits 0:2"] + #[doc = "Bit 3"] #[inline(always)] - pub fn clkpll_vco_speed(&mut self) -> CLKPLL_VCO_SPEED_W { - CLKPLL_VCO_SPEED_W { w: self } + #[must_use] + pub fn clkpll_shrtr(&mut self) -> CLKPLL_SHRTR_W<3> { + CLKPLL_SHRTR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -135,11 +87,10 @@ impl crate::Readable for CLKPLL_VCO_SPEC { #[doc = "`write(|w| ..)` method takes [clkpll_vco::W](W) writer structure"] impl crate::Writable for CLKPLL_VCO_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets clkpll_vco to value 0x07"] impl crate::Resettable for CLKPLL_VCO_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x07 - } + const RESET_VALUE: Self::Ux = 0x07; } diff --git a/src/pds/pds_ctl.rs b/src/pds/pds_ctl.rs index 6c10ca0..d9d248f 100644 --- a/src/pds/pds_ctl.rs +++ b/src/pds/pds_ctl.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,951 +28,337 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `cr_pds_ctrl_pll` reader - "] -pub struct CR_PDS_CTRL_PLL_R(crate::FieldReader); -impl CR_PDS_CTRL_PLL_R { - pub(crate) fn new(bits: u8) -> Self { - CR_PDS_CTRL_PLL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_CTRL_PLL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_ctrl_pll` writer - "] -pub struct CR_PDS_CTRL_PLL_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_CTRL_PLL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 30)) | ((value as u32 & 0x03) << 30); - self.w - } -} -#[doc = "Field `cr_pds_ctrl_rf` reader - "] -pub struct CR_PDS_CTRL_RF_R(crate::FieldReader); -impl CR_PDS_CTRL_RF_R { - pub(crate) fn new(bits: u8) -> Self { - CR_PDS_CTRL_RF_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_CTRL_RF_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_ctrl_rf` writer - "] -pub struct CR_PDS_CTRL_RF_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_CTRL_RF_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 28)) | ((value as u32 & 0x03) << 28); - self.w - } -} -#[doc = "Field `cr_pds_ldo_vol` reader - "] -pub struct CR_PDS_LDO_VOL_R(crate::FieldReader); -impl CR_PDS_LDO_VOL_R { - pub(crate) fn new(bits: u8) -> Self { - CR_PDS_LDO_VOL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_LDO_VOL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_ldo_vol` writer - "] -pub struct CR_PDS_LDO_VOL_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_LDO_VOL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 24)) | ((value as u32 & 0x0f) << 24); - self.w - } -} -#[doc = "Field `cr_pds_pd_ldo11` reader - "] -pub struct CR_PDS_PD_LDO11_R(crate::FieldReader); -impl CR_PDS_PD_LDO11_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_PD_LDO11_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_PD_LDO11_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_pd_ldo11` writer - "] -pub struct CR_PDS_PD_LDO11_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_PD_LDO11_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 22)) | ((value as u32 & 0x01) << 22); - self.w - } -} -#[doc = "Field `cr_np_wfi_mask` reader - "] -pub struct CR_NP_WFI_MASK_R(crate::FieldReader); -impl CR_NP_WFI_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - CR_NP_WFI_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_NP_WFI_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_np_wfi_mask` writer - "] -pub struct CR_NP_WFI_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> CR_NP_WFI_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); - self.w - } -} -#[doc = "Field `cr_pds_ldo_vsel_en` reader - "] -pub struct CR_PDS_LDO_VSEL_EN_R(crate::FieldReader); -impl CR_PDS_LDO_VSEL_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_LDO_VSEL_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_LDO_VSEL_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_ldo_vsel_en` writer - "] -pub struct CR_PDS_LDO_VSEL_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_LDO_VSEL_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18); - self.w - } -} -#[doc = "Field `cr_pds_rc32m_off_dis` reader - "] -pub struct CR_PDS_RC32M_OFF_DIS_R(crate::FieldReader); -impl CR_PDS_RC32M_OFF_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_RC32M_OFF_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_RC32M_OFF_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_rc32m_off_dis` writer - "] -pub struct CR_PDS_RC32M_OFF_DIS_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_RC32M_OFF_DIS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w - } -} -#[doc = "Field `cr_pds_rst_soc_en` reader - "] -pub struct CR_PDS_RST_SOC_EN_R(crate::FieldReader); -impl CR_PDS_RST_SOC_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_RST_SOC_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_RST_SOC_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_rst_soc_en` writer - "] -pub struct CR_PDS_RST_SOC_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_RST_SOC_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `cr_pds_soc_enb_force_on` reader - "] -pub struct CR_PDS_SOC_ENB_FORCE_ON_R(crate::FieldReader); -impl CR_PDS_SOC_ENB_FORCE_ON_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_SOC_ENB_FORCE_ON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_SOC_ENB_FORCE_ON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_soc_enb_force_on` writer - "] -pub struct CR_PDS_SOC_ENB_FORCE_ON_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_SOC_ENB_FORCE_ON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15); - self.w - } -} -#[doc = "Field `cr_pds_pd_xtal` reader - "] -pub struct CR_PDS_PD_XTAL_R(crate::FieldReader); -impl CR_PDS_PD_XTAL_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_PD_XTAL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_PD_XTAL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_pd_xtal` writer - "] -pub struct CR_PDS_PD_XTAL_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_PD_XTAL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14); - self.w - } -} -#[doc = "Field `cr_pds_pwr_off` reader - "] -pub struct CR_PDS_PWR_OFF_R(crate::FieldReader); -impl CR_PDS_PWR_OFF_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_PWR_OFF_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_PWR_OFF_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_pwr_off` writer - "] -pub struct CR_PDS_PWR_OFF_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_PWR_OFF_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13); - self.w - } -} -#[doc = "Field `cr_pds_wait_xtal_rdy` reader - "] -pub struct CR_PDS_WAIT_XTAL_RDY_R(crate::FieldReader); -impl CR_PDS_WAIT_XTAL_RDY_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_WAIT_XTAL_RDY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_WAIT_XTAL_RDY_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_wait_xtal_rdy` writer - "] -pub struct CR_PDS_WAIT_XTAL_RDY_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_WAIT_XTAL_RDY_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} -#[doc = "Field `cr_pds_iso_en` reader - "] -pub struct CR_PDS_ISO_EN_R(crate::FieldReader); -impl CR_PDS_ISO_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_ISO_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_ISO_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_iso_en` writer - "] -pub struct CR_PDS_ISO_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_ISO_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w - } -} -#[doc = "Field `cr_pds_mem_stby` reader - "] -pub struct CR_PDS_MEM_STBY_R(crate::FieldReader); -impl CR_PDS_MEM_STBY_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_MEM_STBY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_MEM_STBY_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_mem_stby` writer - "] -pub struct CR_PDS_MEM_STBY_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_MEM_STBY_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w - } -} -#[doc = "Field `cr_pds_gate_clk` reader - "] -pub struct CR_PDS_GATE_CLK_R(crate::FieldReader); -impl CR_PDS_GATE_CLK_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_GATE_CLK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_GATE_CLK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_gate_clk` writer - "] -pub struct CR_PDS_GATE_CLK_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_GATE_CLK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `cr_pds_pd_bg_sys` reader - "] -pub struct CR_PDS_PD_BG_SYS_R(crate::FieldReader); -impl CR_PDS_PD_BG_SYS_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_PD_BG_SYS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_PD_BG_SYS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_pd_bg_sys` writer - "] -pub struct CR_PDS_PD_BG_SYS_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_PD_BG_SYS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w - } -} -#[doc = "Field `cr_pds_pd_dcdc18` reader - "] -pub struct CR_PDS_PD_DCDC18_R(crate::FieldReader); -impl CR_PDS_PD_DCDC18_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_PD_DCDC18_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_PD_DCDC18_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_pd_dcdc18` writer - "] -pub struct CR_PDS_PD_DCDC18_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_PD_DCDC18_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} -#[doc = "Field `cr_wifi_pds_save_state` reader - "] -pub struct CR_WIFI_PDS_SAVE_STATE_R(crate::FieldReader); -impl CR_WIFI_PDS_SAVE_STATE_R { - pub(crate) fn new(bits: bool) -> Self { - CR_WIFI_PDS_SAVE_STATE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_WIFI_PDS_SAVE_STATE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_wifi_pds_save_state` writer - "] -pub struct CR_WIFI_PDS_SAVE_STATE_W<'a> { - w: &'a mut W, -} -impl<'a> CR_WIFI_PDS_SAVE_STATE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `cr_xtal_force_off` reader - "] -pub struct CR_XTAL_FORCE_OFF_R(crate::FieldReader); -impl CR_XTAL_FORCE_OFF_R { - pub(crate) fn new(bits: bool) -> Self { - CR_XTAL_FORCE_OFF_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_XTAL_FORCE_OFF_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_xtal_force_off` writer - "] -pub struct CR_XTAL_FORCE_OFF_W<'a> { - w: &'a mut W, -} -impl<'a> CR_XTAL_FORCE_OFF_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `cr_sleep_forever` reader - "] -pub struct CR_SLEEP_FOREVER_R(crate::FieldReader); -impl CR_SLEEP_FOREVER_R { - pub(crate) fn new(bits: bool) -> Self { - CR_SLEEP_FOREVER_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_SLEEP_FOREVER_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_sleep_forever` writer - "] -pub struct CR_SLEEP_FOREVER_W<'a> { - w: &'a mut W, -} -impl<'a> CR_SLEEP_FOREVER_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `pds_start_ps` reader - "] -pub struct PDS_START_PS_R(crate::FieldReader); -impl PDS_START_PS_R { - pub(crate) fn new(bits: bool) -> Self { - PDS_START_PS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PDS_START_PS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PDS_START_PS_R = crate::BitReader; #[doc = "Field `pds_start_ps` writer - "] -pub struct PDS_START_PS_W<'a> { - w: &'a mut W, -} -impl<'a> PDS_START_PS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type PDS_START_PS_W<'a, const O: u8> = crate::BitWriter<'a, u32, PDS_CTL_SPEC, bool, O>; +#[doc = "Field `cr_sleep_forever` reader - "] +pub type CR_SLEEP_FOREVER_R = crate::BitReader; +#[doc = "Field `cr_sleep_forever` writer - "] +pub type CR_SLEEP_FOREVER_W<'a, const O: u8> = crate::BitWriter<'a, u32, PDS_CTL_SPEC, bool, O>; +#[doc = "Field `cr_xtal_force_off` reader - "] +pub type CR_XTAL_FORCE_OFF_R = crate::BitReader; +#[doc = "Field `cr_xtal_force_off` writer - "] +pub type CR_XTAL_FORCE_OFF_W<'a, const O: u8> = crate::BitWriter<'a, u32, PDS_CTL_SPEC, bool, O>; +#[doc = "Field `cr_wifi_pds_save_state` reader - "] +pub type CR_WIFI_PDS_SAVE_STATE_R = crate::BitReader; +#[doc = "Field `cr_wifi_pds_save_state` writer - "] +pub type CR_WIFI_PDS_SAVE_STATE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, PDS_CTL_SPEC, bool, O>; +#[doc = "Field `cr_pds_pd_dcdc18` reader - "] +pub type CR_PDS_PD_DCDC18_R = crate::BitReader; +#[doc = "Field `cr_pds_pd_dcdc18` writer - "] +pub type CR_PDS_PD_DCDC18_W<'a, const O: u8> = crate::BitWriter<'a, u32, PDS_CTL_SPEC, bool, O>; +#[doc = "Field `cr_pds_pd_bg_sys` reader - "] +pub type CR_PDS_PD_BG_SYS_R = crate::BitReader; +#[doc = "Field `cr_pds_pd_bg_sys` writer - "] +pub type CR_PDS_PD_BG_SYS_W<'a, const O: u8> = crate::BitWriter<'a, u32, PDS_CTL_SPEC, bool, O>; +#[doc = "Field `cr_pds_gate_clk` reader - "] +pub type CR_PDS_GATE_CLK_R = crate::BitReader; +#[doc = "Field `cr_pds_gate_clk` writer - "] +pub type CR_PDS_GATE_CLK_W<'a, const O: u8> = crate::BitWriter<'a, u32, PDS_CTL_SPEC, bool, O>; +#[doc = "Field `cr_pds_mem_stby` reader - "] +pub type CR_PDS_MEM_STBY_R = crate::BitReader; +#[doc = "Field `cr_pds_mem_stby` writer - "] +pub type CR_PDS_MEM_STBY_W<'a, const O: u8> = crate::BitWriter<'a, u32, PDS_CTL_SPEC, bool, O>; +#[doc = "Field `cr_pds_iso_en` reader - "] +pub type CR_PDS_ISO_EN_R = crate::BitReader; +#[doc = "Field `cr_pds_iso_en` writer - "] +pub type CR_PDS_ISO_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PDS_CTL_SPEC, bool, O>; +#[doc = "Field `cr_pds_wait_xtal_rdy` reader - "] +pub type CR_PDS_WAIT_XTAL_RDY_R = crate::BitReader; +#[doc = "Field `cr_pds_wait_xtal_rdy` writer - "] +pub type CR_PDS_WAIT_XTAL_RDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, PDS_CTL_SPEC, bool, O>; +#[doc = "Field `cr_pds_pwr_off` reader - "] +pub type CR_PDS_PWR_OFF_R = crate::BitReader; +#[doc = "Field `cr_pds_pwr_off` writer - "] +pub type CR_PDS_PWR_OFF_W<'a, const O: u8> = crate::BitWriter<'a, u32, PDS_CTL_SPEC, bool, O>; +#[doc = "Field `cr_pds_pd_xtal` reader - "] +pub type CR_PDS_PD_XTAL_R = crate::BitReader; +#[doc = "Field `cr_pds_pd_xtal` writer - "] +pub type CR_PDS_PD_XTAL_W<'a, const O: u8> = crate::BitWriter<'a, u32, PDS_CTL_SPEC, bool, O>; +#[doc = "Field `cr_pds_soc_enb_force_on` reader - "] +pub type CR_PDS_SOC_ENB_FORCE_ON_R = crate::BitReader; +#[doc = "Field `cr_pds_soc_enb_force_on` writer - "] +pub type CR_PDS_SOC_ENB_FORCE_ON_W<'a, const O: u8> = + crate::BitWriter<'a, u32, PDS_CTL_SPEC, bool, O>; +#[doc = "Field `cr_pds_rst_soc_en` reader - "] +pub type CR_PDS_RST_SOC_EN_R = crate::BitReader; +#[doc = "Field `cr_pds_rst_soc_en` writer - "] +pub type CR_PDS_RST_SOC_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PDS_CTL_SPEC, bool, O>; +#[doc = "Field `cr_pds_rc32m_off_dis` reader - "] +pub type CR_PDS_RC32M_OFF_DIS_R = crate::BitReader; +#[doc = "Field `cr_pds_rc32m_off_dis` writer - "] +pub type CR_PDS_RC32M_OFF_DIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, PDS_CTL_SPEC, bool, O>; +#[doc = "Field `cr_pds_ldo_vsel_en` reader - "] +pub type CR_PDS_LDO_VSEL_EN_R = crate::BitReader; +#[doc = "Field `cr_pds_ldo_vsel_en` writer - "] +pub type CR_PDS_LDO_VSEL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PDS_CTL_SPEC, bool, O>; +#[doc = "Field `cr_np_wfi_mask` reader - "] +pub type CR_NP_WFI_MASK_R = crate::BitReader; +#[doc = "Field `cr_np_wfi_mask` writer - "] +pub type CR_NP_WFI_MASK_W<'a, const O: u8> = crate::BitWriter<'a, u32, PDS_CTL_SPEC, bool, O>; +#[doc = "Field `cr_pds_pd_ldo11` reader - "] +pub type CR_PDS_PD_LDO11_R = crate::BitReader; +#[doc = "Field `cr_pds_pd_ldo11` writer - "] +pub type CR_PDS_PD_LDO11_W<'a, const O: u8> = crate::BitWriter<'a, u32, PDS_CTL_SPEC, bool, O>; +#[doc = "Field `cr_pds_ldo_vol` reader - "] +pub type CR_PDS_LDO_VOL_R = crate::FieldReader; +#[doc = "Field `cr_pds_ldo_vol` writer - "] +pub type CR_PDS_LDO_VOL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PDS_CTL_SPEC, u8, u8, 4, O>; +#[doc = "Field `cr_pds_ctrl_rf` reader - "] +pub type CR_PDS_CTRL_RF_R = crate::FieldReader; +#[doc = "Field `cr_pds_ctrl_rf` writer - "] +pub type CR_PDS_CTRL_RF_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PDS_CTL_SPEC, u8, u8, 2, O>; +#[doc = "Field `cr_pds_ctrl_pll` reader - "] +pub type CR_PDS_CTRL_PLL_R = crate::FieldReader; +#[doc = "Field `cr_pds_ctrl_pll` writer - "] +pub type CR_PDS_CTRL_PLL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PDS_CTL_SPEC, u8, u8, 2, O>; impl R { - #[doc = "Bits 30:31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn cr_pds_ctrl_pll(&self) -> CR_PDS_CTRL_PLL_R { - CR_PDS_CTRL_PLL_R::new(((self.bits >> 30) & 0x03) as u8) + pub fn pds_start_ps(&self) -> PDS_START_PS_R { + PDS_START_PS_R::new((self.bits & 1) != 0) } - #[doc = "Bits 28:29"] + #[doc = "Bit 1"] #[inline(always)] - pub fn cr_pds_ctrl_rf(&self) -> CR_PDS_CTRL_RF_R { - CR_PDS_CTRL_RF_R::new(((self.bits >> 28) & 0x03) as u8) + pub fn cr_sleep_forever(&self) -> CR_SLEEP_FOREVER_R { + CR_SLEEP_FOREVER_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bits 24:27"] + #[doc = "Bit 2"] #[inline(always)] - pub fn cr_pds_ldo_vol(&self) -> CR_PDS_LDO_VOL_R { - CR_PDS_LDO_VOL_R::new(((self.bits >> 24) & 0x0f) as u8) + pub fn cr_xtal_force_off(&self) -> CR_XTAL_FORCE_OFF_R { + CR_XTAL_FORCE_OFF_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 22"] + #[doc = "Bit 3"] #[inline(always)] - pub fn cr_pds_pd_ldo11(&self) -> CR_PDS_PD_LDO11_R { - CR_PDS_PD_LDO11_R::new(((self.bits >> 22) & 0x01) != 0) + pub fn cr_wifi_pds_save_state(&self) -> CR_WIFI_PDS_SAVE_STATE_R { + CR_WIFI_PDS_SAVE_STATE_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bit 21"] + #[doc = "Bit 4"] #[inline(always)] - pub fn cr_np_wfi_mask(&self) -> CR_NP_WFI_MASK_R { - CR_NP_WFI_MASK_R::new(((self.bits >> 21) & 0x01) != 0) + pub fn cr_pds_pd_dcdc18(&self) -> CR_PDS_PD_DCDC18_R { + CR_PDS_PD_DCDC18_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 18"] + #[doc = "Bit 5"] #[inline(always)] - pub fn cr_pds_ldo_vsel_en(&self) -> CR_PDS_LDO_VSEL_EN_R { - CR_PDS_LDO_VSEL_EN_R::new(((self.bits >> 18) & 0x01) != 0) + pub fn cr_pds_pd_bg_sys(&self) -> CR_PDS_PD_BG_SYS_R { + CR_PDS_PD_BG_SYS_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 17"] + #[doc = "Bit 8"] #[inline(always)] - pub fn cr_pds_rc32m_off_dis(&self) -> CR_PDS_RC32M_OFF_DIS_R { - CR_PDS_RC32M_OFF_DIS_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn cr_pds_gate_clk(&self) -> CR_PDS_GATE_CLK_R { + CR_PDS_GATE_CLK_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bit 16"] + #[doc = "Bit 9"] #[inline(always)] - pub fn cr_pds_rst_soc_en(&self) -> CR_PDS_RST_SOC_EN_R { - CR_PDS_RST_SOC_EN_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn cr_pds_mem_stby(&self) -> CR_PDS_MEM_STBY_R { + CR_PDS_MEM_STBY_R::new(((self.bits >> 9) & 1) != 0) } - #[doc = "Bit 15"] + #[doc = "Bit 11"] #[inline(always)] - pub fn cr_pds_soc_enb_force_on(&self) -> CR_PDS_SOC_ENB_FORCE_ON_R { - CR_PDS_SOC_ENB_FORCE_ON_R::new(((self.bits >> 15) & 0x01) != 0) + pub fn cr_pds_iso_en(&self) -> CR_PDS_ISO_EN_R { + CR_PDS_ISO_EN_R::new(((self.bits >> 11) & 1) != 0) } - #[doc = "Bit 14"] + #[doc = "Bit 12"] #[inline(always)] - pub fn cr_pds_pd_xtal(&self) -> CR_PDS_PD_XTAL_R { - CR_PDS_PD_XTAL_R::new(((self.bits >> 14) & 0x01) != 0) + pub fn cr_pds_wait_xtal_rdy(&self) -> CR_PDS_WAIT_XTAL_RDY_R { + CR_PDS_WAIT_XTAL_RDY_R::new(((self.bits >> 12) & 1) != 0) } #[doc = "Bit 13"] #[inline(always)] pub fn cr_pds_pwr_off(&self) -> CR_PDS_PWR_OFF_R { - CR_PDS_PWR_OFF_R::new(((self.bits >> 13) & 0x01) != 0) + CR_PDS_PWR_OFF_R::new(((self.bits >> 13) & 1) != 0) } - #[doc = "Bit 12"] + #[doc = "Bit 14"] #[inline(always)] - pub fn cr_pds_wait_xtal_rdy(&self) -> CR_PDS_WAIT_XTAL_RDY_R { - CR_PDS_WAIT_XTAL_RDY_R::new(((self.bits >> 12) & 0x01) != 0) + pub fn cr_pds_pd_xtal(&self) -> CR_PDS_PD_XTAL_R { + CR_PDS_PD_XTAL_R::new(((self.bits >> 14) & 1) != 0) } - #[doc = "Bit 11"] + #[doc = "Bit 15"] #[inline(always)] - pub fn cr_pds_iso_en(&self) -> CR_PDS_ISO_EN_R { - CR_PDS_ISO_EN_R::new(((self.bits >> 11) & 0x01) != 0) + pub fn cr_pds_soc_enb_force_on(&self) -> CR_PDS_SOC_ENB_FORCE_ON_R { + CR_PDS_SOC_ENB_FORCE_ON_R::new(((self.bits >> 15) & 1) != 0) } - #[doc = "Bit 9"] + #[doc = "Bit 16"] #[inline(always)] - pub fn cr_pds_mem_stby(&self) -> CR_PDS_MEM_STBY_R { - CR_PDS_MEM_STBY_R::new(((self.bits >> 9) & 0x01) != 0) + pub fn cr_pds_rst_soc_en(&self) -> CR_PDS_RST_SOC_EN_R { + CR_PDS_RST_SOC_EN_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 8"] + #[doc = "Bit 17"] #[inline(always)] - pub fn cr_pds_gate_clk(&self) -> CR_PDS_GATE_CLK_R { - CR_PDS_GATE_CLK_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn cr_pds_rc32m_off_dis(&self) -> CR_PDS_RC32M_OFF_DIS_R { + CR_PDS_RC32M_OFF_DIS_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bit 5"] + #[doc = "Bit 18"] #[inline(always)] - pub fn cr_pds_pd_bg_sys(&self) -> CR_PDS_PD_BG_SYS_R { - CR_PDS_PD_BG_SYS_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn cr_pds_ldo_vsel_en(&self) -> CR_PDS_LDO_VSEL_EN_R { + CR_PDS_LDO_VSEL_EN_R::new(((self.bits >> 18) & 1) != 0) } - #[doc = "Bit 4"] + #[doc = "Bit 21"] #[inline(always)] - pub fn cr_pds_pd_dcdc18(&self) -> CR_PDS_PD_DCDC18_R { - CR_PDS_PD_DCDC18_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn cr_np_wfi_mask(&self) -> CR_NP_WFI_MASK_R { + CR_NP_WFI_MASK_R::new(((self.bits >> 21) & 1) != 0) } - #[doc = "Bit 3"] + #[doc = "Bit 22"] #[inline(always)] - pub fn cr_wifi_pds_save_state(&self) -> CR_WIFI_PDS_SAVE_STATE_R { - CR_WIFI_PDS_SAVE_STATE_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn cr_pds_pd_ldo11(&self) -> CR_PDS_PD_LDO11_R { + CR_PDS_PD_LDO11_R::new(((self.bits >> 22) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bits 24:27"] #[inline(always)] - pub fn cr_xtal_force_off(&self) -> CR_XTAL_FORCE_OFF_R { - CR_XTAL_FORCE_OFF_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn cr_pds_ldo_vol(&self) -> CR_PDS_LDO_VOL_R { + CR_PDS_LDO_VOL_R::new(((self.bits >> 24) & 0x0f) as u8) } - #[doc = "Bit 1"] + #[doc = "Bits 28:29"] #[inline(always)] - pub fn cr_sleep_forever(&self) -> CR_SLEEP_FOREVER_R { - CR_SLEEP_FOREVER_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn cr_pds_ctrl_rf(&self) -> CR_PDS_CTRL_RF_R { + CR_PDS_CTRL_RF_R::new(((self.bits >> 28) & 3) as u8) } - #[doc = "Bit 0"] + #[doc = "Bits 30:31"] #[inline(always)] - pub fn pds_start_ps(&self) -> PDS_START_PS_R { - PDS_START_PS_R::new((self.bits & 0x01) != 0) + pub fn cr_pds_ctrl_pll(&self) -> CR_PDS_CTRL_PLL_R { + CR_PDS_CTRL_PLL_R::new(((self.bits >> 30) & 3) as u8) } } impl W { - #[doc = "Bits 30:31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn cr_pds_ctrl_pll(&mut self) -> CR_PDS_CTRL_PLL_W { - CR_PDS_CTRL_PLL_W { w: self } + #[must_use] + pub fn pds_start_ps(&mut self) -> PDS_START_PS_W<0> { + PDS_START_PS_W::new(self) } - #[doc = "Bits 28:29"] + #[doc = "Bit 1"] #[inline(always)] - pub fn cr_pds_ctrl_rf(&mut self) -> CR_PDS_CTRL_RF_W { - CR_PDS_CTRL_RF_W { w: self } + #[must_use] + pub fn cr_sleep_forever(&mut self) -> CR_SLEEP_FOREVER_W<1> { + CR_SLEEP_FOREVER_W::new(self) } - #[doc = "Bits 24:27"] + #[doc = "Bit 2"] #[inline(always)] - pub fn cr_pds_ldo_vol(&mut self) -> CR_PDS_LDO_VOL_W { - CR_PDS_LDO_VOL_W { w: self } + #[must_use] + pub fn cr_xtal_force_off(&mut self) -> CR_XTAL_FORCE_OFF_W<2> { + CR_XTAL_FORCE_OFF_W::new(self) } - #[doc = "Bit 22"] + #[doc = "Bit 3"] #[inline(always)] - pub fn cr_pds_pd_ldo11(&mut self) -> CR_PDS_PD_LDO11_W { - CR_PDS_PD_LDO11_W { w: self } + #[must_use] + pub fn cr_wifi_pds_save_state(&mut self) -> CR_WIFI_PDS_SAVE_STATE_W<3> { + CR_WIFI_PDS_SAVE_STATE_W::new(self) } - #[doc = "Bit 21"] + #[doc = "Bit 4"] #[inline(always)] - pub fn cr_np_wfi_mask(&mut self) -> CR_NP_WFI_MASK_W { - CR_NP_WFI_MASK_W { w: self } + #[must_use] + pub fn cr_pds_pd_dcdc18(&mut self) -> CR_PDS_PD_DCDC18_W<4> { + CR_PDS_PD_DCDC18_W::new(self) } - #[doc = "Bit 18"] + #[doc = "Bit 5"] #[inline(always)] - pub fn cr_pds_ldo_vsel_en(&mut self) -> CR_PDS_LDO_VSEL_EN_W { - CR_PDS_LDO_VSEL_EN_W { w: self } + #[must_use] + pub fn cr_pds_pd_bg_sys(&mut self) -> CR_PDS_PD_BG_SYS_W<5> { + CR_PDS_PD_BG_SYS_W::new(self) } - #[doc = "Bit 17"] + #[doc = "Bit 8"] #[inline(always)] - pub fn cr_pds_rc32m_off_dis(&mut self) -> CR_PDS_RC32M_OFF_DIS_W { - CR_PDS_RC32M_OFF_DIS_W { w: self } + #[must_use] + pub fn cr_pds_gate_clk(&mut self) -> CR_PDS_GATE_CLK_W<8> { + CR_PDS_GATE_CLK_W::new(self) } - #[doc = "Bit 16"] + #[doc = "Bit 9"] #[inline(always)] - pub fn cr_pds_rst_soc_en(&mut self) -> CR_PDS_RST_SOC_EN_W { - CR_PDS_RST_SOC_EN_W { w: self } + #[must_use] + pub fn cr_pds_mem_stby(&mut self) -> CR_PDS_MEM_STBY_W<9> { + CR_PDS_MEM_STBY_W::new(self) } - #[doc = "Bit 15"] + #[doc = "Bit 11"] #[inline(always)] - pub fn cr_pds_soc_enb_force_on(&mut self) -> CR_PDS_SOC_ENB_FORCE_ON_W { - CR_PDS_SOC_ENB_FORCE_ON_W { w: self } + #[must_use] + pub fn cr_pds_iso_en(&mut self) -> CR_PDS_ISO_EN_W<11> { + CR_PDS_ISO_EN_W::new(self) } - #[doc = "Bit 14"] + #[doc = "Bit 12"] #[inline(always)] - pub fn cr_pds_pd_xtal(&mut self) -> CR_PDS_PD_XTAL_W { - CR_PDS_PD_XTAL_W { w: self } + #[must_use] + pub fn cr_pds_wait_xtal_rdy(&mut self) -> CR_PDS_WAIT_XTAL_RDY_W<12> { + CR_PDS_WAIT_XTAL_RDY_W::new(self) } #[doc = "Bit 13"] #[inline(always)] - pub fn cr_pds_pwr_off(&mut self) -> CR_PDS_PWR_OFF_W { - CR_PDS_PWR_OFF_W { w: self } + #[must_use] + pub fn cr_pds_pwr_off(&mut self) -> CR_PDS_PWR_OFF_W<13> { + CR_PDS_PWR_OFF_W::new(self) } - #[doc = "Bit 12"] + #[doc = "Bit 14"] #[inline(always)] - pub fn cr_pds_wait_xtal_rdy(&mut self) -> CR_PDS_WAIT_XTAL_RDY_W { - CR_PDS_WAIT_XTAL_RDY_W { w: self } + #[must_use] + pub fn cr_pds_pd_xtal(&mut self) -> CR_PDS_PD_XTAL_W<14> { + CR_PDS_PD_XTAL_W::new(self) } - #[doc = "Bit 11"] + #[doc = "Bit 15"] #[inline(always)] - pub fn cr_pds_iso_en(&mut self) -> CR_PDS_ISO_EN_W { - CR_PDS_ISO_EN_W { w: self } + #[must_use] + pub fn cr_pds_soc_enb_force_on(&mut self) -> CR_PDS_SOC_ENB_FORCE_ON_W<15> { + CR_PDS_SOC_ENB_FORCE_ON_W::new(self) } - #[doc = "Bit 9"] + #[doc = "Bit 16"] #[inline(always)] - pub fn cr_pds_mem_stby(&mut self) -> CR_PDS_MEM_STBY_W { - CR_PDS_MEM_STBY_W { w: self } + #[must_use] + pub fn cr_pds_rst_soc_en(&mut self) -> CR_PDS_RST_SOC_EN_W<16> { + CR_PDS_RST_SOC_EN_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bit 17"] #[inline(always)] - pub fn cr_pds_gate_clk(&mut self) -> CR_PDS_GATE_CLK_W { - CR_PDS_GATE_CLK_W { w: self } + #[must_use] + pub fn cr_pds_rc32m_off_dis(&mut self) -> CR_PDS_RC32M_OFF_DIS_W<17> { + CR_PDS_RC32M_OFF_DIS_W::new(self) } - #[doc = "Bit 5"] + #[doc = "Bit 18"] #[inline(always)] - pub fn cr_pds_pd_bg_sys(&mut self) -> CR_PDS_PD_BG_SYS_W { - CR_PDS_PD_BG_SYS_W { w: self } + #[must_use] + pub fn cr_pds_ldo_vsel_en(&mut self) -> CR_PDS_LDO_VSEL_EN_W<18> { + CR_PDS_LDO_VSEL_EN_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 21"] #[inline(always)] - pub fn cr_pds_pd_dcdc18(&mut self) -> CR_PDS_PD_DCDC18_W { - CR_PDS_PD_DCDC18_W { w: self } + #[must_use] + pub fn cr_np_wfi_mask(&mut self) -> CR_NP_WFI_MASK_W<21> { + CR_NP_WFI_MASK_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bit 22"] #[inline(always)] - pub fn cr_wifi_pds_save_state(&mut self) -> CR_WIFI_PDS_SAVE_STATE_W { - CR_WIFI_PDS_SAVE_STATE_W { w: self } + #[must_use] + pub fn cr_pds_pd_ldo11(&mut self) -> CR_PDS_PD_LDO11_W<22> { + CR_PDS_PD_LDO11_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bits 24:27"] #[inline(always)] - pub fn cr_xtal_force_off(&mut self) -> CR_XTAL_FORCE_OFF_W { - CR_XTAL_FORCE_OFF_W { w: self } + #[must_use] + pub fn cr_pds_ldo_vol(&mut self) -> CR_PDS_LDO_VOL_W<24> { + CR_PDS_LDO_VOL_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bits 28:29"] #[inline(always)] - pub fn cr_sleep_forever(&mut self) -> CR_SLEEP_FOREVER_W { - CR_SLEEP_FOREVER_W { w: self } + #[must_use] + pub fn cr_pds_ctrl_rf(&mut self) -> CR_PDS_CTRL_RF_W<28> { + CR_PDS_CTRL_RF_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bits 30:31"] #[inline(always)] - pub fn pds_start_ps(&mut self) -> PDS_START_PS_W { - PDS_START_PS_W { w: self } + #[must_use] + pub fn cr_pds_ctrl_pll(&mut self) -> CR_PDS_CTRL_PLL_W<30> { + CR_PDS_CTRL_PLL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -989,11 +376,10 @@ impl crate::Readable for PDS_CTL_SPEC { #[doc = "`write(|w| ..)` method takes [pds_ctl::W](W) writer structure"] impl crate::Writable for PDS_CTL_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets PDS_CTL to value 0x1a00_6b00"] impl crate::Resettable for PDS_CTL_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x1a00_6b00 - } + const RESET_VALUE: Self::Ux = 0x1a00_6b00; } diff --git a/src/pds/pds_ctl2.rs b/src/pds/pds_ctl2.rs index 3948793..9aac90a 100644 --- a/src/pds/pds_ctl2.rs +++ b/src/pds/pds_ctl2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,475 +28,177 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `cr_pds_force_wb_gate_clk` reader - "] -pub struct CR_PDS_FORCE_WB_GATE_CLK_R(crate::FieldReader); -impl CR_PDS_FORCE_WB_GATE_CLK_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_FORCE_WB_GATE_CLK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_FORCE_WB_GATE_CLK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_force_wb_gate_clk` writer - "] -pub struct CR_PDS_FORCE_WB_GATE_CLK_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_FORCE_WB_GATE_CLK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18); - self.w - } -} -#[doc = "Field `cr_pds_force_np_gate_clk` reader - "] -pub struct CR_PDS_FORCE_NP_GATE_CLK_R(crate::FieldReader); -impl CR_PDS_FORCE_NP_GATE_CLK_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_FORCE_NP_GATE_CLK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_FORCE_NP_GATE_CLK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_force_np_gate_clk` writer - "] -pub struct CR_PDS_FORCE_NP_GATE_CLK_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_FORCE_NP_GATE_CLK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `cr_pds_force_wb_mem_stby` reader - "] -pub struct CR_PDS_FORCE_WB_MEM_STBY_R(crate::FieldReader); -impl CR_PDS_FORCE_WB_MEM_STBY_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_FORCE_WB_MEM_STBY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_FORCE_WB_MEM_STBY_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_force_wb_mem_stby` writer - "] -pub struct CR_PDS_FORCE_WB_MEM_STBY_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_FORCE_WB_MEM_STBY_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14); - self.w - } -} -#[doc = "Field `cr_pds_force_np_mem_stby` reader - "] -pub struct CR_PDS_FORCE_NP_MEM_STBY_R(crate::FieldReader); -impl CR_PDS_FORCE_NP_MEM_STBY_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_FORCE_NP_MEM_STBY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_FORCE_NP_MEM_STBY_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_force_np_mem_stby` writer - "] -pub struct CR_PDS_FORCE_NP_MEM_STBY_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_FORCE_NP_MEM_STBY_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} -#[doc = "Field `cr_pds_force_wb_pds_rst` reader - "] -pub struct CR_PDS_FORCE_WB_PDS_RST_R(crate::FieldReader); -impl CR_PDS_FORCE_WB_PDS_RST_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_FORCE_WB_PDS_RST_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_FORCE_WB_PDS_RST_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_force_wb_pds_rst` writer - "] -pub struct CR_PDS_FORCE_WB_PDS_RST_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_FORCE_WB_PDS_RST_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); - self.w - } -} -#[doc = "Field `cr_pds_force_np_pds_rst` reader - "] -pub struct CR_PDS_FORCE_NP_PDS_RST_R(crate::FieldReader); -impl CR_PDS_FORCE_NP_PDS_RST_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_FORCE_NP_PDS_RST_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_FORCE_NP_PDS_RST_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_force_np_pds_rst` writer - "] -pub struct CR_PDS_FORCE_NP_PDS_RST_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_FORCE_NP_PDS_RST_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `cr_pds_force_wb_iso_en` reader - "] -pub struct CR_PDS_FORCE_WB_ISO_EN_R(crate::FieldReader); -impl CR_PDS_FORCE_WB_ISO_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_FORCE_WB_ISO_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_FORCE_WB_ISO_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_force_wb_iso_en` writer - "] -pub struct CR_PDS_FORCE_WB_ISO_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_FORCE_WB_ISO_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w - } -} -#[doc = "Field `cr_pds_force_np_iso_en` reader - "] -pub struct CR_PDS_FORCE_NP_ISO_EN_R(crate::FieldReader); -impl CR_PDS_FORCE_NP_ISO_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_FORCE_NP_ISO_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_FORCE_NP_ISO_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_force_np_iso_en` writer - "] -pub struct CR_PDS_FORCE_NP_ISO_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_FORCE_NP_ISO_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} -#[doc = "Field `cr_pds_force_wb_pwr_off` reader - "] -pub struct CR_PDS_FORCE_WB_PWR_OFF_R(crate::FieldReader); -impl CR_PDS_FORCE_WB_PWR_OFF_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_FORCE_WB_PWR_OFF_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_FORCE_WB_PWR_OFF_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_force_wb_pwr_off` writer - "] -pub struct CR_PDS_FORCE_WB_PWR_OFF_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_FORCE_WB_PWR_OFF_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} #[doc = "Field `cr_pds_force_np_pwr_off` reader - "] -pub struct CR_PDS_FORCE_NP_PWR_OFF_R(crate::FieldReader); -impl CR_PDS_FORCE_NP_PWR_OFF_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_FORCE_NP_PWR_OFF_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_FORCE_NP_PWR_OFF_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_PDS_FORCE_NP_PWR_OFF_R = crate::BitReader; #[doc = "Field `cr_pds_force_np_pwr_off` writer - "] -pub struct CR_PDS_FORCE_NP_PWR_OFF_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_FORCE_NP_PWR_OFF_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type CR_PDS_FORCE_NP_PWR_OFF_W<'a, const O: u8> = + crate::BitWriter<'a, u32, PDS_CTL2_SPEC, bool, O>; +#[doc = "Field `cr_pds_force_wb_pwr_off` reader - "] +pub type CR_PDS_FORCE_WB_PWR_OFF_R = crate::BitReader; +#[doc = "Field `cr_pds_force_wb_pwr_off` writer - "] +pub type CR_PDS_FORCE_WB_PWR_OFF_W<'a, const O: u8> = + crate::BitWriter<'a, u32, PDS_CTL2_SPEC, bool, O>; +#[doc = "Field `cr_pds_force_np_iso_en` reader - "] +pub type CR_PDS_FORCE_NP_ISO_EN_R = crate::BitReader; +#[doc = "Field `cr_pds_force_np_iso_en` writer - "] +pub type CR_PDS_FORCE_NP_ISO_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, PDS_CTL2_SPEC, bool, O>; +#[doc = "Field `cr_pds_force_wb_iso_en` reader - "] +pub type CR_PDS_FORCE_WB_ISO_EN_R = crate::BitReader; +#[doc = "Field `cr_pds_force_wb_iso_en` writer - "] +pub type CR_PDS_FORCE_WB_ISO_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, PDS_CTL2_SPEC, bool, O>; +#[doc = "Field `cr_pds_force_np_pds_rst` reader - "] +pub type CR_PDS_FORCE_NP_PDS_RST_R = crate::BitReader; +#[doc = "Field `cr_pds_force_np_pds_rst` writer - "] +pub type CR_PDS_FORCE_NP_PDS_RST_W<'a, const O: u8> = + crate::BitWriter<'a, u32, PDS_CTL2_SPEC, bool, O>; +#[doc = "Field `cr_pds_force_wb_pds_rst` reader - "] +pub type CR_PDS_FORCE_WB_PDS_RST_R = crate::BitReader; +#[doc = "Field `cr_pds_force_wb_pds_rst` writer - "] +pub type CR_PDS_FORCE_WB_PDS_RST_W<'a, const O: u8> = + crate::BitWriter<'a, u32, PDS_CTL2_SPEC, bool, O>; +#[doc = "Field `cr_pds_force_np_mem_stby` reader - "] +pub type CR_PDS_FORCE_NP_MEM_STBY_R = crate::BitReader; +#[doc = "Field `cr_pds_force_np_mem_stby` writer - "] +pub type CR_PDS_FORCE_NP_MEM_STBY_W<'a, const O: u8> = + crate::BitWriter<'a, u32, PDS_CTL2_SPEC, bool, O>; +#[doc = "Field `cr_pds_force_wb_mem_stby` reader - "] +pub type CR_PDS_FORCE_WB_MEM_STBY_R = crate::BitReader; +#[doc = "Field `cr_pds_force_wb_mem_stby` writer - "] +pub type CR_PDS_FORCE_WB_MEM_STBY_W<'a, const O: u8> = + crate::BitWriter<'a, u32, PDS_CTL2_SPEC, bool, O>; +#[doc = "Field `cr_pds_force_np_gate_clk` reader - "] +pub type CR_PDS_FORCE_NP_GATE_CLK_R = crate::BitReader; +#[doc = "Field `cr_pds_force_np_gate_clk` writer - "] +pub type CR_PDS_FORCE_NP_GATE_CLK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, PDS_CTL2_SPEC, bool, O>; +#[doc = "Field `cr_pds_force_wb_gate_clk` reader - "] +pub type CR_PDS_FORCE_WB_GATE_CLK_R = crate::BitReader; +#[doc = "Field `cr_pds_force_wb_gate_clk` writer - "] +pub type CR_PDS_FORCE_WB_GATE_CLK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, PDS_CTL2_SPEC, bool, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn cr_pds_force_np_pwr_off(&self) -> CR_PDS_FORCE_NP_PWR_OFF_R { + CR_PDS_FORCE_NP_PWR_OFF_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bit 18"] + #[doc = "Bit 2"] #[inline(always)] - pub fn cr_pds_force_wb_gate_clk(&self) -> CR_PDS_FORCE_WB_GATE_CLK_R { - CR_PDS_FORCE_WB_GATE_CLK_R::new(((self.bits >> 18) & 0x01) != 0) + pub fn cr_pds_force_wb_pwr_off(&self) -> CR_PDS_FORCE_WB_PWR_OFF_R { + CR_PDS_FORCE_WB_PWR_OFF_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 16"] + #[doc = "Bit 4"] #[inline(always)] - pub fn cr_pds_force_np_gate_clk(&self) -> CR_PDS_FORCE_NP_GATE_CLK_R { - CR_PDS_FORCE_NP_GATE_CLK_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn cr_pds_force_np_iso_en(&self) -> CR_PDS_FORCE_NP_ISO_EN_R { + CR_PDS_FORCE_NP_ISO_EN_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 14"] + #[doc = "Bit 6"] #[inline(always)] - pub fn cr_pds_force_wb_mem_stby(&self) -> CR_PDS_FORCE_WB_MEM_STBY_R { - CR_PDS_FORCE_WB_MEM_STBY_R::new(((self.bits >> 14) & 0x01) != 0) + pub fn cr_pds_force_wb_iso_en(&self) -> CR_PDS_FORCE_WB_ISO_EN_R { + CR_PDS_FORCE_WB_ISO_EN_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = "Bit 12"] + #[doc = "Bit 8"] #[inline(always)] - pub fn cr_pds_force_np_mem_stby(&self) -> CR_PDS_FORCE_NP_MEM_STBY_R { - CR_PDS_FORCE_NP_MEM_STBY_R::new(((self.bits >> 12) & 0x01) != 0) + pub fn cr_pds_force_np_pds_rst(&self) -> CR_PDS_FORCE_NP_PDS_RST_R { + CR_PDS_FORCE_NP_PDS_RST_R::new(((self.bits >> 8) & 1) != 0) } #[doc = "Bit 10"] #[inline(always)] pub fn cr_pds_force_wb_pds_rst(&self) -> CR_PDS_FORCE_WB_PDS_RST_R { - CR_PDS_FORCE_WB_PDS_RST_R::new(((self.bits >> 10) & 0x01) != 0) - } - #[doc = "Bit 8"] - #[inline(always)] - pub fn cr_pds_force_np_pds_rst(&self) -> CR_PDS_FORCE_NP_PDS_RST_R { - CR_PDS_FORCE_NP_PDS_RST_R::new(((self.bits >> 8) & 0x01) != 0) + CR_PDS_FORCE_WB_PDS_RST_R::new(((self.bits >> 10) & 1) != 0) } - #[doc = "Bit 6"] + #[doc = "Bit 12"] #[inline(always)] - pub fn cr_pds_force_wb_iso_en(&self) -> CR_PDS_FORCE_WB_ISO_EN_R { - CR_PDS_FORCE_WB_ISO_EN_R::new(((self.bits >> 6) & 0x01) != 0) + pub fn cr_pds_force_np_mem_stby(&self) -> CR_PDS_FORCE_NP_MEM_STBY_R { + CR_PDS_FORCE_NP_MEM_STBY_R::new(((self.bits >> 12) & 1) != 0) } - #[doc = "Bit 4"] + #[doc = "Bit 14"] #[inline(always)] - pub fn cr_pds_force_np_iso_en(&self) -> CR_PDS_FORCE_NP_ISO_EN_R { - CR_PDS_FORCE_NP_ISO_EN_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn cr_pds_force_wb_mem_stby(&self) -> CR_PDS_FORCE_WB_MEM_STBY_R { + CR_PDS_FORCE_WB_MEM_STBY_R::new(((self.bits >> 14) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bit 16"] #[inline(always)] - pub fn cr_pds_force_wb_pwr_off(&self) -> CR_PDS_FORCE_WB_PWR_OFF_R { - CR_PDS_FORCE_WB_PWR_OFF_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn cr_pds_force_np_gate_clk(&self) -> CR_PDS_FORCE_NP_GATE_CLK_R { + CR_PDS_FORCE_NP_GATE_CLK_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 18"] #[inline(always)] - pub fn cr_pds_force_np_pwr_off(&self) -> CR_PDS_FORCE_NP_PWR_OFF_R { - CR_PDS_FORCE_NP_PWR_OFF_R::new((self.bits & 0x01) != 0) + pub fn cr_pds_force_wb_gate_clk(&self) -> CR_PDS_FORCE_WB_GATE_CLK_R { + CR_PDS_FORCE_WB_GATE_CLK_R::new(((self.bits >> 18) & 1) != 0) } } impl W { - #[doc = "Bit 18"] + #[doc = "Bit 0"] #[inline(always)] - pub fn cr_pds_force_wb_gate_clk(&mut self) -> CR_PDS_FORCE_WB_GATE_CLK_W { - CR_PDS_FORCE_WB_GATE_CLK_W { w: self } + #[must_use] + pub fn cr_pds_force_np_pwr_off(&mut self) -> CR_PDS_FORCE_NP_PWR_OFF_W<0> { + CR_PDS_FORCE_NP_PWR_OFF_W::new(self) } - #[doc = "Bit 16"] + #[doc = "Bit 2"] #[inline(always)] - pub fn cr_pds_force_np_gate_clk(&mut self) -> CR_PDS_FORCE_NP_GATE_CLK_W { - CR_PDS_FORCE_NP_GATE_CLK_W { w: self } + #[must_use] + pub fn cr_pds_force_wb_pwr_off(&mut self) -> CR_PDS_FORCE_WB_PWR_OFF_W<2> { + CR_PDS_FORCE_WB_PWR_OFF_W::new(self) } - #[doc = "Bit 14"] + #[doc = "Bit 4"] #[inline(always)] - pub fn cr_pds_force_wb_mem_stby(&mut self) -> CR_PDS_FORCE_WB_MEM_STBY_W { - CR_PDS_FORCE_WB_MEM_STBY_W { w: self } + #[must_use] + pub fn cr_pds_force_np_iso_en(&mut self) -> CR_PDS_FORCE_NP_ISO_EN_W<4> { + CR_PDS_FORCE_NP_ISO_EN_W::new(self) } - #[doc = "Bit 12"] + #[doc = "Bit 6"] #[inline(always)] - pub fn cr_pds_force_np_mem_stby(&mut self) -> CR_PDS_FORCE_NP_MEM_STBY_W { - CR_PDS_FORCE_NP_MEM_STBY_W { w: self } + #[must_use] + pub fn cr_pds_force_wb_iso_en(&mut self) -> CR_PDS_FORCE_WB_ISO_EN_W<6> { + CR_PDS_FORCE_WB_ISO_EN_W::new(self) } - #[doc = "Bit 10"] + #[doc = "Bit 8"] #[inline(always)] - pub fn cr_pds_force_wb_pds_rst(&mut self) -> CR_PDS_FORCE_WB_PDS_RST_W { - CR_PDS_FORCE_WB_PDS_RST_W { w: self } + #[must_use] + pub fn cr_pds_force_np_pds_rst(&mut self) -> CR_PDS_FORCE_NP_PDS_RST_W<8> { + CR_PDS_FORCE_NP_PDS_RST_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bit 10"] #[inline(always)] - pub fn cr_pds_force_np_pds_rst(&mut self) -> CR_PDS_FORCE_NP_PDS_RST_W { - CR_PDS_FORCE_NP_PDS_RST_W { w: self } + #[must_use] + pub fn cr_pds_force_wb_pds_rst(&mut self) -> CR_PDS_FORCE_WB_PDS_RST_W<10> { + CR_PDS_FORCE_WB_PDS_RST_W::new(self) } - #[doc = "Bit 6"] + #[doc = "Bit 12"] #[inline(always)] - pub fn cr_pds_force_wb_iso_en(&mut self) -> CR_PDS_FORCE_WB_ISO_EN_W { - CR_PDS_FORCE_WB_ISO_EN_W { w: self } + #[must_use] + pub fn cr_pds_force_np_mem_stby(&mut self) -> CR_PDS_FORCE_NP_MEM_STBY_W<12> { + CR_PDS_FORCE_NP_MEM_STBY_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 14"] #[inline(always)] - pub fn cr_pds_force_np_iso_en(&mut self) -> CR_PDS_FORCE_NP_ISO_EN_W { - CR_PDS_FORCE_NP_ISO_EN_W { w: self } + #[must_use] + pub fn cr_pds_force_wb_mem_stby(&mut self) -> CR_PDS_FORCE_WB_MEM_STBY_W<14> { + CR_PDS_FORCE_WB_MEM_STBY_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bit 16"] #[inline(always)] - pub fn cr_pds_force_wb_pwr_off(&mut self) -> CR_PDS_FORCE_WB_PWR_OFF_W { - CR_PDS_FORCE_WB_PWR_OFF_W { w: self } + #[must_use] + pub fn cr_pds_force_np_gate_clk(&mut self) -> CR_PDS_FORCE_NP_GATE_CLK_W<16> { + CR_PDS_FORCE_NP_GATE_CLK_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 18"] #[inline(always)] - pub fn cr_pds_force_np_pwr_off(&mut self) -> CR_PDS_FORCE_NP_PWR_OFF_W { - CR_PDS_FORCE_NP_PWR_OFF_W { w: self } + #[must_use] + pub fn cr_pds_force_wb_gate_clk(&mut self) -> CR_PDS_FORCE_WB_GATE_CLK_W<18> { + CR_PDS_FORCE_WB_GATE_CLK_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -513,11 +216,10 @@ impl crate::Readable for PDS_CTL2_SPEC { #[doc = "`write(|w| ..)` method takes [pds_ctl2::W](W) writer structure"] impl crate::Writable for PDS_CTL2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets PDS_CTL2 to value 0"] impl crate::Resettable for PDS_CTL2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/pds/pds_ctl3.rs b/src/pds/pds_ctl3.rs index b229315..4ffdda1 100644 --- a/src/pds/pds_ctl3.rs +++ b/src/pds/pds_ctl3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,383 +28,142 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `cr_pds_misc_iso_en` reader - "] -pub struct CR_PDS_MISC_ISO_EN_R(crate::FieldReader); -impl CR_PDS_MISC_ISO_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_MISC_ISO_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_MISC_ISO_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_misc_iso_en` writer - "] -pub struct CR_PDS_MISC_ISO_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_MISC_ISO_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 30)) | ((value as u32 & 0x01) << 30); - self.w - } -} -#[doc = "Field `cr_pds_wb_iso_en` reader - "] -pub struct CR_PDS_WB_ISO_EN_R(crate::FieldReader); -impl CR_PDS_WB_ISO_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_WB_ISO_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_WB_ISO_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_wb_iso_en` writer - "] -pub struct CR_PDS_WB_ISO_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_WB_ISO_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 27)) | ((value as u32 & 0x01) << 27); - self.w - } -} -#[doc = "Field `cr_pds_np_iso_en` reader - "] -pub struct CR_PDS_NP_ISO_EN_R(crate::FieldReader); -impl CR_PDS_NP_ISO_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_NP_ISO_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_NP_ISO_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_np_iso_en` writer - "] -pub struct CR_PDS_NP_ISO_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_NP_ISO_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24); - self.w - } -} -#[doc = "Field `cr_pds_force_misc_gate_clk` reader - "] -pub struct CR_PDS_FORCE_MISC_GATE_CLK_R(crate::FieldReader); -impl CR_PDS_FORCE_MISC_GATE_CLK_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_FORCE_MISC_GATE_CLK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_FORCE_MISC_GATE_CLK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_force_misc_gate_clk` writer - "] -pub struct CR_PDS_FORCE_MISC_GATE_CLK_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_FORCE_MISC_GATE_CLK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13); - self.w - } -} -#[doc = "Field `cr_pds_force_misc_mem_stby` reader - "] -pub struct CR_PDS_FORCE_MISC_MEM_STBY_R(crate::FieldReader); -impl CR_PDS_FORCE_MISC_MEM_STBY_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_FORCE_MISC_MEM_STBY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_FORCE_MISC_MEM_STBY_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_force_misc_mem_stby` writer - "] -pub struct CR_PDS_FORCE_MISC_MEM_STBY_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_FORCE_MISC_MEM_STBY_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); - self.w - } -} -#[doc = "Field `cr_pds_force_misc_pds_rst` reader - "] -pub struct CR_PDS_FORCE_MISC_PDS_RST_R(crate::FieldReader); -impl CR_PDS_FORCE_MISC_PDS_RST_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_FORCE_MISC_PDS_RST_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_FORCE_MISC_PDS_RST_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_force_misc_pds_rst` writer - "] -pub struct CR_PDS_FORCE_MISC_PDS_RST_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_FORCE_MISC_PDS_RST_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7); - self.w - } -} -#[doc = "Field `cr_pds_force_misc_iso_en` reader - "] -pub struct CR_PDS_FORCE_MISC_ISO_EN_R(crate::FieldReader); -impl CR_PDS_FORCE_MISC_ISO_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_FORCE_MISC_ISO_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_FORCE_MISC_ISO_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_force_misc_iso_en` writer - "] -pub struct CR_PDS_FORCE_MISC_ISO_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_FORCE_MISC_ISO_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} #[doc = "Field `cr_pds_force_misc_pwr_off` reader - "] -pub struct CR_PDS_FORCE_MISC_PWR_OFF_R(crate::FieldReader); -impl CR_PDS_FORCE_MISC_PWR_OFF_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_FORCE_MISC_PWR_OFF_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_FORCE_MISC_PWR_OFF_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_PDS_FORCE_MISC_PWR_OFF_R = crate::BitReader; #[doc = "Field `cr_pds_force_misc_pwr_off` writer - "] -pub struct CR_PDS_FORCE_MISC_PWR_OFF_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_FORCE_MISC_PWR_OFF_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type CR_PDS_FORCE_MISC_PWR_OFF_W<'a, const O: u8> = + crate::BitWriter<'a, u32, PDS_CTL3_SPEC, bool, O>; +#[doc = "Field `cr_pds_force_misc_iso_en` reader - "] +pub type CR_PDS_FORCE_MISC_ISO_EN_R = crate::BitReader; +#[doc = "Field `cr_pds_force_misc_iso_en` writer - "] +pub type CR_PDS_FORCE_MISC_ISO_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, PDS_CTL3_SPEC, bool, O>; +#[doc = "Field `cr_pds_force_misc_pds_rst` reader - "] +pub type CR_PDS_FORCE_MISC_PDS_RST_R = crate::BitReader; +#[doc = "Field `cr_pds_force_misc_pds_rst` writer - "] +pub type CR_PDS_FORCE_MISC_PDS_RST_W<'a, const O: u8> = + crate::BitWriter<'a, u32, PDS_CTL3_SPEC, bool, O>; +#[doc = "Field `cr_pds_force_misc_mem_stby` reader - "] +pub type CR_PDS_FORCE_MISC_MEM_STBY_R = crate::BitReader; +#[doc = "Field `cr_pds_force_misc_mem_stby` writer - "] +pub type CR_PDS_FORCE_MISC_MEM_STBY_W<'a, const O: u8> = + crate::BitWriter<'a, u32, PDS_CTL3_SPEC, bool, O>; +#[doc = "Field `cr_pds_force_misc_gate_clk` reader - "] +pub type CR_PDS_FORCE_MISC_GATE_CLK_R = crate::BitReader; +#[doc = "Field `cr_pds_force_misc_gate_clk` writer - "] +pub type CR_PDS_FORCE_MISC_GATE_CLK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, PDS_CTL3_SPEC, bool, O>; +#[doc = "Field `cr_pds_np_iso_en` reader - "] +pub type CR_PDS_NP_ISO_EN_R = crate::BitReader; +#[doc = "Field `cr_pds_np_iso_en` writer - "] +pub type CR_PDS_NP_ISO_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PDS_CTL3_SPEC, bool, O>; +#[doc = "Field `cr_pds_wb_iso_en` reader - "] +pub type CR_PDS_WB_ISO_EN_R = crate::BitReader; +#[doc = "Field `cr_pds_wb_iso_en` writer - "] +pub type CR_PDS_WB_ISO_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PDS_CTL3_SPEC, bool, O>; +#[doc = "Field `cr_pds_misc_iso_en` reader - "] +pub type CR_PDS_MISC_ISO_EN_R = crate::BitReader; +#[doc = "Field `cr_pds_misc_iso_en` writer - "] +pub type CR_PDS_MISC_ISO_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PDS_CTL3_SPEC, bool, O>; +impl R { + #[doc = "Bit 1"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w + pub fn cr_pds_force_misc_pwr_off(&self) -> CR_PDS_FORCE_MISC_PWR_OFF_R { + CR_PDS_FORCE_MISC_PWR_OFF_R::new(((self.bits >> 1) & 1) != 0) } -} -impl R { - #[doc = "Bit 30"] + #[doc = "Bit 4"] #[inline(always)] - pub fn cr_pds_misc_iso_en(&self) -> CR_PDS_MISC_ISO_EN_R { - CR_PDS_MISC_ISO_EN_R::new(((self.bits >> 30) & 0x01) != 0) + pub fn cr_pds_force_misc_iso_en(&self) -> CR_PDS_FORCE_MISC_ISO_EN_R { + CR_PDS_FORCE_MISC_ISO_EN_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 27"] + #[doc = "Bit 7"] #[inline(always)] - pub fn cr_pds_wb_iso_en(&self) -> CR_PDS_WB_ISO_EN_R { - CR_PDS_WB_ISO_EN_R::new(((self.bits >> 27) & 0x01) != 0) + pub fn cr_pds_force_misc_pds_rst(&self) -> CR_PDS_FORCE_MISC_PDS_RST_R { + CR_PDS_FORCE_MISC_PDS_RST_R::new(((self.bits >> 7) & 1) != 0) } - #[doc = "Bit 24"] + #[doc = "Bit 10"] #[inline(always)] - pub fn cr_pds_np_iso_en(&self) -> CR_PDS_NP_ISO_EN_R { - CR_PDS_NP_ISO_EN_R::new(((self.bits >> 24) & 0x01) != 0) + pub fn cr_pds_force_misc_mem_stby(&self) -> CR_PDS_FORCE_MISC_MEM_STBY_R { + CR_PDS_FORCE_MISC_MEM_STBY_R::new(((self.bits >> 10) & 1) != 0) } #[doc = "Bit 13"] #[inline(always)] pub fn cr_pds_force_misc_gate_clk(&self) -> CR_PDS_FORCE_MISC_GATE_CLK_R { - CR_PDS_FORCE_MISC_GATE_CLK_R::new(((self.bits >> 13) & 0x01) != 0) - } - #[doc = "Bit 10"] - #[inline(always)] - pub fn cr_pds_force_misc_mem_stby(&self) -> CR_PDS_FORCE_MISC_MEM_STBY_R { - CR_PDS_FORCE_MISC_MEM_STBY_R::new(((self.bits >> 10) & 0x01) != 0) + CR_PDS_FORCE_MISC_GATE_CLK_R::new(((self.bits >> 13) & 1) != 0) } - #[doc = "Bit 7"] + #[doc = "Bit 24"] #[inline(always)] - pub fn cr_pds_force_misc_pds_rst(&self) -> CR_PDS_FORCE_MISC_PDS_RST_R { - CR_PDS_FORCE_MISC_PDS_RST_R::new(((self.bits >> 7) & 0x01) != 0) + pub fn cr_pds_np_iso_en(&self) -> CR_PDS_NP_ISO_EN_R { + CR_PDS_NP_ISO_EN_R::new(((self.bits >> 24) & 1) != 0) } - #[doc = "Bit 4"] + #[doc = "Bit 27"] #[inline(always)] - pub fn cr_pds_force_misc_iso_en(&self) -> CR_PDS_FORCE_MISC_ISO_EN_R { - CR_PDS_FORCE_MISC_ISO_EN_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn cr_pds_wb_iso_en(&self) -> CR_PDS_WB_ISO_EN_R { + CR_PDS_WB_ISO_EN_R::new(((self.bits >> 27) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 30"] #[inline(always)] - pub fn cr_pds_force_misc_pwr_off(&self) -> CR_PDS_FORCE_MISC_PWR_OFF_R { - CR_PDS_FORCE_MISC_PWR_OFF_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn cr_pds_misc_iso_en(&self) -> CR_PDS_MISC_ISO_EN_R { + CR_PDS_MISC_ISO_EN_R::new(((self.bits >> 30) & 1) != 0) } } impl W { - #[doc = "Bit 30"] + #[doc = "Bit 1"] #[inline(always)] - pub fn cr_pds_misc_iso_en(&mut self) -> CR_PDS_MISC_ISO_EN_W { - CR_PDS_MISC_ISO_EN_W { w: self } + #[must_use] + pub fn cr_pds_force_misc_pwr_off(&mut self) -> CR_PDS_FORCE_MISC_PWR_OFF_W<1> { + CR_PDS_FORCE_MISC_PWR_OFF_W::new(self) } - #[doc = "Bit 27"] + #[doc = "Bit 4"] #[inline(always)] - pub fn cr_pds_wb_iso_en(&mut self) -> CR_PDS_WB_ISO_EN_W { - CR_PDS_WB_ISO_EN_W { w: self } + #[must_use] + pub fn cr_pds_force_misc_iso_en(&mut self) -> CR_PDS_FORCE_MISC_ISO_EN_W<4> { + CR_PDS_FORCE_MISC_ISO_EN_W::new(self) } - #[doc = "Bit 24"] + #[doc = "Bit 7"] #[inline(always)] - pub fn cr_pds_np_iso_en(&mut self) -> CR_PDS_NP_ISO_EN_W { - CR_PDS_NP_ISO_EN_W { w: self } + #[must_use] + pub fn cr_pds_force_misc_pds_rst(&mut self) -> CR_PDS_FORCE_MISC_PDS_RST_W<7> { + CR_PDS_FORCE_MISC_PDS_RST_W::new(self) } - #[doc = "Bit 13"] + #[doc = "Bit 10"] #[inline(always)] - pub fn cr_pds_force_misc_gate_clk(&mut self) -> CR_PDS_FORCE_MISC_GATE_CLK_W { - CR_PDS_FORCE_MISC_GATE_CLK_W { w: self } + #[must_use] + pub fn cr_pds_force_misc_mem_stby(&mut self) -> CR_PDS_FORCE_MISC_MEM_STBY_W<10> { + CR_PDS_FORCE_MISC_MEM_STBY_W::new(self) } - #[doc = "Bit 10"] + #[doc = "Bit 13"] #[inline(always)] - pub fn cr_pds_force_misc_mem_stby(&mut self) -> CR_PDS_FORCE_MISC_MEM_STBY_W { - CR_PDS_FORCE_MISC_MEM_STBY_W { w: self } + #[must_use] + pub fn cr_pds_force_misc_gate_clk(&mut self) -> CR_PDS_FORCE_MISC_GATE_CLK_W<13> { + CR_PDS_FORCE_MISC_GATE_CLK_W::new(self) } - #[doc = "Bit 7"] + #[doc = "Bit 24"] #[inline(always)] - pub fn cr_pds_force_misc_pds_rst(&mut self) -> CR_PDS_FORCE_MISC_PDS_RST_W { - CR_PDS_FORCE_MISC_PDS_RST_W { w: self } + #[must_use] + pub fn cr_pds_np_iso_en(&mut self) -> CR_PDS_NP_ISO_EN_W<24> { + CR_PDS_NP_ISO_EN_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 27"] #[inline(always)] - pub fn cr_pds_force_misc_iso_en(&mut self) -> CR_PDS_FORCE_MISC_ISO_EN_W { - CR_PDS_FORCE_MISC_ISO_EN_W { w: self } + #[must_use] + pub fn cr_pds_wb_iso_en(&mut self) -> CR_PDS_WB_ISO_EN_W<27> { + CR_PDS_WB_ISO_EN_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 30"] #[inline(always)] - pub fn cr_pds_force_misc_pwr_off(&mut self) -> CR_PDS_FORCE_MISC_PWR_OFF_W { - CR_PDS_FORCE_MISC_PWR_OFF_W { w: self } + #[must_use] + pub fn cr_pds_misc_iso_en(&mut self) -> CR_PDS_MISC_ISO_EN_W<30> { + CR_PDS_MISC_ISO_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -421,11 +181,10 @@ impl crate::Readable for PDS_CTL3_SPEC { #[doc = "`write(|w| ..)` method takes [pds_ctl3::W](W) writer structure"] impl crate::Writable for PDS_CTL3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets PDS_CTL3 to value 0x4900_0000"] impl crate::Resettable for PDS_CTL3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x4900_0000 - } + const RESET_VALUE: Self::Ux = 0x4900_0000; } diff --git a/src/pds/pds_ctl4.rs b/src/pds/pds_ctl4.rs index ffb8e70..9ae2c51 100644 --- a/src/pds/pds_ctl4.rs +++ b/src/pds/pds_ctl4.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,567 +28,199 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `cr_pds_misc_gate_clk` reader - "] -pub struct CR_PDS_MISC_GATE_CLK_R(crate::FieldReader); -impl CR_PDS_MISC_GATE_CLK_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_MISC_GATE_CLK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_MISC_GATE_CLK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_misc_gate_clk` writer - "] -pub struct CR_PDS_MISC_GATE_CLK_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_MISC_GATE_CLK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 27)) | ((value as u32 & 0x01) << 27); - self.w - } -} -#[doc = "Field `cr_pds_misc_mem_stby` reader - "] -pub struct CR_PDS_MISC_MEM_STBY_R(crate::FieldReader); -impl CR_PDS_MISC_MEM_STBY_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_MISC_MEM_STBY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_MISC_MEM_STBY_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_misc_mem_stby` writer - "] -pub struct CR_PDS_MISC_MEM_STBY_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_MISC_MEM_STBY_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 26)) | ((value as u32 & 0x01) << 26); - self.w - } -} -#[doc = "Field `cr_pds_misc_reset` reader - "] -pub struct CR_PDS_MISC_RESET_R(crate::FieldReader); -impl CR_PDS_MISC_RESET_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_MISC_RESET_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_MISC_RESET_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_misc_reset` writer - "] -pub struct CR_PDS_MISC_RESET_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_MISC_RESET_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 25)) | ((value as u32 & 0x01) << 25); - self.w - } -} -#[doc = "Field `cr_pds_misc_pwr_off` reader - "] -pub struct CR_PDS_MISC_PWR_OFF_R(crate::FieldReader); -impl CR_PDS_MISC_PWR_OFF_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_MISC_PWR_OFF_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_MISC_PWR_OFF_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_misc_pwr_off` writer - "] -pub struct CR_PDS_MISC_PWR_OFF_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_MISC_PWR_OFF_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24); - self.w - } -} -#[doc = "Field `cr_pds_wb_gate_clk` reader - "] -pub struct CR_PDS_WB_GATE_CLK_R(crate::FieldReader); -impl CR_PDS_WB_GATE_CLK_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_WB_GATE_CLK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_WB_GATE_CLK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_wb_gate_clk` writer - "] -pub struct CR_PDS_WB_GATE_CLK_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_WB_GATE_CLK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15); - self.w - } -} -#[doc = "Field `cr_pds_wb_mem_stby` reader - "] -pub struct CR_PDS_WB_MEM_STBY_R(crate::FieldReader); -impl CR_PDS_WB_MEM_STBY_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_WB_MEM_STBY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_WB_MEM_STBY_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_wb_mem_stby` writer - "] -pub struct CR_PDS_WB_MEM_STBY_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_WB_MEM_STBY_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14); - self.w - } -} -#[doc = "Field `cr_pds_wb_reset` reader - "] -pub struct CR_PDS_WB_RESET_R(crate::FieldReader); -impl CR_PDS_WB_RESET_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_WB_RESET_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_WB_RESET_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_wb_reset` writer - "] -pub struct CR_PDS_WB_RESET_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_WB_RESET_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13); - self.w - } -} -#[doc = "Field `cr_pds_wb_pwr_off` reader - "] -pub struct CR_PDS_WB_PWR_OFF_R(crate::FieldReader); -impl CR_PDS_WB_PWR_OFF_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_WB_PWR_OFF_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_WB_PWR_OFF_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_wb_pwr_off` writer - "] -pub struct CR_PDS_WB_PWR_OFF_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_WB_PWR_OFF_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} -#[doc = "Field `cr_pds_np_gate_clk` reader - "] -pub struct CR_PDS_NP_GATE_CLK_R(crate::FieldReader); -impl CR_PDS_NP_GATE_CLK_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_NP_GATE_CLK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_NP_GATE_CLK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_np_gate_clk` writer - "] -pub struct CR_PDS_NP_GATE_CLK_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_NP_GATE_CLK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `cr_pds_np_mem_stby` reader - "] -pub struct CR_PDS_NP_MEM_STBY_R(crate::FieldReader); -impl CR_PDS_NP_MEM_STBY_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_NP_MEM_STBY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_NP_MEM_STBY_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_np_mem_stby` writer - "] -pub struct CR_PDS_NP_MEM_STBY_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_NP_MEM_STBY_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `cr_pds_np_reset` reader - "] -pub struct CR_PDS_NP_RESET_R(crate::FieldReader); -impl CR_PDS_NP_RESET_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_NP_RESET_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_NP_RESET_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_np_reset` writer - "] -pub struct CR_PDS_NP_RESET_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_NP_RESET_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `cr_pds_np_pwr_off` reader - "] -pub struct CR_PDS_NP_PWR_OFF_R(crate::FieldReader); -impl CR_PDS_NP_PWR_OFF_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_NP_PWR_OFF_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_NP_PWR_OFF_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_PDS_NP_PWR_OFF_R = crate::BitReader; #[doc = "Field `cr_pds_np_pwr_off` writer - "] -pub struct CR_PDS_NP_PWR_OFF_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_NP_PWR_OFF_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type CR_PDS_NP_PWR_OFF_W<'a, const O: u8> = crate::BitWriter<'a, u32, PDS_CTL4_SPEC, bool, O>; +#[doc = "Field `cr_pds_np_reset` reader - "] +pub type CR_PDS_NP_RESET_R = crate::BitReader; +#[doc = "Field `cr_pds_np_reset` writer - "] +pub type CR_PDS_NP_RESET_W<'a, const O: u8> = crate::BitWriter<'a, u32, PDS_CTL4_SPEC, bool, O>; +#[doc = "Field `cr_pds_np_mem_stby` reader - "] +pub type CR_PDS_NP_MEM_STBY_R = crate::BitReader; +#[doc = "Field `cr_pds_np_mem_stby` writer - "] +pub type CR_PDS_NP_MEM_STBY_W<'a, const O: u8> = crate::BitWriter<'a, u32, PDS_CTL4_SPEC, bool, O>; +#[doc = "Field `cr_pds_np_gate_clk` reader - "] +pub type CR_PDS_NP_GATE_CLK_R = crate::BitReader; +#[doc = "Field `cr_pds_np_gate_clk` writer - "] +pub type CR_PDS_NP_GATE_CLK_W<'a, const O: u8> = crate::BitWriter<'a, u32, PDS_CTL4_SPEC, bool, O>; +#[doc = "Field `cr_pds_wb_pwr_off` reader - "] +pub type CR_PDS_WB_PWR_OFF_R = crate::BitReader; +#[doc = "Field `cr_pds_wb_pwr_off` writer - "] +pub type CR_PDS_WB_PWR_OFF_W<'a, const O: u8> = crate::BitWriter<'a, u32, PDS_CTL4_SPEC, bool, O>; +#[doc = "Field `cr_pds_wb_reset` reader - "] +pub type CR_PDS_WB_RESET_R = crate::BitReader; +#[doc = "Field `cr_pds_wb_reset` writer - "] +pub type CR_PDS_WB_RESET_W<'a, const O: u8> = crate::BitWriter<'a, u32, PDS_CTL4_SPEC, bool, O>; +#[doc = "Field `cr_pds_wb_mem_stby` reader - "] +pub type CR_PDS_WB_MEM_STBY_R = crate::BitReader; +#[doc = "Field `cr_pds_wb_mem_stby` writer - "] +pub type CR_PDS_WB_MEM_STBY_W<'a, const O: u8> = crate::BitWriter<'a, u32, PDS_CTL4_SPEC, bool, O>; +#[doc = "Field `cr_pds_wb_gate_clk` reader - "] +pub type CR_PDS_WB_GATE_CLK_R = crate::BitReader; +#[doc = "Field `cr_pds_wb_gate_clk` writer - "] +pub type CR_PDS_WB_GATE_CLK_W<'a, const O: u8> = crate::BitWriter<'a, u32, PDS_CTL4_SPEC, bool, O>; +#[doc = "Field `cr_pds_misc_pwr_off` reader - "] +pub type CR_PDS_MISC_PWR_OFF_R = crate::BitReader; +#[doc = "Field `cr_pds_misc_pwr_off` writer - "] +pub type CR_PDS_MISC_PWR_OFF_W<'a, const O: u8> = crate::BitWriter<'a, u32, PDS_CTL4_SPEC, bool, O>; +#[doc = "Field `cr_pds_misc_reset` reader - "] +pub type CR_PDS_MISC_RESET_R = crate::BitReader; +#[doc = "Field `cr_pds_misc_reset` writer - "] +pub type CR_PDS_MISC_RESET_W<'a, const O: u8> = crate::BitWriter<'a, u32, PDS_CTL4_SPEC, bool, O>; +#[doc = "Field `cr_pds_misc_mem_stby` reader - "] +pub type CR_PDS_MISC_MEM_STBY_R = crate::BitReader; +#[doc = "Field `cr_pds_misc_mem_stby` writer - "] +pub type CR_PDS_MISC_MEM_STBY_W<'a, const O: u8> = + crate::BitWriter<'a, u32, PDS_CTL4_SPEC, bool, O>; +#[doc = "Field `cr_pds_misc_gate_clk` reader - "] +pub type CR_PDS_MISC_GATE_CLK_R = crate::BitReader; +#[doc = "Field `cr_pds_misc_gate_clk` writer - "] +pub type CR_PDS_MISC_GATE_CLK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, PDS_CTL4_SPEC, bool, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn cr_pds_np_pwr_off(&self) -> CR_PDS_NP_PWR_OFF_R { + CR_PDS_NP_PWR_OFF_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bit 27"] + #[doc = "Bit 1"] #[inline(always)] - pub fn cr_pds_misc_gate_clk(&self) -> CR_PDS_MISC_GATE_CLK_R { - CR_PDS_MISC_GATE_CLK_R::new(((self.bits >> 27) & 0x01) != 0) + pub fn cr_pds_np_reset(&self) -> CR_PDS_NP_RESET_R { + CR_PDS_NP_RESET_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 26"] + #[doc = "Bit 2"] #[inline(always)] - pub fn cr_pds_misc_mem_stby(&self) -> CR_PDS_MISC_MEM_STBY_R { - CR_PDS_MISC_MEM_STBY_R::new(((self.bits >> 26) & 0x01) != 0) + pub fn cr_pds_np_mem_stby(&self) -> CR_PDS_NP_MEM_STBY_R { + CR_PDS_NP_MEM_STBY_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 25"] + #[doc = "Bit 3"] #[inline(always)] - pub fn cr_pds_misc_reset(&self) -> CR_PDS_MISC_RESET_R { - CR_PDS_MISC_RESET_R::new(((self.bits >> 25) & 0x01) != 0) + pub fn cr_pds_np_gate_clk(&self) -> CR_PDS_NP_GATE_CLK_R { + CR_PDS_NP_GATE_CLK_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bit 24"] + #[doc = "Bit 12"] #[inline(always)] - pub fn cr_pds_misc_pwr_off(&self) -> CR_PDS_MISC_PWR_OFF_R { - CR_PDS_MISC_PWR_OFF_R::new(((self.bits >> 24) & 0x01) != 0) + pub fn cr_pds_wb_pwr_off(&self) -> CR_PDS_WB_PWR_OFF_R { + CR_PDS_WB_PWR_OFF_R::new(((self.bits >> 12) & 1) != 0) } - #[doc = "Bit 15"] + #[doc = "Bit 13"] #[inline(always)] - pub fn cr_pds_wb_gate_clk(&self) -> CR_PDS_WB_GATE_CLK_R { - CR_PDS_WB_GATE_CLK_R::new(((self.bits >> 15) & 0x01) != 0) + pub fn cr_pds_wb_reset(&self) -> CR_PDS_WB_RESET_R { + CR_PDS_WB_RESET_R::new(((self.bits >> 13) & 1) != 0) } #[doc = "Bit 14"] #[inline(always)] pub fn cr_pds_wb_mem_stby(&self) -> CR_PDS_WB_MEM_STBY_R { - CR_PDS_WB_MEM_STBY_R::new(((self.bits >> 14) & 0x01) != 0) + CR_PDS_WB_MEM_STBY_R::new(((self.bits >> 14) & 1) != 0) } - #[doc = "Bit 13"] - #[inline(always)] - pub fn cr_pds_wb_reset(&self) -> CR_PDS_WB_RESET_R { - CR_PDS_WB_RESET_R::new(((self.bits >> 13) & 0x01) != 0) - } - #[doc = "Bit 12"] + #[doc = "Bit 15"] #[inline(always)] - pub fn cr_pds_wb_pwr_off(&self) -> CR_PDS_WB_PWR_OFF_R { - CR_PDS_WB_PWR_OFF_R::new(((self.bits >> 12) & 0x01) != 0) + pub fn cr_pds_wb_gate_clk(&self) -> CR_PDS_WB_GATE_CLK_R { + CR_PDS_WB_GATE_CLK_R::new(((self.bits >> 15) & 1) != 0) } - #[doc = "Bit 3"] + #[doc = "Bit 24"] #[inline(always)] - pub fn cr_pds_np_gate_clk(&self) -> CR_PDS_NP_GATE_CLK_R { - CR_PDS_NP_GATE_CLK_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn cr_pds_misc_pwr_off(&self) -> CR_PDS_MISC_PWR_OFF_R { + CR_PDS_MISC_PWR_OFF_R::new(((self.bits >> 24) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bit 25"] #[inline(always)] - pub fn cr_pds_np_mem_stby(&self) -> CR_PDS_NP_MEM_STBY_R { - CR_PDS_NP_MEM_STBY_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn cr_pds_misc_reset(&self) -> CR_PDS_MISC_RESET_R { + CR_PDS_MISC_RESET_R::new(((self.bits >> 25) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 26"] #[inline(always)] - pub fn cr_pds_np_reset(&self) -> CR_PDS_NP_RESET_R { - CR_PDS_NP_RESET_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn cr_pds_misc_mem_stby(&self) -> CR_PDS_MISC_MEM_STBY_R { + CR_PDS_MISC_MEM_STBY_R::new(((self.bits >> 26) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 27"] #[inline(always)] - pub fn cr_pds_np_pwr_off(&self) -> CR_PDS_NP_PWR_OFF_R { - CR_PDS_NP_PWR_OFF_R::new((self.bits & 0x01) != 0) + pub fn cr_pds_misc_gate_clk(&self) -> CR_PDS_MISC_GATE_CLK_R { + CR_PDS_MISC_GATE_CLK_R::new(((self.bits >> 27) & 1) != 0) } } impl W { - #[doc = "Bit 27"] + #[doc = "Bit 0"] #[inline(always)] - pub fn cr_pds_misc_gate_clk(&mut self) -> CR_PDS_MISC_GATE_CLK_W { - CR_PDS_MISC_GATE_CLK_W { w: self } + #[must_use] + pub fn cr_pds_np_pwr_off(&mut self) -> CR_PDS_NP_PWR_OFF_W<0> { + CR_PDS_NP_PWR_OFF_W::new(self) } - #[doc = "Bit 26"] + #[doc = "Bit 1"] #[inline(always)] - pub fn cr_pds_misc_mem_stby(&mut self) -> CR_PDS_MISC_MEM_STBY_W { - CR_PDS_MISC_MEM_STBY_W { w: self } + #[must_use] + pub fn cr_pds_np_reset(&mut self) -> CR_PDS_NP_RESET_W<1> { + CR_PDS_NP_RESET_W::new(self) } - #[doc = "Bit 25"] + #[doc = "Bit 2"] #[inline(always)] - pub fn cr_pds_misc_reset(&mut self) -> CR_PDS_MISC_RESET_W { - CR_PDS_MISC_RESET_W { w: self } + #[must_use] + pub fn cr_pds_np_mem_stby(&mut self) -> CR_PDS_NP_MEM_STBY_W<2> { + CR_PDS_NP_MEM_STBY_W::new(self) } - #[doc = "Bit 24"] + #[doc = "Bit 3"] #[inline(always)] - pub fn cr_pds_misc_pwr_off(&mut self) -> CR_PDS_MISC_PWR_OFF_W { - CR_PDS_MISC_PWR_OFF_W { w: self } + #[must_use] + pub fn cr_pds_np_gate_clk(&mut self) -> CR_PDS_NP_GATE_CLK_W<3> { + CR_PDS_NP_GATE_CLK_W::new(self) } - #[doc = "Bit 15"] + #[doc = "Bit 12"] #[inline(always)] - pub fn cr_pds_wb_gate_clk(&mut self) -> CR_PDS_WB_GATE_CLK_W { - CR_PDS_WB_GATE_CLK_W { w: self } + #[must_use] + pub fn cr_pds_wb_pwr_off(&mut self) -> CR_PDS_WB_PWR_OFF_W<12> { + CR_PDS_WB_PWR_OFF_W::new(self) } - #[doc = "Bit 14"] + #[doc = "Bit 13"] #[inline(always)] - pub fn cr_pds_wb_mem_stby(&mut self) -> CR_PDS_WB_MEM_STBY_W { - CR_PDS_WB_MEM_STBY_W { w: self } + #[must_use] + pub fn cr_pds_wb_reset(&mut self) -> CR_PDS_WB_RESET_W<13> { + CR_PDS_WB_RESET_W::new(self) } - #[doc = "Bit 13"] + #[doc = "Bit 14"] #[inline(always)] - pub fn cr_pds_wb_reset(&mut self) -> CR_PDS_WB_RESET_W { - CR_PDS_WB_RESET_W { w: self } + #[must_use] + pub fn cr_pds_wb_mem_stby(&mut self) -> CR_PDS_WB_MEM_STBY_W<14> { + CR_PDS_WB_MEM_STBY_W::new(self) } - #[doc = "Bit 12"] + #[doc = "Bit 15"] #[inline(always)] - pub fn cr_pds_wb_pwr_off(&mut self) -> CR_PDS_WB_PWR_OFF_W { - CR_PDS_WB_PWR_OFF_W { w: self } + #[must_use] + pub fn cr_pds_wb_gate_clk(&mut self) -> CR_PDS_WB_GATE_CLK_W<15> { + CR_PDS_WB_GATE_CLK_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bit 24"] #[inline(always)] - pub fn cr_pds_np_gate_clk(&mut self) -> CR_PDS_NP_GATE_CLK_W { - CR_PDS_NP_GATE_CLK_W { w: self } + #[must_use] + pub fn cr_pds_misc_pwr_off(&mut self) -> CR_PDS_MISC_PWR_OFF_W<24> { + CR_PDS_MISC_PWR_OFF_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bit 25"] #[inline(always)] - pub fn cr_pds_np_mem_stby(&mut self) -> CR_PDS_NP_MEM_STBY_W { - CR_PDS_NP_MEM_STBY_W { w: self } + #[must_use] + pub fn cr_pds_misc_reset(&mut self) -> CR_PDS_MISC_RESET_W<25> { + CR_PDS_MISC_RESET_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 26"] #[inline(always)] - pub fn cr_pds_np_reset(&mut self) -> CR_PDS_NP_RESET_W { - CR_PDS_NP_RESET_W { w: self } + #[must_use] + pub fn cr_pds_misc_mem_stby(&mut self) -> CR_PDS_MISC_MEM_STBY_W<26> { + CR_PDS_MISC_MEM_STBY_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 27"] #[inline(always)] - pub fn cr_pds_np_pwr_off(&mut self) -> CR_PDS_NP_PWR_OFF_W { - CR_PDS_NP_PWR_OFF_W { w: self } + #[must_use] + pub fn cr_pds_misc_gate_clk(&mut self) -> CR_PDS_MISC_GATE_CLK_W<27> { + CR_PDS_MISC_GATE_CLK_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -605,11 +238,10 @@ impl crate::Readable for PDS_CTL4_SPEC { #[doc = "`write(|w| ..)` method takes [pds_ctl4::W](W) writer structure"] impl crate::Writable for PDS_CTL4_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets PDS_CTL4 to value 0x0f00_f00f"] impl crate::Resettable for PDS_CTL4_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0f00_f00f - } + const RESET_VALUE: Self::Ux = 0x0f00_f00f; } diff --git a/src/pds/pds_int.rs b/src/pds/pds_int.rs index 274a8c2..f7b31b7 100644 --- a/src/pds/pds_int.rs +++ b/src/pds/pds_int.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,321 +28,122 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `cr_pds_int_clr` reader - "] -pub struct CR_PDS_INT_CLR_R(crate::FieldReader); -impl CR_PDS_INT_CLR_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_INT_CLR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_INT_CLR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_int_clr` writer - "] -pub struct CR_PDS_INT_CLR_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_INT_CLR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `cr_pds_pll_done_int_mask` reader - "] -pub struct CR_PDS_PLL_DONE_INT_MASK_R(crate::FieldReader); -impl CR_PDS_PLL_DONE_INT_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_PLL_DONE_INT_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_PLL_DONE_INT_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_pll_done_int_mask` writer - "] -pub struct CR_PDS_PLL_DONE_INT_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_PLL_DONE_INT_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w - } -} -#[doc = "Field `cr_pds_rf_done_int_mask` reader - "] -pub struct CR_PDS_RF_DONE_INT_MASK_R(crate::FieldReader); -impl CR_PDS_RF_DONE_INT_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_RF_DONE_INT_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_RF_DONE_INT_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_rf_done_int_mask` writer - "] -pub struct CR_PDS_RF_DONE_INT_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_RF_DONE_INT_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); - self.w - } -} -#[doc = "Field `cr_pds_irq_in_dis` reader - "] -pub struct CR_PDS_IRQ_IN_DIS_R(crate::FieldReader); -impl CR_PDS_IRQ_IN_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_IRQ_IN_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_IRQ_IN_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_pds_irq_in_dis` writer - "] -pub struct CR_PDS_IRQ_IN_DIS_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_IRQ_IN_DIS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w - } -} +#[doc = "Field `ro_pds_wake_int` reader - "] +pub type RO_PDS_WAKE_INT_R = crate::BitReader; +#[doc = "Field `ro_pds_irq_in` reader - "] +pub type RO_PDS_IRQ_IN_R = crate::BitReader; +#[doc = "Field `ro_pds_rf_done_int` reader - "] +pub type RO_PDS_RF_DONE_INT_R = crate::BitReader; +#[doc = "Field `ro_pds_pll_done_int` reader - "] +pub type RO_PDS_PLL_DONE_INT_R = crate::BitReader; #[doc = "Field `cr_pds_wake_int_mask` reader - "] -pub struct CR_PDS_WAKE_INT_MASK_R(crate::FieldReader); -impl CR_PDS_WAKE_INT_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - CR_PDS_WAKE_INT_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_PDS_WAKE_INT_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_PDS_WAKE_INT_MASK_R = crate::BitReader; #[doc = "Field `cr_pds_wake_int_mask` writer - "] -pub struct CR_PDS_WAKE_INT_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> CR_PDS_WAKE_INT_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `ro_pds_pll_done_int` reader - "] -pub struct RO_PDS_PLL_DONE_INT_R(crate::FieldReader); -impl RO_PDS_PLL_DONE_INT_R { - pub(crate) fn new(bits: bool) -> Self { - RO_PDS_PLL_DONE_INT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RO_PDS_PLL_DONE_INT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ro_pds_rf_done_int` reader - "] -pub struct RO_PDS_RF_DONE_INT_R(crate::FieldReader); -impl RO_PDS_RF_DONE_INT_R { - pub(crate) fn new(bits: bool) -> Self { - RO_PDS_RF_DONE_INT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RO_PDS_RF_DONE_INT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ro_pds_irq_in` reader - "] -pub struct RO_PDS_IRQ_IN_R(crate::FieldReader); -impl RO_PDS_IRQ_IN_R { - pub(crate) fn new(bits: bool) -> Self { - RO_PDS_IRQ_IN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RO_PDS_IRQ_IN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ro_pds_wake_int` reader - "] -pub struct RO_PDS_WAKE_INT_R(crate::FieldReader); -impl RO_PDS_WAKE_INT_R { - pub(crate) fn new(bits: bool) -> Self { - RO_PDS_WAKE_INT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RO_PDS_WAKE_INT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_PDS_WAKE_INT_MASK_W<'a, const O: u8> = crate::BitWriter<'a, u32, PDS_INT_SPEC, bool, O>; +#[doc = "Field `cr_pds_irq_in_dis` reader - "] +pub type CR_PDS_IRQ_IN_DIS_R = crate::BitReader; +#[doc = "Field `cr_pds_irq_in_dis` writer - "] +pub type CR_PDS_IRQ_IN_DIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, PDS_INT_SPEC, bool, O>; +#[doc = "Field `cr_pds_rf_done_int_mask` reader - "] +pub type CR_PDS_RF_DONE_INT_MASK_R = crate::BitReader; +#[doc = "Field `cr_pds_rf_done_int_mask` writer - "] +pub type CR_PDS_RF_DONE_INT_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, PDS_INT_SPEC, bool, O>; +#[doc = "Field `cr_pds_pll_done_int_mask` reader - "] +pub type CR_PDS_PLL_DONE_INT_MASK_R = crate::BitReader; +#[doc = "Field `cr_pds_pll_done_int_mask` writer - "] +pub type CR_PDS_PLL_DONE_INT_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, PDS_INT_SPEC, bool, O>; +#[doc = "Field `cr_pds_int_clr` reader - "] +pub type CR_PDS_INT_CLR_R = crate::BitReader; +#[doc = "Field `cr_pds_int_clr` writer - "] +pub type CR_PDS_INT_CLR_W<'a, const O: u8> = crate::BitWriter<'a, u32, PDS_INT_SPEC, bool, O>; impl R { - #[doc = "Bit 16"] + #[doc = "Bit 0"] #[inline(always)] - pub fn cr_pds_int_clr(&self) -> CR_PDS_INT_CLR_R { - CR_PDS_INT_CLR_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn ro_pds_wake_int(&self) -> RO_PDS_WAKE_INT_R { + RO_PDS_WAKE_INT_R::new((self.bits & 1) != 0) } - #[doc = "Bit 11"] + #[doc = "Bit 1"] #[inline(always)] - pub fn cr_pds_pll_done_int_mask(&self) -> CR_PDS_PLL_DONE_INT_MASK_R { - CR_PDS_PLL_DONE_INT_MASK_R::new(((self.bits >> 11) & 0x01) != 0) + pub fn ro_pds_irq_in(&self) -> RO_PDS_IRQ_IN_R { + RO_PDS_IRQ_IN_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 10"] + #[doc = "Bit 2"] #[inline(always)] - pub fn cr_pds_rf_done_int_mask(&self) -> CR_PDS_RF_DONE_INT_MASK_R { - CR_PDS_RF_DONE_INT_MASK_R::new(((self.bits >> 10) & 0x01) != 0) + pub fn ro_pds_rf_done_int(&self) -> RO_PDS_RF_DONE_INT_R { + RO_PDS_RF_DONE_INT_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 9"] + #[doc = "Bit 3"] #[inline(always)] - pub fn cr_pds_irq_in_dis(&self) -> CR_PDS_IRQ_IN_DIS_R { - CR_PDS_IRQ_IN_DIS_R::new(((self.bits >> 9) & 0x01) != 0) + pub fn ro_pds_pll_done_int(&self) -> RO_PDS_PLL_DONE_INT_R { + RO_PDS_PLL_DONE_INT_R::new(((self.bits >> 3) & 1) != 0) } #[doc = "Bit 8"] #[inline(always)] pub fn cr_pds_wake_int_mask(&self) -> CR_PDS_WAKE_INT_MASK_R { - CR_PDS_WAKE_INT_MASK_R::new(((self.bits >> 8) & 0x01) != 0) + CR_PDS_WAKE_INT_MASK_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bit 3"] + #[doc = "Bit 9"] #[inline(always)] - pub fn ro_pds_pll_done_int(&self) -> RO_PDS_PLL_DONE_INT_R { - RO_PDS_PLL_DONE_INT_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn cr_pds_irq_in_dis(&self) -> CR_PDS_IRQ_IN_DIS_R { + CR_PDS_IRQ_IN_DIS_R::new(((self.bits >> 9) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bit 10"] #[inline(always)] - pub fn ro_pds_rf_done_int(&self) -> RO_PDS_RF_DONE_INT_R { - RO_PDS_RF_DONE_INT_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn cr_pds_rf_done_int_mask(&self) -> CR_PDS_RF_DONE_INT_MASK_R { + CR_PDS_RF_DONE_INT_MASK_R::new(((self.bits >> 10) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 11"] #[inline(always)] - pub fn ro_pds_irq_in(&self) -> RO_PDS_IRQ_IN_R { - RO_PDS_IRQ_IN_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn cr_pds_pll_done_int_mask(&self) -> CR_PDS_PLL_DONE_INT_MASK_R { + CR_PDS_PLL_DONE_INT_MASK_R::new(((self.bits >> 11) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 16"] #[inline(always)] - pub fn ro_pds_wake_int(&self) -> RO_PDS_WAKE_INT_R { - RO_PDS_WAKE_INT_R::new((self.bits & 0x01) != 0) + pub fn cr_pds_int_clr(&self) -> CR_PDS_INT_CLR_R { + CR_PDS_INT_CLR_R::new(((self.bits >> 16) & 1) != 0) } } impl W { - #[doc = "Bit 16"] + #[doc = "Bit 8"] #[inline(always)] - pub fn cr_pds_int_clr(&mut self) -> CR_PDS_INT_CLR_W { - CR_PDS_INT_CLR_W { w: self } + #[must_use] + pub fn cr_pds_wake_int_mask(&mut self) -> CR_PDS_WAKE_INT_MASK_W<8> { + CR_PDS_WAKE_INT_MASK_W::new(self) } - #[doc = "Bit 11"] + #[doc = "Bit 9"] #[inline(always)] - pub fn cr_pds_pll_done_int_mask(&mut self) -> CR_PDS_PLL_DONE_INT_MASK_W { - CR_PDS_PLL_DONE_INT_MASK_W { w: self } + #[must_use] + pub fn cr_pds_irq_in_dis(&mut self) -> CR_PDS_IRQ_IN_DIS_W<9> { + CR_PDS_IRQ_IN_DIS_W::new(self) } #[doc = "Bit 10"] #[inline(always)] - pub fn cr_pds_rf_done_int_mask(&mut self) -> CR_PDS_RF_DONE_INT_MASK_W { - CR_PDS_RF_DONE_INT_MASK_W { w: self } + #[must_use] + pub fn cr_pds_rf_done_int_mask(&mut self) -> CR_PDS_RF_DONE_INT_MASK_W<10> { + CR_PDS_RF_DONE_INT_MASK_W::new(self) } - #[doc = "Bit 9"] + #[doc = "Bit 11"] #[inline(always)] - pub fn cr_pds_irq_in_dis(&mut self) -> CR_PDS_IRQ_IN_DIS_W { - CR_PDS_IRQ_IN_DIS_W { w: self } + #[must_use] + pub fn cr_pds_pll_done_int_mask(&mut self) -> CR_PDS_PLL_DONE_INT_MASK_W<11> { + CR_PDS_PLL_DONE_INT_MASK_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bit 16"] #[inline(always)] - pub fn cr_pds_wake_int_mask(&mut self) -> CR_PDS_WAKE_INT_MASK_W { - CR_PDS_WAKE_INT_MASK_W { w: self } + #[must_use] + pub fn cr_pds_int_clr(&mut self) -> CR_PDS_INT_CLR_W<16> { + CR_PDS_INT_CLR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -359,11 +161,10 @@ impl crate::Readable for PDS_INT_SPEC { #[doc = "`write(|w| ..)` method takes [pds_int::W](W) writer structure"] impl crate::Writable for PDS_INT_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets PDS_INT to value 0"] impl crate::Resettable for PDS_INT_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/pds/pds_ram1.rs b/src/pds/pds_ram1.rs index 479a888..fbeac2d 100644 --- a/src/pds/pds_ram1.rs +++ b/src/pds/pds_ram1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,37 +28,17 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `cr_np_sram_pwr` reader - "] -pub struct CR_NP_SRAM_PWR_R(crate::FieldReader); -impl CR_NP_SRAM_PWR_R { - pub(crate) fn new(bits: u8) -> Self { - CR_NP_SRAM_PWR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_NP_SRAM_PWR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_NP_SRAM_PWR_R = crate::FieldReader; #[doc = "Field `cr_np_sram_pwr` writer - "] -pub struct CR_NP_SRAM_PWR_W<'a> { - w: &'a mut W, -} -impl<'a> CR_NP_SRAM_PWR_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff); - self.w - } -} +pub type CR_NP_SRAM_PWR_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PDS_RAM1_SPEC, u8, u8, 8, O>; impl R { #[doc = "Bits 0:7"] #[inline(always)] @@ -68,10 +49,12 @@ impl R { impl W { #[doc = "Bits 0:7"] #[inline(always)] - pub fn cr_np_sram_pwr(&mut self) -> CR_NP_SRAM_PWR_W { - CR_NP_SRAM_PWR_W { w: self } + #[must_use] + pub fn cr_np_sram_pwr(&mut self) -> CR_NP_SRAM_PWR_W<0> { + CR_NP_SRAM_PWR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for PDS_RAM1_SPEC { #[doc = "`write(|w| ..)` method takes [pds_ram1::W](W) writer structure"] impl crate::Writable for PDS_RAM1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pds_ram1 to value 0"] impl crate::Resettable for PDS_RAM1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/pds/pds_stat.rs b/src/pds/pds_stat.rs index 49bdadf..9bfcf9d 100644 --- a/src/pds/pds_stat.rs +++ b/src/pds/pds_stat.rs @@ -7,68 +7,33 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `ro_pds_pll_state` reader - "] -pub struct RO_PDS_PLL_STATE_R(crate::FieldReader); -impl RO_PDS_PLL_STATE_R { - pub(crate) fn new(bits: u8) -> Self { - RO_PDS_PLL_STATE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RO_PDS_PLL_STATE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ro_pds_rf_state` reader - "] -pub struct RO_PDS_RF_STATE_R(crate::FieldReader); -impl RO_PDS_RF_STATE_R { - pub(crate) fn new(bits: u8) -> Self { - RO_PDS_RF_STATE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RO_PDS_RF_STATE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} #[doc = "Field `ro_pds_state` reader - "] -pub struct RO_PDS_STATE_R(crate::FieldReader); -impl RO_PDS_STATE_R { - pub(crate) fn new(bits: u8) -> Self { - RO_PDS_STATE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RO_PDS_STATE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RO_PDS_STATE_R = crate::FieldReader; +#[doc = "Field `ro_pds_rf_state` reader - "] +pub type RO_PDS_RF_STATE_R = crate::FieldReader; +#[doc = "Field `ro_pds_pll_state` reader - "] +pub type RO_PDS_PLL_STATE_R = crate::FieldReader; impl R { - #[doc = "Bits 16:17"] + #[doc = "Bits 0:3"] #[inline(always)] - pub fn ro_pds_pll_state(&self) -> RO_PDS_PLL_STATE_R { - RO_PDS_PLL_STATE_R::new(((self.bits >> 16) & 0x03) as u8) + pub fn ro_pds_state(&self) -> RO_PDS_STATE_R { + RO_PDS_STATE_R::new((self.bits & 0x0f) as u8) } #[doc = "Bits 8:11"] #[inline(always)] pub fn ro_pds_rf_state(&self) -> RO_PDS_RF_STATE_R { RO_PDS_RF_STATE_R::new(((self.bits >> 8) & 0x0f) as u8) } - #[doc = "Bits 0:3"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn ro_pds_state(&self) -> RO_PDS_STATE_R { - RO_PDS_STATE_R::new((self.bits & 0x0f) as u8) + pub fn ro_pds_pll_state(&self) -> RO_PDS_PLL_STATE_R { + RO_PDS_PLL_STATE_R::new(((self.bits >> 16) & 3) as u8) } } #[doc = "pds_stat.\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 [pds_stat](index.html) module"] @@ -82,8 +47,5 @@ impl crate::Readable for PDS_STAT_SPEC { } #[doc = "`reset()` method sets pds_stat to value 0"] impl crate::Resettable for PDS_STAT_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/pds/pds_time1.rs b/src/pds/pds_time1.rs index de2dbc0..7fee954 100644 --- a/src/pds/pds_time1.rs +++ b/src/pds/pds_time1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `cr_sleep_duration` reader - "] -pub struct CR_SLEEP_DURATION_R(crate::FieldReader); -impl CR_SLEEP_DURATION_R { - pub(crate) fn new(bits: u32) -> Self { - CR_SLEEP_DURATION_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_SLEEP_DURATION_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_SLEEP_DURATION_R = crate::FieldReader; #[doc = "Field `cr_sleep_duration` writer - "] -pub struct CR_SLEEP_DURATION_W<'a> { - w: &'a mut W, -} -impl<'a> CR_SLEEP_DURATION_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type CR_SLEEP_DURATION_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PDS_TIME1_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn cr_sleep_duration(&self) -> CR_SLEEP_DURATION_R { - CR_SLEEP_DURATION_R::new((self.bits & 0xffff_ffff) as u32) + CR_SLEEP_DURATION_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn cr_sleep_duration(&mut self) -> CR_SLEEP_DURATION_W { - CR_SLEEP_DURATION_W { w: self } + #[must_use] + pub fn cr_sleep_duration(&mut self) -> CR_SLEEP_DURATION_W<0> { + CR_SLEEP_DURATION_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for PDS_TIME1_SPEC { #[doc = "`write(|w| ..)` method takes [pds_time1::W](W) writer structure"] impl crate::Writable for PDS_TIME1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets PDS_TIME1 to value 0x0ca8"] impl crate::Resettable for PDS_TIME1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0ca8 - } + const RESET_VALUE: Self::Ux = 0x0ca8; } diff --git a/src/pds/pu_rst_clkpll.rs b/src/pds/pu_rst_clkpll.rs index 62a4443..626b5ed 100644 --- a/src/pds/pu_rst_clkpll.rs +++ b/src/pds/pu_rst_clkpll.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,521 +28,189 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `pu_clkpll` reader - "] -pub struct PU_CLKPLL_R(crate::FieldReader); -impl PU_CLKPLL_R { - pub(crate) fn new(bits: bool) -> Self { - PU_CLKPLL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_CLKPLL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_clkpll` writer - "] -pub struct PU_CLKPLL_W<'a> { - w: &'a mut W, -} -impl<'a> PU_CLKPLL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); - self.w - } -} -#[doc = "Field `pu_clkpll_sfreg` reader - "] -pub struct PU_CLKPLL_SFREG_R(crate::FieldReader); -impl PU_CLKPLL_SFREG_R { - pub(crate) fn new(bits: bool) -> Self { - PU_CLKPLL_SFREG_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_CLKPLL_SFREG_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_clkpll_sfreg` writer - "] -pub struct PU_CLKPLL_SFREG_W<'a> { - w: &'a mut W, -} -impl<'a> PU_CLKPLL_SFREG_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w - } -} -#[doc = "Field `clkpll_pu_cp` reader - "] -pub struct CLKPLL_PU_CP_R(crate::FieldReader); -impl CLKPLL_PU_CP_R { - pub(crate) fn new(bits: bool) -> Self { - CLKPLL_PU_CP_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_PU_CP_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_pu_cp` writer - "] -pub struct CLKPLL_PU_CP_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_PU_CP_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `clkpll_pu_pfd` reader - "] -pub struct CLKPLL_PU_PFD_R(crate::FieldReader); -impl CLKPLL_PU_PFD_R { - pub(crate) fn new(bits: bool) -> Self { - CLKPLL_PU_PFD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_PU_PFD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_pu_pfd` writer - "] -pub struct CLKPLL_PU_PFD_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_PU_PFD_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7); - self.w - } -} -#[doc = "Field `clkpll_pu_clamp_op` reader - "] -pub struct CLKPLL_PU_CLAMP_OP_R(crate::FieldReader); -impl CLKPLL_PU_CLAMP_OP_R { - pub(crate) fn new(bits: bool) -> Self { - CLKPLL_PU_CLAMP_OP_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_PU_CLAMP_OP_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_pu_clamp_op` writer - "] -pub struct CLKPLL_PU_CLAMP_OP_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_PU_CLAMP_OP_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w - } -} -#[doc = "Field `clkpll_pu_fbdv` reader - "] -pub struct CLKPLL_PU_FBDV_R(crate::FieldReader); -impl CLKPLL_PU_FBDV_R { - pub(crate) fn new(bits: bool) -> Self { - CLKPLL_PU_FBDV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_PU_FBDV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_pu_fbdv` writer - "] -pub struct CLKPLL_PU_FBDV_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_PU_FBDV_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w - } -} -#[doc = "Field `clkpll_pu_postdiv` reader - "] -pub struct CLKPLL_PU_POSTDIV_R(crate::FieldReader); -impl CLKPLL_PU_POSTDIV_R { - pub(crate) fn new(bits: bool) -> Self { - CLKPLL_PU_POSTDIV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_PU_POSTDIV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_pu_postdiv` writer - "] -pub struct CLKPLL_PU_POSTDIV_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_PU_POSTDIV_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} -#[doc = "Field `clkpll_reset_refdiv` reader - "] -pub struct CLKPLL_RESET_REFDIV_R(crate::FieldReader); -impl CLKPLL_RESET_REFDIV_R { - pub(crate) fn new(bits: bool) -> Self { - CLKPLL_RESET_REFDIV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_RESET_REFDIV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_reset_refdiv` writer - "] -pub struct CLKPLL_RESET_REFDIV_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_RESET_REFDIV_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `clkpll_reset_fbdv` reader - "] -pub struct CLKPLL_RESET_FBDV_R(crate::FieldReader); -impl CLKPLL_RESET_FBDV_R { - pub(crate) fn new(bits: bool) -> Self { - CLKPLL_RESET_FBDV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_RESET_FBDV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_reset_fbdv` writer - "] -pub struct CLKPLL_RESET_FBDV_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_RESET_FBDV_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `clkpll_reset_postdiv` reader - "] -pub struct CLKPLL_RESET_POSTDIV_R(crate::FieldReader); -impl CLKPLL_RESET_POSTDIV_R { - pub(crate) fn new(bits: bool) -> Self { - CLKPLL_RESET_POSTDIV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_RESET_POSTDIV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_reset_postdiv` writer - "] -pub struct CLKPLL_RESET_POSTDIV_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_RESET_POSTDIV_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `clkpll_sdm_reset` reader - "] -pub struct CLKPLL_SDM_RESET_R(crate::FieldReader); -impl CLKPLL_SDM_RESET_R { - pub(crate) fn new(bits: bool) -> Self { - CLKPLL_SDM_RESET_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_SDM_RESET_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CLKPLL_SDM_RESET_R = crate::BitReader; #[doc = "Field `clkpll_sdm_reset` writer - "] -pub struct CLKPLL_SDM_RESET_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_SDM_RESET_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type CLKPLL_SDM_RESET_W<'a, const O: u8> = + crate::BitWriter<'a, u32, PU_RST_CLKPLL_SPEC, bool, O>; +#[doc = "Field `clkpll_reset_postdiv` reader - "] +pub type CLKPLL_RESET_POSTDIV_R = crate::BitReader; +#[doc = "Field `clkpll_reset_postdiv` writer - "] +pub type CLKPLL_RESET_POSTDIV_W<'a, const O: u8> = + crate::BitWriter<'a, u32, PU_RST_CLKPLL_SPEC, bool, O>; +#[doc = "Field `clkpll_reset_fbdv` reader - "] +pub type CLKPLL_RESET_FBDV_R = crate::BitReader; +#[doc = "Field `clkpll_reset_fbdv` writer - "] +pub type CLKPLL_RESET_FBDV_W<'a, const O: u8> = + crate::BitWriter<'a, u32, PU_RST_CLKPLL_SPEC, bool, O>; +#[doc = "Field `clkpll_reset_refdiv` reader - "] +pub type CLKPLL_RESET_REFDIV_R = crate::BitReader; +#[doc = "Field `clkpll_reset_refdiv` writer - "] +pub type CLKPLL_RESET_REFDIV_W<'a, const O: u8> = + crate::BitWriter<'a, u32, PU_RST_CLKPLL_SPEC, bool, O>; +#[doc = "Field `clkpll_pu_postdiv` reader - "] +pub type CLKPLL_PU_POSTDIV_R = crate::BitReader; +#[doc = "Field `clkpll_pu_postdiv` writer - "] +pub type CLKPLL_PU_POSTDIV_W<'a, const O: u8> = + crate::BitWriter<'a, u32, PU_RST_CLKPLL_SPEC, bool, O>; +#[doc = "Field `clkpll_pu_fbdv` reader - "] +pub type CLKPLL_PU_FBDV_R = crate::BitReader; +#[doc = "Field `clkpll_pu_fbdv` writer - "] +pub type CLKPLL_PU_FBDV_W<'a, const O: u8> = crate::BitWriter<'a, u32, PU_RST_CLKPLL_SPEC, bool, O>; +#[doc = "Field `clkpll_pu_clamp_op` reader - "] +pub type CLKPLL_PU_CLAMP_OP_R = crate::BitReader; +#[doc = "Field `clkpll_pu_clamp_op` writer - "] +pub type CLKPLL_PU_CLAMP_OP_W<'a, const O: u8> = + crate::BitWriter<'a, u32, PU_RST_CLKPLL_SPEC, bool, O>; +#[doc = "Field `clkpll_pu_pfd` reader - "] +pub type CLKPLL_PU_PFD_R = crate::BitReader; +#[doc = "Field `clkpll_pu_pfd` writer - "] +pub type CLKPLL_PU_PFD_W<'a, const O: u8> = crate::BitWriter<'a, u32, PU_RST_CLKPLL_SPEC, bool, O>; +#[doc = "Field `clkpll_pu_cp` reader - "] +pub type CLKPLL_PU_CP_R = crate::BitReader; +#[doc = "Field `clkpll_pu_cp` writer - "] +pub type CLKPLL_PU_CP_W<'a, const O: u8> = crate::BitWriter<'a, u32, PU_RST_CLKPLL_SPEC, bool, O>; +#[doc = "Field `pu_clkpll_sfreg` reader - "] +pub type PU_CLKPLL_SFREG_R = crate::BitReader; +#[doc = "Field `pu_clkpll_sfreg` writer - "] +pub type PU_CLKPLL_SFREG_W<'a, const O: u8> = + crate::BitWriter<'a, u32, PU_RST_CLKPLL_SPEC, bool, O>; +#[doc = "Field `pu_clkpll` reader - "] +pub type PU_CLKPLL_R = crate::BitReader; +#[doc = "Field `pu_clkpll` writer - "] +pub type PU_CLKPLL_W<'a, const O: u8> = crate::BitWriter<'a, u32, PU_RST_CLKPLL_SPEC, bool, O>; impl R { - #[doc = "Bit 10"] + #[doc = "Bit 0"] #[inline(always)] - pub fn pu_clkpll(&self) -> PU_CLKPLL_R { - PU_CLKPLL_R::new(((self.bits >> 10) & 0x01) != 0) + pub fn clkpll_sdm_reset(&self) -> CLKPLL_SDM_RESET_R { + CLKPLL_SDM_RESET_R::new((self.bits & 1) != 0) } - #[doc = "Bit 9"] + #[doc = "Bit 1"] #[inline(always)] - pub fn pu_clkpll_sfreg(&self) -> PU_CLKPLL_SFREG_R { - PU_CLKPLL_SFREG_R::new(((self.bits >> 9) & 0x01) != 0) + pub fn clkpll_reset_postdiv(&self) -> CLKPLL_RESET_POSTDIV_R { + CLKPLL_RESET_POSTDIV_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 8"] + #[doc = "Bit 2"] #[inline(always)] - pub fn clkpll_pu_cp(&self) -> CLKPLL_PU_CP_R { - CLKPLL_PU_CP_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn clkpll_reset_fbdv(&self) -> CLKPLL_RESET_FBDV_R { + CLKPLL_RESET_FBDV_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 7"] + #[doc = "Bit 3"] #[inline(always)] - pub fn clkpll_pu_pfd(&self) -> CLKPLL_PU_PFD_R { - CLKPLL_PU_PFD_R::new(((self.bits >> 7) & 0x01) != 0) + pub fn clkpll_reset_refdiv(&self) -> CLKPLL_RESET_REFDIV_R { + CLKPLL_RESET_REFDIV_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bit 6"] + #[doc = "Bit 4"] #[inline(always)] - pub fn clkpll_pu_clamp_op(&self) -> CLKPLL_PU_CLAMP_OP_R { - CLKPLL_PU_CLAMP_OP_R::new(((self.bits >> 6) & 0x01) != 0) + pub fn clkpll_pu_postdiv(&self) -> CLKPLL_PU_POSTDIV_R { + CLKPLL_PU_POSTDIV_R::new(((self.bits >> 4) & 1) != 0) } #[doc = "Bit 5"] #[inline(always)] pub fn clkpll_pu_fbdv(&self) -> CLKPLL_PU_FBDV_R { - CLKPLL_PU_FBDV_R::new(((self.bits >> 5) & 0x01) != 0) + CLKPLL_PU_FBDV_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 4"] + #[doc = "Bit 6"] #[inline(always)] - pub fn clkpll_pu_postdiv(&self) -> CLKPLL_PU_POSTDIV_R { - CLKPLL_PU_POSTDIV_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn clkpll_pu_clamp_op(&self) -> CLKPLL_PU_CLAMP_OP_R { + CLKPLL_PU_CLAMP_OP_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = "Bit 3"] + #[doc = "Bit 7"] #[inline(always)] - pub fn clkpll_reset_refdiv(&self) -> CLKPLL_RESET_REFDIV_R { - CLKPLL_RESET_REFDIV_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn clkpll_pu_pfd(&self) -> CLKPLL_PU_PFD_R { + CLKPLL_PU_PFD_R::new(((self.bits >> 7) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bit 8"] #[inline(always)] - pub fn clkpll_reset_fbdv(&self) -> CLKPLL_RESET_FBDV_R { - CLKPLL_RESET_FBDV_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn clkpll_pu_cp(&self) -> CLKPLL_PU_CP_R { + CLKPLL_PU_CP_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 9"] #[inline(always)] - pub fn clkpll_reset_postdiv(&self) -> CLKPLL_RESET_POSTDIV_R { - CLKPLL_RESET_POSTDIV_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn pu_clkpll_sfreg(&self) -> PU_CLKPLL_SFREG_R { + PU_CLKPLL_SFREG_R::new(((self.bits >> 9) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 10"] #[inline(always)] - pub fn clkpll_sdm_reset(&self) -> CLKPLL_SDM_RESET_R { - CLKPLL_SDM_RESET_R::new((self.bits & 0x01) != 0) + pub fn pu_clkpll(&self) -> PU_CLKPLL_R { + PU_CLKPLL_R::new(((self.bits >> 10) & 1) != 0) } } impl W { - #[doc = "Bit 10"] + #[doc = "Bit 0"] #[inline(always)] - pub fn pu_clkpll(&mut self) -> PU_CLKPLL_W { - PU_CLKPLL_W { w: self } + #[must_use] + pub fn clkpll_sdm_reset(&mut self) -> CLKPLL_SDM_RESET_W<0> { + CLKPLL_SDM_RESET_W::new(self) } - #[doc = "Bit 9"] + #[doc = "Bit 1"] #[inline(always)] - pub fn pu_clkpll_sfreg(&mut self) -> PU_CLKPLL_SFREG_W { - PU_CLKPLL_SFREG_W { w: self } + #[must_use] + pub fn clkpll_reset_postdiv(&mut self) -> CLKPLL_RESET_POSTDIV_W<1> { + CLKPLL_RESET_POSTDIV_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bit 2"] #[inline(always)] - pub fn clkpll_pu_cp(&mut self) -> CLKPLL_PU_CP_W { - CLKPLL_PU_CP_W { w: self } + #[must_use] + pub fn clkpll_reset_fbdv(&mut self) -> CLKPLL_RESET_FBDV_W<2> { + CLKPLL_RESET_FBDV_W::new(self) } - #[doc = "Bit 7"] + #[doc = "Bit 3"] #[inline(always)] - pub fn clkpll_pu_pfd(&mut self) -> CLKPLL_PU_PFD_W { - CLKPLL_PU_PFD_W { w: self } + #[must_use] + pub fn clkpll_reset_refdiv(&mut self) -> CLKPLL_RESET_REFDIV_W<3> { + CLKPLL_RESET_REFDIV_W::new(self) } - #[doc = "Bit 6"] + #[doc = "Bit 4"] #[inline(always)] - pub fn clkpll_pu_clamp_op(&mut self) -> CLKPLL_PU_CLAMP_OP_W { - CLKPLL_PU_CLAMP_OP_W { w: self } + #[must_use] + pub fn clkpll_pu_postdiv(&mut self) -> CLKPLL_PU_POSTDIV_W<4> { + CLKPLL_PU_POSTDIV_W::new(self) } #[doc = "Bit 5"] #[inline(always)] - pub fn clkpll_pu_fbdv(&mut self) -> CLKPLL_PU_FBDV_W { - CLKPLL_PU_FBDV_W { w: self } + #[must_use] + pub fn clkpll_pu_fbdv(&mut self) -> CLKPLL_PU_FBDV_W<5> { + CLKPLL_PU_FBDV_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 6"] #[inline(always)] - pub fn clkpll_pu_postdiv(&mut self) -> CLKPLL_PU_POSTDIV_W { - CLKPLL_PU_POSTDIV_W { w: self } + #[must_use] + pub fn clkpll_pu_clamp_op(&mut self) -> CLKPLL_PU_CLAMP_OP_W<6> { + CLKPLL_PU_CLAMP_OP_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bit 7"] #[inline(always)] - pub fn clkpll_reset_refdiv(&mut self) -> CLKPLL_RESET_REFDIV_W { - CLKPLL_RESET_REFDIV_W { w: self } + #[must_use] + pub fn clkpll_pu_pfd(&mut self) -> CLKPLL_PU_PFD_W<7> { + CLKPLL_PU_PFD_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bit 8"] #[inline(always)] - pub fn clkpll_reset_fbdv(&mut self) -> CLKPLL_RESET_FBDV_W { - CLKPLL_RESET_FBDV_W { w: self } + #[must_use] + pub fn clkpll_pu_cp(&mut self) -> CLKPLL_PU_CP_W<8> { + CLKPLL_PU_CP_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 9"] #[inline(always)] - pub fn clkpll_reset_postdiv(&mut self) -> CLKPLL_RESET_POSTDIV_W { - CLKPLL_RESET_POSTDIV_W { w: self } + #[must_use] + pub fn pu_clkpll_sfreg(&mut self) -> PU_CLKPLL_SFREG_W<9> { + PU_CLKPLL_SFREG_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 10"] #[inline(always)] - pub fn clkpll_sdm_reset(&mut self) -> CLKPLL_SDM_RESET_W { - CLKPLL_SDM_RESET_W { w: self } + #[must_use] + pub fn pu_clkpll(&mut self) -> PU_CLKPLL_W<10> { + PU_CLKPLL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -559,11 +228,10 @@ impl crate::Readable for PU_RST_CLKPLL_SPEC { #[doc = "`write(|w| ..)` method takes [pu_rst_clkpll::W](W) writer structure"] impl crate::Writable for PU_RST_CLKPLL_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pu_rst_clkpll to value 0x01f0"] impl crate::Resettable for PU_RST_CLKPLL_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x01f0 - } + const RESET_VALUE: Self::Ux = 0x01f0; } diff --git a/src/pds/rc32m_ctrl0.rs b/src/pds/rc32m_ctrl0.rs index 3aaea7a..0cbb40f 100644 --- a/src/pds/rc32m_ctrl0.rs +++ b/src/pds/rc32m_ctrl0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,412 +28,161 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rc32m_code_fr_ext` reader - "] -pub struct RC32M_CODE_FR_EXT_R(crate::FieldReader); -impl RC32M_CODE_FR_EXT_R { - pub(crate) fn new(bits: u8) -> Self { - RC32M_CODE_FR_EXT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RC32M_CODE_FR_EXT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rc32m_code_fr_ext` writer - "] -pub struct RC32M_CODE_FR_EXT_W<'a> { - w: &'a mut W, -} -impl<'a> RC32M_CODE_FR_EXT_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 22)) | ((value as u32 & 0xff) << 22); - self.w - } -} -#[doc = "Field `rc32m_pd` reader - "] -pub struct RC32M_PD_R(crate::FieldReader); -impl RC32M_PD_R { - pub(crate) fn new(bits: bool) -> Self { - RC32M_PD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RC32M_PD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rc32m_pd` writer - "] -pub struct RC32M_PD_W<'a> { - w: &'a mut W, -} -impl<'a> RC32M_PD_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); - self.w - } -} -#[doc = "Field `rc32m_cal_en` reader - "] -pub struct RC32M_CAL_EN_R(crate::FieldReader); -impl RC32M_CAL_EN_R { - pub(crate) fn new(bits: bool) -> Self { - RC32M_CAL_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RC32M_CAL_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rc32m_cal_en` writer - "] -pub struct RC32M_CAL_EN_W<'a> { - w: &'a mut W, -} -impl<'a> RC32M_CAL_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w - } -} -#[doc = "Field `rc32m_ext_code_en` reader - "] -pub struct RC32M_EXT_CODE_EN_R(crate::FieldReader); -impl RC32M_EXT_CODE_EN_R { - pub(crate) fn new(bits: bool) -> Self { - RC32M_EXT_CODE_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RC32M_EXT_CODE_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rc32m_ext_code_en` writer - "] -pub struct RC32M_EXT_CODE_EN_W<'a> { - w: &'a mut W, -} -impl<'a> RC32M_EXT_CODE_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 19)) | ((value as u32 & 0x01) << 19); - self.w - } -} +#[doc = "Field `rc32m_cal_done` reader - "] +pub type RC32M_CAL_DONE_R = crate::BitReader; +#[doc = "Field `rc32m_rdy` reader - "] +pub type RC32M_RDY_R = crate::BitReader; +#[doc = "Field `rc32m_cal_inprogress` reader - "] +pub type RC32M_CAL_INPROGRESS_R = crate::BitReader; +#[doc = "Field `rc32m_cal_div` reader - "] +pub type RC32M_CAL_DIV_R = crate::FieldReader; +#[doc = "Field `rc32m_cal_div` writer - "] +pub type RC32M_CAL_DIV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RC32M_CTRL0_SPEC, u8, u8, 2, O>; +#[doc = "Field `rc32m_cal_precharge` reader - "] +pub type RC32M_CAL_PRECHARGE_R = crate::BitReader; +#[doc = "Field `rc32m_dig_code_fr_cal` reader - "] +pub type RC32M_DIG_CODE_FR_CAL_R = crate::FieldReader; +#[doc = "Field `rc32m_allow_cal` reader - "] +pub type RC32M_ALLOW_CAL_R = crate::BitReader; +#[doc = "Field `rc32m_allow_cal` writer - "] +pub type RC32M_ALLOW_CAL_W<'a, const O: u8> = crate::BitWriter<'a, u32, RC32M_CTRL0_SPEC, bool, O>; #[doc = "Field `rc32m_refclk_half` reader - "] -pub struct RC32M_REFCLK_HALF_R(crate::FieldReader); -impl RC32M_REFCLK_HALF_R { - pub(crate) fn new(bits: bool) -> Self { - RC32M_REFCLK_HALF_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RC32M_REFCLK_HALF_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RC32M_REFCLK_HALF_R = crate::BitReader; #[doc = "Field `rc32m_refclk_half` writer - "] -pub struct RC32M_REFCLK_HALF_W<'a> { - w: &'a mut W, -} -impl<'a> RC32M_REFCLK_HALF_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18); - self.w - } -} -#[doc = "Field `rc32m_allow_cal` reader - "] -pub struct RC32M_ALLOW_CAL_R(crate::FieldReader); -impl RC32M_ALLOW_CAL_R { - pub(crate) fn new(bits: bool) -> Self { - RC32M_ALLOW_CAL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RC32M_ALLOW_CAL_R { - type Target = crate::FieldReader; +pub type RC32M_REFCLK_HALF_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RC32M_CTRL0_SPEC, bool, O>; +#[doc = "Field `rc32m_ext_code_en` reader - "] +pub type RC32M_EXT_CODE_EN_R = crate::BitReader; +#[doc = "Field `rc32m_ext_code_en` writer - "] +pub type RC32M_EXT_CODE_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RC32M_CTRL0_SPEC, bool, O>; +#[doc = "Field `rc32m_cal_en` reader - "] +pub type RC32M_CAL_EN_R = crate::BitReader; +#[doc = "Field `rc32m_cal_en` writer - "] +pub type RC32M_CAL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RC32M_CTRL0_SPEC, bool, O>; +#[doc = "Field `rc32m_pd` reader - "] +pub type RC32M_PD_R = crate::BitReader; +#[doc = "Field `rc32m_pd` writer - "] +pub type RC32M_PD_W<'a, const O: u8> = crate::BitWriter<'a, u32, RC32M_CTRL0_SPEC, bool, O>; +#[doc = "Field `rc32m_code_fr_ext` reader - "] +pub type RC32M_CODE_FR_EXT_R = crate::FieldReader; +#[doc = "Field `rc32m_code_fr_ext` writer - "] +pub type RC32M_CODE_FR_EXT_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RC32M_CTRL0_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn rc32m_cal_done(&self) -> RC32M_CAL_DONE_R { + RC32M_CAL_DONE_R::new((self.bits & 1) != 0) } -} -#[doc = "Field `rc32m_allow_cal` writer - "] -pub struct RC32M_ALLOW_CAL_W<'a> { - w: &'a mut W, -} -impl<'a> RC32M_ALLOW_CAL_W<'a> { - #[doc = r"Sets the field bit"] + #[doc = "Bit 1"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn rc32m_rdy(&self) -> RC32M_RDY_R { + RC32M_RDY_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = r"Clears the field bit"] + #[doc = "Bit 2"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn rc32m_cal_inprogress(&self) -> RC32M_CAL_INPROGRESS_R { + RC32M_CAL_INPROGRESS_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = r"Writes raw bits to the field"] + #[doc = "Bits 3:4"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w - } -} -#[doc = "Field `rc32m_dig_code_fr_cal` reader - "] -pub struct RC32M_DIG_CODE_FR_CAL_R(crate::FieldReader); -impl RC32M_DIG_CODE_FR_CAL_R { - pub(crate) fn new(bits: u8) -> Self { - RC32M_DIG_CODE_FR_CAL_R(crate::FieldReader::new(bits)) + pub fn rc32m_cal_div(&self) -> RC32M_CAL_DIV_R { + RC32M_CAL_DIV_R::new(((self.bits >> 3) & 3) as u8) } -} -impl core::ops::Deref for RC32M_DIG_CODE_FR_CAL_R { - type Target = crate::FieldReader; + #[doc = "Bit 5"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rc32m_cal_precharge` reader - "] -pub struct RC32M_CAL_PRECHARGE_R(crate::FieldReader); -impl RC32M_CAL_PRECHARGE_R { - pub(crate) fn new(bits: bool) -> Self { - RC32M_CAL_PRECHARGE_R(crate::FieldReader::new(bits)) + pub fn rc32m_cal_precharge(&self) -> RC32M_CAL_PRECHARGE_R { + RC32M_CAL_PRECHARGE_R::new(((self.bits >> 5) & 1) != 0) } -} -impl core::ops::Deref for RC32M_CAL_PRECHARGE_R { - type Target = crate::FieldReader; + #[doc = "Bits 6:13"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rc32m_cal_div` reader - "] -pub struct RC32M_CAL_DIV_R(crate::FieldReader); -impl RC32M_CAL_DIV_R { - pub(crate) fn new(bits: u8) -> Self { - RC32M_CAL_DIV_R(crate::FieldReader::new(bits)) + pub fn rc32m_dig_code_fr_cal(&self) -> RC32M_DIG_CODE_FR_CAL_R { + RC32M_DIG_CODE_FR_CAL_R::new(((self.bits >> 6) & 0xff) as u8) } -} -impl core::ops::Deref for RC32M_CAL_DIV_R { - type Target = crate::FieldReader; + #[doc = "Bit 17"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn rc32m_allow_cal(&self) -> RC32M_ALLOW_CAL_R { + RC32M_ALLOW_CAL_R::new(((self.bits >> 17) & 1) != 0) } -} -#[doc = "Field `rc32m_cal_div` writer - "] -pub struct RC32M_CAL_DIV_W<'a> { - w: &'a mut W, -} -impl<'a> RC32M_CAL_DIV_W<'a> { - #[doc = r"Writes raw bits to the field"] + #[doc = "Bit 18"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 3)) | ((value as u32 & 0x03) << 3); - self.w - } -} -#[doc = "Field `rc32m_cal_inprogress` reader - "] -pub struct RC32M_CAL_INPROGRESS_R(crate::FieldReader); -impl RC32M_CAL_INPROGRESS_R { - pub(crate) fn new(bits: bool) -> Self { - RC32M_CAL_INPROGRESS_R(crate::FieldReader::new(bits)) + pub fn rc32m_refclk_half(&self) -> RC32M_REFCLK_HALF_R { + RC32M_REFCLK_HALF_R::new(((self.bits >> 18) & 1) != 0) } -} -impl core::ops::Deref for RC32M_CAL_INPROGRESS_R { - type Target = crate::FieldReader; + #[doc = "Bit 19"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rc32m_rdy` reader - "] -pub struct RC32M_RDY_R(crate::FieldReader); -impl RC32M_RDY_R { - pub(crate) fn new(bits: bool) -> Self { - RC32M_RDY_R(crate::FieldReader::new(bits)) + pub fn rc32m_ext_code_en(&self) -> RC32M_EXT_CODE_EN_R { + RC32M_EXT_CODE_EN_R::new(((self.bits >> 19) & 1) != 0) } -} -impl core::ops::Deref for RC32M_RDY_R { - type Target = crate::FieldReader; + #[doc = "Bit 20"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rc32m_cal_done` reader - "] -pub struct RC32M_CAL_DONE_R(crate::FieldReader); -impl RC32M_CAL_DONE_R { - pub(crate) fn new(bits: bool) -> Self { - RC32M_CAL_DONE_R(crate::FieldReader::new(bits)) + pub fn rc32m_cal_en(&self) -> RC32M_CAL_EN_R { + RC32M_CAL_EN_R::new(((self.bits >> 20) & 1) != 0) } -} -impl core::ops::Deref for RC32M_CAL_DONE_R { - type Target = crate::FieldReader; + #[doc = "Bit 21"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn rc32m_pd(&self) -> RC32M_PD_R { + RC32M_PD_R::new(((self.bits >> 21) & 1) != 0) } -} -impl R { #[doc = "Bits 22:29"] #[inline(always)] pub fn rc32m_code_fr_ext(&self) -> RC32M_CODE_FR_EXT_R { RC32M_CODE_FR_EXT_R::new(((self.bits >> 22) & 0xff) as u8) } - #[doc = "Bit 21"] - #[inline(always)] - pub fn rc32m_pd(&self) -> RC32M_PD_R { - RC32M_PD_R::new(((self.bits >> 21) & 0x01) != 0) - } - #[doc = "Bit 20"] - #[inline(always)] - pub fn rc32m_cal_en(&self) -> RC32M_CAL_EN_R { - RC32M_CAL_EN_R::new(((self.bits >> 20) & 0x01) != 0) - } - #[doc = "Bit 19"] - #[inline(always)] - pub fn rc32m_ext_code_en(&self) -> RC32M_EXT_CODE_EN_R { - RC32M_EXT_CODE_EN_R::new(((self.bits >> 19) & 0x01) != 0) - } - #[doc = "Bit 18"] - #[inline(always)] - pub fn rc32m_refclk_half(&self) -> RC32M_REFCLK_HALF_R { - RC32M_REFCLK_HALF_R::new(((self.bits >> 18) & 0x01) != 0) - } - #[doc = "Bit 17"] - #[inline(always)] - pub fn rc32m_allow_cal(&self) -> RC32M_ALLOW_CAL_R { - RC32M_ALLOW_CAL_R::new(((self.bits >> 17) & 0x01) != 0) - } - #[doc = "Bits 6:13"] - #[inline(always)] - pub fn rc32m_dig_code_fr_cal(&self) -> RC32M_DIG_CODE_FR_CAL_R { - RC32M_DIG_CODE_FR_CAL_R::new(((self.bits >> 6) & 0xff) as u8) - } - #[doc = "Bit 5"] - #[inline(always)] - pub fn rc32m_cal_precharge(&self) -> RC32M_CAL_PRECHARGE_R { - RC32M_CAL_PRECHARGE_R::new(((self.bits >> 5) & 0x01) != 0) - } - #[doc = "Bits 3:4"] - #[inline(always)] - pub fn rc32m_cal_div(&self) -> RC32M_CAL_DIV_R { - RC32M_CAL_DIV_R::new(((self.bits >> 3) & 0x03) as u8) - } - #[doc = "Bit 2"] - #[inline(always)] - pub fn rc32m_cal_inprogress(&self) -> RC32M_CAL_INPROGRESS_R { - RC32M_CAL_INPROGRESS_R::new(((self.bits >> 2) & 0x01) != 0) - } - #[doc = "Bit 1"] - #[inline(always)] - pub fn rc32m_rdy(&self) -> RC32M_RDY_R { - RC32M_RDY_R::new(((self.bits >> 1) & 0x01) != 0) - } - #[doc = "Bit 0"] - #[inline(always)] - pub fn rc32m_cal_done(&self) -> RC32M_CAL_DONE_R { - RC32M_CAL_DONE_R::new((self.bits & 0x01) != 0) - } } impl W { - #[doc = "Bits 22:29"] + #[doc = "Bits 3:4"] #[inline(always)] - pub fn rc32m_code_fr_ext(&mut self) -> RC32M_CODE_FR_EXT_W { - RC32M_CODE_FR_EXT_W { w: self } + #[must_use] + pub fn rc32m_cal_div(&mut self) -> RC32M_CAL_DIV_W<3> { + RC32M_CAL_DIV_W::new(self) } - #[doc = "Bit 21"] + #[doc = "Bit 17"] #[inline(always)] - pub fn rc32m_pd(&mut self) -> RC32M_PD_W { - RC32M_PD_W { w: self } + #[must_use] + pub fn rc32m_allow_cal(&mut self) -> RC32M_ALLOW_CAL_W<17> { + RC32M_ALLOW_CAL_W::new(self) } - #[doc = "Bit 20"] + #[doc = "Bit 18"] #[inline(always)] - pub fn rc32m_cal_en(&mut self) -> RC32M_CAL_EN_W { - RC32M_CAL_EN_W { w: self } + #[must_use] + pub fn rc32m_refclk_half(&mut self) -> RC32M_REFCLK_HALF_W<18> { + RC32M_REFCLK_HALF_W::new(self) } #[doc = "Bit 19"] #[inline(always)] - pub fn rc32m_ext_code_en(&mut self) -> RC32M_EXT_CODE_EN_W { - RC32M_EXT_CODE_EN_W { w: self } + #[must_use] + pub fn rc32m_ext_code_en(&mut self) -> RC32M_EXT_CODE_EN_W<19> { + RC32M_EXT_CODE_EN_W::new(self) } - #[doc = "Bit 18"] + #[doc = "Bit 20"] #[inline(always)] - pub fn rc32m_refclk_half(&mut self) -> RC32M_REFCLK_HALF_W { - RC32M_REFCLK_HALF_W { w: self } + #[must_use] + pub fn rc32m_cal_en(&mut self) -> RC32M_CAL_EN_W<20> { + RC32M_CAL_EN_W::new(self) } - #[doc = "Bit 17"] + #[doc = "Bit 21"] #[inline(always)] - pub fn rc32m_allow_cal(&mut self) -> RC32M_ALLOW_CAL_W { - RC32M_ALLOW_CAL_W { w: self } + #[must_use] + pub fn rc32m_pd(&mut self) -> RC32M_PD_W<21> { + RC32M_PD_W::new(self) } - #[doc = "Bits 3:4"] + #[doc = "Bits 22:29"] #[inline(always)] - pub fn rc32m_cal_div(&mut self) -> RC32M_CAL_DIV_W { - RC32M_CAL_DIV_W { w: self } + #[must_use] + pub fn rc32m_code_fr_ext(&mut self) -> RC32M_CODE_FR_EXT_W<22> { + RC32M_CODE_FR_EXT_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -450,11 +200,10 @@ impl crate::Readable for RC32M_CTRL0_SPEC { #[doc = "`write(|w| ..)` method takes [rc32m_ctrl0::W](W) writer structure"] impl crate::Writable for RC32M_CTRL0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rc32m_ctrl0 to value 0x1808_0018"] impl crate::Resettable for RC32M_CTRL0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x1808_0018 - } + const RESET_VALUE: Self::Ux = 0x1808_0018; } diff --git a/src/pds/rc32m_ctrl1.rs b/src/pds/rc32m_ctrl1.rs index 5be03a1..24f0827 100644 --- a/src/pds/rc32m_ctrl1.rs +++ b/src/pds/rc32m_ctrl1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,281 +28,110 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rc32m_reserved` reader - "] -pub struct RC32M_RESERVED_R(crate::FieldReader); -impl RC32M_RESERVED_R { - pub(crate) fn new(bits: u8) -> Self { - RC32M_RESERVED_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RC32M_RESERVED_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rc32m_reserved` writer - "] -pub struct RC32M_RESERVED_W<'a> { - w: &'a mut W, -} -impl<'a> RC32M_RESERVED_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 24)) | ((value as u32 & 0xff) << 24); - self.w - } -} -#[doc = "Field `rc32m_clk_force_on` reader - "] -pub struct RC32M_CLK_FORCE_ON_R(crate::FieldReader); -impl RC32M_CLK_FORCE_ON_R { - pub(crate) fn new(bits: bool) -> Self { - RC32M_CLK_FORCE_ON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RC32M_CLK_FORCE_ON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rc32m_clk_force_on` writer - "] -pub struct RC32M_CLK_FORCE_ON_W<'a> { - w: &'a mut W, -} -impl<'a> RC32M_CLK_FORCE_ON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} -#[doc = "Field `rc32m_clk_inv` reader - "] -pub struct RC32M_CLK_INV_R(crate::FieldReader); -impl RC32M_CLK_INV_R { - pub(crate) fn new(bits: bool) -> Self { - RC32M_CLK_INV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RC32M_CLK_INV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rc32m_clk_inv` writer - "] -pub struct RC32M_CLK_INV_W<'a> { - w: &'a mut W, -} -impl<'a> RC32M_CLK_INV_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `rc32m_clk_soft_rst` reader - "] -pub struct RC32M_CLK_SOFT_RST_R(crate::FieldReader); -impl RC32M_CLK_SOFT_RST_R { - pub(crate) fn new(bits: bool) -> Self { - RC32M_CLK_SOFT_RST_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RC32M_CLK_SOFT_RST_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rc32m_clk_soft_rst` writer - "] -pub struct RC32M_CLK_SOFT_RST_W<'a> { - w: &'a mut W, -} -impl<'a> RC32M_CLK_SOFT_RST_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} +#[doc = "Field `rc32m_test_en` reader - "] +pub type RC32M_TEST_EN_R = crate::BitReader; +#[doc = "Field `rc32m_test_en` writer - "] +pub type RC32M_TEST_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RC32M_CTRL1_SPEC, bool, O>; #[doc = "Field `rc32m_soft_rst` reader - "] -pub struct RC32M_SOFT_RST_R(crate::FieldReader); -impl RC32M_SOFT_RST_R { - pub(crate) fn new(bits: bool) -> Self { - RC32M_SOFT_RST_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RC32M_SOFT_RST_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RC32M_SOFT_RST_R = crate::BitReader; #[doc = "Field `rc32m_soft_rst` writer - "] -pub struct RC32M_SOFT_RST_W<'a> { - w: &'a mut W, -} -impl<'a> RC32M_SOFT_RST_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type RC32M_SOFT_RST_W<'a, const O: u8> = crate::BitWriter<'a, u32, RC32M_CTRL1_SPEC, bool, O>; +#[doc = "Field `rc32m_clk_soft_rst` reader - "] +pub type RC32M_CLK_SOFT_RST_R = crate::BitReader; +#[doc = "Field `rc32m_clk_soft_rst` writer - "] +pub type RC32M_CLK_SOFT_RST_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RC32M_CTRL1_SPEC, bool, O>; +#[doc = "Field `rc32m_clk_inv` reader - "] +pub type RC32M_CLK_INV_R = crate::BitReader; +#[doc = "Field `rc32m_clk_inv` writer - "] +pub type RC32M_CLK_INV_W<'a, const O: u8> = crate::BitWriter<'a, u32, RC32M_CTRL1_SPEC, bool, O>; +#[doc = "Field `rc32m_clk_force_on` reader - "] +pub type RC32M_CLK_FORCE_ON_R = crate::BitReader; +#[doc = "Field `rc32m_clk_force_on` writer - "] +pub type RC32M_CLK_FORCE_ON_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RC32M_CTRL1_SPEC, bool, O>; +#[doc = "Field `rc32m_reserved` reader - "] +pub type RC32M_RESERVED_R = crate::FieldReader; +#[doc = "Field `rc32m_reserved` writer - "] +pub type RC32M_RESERVED_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RC32M_CTRL1_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} -#[doc = "Field `rc32m_test_en` reader - "] -pub struct RC32M_TEST_EN_R(crate::FieldReader); -impl RC32M_TEST_EN_R { - pub(crate) fn new(bits: bool) -> Self { - RC32M_TEST_EN_R(crate::FieldReader::new(bits)) + pub fn rc32m_test_en(&self) -> RC32M_TEST_EN_R { + RC32M_TEST_EN_R::new((self.bits & 1) != 0) } -} -impl core::ops::Deref for RC32M_TEST_EN_R { - type Target = crate::FieldReader; + #[doc = "Bit 1"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn rc32m_soft_rst(&self) -> RC32M_SOFT_RST_R { + RC32M_SOFT_RST_R::new(((self.bits >> 1) & 1) != 0) } -} -#[doc = "Field `rc32m_test_en` writer - "] -pub struct RC32M_TEST_EN_W<'a> { - w: &'a mut W, -} -impl<'a> RC32M_TEST_EN_W<'a> { - #[doc = r"Sets the field bit"] + #[doc = "Bit 2"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn rc32m_clk_soft_rst(&self) -> RC32M_CLK_SOFT_RST_R { + RC32M_CLK_SOFT_RST_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = r"Clears the field bit"] + #[doc = "Bit 3"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn rc32m_clk_inv(&self) -> RC32M_CLK_INV_R { + RC32M_CLK_INV_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = r"Writes raw bits to the field"] + #[doc = "Bit 4"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn rc32m_clk_force_on(&self) -> RC32M_CLK_FORCE_ON_R { + RC32M_CLK_FORCE_ON_R::new(((self.bits >> 4) & 1) != 0) } -} -impl R { #[doc = "Bits 24:31"] #[inline(always)] pub fn rc32m_reserved(&self) -> RC32M_RESERVED_R { RC32M_RESERVED_R::new(((self.bits >> 24) & 0xff) as u8) } - #[doc = "Bit 4"] - #[inline(always)] - pub fn rc32m_clk_force_on(&self) -> RC32M_CLK_FORCE_ON_R { - RC32M_CLK_FORCE_ON_R::new(((self.bits >> 4) & 0x01) != 0) - } - #[doc = "Bit 3"] - #[inline(always)] - pub fn rc32m_clk_inv(&self) -> RC32M_CLK_INV_R { - RC32M_CLK_INV_R::new(((self.bits >> 3) & 0x01) != 0) - } - #[doc = "Bit 2"] - #[inline(always)] - pub fn rc32m_clk_soft_rst(&self) -> RC32M_CLK_SOFT_RST_R { - RC32M_CLK_SOFT_RST_R::new(((self.bits >> 2) & 0x01) != 0) - } - #[doc = "Bit 1"] - #[inline(always)] - pub fn rc32m_soft_rst(&self) -> RC32M_SOFT_RST_R { - RC32M_SOFT_RST_R::new(((self.bits >> 1) & 0x01) != 0) - } - #[doc = "Bit 0"] - #[inline(always)] - pub fn rc32m_test_en(&self) -> RC32M_TEST_EN_R { - RC32M_TEST_EN_R::new((self.bits & 0x01) != 0) - } } impl W { - #[doc = "Bits 24:31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn rc32m_reserved(&mut self) -> RC32M_RESERVED_W { - RC32M_RESERVED_W { w: self } + #[must_use] + pub fn rc32m_test_en(&mut self) -> RC32M_TEST_EN_W<0> { + RC32M_TEST_EN_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 1"] #[inline(always)] - pub fn rc32m_clk_force_on(&mut self) -> RC32M_CLK_FORCE_ON_W { - RC32M_CLK_FORCE_ON_W { w: self } + #[must_use] + pub fn rc32m_soft_rst(&mut self) -> RC32M_SOFT_RST_W<1> { + RC32M_SOFT_RST_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bit 2"] #[inline(always)] - pub fn rc32m_clk_inv(&mut self) -> RC32M_CLK_INV_W { - RC32M_CLK_INV_W { w: self } + #[must_use] + pub fn rc32m_clk_soft_rst(&mut self) -> RC32M_CLK_SOFT_RST_W<2> { + RC32M_CLK_SOFT_RST_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bit 3"] #[inline(always)] - pub fn rc32m_clk_soft_rst(&mut self) -> RC32M_CLK_SOFT_RST_W { - RC32M_CLK_SOFT_RST_W { w: self } + #[must_use] + pub fn rc32m_clk_inv(&mut self) -> RC32M_CLK_INV_W<3> { + RC32M_CLK_INV_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 4"] #[inline(always)] - pub fn rc32m_soft_rst(&mut self) -> RC32M_SOFT_RST_W { - RC32M_SOFT_RST_W { w: self } + #[must_use] + pub fn rc32m_clk_force_on(&mut self) -> RC32M_CLK_FORCE_ON_W<4> { + RC32M_CLK_FORCE_ON_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn rc32m_test_en(&mut self) -> RC32M_TEST_EN_W { - RC32M_TEST_EN_W { w: self } + #[must_use] + pub fn rc32m_reserved(&mut self) -> RC32M_RESERVED_W<24> { + RC32M_RESERVED_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -319,11 +149,10 @@ impl crate::Readable for RC32M_CTRL1_SPEC { #[doc = "`write(|w| ..)` method takes [rc32m_ctrl1::W](W) writer structure"] impl crate::Writable for RC32M_CTRL1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rc32m_ctrl1 to value 0"] impl crate::Resettable for RC32M_CTRL1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/pwm.rs b/src/pwm.rs index 938bee8..d8bb906 100644 --- a/src/pwm.rs +++ b/src/pwm.rs @@ -2,194 +2,194 @@ #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - pwm_int_config."] - pub pwm_int_config: crate::Reg, - _reserved1: [u8; 28usize], + pub pwm_int_config: PWM_INT_CONFIG, + _reserved1: [u8; 0x1c], #[doc = "0x20 - pwm0_clkdiv."] - pub pwm0_clkdiv: crate::Reg, + pub pwm0_clkdiv: PWM0_CLKDIV, #[doc = "0x24 - pwm0_thre1."] - pub pwm0_thre1: crate::Reg, + pub pwm0_thre1: PWM0_THRE1, #[doc = "0x28 - pwm0_thre2."] - pub pwm0_thre2: crate::Reg, + pub pwm0_thre2: PWM0_THRE2, #[doc = "0x2c - pwm0_period."] - pub pwm0_period: crate::Reg, + pub pwm0_period: PWM0_PERIOD, #[doc = "0x30 - pwm0_config."] - pub pwm0_config: crate::Reg, + pub pwm0_config: PWM0_CONFIG, #[doc = "0x34 - pwm0_interrupt."] - pub pwm0_interrupt: crate::Reg, - _reserved7: [u8; 8usize], + pub pwm0_interrupt: PWM0_INTERRUPT, + _reserved7: [u8; 0x08], #[doc = "0x40 - pwm1_clkdiv."] - pub pwm1_clkdiv: crate::Reg, + pub pwm1_clkdiv: PWM1_CLKDIV, #[doc = "0x44 - pwm1_thre1."] - pub pwm1_thre1: crate::Reg, + pub pwm1_thre1: PWM1_THRE1, #[doc = "0x48 - pwm1_thre2."] - pub pwm1_thre2: crate::Reg, + pub pwm1_thre2: PWM1_THRE2, #[doc = "0x4c - pwm1_period."] - pub pwm1_period: crate::Reg, + pub pwm1_period: PWM1_PERIOD, #[doc = "0x50 - pwm1_config."] - pub pwm1_config: crate::Reg, + pub pwm1_config: PWM1_CONFIG, #[doc = "0x54 - pwm1_interrupt."] - pub pwm1_interrupt: crate::Reg, - _reserved13: [u8; 8usize], + pub pwm1_interrupt: PWM1_INTERRUPT, + _reserved13: [u8; 0x08], #[doc = "0x60 - pwm2_clkdiv."] - pub pwm2_clkdiv: crate::Reg, + pub pwm2_clkdiv: PWM2_CLKDIV, #[doc = "0x64 - pwm2_thre1."] - pub pwm2_thre1: crate::Reg, + pub pwm2_thre1: PWM2_THRE1, #[doc = "0x68 - pwm2_thre2."] - pub pwm2_thre2: crate::Reg, + pub pwm2_thre2: PWM2_THRE2, #[doc = "0x6c - pwm2_period."] - pub pwm2_period: crate::Reg, + pub pwm2_period: PWM2_PERIOD, #[doc = "0x70 - pwm2_config."] - pub pwm2_config: crate::Reg, + pub pwm2_config: PWM2_CONFIG, #[doc = "0x74 - pwm2_interrupt."] - pub pwm2_interrupt: crate::Reg, - _reserved19: [u8; 8usize], + pub pwm2_interrupt: PWM2_INTERRUPT, + _reserved19: [u8; 0x08], #[doc = "0x80 - pwm3_clkdiv."] - pub pwm3_clkdiv: crate::Reg, + pub pwm3_clkdiv: PWM3_CLKDIV, #[doc = "0x84 - pwm3_thre1."] - pub pwm3_thre1: crate::Reg, + pub pwm3_thre1: PWM3_THRE1, #[doc = "0x88 - pwm3_thre2."] - pub pwm3_thre2: crate::Reg, + pub pwm3_thre2: PWM3_THRE2, #[doc = "0x8c - pwm3_period."] - pub pwm3_period: crate::Reg, + pub pwm3_period: PWM3_PERIOD, #[doc = "0x90 - pwm3_config."] - pub pwm3_config: crate::Reg, + pub pwm3_config: PWM3_CONFIG, #[doc = "0x94 - pwm3_interrupt."] - pub pwm3_interrupt: crate::Reg, - _reserved25: [u8; 8usize], + pub pwm3_interrupt: PWM3_INTERRUPT, + _reserved25: [u8; 0x08], #[doc = "0xa0 - pwm4_clkdiv."] - pub pwm4_clkdiv: crate::Reg, + pub pwm4_clkdiv: PWM4_CLKDIV, #[doc = "0xa4 - pwm4_thre1."] - pub pwm4_thre1: crate::Reg, + pub pwm4_thre1: PWM4_THRE1, #[doc = "0xa8 - pwm4_thre2."] - pub pwm4_thre2: crate::Reg, + pub pwm4_thre2: PWM4_THRE2, #[doc = "0xac - pwm4_period."] - pub pwm4_period: crate::Reg, + pub pwm4_period: PWM4_PERIOD, #[doc = "0xb0 - pwm4_config."] - pub pwm4_config: crate::Reg, + pub pwm4_config: PWM4_CONFIG, #[doc = "0xb4 - pwm4_interrupt."] - pub pwm4_interrupt: crate::Reg, + pub pwm4_interrupt: PWM4_INTERRUPT, } -#[doc = "pwm_int_config register accessor: an alias for `Reg`"] +#[doc = "pwm_int_config (rw) register accessor: an alias for `Reg`"] pub type PWM_INT_CONFIG = crate::Reg; #[doc = "pwm_int_config."] pub mod pwm_int_config; -#[doc = "pwm0_clkdiv register accessor: an alias for `Reg`"] +#[doc = "pwm0_clkdiv (rw) register accessor: an alias for `Reg`"] pub type PWM0_CLKDIV = crate::Reg; #[doc = "pwm0_clkdiv."] pub mod pwm0_clkdiv; -#[doc = "pwm0_thre1 register accessor: an alias for `Reg`"] +#[doc = "pwm0_thre1 (rw) register accessor: an alias for `Reg`"] pub type PWM0_THRE1 = crate::Reg; #[doc = "pwm0_thre1."] pub mod pwm0_thre1; -#[doc = "pwm0_thre2 register accessor: an alias for `Reg`"] +#[doc = "pwm0_thre2 (rw) register accessor: an alias for `Reg`"] pub type PWM0_THRE2 = crate::Reg; #[doc = "pwm0_thre2."] pub mod pwm0_thre2; -#[doc = "pwm0_period register accessor: an alias for `Reg`"] +#[doc = "pwm0_period (rw) register accessor: an alias for `Reg`"] pub type PWM0_PERIOD = crate::Reg; #[doc = "pwm0_period."] pub mod pwm0_period; -#[doc = "pwm0_config register accessor: an alias for `Reg`"] +#[doc = "pwm0_config (rw) register accessor: an alias for `Reg`"] pub type PWM0_CONFIG = crate::Reg; #[doc = "pwm0_config."] pub mod pwm0_config; -#[doc = "pwm0_interrupt register accessor: an alias for `Reg`"] +#[doc = "pwm0_interrupt (rw) register accessor: an alias for `Reg`"] pub type PWM0_INTERRUPT = crate::Reg; #[doc = "pwm0_interrupt."] pub mod pwm0_interrupt; -#[doc = "pwm1_clkdiv register accessor: an alias for `Reg`"] +#[doc = "pwm1_clkdiv (rw) register accessor: an alias for `Reg`"] pub type PWM1_CLKDIV = crate::Reg; #[doc = "pwm1_clkdiv."] pub mod pwm1_clkdiv; -#[doc = "pwm1_thre1 register accessor: an alias for `Reg`"] +#[doc = "pwm1_thre1 (rw) register accessor: an alias for `Reg`"] pub type PWM1_THRE1 = crate::Reg; #[doc = "pwm1_thre1."] pub mod pwm1_thre1; -#[doc = "pwm1_thre2 register accessor: an alias for `Reg`"] +#[doc = "pwm1_thre2 (rw) register accessor: an alias for `Reg`"] pub type PWM1_THRE2 = crate::Reg; #[doc = "pwm1_thre2."] pub mod pwm1_thre2; -#[doc = "pwm1_period register accessor: an alias for `Reg`"] +#[doc = "pwm1_period (rw) register accessor: an alias for `Reg`"] pub type PWM1_PERIOD = crate::Reg; #[doc = "pwm1_period."] pub mod pwm1_period; -#[doc = "pwm1_config register accessor: an alias for `Reg`"] +#[doc = "pwm1_config (rw) register accessor: an alias for `Reg`"] pub type PWM1_CONFIG = crate::Reg; #[doc = "pwm1_config."] pub mod pwm1_config; -#[doc = "pwm1_interrupt register accessor: an alias for `Reg`"] +#[doc = "pwm1_interrupt (rw) register accessor: an alias for `Reg`"] pub type PWM1_INTERRUPT = crate::Reg; #[doc = "pwm1_interrupt."] pub mod pwm1_interrupt; -#[doc = "pwm2_clkdiv register accessor: an alias for `Reg`"] +#[doc = "pwm2_clkdiv (rw) register accessor: an alias for `Reg`"] pub type PWM2_CLKDIV = crate::Reg; #[doc = "pwm2_clkdiv."] pub mod pwm2_clkdiv; -#[doc = "pwm2_thre1 register accessor: an alias for `Reg`"] +#[doc = "pwm2_thre1 (rw) register accessor: an alias for `Reg`"] pub type PWM2_THRE1 = crate::Reg; #[doc = "pwm2_thre1."] pub mod pwm2_thre1; -#[doc = "pwm2_thre2 register accessor: an alias for `Reg`"] +#[doc = "pwm2_thre2 (rw) register accessor: an alias for `Reg`"] pub type PWM2_THRE2 = crate::Reg; #[doc = "pwm2_thre2."] pub mod pwm2_thre2; -#[doc = "pwm2_period register accessor: an alias for `Reg`"] +#[doc = "pwm2_period (rw) register accessor: an alias for `Reg`"] pub type PWM2_PERIOD = crate::Reg; #[doc = "pwm2_period."] pub mod pwm2_period; -#[doc = "pwm2_config register accessor: an alias for `Reg`"] +#[doc = "pwm2_config (rw) register accessor: an alias for `Reg`"] pub type PWM2_CONFIG = crate::Reg; #[doc = "pwm2_config."] pub mod pwm2_config; -#[doc = "pwm2_interrupt register accessor: an alias for `Reg`"] +#[doc = "pwm2_interrupt (rw) register accessor: an alias for `Reg`"] pub type PWM2_INTERRUPT = crate::Reg; #[doc = "pwm2_interrupt."] pub mod pwm2_interrupt; -#[doc = "pwm3_clkdiv register accessor: an alias for `Reg`"] +#[doc = "pwm3_clkdiv (rw) register accessor: an alias for `Reg`"] pub type PWM3_CLKDIV = crate::Reg; #[doc = "pwm3_clkdiv."] pub mod pwm3_clkdiv; -#[doc = "pwm3_thre1 register accessor: an alias for `Reg`"] +#[doc = "pwm3_thre1 (rw) register accessor: an alias for `Reg`"] pub type PWM3_THRE1 = crate::Reg; #[doc = "pwm3_thre1."] pub mod pwm3_thre1; -#[doc = "pwm3_thre2 register accessor: an alias for `Reg`"] +#[doc = "pwm3_thre2 (rw) register accessor: an alias for `Reg`"] pub type PWM3_THRE2 = crate::Reg; #[doc = "pwm3_thre2."] pub mod pwm3_thre2; -#[doc = "pwm3_period register accessor: an alias for `Reg`"] +#[doc = "pwm3_period (rw) register accessor: an alias for `Reg`"] pub type PWM3_PERIOD = crate::Reg; #[doc = "pwm3_period."] pub mod pwm3_period; -#[doc = "pwm3_config register accessor: an alias for `Reg`"] +#[doc = "pwm3_config (rw) register accessor: an alias for `Reg`"] pub type PWM3_CONFIG = crate::Reg; #[doc = "pwm3_config."] pub mod pwm3_config; -#[doc = "pwm3_interrupt register accessor: an alias for `Reg`"] +#[doc = "pwm3_interrupt (rw) register accessor: an alias for `Reg`"] pub type PWM3_INTERRUPT = crate::Reg; #[doc = "pwm3_interrupt."] pub mod pwm3_interrupt; -#[doc = "pwm4_clkdiv register accessor: an alias for `Reg`"] +#[doc = "pwm4_clkdiv (rw) register accessor: an alias for `Reg`"] pub type PWM4_CLKDIV = crate::Reg; #[doc = "pwm4_clkdiv."] pub mod pwm4_clkdiv; -#[doc = "pwm4_thre1 register accessor: an alias for `Reg`"] +#[doc = "pwm4_thre1 (rw) register accessor: an alias for `Reg`"] pub type PWM4_THRE1 = crate::Reg; #[doc = "pwm4_thre1."] pub mod pwm4_thre1; -#[doc = "pwm4_thre2 register accessor: an alias for `Reg`"] +#[doc = "pwm4_thre2 (rw) register accessor: an alias for `Reg`"] pub type PWM4_THRE2 = crate::Reg; #[doc = "pwm4_thre2."] pub mod pwm4_thre2; -#[doc = "pwm4_period register accessor: an alias for `Reg`"] +#[doc = "pwm4_period (rw) register accessor: an alias for `Reg`"] pub type PWM4_PERIOD = crate::Reg; #[doc = "pwm4_period."] pub mod pwm4_period; -#[doc = "pwm4_config register accessor: an alias for `Reg`"] +#[doc = "pwm4_config (rw) register accessor: an alias for `Reg`"] pub type PWM4_CONFIG = crate::Reg; #[doc = "pwm4_config."] pub mod pwm4_config; -#[doc = "pwm4_interrupt register accessor: an alias for `Reg`"] +#[doc = "pwm4_interrupt (rw) register accessor: an alias for `Reg`"] pub type PWM4_INTERRUPT = crate::Reg; #[doc = "pwm4_interrupt."] pub mod pwm4_interrupt; diff --git a/src/pwm/pwm0_clkdiv.rs b/src/pwm/pwm0_clkdiv.rs index 714f85e..441b7fa 100644 --- a/src/pwm/pwm0_clkdiv.rs +++ b/src/pwm/pwm0_clkdiv.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,37 +28,17 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `pwm_clk_div` reader - "] -pub struct PWM_CLK_DIV_R(crate::FieldReader); -impl PWM_CLK_DIV_R { - pub(crate) fn new(bits: u16) -> Self { - PWM_CLK_DIV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_CLK_DIV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PWM_CLK_DIV_R = crate::FieldReader; #[doc = "Field `pwm_clk_div` writer - "] -pub struct PWM_CLK_DIV_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_CLK_DIV_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w - } -} +pub type PWM_CLK_DIV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PWM0_CLKDIV_SPEC, u16, u16, 16, O>; impl R { #[doc = "Bits 0:15"] #[inline(always)] @@ -68,10 +49,12 @@ impl R { impl W { #[doc = "Bits 0:15"] #[inline(always)] - pub fn pwm_clk_div(&mut self) -> PWM_CLK_DIV_W { - PWM_CLK_DIV_W { w: self } + #[must_use] + pub fn pwm_clk_div(&mut self) -> PWM_CLK_DIV_W<0> { + PWM_CLK_DIV_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for PWM0_CLKDIV_SPEC { #[doc = "`write(|w| ..)` method takes [pwm0_clkdiv::W](W) writer structure"] impl crate::Writable for PWM0_CLKDIV_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pwm0_clkdiv to value 0"] impl crate::Resettable for PWM0_CLKDIV_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/pwm/pwm0_config.rs b/src/pwm/pwm0_config.rs index c8181b1..20d01d2 100644 --- a/src/pwm/pwm0_config.rs +++ b/src/pwm/pwm0_config.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,300 +28,115 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `pwm_sts_top` reader - "] -pub struct PWM_STS_TOP_R(crate::FieldReader); -impl PWM_STS_TOP_R { - pub(crate) fn new(bits: bool) -> Self { - PWM_STS_TOP_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_STS_TOP_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwm_stop_en` reader - "] -pub struct PWM_STOP_EN_R(crate::FieldReader); -impl PWM_STOP_EN_R { - pub(crate) fn new(bits: bool) -> Self { - PWM_STOP_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_STOP_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwm_stop_en` writer - "] -pub struct PWM_STOP_EN_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_STOP_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w - } -} -#[doc = "Field `pwm_sw_mode` reader - "] -pub struct PWM_SW_MODE_R(crate::FieldReader); -impl PWM_SW_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - PWM_SW_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_SW_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwm_sw_mode` writer - "] -pub struct PWM_SW_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_SW_MODE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w - } -} -#[doc = "Field `pwm_sw_force_val` reader - "] -pub struct PWM_SW_FORCE_VAL_R(crate::FieldReader); -impl PWM_SW_FORCE_VAL_R { - pub(crate) fn new(bits: bool) -> Self { - PWM_SW_FORCE_VAL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_SW_FORCE_VAL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwm_sw_force_val` writer - "] -pub struct PWM_SW_FORCE_VAL_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_SW_FORCE_VAL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} -#[doc = "Field `pwm_stop_mode` reader - "] -pub struct PWM_STOP_MODE_R(crate::FieldReader); -impl PWM_STOP_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - PWM_STOP_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_STOP_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwm_stop_mode` writer - "] -pub struct PWM_STOP_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_STOP_MODE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `pwm_out_inv` reader - "] -pub struct PWM_OUT_INV_R(crate::FieldReader); -impl PWM_OUT_INV_R { - pub(crate) fn new(bits: bool) -> Self { - PWM_OUT_INV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_OUT_INV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwm_out_inv` writer - "] -pub struct PWM_OUT_INV_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_OUT_INV_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} #[doc = "Field `reg_clk_sel` reader - "] -pub struct REG_CLK_SEL_R(crate::FieldReader); -impl REG_CLK_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - REG_CLK_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_CLK_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type REG_CLK_SEL_R = crate::FieldReader; #[doc = "Field `reg_clk_sel` writer - "] -pub struct REG_CLK_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> REG_CLK_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w - } -} +pub type REG_CLK_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PWM0_CONFIG_SPEC, u8, u8, 2, O>; +#[doc = "Field `pwm_out_inv` reader - "] +pub type PWM_OUT_INV_R = crate::BitReader; +#[doc = "Field `pwm_out_inv` writer - "] +pub type PWM_OUT_INV_W<'a, const O: u8> = crate::BitWriter<'a, u32, PWM0_CONFIG_SPEC, bool, O>; +#[doc = "Field `pwm_stop_mode` reader - "] +pub type PWM_STOP_MODE_R = crate::BitReader; +#[doc = "Field `pwm_stop_mode` writer - "] +pub type PWM_STOP_MODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, PWM0_CONFIG_SPEC, bool, O>; +#[doc = "Field `pwm_sw_force_val` reader - "] +pub type PWM_SW_FORCE_VAL_R = crate::BitReader; +#[doc = "Field `pwm_sw_force_val` writer - "] +pub type PWM_SW_FORCE_VAL_W<'a, const O: u8> = crate::BitWriter<'a, u32, PWM0_CONFIG_SPEC, bool, O>; +#[doc = "Field `pwm_sw_mode` reader - "] +pub type PWM_SW_MODE_R = crate::BitReader; +#[doc = "Field `pwm_sw_mode` writer - "] +pub type PWM_SW_MODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, PWM0_CONFIG_SPEC, bool, O>; +#[doc = "Field `pwm_stop_en` reader - "] +pub type PWM_STOP_EN_R = crate::BitReader; +#[doc = "Field `pwm_stop_en` writer - "] +pub type PWM_STOP_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PWM0_CONFIG_SPEC, bool, O>; +#[doc = "Field `pwm_sts_top` reader - "] +pub type PWM_STS_TOP_R = crate::BitReader; impl R { - #[doc = "Bit 7"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn pwm_sts_top(&self) -> PWM_STS_TOP_R { - PWM_STS_TOP_R::new(((self.bits >> 7) & 0x01) != 0) + pub fn reg_clk_sel(&self) -> REG_CLK_SEL_R { + REG_CLK_SEL_R::new((self.bits & 3) as u8) } - #[doc = "Bit 6"] + #[doc = "Bit 2"] #[inline(always)] - pub fn pwm_stop_en(&self) -> PWM_STOP_EN_R { - PWM_STOP_EN_R::new(((self.bits >> 6) & 0x01) != 0) + pub fn pwm_out_inv(&self) -> PWM_OUT_INV_R { + PWM_OUT_INV_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 5"] + #[doc = "Bit 3"] #[inline(always)] - pub fn pwm_sw_mode(&self) -> PWM_SW_MODE_R { - PWM_SW_MODE_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn pwm_stop_mode(&self) -> PWM_STOP_MODE_R { + PWM_STOP_MODE_R::new(((self.bits >> 3) & 1) != 0) } #[doc = "Bit 4"] #[inline(always)] pub fn pwm_sw_force_val(&self) -> PWM_SW_FORCE_VAL_R { - PWM_SW_FORCE_VAL_R::new(((self.bits >> 4) & 0x01) != 0) + PWM_SW_FORCE_VAL_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 3"] + #[doc = "Bit 5"] #[inline(always)] - pub fn pwm_stop_mode(&self) -> PWM_STOP_MODE_R { - PWM_STOP_MODE_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn pwm_sw_mode(&self) -> PWM_SW_MODE_R { + PWM_SW_MODE_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bit 6"] #[inline(always)] - pub fn pwm_out_inv(&self) -> PWM_OUT_INV_R { - PWM_OUT_INV_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn pwm_stop_en(&self) -> PWM_STOP_EN_R { + PWM_STOP_EN_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = "Bits 0:1"] + #[doc = "Bit 7"] #[inline(always)] - pub fn reg_clk_sel(&self) -> REG_CLK_SEL_R { - REG_CLK_SEL_R::new((self.bits & 0x03) as u8) + pub fn pwm_sts_top(&self) -> PWM_STS_TOP_R { + PWM_STS_TOP_R::new(((self.bits >> 7) & 1) != 0) } } impl W { - #[doc = "Bit 6"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn pwm_stop_en(&mut self) -> PWM_STOP_EN_W { - PWM_STOP_EN_W { w: self } + #[must_use] + pub fn reg_clk_sel(&mut self) -> REG_CLK_SEL_W<0> { + REG_CLK_SEL_W::new(self) } - #[doc = "Bit 5"] + #[doc = "Bit 2"] #[inline(always)] - pub fn pwm_sw_mode(&mut self) -> PWM_SW_MODE_W { - PWM_SW_MODE_W { w: self } + #[must_use] + pub fn pwm_out_inv(&mut self) -> PWM_OUT_INV_W<2> { + PWM_OUT_INV_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 3"] #[inline(always)] - pub fn pwm_sw_force_val(&mut self) -> PWM_SW_FORCE_VAL_W { - PWM_SW_FORCE_VAL_W { w: self } + #[must_use] + pub fn pwm_stop_mode(&mut self) -> PWM_STOP_MODE_W<3> { + PWM_STOP_MODE_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bit 4"] #[inline(always)] - pub fn pwm_stop_mode(&mut self) -> PWM_STOP_MODE_W { - PWM_STOP_MODE_W { w: self } + #[must_use] + pub fn pwm_sw_force_val(&mut self) -> PWM_SW_FORCE_VAL_W<4> { + PWM_SW_FORCE_VAL_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bit 5"] #[inline(always)] - pub fn pwm_out_inv(&mut self) -> PWM_OUT_INV_W { - PWM_OUT_INV_W { w: self } + #[must_use] + pub fn pwm_sw_mode(&mut self) -> PWM_SW_MODE_W<5> { + PWM_SW_MODE_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bit 6"] #[inline(always)] - pub fn reg_clk_sel(&mut self) -> REG_CLK_SEL_W { - REG_CLK_SEL_W { w: self } + #[must_use] + pub fn pwm_stop_en(&mut self) -> PWM_STOP_EN_W<6> { + PWM_STOP_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -338,11 +154,10 @@ impl crate::Readable for PWM0_CONFIG_SPEC { #[doc = "`write(|w| ..)` method takes [pwm0_config::W](W) writer structure"] impl crate::Writable for PWM0_CONFIG_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pwm0_config to value 0x08"] impl crate::Resettable for PWM0_CONFIG_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x08 - } + const RESET_VALUE: Self::Ux = 0x08; } diff --git a/src/pwm/pwm0_interrupt.rs b/src/pwm/pwm0_interrupt.rs index a603136..4d347e1 100644 --- a/src/pwm/pwm0_interrupt.rs +++ b/src/pwm/pwm0_interrupt.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,97 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `pwm_int_enable` reader - "] -pub struct PWM_INT_ENABLE_R(crate::FieldReader); -impl PWM_INT_ENABLE_R { - pub(crate) fn new(bits: bool) -> Self { - PWM_INT_ENABLE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_INT_ENABLE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwm_int_enable` writer - "] -pub struct PWM_INT_ENABLE_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_INT_ENABLE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} #[doc = "Field `pwm_int_period_cnt` reader - "] -pub struct PWM_INT_PERIOD_CNT_R(crate::FieldReader); -impl PWM_INT_PERIOD_CNT_R { - pub(crate) fn new(bits: u16) -> Self { - PWM_INT_PERIOD_CNT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_INT_PERIOD_CNT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PWM_INT_PERIOD_CNT_R = crate::FieldReader; #[doc = "Field `pwm_int_period_cnt` writer - "] -pub struct PWM_INT_PERIOD_CNT_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_INT_PERIOD_CNT_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w - } -} +pub type PWM_INT_PERIOD_CNT_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PWM0_INTERRUPT_SPEC, u16, u16, 16, O>; +#[doc = "Field `pwm_int_enable` reader - "] +pub type PWM_INT_ENABLE_R = crate::BitReader; +#[doc = "Field `pwm_int_enable` writer - "] +pub type PWM_INT_ENABLE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, PWM0_INTERRUPT_SPEC, bool, O>; impl R { - #[doc = "Bit 16"] - #[inline(always)] - pub fn pwm_int_enable(&self) -> PWM_INT_ENABLE_R { - PWM_INT_ENABLE_R::new(((self.bits >> 16) & 0x01) != 0) - } #[doc = "Bits 0:15"] #[inline(always)] pub fn pwm_int_period_cnt(&self) -> PWM_INT_PERIOD_CNT_R { PWM_INT_PERIOD_CNT_R::new((self.bits & 0xffff) as u16) } -} -impl W { #[doc = "Bit 16"] #[inline(always)] - pub fn pwm_int_enable(&mut self) -> PWM_INT_ENABLE_W { - PWM_INT_ENABLE_W { w: self } + pub fn pwm_int_enable(&self) -> PWM_INT_ENABLE_R { + PWM_INT_ENABLE_R::new(((self.bits >> 16) & 1) != 0) } +} +impl W { #[doc = "Bits 0:15"] #[inline(always)] - pub fn pwm_int_period_cnt(&mut self) -> PWM_INT_PERIOD_CNT_W { - PWM_INT_PERIOD_CNT_W { w: self } + #[must_use] + pub fn pwm_int_period_cnt(&mut self) -> PWM_INT_PERIOD_CNT_W<0> { + PWM_INT_PERIOD_CNT_W::new(self) + } + #[doc = "Bit 16"] + #[inline(always)] + #[must_use] + pub fn pwm_int_enable(&mut self) -> PWM_INT_ENABLE_W<16> { + PWM_INT_ENABLE_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -135,11 +88,10 @@ impl crate::Readable for PWM0_INTERRUPT_SPEC { #[doc = "`write(|w| ..)` method takes [pwm0_interrupt::W](W) writer structure"] impl crate::Writable for PWM0_INTERRUPT_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pwm0_interrupt to value 0"] impl crate::Resettable for PWM0_INTERRUPT_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/pwm/pwm0_period.rs b/src/pwm/pwm0_period.rs index 151cb31..a317772 100644 --- a/src/pwm/pwm0_period.rs +++ b/src/pwm/pwm0_period.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,37 +28,17 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `pwm_period` reader - "] -pub struct PWM_PERIOD_R(crate::FieldReader); -impl PWM_PERIOD_R { - pub(crate) fn new(bits: u16) -> Self { - PWM_PERIOD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_PERIOD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PWM_PERIOD_R = crate::FieldReader; #[doc = "Field `pwm_period` writer - "] -pub struct PWM_PERIOD_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_PERIOD_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w - } -} +pub type PWM_PERIOD_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PWM0_PERIOD_SPEC, u16, u16, 16, O>; impl R { #[doc = "Bits 0:15"] #[inline(always)] @@ -68,10 +49,12 @@ impl R { impl W { #[doc = "Bits 0:15"] #[inline(always)] - pub fn pwm_period(&mut self) -> PWM_PERIOD_W { - PWM_PERIOD_W { w: self } + #[must_use] + pub fn pwm_period(&mut self) -> PWM_PERIOD_W<0> { + PWM_PERIOD_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for PWM0_PERIOD_SPEC { #[doc = "`write(|w| ..)` method takes [pwm0_period::W](W) writer structure"] impl crate::Writable for PWM0_PERIOD_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pwm0_period to value 0"] impl crate::Resettable for PWM0_PERIOD_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/pwm/pwm0_thre1.rs b/src/pwm/pwm0_thre1.rs index 95a56ad..8dab99d 100644 --- a/src/pwm/pwm0_thre1.rs +++ b/src/pwm/pwm0_thre1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,37 +28,17 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `pwm_thre1` reader - "] -pub struct PWM_THRE1_R(crate::FieldReader); -impl PWM_THRE1_R { - pub(crate) fn new(bits: u16) -> Self { - PWM_THRE1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_THRE1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PWM_THRE1_R = crate::FieldReader; #[doc = "Field `pwm_thre1` writer - "] -pub struct PWM_THRE1_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_THRE1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w - } -} +pub type PWM_THRE1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PWM0_THRE1_SPEC, u16, u16, 16, O>; impl R { #[doc = "Bits 0:15"] #[inline(always)] @@ -68,10 +49,12 @@ impl R { impl W { #[doc = "Bits 0:15"] #[inline(always)] - pub fn pwm_thre1(&mut self) -> PWM_THRE1_W { - PWM_THRE1_W { w: self } + #[must_use] + pub fn pwm_thre1(&mut self) -> PWM_THRE1_W<0> { + PWM_THRE1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for PWM0_THRE1_SPEC { #[doc = "`write(|w| ..)` method takes [pwm0_thre1::W](W) writer structure"] impl crate::Writable for PWM0_THRE1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pwm0_thre1 to value 0"] impl crate::Resettable for PWM0_THRE1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/pwm/pwm0_thre2.rs b/src/pwm/pwm0_thre2.rs index 424f877..17dce51 100644 --- a/src/pwm/pwm0_thre2.rs +++ b/src/pwm/pwm0_thre2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,37 +28,17 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `pwm_thre2` reader - "] -pub struct PWM_THRE2_R(crate::FieldReader); -impl PWM_THRE2_R { - pub(crate) fn new(bits: u16) -> Self { - PWM_THRE2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_THRE2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PWM_THRE2_R = crate::FieldReader; #[doc = "Field `pwm_thre2` writer - "] -pub struct PWM_THRE2_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_THRE2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w - } -} +pub type PWM_THRE2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PWM0_THRE2_SPEC, u16, u16, 16, O>; impl R { #[doc = "Bits 0:15"] #[inline(always)] @@ -68,10 +49,12 @@ impl R { impl W { #[doc = "Bits 0:15"] #[inline(always)] - pub fn pwm_thre2(&mut self) -> PWM_THRE2_W { - PWM_THRE2_W { w: self } + #[must_use] + pub fn pwm_thre2(&mut self) -> PWM_THRE2_W<0> { + PWM_THRE2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for PWM0_THRE2_SPEC { #[doc = "`write(|w| ..)` method takes [pwm0_thre2::W](W) writer structure"] impl crate::Writable for PWM0_THRE2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pwm0_thre2 to value 0"] impl crate::Resettable for PWM0_THRE2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/pwm/pwm1_clkdiv.rs b/src/pwm/pwm1_clkdiv.rs index 6aeca0f..5db0aeb 100644 --- a/src/pwm/pwm1_clkdiv.rs +++ b/src/pwm/pwm1_clkdiv.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,37 +28,17 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `pwm_clk_div` reader - "] -pub struct PWM_CLK_DIV_R(crate::FieldReader); -impl PWM_CLK_DIV_R { - pub(crate) fn new(bits: u16) -> Self { - PWM_CLK_DIV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_CLK_DIV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PWM_CLK_DIV_R = crate::FieldReader; #[doc = "Field `pwm_clk_div` writer - "] -pub struct PWM_CLK_DIV_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_CLK_DIV_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w - } -} +pub type PWM_CLK_DIV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PWM1_CLKDIV_SPEC, u16, u16, 16, O>; impl R { #[doc = "Bits 0:15"] #[inline(always)] @@ -68,10 +49,12 @@ impl R { impl W { #[doc = "Bits 0:15"] #[inline(always)] - pub fn pwm_clk_div(&mut self) -> PWM_CLK_DIV_W { - PWM_CLK_DIV_W { w: self } + #[must_use] + pub fn pwm_clk_div(&mut self) -> PWM_CLK_DIV_W<0> { + PWM_CLK_DIV_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for PWM1_CLKDIV_SPEC { #[doc = "`write(|w| ..)` method takes [pwm1_clkdiv::W](W) writer structure"] impl crate::Writable for PWM1_CLKDIV_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pwm1_clkdiv to value 0"] impl crate::Resettable for PWM1_CLKDIV_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/pwm/pwm1_config.rs b/src/pwm/pwm1_config.rs index 14bfbe0..b6e9a95 100644 --- a/src/pwm/pwm1_config.rs +++ b/src/pwm/pwm1_config.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,300 +28,115 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `pwm_sts_top` reader - "] -pub struct PWM_STS_TOP_R(crate::FieldReader); -impl PWM_STS_TOP_R { - pub(crate) fn new(bits: bool) -> Self { - PWM_STS_TOP_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_STS_TOP_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwm_stop_en` reader - "] -pub struct PWM_STOP_EN_R(crate::FieldReader); -impl PWM_STOP_EN_R { - pub(crate) fn new(bits: bool) -> Self { - PWM_STOP_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_STOP_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwm_stop_en` writer - "] -pub struct PWM_STOP_EN_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_STOP_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w - } -} -#[doc = "Field `pwm_sw_mode` reader - "] -pub struct PWM_SW_MODE_R(crate::FieldReader); -impl PWM_SW_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - PWM_SW_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_SW_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwm_sw_mode` writer - "] -pub struct PWM_SW_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_SW_MODE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w - } -} -#[doc = "Field `pwm_sw_force_val` reader - "] -pub struct PWM_SW_FORCE_VAL_R(crate::FieldReader); -impl PWM_SW_FORCE_VAL_R { - pub(crate) fn new(bits: bool) -> Self { - PWM_SW_FORCE_VAL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_SW_FORCE_VAL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwm_sw_force_val` writer - "] -pub struct PWM_SW_FORCE_VAL_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_SW_FORCE_VAL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} -#[doc = "Field `pwm_stop_mode` reader - "] -pub struct PWM_STOP_MODE_R(crate::FieldReader); -impl PWM_STOP_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - PWM_STOP_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_STOP_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwm_stop_mode` writer - "] -pub struct PWM_STOP_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_STOP_MODE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `pwm_out_inv` reader - "] -pub struct PWM_OUT_INV_R(crate::FieldReader); -impl PWM_OUT_INV_R { - pub(crate) fn new(bits: bool) -> Self { - PWM_OUT_INV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_OUT_INV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwm_out_inv` writer - "] -pub struct PWM_OUT_INV_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_OUT_INV_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} #[doc = "Field `reg_clk_sel` reader - "] -pub struct REG_CLK_SEL_R(crate::FieldReader); -impl REG_CLK_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - REG_CLK_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_CLK_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type REG_CLK_SEL_R = crate::FieldReader; #[doc = "Field `reg_clk_sel` writer - "] -pub struct REG_CLK_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> REG_CLK_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w - } -} +pub type REG_CLK_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PWM1_CONFIG_SPEC, u8, u8, 2, O>; +#[doc = "Field `pwm_out_inv` reader - "] +pub type PWM_OUT_INV_R = crate::BitReader; +#[doc = "Field `pwm_out_inv` writer - "] +pub type PWM_OUT_INV_W<'a, const O: u8> = crate::BitWriter<'a, u32, PWM1_CONFIG_SPEC, bool, O>; +#[doc = "Field `pwm_stop_mode` reader - "] +pub type PWM_STOP_MODE_R = crate::BitReader; +#[doc = "Field `pwm_stop_mode` writer - "] +pub type PWM_STOP_MODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, PWM1_CONFIG_SPEC, bool, O>; +#[doc = "Field `pwm_sw_force_val` reader - "] +pub type PWM_SW_FORCE_VAL_R = crate::BitReader; +#[doc = "Field `pwm_sw_force_val` writer - "] +pub type PWM_SW_FORCE_VAL_W<'a, const O: u8> = crate::BitWriter<'a, u32, PWM1_CONFIG_SPEC, bool, O>; +#[doc = "Field `pwm_sw_mode` reader - "] +pub type PWM_SW_MODE_R = crate::BitReader; +#[doc = "Field `pwm_sw_mode` writer - "] +pub type PWM_SW_MODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, PWM1_CONFIG_SPEC, bool, O>; +#[doc = "Field `pwm_stop_en` reader - "] +pub type PWM_STOP_EN_R = crate::BitReader; +#[doc = "Field `pwm_stop_en` writer - "] +pub type PWM_STOP_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PWM1_CONFIG_SPEC, bool, O>; +#[doc = "Field `pwm_sts_top` reader - "] +pub type PWM_STS_TOP_R = crate::BitReader; impl R { - #[doc = "Bit 7"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn pwm_sts_top(&self) -> PWM_STS_TOP_R { - PWM_STS_TOP_R::new(((self.bits >> 7) & 0x01) != 0) + pub fn reg_clk_sel(&self) -> REG_CLK_SEL_R { + REG_CLK_SEL_R::new((self.bits & 3) as u8) } - #[doc = "Bit 6"] + #[doc = "Bit 2"] #[inline(always)] - pub fn pwm_stop_en(&self) -> PWM_STOP_EN_R { - PWM_STOP_EN_R::new(((self.bits >> 6) & 0x01) != 0) + pub fn pwm_out_inv(&self) -> PWM_OUT_INV_R { + PWM_OUT_INV_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 5"] + #[doc = "Bit 3"] #[inline(always)] - pub fn pwm_sw_mode(&self) -> PWM_SW_MODE_R { - PWM_SW_MODE_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn pwm_stop_mode(&self) -> PWM_STOP_MODE_R { + PWM_STOP_MODE_R::new(((self.bits >> 3) & 1) != 0) } #[doc = "Bit 4"] #[inline(always)] pub fn pwm_sw_force_val(&self) -> PWM_SW_FORCE_VAL_R { - PWM_SW_FORCE_VAL_R::new(((self.bits >> 4) & 0x01) != 0) + PWM_SW_FORCE_VAL_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 3"] + #[doc = "Bit 5"] #[inline(always)] - pub fn pwm_stop_mode(&self) -> PWM_STOP_MODE_R { - PWM_STOP_MODE_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn pwm_sw_mode(&self) -> PWM_SW_MODE_R { + PWM_SW_MODE_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bit 6"] #[inline(always)] - pub fn pwm_out_inv(&self) -> PWM_OUT_INV_R { - PWM_OUT_INV_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn pwm_stop_en(&self) -> PWM_STOP_EN_R { + PWM_STOP_EN_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = "Bits 0:1"] + #[doc = "Bit 7"] #[inline(always)] - pub fn reg_clk_sel(&self) -> REG_CLK_SEL_R { - REG_CLK_SEL_R::new((self.bits & 0x03) as u8) + pub fn pwm_sts_top(&self) -> PWM_STS_TOP_R { + PWM_STS_TOP_R::new(((self.bits >> 7) & 1) != 0) } } impl W { - #[doc = "Bit 6"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn pwm_stop_en(&mut self) -> PWM_STOP_EN_W { - PWM_STOP_EN_W { w: self } + #[must_use] + pub fn reg_clk_sel(&mut self) -> REG_CLK_SEL_W<0> { + REG_CLK_SEL_W::new(self) } - #[doc = "Bit 5"] + #[doc = "Bit 2"] #[inline(always)] - pub fn pwm_sw_mode(&mut self) -> PWM_SW_MODE_W { - PWM_SW_MODE_W { w: self } + #[must_use] + pub fn pwm_out_inv(&mut self) -> PWM_OUT_INV_W<2> { + PWM_OUT_INV_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 3"] #[inline(always)] - pub fn pwm_sw_force_val(&mut self) -> PWM_SW_FORCE_VAL_W { - PWM_SW_FORCE_VAL_W { w: self } + #[must_use] + pub fn pwm_stop_mode(&mut self) -> PWM_STOP_MODE_W<3> { + PWM_STOP_MODE_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bit 4"] #[inline(always)] - pub fn pwm_stop_mode(&mut self) -> PWM_STOP_MODE_W { - PWM_STOP_MODE_W { w: self } + #[must_use] + pub fn pwm_sw_force_val(&mut self) -> PWM_SW_FORCE_VAL_W<4> { + PWM_SW_FORCE_VAL_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bit 5"] #[inline(always)] - pub fn pwm_out_inv(&mut self) -> PWM_OUT_INV_W { - PWM_OUT_INV_W { w: self } + #[must_use] + pub fn pwm_sw_mode(&mut self) -> PWM_SW_MODE_W<5> { + PWM_SW_MODE_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bit 6"] #[inline(always)] - pub fn reg_clk_sel(&mut self) -> REG_CLK_SEL_W { - REG_CLK_SEL_W { w: self } + #[must_use] + pub fn pwm_stop_en(&mut self) -> PWM_STOP_EN_W<6> { + PWM_STOP_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -338,11 +154,10 @@ impl crate::Readable for PWM1_CONFIG_SPEC { #[doc = "`write(|w| ..)` method takes [pwm1_config::W](W) writer structure"] impl crate::Writable for PWM1_CONFIG_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pwm1_config to value 0x08"] impl crate::Resettable for PWM1_CONFIG_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x08 - } + const RESET_VALUE: Self::Ux = 0x08; } diff --git a/src/pwm/pwm1_interrupt.rs b/src/pwm/pwm1_interrupt.rs index e8167d4..6fb65ff 100644 --- a/src/pwm/pwm1_interrupt.rs +++ b/src/pwm/pwm1_interrupt.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,97 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `pwm_int_enable` reader - "] -pub struct PWM_INT_ENABLE_R(crate::FieldReader); -impl PWM_INT_ENABLE_R { - pub(crate) fn new(bits: bool) -> Self { - PWM_INT_ENABLE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_INT_ENABLE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwm_int_enable` writer - "] -pub struct PWM_INT_ENABLE_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_INT_ENABLE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} #[doc = "Field `pwm_int_period_cnt` reader - "] -pub struct PWM_INT_PERIOD_CNT_R(crate::FieldReader); -impl PWM_INT_PERIOD_CNT_R { - pub(crate) fn new(bits: u16) -> Self { - PWM_INT_PERIOD_CNT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_INT_PERIOD_CNT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PWM_INT_PERIOD_CNT_R = crate::FieldReader; #[doc = "Field `pwm_int_period_cnt` writer - "] -pub struct PWM_INT_PERIOD_CNT_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_INT_PERIOD_CNT_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w - } -} +pub type PWM_INT_PERIOD_CNT_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PWM1_INTERRUPT_SPEC, u16, u16, 16, O>; +#[doc = "Field `pwm_int_enable` reader - "] +pub type PWM_INT_ENABLE_R = crate::BitReader; +#[doc = "Field `pwm_int_enable` writer - "] +pub type PWM_INT_ENABLE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, PWM1_INTERRUPT_SPEC, bool, O>; impl R { - #[doc = "Bit 16"] - #[inline(always)] - pub fn pwm_int_enable(&self) -> PWM_INT_ENABLE_R { - PWM_INT_ENABLE_R::new(((self.bits >> 16) & 0x01) != 0) - } #[doc = "Bits 0:15"] #[inline(always)] pub fn pwm_int_period_cnt(&self) -> PWM_INT_PERIOD_CNT_R { PWM_INT_PERIOD_CNT_R::new((self.bits & 0xffff) as u16) } -} -impl W { #[doc = "Bit 16"] #[inline(always)] - pub fn pwm_int_enable(&mut self) -> PWM_INT_ENABLE_W { - PWM_INT_ENABLE_W { w: self } + pub fn pwm_int_enable(&self) -> PWM_INT_ENABLE_R { + PWM_INT_ENABLE_R::new(((self.bits >> 16) & 1) != 0) } +} +impl W { #[doc = "Bits 0:15"] #[inline(always)] - pub fn pwm_int_period_cnt(&mut self) -> PWM_INT_PERIOD_CNT_W { - PWM_INT_PERIOD_CNT_W { w: self } + #[must_use] + pub fn pwm_int_period_cnt(&mut self) -> PWM_INT_PERIOD_CNT_W<0> { + PWM_INT_PERIOD_CNT_W::new(self) + } + #[doc = "Bit 16"] + #[inline(always)] + #[must_use] + pub fn pwm_int_enable(&mut self) -> PWM_INT_ENABLE_W<16> { + PWM_INT_ENABLE_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -135,11 +88,10 @@ impl crate::Readable for PWM1_INTERRUPT_SPEC { #[doc = "`write(|w| ..)` method takes [pwm1_interrupt::W](W) writer structure"] impl crate::Writable for PWM1_INTERRUPT_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pwm1_interrupt to value 0"] impl crate::Resettable for PWM1_INTERRUPT_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/pwm/pwm1_period.rs b/src/pwm/pwm1_period.rs index 5e8f050..906b611 100644 --- a/src/pwm/pwm1_period.rs +++ b/src/pwm/pwm1_period.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,37 +28,17 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `pwm_period` reader - "] -pub struct PWM_PERIOD_R(crate::FieldReader); -impl PWM_PERIOD_R { - pub(crate) fn new(bits: u16) -> Self { - PWM_PERIOD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_PERIOD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PWM_PERIOD_R = crate::FieldReader; #[doc = "Field `pwm_period` writer - "] -pub struct PWM_PERIOD_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_PERIOD_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w - } -} +pub type PWM_PERIOD_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PWM1_PERIOD_SPEC, u16, u16, 16, O>; impl R { #[doc = "Bits 0:15"] #[inline(always)] @@ -68,10 +49,12 @@ impl R { impl W { #[doc = "Bits 0:15"] #[inline(always)] - pub fn pwm_period(&mut self) -> PWM_PERIOD_W { - PWM_PERIOD_W { w: self } + #[must_use] + pub fn pwm_period(&mut self) -> PWM_PERIOD_W<0> { + PWM_PERIOD_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for PWM1_PERIOD_SPEC { #[doc = "`write(|w| ..)` method takes [pwm1_period::W](W) writer structure"] impl crate::Writable for PWM1_PERIOD_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pwm1_period to value 0"] impl crate::Resettable for PWM1_PERIOD_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/pwm/pwm1_thre1.rs b/src/pwm/pwm1_thre1.rs index 72583d8..575923d 100644 --- a/src/pwm/pwm1_thre1.rs +++ b/src/pwm/pwm1_thre1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,37 +28,17 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `pwm_thre1` reader - "] -pub struct PWM_THRE1_R(crate::FieldReader); -impl PWM_THRE1_R { - pub(crate) fn new(bits: u16) -> Self { - PWM_THRE1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_THRE1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PWM_THRE1_R = crate::FieldReader; #[doc = "Field `pwm_thre1` writer - "] -pub struct PWM_THRE1_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_THRE1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w - } -} +pub type PWM_THRE1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PWM1_THRE1_SPEC, u16, u16, 16, O>; impl R { #[doc = "Bits 0:15"] #[inline(always)] @@ -68,10 +49,12 @@ impl R { impl W { #[doc = "Bits 0:15"] #[inline(always)] - pub fn pwm_thre1(&mut self) -> PWM_THRE1_W { - PWM_THRE1_W { w: self } + #[must_use] + pub fn pwm_thre1(&mut self) -> PWM_THRE1_W<0> { + PWM_THRE1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for PWM1_THRE1_SPEC { #[doc = "`write(|w| ..)` method takes [pwm1_thre1::W](W) writer structure"] impl crate::Writable for PWM1_THRE1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pwm1_thre1 to value 0"] impl crate::Resettable for PWM1_THRE1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/pwm/pwm1_thre2.rs b/src/pwm/pwm1_thre2.rs index d0613e8..85771ef 100644 --- a/src/pwm/pwm1_thre2.rs +++ b/src/pwm/pwm1_thre2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,37 +28,17 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `pwm_thre2` reader - "] -pub struct PWM_THRE2_R(crate::FieldReader); -impl PWM_THRE2_R { - pub(crate) fn new(bits: u16) -> Self { - PWM_THRE2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_THRE2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PWM_THRE2_R = crate::FieldReader; #[doc = "Field `pwm_thre2` writer - "] -pub struct PWM_THRE2_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_THRE2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w - } -} +pub type PWM_THRE2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PWM1_THRE2_SPEC, u16, u16, 16, O>; impl R { #[doc = "Bits 0:15"] #[inline(always)] @@ -68,10 +49,12 @@ impl R { impl W { #[doc = "Bits 0:15"] #[inline(always)] - pub fn pwm_thre2(&mut self) -> PWM_THRE2_W { - PWM_THRE2_W { w: self } + #[must_use] + pub fn pwm_thre2(&mut self) -> PWM_THRE2_W<0> { + PWM_THRE2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for PWM1_THRE2_SPEC { #[doc = "`write(|w| ..)` method takes [pwm1_thre2::W](W) writer structure"] impl crate::Writable for PWM1_THRE2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pwm1_thre2 to value 0"] impl crate::Resettable for PWM1_THRE2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/pwm/pwm2_clkdiv.rs b/src/pwm/pwm2_clkdiv.rs index c40a5d1..482a45c 100644 --- a/src/pwm/pwm2_clkdiv.rs +++ b/src/pwm/pwm2_clkdiv.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,37 +28,17 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `pwm_clk_div` reader - "] -pub struct PWM_CLK_DIV_R(crate::FieldReader); -impl PWM_CLK_DIV_R { - pub(crate) fn new(bits: u16) -> Self { - PWM_CLK_DIV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_CLK_DIV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PWM_CLK_DIV_R = crate::FieldReader; #[doc = "Field `pwm_clk_div` writer - "] -pub struct PWM_CLK_DIV_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_CLK_DIV_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w - } -} +pub type PWM_CLK_DIV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PWM2_CLKDIV_SPEC, u16, u16, 16, O>; impl R { #[doc = "Bits 0:15"] #[inline(always)] @@ -68,10 +49,12 @@ impl R { impl W { #[doc = "Bits 0:15"] #[inline(always)] - pub fn pwm_clk_div(&mut self) -> PWM_CLK_DIV_W { - PWM_CLK_DIV_W { w: self } + #[must_use] + pub fn pwm_clk_div(&mut self) -> PWM_CLK_DIV_W<0> { + PWM_CLK_DIV_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for PWM2_CLKDIV_SPEC { #[doc = "`write(|w| ..)` method takes [pwm2_clkdiv::W](W) writer structure"] impl crate::Writable for PWM2_CLKDIV_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pwm2_clkdiv to value 0"] impl crate::Resettable for PWM2_CLKDIV_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/pwm/pwm2_config.rs b/src/pwm/pwm2_config.rs index 1c8b5e3..b681ca1 100644 --- a/src/pwm/pwm2_config.rs +++ b/src/pwm/pwm2_config.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,300 +28,115 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `pwm_sts_top` reader - "] -pub struct PWM_STS_TOP_R(crate::FieldReader); -impl PWM_STS_TOP_R { - pub(crate) fn new(bits: bool) -> Self { - PWM_STS_TOP_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_STS_TOP_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwm_stop_en` reader - "] -pub struct PWM_STOP_EN_R(crate::FieldReader); -impl PWM_STOP_EN_R { - pub(crate) fn new(bits: bool) -> Self { - PWM_STOP_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_STOP_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwm_stop_en` writer - "] -pub struct PWM_STOP_EN_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_STOP_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w - } -} -#[doc = "Field `pwm_sw_mode` reader - "] -pub struct PWM_SW_MODE_R(crate::FieldReader); -impl PWM_SW_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - PWM_SW_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_SW_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwm_sw_mode` writer - "] -pub struct PWM_SW_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_SW_MODE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w - } -} -#[doc = "Field `pwm_sw_force_val` reader - "] -pub struct PWM_SW_FORCE_VAL_R(crate::FieldReader); -impl PWM_SW_FORCE_VAL_R { - pub(crate) fn new(bits: bool) -> Self { - PWM_SW_FORCE_VAL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_SW_FORCE_VAL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwm_sw_force_val` writer - "] -pub struct PWM_SW_FORCE_VAL_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_SW_FORCE_VAL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} -#[doc = "Field `pwm_stop_mode` reader - "] -pub struct PWM_STOP_MODE_R(crate::FieldReader); -impl PWM_STOP_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - PWM_STOP_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_STOP_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwm_stop_mode` writer - "] -pub struct PWM_STOP_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_STOP_MODE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `pwm_out_inv` reader - "] -pub struct PWM_OUT_INV_R(crate::FieldReader); -impl PWM_OUT_INV_R { - pub(crate) fn new(bits: bool) -> Self { - PWM_OUT_INV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_OUT_INV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwm_out_inv` writer - "] -pub struct PWM_OUT_INV_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_OUT_INV_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} #[doc = "Field `reg_clk_sel` reader - "] -pub struct REG_CLK_SEL_R(crate::FieldReader); -impl REG_CLK_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - REG_CLK_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_CLK_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type REG_CLK_SEL_R = crate::FieldReader; #[doc = "Field `reg_clk_sel` writer - "] -pub struct REG_CLK_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> REG_CLK_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w - } -} +pub type REG_CLK_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PWM2_CONFIG_SPEC, u8, u8, 2, O>; +#[doc = "Field `pwm_out_inv` reader - "] +pub type PWM_OUT_INV_R = crate::BitReader; +#[doc = "Field `pwm_out_inv` writer - "] +pub type PWM_OUT_INV_W<'a, const O: u8> = crate::BitWriter<'a, u32, PWM2_CONFIG_SPEC, bool, O>; +#[doc = "Field `pwm_stop_mode` reader - "] +pub type PWM_STOP_MODE_R = crate::BitReader; +#[doc = "Field `pwm_stop_mode` writer - "] +pub type PWM_STOP_MODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, PWM2_CONFIG_SPEC, bool, O>; +#[doc = "Field `pwm_sw_force_val` reader - "] +pub type PWM_SW_FORCE_VAL_R = crate::BitReader; +#[doc = "Field `pwm_sw_force_val` writer - "] +pub type PWM_SW_FORCE_VAL_W<'a, const O: u8> = crate::BitWriter<'a, u32, PWM2_CONFIG_SPEC, bool, O>; +#[doc = "Field `pwm_sw_mode` reader - "] +pub type PWM_SW_MODE_R = crate::BitReader; +#[doc = "Field `pwm_sw_mode` writer - "] +pub type PWM_SW_MODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, PWM2_CONFIG_SPEC, bool, O>; +#[doc = "Field `pwm_stop_en` reader - "] +pub type PWM_STOP_EN_R = crate::BitReader; +#[doc = "Field `pwm_stop_en` writer - "] +pub type PWM_STOP_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PWM2_CONFIG_SPEC, bool, O>; +#[doc = "Field `pwm_sts_top` reader - "] +pub type PWM_STS_TOP_R = crate::BitReader; impl R { - #[doc = "Bit 7"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn pwm_sts_top(&self) -> PWM_STS_TOP_R { - PWM_STS_TOP_R::new(((self.bits >> 7) & 0x01) != 0) + pub fn reg_clk_sel(&self) -> REG_CLK_SEL_R { + REG_CLK_SEL_R::new((self.bits & 3) as u8) } - #[doc = "Bit 6"] + #[doc = "Bit 2"] #[inline(always)] - pub fn pwm_stop_en(&self) -> PWM_STOP_EN_R { - PWM_STOP_EN_R::new(((self.bits >> 6) & 0x01) != 0) + pub fn pwm_out_inv(&self) -> PWM_OUT_INV_R { + PWM_OUT_INV_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 5"] + #[doc = "Bit 3"] #[inline(always)] - pub fn pwm_sw_mode(&self) -> PWM_SW_MODE_R { - PWM_SW_MODE_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn pwm_stop_mode(&self) -> PWM_STOP_MODE_R { + PWM_STOP_MODE_R::new(((self.bits >> 3) & 1) != 0) } #[doc = "Bit 4"] #[inline(always)] pub fn pwm_sw_force_val(&self) -> PWM_SW_FORCE_VAL_R { - PWM_SW_FORCE_VAL_R::new(((self.bits >> 4) & 0x01) != 0) + PWM_SW_FORCE_VAL_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 3"] + #[doc = "Bit 5"] #[inline(always)] - pub fn pwm_stop_mode(&self) -> PWM_STOP_MODE_R { - PWM_STOP_MODE_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn pwm_sw_mode(&self) -> PWM_SW_MODE_R { + PWM_SW_MODE_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bit 6"] #[inline(always)] - pub fn pwm_out_inv(&self) -> PWM_OUT_INV_R { - PWM_OUT_INV_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn pwm_stop_en(&self) -> PWM_STOP_EN_R { + PWM_STOP_EN_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = "Bits 0:1"] + #[doc = "Bit 7"] #[inline(always)] - pub fn reg_clk_sel(&self) -> REG_CLK_SEL_R { - REG_CLK_SEL_R::new((self.bits & 0x03) as u8) + pub fn pwm_sts_top(&self) -> PWM_STS_TOP_R { + PWM_STS_TOP_R::new(((self.bits >> 7) & 1) != 0) } } impl W { - #[doc = "Bit 6"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn pwm_stop_en(&mut self) -> PWM_STOP_EN_W { - PWM_STOP_EN_W { w: self } + #[must_use] + pub fn reg_clk_sel(&mut self) -> REG_CLK_SEL_W<0> { + REG_CLK_SEL_W::new(self) } - #[doc = "Bit 5"] + #[doc = "Bit 2"] #[inline(always)] - pub fn pwm_sw_mode(&mut self) -> PWM_SW_MODE_W { - PWM_SW_MODE_W { w: self } + #[must_use] + pub fn pwm_out_inv(&mut self) -> PWM_OUT_INV_W<2> { + PWM_OUT_INV_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 3"] #[inline(always)] - pub fn pwm_sw_force_val(&mut self) -> PWM_SW_FORCE_VAL_W { - PWM_SW_FORCE_VAL_W { w: self } + #[must_use] + pub fn pwm_stop_mode(&mut self) -> PWM_STOP_MODE_W<3> { + PWM_STOP_MODE_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bit 4"] #[inline(always)] - pub fn pwm_stop_mode(&mut self) -> PWM_STOP_MODE_W { - PWM_STOP_MODE_W { w: self } + #[must_use] + pub fn pwm_sw_force_val(&mut self) -> PWM_SW_FORCE_VAL_W<4> { + PWM_SW_FORCE_VAL_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bit 5"] #[inline(always)] - pub fn pwm_out_inv(&mut self) -> PWM_OUT_INV_W { - PWM_OUT_INV_W { w: self } + #[must_use] + pub fn pwm_sw_mode(&mut self) -> PWM_SW_MODE_W<5> { + PWM_SW_MODE_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bit 6"] #[inline(always)] - pub fn reg_clk_sel(&mut self) -> REG_CLK_SEL_W { - REG_CLK_SEL_W { w: self } + #[must_use] + pub fn pwm_stop_en(&mut self) -> PWM_STOP_EN_W<6> { + PWM_STOP_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -338,11 +154,10 @@ impl crate::Readable for PWM2_CONFIG_SPEC { #[doc = "`write(|w| ..)` method takes [pwm2_config::W](W) writer structure"] impl crate::Writable for PWM2_CONFIG_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pwm2_config to value 0x08"] impl crate::Resettable for PWM2_CONFIG_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x08 - } + const RESET_VALUE: Self::Ux = 0x08; } diff --git a/src/pwm/pwm2_interrupt.rs b/src/pwm/pwm2_interrupt.rs index 6a05234..4a42b79 100644 --- a/src/pwm/pwm2_interrupt.rs +++ b/src/pwm/pwm2_interrupt.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,97 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `pwm_int_enable` reader - "] -pub struct PWM_INT_ENABLE_R(crate::FieldReader); -impl PWM_INT_ENABLE_R { - pub(crate) fn new(bits: bool) -> Self { - PWM_INT_ENABLE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_INT_ENABLE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwm_int_enable` writer - "] -pub struct PWM_INT_ENABLE_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_INT_ENABLE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} #[doc = "Field `pwm_int_period_cnt` reader - "] -pub struct PWM_INT_PERIOD_CNT_R(crate::FieldReader); -impl PWM_INT_PERIOD_CNT_R { - pub(crate) fn new(bits: u16) -> Self { - PWM_INT_PERIOD_CNT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_INT_PERIOD_CNT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PWM_INT_PERIOD_CNT_R = crate::FieldReader; #[doc = "Field `pwm_int_period_cnt` writer - "] -pub struct PWM_INT_PERIOD_CNT_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_INT_PERIOD_CNT_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w - } -} +pub type PWM_INT_PERIOD_CNT_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PWM2_INTERRUPT_SPEC, u16, u16, 16, O>; +#[doc = "Field `pwm_int_enable` reader - "] +pub type PWM_INT_ENABLE_R = crate::BitReader; +#[doc = "Field `pwm_int_enable` writer - "] +pub type PWM_INT_ENABLE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, PWM2_INTERRUPT_SPEC, bool, O>; impl R { - #[doc = "Bit 16"] - #[inline(always)] - pub fn pwm_int_enable(&self) -> PWM_INT_ENABLE_R { - PWM_INT_ENABLE_R::new(((self.bits >> 16) & 0x01) != 0) - } #[doc = "Bits 0:15"] #[inline(always)] pub fn pwm_int_period_cnt(&self) -> PWM_INT_PERIOD_CNT_R { PWM_INT_PERIOD_CNT_R::new((self.bits & 0xffff) as u16) } -} -impl W { #[doc = "Bit 16"] #[inline(always)] - pub fn pwm_int_enable(&mut self) -> PWM_INT_ENABLE_W { - PWM_INT_ENABLE_W { w: self } + pub fn pwm_int_enable(&self) -> PWM_INT_ENABLE_R { + PWM_INT_ENABLE_R::new(((self.bits >> 16) & 1) != 0) } +} +impl W { #[doc = "Bits 0:15"] #[inline(always)] - pub fn pwm_int_period_cnt(&mut self) -> PWM_INT_PERIOD_CNT_W { - PWM_INT_PERIOD_CNT_W { w: self } + #[must_use] + pub fn pwm_int_period_cnt(&mut self) -> PWM_INT_PERIOD_CNT_W<0> { + PWM_INT_PERIOD_CNT_W::new(self) + } + #[doc = "Bit 16"] + #[inline(always)] + #[must_use] + pub fn pwm_int_enable(&mut self) -> PWM_INT_ENABLE_W<16> { + PWM_INT_ENABLE_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -135,11 +88,10 @@ impl crate::Readable for PWM2_INTERRUPT_SPEC { #[doc = "`write(|w| ..)` method takes [pwm2_interrupt::W](W) writer structure"] impl crate::Writable for PWM2_INTERRUPT_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pwm2_interrupt to value 0"] impl crate::Resettable for PWM2_INTERRUPT_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/pwm/pwm2_period.rs b/src/pwm/pwm2_period.rs index 25eb756..72cd734 100644 --- a/src/pwm/pwm2_period.rs +++ b/src/pwm/pwm2_period.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,37 +28,17 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `pwm_period` reader - "] -pub struct PWM_PERIOD_R(crate::FieldReader); -impl PWM_PERIOD_R { - pub(crate) fn new(bits: u16) -> Self { - PWM_PERIOD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_PERIOD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PWM_PERIOD_R = crate::FieldReader; #[doc = "Field `pwm_period` writer - "] -pub struct PWM_PERIOD_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_PERIOD_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w - } -} +pub type PWM_PERIOD_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PWM2_PERIOD_SPEC, u16, u16, 16, O>; impl R { #[doc = "Bits 0:15"] #[inline(always)] @@ -68,10 +49,12 @@ impl R { impl W { #[doc = "Bits 0:15"] #[inline(always)] - pub fn pwm_period(&mut self) -> PWM_PERIOD_W { - PWM_PERIOD_W { w: self } + #[must_use] + pub fn pwm_period(&mut self) -> PWM_PERIOD_W<0> { + PWM_PERIOD_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for PWM2_PERIOD_SPEC { #[doc = "`write(|w| ..)` method takes [pwm2_period::W](W) writer structure"] impl crate::Writable for PWM2_PERIOD_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pwm2_period to value 0"] impl crate::Resettable for PWM2_PERIOD_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/pwm/pwm2_thre1.rs b/src/pwm/pwm2_thre1.rs index 377ff0a..4c52c09 100644 --- a/src/pwm/pwm2_thre1.rs +++ b/src/pwm/pwm2_thre1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,37 +28,17 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `pwm_thre1` reader - "] -pub struct PWM_THRE1_R(crate::FieldReader); -impl PWM_THRE1_R { - pub(crate) fn new(bits: u16) -> Self { - PWM_THRE1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_THRE1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PWM_THRE1_R = crate::FieldReader; #[doc = "Field `pwm_thre1` writer - "] -pub struct PWM_THRE1_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_THRE1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w - } -} +pub type PWM_THRE1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PWM2_THRE1_SPEC, u16, u16, 16, O>; impl R { #[doc = "Bits 0:15"] #[inline(always)] @@ -68,10 +49,12 @@ impl R { impl W { #[doc = "Bits 0:15"] #[inline(always)] - pub fn pwm_thre1(&mut self) -> PWM_THRE1_W { - PWM_THRE1_W { w: self } + #[must_use] + pub fn pwm_thre1(&mut self) -> PWM_THRE1_W<0> { + PWM_THRE1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for PWM2_THRE1_SPEC { #[doc = "`write(|w| ..)` method takes [pwm2_thre1::W](W) writer structure"] impl crate::Writable for PWM2_THRE1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pwm2_thre1 to value 0"] impl crate::Resettable for PWM2_THRE1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/pwm/pwm2_thre2.rs b/src/pwm/pwm2_thre2.rs index 6ea4e32..0c399e2 100644 --- a/src/pwm/pwm2_thre2.rs +++ b/src/pwm/pwm2_thre2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,37 +28,17 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `pwm_thre2` reader - "] -pub struct PWM_THRE2_R(crate::FieldReader); -impl PWM_THRE2_R { - pub(crate) fn new(bits: u16) -> Self { - PWM_THRE2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_THRE2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PWM_THRE2_R = crate::FieldReader; #[doc = "Field `pwm_thre2` writer - "] -pub struct PWM_THRE2_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_THRE2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w - } -} +pub type PWM_THRE2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PWM2_THRE2_SPEC, u16, u16, 16, O>; impl R { #[doc = "Bits 0:15"] #[inline(always)] @@ -68,10 +49,12 @@ impl R { impl W { #[doc = "Bits 0:15"] #[inline(always)] - pub fn pwm_thre2(&mut self) -> PWM_THRE2_W { - PWM_THRE2_W { w: self } + #[must_use] + pub fn pwm_thre2(&mut self) -> PWM_THRE2_W<0> { + PWM_THRE2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for PWM2_THRE2_SPEC { #[doc = "`write(|w| ..)` method takes [pwm2_thre2::W](W) writer structure"] impl crate::Writable for PWM2_THRE2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pwm2_thre2 to value 0"] impl crate::Resettable for PWM2_THRE2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/pwm/pwm3_clkdiv.rs b/src/pwm/pwm3_clkdiv.rs index cfc166a..795c300 100644 --- a/src/pwm/pwm3_clkdiv.rs +++ b/src/pwm/pwm3_clkdiv.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,37 +28,17 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `pwm_clk_div` reader - "] -pub struct PWM_CLK_DIV_R(crate::FieldReader); -impl PWM_CLK_DIV_R { - pub(crate) fn new(bits: u16) -> Self { - PWM_CLK_DIV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_CLK_DIV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PWM_CLK_DIV_R = crate::FieldReader; #[doc = "Field `pwm_clk_div` writer - "] -pub struct PWM_CLK_DIV_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_CLK_DIV_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w - } -} +pub type PWM_CLK_DIV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PWM3_CLKDIV_SPEC, u16, u16, 16, O>; impl R { #[doc = "Bits 0:15"] #[inline(always)] @@ -68,10 +49,12 @@ impl R { impl W { #[doc = "Bits 0:15"] #[inline(always)] - pub fn pwm_clk_div(&mut self) -> PWM_CLK_DIV_W { - PWM_CLK_DIV_W { w: self } + #[must_use] + pub fn pwm_clk_div(&mut self) -> PWM_CLK_DIV_W<0> { + PWM_CLK_DIV_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for PWM3_CLKDIV_SPEC { #[doc = "`write(|w| ..)` method takes [pwm3_clkdiv::W](W) writer structure"] impl crate::Writable for PWM3_CLKDIV_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pwm3_clkdiv to value 0"] impl crate::Resettable for PWM3_CLKDIV_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/pwm/pwm3_config.rs b/src/pwm/pwm3_config.rs index 7467ebc..d306880 100644 --- a/src/pwm/pwm3_config.rs +++ b/src/pwm/pwm3_config.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,300 +28,115 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `pwm_sts_top` reader - "] -pub struct PWM_STS_TOP_R(crate::FieldReader); -impl PWM_STS_TOP_R { - pub(crate) fn new(bits: bool) -> Self { - PWM_STS_TOP_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_STS_TOP_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwm_stop_en` reader - "] -pub struct PWM_STOP_EN_R(crate::FieldReader); -impl PWM_STOP_EN_R { - pub(crate) fn new(bits: bool) -> Self { - PWM_STOP_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_STOP_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwm_stop_en` writer - "] -pub struct PWM_STOP_EN_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_STOP_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w - } -} -#[doc = "Field `pwm_sw_mode` reader - "] -pub struct PWM_SW_MODE_R(crate::FieldReader); -impl PWM_SW_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - PWM_SW_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_SW_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwm_sw_mode` writer - "] -pub struct PWM_SW_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_SW_MODE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w - } -} -#[doc = "Field `pwm_sw_force_val` reader - "] -pub struct PWM_SW_FORCE_VAL_R(crate::FieldReader); -impl PWM_SW_FORCE_VAL_R { - pub(crate) fn new(bits: bool) -> Self { - PWM_SW_FORCE_VAL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_SW_FORCE_VAL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwm_sw_force_val` writer - "] -pub struct PWM_SW_FORCE_VAL_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_SW_FORCE_VAL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} -#[doc = "Field `pwm_stop_mode` reader - "] -pub struct PWM_STOP_MODE_R(crate::FieldReader); -impl PWM_STOP_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - PWM_STOP_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_STOP_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwm_stop_mode` writer - "] -pub struct PWM_STOP_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_STOP_MODE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `pwm_out_inv` reader - "] -pub struct PWM_OUT_INV_R(crate::FieldReader); -impl PWM_OUT_INV_R { - pub(crate) fn new(bits: bool) -> Self { - PWM_OUT_INV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_OUT_INV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwm_out_inv` writer - "] -pub struct PWM_OUT_INV_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_OUT_INV_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} #[doc = "Field `reg_clk_sel` reader - "] -pub struct REG_CLK_SEL_R(crate::FieldReader); -impl REG_CLK_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - REG_CLK_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_CLK_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type REG_CLK_SEL_R = crate::FieldReader; #[doc = "Field `reg_clk_sel` writer - "] -pub struct REG_CLK_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> REG_CLK_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w - } -} +pub type REG_CLK_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PWM3_CONFIG_SPEC, u8, u8, 2, O>; +#[doc = "Field `pwm_out_inv` reader - "] +pub type PWM_OUT_INV_R = crate::BitReader; +#[doc = "Field `pwm_out_inv` writer - "] +pub type PWM_OUT_INV_W<'a, const O: u8> = crate::BitWriter<'a, u32, PWM3_CONFIG_SPEC, bool, O>; +#[doc = "Field `pwm_stop_mode` reader - "] +pub type PWM_STOP_MODE_R = crate::BitReader; +#[doc = "Field `pwm_stop_mode` writer - "] +pub type PWM_STOP_MODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, PWM3_CONFIG_SPEC, bool, O>; +#[doc = "Field `pwm_sw_force_val` reader - "] +pub type PWM_SW_FORCE_VAL_R = crate::BitReader; +#[doc = "Field `pwm_sw_force_val` writer - "] +pub type PWM_SW_FORCE_VAL_W<'a, const O: u8> = crate::BitWriter<'a, u32, PWM3_CONFIG_SPEC, bool, O>; +#[doc = "Field `pwm_sw_mode` reader - "] +pub type PWM_SW_MODE_R = crate::BitReader; +#[doc = "Field `pwm_sw_mode` writer - "] +pub type PWM_SW_MODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, PWM3_CONFIG_SPEC, bool, O>; +#[doc = "Field `pwm_stop_en` reader - "] +pub type PWM_STOP_EN_R = crate::BitReader; +#[doc = "Field `pwm_stop_en` writer - "] +pub type PWM_STOP_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PWM3_CONFIG_SPEC, bool, O>; +#[doc = "Field `pwm_sts_top` reader - "] +pub type PWM_STS_TOP_R = crate::BitReader; impl R { - #[doc = "Bit 7"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn pwm_sts_top(&self) -> PWM_STS_TOP_R { - PWM_STS_TOP_R::new(((self.bits >> 7) & 0x01) != 0) + pub fn reg_clk_sel(&self) -> REG_CLK_SEL_R { + REG_CLK_SEL_R::new((self.bits & 3) as u8) } - #[doc = "Bit 6"] + #[doc = "Bit 2"] #[inline(always)] - pub fn pwm_stop_en(&self) -> PWM_STOP_EN_R { - PWM_STOP_EN_R::new(((self.bits >> 6) & 0x01) != 0) + pub fn pwm_out_inv(&self) -> PWM_OUT_INV_R { + PWM_OUT_INV_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 5"] + #[doc = "Bit 3"] #[inline(always)] - pub fn pwm_sw_mode(&self) -> PWM_SW_MODE_R { - PWM_SW_MODE_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn pwm_stop_mode(&self) -> PWM_STOP_MODE_R { + PWM_STOP_MODE_R::new(((self.bits >> 3) & 1) != 0) } #[doc = "Bit 4"] #[inline(always)] pub fn pwm_sw_force_val(&self) -> PWM_SW_FORCE_VAL_R { - PWM_SW_FORCE_VAL_R::new(((self.bits >> 4) & 0x01) != 0) + PWM_SW_FORCE_VAL_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 3"] + #[doc = "Bit 5"] #[inline(always)] - pub fn pwm_stop_mode(&self) -> PWM_STOP_MODE_R { - PWM_STOP_MODE_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn pwm_sw_mode(&self) -> PWM_SW_MODE_R { + PWM_SW_MODE_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bit 6"] #[inline(always)] - pub fn pwm_out_inv(&self) -> PWM_OUT_INV_R { - PWM_OUT_INV_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn pwm_stop_en(&self) -> PWM_STOP_EN_R { + PWM_STOP_EN_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = "Bits 0:1"] + #[doc = "Bit 7"] #[inline(always)] - pub fn reg_clk_sel(&self) -> REG_CLK_SEL_R { - REG_CLK_SEL_R::new((self.bits & 0x03) as u8) + pub fn pwm_sts_top(&self) -> PWM_STS_TOP_R { + PWM_STS_TOP_R::new(((self.bits >> 7) & 1) != 0) } } impl W { - #[doc = "Bit 6"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn pwm_stop_en(&mut self) -> PWM_STOP_EN_W { - PWM_STOP_EN_W { w: self } + #[must_use] + pub fn reg_clk_sel(&mut self) -> REG_CLK_SEL_W<0> { + REG_CLK_SEL_W::new(self) } - #[doc = "Bit 5"] + #[doc = "Bit 2"] #[inline(always)] - pub fn pwm_sw_mode(&mut self) -> PWM_SW_MODE_W { - PWM_SW_MODE_W { w: self } + #[must_use] + pub fn pwm_out_inv(&mut self) -> PWM_OUT_INV_W<2> { + PWM_OUT_INV_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 3"] #[inline(always)] - pub fn pwm_sw_force_val(&mut self) -> PWM_SW_FORCE_VAL_W { - PWM_SW_FORCE_VAL_W { w: self } + #[must_use] + pub fn pwm_stop_mode(&mut self) -> PWM_STOP_MODE_W<3> { + PWM_STOP_MODE_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bit 4"] #[inline(always)] - pub fn pwm_stop_mode(&mut self) -> PWM_STOP_MODE_W { - PWM_STOP_MODE_W { w: self } + #[must_use] + pub fn pwm_sw_force_val(&mut self) -> PWM_SW_FORCE_VAL_W<4> { + PWM_SW_FORCE_VAL_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bit 5"] #[inline(always)] - pub fn pwm_out_inv(&mut self) -> PWM_OUT_INV_W { - PWM_OUT_INV_W { w: self } + #[must_use] + pub fn pwm_sw_mode(&mut self) -> PWM_SW_MODE_W<5> { + PWM_SW_MODE_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bit 6"] #[inline(always)] - pub fn reg_clk_sel(&mut self) -> REG_CLK_SEL_W { - REG_CLK_SEL_W { w: self } + #[must_use] + pub fn pwm_stop_en(&mut self) -> PWM_STOP_EN_W<6> { + PWM_STOP_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -338,11 +154,10 @@ impl crate::Readable for PWM3_CONFIG_SPEC { #[doc = "`write(|w| ..)` method takes [pwm3_config::W](W) writer structure"] impl crate::Writable for PWM3_CONFIG_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pwm3_config to value 0x08"] impl crate::Resettable for PWM3_CONFIG_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x08 - } + const RESET_VALUE: Self::Ux = 0x08; } diff --git a/src/pwm/pwm3_interrupt.rs b/src/pwm/pwm3_interrupt.rs index 4e0b951..cd438be 100644 --- a/src/pwm/pwm3_interrupt.rs +++ b/src/pwm/pwm3_interrupt.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,97 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `pwm_int_enable` reader - "] -pub struct PWM_INT_ENABLE_R(crate::FieldReader); -impl PWM_INT_ENABLE_R { - pub(crate) fn new(bits: bool) -> Self { - PWM_INT_ENABLE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_INT_ENABLE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwm_int_enable` writer - "] -pub struct PWM_INT_ENABLE_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_INT_ENABLE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} #[doc = "Field `pwm_int_period_cnt` reader - "] -pub struct PWM_INT_PERIOD_CNT_R(crate::FieldReader); -impl PWM_INT_PERIOD_CNT_R { - pub(crate) fn new(bits: u16) -> Self { - PWM_INT_PERIOD_CNT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_INT_PERIOD_CNT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PWM_INT_PERIOD_CNT_R = crate::FieldReader; #[doc = "Field `pwm_int_period_cnt` writer - "] -pub struct PWM_INT_PERIOD_CNT_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_INT_PERIOD_CNT_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w - } -} +pub type PWM_INT_PERIOD_CNT_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PWM3_INTERRUPT_SPEC, u16, u16, 16, O>; +#[doc = "Field `pwm_int_enable` reader - "] +pub type PWM_INT_ENABLE_R = crate::BitReader; +#[doc = "Field `pwm_int_enable` writer - "] +pub type PWM_INT_ENABLE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, PWM3_INTERRUPT_SPEC, bool, O>; impl R { - #[doc = "Bit 16"] - #[inline(always)] - pub fn pwm_int_enable(&self) -> PWM_INT_ENABLE_R { - PWM_INT_ENABLE_R::new(((self.bits >> 16) & 0x01) != 0) - } #[doc = "Bits 0:15"] #[inline(always)] pub fn pwm_int_period_cnt(&self) -> PWM_INT_PERIOD_CNT_R { PWM_INT_PERIOD_CNT_R::new((self.bits & 0xffff) as u16) } -} -impl W { #[doc = "Bit 16"] #[inline(always)] - pub fn pwm_int_enable(&mut self) -> PWM_INT_ENABLE_W { - PWM_INT_ENABLE_W { w: self } + pub fn pwm_int_enable(&self) -> PWM_INT_ENABLE_R { + PWM_INT_ENABLE_R::new(((self.bits >> 16) & 1) != 0) } +} +impl W { #[doc = "Bits 0:15"] #[inline(always)] - pub fn pwm_int_period_cnt(&mut self) -> PWM_INT_PERIOD_CNT_W { - PWM_INT_PERIOD_CNT_W { w: self } + #[must_use] + pub fn pwm_int_period_cnt(&mut self) -> PWM_INT_PERIOD_CNT_W<0> { + PWM_INT_PERIOD_CNT_W::new(self) + } + #[doc = "Bit 16"] + #[inline(always)] + #[must_use] + pub fn pwm_int_enable(&mut self) -> PWM_INT_ENABLE_W<16> { + PWM_INT_ENABLE_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -135,11 +88,10 @@ impl crate::Readable for PWM3_INTERRUPT_SPEC { #[doc = "`write(|w| ..)` method takes [pwm3_interrupt::W](W) writer structure"] impl crate::Writable for PWM3_INTERRUPT_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pwm3_interrupt to value 0"] impl crate::Resettable for PWM3_INTERRUPT_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/pwm/pwm3_period.rs b/src/pwm/pwm3_period.rs index a03d5d6..9952d27 100644 --- a/src/pwm/pwm3_period.rs +++ b/src/pwm/pwm3_period.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,37 +28,17 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `pwm_period` reader - "] -pub struct PWM_PERIOD_R(crate::FieldReader); -impl PWM_PERIOD_R { - pub(crate) fn new(bits: u16) -> Self { - PWM_PERIOD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_PERIOD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PWM_PERIOD_R = crate::FieldReader; #[doc = "Field `pwm_period` writer - "] -pub struct PWM_PERIOD_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_PERIOD_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w - } -} +pub type PWM_PERIOD_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PWM3_PERIOD_SPEC, u16, u16, 16, O>; impl R { #[doc = "Bits 0:15"] #[inline(always)] @@ -68,10 +49,12 @@ impl R { impl W { #[doc = "Bits 0:15"] #[inline(always)] - pub fn pwm_period(&mut self) -> PWM_PERIOD_W { - PWM_PERIOD_W { w: self } + #[must_use] + pub fn pwm_period(&mut self) -> PWM_PERIOD_W<0> { + PWM_PERIOD_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for PWM3_PERIOD_SPEC { #[doc = "`write(|w| ..)` method takes [pwm3_period::W](W) writer structure"] impl crate::Writable for PWM3_PERIOD_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pwm3_period to value 0"] impl crate::Resettable for PWM3_PERIOD_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/pwm/pwm3_thre1.rs b/src/pwm/pwm3_thre1.rs index a87fc0e..460a8fe 100644 --- a/src/pwm/pwm3_thre1.rs +++ b/src/pwm/pwm3_thre1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,37 +28,17 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `pwm_thre1` reader - "] -pub struct PWM_THRE1_R(crate::FieldReader); -impl PWM_THRE1_R { - pub(crate) fn new(bits: u16) -> Self { - PWM_THRE1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_THRE1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PWM_THRE1_R = crate::FieldReader; #[doc = "Field `pwm_thre1` writer - "] -pub struct PWM_THRE1_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_THRE1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w - } -} +pub type PWM_THRE1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PWM3_THRE1_SPEC, u16, u16, 16, O>; impl R { #[doc = "Bits 0:15"] #[inline(always)] @@ -68,10 +49,12 @@ impl R { impl W { #[doc = "Bits 0:15"] #[inline(always)] - pub fn pwm_thre1(&mut self) -> PWM_THRE1_W { - PWM_THRE1_W { w: self } + #[must_use] + pub fn pwm_thre1(&mut self) -> PWM_THRE1_W<0> { + PWM_THRE1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for PWM3_THRE1_SPEC { #[doc = "`write(|w| ..)` method takes [pwm3_thre1::W](W) writer structure"] impl crate::Writable for PWM3_THRE1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pwm3_thre1 to value 0"] impl crate::Resettable for PWM3_THRE1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/pwm/pwm3_thre2.rs b/src/pwm/pwm3_thre2.rs index 8dfb1d1..37a72c3 100644 --- a/src/pwm/pwm3_thre2.rs +++ b/src/pwm/pwm3_thre2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,37 +28,17 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `pwm_thre2` reader - "] -pub struct PWM_THRE2_R(crate::FieldReader); -impl PWM_THRE2_R { - pub(crate) fn new(bits: u16) -> Self { - PWM_THRE2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_THRE2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PWM_THRE2_R = crate::FieldReader; #[doc = "Field `pwm_thre2` writer - "] -pub struct PWM_THRE2_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_THRE2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w - } -} +pub type PWM_THRE2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PWM3_THRE2_SPEC, u16, u16, 16, O>; impl R { #[doc = "Bits 0:15"] #[inline(always)] @@ -68,10 +49,12 @@ impl R { impl W { #[doc = "Bits 0:15"] #[inline(always)] - pub fn pwm_thre2(&mut self) -> PWM_THRE2_W { - PWM_THRE2_W { w: self } + #[must_use] + pub fn pwm_thre2(&mut self) -> PWM_THRE2_W<0> { + PWM_THRE2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for PWM3_THRE2_SPEC { #[doc = "`write(|w| ..)` method takes [pwm3_thre2::W](W) writer structure"] impl crate::Writable for PWM3_THRE2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pwm3_thre2 to value 0"] impl crate::Resettable for PWM3_THRE2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/pwm/pwm4_clkdiv.rs b/src/pwm/pwm4_clkdiv.rs index 1137e4d..e2493ab 100644 --- a/src/pwm/pwm4_clkdiv.rs +++ b/src/pwm/pwm4_clkdiv.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,37 +28,17 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `pwm_clk_div` reader - "] -pub struct PWM_CLK_DIV_R(crate::FieldReader); -impl PWM_CLK_DIV_R { - pub(crate) fn new(bits: u16) -> Self { - PWM_CLK_DIV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_CLK_DIV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PWM_CLK_DIV_R = crate::FieldReader; #[doc = "Field `pwm_clk_div` writer - "] -pub struct PWM_CLK_DIV_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_CLK_DIV_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w - } -} +pub type PWM_CLK_DIV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PWM4_CLKDIV_SPEC, u16, u16, 16, O>; impl R { #[doc = "Bits 0:15"] #[inline(always)] @@ -68,10 +49,12 @@ impl R { impl W { #[doc = "Bits 0:15"] #[inline(always)] - pub fn pwm_clk_div(&mut self) -> PWM_CLK_DIV_W { - PWM_CLK_DIV_W { w: self } + #[must_use] + pub fn pwm_clk_div(&mut self) -> PWM_CLK_DIV_W<0> { + PWM_CLK_DIV_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for PWM4_CLKDIV_SPEC { #[doc = "`write(|w| ..)` method takes [pwm4_clkdiv::W](W) writer structure"] impl crate::Writable for PWM4_CLKDIV_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pwm4_clkdiv to value 0"] impl crate::Resettable for PWM4_CLKDIV_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/pwm/pwm4_config.rs b/src/pwm/pwm4_config.rs index dc0a2aa..827169d 100644 --- a/src/pwm/pwm4_config.rs +++ b/src/pwm/pwm4_config.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,300 +28,115 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `pwm_sts_top` reader - "] -pub struct PWM_STS_TOP_R(crate::FieldReader); -impl PWM_STS_TOP_R { - pub(crate) fn new(bits: bool) -> Self { - PWM_STS_TOP_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_STS_TOP_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwm_stop_en` reader - "] -pub struct PWM_STOP_EN_R(crate::FieldReader); -impl PWM_STOP_EN_R { - pub(crate) fn new(bits: bool) -> Self { - PWM_STOP_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_STOP_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwm_stop_en` writer - "] -pub struct PWM_STOP_EN_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_STOP_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w - } -} -#[doc = "Field `pwm_sw_mode` reader - "] -pub struct PWM_SW_MODE_R(crate::FieldReader); -impl PWM_SW_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - PWM_SW_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_SW_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwm_sw_mode` writer - "] -pub struct PWM_SW_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_SW_MODE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w - } -} -#[doc = "Field `pwm_sw_force_val` reader - "] -pub struct PWM_SW_FORCE_VAL_R(crate::FieldReader); -impl PWM_SW_FORCE_VAL_R { - pub(crate) fn new(bits: bool) -> Self { - PWM_SW_FORCE_VAL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_SW_FORCE_VAL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwm_sw_force_val` writer - "] -pub struct PWM_SW_FORCE_VAL_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_SW_FORCE_VAL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} -#[doc = "Field `pwm_stop_mode` reader - "] -pub struct PWM_STOP_MODE_R(crate::FieldReader); -impl PWM_STOP_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - PWM_STOP_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_STOP_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwm_stop_mode` writer - "] -pub struct PWM_STOP_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_STOP_MODE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `pwm_out_inv` reader - "] -pub struct PWM_OUT_INV_R(crate::FieldReader); -impl PWM_OUT_INV_R { - pub(crate) fn new(bits: bool) -> Self { - PWM_OUT_INV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_OUT_INV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwm_out_inv` writer - "] -pub struct PWM_OUT_INV_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_OUT_INV_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} #[doc = "Field `reg_clk_sel` reader - "] -pub struct REG_CLK_SEL_R(crate::FieldReader); -impl REG_CLK_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - REG_CLK_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for REG_CLK_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type REG_CLK_SEL_R = crate::FieldReader; #[doc = "Field `reg_clk_sel` writer - "] -pub struct REG_CLK_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> REG_CLK_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w - } -} +pub type REG_CLK_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PWM4_CONFIG_SPEC, u8, u8, 2, O>; +#[doc = "Field `pwm_out_inv` reader - "] +pub type PWM_OUT_INV_R = crate::BitReader; +#[doc = "Field `pwm_out_inv` writer - "] +pub type PWM_OUT_INV_W<'a, const O: u8> = crate::BitWriter<'a, u32, PWM4_CONFIG_SPEC, bool, O>; +#[doc = "Field `pwm_stop_mode` reader - "] +pub type PWM_STOP_MODE_R = crate::BitReader; +#[doc = "Field `pwm_stop_mode` writer - "] +pub type PWM_STOP_MODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, PWM4_CONFIG_SPEC, bool, O>; +#[doc = "Field `pwm_sw_force_val` reader - "] +pub type PWM_SW_FORCE_VAL_R = crate::BitReader; +#[doc = "Field `pwm_sw_force_val` writer - "] +pub type PWM_SW_FORCE_VAL_W<'a, const O: u8> = crate::BitWriter<'a, u32, PWM4_CONFIG_SPEC, bool, O>; +#[doc = "Field `pwm_sw_mode` reader - "] +pub type PWM_SW_MODE_R = crate::BitReader; +#[doc = "Field `pwm_sw_mode` writer - "] +pub type PWM_SW_MODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, PWM4_CONFIG_SPEC, bool, O>; +#[doc = "Field `pwm_stop_en` reader - "] +pub type PWM_STOP_EN_R = crate::BitReader; +#[doc = "Field `pwm_stop_en` writer - "] +pub type PWM_STOP_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PWM4_CONFIG_SPEC, bool, O>; +#[doc = "Field `pwm_sts_top` reader - "] +pub type PWM_STS_TOP_R = crate::BitReader; impl R { - #[doc = "Bit 7"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn pwm_sts_top(&self) -> PWM_STS_TOP_R { - PWM_STS_TOP_R::new(((self.bits >> 7) & 0x01) != 0) + pub fn reg_clk_sel(&self) -> REG_CLK_SEL_R { + REG_CLK_SEL_R::new((self.bits & 3) as u8) } - #[doc = "Bit 6"] + #[doc = "Bit 2"] #[inline(always)] - pub fn pwm_stop_en(&self) -> PWM_STOP_EN_R { - PWM_STOP_EN_R::new(((self.bits >> 6) & 0x01) != 0) + pub fn pwm_out_inv(&self) -> PWM_OUT_INV_R { + PWM_OUT_INV_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 5"] + #[doc = "Bit 3"] #[inline(always)] - pub fn pwm_sw_mode(&self) -> PWM_SW_MODE_R { - PWM_SW_MODE_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn pwm_stop_mode(&self) -> PWM_STOP_MODE_R { + PWM_STOP_MODE_R::new(((self.bits >> 3) & 1) != 0) } #[doc = "Bit 4"] #[inline(always)] pub fn pwm_sw_force_val(&self) -> PWM_SW_FORCE_VAL_R { - PWM_SW_FORCE_VAL_R::new(((self.bits >> 4) & 0x01) != 0) + PWM_SW_FORCE_VAL_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 3"] + #[doc = "Bit 5"] #[inline(always)] - pub fn pwm_stop_mode(&self) -> PWM_STOP_MODE_R { - PWM_STOP_MODE_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn pwm_sw_mode(&self) -> PWM_SW_MODE_R { + PWM_SW_MODE_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bit 6"] #[inline(always)] - pub fn pwm_out_inv(&self) -> PWM_OUT_INV_R { - PWM_OUT_INV_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn pwm_stop_en(&self) -> PWM_STOP_EN_R { + PWM_STOP_EN_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = "Bits 0:1"] + #[doc = "Bit 7"] #[inline(always)] - pub fn reg_clk_sel(&self) -> REG_CLK_SEL_R { - REG_CLK_SEL_R::new((self.bits & 0x03) as u8) + pub fn pwm_sts_top(&self) -> PWM_STS_TOP_R { + PWM_STS_TOP_R::new(((self.bits >> 7) & 1) != 0) } } impl W { - #[doc = "Bit 6"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn pwm_stop_en(&mut self) -> PWM_STOP_EN_W { - PWM_STOP_EN_W { w: self } + #[must_use] + pub fn reg_clk_sel(&mut self) -> REG_CLK_SEL_W<0> { + REG_CLK_SEL_W::new(self) } - #[doc = "Bit 5"] + #[doc = "Bit 2"] #[inline(always)] - pub fn pwm_sw_mode(&mut self) -> PWM_SW_MODE_W { - PWM_SW_MODE_W { w: self } + #[must_use] + pub fn pwm_out_inv(&mut self) -> PWM_OUT_INV_W<2> { + PWM_OUT_INV_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 3"] #[inline(always)] - pub fn pwm_sw_force_val(&mut self) -> PWM_SW_FORCE_VAL_W { - PWM_SW_FORCE_VAL_W { w: self } + #[must_use] + pub fn pwm_stop_mode(&mut self) -> PWM_STOP_MODE_W<3> { + PWM_STOP_MODE_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bit 4"] #[inline(always)] - pub fn pwm_stop_mode(&mut self) -> PWM_STOP_MODE_W { - PWM_STOP_MODE_W { w: self } + #[must_use] + pub fn pwm_sw_force_val(&mut self) -> PWM_SW_FORCE_VAL_W<4> { + PWM_SW_FORCE_VAL_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bit 5"] #[inline(always)] - pub fn pwm_out_inv(&mut self) -> PWM_OUT_INV_W { - PWM_OUT_INV_W { w: self } + #[must_use] + pub fn pwm_sw_mode(&mut self) -> PWM_SW_MODE_W<5> { + PWM_SW_MODE_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bit 6"] #[inline(always)] - pub fn reg_clk_sel(&mut self) -> REG_CLK_SEL_W { - REG_CLK_SEL_W { w: self } + #[must_use] + pub fn pwm_stop_en(&mut self) -> PWM_STOP_EN_W<6> { + PWM_STOP_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -338,11 +154,10 @@ impl crate::Readable for PWM4_CONFIG_SPEC { #[doc = "`write(|w| ..)` method takes [pwm4_config::W](W) writer structure"] impl crate::Writable for PWM4_CONFIG_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pwm4_config to value 0x08"] impl crate::Resettable for PWM4_CONFIG_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x08 - } + const RESET_VALUE: Self::Ux = 0x08; } diff --git a/src/pwm/pwm4_interrupt.rs b/src/pwm/pwm4_interrupt.rs index 087e8c7..bcb2100 100644 --- a/src/pwm/pwm4_interrupt.rs +++ b/src/pwm/pwm4_interrupt.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,97 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `pwm_int_enable` reader - "] -pub struct PWM_INT_ENABLE_R(crate::FieldReader); -impl PWM_INT_ENABLE_R { - pub(crate) fn new(bits: bool) -> Self { - PWM_INT_ENABLE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_INT_ENABLE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwm_int_enable` writer - "] -pub struct PWM_INT_ENABLE_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_INT_ENABLE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} #[doc = "Field `pwm_int_period_cnt` reader - "] -pub struct PWM_INT_PERIOD_CNT_R(crate::FieldReader); -impl PWM_INT_PERIOD_CNT_R { - pub(crate) fn new(bits: u16) -> Self { - PWM_INT_PERIOD_CNT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_INT_PERIOD_CNT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PWM_INT_PERIOD_CNT_R = crate::FieldReader; #[doc = "Field `pwm_int_period_cnt` writer - "] -pub struct PWM_INT_PERIOD_CNT_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_INT_PERIOD_CNT_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w - } -} +pub type PWM_INT_PERIOD_CNT_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PWM4_INTERRUPT_SPEC, u16, u16, 16, O>; +#[doc = "Field `pwm_int_enable` reader - "] +pub type PWM_INT_ENABLE_R = crate::BitReader; +#[doc = "Field `pwm_int_enable` writer - "] +pub type PWM_INT_ENABLE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, PWM4_INTERRUPT_SPEC, bool, O>; impl R { - #[doc = "Bit 16"] - #[inline(always)] - pub fn pwm_int_enable(&self) -> PWM_INT_ENABLE_R { - PWM_INT_ENABLE_R::new(((self.bits >> 16) & 0x01) != 0) - } #[doc = "Bits 0:15"] #[inline(always)] pub fn pwm_int_period_cnt(&self) -> PWM_INT_PERIOD_CNT_R { PWM_INT_PERIOD_CNT_R::new((self.bits & 0xffff) as u16) } -} -impl W { #[doc = "Bit 16"] #[inline(always)] - pub fn pwm_int_enable(&mut self) -> PWM_INT_ENABLE_W { - PWM_INT_ENABLE_W { w: self } + pub fn pwm_int_enable(&self) -> PWM_INT_ENABLE_R { + PWM_INT_ENABLE_R::new(((self.bits >> 16) & 1) != 0) } +} +impl W { #[doc = "Bits 0:15"] #[inline(always)] - pub fn pwm_int_period_cnt(&mut self) -> PWM_INT_PERIOD_CNT_W { - PWM_INT_PERIOD_CNT_W { w: self } + #[must_use] + pub fn pwm_int_period_cnt(&mut self) -> PWM_INT_PERIOD_CNT_W<0> { + PWM_INT_PERIOD_CNT_W::new(self) + } + #[doc = "Bit 16"] + #[inline(always)] + #[must_use] + pub fn pwm_int_enable(&mut self) -> PWM_INT_ENABLE_W<16> { + PWM_INT_ENABLE_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -135,11 +88,10 @@ impl crate::Readable for PWM4_INTERRUPT_SPEC { #[doc = "`write(|w| ..)` method takes [pwm4_interrupt::W](W) writer structure"] impl crate::Writable for PWM4_INTERRUPT_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pwm4_interrupt to value 0"] impl crate::Resettable for PWM4_INTERRUPT_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/pwm/pwm4_period.rs b/src/pwm/pwm4_period.rs index b90e030..3b2b9dd 100644 --- a/src/pwm/pwm4_period.rs +++ b/src/pwm/pwm4_period.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,37 +28,17 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `pwm_period` reader - "] -pub struct PWM_PERIOD_R(crate::FieldReader); -impl PWM_PERIOD_R { - pub(crate) fn new(bits: u16) -> Self { - PWM_PERIOD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_PERIOD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PWM_PERIOD_R = crate::FieldReader; #[doc = "Field `pwm_period` writer - "] -pub struct PWM_PERIOD_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_PERIOD_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w - } -} +pub type PWM_PERIOD_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PWM4_PERIOD_SPEC, u16, u16, 16, O>; impl R { #[doc = "Bits 0:15"] #[inline(always)] @@ -68,10 +49,12 @@ impl R { impl W { #[doc = "Bits 0:15"] #[inline(always)] - pub fn pwm_period(&mut self) -> PWM_PERIOD_W { - PWM_PERIOD_W { w: self } + #[must_use] + pub fn pwm_period(&mut self) -> PWM_PERIOD_W<0> { + PWM_PERIOD_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for PWM4_PERIOD_SPEC { #[doc = "`write(|w| ..)` method takes [pwm4_period::W](W) writer structure"] impl crate::Writable for PWM4_PERIOD_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pwm4_period to value 0"] impl crate::Resettable for PWM4_PERIOD_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/pwm/pwm4_thre1.rs b/src/pwm/pwm4_thre1.rs index ccc6d73..a9b261b 100644 --- a/src/pwm/pwm4_thre1.rs +++ b/src/pwm/pwm4_thre1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,37 +28,17 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `pwm_thre1` reader - "] -pub struct PWM_THRE1_R(crate::FieldReader); -impl PWM_THRE1_R { - pub(crate) fn new(bits: u16) -> Self { - PWM_THRE1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_THRE1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PWM_THRE1_R = crate::FieldReader; #[doc = "Field `pwm_thre1` writer - "] -pub struct PWM_THRE1_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_THRE1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w - } -} +pub type PWM_THRE1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PWM4_THRE1_SPEC, u16, u16, 16, O>; impl R { #[doc = "Bits 0:15"] #[inline(always)] @@ -68,10 +49,12 @@ impl R { impl W { #[doc = "Bits 0:15"] #[inline(always)] - pub fn pwm_thre1(&mut self) -> PWM_THRE1_W { - PWM_THRE1_W { w: self } + #[must_use] + pub fn pwm_thre1(&mut self) -> PWM_THRE1_W<0> { + PWM_THRE1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for PWM4_THRE1_SPEC { #[doc = "`write(|w| ..)` method takes [pwm4_thre1::W](W) writer structure"] impl crate::Writable for PWM4_THRE1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pwm4_thre1 to value 0"] impl crate::Resettable for PWM4_THRE1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/pwm/pwm4_thre2.rs b/src/pwm/pwm4_thre2.rs index 1b86cdb..7197650 100644 --- a/src/pwm/pwm4_thre2.rs +++ b/src/pwm/pwm4_thre2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,37 +28,17 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `pwm_thre2` reader - "] -pub struct PWM_THRE2_R(crate::FieldReader); -impl PWM_THRE2_R { - pub(crate) fn new(bits: u16) -> Self { - PWM_THRE2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_THRE2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PWM_THRE2_R = crate::FieldReader; #[doc = "Field `pwm_thre2` writer - "] -pub struct PWM_THRE2_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_THRE2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w - } -} +pub type PWM_THRE2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PWM4_THRE2_SPEC, u16, u16, 16, O>; impl R { #[doc = "Bits 0:15"] #[inline(always)] @@ -68,10 +49,12 @@ impl R { impl W { #[doc = "Bits 0:15"] #[inline(always)] - pub fn pwm_thre2(&mut self) -> PWM_THRE2_W { - PWM_THRE2_W { w: self } + #[must_use] + pub fn pwm_thre2(&mut self) -> PWM_THRE2_W<0> { + PWM_THRE2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for PWM4_THRE2_SPEC { #[doc = "`write(|w| ..)` method takes [pwm4_thre2::W](W) writer structure"] impl crate::Writable for PWM4_THRE2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pwm4_thre2 to value 0"] impl crate::Resettable for PWM4_THRE2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/pwm/pwm_int_config.rs b/src/pwm/pwm_int_config.rs index fe75eca..6b677dd 100644 --- a/src/pwm/pwm_int_config.rs +++ b/src/pwm/pwm_int_config.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,37 +28,17 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `pwm_int_clear` writer - "] -pub struct PWM_INT_CLEAR_W<'a> { - w: &'a mut W, -} -impl<'a> PWM_INT_CLEAR_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 8)) | ((value as u32 & 0x3f) << 8); - self.w - } -} #[doc = "Field `pwm_interrupt_sts` reader - "] -pub struct PWM_INTERRUPT_STS_R(crate::FieldReader); -impl PWM_INTERRUPT_STS_R { - pub(crate) fn new(bits: u8) -> Self { - PWM_INTERRUPT_STS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWM_INTERRUPT_STS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PWM_INTERRUPT_STS_R = crate::FieldReader; +#[doc = "Field `pwm_int_clear` writer - "] +pub type PWM_INT_CLEAR_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PWM_INT_CONFIG_SPEC, u8, u8, 6, O>; impl R { #[doc = "Bits 0:5"] #[inline(always)] @@ -68,10 +49,12 @@ impl R { impl W { #[doc = "Bits 8:13"] #[inline(always)] - pub fn pwm_int_clear(&mut self) -> PWM_INT_CLEAR_W { - PWM_INT_CLEAR_W { w: self } + #[must_use] + pub fn pwm_int_clear(&mut self) -> PWM_INT_CLEAR_W<8> { + PWM_INT_CLEAR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for PWM_INT_CONFIG_SPEC { #[doc = "`write(|w| ..)` method takes [pwm_int_config::W](W) writer structure"] impl crate::Writable for PWM_INT_CONFIG_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pwm_int_config to value 0"] impl crate::Resettable for PWM_INT_CONFIG_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf.rs b/src/rf.rs index 99e7e3a..8e35d06 100644 --- a/src/rf.rs +++ b/src/rf.rs @@ -2,913 +2,913 @@ #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - Silicon revision"] - pub rf_rev: crate::Reg, + pub rf_rev: RF_REV, #[doc = "0x04 - Digital Control"] - pub rf_fsm_ctrl_hw: crate::Reg, + pub rf_fsm_ctrl_hw: RF_FSM_CTRL_HW, #[doc = "0x08 - rfsm status reg"] - pub rf_fsm_ctrl_sw: crate::Reg, + pub rf_fsm_ctrl_sw: RF_FSM_CTRL_SW, #[doc = "0x0c - Control logic switch"] - pub rfctrl_hw_en: crate::Reg, + pub rfctrl_hw_en: RFCTRL_HW_EN, #[doc = "0x10 - temp_comp."] - pub temp_comp: crate::Reg, + pub temp_comp: TEMP_COMP, #[doc = "0x14 - rfcal_status."] - pub rfcal_status: crate::Reg, + pub rfcal_status: RFCAL_STATUS, #[doc = "0x18 - rfcal_status2."] - pub rfcal_status2: crate::Reg, + pub rfcal_status2: RFCAL_STATUS2, #[doc = "0x1c - Calibration mode register"] - pub rfcal_ctrlen: crate::Reg, + pub rfcal_ctrlen: RFCAL_CTRLEN, #[doc = "0x20 - rf calibration state enabl in full cal list"] - pub rfcal_stateen: crate::Reg, + pub rfcal_stateen: RFCAL_STATEEN, #[doc = "0x24 - SARADC Control Registers"] - pub saradc_resv: crate::Reg, + pub saradc_resv: SARADC_RESV, #[doc = "0x28 - ZRF Control register 0"] - pub rf_base_ctrl1: crate::Reg, + pub rf_base_ctrl1: RF_BASE_CTRL1, #[doc = "0x2c - ZRF Control register 0"] - pub rf_base_ctrl2: crate::Reg, + pub rf_base_ctrl2: RF_BASE_CTRL2, #[doc = "0x30 - pucr1."] - pub pucr1: crate::Reg, + pub pucr1: PUCR1, #[doc = "0x34 - read only from hardware logic"] - pub pucr1_hw: crate::Reg, + pub pucr1_hw: PUCR1_HW, #[doc = "0x38 - pucr2."] - pub pucr2: crate::Reg, + pub pucr2: PUCR2, #[doc = "0x3c - pucr2_hw."] - pub pucr2_hw: crate::Reg, + pub pucr2_hw: PUCR2_HW, #[doc = "0x40 - ppu_ctrl_hw."] - pub ppu_ctrl_hw: crate::Reg, + pub ppu_ctrl_hw: PPU_CTRL_HW, #[doc = "0x44 - pud_ctrl_hw."] - pub pud_ctrl_hw: crate::Reg, + pub pud_ctrl_hw: PUD_CTRL_HW, #[doc = "0x48 - gain control1"] - pub trx_gain1: crate::Reg, + pub trx_gain1: TRX_GAIN1, #[doc = "0x4c - trx gain hardware readback"] - pub trx_gain_hw: crate::Reg, + pub trx_gain_hw: TRX_GAIN_HW, #[doc = "0x50 - dc test register"] - pub ten_dc: crate::Reg, + pub ten_dc: TEN_DC, #[doc = "0x54 - digital test register"] - pub ten_dig: crate::Reg, + pub ten_dig: TEN_DIG, #[doc = "0x58 - ac test register"] - pub ten_ac: crate::Reg, + pub ten_ac: TEN_AC, #[doc = "0x5c - pmip_mv2aon."] - pub pmip_mv2aon: crate::Reg, + pub pmip_mv2aon: PMIP_MV2AON, #[doc = "0x60 - RX normal bias mode registers"] - pub cip: crate::Reg, + pub cip: CIP, #[doc = "0x64 - pa1."] - pub pa1: crate::Reg, + pub pa1: PA1, #[doc = "0x68 - RX normal bias mode registers"] - pub pa2: crate::Reg, + pub pa2: PA2, #[doc = "0x6c - tmx."] - pub tmx: crate::Reg, + pub tmx: TMX, #[doc = "0x70 - tbb."] - pub tbb: crate::Reg, + pub tbb: TBB, #[doc = "0x74 - lna."] - pub lna: crate::Reg, + pub lna: LNA, #[doc = "0x78 - rmxgm."] - pub rmxgm: crate::Reg, + pub rmxgm: RMXGM, #[doc = "0x7c - rbb1."] - pub rbb1: crate::Reg, + pub rbb1: RBB1, #[doc = "0x80 - rbb2."] - pub rbb2: crate::Reg, + pub rbb2: RBB2, #[doc = "0x84 - rbb3."] - pub rbb3: crate::Reg, + pub rbb3: RBB3, #[doc = "0x88 - rbb4."] - pub rbb4: crate::Reg, + pub rbb4: RBB4, #[doc = "0x8c - adda1."] - pub adda1: crate::Reg, + pub adda1: ADDA1, #[doc = "0x90 - adda2."] - pub adda2: crate::Reg, - _reserved37: [u8; 12usize], + pub adda2: ADDA2, + _reserved37: [u8; 0x0c], #[doc = "0xa0 - vco1."] - pub vco1: crate::Reg, + pub vco1: VCO1, #[doc = "0xa4 - vco2."] - pub vco2: crate::Reg, + pub vco2: VCO2, #[doc = "0xa8 - vco3."] - pub vco3: crate::Reg, + pub vco3: VCO3, #[doc = "0xac - vco4."] - pub vco4: crate::Reg, + pub vco4: VCO4, #[doc = "0xb0 - pfdcp."] - pub pfdcp: crate::Reg, + pub pfdcp: PFDCP, #[doc = "0xb4 - lo."] - pub lo: crate::Reg, + pub lo: LO, #[doc = "0xb8 - fbdv."] - pub fbdv: crate::Reg, + pub fbdv: FBDV, #[doc = "0xbc - lodist."] - pub lodist: crate::Reg, + pub lodist: LODIST, #[doc = "0xc0 - sdm1."] - pub sdm1: crate::Reg, + pub sdm1: SDM1, #[doc = "0xc4 - sdm2."] - pub sdm2: crate::Reg, + pub sdm2: SDM2, #[doc = "0xc8 - sdm3."] - pub sdm3: crate::Reg, - _reserved48: [u8; 32usize], + pub sdm3: SDM3, + _reserved48: [u8; 0x20], #[doc = "0xec - rf_resv_reg_0."] - pub rf_resv_reg_0: crate::Reg, + pub rf_resv_reg_0: RF_RESV_REG_0, #[doc = "0xf0 - rf_resv_reg_1."] - pub rf_resv_reg_1: crate::Reg, + pub rf_resv_reg_1: RF_RESV_REG_1, #[doc = "0xf4 - rf_resv_reg_2."] - pub rf_resv_reg_2: crate::Reg, + pub rf_resv_reg_2: RF_RESV_REG_2, #[doc = "0xf8 - rrf_gain_index1."] - pub rrf_gain_index1: crate::Reg, + pub rrf_gain_index1: RRF_GAIN_INDEX1, #[doc = "0xfc - rrf_gain_index2."] - pub rrf_gain_index2: crate::Reg, + pub rrf_gain_index2: RRF_GAIN_INDEX2, #[doc = "0x100 - lna_ctrl_hw_mux."] - pub lna_ctrl_hw_mux: crate::Reg, + pub lna_ctrl_hw_mux: LNA_CTRL_HW_MUX, #[doc = "0x104 - rbb_gain_index1."] - pub rbb_gain_index1: crate::Reg, + pub rbb_gain_index1: RBB_GAIN_INDEX1, #[doc = "0x108 - rbb_gain_index2."] - pub rbb_gain_index2: crate::Reg, + pub rbb_gain_index2: RBB_GAIN_INDEX2, #[doc = "0x10c - rbb_gain_index3."] - pub rbb_gain_index3: crate::Reg, + pub rbb_gain_index3: RBB_GAIN_INDEX3, #[doc = "0x110 - rbb_gain_index4."] - pub rbb_gain_index4: crate::Reg, + pub rbb_gain_index4: RBB_GAIN_INDEX4, #[doc = "0x114 - rbb_gain_index5."] - pub rbb_gain_index5: crate::Reg, + pub rbb_gain_index5: RBB_GAIN_INDEX5, #[doc = "0x118 - tbb_gain_index1."] - pub tbb_gain_index1: crate::Reg, + pub tbb_gain_index1: TBB_GAIN_INDEX1, #[doc = "0x11c - tbb_gain_index2."] - pub tbb_gain_index2: crate::Reg, + pub tbb_gain_index2: TBB_GAIN_INDEX2, #[doc = "0x120 - tbb_gain_index3."] - pub tbb_gain_index3: crate::Reg, + pub tbb_gain_index3: TBB_GAIN_INDEX3, #[doc = "0x124 - tbb_gain_index4."] - pub tbb_gain_index4: crate::Reg, + pub tbb_gain_index4: TBB_GAIN_INDEX4, #[doc = "0x128 - pa_reg_ctrl_hw1."] - pub pa_reg_ctrl_hw1: crate::Reg, + pub pa_reg_ctrl_hw1: PA_REG_CTRL_HW1, #[doc = "0x12c - pa_reg_ctrl_hw2."] - pub pa_reg_ctrl_hw2: crate::Reg, + pub pa_reg_ctrl_hw2: PA_REG_CTRL_HW2, #[doc = "0x130 - pa_reg_wifi_ctrl_hw."] - pub pa_reg_wifi_ctrl_hw: crate::Reg, + pub pa_reg_wifi_ctrl_hw: PA_REG_WIFI_CTRL_HW, #[doc = "0x134 - adda_reg_ctrl_hw."] - pub adda_reg_ctrl_hw: crate::Reg, + pub adda_reg_ctrl_hw: ADDA_REG_CTRL_HW, #[doc = "0x138 - lo_reg_ctrl_hw1."] - pub lo_reg_ctrl_hw1: crate::Reg, + pub lo_reg_ctrl_hw1: LO_REG_CTRL_HW1, #[doc = "0x13c - lo_cal_ctrl_hw1."] - pub lo_cal_ctrl_hw1: crate::Reg, + pub lo_cal_ctrl_hw1: LO_CAL_CTRL_HW1, #[doc = "0x140 - lo_cal_ctrl_hw2."] - pub lo_cal_ctrl_hw2: crate::Reg, + pub lo_cal_ctrl_hw2: LO_CAL_CTRL_HW2, #[doc = "0x144 - lo_cal_ctrl_hw3."] - pub lo_cal_ctrl_hw3: crate::Reg, + pub lo_cal_ctrl_hw3: LO_CAL_CTRL_HW3, #[doc = "0x148 - lo_cal_ctrl_hw4."] - pub lo_cal_ctrl_hw4: crate::Reg, + pub lo_cal_ctrl_hw4: LO_CAL_CTRL_HW4, #[doc = "0x14c - lo_cal_ctrl_hw5."] - pub lo_cal_ctrl_hw5: crate::Reg, + pub lo_cal_ctrl_hw5: LO_CAL_CTRL_HW5, #[doc = "0x150 - lo_cal_ctrl_hw6."] - pub lo_cal_ctrl_hw6: crate::Reg, + pub lo_cal_ctrl_hw6: LO_CAL_CTRL_HW6, #[doc = "0x154 - lo_cal_ctrl_hw7."] - pub lo_cal_ctrl_hw7: crate::Reg, + pub lo_cal_ctrl_hw7: LO_CAL_CTRL_HW7, #[doc = "0x158 - lo_cal_ctrl_hw8."] - pub lo_cal_ctrl_hw8: crate::Reg, + pub lo_cal_ctrl_hw8: LO_CAL_CTRL_HW8, #[doc = "0x15c - lo_cal_ctrl_hw9."] - pub lo_cal_ctrl_hw9: crate::Reg, + pub lo_cal_ctrl_hw9: LO_CAL_CTRL_HW9, #[doc = "0x160 - lo_cal_ctrl_hw10."] - pub lo_cal_ctrl_hw10: crate::Reg, + pub lo_cal_ctrl_hw10: LO_CAL_CTRL_HW10, #[doc = "0x164 - lo_cal_ctrl_hw11."] - pub lo_cal_ctrl_hw11: crate::Reg, + pub lo_cal_ctrl_hw11: LO_CAL_CTRL_HW11, #[doc = "0x168 - rosdac_ctrl_hw1."] - pub rosdac_ctrl_hw1: crate::Reg, + pub rosdac_ctrl_hw1: ROSDAC_CTRL_HW1, #[doc = "0x16c - rosdac_ctrl_hw2."] - pub rosdac_ctrl_hw2: crate::Reg, + pub rosdac_ctrl_hw2: ROSDAC_CTRL_HW2, #[doc = "0x170 - rxiq_ctrl_hw1."] - pub rxiq_ctrl_hw1: crate::Reg, + pub rxiq_ctrl_hw1: RXIQ_CTRL_HW1, #[doc = "0x174 - rxiq_ctrl_hw2."] - pub rxiq_ctrl_hw2: crate::Reg, + pub rxiq_ctrl_hw2: RXIQ_CTRL_HW2, #[doc = "0x178 - rxiq_ctrl_hw3."] - pub rxiq_ctrl_hw3: crate::Reg, + pub rxiq_ctrl_hw3: RXIQ_CTRL_HW3, #[doc = "0x17c - rxiq_ctrl_hw4."] - pub rxiq_ctrl_hw4: crate::Reg, + pub rxiq_ctrl_hw4: RXIQ_CTRL_HW4, #[doc = "0x180 - tosdac_ctrl_hw1."] - pub tosdac_ctrl_hw1: crate::Reg, + pub tosdac_ctrl_hw1: TOSDAC_CTRL_HW1, #[doc = "0x184 - tosdac_ctrl_hw2."] - pub tosdac_ctrl_hw2: crate::Reg, + pub tosdac_ctrl_hw2: TOSDAC_CTRL_HW2, #[doc = "0x188 - tosdac_ctrl_hw3."] - pub tosdac_ctrl_hw3: crate::Reg, + pub tosdac_ctrl_hw3: TOSDAC_CTRL_HW3, #[doc = "0x18c - tosdac_ctrl_hw4."] - pub tosdac_ctrl_hw4: crate::Reg, + pub tosdac_ctrl_hw4: TOSDAC_CTRL_HW4, #[doc = "0x190 - tx_iq_gain_hw0."] - pub tx_iq_gain_hw0: crate::Reg, + pub tx_iq_gain_hw0: TX_IQ_GAIN_HW0, #[doc = "0x194 - tx_iq_gain_hw1."] - pub tx_iq_gain_hw1: crate::Reg, + pub tx_iq_gain_hw1: TX_IQ_GAIN_HW1, #[doc = "0x198 - tx_iq_gain_hw2."] - pub tx_iq_gain_hw2: crate::Reg, + pub tx_iq_gain_hw2: TX_IQ_GAIN_HW2, #[doc = "0x19c - tx_iq_gain_hw3."] - pub tx_iq_gain_hw3: crate::Reg, + pub tx_iq_gain_hw3: TX_IQ_GAIN_HW3, #[doc = "0x1a0 - tx_iq_gain_hw4."] - pub tx_iq_gain_hw4: crate::Reg, + pub tx_iq_gain_hw4: TX_IQ_GAIN_HW4, #[doc = "0x1a4 - tx_iq_gain_hw5."] - pub tx_iq_gain_hw5: crate::Reg, + pub tx_iq_gain_hw5: TX_IQ_GAIN_HW5, #[doc = "0x1a8 - tx_iq_gain_hw6."] - pub tx_iq_gain_hw6: crate::Reg, + pub tx_iq_gain_hw6: TX_IQ_GAIN_HW6, #[doc = "0x1ac - tx_iq_gain_hw7."] - pub tx_iq_gain_hw7: crate::Reg, + pub tx_iq_gain_hw7: TX_IQ_GAIN_HW7, #[doc = "0x1b0 - lo_sdm_ctrl_hw1."] - pub lo_sdm_ctrl_hw1: crate::Reg, + pub lo_sdm_ctrl_hw1: LO_SDM_CTRL_HW1, #[doc = "0x1b4 - lo_sdm_ctrl_hw2."] - pub lo_sdm_ctrl_hw2: crate::Reg, + pub lo_sdm_ctrl_hw2: LO_SDM_CTRL_HW2, #[doc = "0x1b8 - lo_sdm_ctrl_hw3."] - pub lo_sdm_ctrl_hw3: crate::Reg, + pub lo_sdm_ctrl_hw3: LO_SDM_CTRL_HW3, #[doc = "0x1bc - lo_sdm_ctrl_hw4."] - pub lo_sdm_ctrl_hw4: crate::Reg, + pub lo_sdm_ctrl_hw4: LO_SDM_CTRL_HW4, #[doc = "0x1c0 - lo_sdm_ctrl_hw5."] - pub lo_sdm_ctrl_hw5: crate::Reg, + pub lo_sdm_ctrl_hw5: LO_SDM_CTRL_HW5, #[doc = "0x1c4 - lo_sdm_ctrl_hw6."] - pub lo_sdm_ctrl_hw6: crate::Reg, + pub lo_sdm_ctrl_hw6: LO_SDM_CTRL_HW6, #[doc = "0x1c8 - lo_sdm_ctrl_hw7."] - pub lo_sdm_ctrl_hw7: crate::Reg, + pub lo_sdm_ctrl_hw7: LO_SDM_CTRL_HW7, #[doc = "0x1cc - lo_sdm_ctrl_hw8."] - pub lo_sdm_ctrl_hw8: crate::Reg, + pub lo_sdm_ctrl_hw8: LO_SDM_CTRL_HW8, #[doc = "0x1d0 - rbb_bw_ctrl_hw."] - pub rbb_bw_ctrl_hw: crate::Reg, - _reserved106: [u8; 56usize], + pub rbb_bw_ctrl_hw: RBB_BW_CTRL_HW, + _reserved106: [u8; 0x38], #[doc = "0x20c - singen_ctrl0."] - pub singen_ctrl0: crate::Reg, + pub singen_ctrl0: SINGEN_CTRL0, #[doc = "0x210 - singen_ctrl1."] - pub singen_ctrl1: crate::Reg, + pub singen_ctrl1: SINGEN_CTRL1, #[doc = "0x214 - singen_ctrl2."] - pub singen_ctrl2: crate::Reg, + pub singen_ctrl2: SINGEN_CTRL2, #[doc = "0x218 - singen_ctrl3."] - pub singen_ctrl3: crate::Reg, + pub singen_ctrl3: SINGEN_CTRL3, #[doc = "0x21c - singen_ctrl4."] - pub singen_ctrl4: crate::Reg, + pub singen_ctrl4: SINGEN_CTRL4, #[doc = "0x220 - rfif_dfe_ctrl0."] - pub rfif_dfe_ctrl0: crate::Reg, + pub rfif_dfe_ctrl0: RFIF_DFE_CTRL0, #[doc = "0x224 - rfif_test_read."] - pub rfif_test_read: crate::Reg, + pub rfif_test_read: RFIF_TEST_READ, #[doc = "0x228 - rfif_dig_ctrl."] - pub rfif_dig_ctrl: crate::Reg, + pub rfif_dig_ctrl: RFIF_DIG_CTRL, #[doc = "0x22c - rf_data_temp_0."] - pub rf_data_temp_0: crate::Reg, + pub rf_data_temp_0: RF_DATA_TEMP_0, #[doc = "0x230 - rf_data_temp_1."] - pub rf_data_temp_1: crate::Reg, + pub rf_data_temp_1: RF_DATA_TEMP_1, #[doc = "0x234 - rf_data_temp_2."] - pub rf_data_temp_2: crate::Reg, + pub rf_data_temp_2: RF_DATA_TEMP_2, #[doc = "0x238 - rf_data_temp_3."] - pub rf_data_temp_3: crate::Reg, + pub rf_data_temp_3: RF_DATA_TEMP_3, #[doc = "0x23c - rf_sram_ctrl0."] - pub rf_sram_ctrl0: crate::Reg, + pub rf_sram_ctrl0: RF_SRAM_CTRL0, #[doc = "0x240 - rf_sram_ctrl1."] - pub rf_sram_ctrl1: crate::Reg, + pub rf_sram_ctrl1: RF_SRAM_CTRL1, #[doc = "0x244 - rf_sram_ctrl2."] - pub rf_sram_ctrl2: crate::Reg, + pub rf_sram_ctrl2: RF_SRAM_CTRL2, #[doc = "0x248 - rf_sram_ctrl3."] - pub rf_sram_ctrl3: crate::Reg, + pub rf_sram_ctrl3: RF_SRAM_CTRL3, #[doc = "0x24c - rf_sram_ctrl4."] - pub rf_sram_ctrl4: crate::Reg, + pub rf_sram_ctrl4: RF_SRAM_CTRL4, #[doc = "0x250 - rf_sram_ctrl5."] - pub rf_sram_ctrl5: crate::Reg, + pub rf_sram_ctrl5: RF_SRAM_CTRL5, #[doc = "0x254 - rf_sram_ctrl6."] - pub rf_sram_ctrl6: crate::Reg, + pub rf_sram_ctrl6: RF_SRAM_CTRL6, #[doc = "0x258 - rf_ical_ctrl0."] - pub rf_ical_ctrl0: crate::Reg, + pub rf_ical_ctrl0: RF_ICAL_CTRL0, #[doc = "0x25c - rf_ical_ctrl1."] - pub rf_ical_ctrl1: crate::Reg, + pub rf_ical_ctrl1: RF_ICAL_CTRL1, #[doc = "0x260 - rf_ical_ctrl2."] - pub rf_ical_ctrl2: crate::Reg, + pub rf_ical_ctrl2: RF_ICAL_CTRL2, #[doc = "0x264 - rf_fsm_ctrl0."] - pub rf_fsm_ctrl0: crate::Reg, + pub rf_fsm_ctrl0: RF_FSM_CTRL0, #[doc = "0x268 - rf_fsm_ctrl1."] - pub rf_fsm_ctrl1: crate::Reg, + pub rf_fsm_ctrl1: RF_FSM_CTRL1, #[doc = "0x26c - rf_fsm_ctrl2."] - pub rf_fsm_ctrl2: crate::Reg, + pub rf_fsm_ctrl2: RF_FSM_CTRL2, #[doc = "0x270 - rf_pkdet_ctrl0."] - pub rf_pkdet_ctrl0: crate::Reg, - _reserved132: [u8; 908usize], + pub rf_pkdet_ctrl0: RF_PKDET_CTRL0, + _reserved132: [u8; 0x038c], #[doc = "0x600 - dfe_ctrl_0."] - pub dfe_ctrl_0: crate::Reg, + pub dfe_ctrl_0: DFE_CTRL_0, #[doc = "0x604 - dfe_ctrl_1."] - pub dfe_ctrl_1: crate::Reg, + pub dfe_ctrl_1: DFE_CTRL_1, #[doc = "0x608 - dfe_ctrl_2."] - pub dfe_ctrl_2: crate::Reg, + pub dfe_ctrl_2: DFE_CTRL_2, #[doc = "0x60c - dfe_ctrl_3."] - pub dfe_ctrl_3: crate::Reg, + pub dfe_ctrl_3: DFE_CTRL_3, #[doc = "0x610 - dfe_ctrl_4."] - pub dfe_ctrl_4: crate::Reg, + pub dfe_ctrl_4: DFE_CTRL_4, #[doc = "0x614 - dfe_ctrl_5."] - pub dfe_ctrl_5: crate::Reg, + pub dfe_ctrl_5: DFE_CTRL_5, #[doc = "0x618 - dfe_ctrl_6."] - pub dfe_ctrl_6: crate::Reg, + pub dfe_ctrl_6: DFE_CTRL_6, #[doc = "0x61c - dfe_ctrl_7."] - pub dfe_ctrl_7: crate::Reg, + pub dfe_ctrl_7: DFE_CTRL_7, #[doc = "0x620 - dfe_ctrl_8."] - pub dfe_ctrl_8: crate::Reg, + pub dfe_ctrl_8: DFE_CTRL_8, #[doc = "0x624 - dfe_ctrl_9."] - pub dfe_ctrl_9: crate::Reg, + pub dfe_ctrl_9: DFE_CTRL_9, #[doc = "0x628 - dfe_ctrl_10."] - pub dfe_ctrl_10: crate::Reg, + pub dfe_ctrl_10: DFE_CTRL_10, #[doc = "0x62c - dfe_ctrl_11."] - pub dfe_ctrl_11: crate::Reg, + pub dfe_ctrl_11: DFE_CTRL_11, #[doc = "0x630 - dfe_ctrl_12."] - pub dfe_ctrl_12: crate::Reg, + pub dfe_ctrl_12: DFE_CTRL_12, #[doc = "0x634 - dfe_ctrl_13."] - pub dfe_ctrl_13: crate::Reg, + pub dfe_ctrl_13: DFE_CTRL_13, #[doc = "0x638 - dfe_ctrl_14."] - pub dfe_ctrl_14: crate::Reg, + pub dfe_ctrl_14: DFE_CTRL_14, #[doc = "0x63c - dfe_ctrl_15."] - pub dfe_ctrl_15: crate::Reg, + pub dfe_ctrl_15: DFE_CTRL_15, #[doc = "0x640 - dfe_ctrl_16."] - pub dfe_ctrl_16: crate::Reg, + pub dfe_ctrl_16: DFE_CTRL_16, #[doc = "0x644 - dfe_ctrl_17."] - pub dfe_ctrl_17: crate::Reg, + pub dfe_ctrl_17: DFE_CTRL_17, #[doc = "0x648 - dfe_ctrl_18."] - pub dfe_ctrl_18: crate::Reg, + pub dfe_ctrl_18: DFE_CTRL_18, } -#[doc = "rf_rev register accessor: an alias for `Reg`"] +#[doc = "rf_rev (rw) register accessor: an alias for `Reg`"] pub type RF_REV = crate::Reg; #[doc = "Silicon revision"] pub mod rf_rev; -#[doc = "rf_fsm_ctrl_hw register accessor: an alias for `Reg`"] +#[doc = "rf_fsm_ctrl_hw (rw) register accessor: an alias for `Reg`"] pub type RF_FSM_CTRL_HW = crate::Reg; #[doc = "Digital Control"] pub mod rf_fsm_ctrl_hw; -#[doc = "rf_fsm_ctrl_sw register accessor: an alias for `Reg`"] +#[doc = "rf_fsm_ctrl_sw (rw) register accessor: an alias for `Reg`"] pub type RF_FSM_CTRL_SW = crate::Reg; #[doc = "rfsm status reg"] pub mod rf_fsm_ctrl_sw; -#[doc = "rfctrl_hw_en register accessor: an alias for `Reg`"] +#[doc = "rfctrl_hw_en (rw) register accessor: an alias for `Reg`"] pub type RFCTRL_HW_EN = crate::Reg; #[doc = "Control logic switch"] pub mod rfctrl_hw_en; -#[doc = "temp_comp register accessor: an alias for `Reg`"] +#[doc = "temp_comp (rw) register accessor: an alias for `Reg`"] pub type TEMP_COMP = crate::Reg; #[doc = "temp_comp."] pub mod temp_comp; -#[doc = "rfcal_status register accessor: an alias for `Reg`"] +#[doc = "rfcal_status (rw) register accessor: an alias for `Reg`"] pub type RFCAL_STATUS = crate::Reg; #[doc = "rfcal_status."] pub mod rfcal_status; -#[doc = "rfcal_status2 register accessor: an alias for `Reg`"] +#[doc = "rfcal_status2 (rw) register accessor: an alias for `Reg`"] pub type RFCAL_STATUS2 = crate::Reg; #[doc = "rfcal_status2."] pub mod rfcal_status2; -#[doc = "rfcal_ctrlen register accessor: an alias for `Reg`"] +#[doc = "rfcal_ctrlen (rw) register accessor: an alias for `Reg`"] pub type RFCAL_CTRLEN = crate::Reg; #[doc = "Calibration mode register"] pub mod rfcal_ctrlen; -#[doc = "rfcal_stateen register accessor: an alias for `Reg`"] +#[doc = "rfcal_stateen (rw) register accessor: an alias for `Reg`"] pub type RFCAL_STATEEN = crate::Reg; #[doc = "rf calibration state enabl in full cal list"] pub mod rfcal_stateen; -#[doc = "saradc_resv register accessor: an alias for `Reg`"] +#[doc = "saradc_resv (rw) register accessor: an alias for `Reg`"] pub type SARADC_RESV = crate::Reg; #[doc = "SARADC Control Registers"] pub mod saradc_resv; -#[doc = "rf_base_ctrl1 register accessor: an alias for `Reg`"] +#[doc = "rf_base_ctrl1 (rw) register accessor: an alias for `Reg`"] pub type RF_BASE_CTRL1 = crate::Reg; #[doc = "ZRF Control register 0"] pub mod rf_base_ctrl1; -#[doc = "rf_base_ctrl2 register accessor: an alias for `Reg`"] +#[doc = "rf_base_ctrl2 (rw) register accessor: an alias for `Reg`"] pub type RF_BASE_CTRL2 = crate::Reg; #[doc = "ZRF Control register 0"] pub mod rf_base_ctrl2; -#[doc = "pucr1 register accessor: an alias for `Reg`"] +#[doc = "pucr1 (rw) register accessor: an alias for `Reg`"] pub type PUCR1 = crate::Reg; #[doc = "pucr1."] pub mod pucr1; -#[doc = "pucr1_hw register accessor: an alias for `Reg`"] +#[doc = "pucr1_hw (rw) register accessor: an alias for `Reg`"] pub type PUCR1_HW = crate::Reg; #[doc = "read only from hardware logic"] pub mod pucr1_hw; -#[doc = "pucr2 register accessor: an alias for `Reg`"] +#[doc = "pucr2 (rw) register accessor: an alias for `Reg`"] pub type PUCR2 = crate::Reg; #[doc = "pucr2."] pub mod pucr2; -#[doc = "pucr2_hw register accessor: an alias for `Reg`"] +#[doc = "pucr2_hw (rw) register accessor: an alias for `Reg`"] pub type PUCR2_HW = crate::Reg; #[doc = "pucr2_hw."] pub mod pucr2_hw; -#[doc = "ppu_ctrl_hw register accessor: an alias for `Reg`"] +#[doc = "ppu_ctrl_hw (rw) register accessor: an alias for `Reg`"] pub type PPU_CTRL_HW = crate::Reg; #[doc = "ppu_ctrl_hw."] pub mod ppu_ctrl_hw; -#[doc = "pud_ctrl_hw register accessor: an alias for `Reg`"] +#[doc = "pud_ctrl_hw (rw) register accessor: an alias for `Reg`"] pub type PUD_CTRL_HW = crate::Reg; #[doc = "pud_ctrl_hw."] pub mod pud_ctrl_hw; -#[doc = "trx_gain1 register accessor: an alias for `Reg`"] +#[doc = "trx_gain1 (rw) register accessor: an alias for `Reg`"] pub type TRX_GAIN1 = crate::Reg; #[doc = "gain control1"] pub mod trx_gain1; -#[doc = "trx_gain_hw register accessor: an alias for `Reg`"] +#[doc = "trx_gain_hw (rw) register accessor: an alias for `Reg`"] pub type TRX_GAIN_HW = crate::Reg; #[doc = "trx gain hardware readback"] pub mod trx_gain_hw; -#[doc = "ten_dc register accessor: an alias for `Reg`"] +#[doc = "ten_dc (rw) register accessor: an alias for `Reg`"] pub type TEN_DC = crate::Reg; #[doc = "dc test register"] pub mod ten_dc; -#[doc = "ten_dig register accessor: an alias for `Reg`"] +#[doc = "ten_dig (rw) register accessor: an alias for `Reg`"] pub type TEN_DIG = crate::Reg; #[doc = "digital test register"] pub mod ten_dig; -#[doc = "ten_ac register accessor: an alias for `Reg`"] +#[doc = "ten_ac (rw) register accessor: an alias for `Reg`"] pub type TEN_AC = crate::Reg; #[doc = "ac test register"] pub mod ten_ac; -#[doc = "pmip_mv2aon register accessor: an alias for `Reg`"] +#[doc = "pmip_mv2aon (rw) register accessor: an alias for `Reg`"] pub type PMIP_MV2AON = crate::Reg; #[doc = "pmip_mv2aon."] pub mod pmip_mv2aon; -#[doc = "cip register accessor: an alias for `Reg`"] +#[doc = "cip (rw) register accessor: an alias for `Reg`"] pub type CIP = crate::Reg; #[doc = "RX normal bias mode registers"] pub mod cip; -#[doc = "pa1 register accessor: an alias for `Reg`"] +#[doc = "pa1 (rw) register accessor: an alias for `Reg`"] pub type PA1 = crate::Reg; #[doc = "pa1."] pub mod pa1; -#[doc = "pa2 register accessor: an alias for `Reg`"] +#[doc = "pa2 (rw) register accessor: an alias for `Reg`"] pub type PA2 = crate::Reg; #[doc = "RX normal bias mode registers"] pub mod pa2; -#[doc = "tmx register accessor: an alias for `Reg`"] +#[doc = "tmx (rw) register accessor: an alias for `Reg`"] pub type TMX = crate::Reg; #[doc = "tmx."] pub mod tmx; -#[doc = "tbb register accessor: an alias for `Reg`"] +#[doc = "tbb (rw) register accessor: an alias for `Reg`"] pub type TBB = crate::Reg; #[doc = "tbb."] pub mod tbb; -#[doc = "lna register accessor: an alias for `Reg`"] +#[doc = "lna (rw) register accessor: an alias for `Reg`"] pub type LNA = crate::Reg; #[doc = "lna."] pub mod lna; -#[doc = "rmxgm register accessor: an alias for `Reg`"] +#[doc = "rmxgm (rw) register accessor: an alias for `Reg`"] pub type RMXGM = crate::Reg; #[doc = "rmxgm."] pub mod rmxgm; -#[doc = "rbb1 register accessor: an alias for `Reg`"] +#[doc = "rbb1 (rw) register accessor: an alias for `Reg`"] pub type RBB1 = crate::Reg; #[doc = "rbb1."] pub mod rbb1; -#[doc = "rbb2 register accessor: an alias for `Reg`"] +#[doc = "rbb2 (rw) register accessor: an alias for `Reg`"] pub type RBB2 = crate::Reg; #[doc = "rbb2."] pub mod rbb2; -#[doc = "rbb3 register accessor: an alias for `Reg`"] +#[doc = "rbb3 (rw) register accessor: an alias for `Reg`"] pub type RBB3 = crate::Reg; #[doc = "rbb3."] pub mod rbb3; -#[doc = "rbb4 register accessor: an alias for `Reg`"] +#[doc = "rbb4 (rw) register accessor: an alias for `Reg`"] pub type RBB4 = crate::Reg; #[doc = "rbb4."] pub mod rbb4; -#[doc = "adda1 register accessor: an alias for `Reg`"] +#[doc = "adda1 (rw) register accessor: an alias for `Reg`"] pub type ADDA1 = crate::Reg; #[doc = "adda1."] pub mod adda1; -#[doc = "adda2 register accessor: an alias for `Reg`"] +#[doc = "adda2 (rw) register accessor: an alias for `Reg`"] pub type ADDA2 = crate::Reg; #[doc = "adda2."] pub mod adda2; -#[doc = "vco1 register accessor: an alias for `Reg`"] +#[doc = "vco1 (rw) register accessor: an alias for `Reg`"] pub type VCO1 = crate::Reg; #[doc = "vco1."] pub mod vco1; -#[doc = "vco2 register accessor: an alias for `Reg`"] +#[doc = "vco2 (rw) register accessor: an alias for `Reg`"] pub type VCO2 = crate::Reg; #[doc = "vco2."] pub mod vco2; -#[doc = "vco3 register accessor: an alias for `Reg`"] +#[doc = "vco3 (rw) register accessor: an alias for `Reg`"] pub type VCO3 = crate::Reg; #[doc = "vco3."] pub mod vco3; -#[doc = "vco4 register accessor: an alias for `Reg`"] +#[doc = "vco4 (rw) register accessor: an alias for `Reg`"] pub type VCO4 = crate::Reg; #[doc = "vco4."] pub mod vco4; -#[doc = "pfdcp register accessor: an alias for `Reg`"] +#[doc = "pfdcp (rw) register accessor: an alias for `Reg`"] pub type PFDCP = crate::Reg; #[doc = "pfdcp."] pub mod pfdcp; -#[doc = "lo register accessor: an alias for `Reg`"] +#[doc = "lo (rw) register accessor: an alias for `Reg`"] pub type LO = crate::Reg; #[doc = "lo."] pub mod lo; -#[doc = "fbdv register accessor: an alias for `Reg`"] +#[doc = "fbdv (rw) register accessor: an alias for `Reg`"] pub type FBDV = crate::Reg; #[doc = "fbdv."] pub mod fbdv; -#[doc = "lodist register accessor: an alias for `Reg`"] +#[doc = "lodist (rw) register accessor: an alias for `Reg`"] pub type LODIST = crate::Reg; #[doc = "lodist."] pub mod lodist; -#[doc = "sdm1 register accessor: an alias for `Reg`"] +#[doc = "sdm1 (rw) register accessor: an alias for `Reg`"] pub type SDM1 = crate::Reg; #[doc = "sdm1."] pub mod sdm1; -#[doc = "sdm2 register accessor: an alias for `Reg`"] +#[doc = "sdm2 (rw) register accessor: an alias for `Reg`"] pub type SDM2 = crate::Reg; #[doc = "sdm2."] pub mod sdm2; -#[doc = "sdm3 register accessor: an alias for `Reg`"] +#[doc = "sdm3 (rw) register accessor: an alias for `Reg`"] pub type SDM3 = crate::Reg; #[doc = "sdm3."] pub mod sdm3; -#[doc = "rf_resv_reg_0 register accessor: an alias for `Reg`"] +#[doc = "rf_resv_reg_0 (rw) register accessor: an alias for `Reg`"] pub type RF_RESV_REG_0 = crate::Reg; #[doc = "rf_resv_reg_0."] pub mod rf_resv_reg_0; -#[doc = "rf_resv_reg_1 register accessor: an alias for `Reg`"] +#[doc = "rf_resv_reg_1 (rw) register accessor: an alias for `Reg`"] pub type RF_RESV_REG_1 = crate::Reg; #[doc = "rf_resv_reg_1."] pub mod rf_resv_reg_1; -#[doc = "rf_resv_reg_2 register accessor: an alias for `Reg`"] +#[doc = "rf_resv_reg_2 (rw) register accessor: an alias for `Reg`"] pub type RF_RESV_REG_2 = crate::Reg; #[doc = "rf_resv_reg_2."] pub mod rf_resv_reg_2; -#[doc = "rrf_gain_index1 register accessor: an alias for `Reg`"] +#[doc = "rrf_gain_index1 (rw) register accessor: an alias for `Reg`"] pub type RRF_GAIN_INDEX1 = crate::Reg; #[doc = "rrf_gain_index1."] pub mod rrf_gain_index1; -#[doc = "rrf_gain_index2 register accessor: an alias for `Reg`"] +#[doc = "rrf_gain_index2 (rw) register accessor: an alias for `Reg`"] pub type RRF_GAIN_INDEX2 = crate::Reg; #[doc = "rrf_gain_index2."] pub mod rrf_gain_index2; -#[doc = "lna_ctrl_hw_mux register accessor: an alias for `Reg`"] +#[doc = "lna_ctrl_hw_mux (rw) register accessor: an alias for `Reg`"] pub type LNA_CTRL_HW_MUX = crate::Reg; #[doc = "lna_ctrl_hw_mux."] pub mod lna_ctrl_hw_mux; -#[doc = "rbb_gain_index1 register accessor: an alias for `Reg`"] +#[doc = "rbb_gain_index1 (rw) register accessor: an alias for `Reg`"] pub type RBB_GAIN_INDEX1 = crate::Reg; #[doc = "rbb_gain_index1."] pub mod rbb_gain_index1; -#[doc = "rbb_gain_index2 register accessor: an alias for `Reg`"] +#[doc = "rbb_gain_index2 (rw) register accessor: an alias for `Reg`"] pub type RBB_GAIN_INDEX2 = crate::Reg; #[doc = "rbb_gain_index2."] pub mod rbb_gain_index2; -#[doc = "rbb_gain_index3 register accessor: an alias for `Reg`"] +#[doc = "rbb_gain_index3 (rw) register accessor: an alias for `Reg`"] pub type RBB_GAIN_INDEX3 = crate::Reg; #[doc = "rbb_gain_index3."] pub mod rbb_gain_index3; -#[doc = "rbb_gain_index4 register accessor: an alias for `Reg`"] +#[doc = "rbb_gain_index4 (rw) register accessor: an alias for `Reg`"] pub type RBB_GAIN_INDEX4 = crate::Reg; #[doc = "rbb_gain_index4."] pub mod rbb_gain_index4; -#[doc = "rbb_gain_index5 register accessor: an alias for `Reg`"] +#[doc = "rbb_gain_index5 (rw) register accessor: an alias for `Reg`"] pub type RBB_GAIN_INDEX5 = crate::Reg; #[doc = "rbb_gain_index5."] pub mod rbb_gain_index5; -#[doc = "tbb_gain_index1 register accessor: an alias for `Reg`"] +#[doc = "tbb_gain_index1 (rw) register accessor: an alias for `Reg`"] pub type TBB_GAIN_INDEX1 = crate::Reg; #[doc = "tbb_gain_index1."] pub mod tbb_gain_index1; -#[doc = "tbb_gain_index2 register accessor: an alias for `Reg`"] +#[doc = "tbb_gain_index2 (rw) register accessor: an alias for `Reg`"] pub type TBB_GAIN_INDEX2 = crate::Reg; #[doc = "tbb_gain_index2."] pub mod tbb_gain_index2; -#[doc = "tbb_gain_index3 register accessor: an alias for `Reg`"] +#[doc = "tbb_gain_index3 (rw) register accessor: an alias for `Reg`"] pub type TBB_GAIN_INDEX3 = crate::Reg; #[doc = "tbb_gain_index3."] pub mod tbb_gain_index3; -#[doc = "tbb_gain_index4 register accessor: an alias for `Reg`"] +#[doc = "tbb_gain_index4 (rw) register accessor: an alias for `Reg`"] pub type TBB_GAIN_INDEX4 = crate::Reg; #[doc = "tbb_gain_index4."] pub mod tbb_gain_index4; -#[doc = "pa_reg_ctrl_hw1 register accessor: an alias for `Reg`"] +#[doc = "pa_reg_ctrl_hw1 (rw) register accessor: an alias for `Reg`"] pub type PA_REG_CTRL_HW1 = crate::Reg; #[doc = "pa_reg_ctrl_hw1."] pub mod pa_reg_ctrl_hw1; -#[doc = "pa_reg_ctrl_hw2 register accessor: an alias for `Reg`"] +#[doc = "pa_reg_ctrl_hw2 (rw) register accessor: an alias for `Reg`"] pub type PA_REG_CTRL_HW2 = crate::Reg; #[doc = "pa_reg_ctrl_hw2."] pub mod pa_reg_ctrl_hw2; -#[doc = "pa_reg_wifi_ctrl_hw register accessor: an alias for `Reg`"] +#[doc = "pa_reg_wifi_ctrl_hw (rw) register accessor: an alias for `Reg`"] pub type PA_REG_WIFI_CTRL_HW = crate::Reg; #[doc = "pa_reg_wifi_ctrl_hw."] pub mod pa_reg_wifi_ctrl_hw; -#[doc = "adda_reg_ctrl_hw register accessor: an alias for `Reg`"] +#[doc = "adda_reg_ctrl_hw (rw) register accessor: an alias for `Reg`"] pub type ADDA_REG_CTRL_HW = crate::Reg; #[doc = "adda_reg_ctrl_hw."] pub mod adda_reg_ctrl_hw; -#[doc = "lo_reg_ctrl_hw1 register accessor: an alias for `Reg`"] +#[doc = "lo_reg_ctrl_hw1 (rw) register accessor: an alias for `Reg`"] pub type LO_REG_CTRL_HW1 = crate::Reg; #[doc = "lo_reg_ctrl_hw1."] pub mod lo_reg_ctrl_hw1; -#[doc = "lo_cal_ctrl_hw1 register accessor: an alias for `Reg`"] +#[doc = "lo_cal_ctrl_hw1 (rw) register accessor: an alias for `Reg`"] pub type LO_CAL_CTRL_HW1 = crate::Reg; #[doc = "lo_cal_ctrl_hw1."] pub mod lo_cal_ctrl_hw1; -#[doc = "lo_cal_ctrl_hw2 register accessor: an alias for `Reg`"] +#[doc = "lo_cal_ctrl_hw2 (rw) register accessor: an alias for `Reg`"] pub type LO_CAL_CTRL_HW2 = crate::Reg; #[doc = "lo_cal_ctrl_hw2."] pub mod lo_cal_ctrl_hw2; -#[doc = "lo_cal_ctrl_hw3 register accessor: an alias for `Reg`"] +#[doc = "lo_cal_ctrl_hw3 (rw) register accessor: an alias for `Reg`"] pub type LO_CAL_CTRL_HW3 = crate::Reg; #[doc = "lo_cal_ctrl_hw3."] pub mod lo_cal_ctrl_hw3; -#[doc = "lo_cal_ctrl_hw4 register accessor: an alias for `Reg`"] +#[doc = "lo_cal_ctrl_hw4 (rw) register accessor: an alias for `Reg`"] pub type LO_CAL_CTRL_HW4 = crate::Reg; #[doc = "lo_cal_ctrl_hw4."] pub mod lo_cal_ctrl_hw4; -#[doc = "lo_cal_ctrl_hw5 register accessor: an alias for `Reg`"] +#[doc = "lo_cal_ctrl_hw5 (rw) register accessor: an alias for `Reg`"] pub type LO_CAL_CTRL_HW5 = crate::Reg; #[doc = "lo_cal_ctrl_hw5."] pub mod lo_cal_ctrl_hw5; -#[doc = "lo_cal_ctrl_hw6 register accessor: an alias for `Reg`"] +#[doc = "lo_cal_ctrl_hw6 (rw) register accessor: an alias for `Reg`"] pub type LO_CAL_CTRL_HW6 = crate::Reg; #[doc = "lo_cal_ctrl_hw6."] pub mod lo_cal_ctrl_hw6; -#[doc = "lo_cal_ctrl_hw7 register accessor: an alias for `Reg`"] +#[doc = "lo_cal_ctrl_hw7 (rw) register accessor: an alias for `Reg`"] pub type LO_CAL_CTRL_HW7 = crate::Reg; #[doc = "lo_cal_ctrl_hw7."] pub mod lo_cal_ctrl_hw7; -#[doc = "lo_cal_ctrl_hw8 register accessor: an alias for `Reg`"] +#[doc = "lo_cal_ctrl_hw8 (rw) register accessor: an alias for `Reg`"] pub type LO_CAL_CTRL_HW8 = crate::Reg; #[doc = "lo_cal_ctrl_hw8."] pub mod lo_cal_ctrl_hw8; -#[doc = "lo_cal_ctrl_hw9 register accessor: an alias for `Reg`"] +#[doc = "lo_cal_ctrl_hw9 (rw) register accessor: an alias for `Reg`"] pub type LO_CAL_CTRL_HW9 = crate::Reg; #[doc = "lo_cal_ctrl_hw9."] pub mod lo_cal_ctrl_hw9; -#[doc = "lo_cal_ctrl_hw10 register accessor: an alias for `Reg`"] +#[doc = "lo_cal_ctrl_hw10 (rw) register accessor: an alias for `Reg`"] pub type LO_CAL_CTRL_HW10 = crate::Reg; #[doc = "lo_cal_ctrl_hw10."] pub mod lo_cal_ctrl_hw10; -#[doc = "lo_cal_ctrl_hw11 register accessor: an alias for `Reg`"] +#[doc = "lo_cal_ctrl_hw11 (rw) register accessor: an alias for `Reg`"] pub type LO_CAL_CTRL_HW11 = crate::Reg; #[doc = "lo_cal_ctrl_hw11."] pub mod lo_cal_ctrl_hw11; -#[doc = "rosdac_ctrl_hw1 register accessor: an alias for `Reg`"] +#[doc = "rosdac_ctrl_hw1 (rw) register accessor: an alias for `Reg`"] pub type ROSDAC_CTRL_HW1 = crate::Reg; #[doc = "rosdac_ctrl_hw1."] pub mod rosdac_ctrl_hw1; -#[doc = "rosdac_ctrl_hw2 register accessor: an alias for `Reg`"] +#[doc = "rosdac_ctrl_hw2 (rw) register accessor: an alias for `Reg`"] pub type ROSDAC_CTRL_HW2 = crate::Reg; #[doc = "rosdac_ctrl_hw2."] pub mod rosdac_ctrl_hw2; -#[doc = "rxiq_ctrl_hw1 register accessor: an alias for `Reg`"] +#[doc = "rxiq_ctrl_hw1 (rw) register accessor: an alias for `Reg`"] pub type RXIQ_CTRL_HW1 = crate::Reg; #[doc = "rxiq_ctrl_hw1."] pub mod rxiq_ctrl_hw1; -#[doc = "rxiq_ctrl_hw2 register accessor: an alias for `Reg`"] +#[doc = "rxiq_ctrl_hw2 (rw) register accessor: an alias for `Reg`"] pub type RXIQ_CTRL_HW2 = crate::Reg; #[doc = "rxiq_ctrl_hw2."] pub mod rxiq_ctrl_hw2; -#[doc = "rxiq_ctrl_hw3 register accessor: an alias for `Reg`"] +#[doc = "rxiq_ctrl_hw3 (rw) register accessor: an alias for `Reg`"] pub type RXIQ_CTRL_HW3 = crate::Reg; #[doc = "rxiq_ctrl_hw3."] pub mod rxiq_ctrl_hw3; -#[doc = "rxiq_ctrl_hw4 register accessor: an alias for `Reg`"] +#[doc = "rxiq_ctrl_hw4 (rw) register accessor: an alias for `Reg`"] pub type RXIQ_CTRL_HW4 = crate::Reg; #[doc = "rxiq_ctrl_hw4."] pub mod rxiq_ctrl_hw4; -#[doc = "tosdac_ctrl_hw1 register accessor: an alias for `Reg`"] +#[doc = "tosdac_ctrl_hw1 (rw) register accessor: an alias for `Reg`"] pub type TOSDAC_CTRL_HW1 = crate::Reg; #[doc = "tosdac_ctrl_hw1."] pub mod tosdac_ctrl_hw1; -#[doc = "tosdac_ctrl_hw2 register accessor: an alias for `Reg`"] +#[doc = "tosdac_ctrl_hw2 (rw) register accessor: an alias for `Reg`"] pub type TOSDAC_CTRL_HW2 = crate::Reg; #[doc = "tosdac_ctrl_hw2."] pub mod tosdac_ctrl_hw2; -#[doc = "tosdac_ctrl_hw3 register accessor: an alias for `Reg`"] +#[doc = "tosdac_ctrl_hw3 (rw) register accessor: an alias for `Reg`"] pub type TOSDAC_CTRL_HW3 = crate::Reg; #[doc = "tosdac_ctrl_hw3."] pub mod tosdac_ctrl_hw3; -#[doc = "tosdac_ctrl_hw4 register accessor: an alias for `Reg`"] +#[doc = "tosdac_ctrl_hw4 (rw) register accessor: an alias for `Reg`"] pub type TOSDAC_CTRL_HW4 = crate::Reg; #[doc = "tosdac_ctrl_hw4."] pub mod tosdac_ctrl_hw4; -#[doc = "tx_iq_gain_hw0 register accessor: an alias for `Reg`"] +#[doc = "tx_iq_gain_hw0 (rw) register accessor: an alias for `Reg`"] pub type TX_IQ_GAIN_HW0 = crate::Reg; #[doc = "tx_iq_gain_hw0."] pub mod tx_iq_gain_hw0; -#[doc = "tx_iq_gain_hw1 register accessor: an alias for `Reg`"] +#[doc = "tx_iq_gain_hw1 (rw) register accessor: an alias for `Reg`"] pub type TX_IQ_GAIN_HW1 = crate::Reg; #[doc = "tx_iq_gain_hw1."] pub mod tx_iq_gain_hw1; -#[doc = "tx_iq_gain_hw2 register accessor: an alias for `Reg`"] +#[doc = "tx_iq_gain_hw2 (rw) register accessor: an alias for `Reg`"] pub type TX_IQ_GAIN_HW2 = crate::Reg; #[doc = "tx_iq_gain_hw2."] pub mod tx_iq_gain_hw2; -#[doc = "tx_iq_gain_hw3 register accessor: an alias for `Reg`"] +#[doc = "tx_iq_gain_hw3 (rw) register accessor: an alias for `Reg`"] pub type TX_IQ_GAIN_HW3 = crate::Reg; #[doc = "tx_iq_gain_hw3."] pub mod tx_iq_gain_hw3; -#[doc = "tx_iq_gain_hw4 register accessor: an alias for `Reg`"] +#[doc = "tx_iq_gain_hw4 (rw) register accessor: an alias for `Reg`"] pub type TX_IQ_GAIN_HW4 = crate::Reg; #[doc = "tx_iq_gain_hw4."] pub mod tx_iq_gain_hw4; -#[doc = "tx_iq_gain_hw5 register accessor: an alias for `Reg`"] +#[doc = "tx_iq_gain_hw5 (rw) register accessor: an alias for `Reg`"] pub type TX_IQ_GAIN_HW5 = crate::Reg; #[doc = "tx_iq_gain_hw5."] pub mod tx_iq_gain_hw5; -#[doc = "tx_iq_gain_hw6 register accessor: an alias for `Reg`"] +#[doc = "tx_iq_gain_hw6 (rw) register accessor: an alias for `Reg`"] pub type TX_IQ_GAIN_HW6 = crate::Reg; #[doc = "tx_iq_gain_hw6."] pub mod tx_iq_gain_hw6; -#[doc = "tx_iq_gain_hw7 register accessor: an alias for `Reg`"] +#[doc = "tx_iq_gain_hw7 (rw) register accessor: an alias for `Reg`"] pub type TX_IQ_GAIN_HW7 = crate::Reg; #[doc = "tx_iq_gain_hw7."] pub mod tx_iq_gain_hw7; -#[doc = "lo_sdm_ctrl_hw1 register accessor: an alias for `Reg`"] +#[doc = "lo_sdm_ctrl_hw1 (rw) register accessor: an alias for `Reg`"] pub type LO_SDM_CTRL_HW1 = crate::Reg; #[doc = "lo_sdm_ctrl_hw1."] pub mod lo_sdm_ctrl_hw1; -#[doc = "lo_sdm_ctrl_hw2 register accessor: an alias for `Reg`"] +#[doc = "lo_sdm_ctrl_hw2 (rw) register accessor: an alias for `Reg`"] pub type LO_SDM_CTRL_HW2 = crate::Reg; #[doc = "lo_sdm_ctrl_hw2."] pub mod lo_sdm_ctrl_hw2; -#[doc = "lo_sdm_ctrl_hw3 register accessor: an alias for `Reg`"] +#[doc = "lo_sdm_ctrl_hw3 (rw) register accessor: an alias for `Reg`"] pub type LO_SDM_CTRL_HW3 = crate::Reg; #[doc = "lo_sdm_ctrl_hw3."] pub mod lo_sdm_ctrl_hw3; -#[doc = "lo_sdm_ctrl_hw4 register accessor: an alias for `Reg`"] +#[doc = "lo_sdm_ctrl_hw4 (rw) register accessor: an alias for `Reg`"] pub type LO_SDM_CTRL_HW4 = crate::Reg; #[doc = "lo_sdm_ctrl_hw4."] pub mod lo_sdm_ctrl_hw4; -#[doc = "lo_sdm_ctrl_hw5 register accessor: an alias for `Reg`"] +#[doc = "lo_sdm_ctrl_hw5 (rw) register accessor: an alias for `Reg`"] pub type LO_SDM_CTRL_HW5 = crate::Reg; #[doc = "lo_sdm_ctrl_hw5."] pub mod lo_sdm_ctrl_hw5; -#[doc = "lo_sdm_ctrl_hw6 register accessor: an alias for `Reg`"] +#[doc = "lo_sdm_ctrl_hw6 (rw) register accessor: an alias for `Reg`"] pub type LO_SDM_CTRL_HW6 = crate::Reg; #[doc = "lo_sdm_ctrl_hw6."] pub mod lo_sdm_ctrl_hw6; -#[doc = "lo_sdm_ctrl_hw7 register accessor: an alias for `Reg`"] +#[doc = "lo_sdm_ctrl_hw7 (rw) register accessor: an alias for `Reg`"] pub type LO_SDM_CTRL_HW7 = crate::Reg; #[doc = "lo_sdm_ctrl_hw7."] pub mod lo_sdm_ctrl_hw7; -#[doc = "lo_sdm_ctrl_hw8 register accessor: an alias for `Reg`"] +#[doc = "lo_sdm_ctrl_hw8 (rw) register accessor: an alias for `Reg`"] pub type LO_SDM_CTRL_HW8 = crate::Reg; #[doc = "lo_sdm_ctrl_hw8."] pub mod lo_sdm_ctrl_hw8; -#[doc = "rbb_bw_ctrl_hw register accessor: an alias for `Reg`"] +#[doc = "rbb_bw_ctrl_hw (rw) register accessor: an alias for `Reg`"] pub type RBB_BW_CTRL_HW = crate::Reg; #[doc = "rbb_bw_ctrl_hw."] pub mod rbb_bw_ctrl_hw; -#[doc = "singen_ctrl0 register accessor: an alias for `Reg`"] +#[doc = "singen_ctrl0 (rw) register accessor: an alias for `Reg`"] pub type SINGEN_CTRL0 = crate::Reg; #[doc = "singen_ctrl0."] pub mod singen_ctrl0; -#[doc = "singen_ctrl1 register accessor: an alias for `Reg`"] +#[doc = "singen_ctrl1 (rw) register accessor: an alias for `Reg`"] pub type SINGEN_CTRL1 = crate::Reg; #[doc = "singen_ctrl1."] pub mod singen_ctrl1; -#[doc = "singen_ctrl2 register accessor: an alias for `Reg`"] +#[doc = "singen_ctrl2 (rw) register accessor: an alias for `Reg`"] pub type SINGEN_CTRL2 = crate::Reg; #[doc = "singen_ctrl2."] pub mod singen_ctrl2; -#[doc = "singen_ctrl3 register accessor: an alias for `Reg`"] +#[doc = "singen_ctrl3 (rw) register accessor: an alias for `Reg`"] pub type SINGEN_CTRL3 = crate::Reg; #[doc = "singen_ctrl3."] pub mod singen_ctrl3; -#[doc = "singen_ctrl4 register accessor: an alias for `Reg`"] +#[doc = "singen_ctrl4 (rw) register accessor: an alias for `Reg`"] pub type SINGEN_CTRL4 = crate::Reg; #[doc = "singen_ctrl4."] pub mod singen_ctrl4; -#[doc = "rfif_dfe_ctrl0 register accessor: an alias for `Reg`"] +#[doc = "rfif_dfe_ctrl0 (rw) register accessor: an alias for `Reg`"] pub type RFIF_DFE_CTRL0 = crate::Reg; #[doc = "rfif_dfe_ctrl0."] pub mod rfif_dfe_ctrl0; -#[doc = "rfif_test_read register accessor: an alias for `Reg`"] +#[doc = "rfif_test_read (rw) register accessor: an alias for `Reg`"] pub type RFIF_TEST_READ = crate::Reg; #[doc = "rfif_test_read."] pub mod rfif_test_read; -#[doc = "rfif_dig_ctrl register accessor: an alias for `Reg`"] +#[doc = "rfif_dig_ctrl (rw) register accessor: an alias for `Reg`"] pub type RFIF_DIG_CTRL = crate::Reg; #[doc = "rfif_dig_ctrl."] pub mod rfif_dig_ctrl; -#[doc = "rf_data_temp_0 register accessor: an alias for `Reg`"] +#[doc = "rf_data_temp_0 (rw) register accessor: an alias for `Reg`"] pub type RF_DATA_TEMP_0 = crate::Reg; #[doc = "rf_data_temp_0."] pub mod rf_data_temp_0; -#[doc = "rf_data_temp_1 register accessor: an alias for `Reg`"] +#[doc = "rf_data_temp_1 (rw) register accessor: an alias for `Reg`"] pub type RF_DATA_TEMP_1 = crate::Reg; #[doc = "rf_data_temp_1."] pub mod rf_data_temp_1; -#[doc = "rf_data_temp_2 register accessor: an alias for `Reg`"] +#[doc = "rf_data_temp_2 (rw) register accessor: an alias for `Reg`"] pub type RF_DATA_TEMP_2 = crate::Reg; #[doc = "rf_data_temp_2."] pub mod rf_data_temp_2; -#[doc = "rf_data_temp_3 register accessor: an alias for `Reg`"] +#[doc = "rf_data_temp_3 (rw) register accessor: an alias for `Reg`"] pub type RF_DATA_TEMP_3 = crate::Reg; #[doc = "rf_data_temp_3."] pub mod rf_data_temp_3; -#[doc = "rf_sram_ctrl0 register accessor: an alias for `Reg`"] +#[doc = "rf_sram_ctrl0 (rw) register accessor: an alias for `Reg`"] pub type RF_SRAM_CTRL0 = crate::Reg; #[doc = "rf_sram_ctrl0."] pub mod rf_sram_ctrl0; -#[doc = "rf_sram_ctrl1 register accessor: an alias for `Reg`"] +#[doc = "rf_sram_ctrl1 (rw) register accessor: an alias for `Reg`"] pub type RF_SRAM_CTRL1 = crate::Reg; #[doc = "rf_sram_ctrl1."] pub mod rf_sram_ctrl1; -#[doc = "rf_sram_ctrl2 register accessor: an alias for `Reg`"] +#[doc = "rf_sram_ctrl2 (rw) register accessor: an alias for `Reg`"] pub type RF_SRAM_CTRL2 = crate::Reg; #[doc = "rf_sram_ctrl2."] pub mod rf_sram_ctrl2; -#[doc = "rf_sram_ctrl3 register accessor: an alias for `Reg`"] +#[doc = "rf_sram_ctrl3 (rw) register accessor: an alias for `Reg`"] pub type RF_SRAM_CTRL3 = crate::Reg; #[doc = "rf_sram_ctrl3."] pub mod rf_sram_ctrl3; -#[doc = "rf_sram_ctrl4 register accessor: an alias for `Reg`"] +#[doc = "rf_sram_ctrl4 (rw) register accessor: an alias for `Reg`"] pub type RF_SRAM_CTRL4 = crate::Reg; #[doc = "rf_sram_ctrl4."] pub mod rf_sram_ctrl4; -#[doc = "rf_sram_ctrl5 register accessor: an alias for `Reg`"] +#[doc = "rf_sram_ctrl5 (rw) register accessor: an alias for `Reg`"] pub type RF_SRAM_CTRL5 = crate::Reg; #[doc = "rf_sram_ctrl5."] pub mod rf_sram_ctrl5; -#[doc = "rf_sram_ctrl6 register accessor: an alias for `Reg`"] +#[doc = "rf_sram_ctrl6 (rw) register accessor: an alias for `Reg`"] pub type RF_SRAM_CTRL6 = crate::Reg; #[doc = "rf_sram_ctrl6."] pub mod rf_sram_ctrl6; -#[doc = "rf_ical_ctrl0 register accessor: an alias for `Reg`"] +#[doc = "rf_ical_ctrl0 (rw) register accessor: an alias for `Reg`"] pub type RF_ICAL_CTRL0 = crate::Reg; #[doc = "rf_ical_ctrl0."] pub mod rf_ical_ctrl0; -#[doc = "rf_ical_ctrl1 register accessor: an alias for `Reg`"] +#[doc = "rf_ical_ctrl1 (rw) register accessor: an alias for `Reg`"] pub type RF_ICAL_CTRL1 = crate::Reg; #[doc = "rf_ical_ctrl1."] pub mod rf_ical_ctrl1; -#[doc = "rf_ical_ctrl2 register accessor: an alias for `Reg`"] +#[doc = "rf_ical_ctrl2 (rw) register accessor: an alias for `Reg`"] pub type RF_ICAL_CTRL2 = crate::Reg; #[doc = "rf_ical_ctrl2."] pub mod rf_ical_ctrl2; -#[doc = "rf_fsm_ctrl0 register accessor: an alias for `Reg`"] +#[doc = "rf_fsm_ctrl0 (rw) register accessor: an alias for `Reg`"] pub type RF_FSM_CTRL0 = crate::Reg; #[doc = "rf_fsm_ctrl0."] pub mod rf_fsm_ctrl0; -#[doc = "rf_fsm_ctrl1 register accessor: an alias for `Reg`"] +#[doc = "rf_fsm_ctrl1 (rw) register accessor: an alias for `Reg`"] pub type RF_FSM_CTRL1 = crate::Reg; #[doc = "rf_fsm_ctrl1."] pub mod rf_fsm_ctrl1; -#[doc = "rf_fsm_ctrl2 register accessor: an alias for `Reg`"] +#[doc = "rf_fsm_ctrl2 (rw) register accessor: an alias for `Reg`"] pub type RF_FSM_CTRL2 = crate::Reg; #[doc = "rf_fsm_ctrl2."] pub mod rf_fsm_ctrl2; -#[doc = "rf_pkdet_ctrl0 register accessor: an alias for `Reg`"] +#[doc = "rf_pkdet_ctrl0 (rw) register accessor: an alias for `Reg`"] pub type RF_PKDET_CTRL0 = crate::Reg; #[doc = "rf_pkdet_ctrl0."] pub mod rf_pkdet_ctrl0; -#[doc = "dfe_ctrl_0 register accessor: an alias for `Reg`"] +#[doc = "dfe_ctrl_0 (rw) register accessor: an alias for `Reg`"] pub type DFE_CTRL_0 = crate::Reg; #[doc = "dfe_ctrl_0."] pub mod dfe_ctrl_0; -#[doc = "dfe_ctrl_1 register accessor: an alias for `Reg`"] +#[doc = "dfe_ctrl_1 (rw) register accessor: an alias for `Reg`"] pub type DFE_CTRL_1 = crate::Reg; #[doc = "dfe_ctrl_1."] pub mod dfe_ctrl_1; -#[doc = "dfe_ctrl_2 register accessor: an alias for `Reg`"] +#[doc = "dfe_ctrl_2 (rw) register accessor: an alias for `Reg`"] pub type DFE_CTRL_2 = crate::Reg; #[doc = "dfe_ctrl_2."] pub mod dfe_ctrl_2; -#[doc = "dfe_ctrl_3 register accessor: an alias for `Reg`"] +#[doc = "dfe_ctrl_3 (rw) register accessor: an alias for `Reg`"] pub type DFE_CTRL_3 = crate::Reg; #[doc = "dfe_ctrl_3."] pub mod dfe_ctrl_3; -#[doc = "dfe_ctrl_4 register accessor: an alias for `Reg`"] +#[doc = "dfe_ctrl_4 (rw) register accessor: an alias for `Reg`"] pub type DFE_CTRL_4 = crate::Reg; #[doc = "dfe_ctrl_4."] pub mod dfe_ctrl_4; -#[doc = "dfe_ctrl_5 register accessor: an alias for `Reg`"] +#[doc = "dfe_ctrl_5 (rw) register accessor: an alias for `Reg`"] pub type DFE_CTRL_5 = crate::Reg; #[doc = "dfe_ctrl_5."] pub mod dfe_ctrl_5; -#[doc = "dfe_ctrl_6 register accessor: an alias for `Reg`"] +#[doc = "dfe_ctrl_6 (rw) register accessor: an alias for `Reg`"] pub type DFE_CTRL_6 = crate::Reg; #[doc = "dfe_ctrl_6."] pub mod dfe_ctrl_6; -#[doc = "dfe_ctrl_7 register accessor: an alias for `Reg`"] +#[doc = "dfe_ctrl_7 (rw) register accessor: an alias for `Reg`"] pub type DFE_CTRL_7 = crate::Reg; #[doc = "dfe_ctrl_7."] pub mod dfe_ctrl_7; -#[doc = "dfe_ctrl_8 register accessor: an alias for `Reg`"] +#[doc = "dfe_ctrl_8 (rw) register accessor: an alias for `Reg`"] pub type DFE_CTRL_8 = crate::Reg; #[doc = "dfe_ctrl_8."] pub mod dfe_ctrl_8; -#[doc = "dfe_ctrl_9 register accessor: an alias for `Reg`"] +#[doc = "dfe_ctrl_9 (rw) register accessor: an alias for `Reg`"] pub type DFE_CTRL_9 = crate::Reg; #[doc = "dfe_ctrl_9."] pub mod dfe_ctrl_9; -#[doc = "dfe_ctrl_10 register accessor: an alias for `Reg`"] +#[doc = "dfe_ctrl_10 (rw) register accessor: an alias for `Reg`"] pub type DFE_CTRL_10 = crate::Reg; #[doc = "dfe_ctrl_10."] pub mod dfe_ctrl_10; -#[doc = "dfe_ctrl_11 register accessor: an alias for `Reg`"] +#[doc = "dfe_ctrl_11 (rw) register accessor: an alias for `Reg`"] pub type DFE_CTRL_11 = crate::Reg; #[doc = "dfe_ctrl_11."] pub mod dfe_ctrl_11; -#[doc = "dfe_ctrl_12 register accessor: an alias for `Reg`"] +#[doc = "dfe_ctrl_12 (rw) register accessor: an alias for `Reg`"] pub type DFE_CTRL_12 = crate::Reg; #[doc = "dfe_ctrl_12."] pub mod dfe_ctrl_12; -#[doc = "dfe_ctrl_13 register accessor: an alias for `Reg`"] +#[doc = "dfe_ctrl_13 (rw) register accessor: an alias for `Reg`"] pub type DFE_CTRL_13 = crate::Reg; #[doc = "dfe_ctrl_13."] pub mod dfe_ctrl_13; -#[doc = "dfe_ctrl_14 register accessor: an alias for `Reg`"] +#[doc = "dfe_ctrl_14 (rw) register accessor: an alias for `Reg`"] pub type DFE_CTRL_14 = crate::Reg; #[doc = "dfe_ctrl_14."] pub mod dfe_ctrl_14; -#[doc = "dfe_ctrl_15 register accessor: an alias for `Reg`"] +#[doc = "dfe_ctrl_15 (rw) register accessor: an alias for `Reg`"] pub type DFE_CTRL_15 = crate::Reg; #[doc = "dfe_ctrl_15."] pub mod dfe_ctrl_15; -#[doc = "dfe_ctrl_16 register accessor: an alias for `Reg`"] +#[doc = "dfe_ctrl_16 (rw) register accessor: an alias for `Reg`"] pub type DFE_CTRL_16 = crate::Reg; #[doc = "dfe_ctrl_16."] pub mod dfe_ctrl_16; -#[doc = "dfe_ctrl_17 register accessor: an alias for `Reg`"] +#[doc = "dfe_ctrl_17 (rw) register accessor: an alias for `Reg`"] pub type DFE_CTRL_17 = crate::Reg; #[doc = "dfe_ctrl_17."] pub mod dfe_ctrl_17; -#[doc = "dfe_ctrl_18 register accessor: an alias for `Reg`"] +#[doc = "dfe_ctrl_18 (rw) register accessor: an alias for `Reg`"] pub type DFE_CTRL_18 = crate::Reg; #[doc = "dfe_ctrl_18."] pub mod dfe_ctrl_18; diff --git a/src/rf/adda1.rs b/src/rf/adda1.rs index a9e5b87..bcb51cf 100644 --- a/src/rf/adda1.rs +++ b/src/rf/adda1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,333 +28,139 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `adda_ldo_dvdd_sel_hw` reader - "] -pub struct ADDA_LDO_DVDD_SEL_HW_R(crate::FieldReader); -impl ADDA_LDO_DVDD_SEL_HW_R { - pub(crate) fn new(bits: u8) -> Self { - ADDA_LDO_DVDD_SEL_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ADDA_LDO_DVDD_SEL_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `adda_ldo_dvdd_sel_hw` writer - "] -pub struct ADDA_LDO_DVDD_SEL_HW_W<'a> { - w: &'a mut W, -} -impl<'a> ADDA_LDO_DVDD_SEL_HW_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 24)) | ((value as u32 & 0x07) << 24); - self.w - } -} -#[doc = "Field `adda_ldo_dvdd_sel` reader - "] -pub struct ADDA_LDO_DVDD_SEL_R(crate::FieldReader); -impl ADDA_LDO_DVDD_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - ADDA_LDO_DVDD_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ADDA_LDO_DVDD_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `adda_ldo_dvdd_sel` writer - "] -pub struct ADDA_LDO_DVDD_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> ADDA_LDO_DVDD_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 20)) | ((value as u32 & 0x07) << 20); - self.w - } -} -#[doc = "Field `adda_ldo_byps` reader - "] -pub struct ADDA_LDO_BYPS_R(crate::FieldReader); -impl ADDA_LDO_BYPS_R { - pub(crate) fn new(bits: bool) -> Self { - ADDA_LDO_BYPS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ADDA_LDO_BYPS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `adda_ldo_byps` writer - "] -pub struct ADDA_LDO_BYPS_W<'a> { - w: &'a mut W, -} -impl<'a> ADDA_LDO_BYPS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `dac_clk_sync_inv` reader - "] -pub struct DAC_CLK_SYNC_INV_R(crate::FieldReader); -impl DAC_CLK_SYNC_INV_R { - pub(crate) fn new(bits: bool) -> Self { - DAC_CLK_SYNC_INV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DAC_CLK_SYNC_INV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dac_clk_sync_inv` writer - "] -pub struct DAC_CLK_SYNC_INV_W<'a> { - w: &'a mut W, -} -impl<'a> DAC_CLK_SYNC_INV_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13); - self.w - } -} -#[doc = "Field `dac_rccalsel` reader - "] -pub struct DAC_RCCALSEL_R(crate::FieldReader); -impl DAC_RCCALSEL_R { - pub(crate) fn new(bits: bool) -> Self { - DAC_RCCALSEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DAC_RCCALSEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dac_rccalsel` writer - "] -pub struct DAC_RCCALSEL_W<'a> { - w: &'a mut W, -} -impl<'a> DAC_RCCALSEL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} -#[doc = "Field `dac_clk_sel` reader - "] -pub struct DAC_CLK_SEL_R(crate::FieldReader); -impl DAC_CLK_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - DAC_CLK_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DAC_CLK_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dac_clk_sel` writer - "] -pub struct DAC_CLK_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> DAC_CLK_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} -#[doc = "Field `dac_bias_sel` reader - "] -pub struct DAC_BIAS_SEL_R(crate::FieldReader); -impl DAC_BIAS_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - DAC_BIAS_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DAC_BIAS_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dac_bias_sel` writer - "] -pub struct DAC_BIAS_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> DAC_BIAS_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 4)) | ((value as u32 & 0x03) << 4); - self.w - } -} #[doc = "Field `dac_dvdd_sel` reader - "] -pub struct DAC_DVDD_SEL_R(crate::FieldReader); -impl DAC_DVDD_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - DAC_DVDD_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DAC_DVDD_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type DAC_DVDD_SEL_R = crate::FieldReader; #[doc = "Field `dac_dvdd_sel` writer - "] -pub struct DAC_DVDD_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> DAC_DVDD_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type DAC_DVDD_SEL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ADDA1_SPEC, u8, u8, 2, O>; +#[doc = "Field `dac_bias_sel` reader - "] +pub type DAC_BIAS_SEL_R = crate::FieldReader; +#[doc = "Field `dac_bias_sel` writer - "] +pub type DAC_BIAS_SEL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ADDA1_SPEC, u8, u8, 2, O>; +#[doc = "Field `dac_clk_sel` reader - "] +pub type DAC_CLK_SEL_R = crate::FieldReader; +#[doc = "Field `dac_clk_sel` writer - "] +pub type DAC_CLK_SEL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ADDA1_SPEC, u8, u8, 2, O>; +#[doc = "Field `dac_rccalsel` reader - "] +pub type DAC_RCCALSEL_R = crate::BitReader; +#[doc = "Field `dac_rccalsel` writer - "] +pub type DAC_RCCALSEL_W<'a, const O: u8> = crate::BitWriter<'a, u32, ADDA1_SPEC, bool, O>; +#[doc = "Field `dac_clk_sync_inv` reader - "] +pub type DAC_CLK_SYNC_INV_R = crate::BitReader; +#[doc = "Field `dac_clk_sync_inv` writer - "] +pub type DAC_CLK_SYNC_INV_W<'a, const O: u8> = crate::BitWriter<'a, u32, ADDA1_SPEC, bool, O>; +#[doc = "Field `adda_ldo_byps` reader - "] +pub type ADDA_LDO_BYPS_R = crate::BitReader; +#[doc = "Field `adda_ldo_byps` writer - "] +pub type ADDA_LDO_BYPS_W<'a, const O: u8> = crate::BitWriter<'a, u32, ADDA1_SPEC, bool, O>; +#[doc = "Field `adda_ldo_dvdd_sel` reader - "] +pub type ADDA_LDO_DVDD_SEL_R = crate::FieldReader; +#[doc = "Field `adda_ldo_dvdd_sel` writer - "] +pub type ADDA_LDO_DVDD_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, ADDA1_SPEC, u8, u8, 3, O>; +#[doc = "Field `adda_ldo_dvdd_sel_hw` reader - "] +pub type ADDA_LDO_DVDD_SEL_HW_R = crate::FieldReader; +#[doc = "Field `adda_ldo_dvdd_sel_hw` writer - "] +pub type ADDA_LDO_DVDD_SEL_HW_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, ADDA1_SPEC, u8, u8, 3, O>; +impl R { + #[doc = "Bits 0:1"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w + pub fn dac_dvdd_sel(&self) -> DAC_DVDD_SEL_R { + DAC_DVDD_SEL_R::new((self.bits & 3) as u8) } -} -impl R { - #[doc = "Bits 24:26"] + #[doc = "Bits 4:5"] #[inline(always)] - pub fn adda_ldo_dvdd_sel_hw(&self) -> ADDA_LDO_DVDD_SEL_HW_R { - ADDA_LDO_DVDD_SEL_HW_R::new(((self.bits >> 24) & 0x07) as u8) + pub fn dac_bias_sel(&self) -> DAC_BIAS_SEL_R { + DAC_BIAS_SEL_R::new(((self.bits >> 4) & 3) as u8) } - #[doc = "Bits 20:22"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn adda_ldo_dvdd_sel(&self) -> ADDA_LDO_DVDD_SEL_R { - ADDA_LDO_DVDD_SEL_R::new(((self.bits >> 20) & 0x07) as u8) + pub fn dac_clk_sel(&self) -> DAC_CLK_SEL_R { + DAC_CLK_SEL_R::new(((self.bits >> 8) & 3) as u8) } - #[doc = "Bit 16"] + #[doc = "Bit 12"] #[inline(always)] - pub fn adda_ldo_byps(&self) -> ADDA_LDO_BYPS_R { - ADDA_LDO_BYPS_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn dac_rccalsel(&self) -> DAC_RCCALSEL_R { + DAC_RCCALSEL_R::new(((self.bits >> 12) & 1) != 0) } #[doc = "Bit 13"] #[inline(always)] pub fn dac_clk_sync_inv(&self) -> DAC_CLK_SYNC_INV_R { - DAC_CLK_SYNC_INV_R::new(((self.bits >> 13) & 0x01) != 0) - } - #[doc = "Bit 12"] - #[inline(always)] - pub fn dac_rccalsel(&self) -> DAC_RCCALSEL_R { - DAC_RCCALSEL_R::new(((self.bits >> 12) & 0x01) != 0) + DAC_CLK_SYNC_INV_R::new(((self.bits >> 13) & 1) != 0) } - #[doc = "Bits 8:9"] + #[doc = "Bit 16"] #[inline(always)] - pub fn dac_clk_sel(&self) -> DAC_CLK_SEL_R { - DAC_CLK_SEL_R::new(((self.bits >> 8) & 0x03) as u8) + pub fn adda_ldo_byps(&self) -> ADDA_LDO_BYPS_R { + ADDA_LDO_BYPS_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bits 4:5"] + #[doc = "Bits 20:22"] #[inline(always)] - pub fn dac_bias_sel(&self) -> DAC_BIAS_SEL_R { - DAC_BIAS_SEL_R::new(((self.bits >> 4) & 0x03) as u8) + pub fn adda_ldo_dvdd_sel(&self) -> ADDA_LDO_DVDD_SEL_R { + ADDA_LDO_DVDD_SEL_R::new(((self.bits >> 20) & 7) as u8) } - #[doc = "Bits 0:1"] + #[doc = "Bits 24:26"] #[inline(always)] - pub fn dac_dvdd_sel(&self) -> DAC_DVDD_SEL_R { - DAC_DVDD_SEL_R::new((self.bits & 0x03) as u8) + pub fn adda_ldo_dvdd_sel_hw(&self) -> ADDA_LDO_DVDD_SEL_HW_R { + ADDA_LDO_DVDD_SEL_HW_R::new(((self.bits >> 24) & 7) as u8) } } impl W { - #[doc = "Bits 24:26"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn adda_ldo_dvdd_sel_hw(&mut self) -> ADDA_LDO_DVDD_SEL_HW_W { - ADDA_LDO_DVDD_SEL_HW_W { w: self } + #[must_use] + pub fn dac_dvdd_sel(&mut self) -> DAC_DVDD_SEL_W<0> { + DAC_DVDD_SEL_W::new(self) } - #[doc = "Bits 20:22"] + #[doc = "Bits 4:5"] #[inline(always)] - pub fn adda_ldo_dvdd_sel(&mut self) -> ADDA_LDO_DVDD_SEL_W { - ADDA_LDO_DVDD_SEL_W { w: self } + #[must_use] + pub fn dac_bias_sel(&mut self) -> DAC_BIAS_SEL_W<4> { + DAC_BIAS_SEL_W::new(self) } - #[doc = "Bit 16"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn adda_ldo_byps(&mut self) -> ADDA_LDO_BYPS_W { - ADDA_LDO_BYPS_W { w: self } + #[must_use] + pub fn dac_clk_sel(&mut self) -> DAC_CLK_SEL_W<8> { + DAC_CLK_SEL_W::new(self) } - #[doc = "Bit 13"] + #[doc = "Bit 12"] #[inline(always)] - pub fn dac_clk_sync_inv(&mut self) -> DAC_CLK_SYNC_INV_W { - DAC_CLK_SYNC_INV_W { w: self } + #[must_use] + pub fn dac_rccalsel(&mut self) -> DAC_RCCALSEL_W<12> { + DAC_RCCALSEL_W::new(self) } - #[doc = "Bit 12"] + #[doc = "Bit 13"] #[inline(always)] - pub fn dac_rccalsel(&mut self) -> DAC_RCCALSEL_W { - DAC_RCCALSEL_W { w: self } + #[must_use] + pub fn dac_clk_sync_inv(&mut self) -> DAC_CLK_SYNC_INV_W<13> { + DAC_CLK_SYNC_INV_W::new(self) } - #[doc = "Bits 8:9"] + #[doc = "Bit 16"] #[inline(always)] - pub fn dac_clk_sel(&mut self) -> DAC_CLK_SEL_W { - DAC_CLK_SEL_W { w: self } + #[must_use] + pub fn adda_ldo_byps(&mut self) -> ADDA_LDO_BYPS_W<16> { + ADDA_LDO_BYPS_W::new(self) } - #[doc = "Bits 4:5"] + #[doc = "Bits 20:22"] #[inline(always)] - pub fn dac_bias_sel(&mut self) -> DAC_BIAS_SEL_W { - DAC_BIAS_SEL_W { w: self } + #[must_use] + pub fn adda_ldo_dvdd_sel(&mut self) -> ADDA_LDO_DVDD_SEL_W<20> { + ADDA_LDO_DVDD_SEL_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bits 24:26"] #[inline(always)] - pub fn dac_dvdd_sel(&mut self) -> DAC_DVDD_SEL_W { - DAC_DVDD_SEL_W { w: self } + #[must_use] + pub fn adda_ldo_dvdd_sel_hw(&mut self) -> ADDA_LDO_DVDD_SEL_HW_W<24> { + ADDA_LDO_DVDD_SEL_HW_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -371,11 +178,10 @@ impl crate::Readable for ADDA1_SPEC { #[doc = "`write(|w| ..)` method takes [adda1::W](W) writer structure"] impl crate::Writable for ADDA1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets adda1 to value 0"] impl crate::Resettable for ADDA1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/adda2.rs b/src/rf/adda2.rs index 3c60a2d..d5b5ef7 100644 --- a/src/rf/adda2.rs +++ b/src/rf/adda2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,353 +28,137 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `adc_clk_div_sel` reader - "] -pub struct ADC_CLK_DIV_SEL_R(crate::FieldReader); -impl ADC_CLK_DIV_SEL_R { - pub(crate) fn new(bits: bool) -> Self { - ADC_CLK_DIV_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ADC_CLK_DIV_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `adc_clk_div_sel` writer - "] -pub struct ADC_CLK_DIV_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> ADC_CLK_DIV_SEL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 28)) | ((value as u32 & 0x01) << 28); - self.w - } -} -#[doc = "Field `adc_clk_inv` reader - "] -pub struct ADC_CLK_INV_R(crate::FieldReader); -impl ADC_CLK_INV_R { - pub(crate) fn new(bits: bool) -> Self { - ADC_CLK_INV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ADC_CLK_INV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `adc_clk_inv` writer - "] -pub struct ADC_CLK_INV_W<'a> { - w: &'a mut W, -} -impl<'a> ADC_CLK_INV_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24); - self.w - } -} -#[doc = "Field `adc_clk_sync_inv` reader - "] -pub struct ADC_CLK_SYNC_INV_R(crate::FieldReader); -impl ADC_CLK_SYNC_INV_R { - pub(crate) fn new(bits: bool) -> Self { - ADC_CLK_SYNC_INV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ADC_CLK_SYNC_INV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `adc_clk_sync_inv` writer - "] -pub struct ADC_CLK_SYNC_INV_W<'a> { - w: &'a mut W, -} -impl<'a> ADC_CLK_SYNC_INV_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w - } -} -#[doc = "Field `adc_gt_rm` reader - "] -pub struct ADC_GT_RM_R(crate::FieldReader); -impl ADC_GT_RM_R { - pub(crate) fn new(bits: bool) -> Self { - ADC_GT_RM_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ADC_GT_RM_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `adc_gt_rm` writer - "] -pub struct ADC_GT_RM_W<'a> { - w: &'a mut W, -} -impl<'a> ADC_GT_RM_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `adc_sar_ascal_en` reader - "] -pub struct ADC_SAR_ASCAL_EN_R(crate::FieldReader); -impl ADC_SAR_ASCAL_EN_R { - pub(crate) fn new(bits: bool) -> Self { - ADC_SAR_ASCAL_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ADC_SAR_ASCAL_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `adc_sar_ascal_en` writer - "] -pub struct ADC_SAR_ASCAL_EN_W<'a> { - w: &'a mut W, -} -impl<'a> ADC_SAR_ASCAL_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} -#[doc = "Field `adc_dvdd_sel` reader - "] -pub struct ADC_DVDD_SEL_R(crate::FieldReader); -impl ADC_DVDD_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - ADC_DVDD_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ADC_DVDD_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `adc_dvdd_sel` writer - "] -pub struct ADC_DVDD_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> ADC_DVDD_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} -#[doc = "Field `adc_dly_ctl` reader - "] -pub struct ADC_DLY_CTL_R(crate::FieldReader); -impl ADC_DLY_CTL_R { - pub(crate) fn new(bits: u8) -> Self { - ADC_DLY_CTL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ADC_DLY_CTL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `adc_dly_ctl` writer - "] -pub struct ADC_DLY_CTL_W<'a> { - w: &'a mut W, -} -impl<'a> ADC_DLY_CTL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 4)) | ((value as u32 & 0x03) << 4); - self.w - } -} #[doc = "Field `adc_vref_sel` reader - "] -pub struct ADC_VREF_SEL_R(crate::FieldReader); -impl ADC_VREF_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - ADC_VREF_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ADC_VREF_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type ADC_VREF_SEL_R = crate::FieldReader; #[doc = "Field `adc_vref_sel` writer - "] -pub struct ADC_VREF_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> ADC_VREF_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type ADC_VREF_SEL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ADDA2_SPEC, u8, u8, 2, O>; +#[doc = "Field `adc_dly_ctl` reader - "] +pub type ADC_DLY_CTL_R = crate::FieldReader; +#[doc = "Field `adc_dly_ctl` writer - "] +pub type ADC_DLY_CTL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ADDA2_SPEC, u8, u8, 2, O>; +#[doc = "Field `adc_dvdd_sel` reader - "] +pub type ADC_DVDD_SEL_R = crate::FieldReader; +#[doc = "Field `adc_dvdd_sel` writer - "] +pub type ADC_DVDD_SEL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ADDA2_SPEC, u8, u8, 2, O>; +#[doc = "Field `adc_sar_ascal_en` reader - "] +pub type ADC_SAR_ASCAL_EN_R = crate::BitReader; +#[doc = "Field `adc_sar_ascal_en` writer - "] +pub type ADC_SAR_ASCAL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, ADDA2_SPEC, bool, O>; +#[doc = "Field `adc_gt_rm` reader - "] +pub type ADC_GT_RM_R = crate::BitReader; +#[doc = "Field `adc_gt_rm` writer - "] +pub type ADC_GT_RM_W<'a, const O: u8> = crate::BitWriter<'a, u32, ADDA2_SPEC, bool, O>; +#[doc = "Field `adc_clk_sync_inv` reader - "] +pub type ADC_CLK_SYNC_INV_R = crate::BitReader; +#[doc = "Field `adc_clk_sync_inv` writer - "] +pub type ADC_CLK_SYNC_INV_W<'a, const O: u8> = crate::BitWriter<'a, u32, ADDA2_SPEC, bool, O>; +#[doc = "Field `adc_clk_inv` reader - "] +pub type ADC_CLK_INV_R = crate::BitReader; +#[doc = "Field `adc_clk_inv` writer - "] +pub type ADC_CLK_INV_W<'a, const O: u8> = crate::BitWriter<'a, u32, ADDA2_SPEC, bool, O>; +#[doc = "Field `adc_clk_div_sel` reader - "] +pub type ADC_CLK_DIV_SEL_R = crate::BitReader; +#[doc = "Field `adc_clk_div_sel` writer - "] +pub type ADC_CLK_DIV_SEL_W<'a, const O: u8> = crate::BitWriter<'a, u32, ADDA2_SPEC, bool, O>; +impl R { + #[doc = "Bits 0:1"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w + pub fn adc_vref_sel(&self) -> ADC_VREF_SEL_R { + ADC_VREF_SEL_R::new((self.bits & 3) as u8) } -} -impl R { - #[doc = "Bit 28"] + #[doc = "Bits 4:5"] #[inline(always)] - pub fn adc_clk_div_sel(&self) -> ADC_CLK_DIV_SEL_R { - ADC_CLK_DIV_SEL_R::new(((self.bits >> 28) & 0x01) != 0) + pub fn adc_dly_ctl(&self) -> ADC_DLY_CTL_R { + ADC_DLY_CTL_R::new(((self.bits >> 4) & 3) as u8) } - #[doc = "Bit 24"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn adc_clk_inv(&self) -> ADC_CLK_INV_R { - ADC_CLK_INV_R::new(((self.bits >> 24) & 0x01) != 0) + pub fn adc_dvdd_sel(&self) -> ADC_DVDD_SEL_R { + ADC_DVDD_SEL_R::new(((self.bits >> 8) & 3) as u8) } - #[doc = "Bit 20"] + #[doc = "Bit 12"] #[inline(always)] - pub fn adc_clk_sync_inv(&self) -> ADC_CLK_SYNC_INV_R { - ADC_CLK_SYNC_INV_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn adc_sar_ascal_en(&self) -> ADC_SAR_ASCAL_EN_R { + ADC_SAR_ASCAL_EN_R::new(((self.bits >> 12) & 1) != 0) } #[doc = "Bit 16"] #[inline(always)] pub fn adc_gt_rm(&self) -> ADC_GT_RM_R { - ADC_GT_RM_R::new(((self.bits >> 16) & 0x01) != 0) + ADC_GT_RM_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 12"] - #[inline(always)] - pub fn adc_sar_ascal_en(&self) -> ADC_SAR_ASCAL_EN_R { - ADC_SAR_ASCAL_EN_R::new(((self.bits >> 12) & 0x01) != 0) - } - #[doc = "Bits 8:9"] + #[doc = "Bit 20"] #[inline(always)] - pub fn adc_dvdd_sel(&self) -> ADC_DVDD_SEL_R { - ADC_DVDD_SEL_R::new(((self.bits >> 8) & 0x03) as u8) + pub fn adc_clk_sync_inv(&self) -> ADC_CLK_SYNC_INV_R { + ADC_CLK_SYNC_INV_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bits 4:5"] + #[doc = "Bit 24"] #[inline(always)] - pub fn adc_dly_ctl(&self) -> ADC_DLY_CTL_R { - ADC_DLY_CTL_R::new(((self.bits >> 4) & 0x03) as u8) + pub fn adc_clk_inv(&self) -> ADC_CLK_INV_R { + ADC_CLK_INV_R::new(((self.bits >> 24) & 1) != 0) } - #[doc = "Bits 0:1"] + #[doc = "Bit 28"] #[inline(always)] - pub fn adc_vref_sel(&self) -> ADC_VREF_SEL_R { - ADC_VREF_SEL_R::new((self.bits & 0x03) as u8) + pub fn adc_clk_div_sel(&self) -> ADC_CLK_DIV_SEL_R { + ADC_CLK_DIV_SEL_R::new(((self.bits >> 28) & 1) != 0) } } impl W { - #[doc = "Bit 28"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn adc_clk_div_sel(&mut self) -> ADC_CLK_DIV_SEL_W { - ADC_CLK_DIV_SEL_W { w: self } + #[must_use] + pub fn adc_vref_sel(&mut self) -> ADC_VREF_SEL_W<0> { + ADC_VREF_SEL_W::new(self) } - #[doc = "Bit 24"] + #[doc = "Bits 4:5"] #[inline(always)] - pub fn adc_clk_inv(&mut self) -> ADC_CLK_INV_W { - ADC_CLK_INV_W { w: self } + #[must_use] + pub fn adc_dly_ctl(&mut self) -> ADC_DLY_CTL_W<4> { + ADC_DLY_CTL_W::new(self) } - #[doc = "Bit 20"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn adc_clk_sync_inv(&mut self) -> ADC_CLK_SYNC_INV_W { - ADC_CLK_SYNC_INV_W { w: self } + #[must_use] + pub fn adc_dvdd_sel(&mut self) -> ADC_DVDD_SEL_W<8> { + ADC_DVDD_SEL_W::new(self) } - #[doc = "Bit 16"] + #[doc = "Bit 12"] #[inline(always)] - pub fn adc_gt_rm(&mut self) -> ADC_GT_RM_W { - ADC_GT_RM_W { w: self } + #[must_use] + pub fn adc_sar_ascal_en(&mut self) -> ADC_SAR_ASCAL_EN_W<12> { + ADC_SAR_ASCAL_EN_W::new(self) } - #[doc = "Bit 12"] + #[doc = "Bit 16"] #[inline(always)] - pub fn adc_sar_ascal_en(&mut self) -> ADC_SAR_ASCAL_EN_W { - ADC_SAR_ASCAL_EN_W { w: self } + #[must_use] + pub fn adc_gt_rm(&mut self) -> ADC_GT_RM_W<16> { + ADC_GT_RM_W::new(self) } - #[doc = "Bits 8:9"] + #[doc = "Bit 20"] #[inline(always)] - pub fn adc_dvdd_sel(&mut self) -> ADC_DVDD_SEL_W { - ADC_DVDD_SEL_W { w: self } + #[must_use] + pub fn adc_clk_sync_inv(&mut self) -> ADC_CLK_SYNC_INV_W<20> { + ADC_CLK_SYNC_INV_W::new(self) } - #[doc = "Bits 4:5"] + #[doc = "Bit 24"] #[inline(always)] - pub fn adc_dly_ctl(&mut self) -> ADC_DLY_CTL_W { - ADC_DLY_CTL_W { w: self } + #[must_use] + pub fn adc_clk_inv(&mut self) -> ADC_CLK_INV_W<24> { + ADC_CLK_INV_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bit 28"] #[inline(always)] - pub fn adc_vref_sel(&mut self) -> ADC_VREF_SEL_W { - ADC_VREF_SEL_W { w: self } + #[must_use] + pub fn adc_clk_div_sel(&mut self) -> ADC_CLK_DIV_SEL_W<28> { + ADC_CLK_DIV_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -391,11 +176,10 @@ impl crate::Readable for ADDA2_SPEC { #[doc = "`write(|w| ..)` method takes [adda2::W](W) writer structure"] impl crate::Writable for ADDA2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets adda2 to value 0"] impl crate::Resettable for ADDA2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/adda_reg_ctrl_hw.rs b/src/rf/adda_reg_ctrl_hw.rs index 4cfa691..8ab41e5 100644 --- a/src/rf/adda_reg_ctrl_hw.rs +++ b/src/rf/adda_reg_ctrl_hw.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,87 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `adda_ldo_dvdd_sel_tx` reader - "] -pub struct ADDA_LDO_DVDD_SEL_TX_R(crate::FieldReader); -impl ADDA_LDO_DVDD_SEL_TX_R { - pub(crate) fn new(bits: u8) -> Self { - ADDA_LDO_DVDD_SEL_TX_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ADDA_LDO_DVDD_SEL_TX_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `adda_ldo_dvdd_sel_tx` writer - "] -pub struct ADDA_LDO_DVDD_SEL_TX_W<'a> { - w: &'a mut W, -} -impl<'a> ADDA_LDO_DVDD_SEL_TX_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 4)) | ((value as u32 & 0x07) << 4); - self.w - } -} #[doc = "Field `adda_ldo_dvdd_sel_rx` reader - "] -pub struct ADDA_LDO_DVDD_SEL_RX_R(crate::FieldReader); -impl ADDA_LDO_DVDD_SEL_RX_R { - pub(crate) fn new(bits: u8) -> Self { - ADDA_LDO_DVDD_SEL_RX_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ADDA_LDO_DVDD_SEL_RX_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type ADDA_LDO_DVDD_SEL_RX_R = crate::FieldReader; #[doc = "Field `adda_ldo_dvdd_sel_rx` writer - "] -pub struct ADDA_LDO_DVDD_SEL_RX_W<'a> { - w: &'a mut W, -} -impl<'a> ADDA_LDO_DVDD_SEL_RX_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type ADDA_LDO_DVDD_SEL_RX_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, ADDA_REG_CTRL_HW_SPEC, u8, u8, 3, O>; +#[doc = "Field `adda_ldo_dvdd_sel_tx` reader - "] +pub type ADDA_LDO_DVDD_SEL_TX_R = crate::FieldReader; +#[doc = "Field `adda_ldo_dvdd_sel_tx` writer - "] +pub type ADDA_LDO_DVDD_SEL_TX_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, ADDA_REG_CTRL_HW_SPEC, u8, u8, 3, O>; +impl R { + #[doc = "Bits 0:2"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x07) | (value as u32 & 0x07); - self.w + pub fn adda_ldo_dvdd_sel_rx(&self) -> ADDA_LDO_DVDD_SEL_RX_R { + ADDA_LDO_DVDD_SEL_RX_R::new((self.bits & 7) as u8) } -} -impl R { #[doc = "Bits 4:6"] #[inline(always)] pub fn adda_ldo_dvdd_sel_tx(&self) -> ADDA_LDO_DVDD_SEL_TX_R { - ADDA_LDO_DVDD_SEL_TX_R::new(((self.bits >> 4) & 0x07) as u8) - } - #[doc = "Bits 0:2"] - #[inline(always)] - pub fn adda_ldo_dvdd_sel_rx(&self) -> ADDA_LDO_DVDD_SEL_RX_R { - ADDA_LDO_DVDD_SEL_RX_R::new((self.bits & 0x07) as u8) + ADDA_LDO_DVDD_SEL_TX_R::new(((self.bits >> 4) & 7) as u8) } } impl W { - #[doc = "Bits 4:6"] + #[doc = "Bits 0:2"] #[inline(always)] - pub fn adda_ldo_dvdd_sel_tx(&mut self) -> ADDA_LDO_DVDD_SEL_TX_W { - ADDA_LDO_DVDD_SEL_TX_W { w: self } + #[must_use] + pub fn adda_ldo_dvdd_sel_rx(&mut self) -> ADDA_LDO_DVDD_SEL_RX_W<0> { + ADDA_LDO_DVDD_SEL_RX_W::new(self) } - #[doc = "Bits 0:2"] + #[doc = "Bits 4:6"] #[inline(always)] - pub fn adda_ldo_dvdd_sel_rx(&mut self) -> ADDA_LDO_DVDD_SEL_RX_W { - ADDA_LDO_DVDD_SEL_RX_W { w: self } + #[must_use] + pub fn adda_ldo_dvdd_sel_tx(&mut self) -> ADDA_LDO_DVDD_SEL_TX_W<4> { + ADDA_LDO_DVDD_SEL_TX_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -125,11 +88,10 @@ impl crate::Readable for ADDA_REG_CTRL_HW_SPEC { #[doc = "`write(|w| ..)` method takes [adda_reg_ctrl_hw::W](W) writer structure"] impl crate::Writable for ADDA_REG_CTRL_HW_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets adda_reg_ctrl_hw to value 0"] impl crate::Resettable for ADDA_REG_CTRL_HW_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/cip.rs b/src/rf/cip.rs index f2f1e04..0e02b8c 100644 --- a/src/rf/cip.rs +++ b/src/rf/cip.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,87 +28,47 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `vg13_sel` reader - "] -pub struct VG13_SEL_R(crate::FieldReader); -impl VG13_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - VG13_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for VG13_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `vg13_sel` writer - "] -pub struct VG13_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> VG13_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 2)) | ((value as u32 & 0x03) << 2); - self.w - } -} #[doc = "Field `vg11_sel` reader - "] -pub struct VG11_SEL_R(crate::FieldReader); -impl VG11_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - VG11_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for VG11_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type VG11_SEL_R = crate::FieldReader; #[doc = "Field `vg11_sel` writer - "] -pub struct VG11_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> VG11_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type VG11_SEL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CIP_SPEC, u8, u8, 2, O>; +#[doc = "Field `vg13_sel` reader - "] +pub type VG13_SEL_R = crate::FieldReader; +#[doc = "Field `vg13_sel` writer - "] +pub type VG13_SEL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CIP_SPEC, u8, u8, 2, O>; +impl R { + #[doc = "Bits 0:1"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w + pub fn vg11_sel(&self) -> VG11_SEL_R { + VG11_SEL_R::new((self.bits & 3) as u8) } -} -impl R { #[doc = "Bits 2:3"] #[inline(always)] pub fn vg13_sel(&self) -> VG13_SEL_R { - VG13_SEL_R::new(((self.bits >> 2) & 0x03) as u8) - } - #[doc = "Bits 0:1"] - #[inline(always)] - pub fn vg11_sel(&self) -> VG11_SEL_R { - VG11_SEL_R::new((self.bits & 0x03) as u8) + VG13_SEL_R::new(((self.bits >> 2) & 3) as u8) } } impl W { - #[doc = "Bits 2:3"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn vg13_sel(&mut self) -> VG13_SEL_W { - VG13_SEL_W { w: self } + #[must_use] + pub fn vg11_sel(&mut self) -> VG11_SEL_W<0> { + VG11_SEL_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bits 2:3"] #[inline(always)] - pub fn vg11_sel(&mut self) -> VG11_SEL_W { - VG11_SEL_W { w: self } + #[must_use] + pub fn vg13_sel(&mut self) -> VG13_SEL_W<2> { + VG13_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -125,11 +86,10 @@ impl crate::Readable for CIP_SPEC { #[doc = "`write(|w| ..)` method takes [cip::W](W) writer structure"] impl crate::Writable for CIP_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets cip to value 0"] impl crate::Resettable for CIP_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/dfe_ctrl_0.rs b/src/rf/dfe_ctrl_0.rs index e8504af..3025347 100644 --- a/src/rf/dfe_ctrl_0.rs +++ b/src/rf/dfe_ctrl_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,261 +28,111 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `tx_dvga_gain_ctrl_hw` reader - "] -pub struct TX_DVGA_GAIN_CTRL_HW_R(crate::FieldReader); -impl TX_DVGA_GAIN_CTRL_HW_R { - pub(crate) fn new(bits: bool) -> Self { - TX_DVGA_GAIN_CTRL_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_DVGA_GAIN_CTRL_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_dvga_gain_ctrl_hw` writer - "] -pub struct TX_DVGA_GAIN_CTRL_HW_W<'a> { - w: &'a mut W, -} -impl<'a> TX_DVGA_GAIN_CTRL_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 31)) | ((value as u32 & 0x01) << 31); - self.w - } -} -#[doc = "Field `tx_dvga_gain_qdb` reader - "] -pub struct TX_DVGA_GAIN_QDB_R(crate::FieldReader); -impl TX_DVGA_GAIN_QDB_R { - pub(crate) fn new(bits: u8) -> Self { - TX_DVGA_GAIN_QDB_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_DVGA_GAIN_QDB_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_dvga_gain_qdb` writer - "] -pub struct TX_DVGA_GAIN_QDB_W<'a> { - w: &'a mut W, -} -impl<'a> TX_DVGA_GAIN_QDB_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x7f << 24)) | ((value as u32 & 0x7f) << 24); - self.w - } -} -#[doc = "Field `tx_iqc_gain_en` reader - "] -pub struct TX_IQC_GAIN_EN_R(crate::FieldReader); -impl TX_IQC_GAIN_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TX_IQC_GAIN_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_IQC_GAIN_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_iqc_gain_en` writer - "] -pub struct TX_IQC_GAIN_EN_W<'a> { - w: &'a mut W, -} -impl<'a> TX_IQC_GAIN_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23); - self.w - } -} -#[doc = "Field `tx_iqc_gain` reader - "] -pub struct TX_IQC_GAIN_R(crate::FieldReader); -impl TX_IQC_GAIN_R { - pub(crate) fn new(bits: u16) -> Self { - TX_IQC_GAIN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_IQC_GAIN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_iqc_gain` writer - "] -pub struct TX_IQC_GAIN_W<'a> { - w: &'a mut W, -} -impl<'a> TX_IQC_GAIN_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07ff << 12)) | ((value as u32 & 0x07ff) << 12); - self.w - } -} +#[doc = "Field `tx_iqc_phase` reader - "] +pub type TX_IQC_PHASE_R = crate::FieldReader; +#[doc = "Field `tx_iqc_phase` writer - "] +pub type TX_IQC_PHASE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_0_SPEC, u16, u16, 10, O>; #[doc = "Field `tx_iqc_phase_en` reader - "] -pub struct TX_IQC_PHASE_EN_R(crate::FieldReader); -impl TX_IQC_PHASE_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TX_IQC_PHASE_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_IQC_PHASE_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TX_IQC_PHASE_EN_R = crate::BitReader; #[doc = "Field `tx_iqc_phase_en` writer - "] -pub struct TX_IQC_PHASE_EN_W<'a> { - w: &'a mut W, -} -impl<'a> TX_IQC_PHASE_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type TX_IQC_PHASE_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, DFE_CTRL_0_SPEC, bool, O>; +#[doc = "Field `tx_iqc_gain` reader - "] +pub type TX_IQC_GAIN_R = crate::FieldReader; +#[doc = "Field `tx_iqc_gain` writer - "] +pub type TX_IQC_GAIN_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_0_SPEC, u16, u16, 11, O>; +#[doc = "Field `tx_iqc_gain_en` reader - "] +pub type TX_IQC_GAIN_EN_R = crate::BitReader; +#[doc = "Field `tx_iqc_gain_en` writer - "] +pub type TX_IQC_GAIN_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, DFE_CTRL_0_SPEC, bool, O>; +#[doc = "Field `tx_dvga_gain_qdb` reader - "] +pub type TX_DVGA_GAIN_QDB_R = crate::FieldReader; +#[doc = "Field `tx_dvga_gain_qdb` writer - "] +pub type TX_DVGA_GAIN_QDB_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_0_SPEC, u8, u8, 7, O>; +#[doc = "Field `tx_dvga_gain_ctrl_hw` reader - "] +pub type TX_DVGA_GAIN_CTRL_HW_R = crate::BitReader; +#[doc = "Field `tx_dvga_gain_ctrl_hw` writer - "] +pub type TX_DVGA_GAIN_CTRL_HW_W<'a, const O: u8> = + crate::BitWriter<'a, u32, DFE_CTRL_0_SPEC, bool, O>; +impl R { + #[doc = "Bits 0:9"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); - self.w - } -} -#[doc = "Field `tx_iqc_phase` reader - "] -pub struct TX_IQC_PHASE_R(crate::FieldReader); -impl TX_IQC_PHASE_R { - pub(crate) fn new(bits: u16) -> Self { - TX_IQC_PHASE_R(crate::FieldReader::new(bits)) + pub fn tx_iqc_phase(&self) -> TX_IQC_PHASE_R { + TX_IQC_PHASE_R::new((self.bits & 0x03ff) as u16) } -} -impl core::ops::Deref for TX_IQC_PHASE_R { - type Target = crate::FieldReader; + #[doc = "Bit 10"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn tx_iqc_phase_en(&self) -> TX_IQC_PHASE_EN_R { + TX_IQC_PHASE_EN_R::new(((self.bits >> 10) & 1) != 0) } -} -#[doc = "Field `tx_iqc_phase` writer - "] -pub struct TX_IQC_PHASE_W<'a> { - w: &'a mut W, -} -impl<'a> TX_IQC_PHASE_W<'a> { - #[doc = r"Writes raw bits to the field"] + #[doc = "Bits 12:22"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03ff) | (value as u32 & 0x03ff); - self.w + pub fn tx_iqc_gain(&self) -> TX_IQC_GAIN_R { + TX_IQC_GAIN_R::new(((self.bits >> 12) & 0x07ff) as u16) } -} -impl R { - #[doc = "Bit 31"] + #[doc = "Bit 23"] #[inline(always)] - pub fn tx_dvga_gain_ctrl_hw(&self) -> TX_DVGA_GAIN_CTRL_HW_R { - TX_DVGA_GAIN_CTRL_HW_R::new(((self.bits >> 31) & 0x01) != 0) + pub fn tx_iqc_gain_en(&self) -> TX_IQC_GAIN_EN_R { + TX_IQC_GAIN_EN_R::new(((self.bits >> 23) & 1) != 0) } #[doc = "Bits 24:30"] #[inline(always)] pub fn tx_dvga_gain_qdb(&self) -> TX_DVGA_GAIN_QDB_R { TX_DVGA_GAIN_QDB_R::new(((self.bits >> 24) & 0x7f) as u8) } - #[doc = "Bit 23"] - #[inline(always)] - pub fn tx_iqc_gain_en(&self) -> TX_IQC_GAIN_EN_R { - TX_IQC_GAIN_EN_R::new(((self.bits >> 23) & 0x01) != 0) - } - #[doc = "Bits 12:22"] - #[inline(always)] - pub fn tx_iqc_gain(&self) -> TX_IQC_GAIN_R { - TX_IQC_GAIN_R::new(((self.bits >> 12) & 0x07ff) as u16) - } - #[doc = "Bit 10"] - #[inline(always)] - pub fn tx_iqc_phase_en(&self) -> TX_IQC_PHASE_EN_R { - TX_IQC_PHASE_EN_R::new(((self.bits >> 10) & 0x01) != 0) - } - #[doc = "Bits 0:9"] + #[doc = "Bit 31"] #[inline(always)] - pub fn tx_iqc_phase(&self) -> TX_IQC_PHASE_R { - TX_IQC_PHASE_R::new((self.bits & 0x03ff) as u16) + pub fn tx_dvga_gain_ctrl_hw(&self) -> TX_DVGA_GAIN_CTRL_HW_R { + TX_DVGA_GAIN_CTRL_HW_R::new(((self.bits >> 31) & 1) != 0) } } impl W { - #[doc = "Bit 31"] + #[doc = "Bits 0:9"] #[inline(always)] - pub fn tx_dvga_gain_ctrl_hw(&mut self) -> TX_DVGA_GAIN_CTRL_HW_W { - TX_DVGA_GAIN_CTRL_HW_W { w: self } + #[must_use] + pub fn tx_iqc_phase(&mut self) -> TX_IQC_PHASE_W<0> { + TX_IQC_PHASE_W::new(self) } - #[doc = "Bits 24:30"] + #[doc = "Bit 10"] #[inline(always)] - pub fn tx_dvga_gain_qdb(&mut self) -> TX_DVGA_GAIN_QDB_W { - TX_DVGA_GAIN_QDB_W { w: self } + #[must_use] + pub fn tx_iqc_phase_en(&mut self) -> TX_IQC_PHASE_EN_W<10> { + TX_IQC_PHASE_EN_W::new(self) } - #[doc = "Bit 23"] + #[doc = "Bits 12:22"] #[inline(always)] - pub fn tx_iqc_gain_en(&mut self) -> TX_IQC_GAIN_EN_W { - TX_IQC_GAIN_EN_W { w: self } + #[must_use] + pub fn tx_iqc_gain(&mut self) -> TX_IQC_GAIN_W<12> { + TX_IQC_GAIN_W::new(self) } - #[doc = "Bits 12:22"] + #[doc = "Bit 23"] #[inline(always)] - pub fn tx_iqc_gain(&mut self) -> TX_IQC_GAIN_W { - TX_IQC_GAIN_W { w: self } + #[must_use] + pub fn tx_iqc_gain_en(&mut self) -> TX_IQC_GAIN_EN_W<23> { + TX_IQC_GAIN_EN_W::new(self) } - #[doc = "Bit 10"] + #[doc = "Bits 24:30"] #[inline(always)] - pub fn tx_iqc_phase_en(&mut self) -> TX_IQC_PHASE_EN_W { - TX_IQC_PHASE_EN_W { w: self } + #[must_use] + pub fn tx_dvga_gain_qdb(&mut self) -> TX_DVGA_GAIN_QDB_W<24> { + TX_DVGA_GAIN_QDB_W::new(self) } - #[doc = "Bits 0:9"] + #[doc = "Bit 31"] #[inline(always)] - pub fn tx_iqc_phase(&mut self) -> TX_IQC_PHASE_W { - TX_IQC_PHASE_W { w: self } + #[must_use] + pub fn tx_dvga_gain_ctrl_hw(&mut self) -> TX_DVGA_GAIN_CTRL_HW_W<31> { + TX_DVGA_GAIN_CTRL_HW_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -299,11 +150,10 @@ impl crate::Readable for DFE_CTRL_0_SPEC { #[doc = "`write(|w| ..)` method takes [dfe_ctrl_0::W](W) writer structure"] impl crate::Writable for DFE_CTRL_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets dfe_ctrl_0 to value 0"] impl crate::Resettable for DFE_CTRL_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/dfe_ctrl_1.rs b/src/rf/dfe_ctrl_1.rs index a57c03f..20909d7 100644 --- a/src/rf/dfe_ctrl_1.rs +++ b/src/rf/dfe_ctrl_1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,179 +28,79 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `tx_dac_iq_swap` reader - "] -pub struct TX_DAC_IQ_SWAP_R(crate::FieldReader); -impl TX_DAC_IQ_SWAP_R { - pub(crate) fn new(bits: bool) -> Self { - TX_DAC_IQ_SWAP_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_DAC_IQ_SWAP_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_dac_iq_swap` writer - "] -pub struct TX_DAC_IQ_SWAP_W<'a> { - w: &'a mut W, -} -impl<'a> TX_DAC_IQ_SWAP_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 31)) | ((value as u32 & 0x01) << 31); - self.w - } -} -#[doc = "Field `tx_dac_dat_format` reader - "] -pub struct TX_DAC_DAT_FORMAT_R(crate::FieldReader); -impl TX_DAC_DAT_FORMAT_R { - pub(crate) fn new(bits: bool) -> Self { - TX_DAC_DAT_FORMAT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_DAC_DAT_FORMAT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_dac_dat_format` writer - "] -pub struct TX_DAC_DAT_FORMAT_W<'a> { - w: &'a mut W, -} -impl<'a> TX_DAC_DAT_FORMAT_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 30)) | ((value as u32 & 0x01) << 30); - self.w - } -} -#[doc = "Field `tx_dac_os_q` reader - "] -pub struct TX_DAC_OS_Q_R(crate::FieldReader); -impl TX_DAC_OS_Q_R { - pub(crate) fn new(bits: u16) -> Self { - TX_DAC_OS_Q_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_DAC_OS_Q_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_dac_os_q` writer - "] -pub struct TX_DAC_OS_Q_W<'a> { - w: &'a mut W, -} -impl<'a> TX_DAC_OS_Q_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0fff << 16)) | ((value as u32 & 0x0fff) << 16); - self.w - } -} #[doc = "Field `tx_dac_os_i` reader - "] -pub struct TX_DAC_OS_I_R(crate::FieldReader); -impl TX_DAC_OS_I_R { - pub(crate) fn new(bits: u16) -> Self { - TX_DAC_OS_I_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_DAC_OS_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TX_DAC_OS_I_R = crate::FieldReader; #[doc = "Field `tx_dac_os_i` writer - "] -pub struct TX_DAC_OS_I_W<'a> { - w: &'a mut W, -} -impl<'a> TX_DAC_OS_I_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x0fff) | (value as u32 & 0x0fff); - self.w - } -} +pub type TX_DAC_OS_I_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_1_SPEC, u16, u16, 12, O>; +#[doc = "Field `tx_dac_os_q` reader - "] +pub type TX_DAC_OS_Q_R = crate::FieldReader; +#[doc = "Field `tx_dac_os_q` writer - "] +pub type TX_DAC_OS_Q_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_1_SPEC, u16, u16, 12, O>; +#[doc = "Field `tx_dac_dat_format` reader - "] +pub type TX_DAC_DAT_FORMAT_R = crate::BitReader; +#[doc = "Field `tx_dac_dat_format` writer - "] +pub type TX_DAC_DAT_FORMAT_W<'a, const O: u8> = crate::BitWriter<'a, u32, DFE_CTRL_1_SPEC, bool, O>; +#[doc = "Field `tx_dac_iq_swap` reader - "] +pub type TX_DAC_IQ_SWAP_R = crate::BitReader; +#[doc = "Field `tx_dac_iq_swap` writer - "] +pub type TX_DAC_IQ_SWAP_W<'a, const O: u8> = crate::BitWriter<'a, u32, DFE_CTRL_1_SPEC, bool, O>; impl R { - #[doc = "Bit 31"] - #[inline(always)] - pub fn tx_dac_iq_swap(&self) -> TX_DAC_IQ_SWAP_R { - TX_DAC_IQ_SWAP_R::new(((self.bits >> 31) & 0x01) != 0) - } - #[doc = "Bit 30"] + #[doc = "Bits 0:11"] #[inline(always)] - pub fn tx_dac_dat_format(&self) -> TX_DAC_DAT_FORMAT_R { - TX_DAC_DAT_FORMAT_R::new(((self.bits >> 30) & 0x01) != 0) + pub fn tx_dac_os_i(&self) -> TX_DAC_OS_I_R { + TX_DAC_OS_I_R::new((self.bits & 0x0fff) as u16) } #[doc = "Bits 16:27"] #[inline(always)] pub fn tx_dac_os_q(&self) -> TX_DAC_OS_Q_R { TX_DAC_OS_Q_R::new(((self.bits >> 16) & 0x0fff) as u16) } - #[doc = "Bits 0:11"] + #[doc = "Bit 30"] #[inline(always)] - pub fn tx_dac_os_i(&self) -> TX_DAC_OS_I_R { - TX_DAC_OS_I_R::new((self.bits & 0x0fff) as u16) + pub fn tx_dac_dat_format(&self) -> TX_DAC_DAT_FORMAT_R { + TX_DAC_DAT_FORMAT_R::new(((self.bits >> 30) & 1) != 0) } -} -impl W { #[doc = "Bit 31"] #[inline(always)] - pub fn tx_dac_iq_swap(&mut self) -> TX_DAC_IQ_SWAP_W { - TX_DAC_IQ_SWAP_W { w: self } + pub fn tx_dac_iq_swap(&self) -> TX_DAC_IQ_SWAP_R { + TX_DAC_IQ_SWAP_R::new(((self.bits >> 31) & 1) != 0) } - #[doc = "Bit 30"] +} +impl W { + #[doc = "Bits 0:11"] #[inline(always)] - pub fn tx_dac_dat_format(&mut self) -> TX_DAC_DAT_FORMAT_W { - TX_DAC_DAT_FORMAT_W { w: self } + #[must_use] + pub fn tx_dac_os_i(&mut self) -> TX_DAC_OS_I_W<0> { + TX_DAC_OS_I_W::new(self) } #[doc = "Bits 16:27"] #[inline(always)] - pub fn tx_dac_os_q(&mut self) -> TX_DAC_OS_Q_W { - TX_DAC_OS_Q_W { w: self } + #[must_use] + pub fn tx_dac_os_q(&mut self) -> TX_DAC_OS_Q_W<16> { + TX_DAC_OS_Q_W::new(self) } - #[doc = "Bits 0:11"] + #[doc = "Bit 30"] #[inline(always)] - pub fn tx_dac_os_i(&mut self) -> TX_DAC_OS_I_W { - TX_DAC_OS_I_W { w: self } + #[must_use] + pub fn tx_dac_dat_format(&mut self) -> TX_DAC_DAT_FORMAT_W<30> { + TX_DAC_DAT_FORMAT_W::new(self) + } + #[doc = "Bit 31"] + #[inline(always)] + #[must_use] + pub fn tx_dac_iq_swap(&mut self) -> TX_DAC_IQ_SWAP_W<31> { + TX_DAC_IQ_SWAP_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -217,11 +118,10 @@ impl crate::Readable for DFE_CTRL_1_SPEC { #[doc = "`write(|w| ..)` method takes [dfe_ctrl_1::W](W) writer structure"] impl crate::Writable for DFE_CTRL_1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets dfe_ctrl_1 to value 0"] impl crate::Resettable for DFE_CTRL_1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/dfe_ctrl_10.rs b/src/rf/dfe_ctrl_10.rs index b04ad58..348050f 100644 --- a/src/rf/dfe_ctrl_10.rs +++ b/src/rf/dfe_ctrl_10.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,87 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `dfe_dac_raw_q` reader - "] -pub struct DFE_DAC_RAW_Q_R(crate::FieldReader); -impl DFE_DAC_RAW_Q_R { - pub(crate) fn new(bits: u16) -> Self { - DFE_DAC_RAW_Q_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DFE_DAC_RAW_Q_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dfe_dac_raw_q` writer - "] -pub struct DFE_DAC_RAW_Q_W<'a> { - w: &'a mut W, -} -impl<'a> DFE_DAC_RAW_Q_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07ff << 16)) | ((value as u32 & 0x07ff) << 16); - self.w - } -} #[doc = "Field `dfe_dac_raw_i` reader - "] -pub struct DFE_DAC_RAW_I_R(crate::FieldReader); -impl DFE_DAC_RAW_I_R { - pub(crate) fn new(bits: u16) -> Self { - DFE_DAC_RAW_I_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DFE_DAC_RAW_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type DFE_DAC_RAW_I_R = crate::FieldReader; #[doc = "Field `dfe_dac_raw_i` writer - "] -pub struct DFE_DAC_RAW_I_W<'a> { - w: &'a mut W, -} -impl<'a> DFE_DAC_RAW_I_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type DFE_DAC_RAW_I_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_10_SPEC, u16, u16, 11, O>; +#[doc = "Field `dfe_dac_raw_q` reader - "] +pub type DFE_DAC_RAW_Q_R = crate::FieldReader; +#[doc = "Field `dfe_dac_raw_q` writer - "] +pub type DFE_DAC_RAW_Q_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_10_SPEC, u16, u16, 11, O>; +impl R { + #[doc = "Bits 0:10"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x07ff) | (value as u32 & 0x07ff); - self.w + pub fn dfe_dac_raw_i(&self) -> DFE_DAC_RAW_I_R { + DFE_DAC_RAW_I_R::new((self.bits & 0x07ff) as u16) } -} -impl R { #[doc = "Bits 16:26"] #[inline(always)] pub fn dfe_dac_raw_q(&self) -> DFE_DAC_RAW_Q_R { DFE_DAC_RAW_Q_R::new(((self.bits >> 16) & 0x07ff) as u16) } - #[doc = "Bits 0:10"] - #[inline(always)] - pub fn dfe_dac_raw_i(&self) -> DFE_DAC_RAW_I_R { - DFE_DAC_RAW_I_R::new((self.bits & 0x07ff) as u16) - } } impl W { - #[doc = "Bits 16:26"] + #[doc = "Bits 0:10"] #[inline(always)] - pub fn dfe_dac_raw_q(&mut self) -> DFE_DAC_RAW_Q_W { - DFE_DAC_RAW_Q_W { w: self } + #[must_use] + pub fn dfe_dac_raw_i(&mut self) -> DFE_DAC_RAW_I_W<0> { + DFE_DAC_RAW_I_W::new(self) } - #[doc = "Bits 0:10"] + #[doc = "Bits 16:26"] #[inline(always)] - pub fn dfe_dac_raw_i(&mut self) -> DFE_DAC_RAW_I_W { - DFE_DAC_RAW_I_W { w: self } + #[must_use] + pub fn dfe_dac_raw_q(&mut self) -> DFE_DAC_RAW_Q_W<16> { + DFE_DAC_RAW_Q_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -125,11 +88,10 @@ impl crate::Readable for DFE_CTRL_10_SPEC { #[doc = "`write(|w| ..)` method takes [dfe_ctrl_10::W](W) writer structure"] impl crate::Writable for DFE_CTRL_10_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets dfe_ctrl_10 to value 0"] impl crate::Resettable for DFE_CTRL_10_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/dfe_ctrl_11.rs b/src/rf/dfe_ctrl_11.rs index fcf7dac..4006fcc 100644 --- a/src/rf/dfe_ctrl_11.rs +++ b/src/rf/dfe_ctrl_11.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,87 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `dfe_adc_raw_q` reader - "] -pub struct DFE_ADC_RAW_Q_R(crate::FieldReader); -impl DFE_ADC_RAW_Q_R { - pub(crate) fn new(bits: u16) -> Self { - DFE_ADC_RAW_Q_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DFE_ADC_RAW_Q_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dfe_adc_raw_q` writer - "] -pub struct DFE_ADC_RAW_Q_W<'a> { - w: &'a mut W, -} -impl<'a> DFE_ADC_RAW_Q_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03ff << 16)) | ((value as u32 & 0x03ff) << 16); - self.w - } -} #[doc = "Field `dfe_adc_raw_i` reader - "] -pub struct DFE_ADC_RAW_I_R(crate::FieldReader); -impl DFE_ADC_RAW_I_R { - pub(crate) fn new(bits: u16) -> Self { - DFE_ADC_RAW_I_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DFE_ADC_RAW_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type DFE_ADC_RAW_I_R = crate::FieldReader; #[doc = "Field `dfe_adc_raw_i` writer - "] -pub struct DFE_ADC_RAW_I_W<'a> { - w: &'a mut W, -} -impl<'a> DFE_ADC_RAW_I_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type DFE_ADC_RAW_I_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_11_SPEC, u16, u16, 10, O>; +#[doc = "Field `dfe_adc_raw_q` reader - "] +pub type DFE_ADC_RAW_Q_R = crate::FieldReader; +#[doc = "Field `dfe_adc_raw_q` writer - "] +pub type DFE_ADC_RAW_Q_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_11_SPEC, u16, u16, 10, O>; +impl R { + #[doc = "Bits 0:9"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03ff) | (value as u32 & 0x03ff); - self.w + pub fn dfe_adc_raw_i(&self) -> DFE_ADC_RAW_I_R { + DFE_ADC_RAW_I_R::new((self.bits & 0x03ff) as u16) } -} -impl R { #[doc = "Bits 16:25"] #[inline(always)] pub fn dfe_adc_raw_q(&self) -> DFE_ADC_RAW_Q_R { DFE_ADC_RAW_Q_R::new(((self.bits >> 16) & 0x03ff) as u16) } - #[doc = "Bits 0:9"] - #[inline(always)] - pub fn dfe_adc_raw_i(&self) -> DFE_ADC_RAW_I_R { - DFE_ADC_RAW_I_R::new((self.bits & 0x03ff) as u16) - } } impl W { - #[doc = "Bits 16:25"] + #[doc = "Bits 0:9"] #[inline(always)] - pub fn dfe_adc_raw_q(&mut self) -> DFE_ADC_RAW_Q_W { - DFE_ADC_RAW_Q_W { w: self } + #[must_use] + pub fn dfe_adc_raw_i(&mut self) -> DFE_ADC_RAW_I_W<0> { + DFE_ADC_RAW_I_W::new(self) } - #[doc = "Bits 0:9"] + #[doc = "Bits 16:25"] #[inline(always)] - pub fn dfe_adc_raw_i(&mut self) -> DFE_ADC_RAW_I_W { - DFE_ADC_RAW_I_W { w: self } + #[must_use] + pub fn dfe_adc_raw_q(&mut self) -> DFE_ADC_RAW_Q_W<16> { + DFE_ADC_RAW_Q_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -125,11 +88,10 @@ impl crate::Readable for DFE_CTRL_11_SPEC { #[doc = "`write(|w| ..)` method takes [dfe_ctrl_11::W](W) writer structure"] impl crate::Writable for DFE_CTRL_11_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets dfe_ctrl_11 to value 0"] impl crate::Resettable for DFE_CTRL_11_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/dfe_ctrl_12.rs b/src/rf/dfe_ctrl_12.rs index bd26ac7..ad5c1d4 100644 --- a/src/rf/dfe_ctrl_12.rs +++ b/src/rf/dfe_ctrl_12.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,159 +28,81 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `tx_dvga_gain_qdb_gc3` reader - "] -pub struct TX_DVGA_GAIN_QDB_GC3_R(crate::FieldReader); -impl TX_DVGA_GAIN_QDB_GC3_R { - pub(crate) fn new(bits: u8) -> Self { - TX_DVGA_GAIN_QDB_GC3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_DVGA_GAIN_QDB_GC3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_dvga_gain_qdb_gc3` writer - "] -pub struct TX_DVGA_GAIN_QDB_GC3_W<'a> { - w: &'a mut W, -} -impl<'a> TX_DVGA_GAIN_QDB_GC3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x7f << 24)) | ((value as u32 & 0x7f) << 24); - self.w - } -} -#[doc = "Field `tx_dvga_gain_qdb_gc2` reader - "] -pub struct TX_DVGA_GAIN_QDB_GC2_R(crate::FieldReader); -impl TX_DVGA_GAIN_QDB_GC2_R { - pub(crate) fn new(bits: u8) -> Self { - TX_DVGA_GAIN_QDB_GC2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_DVGA_GAIN_QDB_GC2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_dvga_gain_qdb_gc2` writer - "] -pub struct TX_DVGA_GAIN_QDB_GC2_W<'a> { - w: &'a mut W, -} -impl<'a> TX_DVGA_GAIN_QDB_GC2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x7f << 16)) | ((value as u32 & 0x7f) << 16); - self.w - } -} -#[doc = "Field `tx_dvga_gain_qdb_gc1` reader - "] -pub struct TX_DVGA_GAIN_QDB_GC1_R(crate::FieldReader); -impl TX_DVGA_GAIN_QDB_GC1_R { - pub(crate) fn new(bits: u8) -> Self { - TX_DVGA_GAIN_QDB_GC1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_DVGA_GAIN_QDB_GC1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_dvga_gain_qdb_gc1` writer - "] -pub struct TX_DVGA_GAIN_QDB_GC1_W<'a> { - w: &'a mut W, -} -impl<'a> TX_DVGA_GAIN_QDB_GC1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x7f << 8)) | ((value as u32 & 0x7f) << 8); - self.w - } -} #[doc = "Field `tx_dvga_gain_qdb_gc0` reader - "] -pub struct TX_DVGA_GAIN_QDB_GC0_R(crate::FieldReader); -impl TX_DVGA_GAIN_QDB_GC0_R { - pub(crate) fn new(bits: u8) -> Self { - TX_DVGA_GAIN_QDB_GC0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_DVGA_GAIN_QDB_GC0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TX_DVGA_GAIN_QDB_GC0_R = crate::FieldReader; #[doc = "Field `tx_dvga_gain_qdb_gc0` writer - "] -pub struct TX_DVGA_GAIN_QDB_GC0_W<'a> { - w: &'a mut W, -} -impl<'a> TX_DVGA_GAIN_QDB_GC0_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type TX_DVGA_GAIN_QDB_GC0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_12_SPEC, u8, u8, 7, O>; +#[doc = "Field `tx_dvga_gain_qdb_gc1` reader - "] +pub type TX_DVGA_GAIN_QDB_GC1_R = crate::FieldReader; +#[doc = "Field `tx_dvga_gain_qdb_gc1` writer - "] +pub type TX_DVGA_GAIN_QDB_GC1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_12_SPEC, u8, u8, 7, O>; +#[doc = "Field `tx_dvga_gain_qdb_gc2` reader - "] +pub type TX_DVGA_GAIN_QDB_GC2_R = crate::FieldReader; +#[doc = "Field `tx_dvga_gain_qdb_gc2` writer - "] +pub type TX_DVGA_GAIN_QDB_GC2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_12_SPEC, u8, u8, 7, O>; +#[doc = "Field `tx_dvga_gain_qdb_gc3` reader - "] +pub type TX_DVGA_GAIN_QDB_GC3_R = crate::FieldReader; +#[doc = "Field `tx_dvga_gain_qdb_gc3` writer - "] +pub type TX_DVGA_GAIN_QDB_GC3_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_12_SPEC, u8, u8, 7, O>; +impl R { + #[doc = "Bits 0:6"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x7f) | (value as u32 & 0x7f); - self.w + pub fn tx_dvga_gain_qdb_gc0(&self) -> TX_DVGA_GAIN_QDB_GC0_R { + TX_DVGA_GAIN_QDB_GC0_R::new((self.bits & 0x7f) as u8) } -} -impl R { - #[doc = "Bits 24:30"] + #[doc = "Bits 8:14"] #[inline(always)] - pub fn tx_dvga_gain_qdb_gc3(&self) -> TX_DVGA_GAIN_QDB_GC3_R { - TX_DVGA_GAIN_QDB_GC3_R::new(((self.bits >> 24) & 0x7f) as u8) + pub fn tx_dvga_gain_qdb_gc1(&self) -> TX_DVGA_GAIN_QDB_GC1_R { + TX_DVGA_GAIN_QDB_GC1_R::new(((self.bits >> 8) & 0x7f) as u8) } #[doc = "Bits 16:22"] #[inline(always)] pub fn tx_dvga_gain_qdb_gc2(&self) -> TX_DVGA_GAIN_QDB_GC2_R { TX_DVGA_GAIN_QDB_GC2_R::new(((self.bits >> 16) & 0x7f) as u8) } - #[doc = "Bits 8:14"] - #[inline(always)] - pub fn tx_dvga_gain_qdb_gc1(&self) -> TX_DVGA_GAIN_QDB_GC1_R { - TX_DVGA_GAIN_QDB_GC1_R::new(((self.bits >> 8) & 0x7f) as u8) - } - #[doc = "Bits 0:6"] + #[doc = "Bits 24:30"] #[inline(always)] - pub fn tx_dvga_gain_qdb_gc0(&self) -> TX_DVGA_GAIN_QDB_GC0_R { - TX_DVGA_GAIN_QDB_GC0_R::new((self.bits & 0x7f) as u8) + pub fn tx_dvga_gain_qdb_gc3(&self) -> TX_DVGA_GAIN_QDB_GC3_R { + TX_DVGA_GAIN_QDB_GC3_R::new(((self.bits >> 24) & 0x7f) as u8) } } impl W { - #[doc = "Bits 24:30"] + #[doc = "Bits 0:6"] #[inline(always)] - pub fn tx_dvga_gain_qdb_gc3(&mut self) -> TX_DVGA_GAIN_QDB_GC3_W { - TX_DVGA_GAIN_QDB_GC3_W { w: self } + #[must_use] + pub fn tx_dvga_gain_qdb_gc0(&mut self) -> TX_DVGA_GAIN_QDB_GC0_W<0> { + TX_DVGA_GAIN_QDB_GC0_W::new(self) } - #[doc = "Bits 16:22"] + #[doc = "Bits 8:14"] #[inline(always)] - pub fn tx_dvga_gain_qdb_gc2(&mut self) -> TX_DVGA_GAIN_QDB_GC2_W { - TX_DVGA_GAIN_QDB_GC2_W { w: self } + #[must_use] + pub fn tx_dvga_gain_qdb_gc1(&mut self) -> TX_DVGA_GAIN_QDB_GC1_W<8> { + TX_DVGA_GAIN_QDB_GC1_W::new(self) } - #[doc = "Bits 8:14"] + #[doc = "Bits 16:22"] #[inline(always)] - pub fn tx_dvga_gain_qdb_gc1(&mut self) -> TX_DVGA_GAIN_QDB_GC1_W { - TX_DVGA_GAIN_QDB_GC1_W { w: self } + #[must_use] + pub fn tx_dvga_gain_qdb_gc2(&mut self) -> TX_DVGA_GAIN_QDB_GC2_W<16> { + TX_DVGA_GAIN_QDB_GC2_W::new(self) } - #[doc = "Bits 0:6"] + #[doc = "Bits 24:30"] #[inline(always)] - pub fn tx_dvga_gain_qdb_gc0(&mut self) -> TX_DVGA_GAIN_QDB_GC0_W { - TX_DVGA_GAIN_QDB_GC0_W { w: self } + #[must_use] + pub fn tx_dvga_gain_qdb_gc3(&mut self) -> TX_DVGA_GAIN_QDB_GC3_W<24> { + TX_DVGA_GAIN_QDB_GC3_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -197,11 +120,10 @@ impl crate::Readable for DFE_CTRL_12_SPEC { #[doc = "`write(|w| ..)` method takes [dfe_ctrl_12::W](W) writer structure"] impl crate::Writable for DFE_CTRL_12_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets dfe_ctrl_12 to value 0"] impl crate::Resettable for DFE_CTRL_12_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/dfe_ctrl_13.rs b/src/rf/dfe_ctrl_13.rs index 719c9f0..357f12e 100644 --- a/src/rf/dfe_ctrl_13.rs +++ b/src/rf/dfe_ctrl_13.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,159 +28,81 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `tx_dvga_gain_qdb_gc7` reader - "] -pub struct TX_DVGA_GAIN_QDB_GC7_R(crate::FieldReader); -impl TX_DVGA_GAIN_QDB_GC7_R { - pub(crate) fn new(bits: u8) -> Self { - TX_DVGA_GAIN_QDB_GC7_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_DVGA_GAIN_QDB_GC7_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_dvga_gain_qdb_gc7` writer - "] -pub struct TX_DVGA_GAIN_QDB_GC7_W<'a> { - w: &'a mut W, -} -impl<'a> TX_DVGA_GAIN_QDB_GC7_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x7f << 24)) | ((value as u32 & 0x7f) << 24); - self.w - } -} -#[doc = "Field `tx_dvga_gain_qdb_gc6` reader - "] -pub struct TX_DVGA_GAIN_QDB_GC6_R(crate::FieldReader); -impl TX_DVGA_GAIN_QDB_GC6_R { - pub(crate) fn new(bits: u8) -> Self { - TX_DVGA_GAIN_QDB_GC6_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_DVGA_GAIN_QDB_GC6_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_dvga_gain_qdb_gc6` writer - "] -pub struct TX_DVGA_GAIN_QDB_GC6_W<'a> { - w: &'a mut W, -} -impl<'a> TX_DVGA_GAIN_QDB_GC6_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x7f << 16)) | ((value as u32 & 0x7f) << 16); - self.w - } -} -#[doc = "Field `tx_dvga_gain_qdb_gc5` reader - "] -pub struct TX_DVGA_GAIN_QDB_GC5_R(crate::FieldReader); -impl TX_DVGA_GAIN_QDB_GC5_R { - pub(crate) fn new(bits: u8) -> Self { - TX_DVGA_GAIN_QDB_GC5_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_DVGA_GAIN_QDB_GC5_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_dvga_gain_qdb_gc5` writer - "] -pub struct TX_DVGA_GAIN_QDB_GC5_W<'a> { - w: &'a mut W, -} -impl<'a> TX_DVGA_GAIN_QDB_GC5_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x7f << 8)) | ((value as u32 & 0x7f) << 8); - self.w - } -} #[doc = "Field `tx_dvga_gain_qdb_gc4` reader - "] -pub struct TX_DVGA_GAIN_QDB_GC4_R(crate::FieldReader); -impl TX_DVGA_GAIN_QDB_GC4_R { - pub(crate) fn new(bits: u8) -> Self { - TX_DVGA_GAIN_QDB_GC4_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_DVGA_GAIN_QDB_GC4_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TX_DVGA_GAIN_QDB_GC4_R = crate::FieldReader; #[doc = "Field `tx_dvga_gain_qdb_gc4` writer - "] -pub struct TX_DVGA_GAIN_QDB_GC4_W<'a> { - w: &'a mut W, -} -impl<'a> TX_DVGA_GAIN_QDB_GC4_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type TX_DVGA_GAIN_QDB_GC4_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_13_SPEC, u8, u8, 7, O>; +#[doc = "Field `tx_dvga_gain_qdb_gc5` reader - "] +pub type TX_DVGA_GAIN_QDB_GC5_R = crate::FieldReader; +#[doc = "Field `tx_dvga_gain_qdb_gc5` writer - "] +pub type TX_DVGA_GAIN_QDB_GC5_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_13_SPEC, u8, u8, 7, O>; +#[doc = "Field `tx_dvga_gain_qdb_gc6` reader - "] +pub type TX_DVGA_GAIN_QDB_GC6_R = crate::FieldReader; +#[doc = "Field `tx_dvga_gain_qdb_gc6` writer - "] +pub type TX_DVGA_GAIN_QDB_GC6_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_13_SPEC, u8, u8, 7, O>; +#[doc = "Field `tx_dvga_gain_qdb_gc7` reader - "] +pub type TX_DVGA_GAIN_QDB_GC7_R = crate::FieldReader; +#[doc = "Field `tx_dvga_gain_qdb_gc7` writer - "] +pub type TX_DVGA_GAIN_QDB_GC7_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_13_SPEC, u8, u8, 7, O>; +impl R { + #[doc = "Bits 0:6"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x7f) | (value as u32 & 0x7f); - self.w + pub fn tx_dvga_gain_qdb_gc4(&self) -> TX_DVGA_GAIN_QDB_GC4_R { + TX_DVGA_GAIN_QDB_GC4_R::new((self.bits & 0x7f) as u8) } -} -impl R { - #[doc = "Bits 24:30"] + #[doc = "Bits 8:14"] #[inline(always)] - pub fn tx_dvga_gain_qdb_gc7(&self) -> TX_DVGA_GAIN_QDB_GC7_R { - TX_DVGA_GAIN_QDB_GC7_R::new(((self.bits >> 24) & 0x7f) as u8) + pub fn tx_dvga_gain_qdb_gc5(&self) -> TX_DVGA_GAIN_QDB_GC5_R { + TX_DVGA_GAIN_QDB_GC5_R::new(((self.bits >> 8) & 0x7f) as u8) } #[doc = "Bits 16:22"] #[inline(always)] pub fn tx_dvga_gain_qdb_gc6(&self) -> TX_DVGA_GAIN_QDB_GC6_R { TX_DVGA_GAIN_QDB_GC6_R::new(((self.bits >> 16) & 0x7f) as u8) } - #[doc = "Bits 8:14"] - #[inline(always)] - pub fn tx_dvga_gain_qdb_gc5(&self) -> TX_DVGA_GAIN_QDB_GC5_R { - TX_DVGA_GAIN_QDB_GC5_R::new(((self.bits >> 8) & 0x7f) as u8) - } - #[doc = "Bits 0:6"] + #[doc = "Bits 24:30"] #[inline(always)] - pub fn tx_dvga_gain_qdb_gc4(&self) -> TX_DVGA_GAIN_QDB_GC4_R { - TX_DVGA_GAIN_QDB_GC4_R::new((self.bits & 0x7f) as u8) + pub fn tx_dvga_gain_qdb_gc7(&self) -> TX_DVGA_GAIN_QDB_GC7_R { + TX_DVGA_GAIN_QDB_GC7_R::new(((self.bits >> 24) & 0x7f) as u8) } } impl W { - #[doc = "Bits 24:30"] + #[doc = "Bits 0:6"] #[inline(always)] - pub fn tx_dvga_gain_qdb_gc7(&mut self) -> TX_DVGA_GAIN_QDB_GC7_W { - TX_DVGA_GAIN_QDB_GC7_W { w: self } + #[must_use] + pub fn tx_dvga_gain_qdb_gc4(&mut self) -> TX_DVGA_GAIN_QDB_GC4_W<0> { + TX_DVGA_GAIN_QDB_GC4_W::new(self) } - #[doc = "Bits 16:22"] + #[doc = "Bits 8:14"] #[inline(always)] - pub fn tx_dvga_gain_qdb_gc6(&mut self) -> TX_DVGA_GAIN_QDB_GC6_W { - TX_DVGA_GAIN_QDB_GC6_W { w: self } + #[must_use] + pub fn tx_dvga_gain_qdb_gc5(&mut self) -> TX_DVGA_GAIN_QDB_GC5_W<8> { + TX_DVGA_GAIN_QDB_GC5_W::new(self) } - #[doc = "Bits 8:14"] + #[doc = "Bits 16:22"] #[inline(always)] - pub fn tx_dvga_gain_qdb_gc5(&mut self) -> TX_DVGA_GAIN_QDB_GC5_W { - TX_DVGA_GAIN_QDB_GC5_W { w: self } + #[must_use] + pub fn tx_dvga_gain_qdb_gc6(&mut self) -> TX_DVGA_GAIN_QDB_GC6_W<16> { + TX_DVGA_GAIN_QDB_GC6_W::new(self) } - #[doc = "Bits 0:6"] + #[doc = "Bits 24:30"] #[inline(always)] - pub fn tx_dvga_gain_qdb_gc4(&mut self) -> TX_DVGA_GAIN_QDB_GC4_W { - TX_DVGA_GAIN_QDB_GC4_W { w: self } + #[must_use] + pub fn tx_dvga_gain_qdb_gc7(&mut self) -> TX_DVGA_GAIN_QDB_GC7_W<24> { + TX_DVGA_GAIN_QDB_GC7_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -197,11 +120,10 @@ impl crate::Readable for DFE_CTRL_13_SPEC { #[doc = "`write(|w| ..)` method takes [dfe_ctrl_13::W](W) writer structure"] impl crate::Writable for DFE_CTRL_13_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets dfe_ctrl_13 to value 0"] impl crate::Resettable for DFE_CTRL_13_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/dfe_ctrl_14.rs b/src/rf/dfe_ctrl_14.rs index 0412c0d..51f0a97 100644 --- a/src/rf/dfe_ctrl_14.rs +++ b/src/rf/dfe_ctrl_14.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,159 +28,81 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `tx_dvga_gain_qdb_gc11` reader - "] -pub struct TX_DVGA_GAIN_QDB_GC11_R(crate::FieldReader); -impl TX_DVGA_GAIN_QDB_GC11_R { - pub(crate) fn new(bits: u8) -> Self { - TX_DVGA_GAIN_QDB_GC11_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_DVGA_GAIN_QDB_GC11_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_dvga_gain_qdb_gc11` writer - "] -pub struct TX_DVGA_GAIN_QDB_GC11_W<'a> { - w: &'a mut W, -} -impl<'a> TX_DVGA_GAIN_QDB_GC11_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x7f << 24)) | ((value as u32 & 0x7f) << 24); - self.w - } -} -#[doc = "Field `tx_dvga_gain_qdb_gc10` reader - "] -pub struct TX_DVGA_GAIN_QDB_GC10_R(crate::FieldReader); -impl TX_DVGA_GAIN_QDB_GC10_R { - pub(crate) fn new(bits: u8) -> Self { - TX_DVGA_GAIN_QDB_GC10_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_DVGA_GAIN_QDB_GC10_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_dvga_gain_qdb_gc10` writer - "] -pub struct TX_DVGA_GAIN_QDB_GC10_W<'a> { - w: &'a mut W, -} -impl<'a> TX_DVGA_GAIN_QDB_GC10_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x7f << 16)) | ((value as u32 & 0x7f) << 16); - self.w - } -} -#[doc = "Field `tx_dvga_gain_qdb_gc9` reader - "] -pub struct TX_DVGA_GAIN_QDB_GC9_R(crate::FieldReader); -impl TX_DVGA_GAIN_QDB_GC9_R { - pub(crate) fn new(bits: u8) -> Self { - TX_DVGA_GAIN_QDB_GC9_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_DVGA_GAIN_QDB_GC9_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_dvga_gain_qdb_gc9` writer - "] -pub struct TX_DVGA_GAIN_QDB_GC9_W<'a> { - w: &'a mut W, -} -impl<'a> TX_DVGA_GAIN_QDB_GC9_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x7f << 8)) | ((value as u32 & 0x7f) << 8); - self.w - } -} #[doc = "Field `tx_dvga_gain_qdb_gc8` reader - "] -pub struct TX_DVGA_GAIN_QDB_GC8_R(crate::FieldReader); -impl TX_DVGA_GAIN_QDB_GC8_R { - pub(crate) fn new(bits: u8) -> Self { - TX_DVGA_GAIN_QDB_GC8_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_DVGA_GAIN_QDB_GC8_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TX_DVGA_GAIN_QDB_GC8_R = crate::FieldReader; #[doc = "Field `tx_dvga_gain_qdb_gc8` writer - "] -pub struct TX_DVGA_GAIN_QDB_GC8_W<'a> { - w: &'a mut W, -} -impl<'a> TX_DVGA_GAIN_QDB_GC8_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type TX_DVGA_GAIN_QDB_GC8_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_14_SPEC, u8, u8, 7, O>; +#[doc = "Field `tx_dvga_gain_qdb_gc9` reader - "] +pub type TX_DVGA_GAIN_QDB_GC9_R = crate::FieldReader; +#[doc = "Field `tx_dvga_gain_qdb_gc9` writer - "] +pub type TX_DVGA_GAIN_QDB_GC9_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_14_SPEC, u8, u8, 7, O>; +#[doc = "Field `tx_dvga_gain_qdb_gc10` reader - "] +pub type TX_DVGA_GAIN_QDB_GC10_R = crate::FieldReader; +#[doc = "Field `tx_dvga_gain_qdb_gc10` writer - "] +pub type TX_DVGA_GAIN_QDB_GC10_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_14_SPEC, u8, u8, 7, O>; +#[doc = "Field `tx_dvga_gain_qdb_gc11` reader - "] +pub type TX_DVGA_GAIN_QDB_GC11_R = crate::FieldReader; +#[doc = "Field `tx_dvga_gain_qdb_gc11` writer - "] +pub type TX_DVGA_GAIN_QDB_GC11_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_14_SPEC, u8, u8, 7, O>; +impl R { + #[doc = "Bits 0:6"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x7f) | (value as u32 & 0x7f); - self.w + pub fn tx_dvga_gain_qdb_gc8(&self) -> TX_DVGA_GAIN_QDB_GC8_R { + TX_DVGA_GAIN_QDB_GC8_R::new((self.bits & 0x7f) as u8) } -} -impl R { - #[doc = "Bits 24:30"] + #[doc = "Bits 8:14"] #[inline(always)] - pub fn tx_dvga_gain_qdb_gc11(&self) -> TX_DVGA_GAIN_QDB_GC11_R { - TX_DVGA_GAIN_QDB_GC11_R::new(((self.bits >> 24) & 0x7f) as u8) + pub fn tx_dvga_gain_qdb_gc9(&self) -> TX_DVGA_GAIN_QDB_GC9_R { + TX_DVGA_GAIN_QDB_GC9_R::new(((self.bits >> 8) & 0x7f) as u8) } #[doc = "Bits 16:22"] #[inline(always)] pub fn tx_dvga_gain_qdb_gc10(&self) -> TX_DVGA_GAIN_QDB_GC10_R { TX_DVGA_GAIN_QDB_GC10_R::new(((self.bits >> 16) & 0x7f) as u8) } - #[doc = "Bits 8:14"] - #[inline(always)] - pub fn tx_dvga_gain_qdb_gc9(&self) -> TX_DVGA_GAIN_QDB_GC9_R { - TX_DVGA_GAIN_QDB_GC9_R::new(((self.bits >> 8) & 0x7f) as u8) - } - #[doc = "Bits 0:6"] + #[doc = "Bits 24:30"] #[inline(always)] - pub fn tx_dvga_gain_qdb_gc8(&self) -> TX_DVGA_GAIN_QDB_GC8_R { - TX_DVGA_GAIN_QDB_GC8_R::new((self.bits & 0x7f) as u8) + pub fn tx_dvga_gain_qdb_gc11(&self) -> TX_DVGA_GAIN_QDB_GC11_R { + TX_DVGA_GAIN_QDB_GC11_R::new(((self.bits >> 24) & 0x7f) as u8) } } impl W { - #[doc = "Bits 24:30"] + #[doc = "Bits 0:6"] #[inline(always)] - pub fn tx_dvga_gain_qdb_gc11(&mut self) -> TX_DVGA_GAIN_QDB_GC11_W { - TX_DVGA_GAIN_QDB_GC11_W { w: self } + #[must_use] + pub fn tx_dvga_gain_qdb_gc8(&mut self) -> TX_DVGA_GAIN_QDB_GC8_W<0> { + TX_DVGA_GAIN_QDB_GC8_W::new(self) } - #[doc = "Bits 16:22"] + #[doc = "Bits 8:14"] #[inline(always)] - pub fn tx_dvga_gain_qdb_gc10(&mut self) -> TX_DVGA_GAIN_QDB_GC10_W { - TX_DVGA_GAIN_QDB_GC10_W { w: self } + #[must_use] + pub fn tx_dvga_gain_qdb_gc9(&mut self) -> TX_DVGA_GAIN_QDB_GC9_W<8> { + TX_DVGA_GAIN_QDB_GC9_W::new(self) } - #[doc = "Bits 8:14"] + #[doc = "Bits 16:22"] #[inline(always)] - pub fn tx_dvga_gain_qdb_gc9(&mut self) -> TX_DVGA_GAIN_QDB_GC9_W { - TX_DVGA_GAIN_QDB_GC9_W { w: self } + #[must_use] + pub fn tx_dvga_gain_qdb_gc10(&mut self) -> TX_DVGA_GAIN_QDB_GC10_W<16> { + TX_DVGA_GAIN_QDB_GC10_W::new(self) } - #[doc = "Bits 0:6"] + #[doc = "Bits 24:30"] #[inline(always)] - pub fn tx_dvga_gain_qdb_gc8(&mut self) -> TX_DVGA_GAIN_QDB_GC8_W { - TX_DVGA_GAIN_QDB_GC8_W { w: self } + #[must_use] + pub fn tx_dvga_gain_qdb_gc11(&mut self) -> TX_DVGA_GAIN_QDB_GC11_W<24> { + TX_DVGA_GAIN_QDB_GC11_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -197,11 +120,10 @@ impl crate::Readable for DFE_CTRL_14_SPEC { #[doc = "`write(|w| ..)` method takes [dfe_ctrl_14::W](W) writer structure"] impl crate::Writable for DFE_CTRL_14_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets dfe_ctrl_14 to value 0"] impl crate::Resettable for DFE_CTRL_14_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/dfe_ctrl_15.rs b/src/rf/dfe_ctrl_15.rs index ea8c8dd..23fdec5 100644 --- a/src/rf/dfe_ctrl_15.rs +++ b/src/rf/dfe_ctrl_15.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,159 +28,81 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `tx_dvga_gain_qdb_gc15` reader - "] -pub struct TX_DVGA_GAIN_QDB_GC15_R(crate::FieldReader); -impl TX_DVGA_GAIN_QDB_GC15_R { - pub(crate) fn new(bits: u8) -> Self { - TX_DVGA_GAIN_QDB_GC15_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_DVGA_GAIN_QDB_GC15_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_dvga_gain_qdb_gc15` writer - "] -pub struct TX_DVGA_GAIN_QDB_GC15_W<'a> { - w: &'a mut W, -} -impl<'a> TX_DVGA_GAIN_QDB_GC15_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x7f << 24)) | ((value as u32 & 0x7f) << 24); - self.w - } -} -#[doc = "Field `tx_dvga_gain_qdb_gc14` reader - "] -pub struct TX_DVGA_GAIN_QDB_GC14_R(crate::FieldReader); -impl TX_DVGA_GAIN_QDB_GC14_R { - pub(crate) fn new(bits: u8) -> Self { - TX_DVGA_GAIN_QDB_GC14_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_DVGA_GAIN_QDB_GC14_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_dvga_gain_qdb_gc14` writer - "] -pub struct TX_DVGA_GAIN_QDB_GC14_W<'a> { - w: &'a mut W, -} -impl<'a> TX_DVGA_GAIN_QDB_GC14_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x7f << 16)) | ((value as u32 & 0x7f) << 16); - self.w - } -} -#[doc = "Field `tx_dvga_gain_qdb_gc13` reader - "] -pub struct TX_DVGA_GAIN_QDB_GC13_R(crate::FieldReader); -impl TX_DVGA_GAIN_QDB_GC13_R { - pub(crate) fn new(bits: u8) -> Self { - TX_DVGA_GAIN_QDB_GC13_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_DVGA_GAIN_QDB_GC13_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_dvga_gain_qdb_gc13` writer - "] -pub struct TX_DVGA_GAIN_QDB_GC13_W<'a> { - w: &'a mut W, -} -impl<'a> TX_DVGA_GAIN_QDB_GC13_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x7f << 8)) | ((value as u32 & 0x7f) << 8); - self.w - } -} #[doc = "Field `tx_dvga_gain_qdb_gc12` reader - "] -pub struct TX_DVGA_GAIN_QDB_GC12_R(crate::FieldReader); -impl TX_DVGA_GAIN_QDB_GC12_R { - pub(crate) fn new(bits: u8) -> Self { - TX_DVGA_GAIN_QDB_GC12_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_DVGA_GAIN_QDB_GC12_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TX_DVGA_GAIN_QDB_GC12_R = crate::FieldReader; #[doc = "Field `tx_dvga_gain_qdb_gc12` writer - "] -pub struct TX_DVGA_GAIN_QDB_GC12_W<'a> { - w: &'a mut W, -} -impl<'a> TX_DVGA_GAIN_QDB_GC12_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type TX_DVGA_GAIN_QDB_GC12_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_15_SPEC, u8, u8, 7, O>; +#[doc = "Field `tx_dvga_gain_qdb_gc13` reader - "] +pub type TX_DVGA_GAIN_QDB_GC13_R = crate::FieldReader; +#[doc = "Field `tx_dvga_gain_qdb_gc13` writer - "] +pub type TX_DVGA_GAIN_QDB_GC13_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_15_SPEC, u8, u8, 7, O>; +#[doc = "Field `tx_dvga_gain_qdb_gc14` reader - "] +pub type TX_DVGA_GAIN_QDB_GC14_R = crate::FieldReader; +#[doc = "Field `tx_dvga_gain_qdb_gc14` writer - "] +pub type TX_DVGA_GAIN_QDB_GC14_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_15_SPEC, u8, u8, 7, O>; +#[doc = "Field `tx_dvga_gain_qdb_gc15` reader - "] +pub type TX_DVGA_GAIN_QDB_GC15_R = crate::FieldReader; +#[doc = "Field `tx_dvga_gain_qdb_gc15` writer - "] +pub type TX_DVGA_GAIN_QDB_GC15_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_15_SPEC, u8, u8, 7, O>; +impl R { + #[doc = "Bits 0:6"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x7f) | (value as u32 & 0x7f); - self.w + pub fn tx_dvga_gain_qdb_gc12(&self) -> TX_DVGA_GAIN_QDB_GC12_R { + TX_DVGA_GAIN_QDB_GC12_R::new((self.bits & 0x7f) as u8) } -} -impl R { - #[doc = "Bits 24:30"] + #[doc = "Bits 8:14"] #[inline(always)] - pub fn tx_dvga_gain_qdb_gc15(&self) -> TX_DVGA_GAIN_QDB_GC15_R { - TX_DVGA_GAIN_QDB_GC15_R::new(((self.bits >> 24) & 0x7f) as u8) + pub fn tx_dvga_gain_qdb_gc13(&self) -> TX_DVGA_GAIN_QDB_GC13_R { + TX_DVGA_GAIN_QDB_GC13_R::new(((self.bits >> 8) & 0x7f) as u8) } #[doc = "Bits 16:22"] #[inline(always)] pub fn tx_dvga_gain_qdb_gc14(&self) -> TX_DVGA_GAIN_QDB_GC14_R { TX_DVGA_GAIN_QDB_GC14_R::new(((self.bits >> 16) & 0x7f) as u8) } - #[doc = "Bits 8:14"] - #[inline(always)] - pub fn tx_dvga_gain_qdb_gc13(&self) -> TX_DVGA_GAIN_QDB_GC13_R { - TX_DVGA_GAIN_QDB_GC13_R::new(((self.bits >> 8) & 0x7f) as u8) - } - #[doc = "Bits 0:6"] + #[doc = "Bits 24:30"] #[inline(always)] - pub fn tx_dvga_gain_qdb_gc12(&self) -> TX_DVGA_GAIN_QDB_GC12_R { - TX_DVGA_GAIN_QDB_GC12_R::new((self.bits & 0x7f) as u8) + pub fn tx_dvga_gain_qdb_gc15(&self) -> TX_DVGA_GAIN_QDB_GC15_R { + TX_DVGA_GAIN_QDB_GC15_R::new(((self.bits >> 24) & 0x7f) as u8) } } impl W { - #[doc = "Bits 24:30"] + #[doc = "Bits 0:6"] #[inline(always)] - pub fn tx_dvga_gain_qdb_gc15(&mut self) -> TX_DVGA_GAIN_QDB_GC15_W { - TX_DVGA_GAIN_QDB_GC15_W { w: self } + #[must_use] + pub fn tx_dvga_gain_qdb_gc12(&mut self) -> TX_DVGA_GAIN_QDB_GC12_W<0> { + TX_DVGA_GAIN_QDB_GC12_W::new(self) } - #[doc = "Bits 16:22"] + #[doc = "Bits 8:14"] #[inline(always)] - pub fn tx_dvga_gain_qdb_gc14(&mut self) -> TX_DVGA_GAIN_QDB_GC14_W { - TX_DVGA_GAIN_QDB_GC14_W { w: self } + #[must_use] + pub fn tx_dvga_gain_qdb_gc13(&mut self) -> TX_DVGA_GAIN_QDB_GC13_W<8> { + TX_DVGA_GAIN_QDB_GC13_W::new(self) } - #[doc = "Bits 8:14"] + #[doc = "Bits 16:22"] #[inline(always)] - pub fn tx_dvga_gain_qdb_gc13(&mut self) -> TX_DVGA_GAIN_QDB_GC13_W { - TX_DVGA_GAIN_QDB_GC13_W { w: self } + #[must_use] + pub fn tx_dvga_gain_qdb_gc14(&mut self) -> TX_DVGA_GAIN_QDB_GC14_W<16> { + TX_DVGA_GAIN_QDB_GC14_W::new(self) } - #[doc = "Bits 0:6"] + #[doc = "Bits 24:30"] #[inline(always)] - pub fn tx_dvga_gain_qdb_gc12(&mut self) -> TX_DVGA_GAIN_QDB_GC12_W { - TX_DVGA_GAIN_QDB_GC12_W { w: self } + #[must_use] + pub fn tx_dvga_gain_qdb_gc15(&mut self) -> TX_DVGA_GAIN_QDB_GC15_W<24> { + TX_DVGA_GAIN_QDB_GC15_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -197,11 +120,10 @@ impl crate::Readable for DFE_CTRL_15_SPEC { #[doc = "`write(|w| ..)` method takes [dfe_ctrl_15::W](W) writer structure"] impl crate::Writable for DFE_CTRL_15_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets dfe_ctrl_15 to value 0"] impl crate::Resettable for DFE_CTRL_15_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/dfe_ctrl_16.rs b/src/rf/dfe_ctrl_16.rs index a7a383e..db478f2 100644 --- a/src/rf/dfe_ctrl_16.rs +++ b/src/rf/dfe_ctrl_16.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,303 +28,145 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rf_tbb_ind_gc7` reader - "] -pub struct RF_TBB_IND_GC7_R(crate::FieldReader); -impl RF_TBB_IND_GC7_R { - pub(crate) fn new(bits: u8) -> Self { - RF_TBB_IND_GC7_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_TBB_IND_GC7_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_tbb_ind_gc7` writer - "] -pub struct RF_TBB_IND_GC7_W<'a> { - w: &'a mut W, -} -impl<'a> RF_TBB_IND_GC7_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 28)) | ((value as u32 & 0x07) << 28); - self.w - } -} -#[doc = "Field `rf_tbb_ind_gc6` reader - "] -pub struct RF_TBB_IND_GC6_R(crate::FieldReader); -impl RF_TBB_IND_GC6_R { - pub(crate) fn new(bits: u8) -> Self { - RF_TBB_IND_GC6_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_TBB_IND_GC6_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_tbb_ind_gc6` writer - "] -pub struct RF_TBB_IND_GC6_W<'a> { - w: &'a mut W, -} -impl<'a> RF_TBB_IND_GC6_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 24)) | ((value as u32 & 0x07) << 24); - self.w - } -} -#[doc = "Field `rf_tbb_ind_gc5` reader - "] -pub struct RF_TBB_IND_GC5_R(crate::FieldReader); -impl RF_TBB_IND_GC5_R { - pub(crate) fn new(bits: u8) -> Self { - RF_TBB_IND_GC5_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_TBB_IND_GC5_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_tbb_ind_gc5` writer - "] -pub struct RF_TBB_IND_GC5_W<'a> { - w: &'a mut W, -} -impl<'a> RF_TBB_IND_GC5_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 20)) | ((value as u32 & 0x07) << 20); - self.w - } -} -#[doc = "Field `rf_tbb_ind_gc4` reader - "] -pub struct RF_TBB_IND_GC4_R(crate::FieldReader); -impl RF_TBB_IND_GC4_R { - pub(crate) fn new(bits: u8) -> Self { - RF_TBB_IND_GC4_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_TBB_IND_GC4_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_tbb_ind_gc4` writer - "] -pub struct RF_TBB_IND_GC4_W<'a> { - w: &'a mut W, -} -impl<'a> RF_TBB_IND_GC4_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 16)) | ((value as u32 & 0x07) << 16); - self.w - } -} -#[doc = "Field `rf_tbb_ind_gc3` reader - "] -pub struct RF_TBB_IND_GC3_R(crate::FieldReader); -impl RF_TBB_IND_GC3_R { - pub(crate) fn new(bits: u8) -> Self { - RF_TBB_IND_GC3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_TBB_IND_GC3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_tbb_ind_gc3` writer - "] -pub struct RF_TBB_IND_GC3_W<'a> { - w: &'a mut W, -} -impl<'a> RF_TBB_IND_GC3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 12)) | ((value as u32 & 0x07) << 12); - self.w - } -} -#[doc = "Field `rf_tbb_ind_gc2` reader - "] -pub struct RF_TBB_IND_GC2_R(crate::FieldReader); -impl RF_TBB_IND_GC2_R { - pub(crate) fn new(bits: u8) -> Self { - RF_TBB_IND_GC2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_TBB_IND_GC2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_tbb_ind_gc2` writer - "] -pub struct RF_TBB_IND_GC2_W<'a> { - w: &'a mut W, -} -impl<'a> RF_TBB_IND_GC2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 8)) | ((value as u32 & 0x07) << 8); - self.w - } -} -#[doc = "Field `rf_tbb_ind_gc1` reader - "] -pub struct RF_TBB_IND_GC1_R(crate::FieldReader); -impl RF_TBB_IND_GC1_R { - pub(crate) fn new(bits: u8) -> Self { - RF_TBB_IND_GC1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_TBB_IND_GC1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_tbb_ind_gc1` writer - "] -pub struct RF_TBB_IND_GC1_W<'a> { - w: &'a mut W, -} -impl<'a> RF_TBB_IND_GC1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 4)) | ((value as u32 & 0x07) << 4); - self.w - } -} #[doc = "Field `rf_tbb_ind_gc0` reader - "] -pub struct RF_TBB_IND_GC0_R(crate::FieldReader); -impl RF_TBB_IND_GC0_R { - pub(crate) fn new(bits: u8) -> Self { - RF_TBB_IND_GC0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_TBB_IND_GC0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RF_TBB_IND_GC0_R = crate::FieldReader; #[doc = "Field `rf_tbb_ind_gc0` writer - "] -pub struct RF_TBB_IND_GC0_W<'a> { - w: &'a mut W, -} -impl<'a> RF_TBB_IND_GC0_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type RF_TBB_IND_GC0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_16_SPEC, u8, u8, 3, O>; +#[doc = "Field `rf_tbb_ind_gc1` reader - "] +pub type RF_TBB_IND_GC1_R = crate::FieldReader; +#[doc = "Field `rf_tbb_ind_gc1` writer - "] +pub type RF_TBB_IND_GC1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_16_SPEC, u8, u8, 3, O>; +#[doc = "Field `rf_tbb_ind_gc2` reader - "] +pub type RF_TBB_IND_GC2_R = crate::FieldReader; +#[doc = "Field `rf_tbb_ind_gc2` writer - "] +pub type RF_TBB_IND_GC2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_16_SPEC, u8, u8, 3, O>; +#[doc = "Field `rf_tbb_ind_gc3` reader - "] +pub type RF_TBB_IND_GC3_R = crate::FieldReader; +#[doc = "Field `rf_tbb_ind_gc3` writer - "] +pub type RF_TBB_IND_GC3_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_16_SPEC, u8, u8, 3, O>; +#[doc = "Field `rf_tbb_ind_gc4` reader - "] +pub type RF_TBB_IND_GC4_R = crate::FieldReader; +#[doc = "Field `rf_tbb_ind_gc4` writer - "] +pub type RF_TBB_IND_GC4_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_16_SPEC, u8, u8, 3, O>; +#[doc = "Field `rf_tbb_ind_gc5` reader - "] +pub type RF_TBB_IND_GC5_R = crate::FieldReader; +#[doc = "Field `rf_tbb_ind_gc5` writer - "] +pub type RF_TBB_IND_GC5_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_16_SPEC, u8, u8, 3, O>; +#[doc = "Field `rf_tbb_ind_gc6` reader - "] +pub type RF_TBB_IND_GC6_R = crate::FieldReader; +#[doc = "Field `rf_tbb_ind_gc6` writer - "] +pub type RF_TBB_IND_GC6_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_16_SPEC, u8, u8, 3, O>; +#[doc = "Field `rf_tbb_ind_gc7` reader - "] +pub type RF_TBB_IND_GC7_R = crate::FieldReader; +#[doc = "Field `rf_tbb_ind_gc7` writer - "] +pub type RF_TBB_IND_GC7_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_16_SPEC, u8, u8, 3, O>; +impl R { + #[doc = "Bits 0:2"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x07) | (value as u32 & 0x07); - self.w + pub fn rf_tbb_ind_gc0(&self) -> RF_TBB_IND_GC0_R { + RF_TBB_IND_GC0_R::new((self.bits & 7) as u8) } -} -impl R { - #[doc = "Bits 28:30"] + #[doc = "Bits 4:6"] #[inline(always)] - pub fn rf_tbb_ind_gc7(&self) -> RF_TBB_IND_GC7_R { - RF_TBB_IND_GC7_R::new(((self.bits >> 28) & 0x07) as u8) + pub fn rf_tbb_ind_gc1(&self) -> RF_TBB_IND_GC1_R { + RF_TBB_IND_GC1_R::new(((self.bits >> 4) & 7) as u8) } - #[doc = "Bits 24:26"] + #[doc = "Bits 8:10"] #[inline(always)] - pub fn rf_tbb_ind_gc6(&self) -> RF_TBB_IND_GC6_R { - RF_TBB_IND_GC6_R::new(((self.bits >> 24) & 0x07) as u8) + pub fn rf_tbb_ind_gc2(&self) -> RF_TBB_IND_GC2_R { + RF_TBB_IND_GC2_R::new(((self.bits >> 8) & 7) as u8) } - #[doc = "Bits 20:22"] + #[doc = "Bits 12:14"] #[inline(always)] - pub fn rf_tbb_ind_gc5(&self) -> RF_TBB_IND_GC5_R { - RF_TBB_IND_GC5_R::new(((self.bits >> 20) & 0x07) as u8) + pub fn rf_tbb_ind_gc3(&self) -> RF_TBB_IND_GC3_R { + RF_TBB_IND_GC3_R::new(((self.bits >> 12) & 7) as u8) } #[doc = "Bits 16:18"] #[inline(always)] pub fn rf_tbb_ind_gc4(&self) -> RF_TBB_IND_GC4_R { - RF_TBB_IND_GC4_R::new(((self.bits >> 16) & 0x07) as u8) + RF_TBB_IND_GC4_R::new(((self.bits >> 16) & 7) as u8) } - #[doc = "Bits 12:14"] - #[inline(always)] - pub fn rf_tbb_ind_gc3(&self) -> RF_TBB_IND_GC3_R { - RF_TBB_IND_GC3_R::new(((self.bits >> 12) & 0x07) as u8) - } - #[doc = "Bits 8:10"] + #[doc = "Bits 20:22"] #[inline(always)] - pub fn rf_tbb_ind_gc2(&self) -> RF_TBB_IND_GC2_R { - RF_TBB_IND_GC2_R::new(((self.bits >> 8) & 0x07) as u8) + pub fn rf_tbb_ind_gc5(&self) -> RF_TBB_IND_GC5_R { + RF_TBB_IND_GC5_R::new(((self.bits >> 20) & 7) as u8) } - #[doc = "Bits 4:6"] + #[doc = "Bits 24:26"] #[inline(always)] - pub fn rf_tbb_ind_gc1(&self) -> RF_TBB_IND_GC1_R { - RF_TBB_IND_GC1_R::new(((self.bits >> 4) & 0x07) as u8) + pub fn rf_tbb_ind_gc6(&self) -> RF_TBB_IND_GC6_R { + RF_TBB_IND_GC6_R::new(((self.bits >> 24) & 7) as u8) } - #[doc = "Bits 0:2"] + #[doc = "Bits 28:30"] #[inline(always)] - pub fn rf_tbb_ind_gc0(&self) -> RF_TBB_IND_GC0_R { - RF_TBB_IND_GC0_R::new((self.bits & 0x07) as u8) + pub fn rf_tbb_ind_gc7(&self) -> RF_TBB_IND_GC7_R { + RF_TBB_IND_GC7_R::new(((self.bits >> 28) & 7) as u8) } } impl W { - #[doc = "Bits 28:30"] + #[doc = "Bits 0:2"] #[inline(always)] - pub fn rf_tbb_ind_gc7(&mut self) -> RF_TBB_IND_GC7_W { - RF_TBB_IND_GC7_W { w: self } + #[must_use] + pub fn rf_tbb_ind_gc0(&mut self) -> RF_TBB_IND_GC0_W<0> { + RF_TBB_IND_GC0_W::new(self) } - #[doc = "Bits 24:26"] + #[doc = "Bits 4:6"] #[inline(always)] - pub fn rf_tbb_ind_gc6(&mut self) -> RF_TBB_IND_GC6_W { - RF_TBB_IND_GC6_W { w: self } + #[must_use] + pub fn rf_tbb_ind_gc1(&mut self) -> RF_TBB_IND_GC1_W<4> { + RF_TBB_IND_GC1_W::new(self) } - #[doc = "Bits 20:22"] + #[doc = "Bits 8:10"] #[inline(always)] - pub fn rf_tbb_ind_gc5(&mut self) -> RF_TBB_IND_GC5_W { - RF_TBB_IND_GC5_W { w: self } + #[must_use] + pub fn rf_tbb_ind_gc2(&mut self) -> RF_TBB_IND_GC2_W<8> { + RF_TBB_IND_GC2_W::new(self) } - #[doc = "Bits 16:18"] + #[doc = "Bits 12:14"] #[inline(always)] - pub fn rf_tbb_ind_gc4(&mut self) -> RF_TBB_IND_GC4_W { - RF_TBB_IND_GC4_W { w: self } + #[must_use] + pub fn rf_tbb_ind_gc3(&mut self) -> RF_TBB_IND_GC3_W<12> { + RF_TBB_IND_GC3_W::new(self) } - #[doc = "Bits 12:14"] + #[doc = "Bits 16:18"] #[inline(always)] - pub fn rf_tbb_ind_gc3(&mut self) -> RF_TBB_IND_GC3_W { - RF_TBB_IND_GC3_W { w: self } + #[must_use] + pub fn rf_tbb_ind_gc4(&mut self) -> RF_TBB_IND_GC4_W<16> { + RF_TBB_IND_GC4_W::new(self) } - #[doc = "Bits 8:10"] + #[doc = "Bits 20:22"] #[inline(always)] - pub fn rf_tbb_ind_gc2(&mut self) -> RF_TBB_IND_GC2_W { - RF_TBB_IND_GC2_W { w: self } + #[must_use] + pub fn rf_tbb_ind_gc5(&mut self) -> RF_TBB_IND_GC5_W<20> { + RF_TBB_IND_GC5_W::new(self) } - #[doc = "Bits 4:6"] + #[doc = "Bits 24:26"] #[inline(always)] - pub fn rf_tbb_ind_gc1(&mut self) -> RF_TBB_IND_GC1_W { - RF_TBB_IND_GC1_W { w: self } + #[must_use] + pub fn rf_tbb_ind_gc6(&mut self) -> RF_TBB_IND_GC6_W<24> { + RF_TBB_IND_GC6_W::new(self) } - #[doc = "Bits 0:2"] + #[doc = "Bits 28:30"] #[inline(always)] - pub fn rf_tbb_ind_gc0(&mut self) -> RF_TBB_IND_GC0_W { - RF_TBB_IND_GC0_W { w: self } + #[must_use] + pub fn rf_tbb_ind_gc7(&mut self) -> RF_TBB_IND_GC7_W<28> { + RF_TBB_IND_GC7_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -341,11 +184,10 @@ impl crate::Readable for DFE_CTRL_16_SPEC { #[doc = "`write(|w| ..)` method takes [dfe_ctrl_16::W](W) writer structure"] impl crate::Writable for DFE_CTRL_16_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets dfe_ctrl_16 to value 0"] impl crate::Resettable for DFE_CTRL_16_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/dfe_ctrl_17.rs b/src/rf/dfe_ctrl_17.rs index a3ed52f..c1a1388 100644 --- a/src/rf/dfe_ctrl_17.rs +++ b/src/rf/dfe_ctrl_17.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,303 +28,145 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rf_tbb_ind_gc15` reader - "] -pub struct RF_TBB_IND_GC15_R(crate::FieldReader); -impl RF_TBB_IND_GC15_R { - pub(crate) fn new(bits: u8) -> Self { - RF_TBB_IND_GC15_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_TBB_IND_GC15_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_tbb_ind_gc15` writer - "] -pub struct RF_TBB_IND_GC15_W<'a> { - w: &'a mut W, -} -impl<'a> RF_TBB_IND_GC15_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 28)) | ((value as u32 & 0x07) << 28); - self.w - } -} -#[doc = "Field `rf_tbb_ind_gc14` reader - "] -pub struct RF_TBB_IND_GC14_R(crate::FieldReader); -impl RF_TBB_IND_GC14_R { - pub(crate) fn new(bits: u8) -> Self { - RF_TBB_IND_GC14_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_TBB_IND_GC14_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_tbb_ind_gc14` writer - "] -pub struct RF_TBB_IND_GC14_W<'a> { - w: &'a mut W, -} -impl<'a> RF_TBB_IND_GC14_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 24)) | ((value as u32 & 0x07) << 24); - self.w - } -} -#[doc = "Field `rf_tbb_ind_gc13` reader - "] -pub struct RF_TBB_IND_GC13_R(crate::FieldReader); -impl RF_TBB_IND_GC13_R { - pub(crate) fn new(bits: u8) -> Self { - RF_TBB_IND_GC13_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_TBB_IND_GC13_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_tbb_ind_gc13` writer - "] -pub struct RF_TBB_IND_GC13_W<'a> { - w: &'a mut W, -} -impl<'a> RF_TBB_IND_GC13_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 20)) | ((value as u32 & 0x07) << 20); - self.w - } -} -#[doc = "Field `rf_tbb_ind_gc12` reader - "] -pub struct RF_TBB_IND_GC12_R(crate::FieldReader); -impl RF_TBB_IND_GC12_R { - pub(crate) fn new(bits: u8) -> Self { - RF_TBB_IND_GC12_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_TBB_IND_GC12_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_tbb_ind_gc12` writer - "] -pub struct RF_TBB_IND_GC12_W<'a> { - w: &'a mut W, -} -impl<'a> RF_TBB_IND_GC12_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 16)) | ((value as u32 & 0x07) << 16); - self.w - } -} -#[doc = "Field `rf_tbb_ind_gc11` reader - "] -pub struct RF_TBB_IND_GC11_R(crate::FieldReader); -impl RF_TBB_IND_GC11_R { - pub(crate) fn new(bits: u8) -> Self { - RF_TBB_IND_GC11_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_TBB_IND_GC11_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_tbb_ind_gc11` writer - "] -pub struct RF_TBB_IND_GC11_W<'a> { - w: &'a mut W, -} -impl<'a> RF_TBB_IND_GC11_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 12)) | ((value as u32 & 0x07) << 12); - self.w - } -} -#[doc = "Field `rf_tbb_ind_gc10` reader - "] -pub struct RF_TBB_IND_GC10_R(crate::FieldReader); -impl RF_TBB_IND_GC10_R { - pub(crate) fn new(bits: u8) -> Self { - RF_TBB_IND_GC10_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_TBB_IND_GC10_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_tbb_ind_gc10` writer - "] -pub struct RF_TBB_IND_GC10_W<'a> { - w: &'a mut W, -} -impl<'a> RF_TBB_IND_GC10_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 8)) | ((value as u32 & 0x07) << 8); - self.w - } -} -#[doc = "Field `rf_tbb_ind_gc9` reader - "] -pub struct RF_TBB_IND_GC9_R(crate::FieldReader); -impl RF_TBB_IND_GC9_R { - pub(crate) fn new(bits: u8) -> Self { - RF_TBB_IND_GC9_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_TBB_IND_GC9_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_tbb_ind_gc9` writer - "] -pub struct RF_TBB_IND_GC9_W<'a> { - w: &'a mut W, -} -impl<'a> RF_TBB_IND_GC9_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 4)) | ((value as u32 & 0x07) << 4); - self.w - } -} #[doc = "Field `rf_tbb_ind_gc8` reader - "] -pub struct RF_TBB_IND_GC8_R(crate::FieldReader); -impl RF_TBB_IND_GC8_R { - pub(crate) fn new(bits: u8) -> Self { - RF_TBB_IND_GC8_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_TBB_IND_GC8_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RF_TBB_IND_GC8_R = crate::FieldReader; #[doc = "Field `rf_tbb_ind_gc8` writer - "] -pub struct RF_TBB_IND_GC8_W<'a> { - w: &'a mut W, -} -impl<'a> RF_TBB_IND_GC8_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type RF_TBB_IND_GC8_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_17_SPEC, u8, u8, 3, O>; +#[doc = "Field `rf_tbb_ind_gc9` reader - "] +pub type RF_TBB_IND_GC9_R = crate::FieldReader; +#[doc = "Field `rf_tbb_ind_gc9` writer - "] +pub type RF_TBB_IND_GC9_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_17_SPEC, u8, u8, 3, O>; +#[doc = "Field `rf_tbb_ind_gc10` reader - "] +pub type RF_TBB_IND_GC10_R = crate::FieldReader; +#[doc = "Field `rf_tbb_ind_gc10` writer - "] +pub type RF_TBB_IND_GC10_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_17_SPEC, u8, u8, 3, O>; +#[doc = "Field `rf_tbb_ind_gc11` reader - "] +pub type RF_TBB_IND_GC11_R = crate::FieldReader; +#[doc = "Field `rf_tbb_ind_gc11` writer - "] +pub type RF_TBB_IND_GC11_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_17_SPEC, u8, u8, 3, O>; +#[doc = "Field `rf_tbb_ind_gc12` reader - "] +pub type RF_TBB_IND_GC12_R = crate::FieldReader; +#[doc = "Field `rf_tbb_ind_gc12` writer - "] +pub type RF_TBB_IND_GC12_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_17_SPEC, u8, u8, 3, O>; +#[doc = "Field `rf_tbb_ind_gc13` reader - "] +pub type RF_TBB_IND_GC13_R = crate::FieldReader; +#[doc = "Field `rf_tbb_ind_gc13` writer - "] +pub type RF_TBB_IND_GC13_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_17_SPEC, u8, u8, 3, O>; +#[doc = "Field `rf_tbb_ind_gc14` reader - "] +pub type RF_TBB_IND_GC14_R = crate::FieldReader; +#[doc = "Field `rf_tbb_ind_gc14` writer - "] +pub type RF_TBB_IND_GC14_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_17_SPEC, u8, u8, 3, O>; +#[doc = "Field `rf_tbb_ind_gc15` reader - "] +pub type RF_TBB_IND_GC15_R = crate::FieldReader; +#[doc = "Field `rf_tbb_ind_gc15` writer - "] +pub type RF_TBB_IND_GC15_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_17_SPEC, u8, u8, 3, O>; +impl R { + #[doc = "Bits 0:2"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x07) | (value as u32 & 0x07); - self.w + pub fn rf_tbb_ind_gc8(&self) -> RF_TBB_IND_GC8_R { + RF_TBB_IND_GC8_R::new((self.bits & 7) as u8) } -} -impl R { - #[doc = "Bits 28:30"] + #[doc = "Bits 4:6"] #[inline(always)] - pub fn rf_tbb_ind_gc15(&self) -> RF_TBB_IND_GC15_R { - RF_TBB_IND_GC15_R::new(((self.bits >> 28) & 0x07) as u8) + pub fn rf_tbb_ind_gc9(&self) -> RF_TBB_IND_GC9_R { + RF_TBB_IND_GC9_R::new(((self.bits >> 4) & 7) as u8) } - #[doc = "Bits 24:26"] + #[doc = "Bits 8:10"] #[inline(always)] - pub fn rf_tbb_ind_gc14(&self) -> RF_TBB_IND_GC14_R { - RF_TBB_IND_GC14_R::new(((self.bits >> 24) & 0x07) as u8) + pub fn rf_tbb_ind_gc10(&self) -> RF_TBB_IND_GC10_R { + RF_TBB_IND_GC10_R::new(((self.bits >> 8) & 7) as u8) } - #[doc = "Bits 20:22"] + #[doc = "Bits 12:14"] #[inline(always)] - pub fn rf_tbb_ind_gc13(&self) -> RF_TBB_IND_GC13_R { - RF_TBB_IND_GC13_R::new(((self.bits >> 20) & 0x07) as u8) + pub fn rf_tbb_ind_gc11(&self) -> RF_TBB_IND_GC11_R { + RF_TBB_IND_GC11_R::new(((self.bits >> 12) & 7) as u8) } #[doc = "Bits 16:18"] #[inline(always)] pub fn rf_tbb_ind_gc12(&self) -> RF_TBB_IND_GC12_R { - RF_TBB_IND_GC12_R::new(((self.bits >> 16) & 0x07) as u8) + RF_TBB_IND_GC12_R::new(((self.bits >> 16) & 7) as u8) } - #[doc = "Bits 12:14"] - #[inline(always)] - pub fn rf_tbb_ind_gc11(&self) -> RF_TBB_IND_GC11_R { - RF_TBB_IND_GC11_R::new(((self.bits >> 12) & 0x07) as u8) - } - #[doc = "Bits 8:10"] + #[doc = "Bits 20:22"] #[inline(always)] - pub fn rf_tbb_ind_gc10(&self) -> RF_TBB_IND_GC10_R { - RF_TBB_IND_GC10_R::new(((self.bits >> 8) & 0x07) as u8) + pub fn rf_tbb_ind_gc13(&self) -> RF_TBB_IND_GC13_R { + RF_TBB_IND_GC13_R::new(((self.bits >> 20) & 7) as u8) } - #[doc = "Bits 4:6"] + #[doc = "Bits 24:26"] #[inline(always)] - pub fn rf_tbb_ind_gc9(&self) -> RF_TBB_IND_GC9_R { - RF_TBB_IND_GC9_R::new(((self.bits >> 4) & 0x07) as u8) + pub fn rf_tbb_ind_gc14(&self) -> RF_TBB_IND_GC14_R { + RF_TBB_IND_GC14_R::new(((self.bits >> 24) & 7) as u8) } - #[doc = "Bits 0:2"] + #[doc = "Bits 28:30"] #[inline(always)] - pub fn rf_tbb_ind_gc8(&self) -> RF_TBB_IND_GC8_R { - RF_TBB_IND_GC8_R::new((self.bits & 0x07) as u8) + pub fn rf_tbb_ind_gc15(&self) -> RF_TBB_IND_GC15_R { + RF_TBB_IND_GC15_R::new(((self.bits >> 28) & 7) as u8) } } impl W { - #[doc = "Bits 28:30"] + #[doc = "Bits 0:2"] #[inline(always)] - pub fn rf_tbb_ind_gc15(&mut self) -> RF_TBB_IND_GC15_W { - RF_TBB_IND_GC15_W { w: self } + #[must_use] + pub fn rf_tbb_ind_gc8(&mut self) -> RF_TBB_IND_GC8_W<0> { + RF_TBB_IND_GC8_W::new(self) } - #[doc = "Bits 24:26"] + #[doc = "Bits 4:6"] #[inline(always)] - pub fn rf_tbb_ind_gc14(&mut self) -> RF_TBB_IND_GC14_W { - RF_TBB_IND_GC14_W { w: self } + #[must_use] + pub fn rf_tbb_ind_gc9(&mut self) -> RF_TBB_IND_GC9_W<4> { + RF_TBB_IND_GC9_W::new(self) } - #[doc = "Bits 20:22"] + #[doc = "Bits 8:10"] #[inline(always)] - pub fn rf_tbb_ind_gc13(&mut self) -> RF_TBB_IND_GC13_W { - RF_TBB_IND_GC13_W { w: self } + #[must_use] + pub fn rf_tbb_ind_gc10(&mut self) -> RF_TBB_IND_GC10_W<8> { + RF_TBB_IND_GC10_W::new(self) } - #[doc = "Bits 16:18"] + #[doc = "Bits 12:14"] #[inline(always)] - pub fn rf_tbb_ind_gc12(&mut self) -> RF_TBB_IND_GC12_W { - RF_TBB_IND_GC12_W { w: self } + #[must_use] + pub fn rf_tbb_ind_gc11(&mut self) -> RF_TBB_IND_GC11_W<12> { + RF_TBB_IND_GC11_W::new(self) } - #[doc = "Bits 12:14"] + #[doc = "Bits 16:18"] #[inline(always)] - pub fn rf_tbb_ind_gc11(&mut self) -> RF_TBB_IND_GC11_W { - RF_TBB_IND_GC11_W { w: self } + #[must_use] + pub fn rf_tbb_ind_gc12(&mut self) -> RF_TBB_IND_GC12_W<16> { + RF_TBB_IND_GC12_W::new(self) } - #[doc = "Bits 8:10"] + #[doc = "Bits 20:22"] #[inline(always)] - pub fn rf_tbb_ind_gc10(&mut self) -> RF_TBB_IND_GC10_W { - RF_TBB_IND_GC10_W { w: self } + #[must_use] + pub fn rf_tbb_ind_gc13(&mut self) -> RF_TBB_IND_GC13_W<20> { + RF_TBB_IND_GC13_W::new(self) } - #[doc = "Bits 4:6"] + #[doc = "Bits 24:26"] #[inline(always)] - pub fn rf_tbb_ind_gc9(&mut self) -> RF_TBB_IND_GC9_W { - RF_TBB_IND_GC9_W { w: self } + #[must_use] + pub fn rf_tbb_ind_gc14(&mut self) -> RF_TBB_IND_GC14_W<24> { + RF_TBB_IND_GC14_W::new(self) } - #[doc = "Bits 0:2"] + #[doc = "Bits 28:30"] #[inline(always)] - pub fn rf_tbb_ind_gc8(&mut self) -> RF_TBB_IND_GC8_W { - RF_TBB_IND_GC8_W { w: self } + #[must_use] + pub fn rf_tbb_ind_gc15(&mut self) -> RF_TBB_IND_GC15_W<28> { + RF_TBB_IND_GC15_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -341,11 +184,10 @@ impl crate::Readable for DFE_CTRL_17_SPEC { #[doc = "`write(|w| ..)` method takes [dfe_ctrl_17::W](W) writer structure"] impl crate::Writable for DFE_CTRL_17_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets dfe_ctrl_17 to value 0"] impl crate::Resettable for DFE_CTRL_17_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/dfe_ctrl_18.rs b/src/rf/dfe_ctrl_18.rs index 580921e..d766278 100644 --- a/src/rf/dfe_ctrl_18.rs +++ b/src/rf/dfe_ctrl_18.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,123 +28,65 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `tx_dvga_gain_qdb_ble_gc2` reader - "] -pub struct TX_DVGA_GAIN_QDB_BLE_GC2_R(crate::FieldReader); -impl TX_DVGA_GAIN_QDB_BLE_GC2_R { - pub(crate) fn new(bits: u8) -> Self { - TX_DVGA_GAIN_QDB_BLE_GC2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_DVGA_GAIN_QDB_BLE_GC2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_dvga_gain_qdb_ble_gc2` writer - "] -pub struct TX_DVGA_GAIN_QDB_BLE_GC2_W<'a> { - w: &'a mut W, -} -impl<'a> TX_DVGA_GAIN_QDB_BLE_GC2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x7f << 16)) | ((value as u32 & 0x7f) << 16); - self.w - } -} -#[doc = "Field `tx_dvga_gain_qdb_ble_gc1` reader - "] -pub struct TX_DVGA_GAIN_QDB_BLE_GC1_R(crate::FieldReader); -impl TX_DVGA_GAIN_QDB_BLE_GC1_R { - pub(crate) fn new(bits: u8) -> Self { - TX_DVGA_GAIN_QDB_BLE_GC1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_DVGA_GAIN_QDB_BLE_GC1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_dvga_gain_qdb_ble_gc1` writer - "] -pub struct TX_DVGA_GAIN_QDB_BLE_GC1_W<'a> { - w: &'a mut W, -} -impl<'a> TX_DVGA_GAIN_QDB_BLE_GC1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x7f << 8)) | ((value as u32 & 0x7f) << 8); - self.w - } -} #[doc = "Field `tx_dvga_gain_qdb_ble_gc0` reader - "] -pub struct TX_DVGA_GAIN_QDB_BLE_GC0_R(crate::FieldReader); -impl TX_DVGA_GAIN_QDB_BLE_GC0_R { - pub(crate) fn new(bits: u8) -> Self { - TX_DVGA_GAIN_QDB_BLE_GC0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_DVGA_GAIN_QDB_BLE_GC0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TX_DVGA_GAIN_QDB_BLE_GC0_R = crate::FieldReader; #[doc = "Field `tx_dvga_gain_qdb_ble_gc0` writer - "] -pub struct TX_DVGA_GAIN_QDB_BLE_GC0_W<'a> { - w: &'a mut W, -} -impl<'a> TX_DVGA_GAIN_QDB_BLE_GC0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x7f) | (value as u32 & 0x7f); - self.w - } -} +pub type TX_DVGA_GAIN_QDB_BLE_GC0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_18_SPEC, u8, u8, 7, O>; +#[doc = "Field `tx_dvga_gain_qdb_ble_gc1` reader - "] +pub type TX_DVGA_GAIN_QDB_BLE_GC1_R = crate::FieldReader; +#[doc = "Field `tx_dvga_gain_qdb_ble_gc1` writer - "] +pub type TX_DVGA_GAIN_QDB_BLE_GC1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_18_SPEC, u8, u8, 7, O>; +#[doc = "Field `tx_dvga_gain_qdb_ble_gc2` reader - "] +pub type TX_DVGA_GAIN_QDB_BLE_GC2_R = crate::FieldReader; +#[doc = "Field `tx_dvga_gain_qdb_ble_gc2` writer - "] +pub type TX_DVGA_GAIN_QDB_BLE_GC2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_18_SPEC, u8, u8, 7, O>; impl R { - #[doc = "Bits 16:22"] + #[doc = "Bits 0:6"] #[inline(always)] - pub fn tx_dvga_gain_qdb_ble_gc2(&self) -> TX_DVGA_GAIN_QDB_BLE_GC2_R { - TX_DVGA_GAIN_QDB_BLE_GC2_R::new(((self.bits >> 16) & 0x7f) as u8) + pub fn tx_dvga_gain_qdb_ble_gc0(&self) -> TX_DVGA_GAIN_QDB_BLE_GC0_R { + TX_DVGA_GAIN_QDB_BLE_GC0_R::new((self.bits & 0x7f) as u8) } #[doc = "Bits 8:14"] #[inline(always)] pub fn tx_dvga_gain_qdb_ble_gc1(&self) -> TX_DVGA_GAIN_QDB_BLE_GC1_R { TX_DVGA_GAIN_QDB_BLE_GC1_R::new(((self.bits >> 8) & 0x7f) as u8) } - #[doc = "Bits 0:6"] + #[doc = "Bits 16:22"] #[inline(always)] - pub fn tx_dvga_gain_qdb_ble_gc0(&self) -> TX_DVGA_GAIN_QDB_BLE_GC0_R { - TX_DVGA_GAIN_QDB_BLE_GC0_R::new((self.bits & 0x7f) as u8) + pub fn tx_dvga_gain_qdb_ble_gc2(&self) -> TX_DVGA_GAIN_QDB_BLE_GC2_R { + TX_DVGA_GAIN_QDB_BLE_GC2_R::new(((self.bits >> 16) & 0x7f) as u8) } } impl W { - #[doc = "Bits 16:22"] + #[doc = "Bits 0:6"] #[inline(always)] - pub fn tx_dvga_gain_qdb_ble_gc2(&mut self) -> TX_DVGA_GAIN_QDB_BLE_GC2_W { - TX_DVGA_GAIN_QDB_BLE_GC2_W { w: self } + #[must_use] + pub fn tx_dvga_gain_qdb_ble_gc0(&mut self) -> TX_DVGA_GAIN_QDB_BLE_GC0_W<0> { + TX_DVGA_GAIN_QDB_BLE_GC0_W::new(self) } #[doc = "Bits 8:14"] #[inline(always)] - pub fn tx_dvga_gain_qdb_ble_gc1(&mut self) -> TX_DVGA_GAIN_QDB_BLE_GC1_W { - TX_DVGA_GAIN_QDB_BLE_GC1_W { w: self } + #[must_use] + pub fn tx_dvga_gain_qdb_ble_gc1(&mut self) -> TX_DVGA_GAIN_QDB_BLE_GC1_W<8> { + TX_DVGA_GAIN_QDB_BLE_GC1_W::new(self) } - #[doc = "Bits 0:6"] + #[doc = "Bits 16:22"] #[inline(always)] - pub fn tx_dvga_gain_qdb_ble_gc0(&mut self) -> TX_DVGA_GAIN_QDB_BLE_GC0_W { - TX_DVGA_GAIN_QDB_BLE_GC0_W { w: self } + #[must_use] + pub fn tx_dvga_gain_qdb_ble_gc2(&mut self) -> TX_DVGA_GAIN_QDB_BLE_GC2_W<16> { + TX_DVGA_GAIN_QDB_BLE_GC2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -161,11 +104,10 @@ impl crate::Readable for DFE_CTRL_18_SPEC { #[doc = "`write(|w| ..)` method takes [dfe_ctrl_18::W](W) writer structure"] impl crate::Writable for DFE_CTRL_18_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets dfe_ctrl_18 to value 0"] impl crate::Resettable for DFE_CTRL_18_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/dfe_ctrl_2.rs b/src/rf/dfe_ctrl_2.rs index 6ce1532..49fccc5 100644 --- a/src/rf/dfe_ctrl_2.rs +++ b/src/rf/dfe_ctrl_2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,271 +28,109 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rx_adc_iq_swap` reader - "] -pub struct RX_ADC_IQ_SWAP_R(crate::FieldReader); -impl RX_ADC_IQ_SWAP_R { - pub(crate) fn new(bits: bool) -> Self { - RX_ADC_IQ_SWAP_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_ADC_IQ_SWAP_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_adc_iq_swap` writer - "] -pub struct RX_ADC_IQ_SWAP_W<'a> { - w: &'a mut W, -} -impl<'a> RX_ADC_IQ_SWAP_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 31)) | ((value as u32 & 0x01) << 31); - self.w - } -} -#[doc = "Field `rx_adc_dat_format` reader - "] -pub struct RX_ADC_DAT_FORMAT_R(crate::FieldReader); -impl RX_ADC_DAT_FORMAT_R { - pub(crate) fn new(bits: bool) -> Self { - RX_ADC_DAT_FORMAT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_ADC_DAT_FORMAT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_adc_dat_format` writer - "] -pub struct RX_ADC_DAT_FORMAT_W<'a> { - w: &'a mut W, -} -impl<'a> RX_ADC_DAT_FORMAT_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 30)) | ((value as u32 & 0x01) << 30); - self.w - } -} -#[doc = "Field `rx_adc_low_pow_en` reader - "] -pub struct RX_ADC_LOW_POW_EN_R(crate::FieldReader); -impl RX_ADC_LOW_POW_EN_R { - pub(crate) fn new(bits: bool) -> Self { - RX_ADC_LOW_POW_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_ADC_LOW_POW_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_adc_low_pow_en` writer - "] -pub struct RX_ADC_LOW_POW_EN_W<'a> { - w: &'a mut W, -} -impl<'a> RX_ADC_LOW_POW_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 29)) | ((value as u32 & 0x01) << 29); - self.w - } -} -#[doc = "Field `rx_adc_dce_flt_en` reader - "] -pub struct RX_ADC_DCE_FLT_EN_R(crate::FieldReader); -impl RX_ADC_DCE_FLT_EN_R { - pub(crate) fn new(bits: bool) -> Self { - RX_ADC_DCE_FLT_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_ADC_DCE_FLT_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_adc_dce_flt_en` writer - "] -pub struct RX_ADC_DCE_FLT_EN_W<'a> { - w: &'a mut W, -} -impl<'a> RX_ADC_DCE_FLT_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 28)) | ((value as u32 & 0x01) << 28); - self.w - } -} -#[doc = "Field `rx_adc_os_q` reader - "] -pub struct RX_ADC_OS_Q_R(crate::FieldReader); -impl RX_ADC_OS_Q_R { - pub(crate) fn new(bits: u16) -> Self { - RX_ADC_OS_Q_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_ADC_OS_Q_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_adc_os_q` writer - "] -pub struct RX_ADC_OS_Q_W<'a> { - w: &'a mut W, -} -impl<'a> RX_ADC_OS_Q_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03ff << 16)) | ((value as u32 & 0x03ff) << 16); - self.w - } -} #[doc = "Field `rx_adc_os_i` reader - "] -pub struct RX_ADC_OS_I_R(crate::FieldReader); -impl RX_ADC_OS_I_R { - pub(crate) fn new(bits: u16) -> Self { - RX_ADC_OS_I_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_ADC_OS_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RX_ADC_OS_I_R = crate::FieldReader; #[doc = "Field `rx_adc_os_i` writer - "] -pub struct RX_ADC_OS_I_W<'a> { - w: &'a mut W, -} -impl<'a> RX_ADC_OS_I_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type RX_ADC_OS_I_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_2_SPEC, u16, u16, 10, O>; +#[doc = "Field `rx_adc_os_q` reader - "] +pub type RX_ADC_OS_Q_R = crate::FieldReader; +#[doc = "Field `rx_adc_os_q` writer - "] +pub type RX_ADC_OS_Q_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_2_SPEC, u16, u16, 10, O>; +#[doc = "Field `rx_adc_dce_flt_en` reader - "] +pub type RX_ADC_DCE_FLT_EN_R = crate::BitReader; +#[doc = "Field `rx_adc_dce_flt_en` writer - "] +pub type RX_ADC_DCE_FLT_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, DFE_CTRL_2_SPEC, bool, O>; +#[doc = "Field `rx_adc_low_pow_en` reader - "] +pub type RX_ADC_LOW_POW_EN_R = crate::BitReader; +#[doc = "Field `rx_adc_low_pow_en` writer - "] +pub type RX_ADC_LOW_POW_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, DFE_CTRL_2_SPEC, bool, O>; +#[doc = "Field `rx_adc_dat_format` reader - "] +pub type RX_ADC_DAT_FORMAT_R = crate::BitReader; +#[doc = "Field `rx_adc_dat_format` writer - "] +pub type RX_ADC_DAT_FORMAT_W<'a, const O: u8> = crate::BitWriter<'a, u32, DFE_CTRL_2_SPEC, bool, O>; +#[doc = "Field `rx_adc_iq_swap` reader - "] +pub type RX_ADC_IQ_SWAP_R = crate::BitReader; +#[doc = "Field `rx_adc_iq_swap` writer - "] +pub type RX_ADC_IQ_SWAP_W<'a, const O: u8> = crate::BitWriter<'a, u32, DFE_CTRL_2_SPEC, bool, O>; +impl R { + #[doc = "Bits 0:9"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03ff) | (value as u32 & 0x03ff); - self.w + pub fn rx_adc_os_i(&self) -> RX_ADC_OS_I_R { + RX_ADC_OS_I_R::new((self.bits & 0x03ff) as u16) } -} -impl R { - #[doc = "Bit 31"] + #[doc = "Bits 16:25"] #[inline(always)] - pub fn rx_adc_iq_swap(&self) -> RX_ADC_IQ_SWAP_R { - RX_ADC_IQ_SWAP_R::new(((self.bits >> 31) & 0x01) != 0) + pub fn rx_adc_os_q(&self) -> RX_ADC_OS_Q_R { + RX_ADC_OS_Q_R::new(((self.bits >> 16) & 0x03ff) as u16) } - #[doc = "Bit 30"] + #[doc = "Bit 28"] #[inline(always)] - pub fn rx_adc_dat_format(&self) -> RX_ADC_DAT_FORMAT_R { - RX_ADC_DAT_FORMAT_R::new(((self.bits >> 30) & 0x01) != 0) + pub fn rx_adc_dce_flt_en(&self) -> RX_ADC_DCE_FLT_EN_R { + RX_ADC_DCE_FLT_EN_R::new(((self.bits >> 28) & 1) != 0) } #[doc = "Bit 29"] #[inline(always)] pub fn rx_adc_low_pow_en(&self) -> RX_ADC_LOW_POW_EN_R { - RX_ADC_LOW_POW_EN_R::new(((self.bits >> 29) & 0x01) != 0) - } - #[doc = "Bit 28"] - #[inline(always)] - pub fn rx_adc_dce_flt_en(&self) -> RX_ADC_DCE_FLT_EN_R { - RX_ADC_DCE_FLT_EN_R::new(((self.bits >> 28) & 0x01) != 0) + RX_ADC_LOW_POW_EN_R::new(((self.bits >> 29) & 1) != 0) } - #[doc = "Bits 16:25"] + #[doc = "Bit 30"] #[inline(always)] - pub fn rx_adc_os_q(&self) -> RX_ADC_OS_Q_R { - RX_ADC_OS_Q_R::new(((self.bits >> 16) & 0x03ff) as u16) + pub fn rx_adc_dat_format(&self) -> RX_ADC_DAT_FORMAT_R { + RX_ADC_DAT_FORMAT_R::new(((self.bits >> 30) & 1) != 0) } - #[doc = "Bits 0:9"] + #[doc = "Bit 31"] #[inline(always)] - pub fn rx_adc_os_i(&self) -> RX_ADC_OS_I_R { - RX_ADC_OS_I_R::new((self.bits & 0x03ff) as u16) + pub fn rx_adc_iq_swap(&self) -> RX_ADC_IQ_SWAP_R { + RX_ADC_IQ_SWAP_R::new(((self.bits >> 31) & 1) != 0) } } impl W { - #[doc = "Bit 31"] + #[doc = "Bits 0:9"] #[inline(always)] - pub fn rx_adc_iq_swap(&mut self) -> RX_ADC_IQ_SWAP_W { - RX_ADC_IQ_SWAP_W { w: self } + #[must_use] + pub fn rx_adc_os_i(&mut self) -> RX_ADC_OS_I_W<0> { + RX_ADC_OS_I_W::new(self) } - #[doc = "Bit 30"] + #[doc = "Bits 16:25"] #[inline(always)] - pub fn rx_adc_dat_format(&mut self) -> RX_ADC_DAT_FORMAT_W { - RX_ADC_DAT_FORMAT_W { w: self } + #[must_use] + pub fn rx_adc_os_q(&mut self) -> RX_ADC_OS_Q_W<16> { + RX_ADC_OS_Q_W::new(self) } - #[doc = "Bit 29"] + #[doc = "Bit 28"] #[inline(always)] - pub fn rx_adc_low_pow_en(&mut self) -> RX_ADC_LOW_POW_EN_W { - RX_ADC_LOW_POW_EN_W { w: self } + #[must_use] + pub fn rx_adc_dce_flt_en(&mut self) -> RX_ADC_DCE_FLT_EN_W<28> { + RX_ADC_DCE_FLT_EN_W::new(self) } - #[doc = "Bit 28"] + #[doc = "Bit 29"] #[inline(always)] - pub fn rx_adc_dce_flt_en(&mut self) -> RX_ADC_DCE_FLT_EN_W { - RX_ADC_DCE_FLT_EN_W { w: self } + #[must_use] + pub fn rx_adc_low_pow_en(&mut self) -> RX_ADC_LOW_POW_EN_W<29> { + RX_ADC_LOW_POW_EN_W::new(self) } - #[doc = "Bits 16:25"] + #[doc = "Bit 30"] #[inline(always)] - pub fn rx_adc_os_q(&mut self) -> RX_ADC_OS_Q_W { - RX_ADC_OS_Q_W { w: self } + #[must_use] + pub fn rx_adc_dat_format(&mut self) -> RX_ADC_DAT_FORMAT_W<30> { + RX_ADC_DAT_FORMAT_W::new(self) } - #[doc = "Bits 0:9"] + #[doc = "Bit 31"] #[inline(always)] - pub fn rx_adc_os_i(&mut self) -> RX_ADC_OS_I_W { - RX_ADC_OS_I_W { w: self } + #[must_use] + pub fn rx_adc_iq_swap(&mut self) -> RX_ADC_IQ_SWAP_W<31> { + RX_ADC_IQ_SWAP_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -309,11 +148,10 @@ impl crate::Readable for DFE_CTRL_2_SPEC { #[doc = "`write(|w| ..)` method takes [dfe_ctrl_2::W](W) writer structure"] impl crate::Writable for DFE_CTRL_2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets dfe_ctrl_2 to value 0"] impl crate::Resettable for DFE_CTRL_2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/dfe_ctrl_3.rs b/src/rf/dfe_ctrl_3.rs index 7905b86..956bd19 100644 --- a/src/rf/dfe_ctrl_3.rs +++ b/src/rf/dfe_ctrl_3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,179 +28,79 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rx_adc_4s_q_en` reader - "] -pub struct RX_ADC_4S_Q_EN_R(crate::FieldReader); -impl RX_ADC_4S_Q_EN_R { - pub(crate) fn new(bits: bool) -> Self { - RX_ADC_4S_Q_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_ADC_4S_Q_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_adc_4s_q_en` writer - "] -pub struct RX_ADC_4S_Q_EN_W<'a> { - w: &'a mut W, -} -impl<'a> RX_ADC_4S_Q_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 26)) | ((value as u32 & 0x01) << 26); - self.w - } -} -#[doc = "Field `rx_adc_4s_q_val` reader - "] -pub struct RX_ADC_4S_Q_VAL_R(crate::FieldReader); -impl RX_ADC_4S_Q_VAL_R { - pub(crate) fn new(bits: u16) -> Self { - RX_ADC_4S_Q_VAL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_ADC_4S_Q_VAL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_adc_4s_q_val` writer - "] -pub struct RX_ADC_4S_Q_VAL_W<'a> { - w: &'a mut W, -} -impl<'a> RX_ADC_4S_Q_VAL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03ff << 16)) | ((value as u32 & 0x03ff) << 16); - self.w - } -} -#[doc = "Field `rx_adc_4s_i_en` reader - "] -pub struct RX_ADC_4S_I_EN_R(crate::FieldReader); -impl RX_ADC_4S_I_EN_R { - pub(crate) fn new(bits: bool) -> Self { - RX_ADC_4S_I_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_ADC_4S_I_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_adc_4s_i_en` writer - "] -pub struct RX_ADC_4S_I_EN_W<'a> { - w: &'a mut W, -} -impl<'a> RX_ADC_4S_I_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); - self.w - } -} #[doc = "Field `rx_adc_4s_i_val` reader - "] -pub struct RX_ADC_4S_I_VAL_R(crate::FieldReader); -impl RX_ADC_4S_I_VAL_R { - pub(crate) fn new(bits: u16) -> Self { - RX_ADC_4S_I_VAL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_ADC_4S_I_VAL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RX_ADC_4S_I_VAL_R = crate::FieldReader; #[doc = "Field `rx_adc_4s_i_val` writer - "] -pub struct RX_ADC_4S_I_VAL_W<'a> { - w: &'a mut W, -} -impl<'a> RX_ADC_4S_I_VAL_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type RX_ADC_4S_I_VAL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_3_SPEC, u16, u16, 10, O>; +#[doc = "Field `rx_adc_4s_i_en` reader - "] +pub type RX_ADC_4S_I_EN_R = crate::BitReader; +#[doc = "Field `rx_adc_4s_i_en` writer - "] +pub type RX_ADC_4S_I_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, DFE_CTRL_3_SPEC, bool, O>; +#[doc = "Field `rx_adc_4s_q_val` reader - "] +pub type RX_ADC_4S_Q_VAL_R = crate::FieldReader; +#[doc = "Field `rx_adc_4s_q_val` writer - "] +pub type RX_ADC_4S_Q_VAL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_3_SPEC, u16, u16, 10, O>; +#[doc = "Field `rx_adc_4s_q_en` reader - "] +pub type RX_ADC_4S_Q_EN_R = crate::BitReader; +#[doc = "Field `rx_adc_4s_q_en` writer - "] +pub type RX_ADC_4S_Q_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, DFE_CTRL_3_SPEC, bool, O>; +impl R { + #[doc = "Bits 0:9"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03ff) | (value as u32 & 0x03ff); - self.w + pub fn rx_adc_4s_i_val(&self) -> RX_ADC_4S_I_VAL_R { + RX_ADC_4S_I_VAL_R::new((self.bits & 0x03ff) as u16) } -} -impl R { - #[doc = "Bit 26"] + #[doc = "Bit 10"] #[inline(always)] - pub fn rx_adc_4s_q_en(&self) -> RX_ADC_4S_Q_EN_R { - RX_ADC_4S_Q_EN_R::new(((self.bits >> 26) & 0x01) != 0) + pub fn rx_adc_4s_i_en(&self) -> RX_ADC_4S_I_EN_R { + RX_ADC_4S_I_EN_R::new(((self.bits >> 10) & 1) != 0) } #[doc = "Bits 16:25"] #[inline(always)] pub fn rx_adc_4s_q_val(&self) -> RX_ADC_4S_Q_VAL_R { RX_ADC_4S_Q_VAL_R::new(((self.bits >> 16) & 0x03ff) as u16) } - #[doc = "Bit 10"] - #[inline(always)] - pub fn rx_adc_4s_i_en(&self) -> RX_ADC_4S_I_EN_R { - RX_ADC_4S_I_EN_R::new(((self.bits >> 10) & 0x01) != 0) - } - #[doc = "Bits 0:9"] + #[doc = "Bit 26"] #[inline(always)] - pub fn rx_adc_4s_i_val(&self) -> RX_ADC_4S_I_VAL_R { - RX_ADC_4S_I_VAL_R::new((self.bits & 0x03ff) as u16) + pub fn rx_adc_4s_q_en(&self) -> RX_ADC_4S_Q_EN_R { + RX_ADC_4S_Q_EN_R::new(((self.bits >> 26) & 1) != 0) } } impl W { - #[doc = "Bit 26"] + #[doc = "Bits 0:9"] #[inline(always)] - pub fn rx_adc_4s_q_en(&mut self) -> RX_ADC_4S_Q_EN_W { - RX_ADC_4S_Q_EN_W { w: self } + #[must_use] + pub fn rx_adc_4s_i_val(&mut self) -> RX_ADC_4S_I_VAL_W<0> { + RX_ADC_4S_I_VAL_W::new(self) } - #[doc = "Bits 16:25"] + #[doc = "Bit 10"] #[inline(always)] - pub fn rx_adc_4s_q_val(&mut self) -> RX_ADC_4S_Q_VAL_W { - RX_ADC_4S_Q_VAL_W { w: self } + #[must_use] + pub fn rx_adc_4s_i_en(&mut self) -> RX_ADC_4S_I_EN_W<10> { + RX_ADC_4S_I_EN_W::new(self) } - #[doc = "Bit 10"] + #[doc = "Bits 16:25"] #[inline(always)] - pub fn rx_adc_4s_i_en(&mut self) -> RX_ADC_4S_I_EN_W { - RX_ADC_4S_I_EN_W { w: self } + #[must_use] + pub fn rx_adc_4s_q_val(&mut self) -> RX_ADC_4S_Q_VAL_W<16> { + RX_ADC_4S_Q_VAL_W::new(self) } - #[doc = "Bits 0:9"] + #[doc = "Bit 26"] #[inline(always)] - pub fn rx_adc_4s_i_val(&mut self) -> RX_ADC_4S_I_VAL_W { - RX_ADC_4S_I_VAL_W { w: self } + #[must_use] + pub fn rx_adc_4s_q_en(&mut self) -> RX_ADC_4S_Q_EN_W<26> { + RX_ADC_4S_Q_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -217,11 +118,10 @@ impl crate::Readable for DFE_CTRL_3_SPEC { #[doc = "`write(|w| ..)` method takes [dfe_ctrl_3::W](W) writer structure"] impl crate::Writable for DFE_CTRL_3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets dfe_ctrl_3 to value 0"] impl crate::Resettable for DFE_CTRL_3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/dfe_ctrl_4.rs b/src/rf/dfe_ctrl_4.rs index 4c06d24..3702b2a 100644 --- a/src/rf/dfe_ctrl_4.rs +++ b/src/rf/dfe_ctrl_4.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,179 +28,79 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rx_pf_i_en` reader - "] -pub struct RX_PF_I_EN_R(crate::FieldReader); -impl RX_PF_I_EN_R { - pub(crate) fn new(bits: bool) -> Self { - RX_PF_I_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_PF_I_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_pf_i_en` writer - "] -pub struct RX_PF_I_EN_W<'a> { - w: &'a mut W, -} -impl<'a> RX_PF_I_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 31)) | ((value as u32 & 0x01) << 31); - self.w - } -} -#[doc = "Field `rx_pf_q_en` reader - "] -pub struct RX_PF_Q_EN_R(crate::FieldReader); -impl RX_PF_Q_EN_R { - pub(crate) fn new(bits: bool) -> Self { - RX_PF_Q_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_PF_Q_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_pf_q_en` writer - "] -pub struct RX_PF_Q_EN_W<'a> { - w: &'a mut W, -} -impl<'a> RX_PF_Q_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 30)) | ((value as u32 & 0x01) << 30); - self.w - } -} -#[doc = "Field `rx_pf_th1` reader - "] -pub struct RX_PF_TH1_R(crate::FieldReader); -impl RX_PF_TH1_R { - pub(crate) fn new(bits: u16) -> Self { - RX_PF_TH1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_PF_TH1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_pf_th1` writer - "] -pub struct RX_PF_TH1_W<'a> { - w: &'a mut W, -} -impl<'a> RX_PF_TH1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03ff << 16)) | ((value as u32 & 0x03ff) << 16); - self.w - } -} #[doc = "Field `rx_pf_th2` reader - "] -pub struct RX_PF_TH2_R(crate::FieldReader); -impl RX_PF_TH2_R { - pub(crate) fn new(bits: u16) -> Self { - RX_PF_TH2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_PF_TH2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RX_PF_TH2_R = crate::FieldReader; #[doc = "Field `rx_pf_th2` writer - "] -pub struct RX_PF_TH2_W<'a> { - w: &'a mut W, -} -impl<'a> RX_PF_TH2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03ff) | (value as u32 & 0x03ff); - self.w - } -} +pub type RX_PF_TH2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_4_SPEC, u16, u16, 10, O>; +#[doc = "Field `rx_pf_th1` reader - "] +pub type RX_PF_TH1_R = crate::FieldReader; +#[doc = "Field `rx_pf_th1` writer - "] +pub type RX_PF_TH1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_4_SPEC, u16, u16, 10, O>; +#[doc = "Field `rx_pf_q_en` reader - "] +pub type RX_PF_Q_EN_R = crate::BitReader; +#[doc = "Field `rx_pf_q_en` writer - "] +pub type RX_PF_Q_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, DFE_CTRL_4_SPEC, bool, O>; +#[doc = "Field `rx_pf_i_en` reader - "] +pub type RX_PF_I_EN_R = crate::BitReader; +#[doc = "Field `rx_pf_i_en` writer - "] +pub type RX_PF_I_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, DFE_CTRL_4_SPEC, bool, O>; impl R { - #[doc = "Bit 31"] - #[inline(always)] - pub fn rx_pf_i_en(&self) -> RX_PF_I_EN_R { - RX_PF_I_EN_R::new(((self.bits >> 31) & 0x01) != 0) - } - #[doc = "Bit 30"] + #[doc = "Bits 0:9"] #[inline(always)] - pub fn rx_pf_q_en(&self) -> RX_PF_Q_EN_R { - RX_PF_Q_EN_R::new(((self.bits >> 30) & 0x01) != 0) + pub fn rx_pf_th2(&self) -> RX_PF_TH2_R { + RX_PF_TH2_R::new((self.bits & 0x03ff) as u16) } #[doc = "Bits 16:25"] #[inline(always)] pub fn rx_pf_th1(&self) -> RX_PF_TH1_R { RX_PF_TH1_R::new(((self.bits >> 16) & 0x03ff) as u16) } - #[doc = "Bits 0:9"] + #[doc = "Bit 30"] #[inline(always)] - pub fn rx_pf_th2(&self) -> RX_PF_TH2_R { - RX_PF_TH2_R::new((self.bits & 0x03ff) as u16) + pub fn rx_pf_q_en(&self) -> RX_PF_Q_EN_R { + RX_PF_Q_EN_R::new(((self.bits >> 30) & 1) != 0) } -} -impl W { #[doc = "Bit 31"] #[inline(always)] - pub fn rx_pf_i_en(&mut self) -> RX_PF_I_EN_W { - RX_PF_I_EN_W { w: self } + pub fn rx_pf_i_en(&self) -> RX_PF_I_EN_R { + RX_PF_I_EN_R::new(((self.bits >> 31) & 1) != 0) } - #[doc = "Bit 30"] +} +impl W { + #[doc = "Bits 0:9"] #[inline(always)] - pub fn rx_pf_q_en(&mut self) -> RX_PF_Q_EN_W { - RX_PF_Q_EN_W { w: self } + #[must_use] + pub fn rx_pf_th2(&mut self) -> RX_PF_TH2_W<0> { + RX_PF_TH2_W::new(self) } #[doc = "Bits 16:25"] #[inline(always)] - pub fn rx_pf_th1(&mut self) -> RX_PF_TH1_W { - RX_PF_TH1_W { w: self } + #[must_use] + pub fn rx_pf_th1(&mut self) -> RX_PF_TH1_W<16> { + RX_PF_TH1_W::new(self) } - #[doc = "Bits 0:9"] + #[doc = "Bit 30"] #[inline(always)] - pub fn rx_pf_th2(&mut self) -> RX_PF_TH2_W { - RX_PF_TH2_W { w: self } + #[must_use] + pub fn rx_pf_q_en(&mut self) -> RX_PF_Q_EN_W<30> { + RX_PF_Q_EN_W::new(self) + } + #[doc = "Bit 31"] + #[inline(always)] + #[must_use] + pub fn rx_pf_i_en(&mut self) -> RX_PF_I_EN_W<31> { + RX_PF_I_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -217,11 +118,10 @@ impl crate::Readable for DFE_CTRL_4_SPEC { #[doc = "`write(|w| ..)` method takes [dfe_ctrl_4::W](W) writer structure"] impl crate::Writable for DFE_CTRL_4_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets dfe_ctrl_4 to value 0"] impl crate::Resettable for DFE_CTRL_4_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/dfe_ctrl_5.rs b/src/rf/dfe_ctrl_5.rs index 4740bff..842fa61 100644 --- a/src/rf/dfe_ctrl_5.rs +++ b/src/rf/dfe_ctrl_5.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,179 +28,79 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rx_iqc_gain_en` reader - "] -pub struct RX_IQC_GAIN_EN_R(crate::FieldReader); -impl RX_IQC_GAIN_EN_R { - pub(crate) fn new(bits: bool) -> Self { - RX_IQC_GAIN_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_IQC_GAIN_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_iqc_gain_en` writer - "] -pub struct RX_IQC_GAIN_EN_W<'a> { - w: &'a mut W, -} -impl<'a> RX_IQC_GAIN_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23); - self.w - } -} -#[doc = "Field `rx_iqc_gain` reader - "] -pub struct RX_IQC_GAIN_R(crate::FieldReader); -impl RX_IQC_GAIN_R { - pub(crate) fn new(bits: u16) -> Self { - RX_IQC_GAIN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_IQC_GAIN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_iqc_gain` writer - "] -pub struct RX_IQC_GAIN_W<'a> { - w: &'a mut W, -} -impl<'a> RX_IQC_GAIN_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07ff << 12)) | ((value as u32 & 0x07ff) << 12); - self.w - } -} -#[doc = "Field `rx_iqc_phase_en` reader - "] -pub struct RX_IQC_PHASE_EN_R(crate::FieldReader); -impl RX_IQC_PHASE_EN_R { - pub(crate) fn new(bits: bool) -> Self { - RX_IQC_PHASE_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_IQC_PHASE_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_iqc_phase_en` writer - "] -pub struct RX_IQC_PHASE_EN_W<'a> { - w: &'a mut W, -} -impl<'a> RX_IQC_PHASE_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); - self.w - } -} #[doc = "Field `rx_iqc_phase` reader - "] -pub struct RX_IQC_PHASE_R(crate::FieldReader); -impl RX_IQC_PHASE_R { - pub(crate) fn new(bits: u16) -> Self { - RX_IQC_PHASE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_IQC_PHASE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RX_IQC_PHASE_R = crate::FieldReader; #[doc = "Field `rx_iqc_phase` writer - "] -pub struct RX_IQC_PHASE_W<'a> { - w: &'a mut W, -} -impl<'a> RX_IQC_PHASE_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type RX_IQC_PHASE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_5_SPEC, u16, u16, 10, O>; +#[doc = "Field `rx_iqc_phase_en` reader - "] +pub type RX_IQC_PHASE_EN_R = crate::BitReader; +#[doc = "Field `rx_iqc_phase_en` writer - "] +pub type RX_IQC_PHASE_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, DFE_CTRL_5_SPEC, bool, O>; +#[doc = "Field `rx_iqc_gain` reader - "] +pub type RX_IQC_GAIN_R = crate::FieldReader; +#[doc = "Field `rx_iqc_gain` writer - "] +pub type RX_IQC_GAIN_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_5_SPEC, u16, u16, 11, O>; +#[doc = "Field `rx_iqc_gain_en` reader - "] +pub type RX_IQC_GAIN_EN_R = crate::BitReader; +#[doc = "Field `rx_iqc_gain_en` writer - "] +pub type RX_IQC_GAIN_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, DFE_CTRL_5_SPEC, bool, O>; +impl R { + #[doc = "Bits 0:9"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03ff) | (value as u32 & 0x03ff); - self.w + pub fn rx_iqc_phase(&self) -> RX_IQC_PHASE_R { + RX_IQC_PHASE_R::new((self.bits & 0x03ff) as u16) } -} -impl R { - #[doc = "Bit 23"] + #[doc = "Bit 10"] #[inline(always)] - pub fn rx_iqc_gain_en(&self) -> RX_IQC_GAIN_EN_R { - RX_IQC_GAIN_EN_R::new(((self.bits >> 23) & 0x01) != 0) + pub fn rx_iqc_phase_en(&self) -> RX_IQC_PHASE_EN_R { + RX_IQC_PHASE_EN_R::new(((self.bits >> 10) & 1) != 0) } #[doc = "Bits 12:22"] #[inline(always)] pub fn rx_iqc_gain(&self) -> RX_IQC_GAIN_R { RX_IQC_GAIN_R::new(((self.bits >> 12) & 0x07ff) as u16) } - #[doc = "Bit 10"] - #[inline(always)] - pub fn rx_iqc_phase_en(&self) -> RX_IQC_PHASE_EN_R { - RX_IQC_PHASE_EN_R::new(((self.bits >> 10) & 0x01) != 0) - } - #[doc = "Bits 0:9"] + #[doc = "Bit 23"] #[inline(always)] - pub fn rx_iqc_phase(&self) -> RX_IQC_PHASE_R { - RX_IQC_PHASE_R::new((self.bits & 0x03ff) as u16) + pub fn rx_iqc_gain_en(&self) -> RX_IQC_GAIN_EN_R { + RX_IQC_GAIN_EN_R::new(((self.bits >> 23) & 1) != 0) } } impl W { - #[doc = "Bit 23"] + #[doc = "Bits 0:9"] #[inline(always)] - pub fn rx_iqc_gain_en(&mut self) -> RX_IQC_GAIN_EN_W { - RX_IQC_GAIN_EN_W { w: self } + #[must_use] + pub fn rx_iqc_phase(&mut self) -> RX_IQC_PHASE_W<0> { + RX_IQC_PHASE_W::new(self) } - #[doc = "Bits 12:22"] + #[doc = "Bit 10"] #[inline(always)] - pub fn rx_iqc_gain(&mut self) -> RX_IQC_GAIN_W { - RX_IQC_GAIN_W { w: self } + #[must_use] + pub fn rx_iqc_phase_en(&mut self) -> RX_IQC_PHASE_EN_W<10> { + RX_IQC_PHASE_EN_W::new(self) } - #[doc = "Bit 10"] + #[doc = "Bits 12:22"] #[inline(always)] - pub fn rx_iqc_phase_en(&mut self) -> RX_IQC_PHASE_EN_W { - RX_IQC_PHASE_EN_W { w: self } + #[must_use] + pub fn rx_iqc_gain(&mut self) -> RX_IQC_GAIN_W<12> { + RX_IQC_GAIN_W::new(self) } - #[doc = "Bits 0:9"] + #[doc = "Bit 23"] #[inline(always)] - pub fn rx_iqc_phase(&mut self) -> RX_IQC_PHASE_W { - RX_IQC_PHASE_W { w: self } + #[must_use] + pub fn rx_iqc_gain_en(&mut self) -> RX_IQC_GAIN_EN_W<23> { + RX_IQC_GAIN_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -217,11 +118,10 @@ impl crate::Readable for DFE_CTRL_5_SPEC { #[doc = "`write(|w| ..)` method takes [dfe_ctrl_5::W](W) writer structure"] impl crate::Writable for DFE_CTRL_5_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets dfe_ctrl_5 to value 0"] impl crate::Resettable for DFE_CTRL_5_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/dfe_ctrl_6.rs b/src/rf/dfe_ctrl_6.rs index 2fee1d7..06f6ce9 100644 --- a/src/rf/dfe_ctrl_6.rs +++ b/src/rf/dfe_ctrl_6.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,225 +28,95 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rx_pm_in_sel` reader - "] -pub struct RX_PM_IN_SEL_R(crate::FieldReader); -impl RX_PM_IN_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - RX_PM_IN_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_PM_IN_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_pm_in_sel` writer - "] -pub struct RX_PM_IN_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> RX_PM_IN_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 30)) | ((value as u32 & 0x03) << 30); - self.w - } -} -#[doc = "Field `rx_pm_en` reader - "] -pub struct RX_PM_EN_R(crate::FieldReader); -impl RX_PM_EN_R { - pub(crate) fn new(bits: bool) -> Self { - RX_PM_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_PM_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_pm_en` writer - "] -pub struct RX_PM_EN_W<'a> { - w: &'a mut W, -} -impl<'a> RX_PM_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 29)) | ((value as u32 & 0x01) << 29); - self.w - } -} -#[doc = "Field `rx_pm_done` reader - "] -pub struct RX_PM_DONE_R(crate::FieldReader); -impl RX_PM_DONE_R { - pub(crate) fn new(bits: bool) -> Self { - RX_PM_DONE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_PM_DONE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_pm_done` writer - "] -pub struct RX_PM_DONE_W<'a> { - w: &'a mut W, -} -impl<'a> RX_PM_DONE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 28)) | ((value as u32 & 0x01) << 28); - self.w - } -} -#[doc = "Field `rx_pm_freqshift_en` reader - "] -pub struct RX_PM_FREQSHIFT_EN_R(crate::FieldReader); -impl RX_PM_FREQSHIFT_EN_R { - pub(crate) fn new(bits: bool) -> Self { - RX_PM_FREQSHIFT_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_PM_FREQSHIFT_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_pm_freqshift_en` writer - "] -pub struct RX_PM_FREQSHIFT_EN_W<'a> { - w: &'a mut W, -} -impl<'a> RX_PM_FREQSHIFT_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w - } -} #[doc = "Field `rx_pm_freqshift_cw` reader - "] -pub struct RX_PM_FREQSHIFT_CW_R(crate::FieldReader); -impl RX_PM_FREQSHIFT_CW_R { - pub(crate) fn new(bits: u32) -> Self { - RX_PM_FREQSHIFT_CW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_PM_FREQSHIFT_CW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RX_PM_FREQSHIFT_CW_R = crate::FieldReader; #[doc = "Field `rx_pm_freqshift_cw` writer - "] -pub struct RX_PM_FREQSHIFT_CW_W<'a> { - w: &'a mut W, -} -impl<'a> RX_PM_FREQSHIFT_CW_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0x000f_ffff) | (value as u32 & 0x000f_ffff); - self.w - } -} +pub type RX_PM_FREQSHIFT_CW_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_6_SPEC, u32, u32, 20, O>; +#[doc = "Field `rx_pm_freqshift_en` reader - "] +pub type RX_PM_FREQSHIFT_EN_R = crate::BitReader; +#[doc = "Field `rx_pm_freqshift_en` writer - "] +pub type RX_PM_FREQSHIFT_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, DFE_CTRL_6_SPEC, bool, O>; +#[doc = "Field `rx_pm_done` reader - "] +pub type RX_PM_DONE_R = crate::BitReader; +#[doc = "Field `rx_pm_done` writer - "] +pub type RX_PM_DONE_W<'a, const O: u8> = crate::BitWriter<'a, u32, DFE_CTRL_6_SPEC, bool, O>; +#[doc = "Field `rx_pm_en` reader - "] +pub type RX_PM_EN_R = crate::BitReader; +#[doc = "Field `rx_pm_en` writer - "] +pub type RX_PM_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, DFE_CTRL_6_SPEC, bool, O>; +#[doc = "Field `rx_pm_in_sel` reader - "] +pub type RX_PM_IN_SEL_R = crate::FieldReader; +#[doc = "Field `rx_pm_in_sel` writer - "] +pub type RX_PM_IN_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_6_SPEC, u8, u8, 2, O>; impl R { - #[doc = "Bits 30:31"] + #[doc = "Bits 0:19"] #[inline(always)] - pub fn rx_pm_in_sel(&self) -> RX_PM_IN_SEL_R { - RX_PM_IN_SEL_R::new(((self.bits >> 30) & 0x03) as u8) + pub fn rx_pm_freqshift_cw(&self) -> RX_PM_FREQSHIFT_CW_R { + RX_PM_FREQSHIFT_CW_R::new(self.bits & 0x000f_ffff) } - #[doc = "Bit 29"] + #[doc = "Bit 20"] #[inline(always)] - pub fn rx_pm_en(&self) -> RX_PM_EN_R { - RX_PM_EN_R::new(((self.bits >> 29) & 0x01) != 0) + pub fn rx_pm_freqshift_en(&self) -> RX_PM_FREQSHIFT_EN_R { + RX_PM_FREQSHIFT_EN_R::new(((self.bits >> 20) & 1) != 0) } #[doc = "Bit 28"] #[inline(always)] pub fn rx_pm_done(&self) -> RX_PM_DONE_R { - RX_PM_DONE_R::new(((self.bits >> 28) & 0x01) != 0) + RX_PM_DONE_R::new(((self.bits >> 28) & 1) != 0) } - #[doc = "Bit 20"] + #[doc = "Bit 29"] #[inline(always)] - pub fn rx_pm_freqshift_en(&self) -> RX_PM_FREQSHIFT_EN_R { - RX_PM_FREQSHIFT_EN_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn rx_pm_en(&self) -> RX_PM_EN_R { + RX_PM_EN_R::new(((self.bits >> 29) & 1) != 0) } - #[doc = "Bits 0:19"] + #[doc = "Bits 30:31"] #[inline(always)] - pub fn rx_pm_freqshift_cw(&self) -> RX_PM_FREQSHIFT_CW_R { - RX_PM_FREQSHIFT_CW_R::new((self.bits & 0x000f_ffff) as u32) + pub fn rx_pm_in_sel(&self) -> RX_PM_IN_SEL_R { + RX_PM_IN_SEL_R::new(((self.bits >> 30) & 3) as u8) } } impl W { - #[doc = "Bits 30:31"] + #[doc = "Bits 0:19"] #[inline(always)] - pub fn rx_pm_in_sel(&mut self) -> RX_PM_IN_SEL_W { - RX_PM_IN_SEL_W { w: self } + #[must_use] + pub fn rx_pm_freqshift_cw(&mut self) -> RX_PM_FREQSHIFT_CW_W<0> { + RX_PM_FREQSHIFT_CW_W::new(self) } - #[doc = "Bit 29"] + #[doc = "Bit 20"] #[inline(always)] - pub fn rx_pm_en(&mut self) -> RX_PM_EN_W { - RX_PM_EN_W { w: self } + #[must_use] + pub fn rx_pm_freqshift_en(&mut self) -> RX_PM_FREQSHIFT_EN_W<20> { + RX_PM_FREQSHIFT_EN_W::new(self) } #[doc = "Bit 28"] #[inline(always)] - pub fn rx_pm_done(&mut self) -> RX_PM_DONE_W { - RX_PM_DONE_W { w: self } + #[must_use] + pub fn rx_pm_done(&mut self) -> RX_PM_DONE_W<28> { + RX_PM_DONE_W::new(self) } - #[doc = "Bit 20"] + #[doc = "Bit 29"] #[inline(always)] - pub fn rx_pm_freqshift_en(&mut self) -> RX_PM_FREQSHIFT_EN_W { - RX_PM_FREQSHIFT_EN_W { w: self } + #[must_use] + pub fn rx_pm_en(&mut self) -> RX_PM_EN_W<29> { + RX_PM_EN_W::new(self) } - #[doc = "Bits 0:19"] + #[doc = "Bits 30:31"] #[inline(always)] - pub fn rx_pm_freqshift_cw(&mut self) -> RX_PM_FREQSHIFT_CW_W { - RX_PM_FREQSHIFT_CW_W { w: self } + #[must_use] + pub fn rx_pm_in_sel(&mut self) -> RX_PM_IN_SEL_W<30> { + RX_PM_IN_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -263,11 +134,10 @@ impl crate::Readable for DFE_CTRL_6_SPEC { #[doc = "`write(|w| ..)` method takes [dfe_ctrl_6::W](W) writer structure"] impl crate::Writable for DFE_CTRL_6_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets dfe_ctrl_6 to value 0"] impl crate::Resettable for DFE_CTRL_6_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/dfe_ctrl_7.rs b/src/rf/dfe_ctrl_7.rs index 9252c61..452f250 100644 --- a/src/rf/dfe_ctrl_7.rs +++ b/src/rf/dfe_ctrl_7.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,87 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rx_pm_acc_len` reader - "] -pub struct RX_PM_ACC_LEN_R(crate::FieldReader); -impl RX_PM_ACC_LEN_R { - pub(crate) fn new(bits: u16) -> Self { - RX_PM_ACC_LEN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_PM_ACC_LEN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_pm_acc_len` writer - "] -pub struct RX_PM_ACC_LEN_W<'a> { - w: &'a mut W, -} -impl<'a> RX_PM_ACC_LEN_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xffff << 16)) | ((value as u32 & 0xffff) << 16); - self.w - } -} #[doc = "Field `rx_pm_start_ofs` reader - "] -pub struct RX_PM_START_OFS_R(crate::FieldReader); -impl RX_PM_START_OFS_R { - pub(crate) fn new(bits: u16) -> Self { - RX_PM_START_OFS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_PM_START_OFS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RX_PM_START_OFS_R = crate::FieldReader; #[doc = "Field `rx_pm_start_ofs` writer - "] -pub struct RX_PM_START_OFS_W<'a> { - w: &'a mut W, -} -impl<'a> RX_PM_START_OFS_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type RX_PM_START_OFS_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_7_SPEC, u16, u16, 16, O>; +#[doc = "Field `rx_pm_acc_len` reader - "] +pub type RX_PM_ACC_LEN_R = crate::FieldReader; +#[doc = "Field `rx_pm_acc_len` writer - "] +pub type RX_PM_ACC_LEN_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_7_SPEC, u16, u16, 16, O>; +impl R { + #[doc = "Bits 0:15"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w + pub fn rx_pm_start_ofs(&self) -> RX_PM_START_OFS_R { + RX_PM_START_OFS_R::new((self.bits & 0xffff) as u16) } -} -impl R { #[doc = "Bits 16:31"] #[inline(always)] pub fn rx_pm_acc_len(&self) -> RX_PM_ACC_LEN_R { RX_PM_ACC_LEN_R::new(((self.bits >> 16) & 0xffff) as u16) } - #[doc = "Bits 0:15"] - #[inline(always)] - pub fn rx_pm_start_ofs(&self) -> RX_PM_START_OFS_R { - RX_PM_START_OFS_R::new((self.bits & 0xffff) as u16) - } } impl W { - #[doc = "Bits 16:31"] + #[doc = "Bits 0:15"] #[inline(always)] - pub fn rx_pm_acc_len(&mut self) -> RX_PM_ACC_LEN_W { - RX_PM_ACC_LEN_W { w: self } + #[must_use] + pub fn rx_pm_start_ofs(&mut self) -> RX_PM_START_OFS_W<0> { + RX_PM_START_OFS_W::new(self) } - #[doc = "Bits 0:15"] + #[doc = "Bits 16:31"] #[inline(always)] - pub fn rx_pm_start_ofs(&mut self) -> RX_PM_START_OFS_W { - RX_PM_START_OFS_W { w: self } + #[must_use] + pub fn rx_pm_acc_len(&mut self) -> RX_PM_ACC_LEN_W<16> { + RX_PM_ACC_LEN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -125,11 +88,10 @@ impl crate::Readable for DFE_CTRL_7_SPEC { #[doc = "`write(|w| ..)` method takes [dfe_ctrl_7::W](W) writer structure"] impl crate::Writable for DFE_CTRL_7_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets dfe_ctrl_7 to value 0"] impl crate::Resettable for DFE_CTRL_7_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/dfe_ctrl_8.rs b/src/rf/dfe_ctrl_8.rs index a95ba5d..335ac09 100644 --- a/src/rf/dfe_ctrl_8.rs +++ b/src/rf/dfe_ctrl_8.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `rx_pm_iqacc_i` reader - "] -pub struct RX_PM_IQACC_I_R(crate::FieldReader); -impl RX_PM_IQACC_I_R { - pub(crate) fn new(bits: u32) -> Self { - RX_PM_IQACC_I_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_PM_IQACC_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RX_PM_IQACC_I_R = crate::FieldReader; #[doc = "Field `rx_pm_iqacc_i` writer - "] -pub struct RX_PM_IQACC_I_W<'a> { - w: &'a mut W, -} -impl<'a> RX_PM_IQACC_I_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01ff_ffff) | (value as u32 & 0x01ff_ffff); - self.w - } -} +pub type RX_PM_IQACC_I_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_8_SPEC, u32, u32, 25, O>; impl R { #[doc = "Bits 0:24"] #[inline(always)] pub fn rx_pm_iqacc_i(&self) -> RX_PM_IQACC_I_R { - RX_PM_IQACC_I_R::new((self.bits & 0x01ff_ffff) as u32) + RX_PM_IQACC_I_R::new(self.bits & 0x01ff_ffff) } } impl W { #[doc = "Bits 0:24"] #[inline(always)] - pub fn rx_pm_iqacc_i(&mut self) -> RX_PM_IQACC_I_W { - RX_PM_IQACC_I_W { w: self } + #[must_use] + pub fn rx_pm_iqacc_i(&mut self) -> RX_PM_IQACC_I_W<0> { + RX_PM_IQACC_I_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for DFE_CTRL_8_SPEC { #[doc = "`write(|w| ..)` method takes [dfe_ctrl_8::W](W) writer structure"] impl crate::Writable for DFE_CTRL_8_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets dfe_ctrl_8 to value 0"] impl crate::Resettable for DFE_CTRL_8_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/dfe_ctrl_9.rs b/src/rf/dfe_ctrl_9.rs index d5450e6..b8c77f1 100644 --- a/src/rf/dfe_ctrl_9.rs +++ b/src/rf/dfe_ctrl_9.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `rx_pm_iqacc_q` reader - "] -pub struct RX_PM_IQACC_Q_R(crate::FieldReader); -impl RX_PM_IQACC_Q_R { - pub(crate) fn new(bits: u32) -> Self { - RX_PM_IQACC_Q_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_PM_IQACC_Q_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RX_PM_IQACC_Q_R = crate::FieldReader; #[doc = "Field `rx_pm_iqacc_q` writer - "] -pub struct RX_PM_IQACC_Q_W<'a> { - w: &'a mut W, -} -impl<'a> RX_PM_IQACC_Q_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01ff_ffff) | (value as u32 & 0x01ff_ffff); - self.w - } -} +pub type RX_PM_IQACC_Q_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, DFE_CTRL_9_SPEC, u32, u32, 25, O>; impl R { #[doc = "Bits 0:24"] #[inline(always)] pub fn rx_pm_iqacc_q(&self) -> RX_PM_IQACC_Q_R { - RX_PM_IQACC_Q_R::new((self.bits & 0x01ff_ffff) as u32) + RX_PM_IQACC_Q_R::new(self.bits & 0x01ff_ffff) } } impl W { #[doc = "Bits 0:24"] #[inline(always)] - pub fn rx_pm_iqacc_q(&mut self) -> RX_PM_IQACC_Q_W { - RX_PM_IQACC_Q_W { w: self } + #[must_use] + pub fn rx_pm_iqacc_q(&mut self) -> RX_PM_IQACC_Q_W<0> { + RX_PM_IQACC_Q_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for DFE_CTRL_9_SPEC { #[doc = "`write(|w| ..)` method takes [dfe_ctrl_9::W](W) writer structure"] impl crate::Writable for DFE_CTRL_9_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets dfe_ctrl_9 to value 0"] impl crate::Resettable for DFE_CTRL_9_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/fbdv.rs b/src/rf/fbdv.rs index 5b6937e..e6f1542 100644 --- a/src/rf/fbdv.rs +++ b/src/rf/fbdv.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,271 +28,109 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `lo_fbdv_rst_hw` reader - "] -pub struct LO_FBDV_RST_HW_R(crate::FieldReader); -impl LO_FBDV_RST_HW_R { - pub(crate) fn new(bits: bool) -> Self { - LO_FBDV_RST_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_FBDV_RST_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_fbdv_rst_hw` writer - "] -pub struct LO_FBDV_RST_HW_W<'a> { - w: &'a mut W, -} -impl<'a> LO_FBDV_RST_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w - } -} -#[doc = "Field `lo_fbdv_rst` reader - "] -pub struct LO_FBDV_RST_R(crate::FieldReader); -impl LO_FBDV_RST_R { - pub(crate) fn new(bits: bool) -> Self { - LO_FBDV_RST_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_FBDV_RST_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_fbdv_rst` writer - "] -pub struct LO_FBDV_RST_W<'a> { - w: &'a mut W, -} -impl<'a> LO_FBDV_RST_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `lo_fbdv_sel_fb_clk` reader - "] -pub struct LO_FBDV_SEL_FB_CLK_R(crate::FieldReader); -impl LO_FBDV_SEL_FB_CLK_R { - pub(crate) fn new(bits: u8) -> Self { - LO_FBDV_SEL_FB_CLK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_FBDV_SEL_FB_CLK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_fbdv_sel_fb_clk` writer - "] -pub struct LO_FBDV_SEL_FB_CLK_W<'a> { - w: &'a mut W, -} -impl<'a> LO_FBDV_SEL_FB_CLK_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 12)) | ((value as u32 & 0x03) << 12); - self.w - } -} -#[doc = "Field `lo_fbdv_sel_sample_clk` reader - "] -pub struct LO_FBDV_SEL_SAMPLE_CLK_R(crate::FieldReader); -impl LO_FBDV_SEL_SAMPLE_CLK_R { - pub(crate) fn new(bits: u8) -> Self { - LO_FBDV_SEL_SAMPLE_CLK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_FBDV_SEL_SAMPLE_CLK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_fbdv_sel_sample_clk` writer - "] -pub struct LO_FBDV_SEL_SAMPLE_CLK_W<'a> { - w: &'a mut W, -} -impl<'a> LO_FBDV_SEL_SAMPLE_CLK_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} -#[doc = "Field `lo_fbdv_halfstep_en` reader - "] -pub struct LO_FBDV_HALFSTEP_EN_R(crate::FieldReader); -impl LO_FBDV_HALFSTEP_EN_R { - pub(crate) fn new(bits: bool) -> Self { - LO_FBDV_HALFSTEP_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_FBDV_HALFSTEP_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_fbdv_halfstep_en` writer - "] -pub struct LO_FBDV_HALFSTEP_EN_W<'a> { - w: &'a mut W, -} -impl<'a> LO_FBDV_HALFSTEP_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} #[doc = "Field `lo_fbdv_halfstep_en_hw` reader - "] -pub struct LO_FBDV_HALFSTEP_EN_HW_R(crate::FieldReader); -impl LO_FBDV_HALFSTEP_EN_HW_R { - pub(crate) fn new(bits: bool) -> Self { - LO_FBDV_HALFSTEP_EN_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_FBDV_HALFSTEP_EN_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type LO_FBDV_HALFSTEP_EN_HW_R = crate::BitReader; #[doc = "Field `lo_fbdv_halfstep_en_hw` writer - "] -pub struct LO_FBDV_HALFSTEP_EN_HW_W<'a> { - w: &'a mut W, -} -impl<'a> LO_FBDV_HALFSTEP_EN_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type LO_FBDV_HALFSTEP_EN_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, FBDV_SPEC, bool, O>; +#[doc = "Field `lo_fbdv_halfstep_en` reader - "] +pub type LO_FBDV_HALFSTEP_EN_R = crate::BitReader; +#[doc = "Field `lo_fbdv_halfstep_en` writer - "] +pub type LO_FBDV_HALFSTEP_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, FBDV_SPEC, bool, O>; +#[doc = "Field `lo_fbdv_sel_sample_clk` reader - "] +pub type LO_FBDV_SEL_SAMPLE_CLK_R = crate::FieldReader; +#[doc = "Field `lo_fbdv_sel_sample_clk` writer - "] +pub type LO_FBDV_SEL_SAMPLE_CLK_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, FBDV_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_fbdv_sel_fb_clk` reader - "] +pub type LO_FBDV_SEL_FB_CLK_R = crate::FieldReader; +#[doc = "Field `lo_fbdv_sel_fb_clk` writer - "] +pub type LO_FBDV_SEL_FB_CLK_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, FBDV_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_fbdv_rst` reader - "] +pub type LO_FBDV_RST_R = crate::BitReader; +#[doc = "Field `lo_fbdv_rst` writer - "] +pub type LO_FBDV_RST_W<'a, const O: u8> = crate::BitWriter<'a, u32, FBDV_SPEC, bool, O>; +#[doc = "Field `lo_fbdv_rst_hw` reader - "] +pub type LO_FBDV_RST_HW_R = crate::BitReader; +#[doc = "Field `lo_fbdv_rst_hw` writer - "] +pub type LO_FBDV_RST_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, FBDV_SPEC, bool, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn lo_fbdv_halfstep_en_hw(&self) -> LO_FBDV_HALFSTEP_EN_HW_R { + LO_FBDV_HALFSTEP_EN_HW_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bit 20"] + #[doc = "Bit 4"] #[inline(always)] - pub fn lo_fbdv_rst_hw(&self) -> LO_FBDV_RST_HW_R { - LO_FBDV_RST_HW_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn lo_fbdv_halfstep_en(&self) -> LO_FBDV_HALFSTEP_EN_R { + LO_FBDV_HALFSTEP_EN_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 16"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn lo_fbdv_rst(&self) -> LO_FBDV_RST_R { - LO_FBDV_RST_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn lo_fbdv_sel_sample_clk(&self) -> LO_FBDV_SEL_SAMPLE_CLK_R { + LO_FBDV_SEL_SAMPLE_CLK_R::new(((self.bits >> 8) & 3) as u8) } #[doc = "Bits 12:13"] #[inline(always)] pub fn lo_fbdv_sel_fb_clk(&self) -> LO_FBDV_SEL_FB_CLK_R { - LO_FBDV_SEL_FB_CLK_R::new(((self.bits >> 12) & 0x03) as u8) - } - #[doc = "Bits 8:9"] - #[inline(always)] - pub fn lo_fbdv_sel_sample_clk(&self) -> LO_FBDV_SEL_SAMPLE_CLK_R { - LO_FBDV_SEL_SAMPLE_CLK_R::new(((self.bits >> 8) & 0x03) as u8) + LO_FBDV_SEL_FB_CLK_R::new(((self.bits >> 12) & 3) as u8) } - #[doc = "Bit 4"] + #[doc = "Bit 16"] #[inline(always)] - pub fn lo_fbdv_halfstep_en(&self) -> LO_FBDV_HALFSTEP_EN_R { - LO_FBDV_HALFSTEP_EN_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn lo_fbdv_rst(&self) -> LO_FBDV_RST_R { + LO_FBDV_RST_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 20"] #[inline(always)] - pub fn lo_fbdv_halfstep_en_hw(&self) -> LO_FBDV_HALFSTEP_EN_HW_R { - LO_FBDV_HALFSTEP_EN_HW_R::new((self.bits & 0x01) != 0) + pub fn lo_fbdv_rst_hw(&self) -> LO_FBDV_RST_HW_R { + LO_FBDV_RST_HW_R::new(((self.bits >> 20) & 1) != 0) } } impl W { - #[doc = "Bit 20"] + #[doc = "Bit 0"] #[inline(always)] - pub fn lo_fbdv_rst_hw(&mut self) -> LO_FBDV_RST_HW_W { - LO_FBDV_RST_HW_W { w: self } + #[must_use] + pub fn lo_fbdv_halfstep_en_hw(&mut self) -> LO_FBDV_HALFSTEP_EN_HW_W<0> { + LO_FBDV_HALFSTEP_EN_HW_W::new(self) } - #[doc = "Bit 16"] + #[doc = "Bit 4"] #[inline(always)] - pub fn lo_fbdv_rst(&mut self) -> LO_FBDV_RST_W { - LO_FBDV_RST_W { w: self } + #[must_use] + pub fn lo_fbdv_halfstep_en(&mut self) -> LO_FBDV_HALFSTEP_EN_W<4> { + LO_FBDV_HALFSTEP_EN_W::new(self) } - #[doc = "Bits 12:13"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn lo_fbdv_sel_fb_clk(&mut self) -> LO_FBDV_SEL_FB_CLK_W { - LO_FBDV_SEL_FB_CLK_W { w: self } + #[must_use] + pub fn lo_fbdv_sel_sample_clk(&mut self) -> LO_FBDV_SEL_SAMPLE_CLK_W<8> { + LO_FBDV_SEL_SAMPLE_CLK_W::new(self) } - #[doc = "Bits 8:9"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn lo_fbdv_sel_sample_clk(&mut self) -> LO_FBDV_SEL_SAMPLE_CLK_W { - LO_FBDV_SEL_SAMPLE_CLK_W { w: self } + #[must_use] + pub fn lo_fbdv_sel_fb_clk(&mut self) -> LO_FBDV_SEL_FB_CLK_W<12> { + LO_FBDV_SEL_FB_CLK_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 16"] #[inline(always)] - pub fn lo_fbdv_halfstep_en(&mut self) -> LO_FBDV_HALFSTEP_EN_W { - LO_FBDV_HALFSTEP_EN_W { w: self } + #[must_use] + pub fn lo_fbdv_rst(&mut self) -> LO_FBDV_RST_W<16> { + LO_FBDV_RST_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 20"] #[inline(always)] - pub fn lo_fbdv_halfstep_en_hw(&mut self) -> LO_FBDV_HALFSTEP_EN_HW_W { - LO_FBDV_HALFSTEP_EN_HW_W { w: self } + #[must_use] + pub fn lo_fbdv_rst_hw(&mut self) -> LO_FBDV_RST_HW_W<20> { + LO_FBDV_RST_HW_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -309,11 +148,10 @@ impl crate::Readable for FBDV_SPEC { #[doc = "`write(|w| ..)` method takes [fbdv::W](W) writer structure"] impl crate::Writable for FBDV_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets fbdv to value 0"] impl crate::Resettable for FBDV_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/lna.rs b/src/rf/lna.rs index 2151182..37c6926 100644 --- a/src/rf/lna.rs +++ b/src/rf/lna.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,267 +28,122 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `lna_lg_gsel` reader - "] -pub struct LNA_LG_GSEL_R(crate::FieldReader); -impl LNA_LG_GSEL_R { - pub(crate) fn new(bits: u8) -> Self { - LNA_LG_GSEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LNA_LG_GSEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lna_lg_gsel` writer - "] -pub struct LNA_LG_GSEL_W<'a> { - w: &'a mut W, -} -impl<'a> LNA_LG_GSEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 24)) | ((value as u32 & 0x07) << 24); - self.w - } -} -#[doc = "Field `lna_cap_lg` reader - "] -pub struct LNA_CAP_LG_R(crate::FieldReader); -impl LNA_CAP_LG_R { - pub(crate) fn new(bits: u8) -> Self { - LNA_CAP_LG_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LNA_CAP_LG_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lna_cap_lg` writer - "] -pub struct LNA_CAP_LG_W<'a> { - w: &'a mut W, -} -impl<'a> LNA_CAP_LG_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 20)) | ((value as u32 & 0x03) << 20); - self.w - } -} -#[doc = "Field `lna_rfb_match` reader - "] -pub struct LNA_RFB_MATCH_R(crate::FieldReader); -impl LNA_RFB_MATCH_R { - pub(crate) fn new(bits: u8) -> Self { - LNA_RFB_MATCH_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LNA_RFB_MATCH_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lna_rfb_match` writer - "] -pub struct LNA_RFB_MATCH_W<'a> { - w: &'a mut W, -} -impl<'a> LNA_RFB_MATCH_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 16)) | ((value as u32 & 0x07) << 16); - self.w - } -} -#[doc = "Field `lna_load_csw_hw` reader - "] -pub struct LNA_LOAD_CSW_HW_R(crate::FieldReader); -impl LNA_LOAD_CSW_HW_R { - pub(crate) fn new(bits: u8) -> Self { - LNA_LOAD_CSW_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LNA_LOAD_CSW_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lna_load_csw_hw` writer - "] -pub struct LNA_LOAD_CSW_HW_W<'a> { - w: &'a mut W, -} -impl<'a> LNA_LOAD_CSW_HW_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 12)) | ((value as u32 & 0x0f) << 12); - self.w - } -} -#[doc = "Field `lna_load_csw` reader - "] -pub struct LNA_LOAD_CSW_R(crate::FieldReader); -impl LNA_LOAD_CSW_R { - pub(crate) fn new(bits: u8) -> Self { - LNA_LOAD_CSW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LNA_LOAD_CSW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lna_load_csw` writer - "] -pub struct LNA_LOAD_CSW_W<'a> { - w: &'a mut W, -} -impl<'a> LNA_LOAD_CSW_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 8)) | ((value as u32 & 0x0f) << 8); - self.w - } -} -#[doc = "Field `lna_bm_hw` reader - "] -pub struct LNA_BM_HW_R(crate::FieldReader); -impl LNA_BM_HW_R { - pub(crate) fn new(bits: u8) -> Self { - LNA_BM_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LNA_BM_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lna_bm_hw` writer - "] -pub struct LNA_BM_HW_W<'a> { - w: &'a mut W, -} -impl<'a> LNA_BM_HW_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 4)) | ((value as u32 & 0x0f) << 4); - self.w - } -} #[doc = "Field `lna_bm` reader - "] -pub struct LNA_BM_R(crate::FieldReader); -impl LNA_BM_R { - pub(crate) fn new(bits: u8) -> Self { - LNA_BM_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LNA_BM_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type LNA_BM_R = crate::FieldReader; #[doc = "Field `lna_bm` writer - "] -pub struct LNA_BM_W<'a> { - w: &'a mut W, -} -impl<'a> LNA_BM_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x0f) | (value as u32 & 0x0f); - self.w - } -} +pub type LNA_BM_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LNA_SPEC, u8, u8, 4, O>; +#[doc = "Field `lna_bm_hw` reader - "] +pub type LNA_BM_HW_R = crate::FieldReader; +#[doc = "Field `lna_bm_hw` writer - "] +pub type LNA_BM_HW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LNA_SPEC, u8, u8, 4, O>; +#[doc = "Field `lna_load_csw` reader - "] +pub type LNA_LOAD_CSW_R = crate::FieldReader; +#[doc = "Field `lna_load_csw` writer - "] +pub type LNA_LOAD_CSW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LNA_SPEC, u8, u8, 4, O>; +#[doc = "Field `lna_load_csw_hw` reader - "] +pub type LNA_LOAD_CSW_HW_R = crate::FieldReader; +#[doc = "Field `lna_load_csw_hw` writer - "] +pub type LNA_LOAD_CSW_HW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LNA_SPEC, u8, u8, 4, O>; +#[doc = "Field `lna_rfb_match` reader - "] +pub type LNA_RFB_MATCH_R = crate::FieldReader; +#[doc = "Field `lna_rfb_match` writer - "] +pub type LNA_RFB_MATCH_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LNA_SPEC, u8, u8, 3, O>; +#[doc = "Field `lna_cap_lg` reader - "] +pub type LNA_CAP_LG_R = crate::FieldReader; +#[doc = "Field `lna_cap_lg` writer - "] +pub type LNA_CAP_LG_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LNA_SPEC, u8, u8, 2, O>; +#[doc = "Field `lna_lg_gsel` reader - "] +pub type LNA_LG_GSEL_R = crate::FieldReader; +#[doc = "Field `lna_lg_gsel` writer - "] +pub type LNA_LG_GSEL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LNA_SPEC, u8, u8, 3, O>; impl R { - #[doc = "Bits 24:26"] + #[doc = "Bits 0:3"] #[inline(always)] - pub fn lna_lg_gsel(&self) -> LNA_LG_GSEL_R { - LNA_LG_GSEL_R::new(((self.bits >> 24) & 0x07) as u8) + pub fn lna_bm(&self) -> LNA_BM_R { + LNA_BM_R::new((self.bits & 0x0f) as u8) } - #[doc = "Bits 20:21"] + #[doc = "Bits 4:7"] #[inline(always)] - pub fn lna_cap_lg(&self) -> LNA_CAP_LG_R { - LNA_CAP_LG_R::new(((self.bits >> 20) & 0x03) as u8) + pub fn lna_bm_hw(&self) -> LNA_BM_HW_R { + LNA_BM_HW_R::new(((self.bits >> 4) & 0x0f) as u8) } - #[doc = "Bits 16:18"] + #[doc = "Bits 8:11"] #[inline(always)] - pub fn lna_rfb_match(&self) -> LNA_RFB_MATCH_R { - LNA_RFB_MATCH_R::new(((self.bits >> 16) & 0x07) as u8) + pub fn lna_load_csw(&self) -> LNA_LOAD_CSW_R { + LNA_LOAD_CSW_R::new(((self.bits >> 8) & 0x0f) as u8) } #[doc = "Bits 12:15"] #[inline(always)] pub fn lna_load_csw_hw(&self) -> LNA_LOAD_CSW_HW_R { LNA_LOAD_CSW_HW_R::new(((self.bits >> 12) & 0x0f) as u8) } - #[doc = "Bits 8:11"] + #[doc = "Bits 16:18"] #[inline(always)] - pub fn lna_load_csw(&self) -> LNA_LOAD_CSW_R { - LNA_LOAD_CSW_R::new(((self.bits >> 8) & 0x0f) as u8) + pub fn lna_rfb_match(&self) -> LNA_RFB_MATCH_R { + LNA_RFB_MATCH_R::new(((self.bits >> 16) & 7) as u8) } - #[doc = "Bits 4:7"] + #[doc = "Bits 20:21"] #[inline(always)] - pub fn lna_bm_hw(&self) -> LNA_BM_HW_R { - LNA_BM_HW_R::new(((self.bits >> 4) & 0x0f) as u8) + pub fn lna_cap_lg(&self) -> LNA_CAP_LG_R { + LNA_CAP_LG_R::new(((self.bits >> 20) & 3) as u8) } - #[doc = "Bits 0:3"] + #[doc = "Bits 24:26"] #[inline(always)] - pub fn lna_bm(&self) -> LNA_BM_R { - LNA_BM_R::new((self.bits & 0x0f) as u8) + pub fn lna_lg_gsel(&self) -> LNA_LG_GSEL_R { + LNA_LG_GSEL_R::new(((self.bits >> 24) & 7) as u8) } } impl W { - #[doc = "Bits 24:26"] + #[doc = "Bits 0:3"] #[inline(always)] - pub fn lna_lg_gsel(&mut self) -> LNA_LG_GSEL_W { - LNA_LG_GSEL_W { w: self } + #[must_use] + pub fn lna_bm(&mut self) -> LNA_BM_W<0> { + LNA_BM_W::new(self) } - #[doc = "Bits 20:21"] + #[doc = "Bits 4:7"] #[inline(always)] - pub fn lna_cap_lg(&mut self) -> LNA_CAP_LG_W { - LNA_CAP_LG_W { w: self } + #[must_use] + pub fn lna_bm_hw(&mut self) -> LNA_BM_HW_W<4> { + LNA_BM_HW_W::new(self) } - #[doc = "Bits 16:18"] + #[doc = "Bits 8:11"] #[inline(always)] - pub fn lna_rfb_match(&mut self) -> LNA_RFB_MATCH_W { - LNA_RFB_MATCH_W { w: self } + #[must_use] + pub fn lna_load_csw(&mut self) -> LNA_LOAD_CSW_W<8> { + LNA_LOAD_CSW_W::new(self) } #[doc = "Bits 12:15"] #[inline(always)] - pub fn lna_load_csw_hw(&mut self) -> LNA_LOAD_CSW_HW_W { - LNA_LOAD_CSW_HW_W { w: self } + #[must_use] + pub fn lna_load_csw_hw(&mut self) -> LNA_LOAD_CSW_HW_W<12> { + LNA_LOAD_CSW_HW_W::new(self) } - #[doc = "Bits 8:11"] + #[doc = "Bits 16:18"] #[inline(always)] - pub fn lna_load_csw(&mut self) -> LNA_LOAD_CSW_W { - LNA_LOAD_CSW_W { w: self } + #[must_use] + pub fn lna_rfb_match(&mut self) -> LNA_RFB_MATCH_W<16> { + LNA_RFB_MATCH_W::new(self) } - #[doc = "Bits 4:7"] + #[doc = "Bits 20:21"] #[inline(always)] - pub fn lna_bm_hw(&mut self) -> LNA_BM_HW_W { - LNA_BM_HW_W { w: self } + #[must_use] + pub fn lna_cap_lg(&mut self) -> LNA_CAP_LG_W<20> { + LNA_CAP_LG_W::new(self) } - #[doc = "Bits 0:3"] + #[doc = "Bits 24:26"] #[inline(always)] - pub fn lna_bm(&mut self) -> LNA_BM_W { - LNA_BM_W { w: self } + #[must_use] + pub fn lna_lg_gsel(&mut self) -> LNA_LG_GSEL_W<24> { + LNA_LG_GSEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -305,11 +161,10 @@ impl crate::Readable for LNA_SPEC { #[doc = "`write(|w| ..)` method takes [lna::W](W) writer structure"] impl crate::Writable for LNA_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets lna to value 0"] impl crate::Resettable for LNA_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/lna_ctrl_hw_mux.rs b/src/rf/lna_ctrl_hw_mux.rs index a905af5..9d4097f 100644 --- a/src/rf/lna_ctrl_hw_mux.rs +++ b/src/rf/lna_ctrl_hw_mux.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,159 +28,81 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `lna_load_csw_lg` reader - "] -pub struct LNA_LOAD_CSW_LG_R(crate::FieldReader); -impl LNA_LOAD_CSW_LG_R { - pub(crate) fn new(bits: u8) -> Self { - LNA_LOAD_CSW_LG_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LNA_LOAD_CSW_LG_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lna_load_csw_lg` writer - "] -pub struct LNA_LOAD_CSW_LG_W<'a> { - w: &'a mut W, -} -impl<'a> LNA_LOAD_CSW_LG_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 12)) | ((value as u32 & 0x0f) << 12); - self.w - } -} -#[doc = "Field `lna_load_csw_hg` reader - "] -pub struct LNA_LOAD_CSW_HG_R(crate::FieldReader); -impl LNA_LOAD_CSW_HG_R { - pub(crate) fn new(bits: u8) -> Self { - LNA_LOAD_CSW_HG_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LNA_LOAD_CSW_HG_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lna_load_csw_hg` writer - "] -pub struct LNA_LOAD_CSW_HG_W<'a> { - w: &'a mut W, -} -impl<'a> LNA_LOAD_CSW_HG_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 8)) | ((value as u32 & 0x0f) << 8); - self.w - } -} -#[doc = "Field `lna_bm_lg` reader - "] -pub struct LNA_BM_LG_R(crate::FieldReader); -impl LNA_BM_LG_R { - pub(crate) fn new(bits: u8) -> Self { - LNA_BM_LG_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LNA_BM_LG_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lna_bm_lg` writer - "] -pub struct LNA_BM_LG_W<'a> { - w: &'a mut W, -} -impl<'a> LNA_BM_LG_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 4)) | ((value as u32 & 0x0f) << 4); - self.w - } -} #[doc = "Field `lna_bm_hg` reader - "] -pub struct LNA_BM_HG_R(crate::FieldReader); -impl LNA_BM_HG_R { - pub(crate) fn new(bits: u8) -> Self { - LNA_BM_HG_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LNA_BM_HG_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type LNA_BM_HG_R = crate::FieldReader; #[doc = "Field `lna_bm_hg` writer - "] -pub struct LNA_BM_HG_W<'a> { - w: &'a mut W, -} -impl<'a> LNA_BM_HG_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type LNA_BM_HG_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LNA_CTRL_HW_MUX_SPEC, u8, u8, 4, O>; +#[doc = "Field `lna_bm_lg` reader - "] +pub type LNA_BM_LG_R = crate::FieldReader; +#[doc = "Field `lna_bm_lg` writer - "] +pub type LNA_BM_LG_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LNA_CTRL_HW_MUX_SPEC, u8, u8, 4, O>; +#[doc = "Field `lna_load_csw_hg` reader - "] +pub type LNA_LOAD_CSW_HG_R = crate::FieldReader; +#[doc = "Field `lna_load_csw_hg` writer - "] +pub type LNA_LOAD_CSW_HG_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LNA_CTRL_HW_MUX_SPEC, u8, u8, 4, O>; +#[doc = "Field `lna_load_csw_lg` reader - "] +pub type LNA_LOAD_CSW_LG_R = crate::FieldReader; +#[doc = "Field `lna_load_csw_lg` writer - "] +pub type LNA_LOAD_CSW_LG_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LNA_CTRL_HW_MUX_SPEC, u8, u8, 4, O>; +impl R { + #[doc = "Bits 0:3"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x0f) | (value as u32 & 0x0f); - self.w + pub fn lna_bm_hg(&self) -> LNA_BM_HG_R { + LNA_BM_HG_R::new((self.bits & 0x0f) as u8) } -} -impl R { - #[doc = "Bits 12:15"] + #[doc = "Bits 4:7"] #[inline(always)] - pub fn lna_load_csw_lg(&self) -> LNA_LOAD_CSW_LG_R { - LNA_LOAD_CSW_LG_R::new(((self.bits >> 12) & 0x0f) as u8) + pub fn lna_bm_lg(&self) -> LNA_BM_LG_R { + LNA_BM_LG_R::new(((self.bits >> 4) & 0x0f) as u8) } #[doc = "Bits 8:11"] #[inline(always)] pub fn lna_load_csw_hg(&self) -> LNA_LOAD_CSW_HG_R { LNA_LOAD_CSW_HG_R::new(((self.bits >> 8) & 0x0f) as u8) } - #[doc = "Bits 4:7"] - #[inline(always)] - pub fn lna_bm_lg(&self) -> LNA_BM_LG_R { - LNA_BM_LG_R::new(((self.bits >> 4) & 0x0f) as u8) - } - #[doc = "Bits 0:3"] + #[doc = "Bits 12:15"] #[inline(always)] - pub fn lna_bm_hg(&self) -> LNA_BM_HG_R { - LNA_BM_HG_R::new((self.bits & 0x0f) as u8) + pub fn lna_load_csw_lg(&self) -> LNA_LOAD_CSW_LG_R { + LNA_LOAD_CSW_LG_R::new(((self.bits >> 12) & 0x0f) as u8) } } impl W { - #[doc = "Bits 12:15"] + #[doc = "Bits 0:3"] #[inline(always)] - pub fn lna_load_csw_lg(&mut self) -> LNA_LOAD_CSW_LG_W { - LNA_LOAD_CSW_LG_W { w: self } + #[must_use] + pub fn lna_bm_hg(&mut self) -> LNA_BM_HG_W<0> { + LNA_BM_HG_W::new(self) } - #[doc = "Bits 8:11"] + #[doc = "Bits 4:7"] #[inline(always)] - pub fn lna_load_csw_hg(&mut self) -> LNA_LOAD_CSW_HG_W { - LNA_LOAD_CSW_HG_W { w: self } + #[must_use] + pub fn lna_bm_lg(&mut self) -> LNA_BM_LG_W<4> { + LNA_BM_LG_W::new(self) } - #[doc = "Bits 4:7"] + #[doc = "Bits 8:11"] #[inline(always)] - pub fn lna_bm_lg(&mut self) -> LNA_BM_LG_W { - LNA_BM_LG_W { w: self } + #[must_use] + pub fn lna_load_csw_hg(&mut self) -> LNA_LOAD_CSW_HG_W<8> { + LNA_LOAD_CSW_HG_W::new(self) } - #[doc = "Bits 0:3"] + #[doc = "Bits 12:15"] #[inline(always)] - pub fn lna_bm_hg(&mut self) -> LNA_BM_HG_W { - LNA_BM_HG_W { w: self } + #[must_use] + pub fn lna_load_csw_lg(&mut self) -> LNA_LOAD_CSW_LG_W<12> { + LNA_LOAD_CSW_LG_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -197,11 +120,10 @@ impl crate::Readable for LNA_CTRL_HW_MUX_SPEC { #[doc = "`write(|w| ..)` method takes [lna_ctrl_hw_mux::W](W) writer structure"] impl crate::Writable for LNA_CTRL_HW_MUX_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets lna_ctrl_hw_mux to value 0"] impl crate::Resettable for LNA_CTRL_HW_MUX_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/lo.rs b/src/rf/lo.rs index 71696d4..3c4b980 100644 --- a/src/rf/lo.rs +++ b/src/rf/lo.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,369 +28,152 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `lo_slipped_up` reader - "] -pub struct LO_SLIPPED_UP_R(crate::FieldReader); -impl LO_SLIPPED_UP_R { - pub(crate) fn new(bits: bool) -> Self { - LO_SLIPPED_UP_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SLIPPED_UP_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_slipped_up` writer - "] -pub struct LO_SLIPPED_UP_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SLIPPED_UP_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24); - self.w - } -} -#[doc = "Field `lo_slipped_dn` reader - "] -pub struct LO_SLIPPED_DN_R(crate::FieldReader); -impl LO_SLIPPED_DN_R { - pub(crate) fn new(bits: bool) -> Self { - LO_SLIPPED_DN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SLIPPED_DN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_slipped_dn` writer - "] -pub struct LO_SLIPPED_DN_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SLIPPED_DN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w - } -} -#[doc = "Field `lo_lf_r4_short` reader - "] -pub struct LO_LF_R4_SHORT_R(crate::FieldReader); -impl LO_LF_R4_SHORT_R { - pub(crate) fn new(bits: bool) -> Self { - LO_LF_R4_SHORT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_LF_R4_SHORT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_lf_r4_short` writer - "] -pub struct LO_LF_R4_SHORT_W<'a> { - w: &'a mut W, -} -impl<'a> LO_LF_R4_SHORT_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18); - self.w - } -} -#[doc = "Field `lo_lf_r4` reader - "] -pub struct LO_LF_R4_R(crate::FieldReader); -impl LO_LF_R4_R { - pub(crate) fn new(bits: u8) -> Self { - LO_LF_R4_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_LF_R4_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_lf_r4` writer - "] -pub struct LO_LF_R4_W<'a> { - w: &'a mut W, -} -impl<'a> LO_LF_R4_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 16)) | ((value as u32 & 0x03) << 16); - self.w - } -} -#[doc = "Field `lo_lf_cz` reader - "] -pub struct LO_LF_CZ_R(crate::FieldReader); -impl LO_LF_CZ_R { - pub(crate) fn new(bits: u8) -> Self { - LO_LF_CZ_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_LF_CZ_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_lf_cz` writer - "] -pub struct LO_LF_CZ_W<'a> { - w: &'a mut W, -} -impl<'a> LO_LF_CZ_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 14)) | ((value as u32 & 0x03) << 14); - self.w - } -} -#[doc = "Field `lo_lf_rz` reader - "] -pub struct LO_LF_RZ_R(crate::FieldReader); -impl LO_LF_RZ_R { - pub(crate) fn new(bits: u8) -> Self { - LO_LF_RZ_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_LF_RZ_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_lf_rz` writer - "] -pub struct LO_LF_RZ_W<'a> { - w: &'a mut W, -} -impl<'a> LO_LF_RZ_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 12)) | ((value as u32 & 0x03) << 12); - self.w - } -} -#[doc = "Field `lo_lf_cz_hw` reader - "] -pub struct LO_LF_CZ_HW_R(crate::FieldReader); -impl LO_LF_CZ_HW_R { - pub(crate) fn new(bits: u8) -> Self { - LO_LF_CZ_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_LF_CZ_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_lf_cz_hw` writer - "] -pub struct LO_LF_CZ_HW_W<'a> { - w: &'a mut W, -} -impl<'a> LO_LF_CZ_HW_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} -#[doc = "Field `lo_lf_r4_hw` reader - "] -pub struct LO_LF_R4_HW_R(crate::FieldReader); -impl LO_LF_R4_HW_R { - pub(crate) fn new(bits: u8) -> Self { - LO_LF_R4_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_LF_R4_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_lf_r4_hw` writer - "] -pub struct LO_LF_R4_HW_W<'a> { - w: &'a mut W, -} -impl<'a> LO_LF_R4_HW_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 4)) | ((value as u32 & 0x03) << 4); - self.w - } -} #[doc = "Field `lo_lf_rz_hw` reader - "] -pub struct LO_LF_RZ_HW_R(crate::FieldReader); -impl LO_LF_RZ_HW_R { - pub(crate) fn new(bits: u8) -> Self { - LO_LF_RZ_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_LF_RZ_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type LO_LF_RZ_HW_R = crate::FieldReader; #[doc = "Field `lo_lf_rz_hw` writer - "] -pub struct LO_LF_RZ_HW_W<'a> { - w: &'a mut W, -} -impl<'a> LO_LF_RZ_HW_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w - } -} +pub type LO_LF_RZ_HW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LO_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_lf_r4_hw` reader - "] +pub type LO_LF_R4_HW_R = crate::FieldReader; +#[doc = "Field `lo_lf_r4_hw` writer - "] +pub type LO_LF_R4_HW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LO_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_lf_cz_hw` reader - "] +pub type LO_LF_CZ_HW_R = crate::FieldReader; +#[doc = "Field `lo_lf_cz_hw` writer - "] +pub type LO_LF_CZ_HW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LO_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_lf_rz` reader - "] +pub type LO_LF_RZ_R = crate::FieldReader; +#[doc = "Field `lo_lf_rz` writer - "] +pub type LO_LF_RZ_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LO_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_lf_cz` reader - "] +pub type LO_LF_CZ_R = crate::FieldReader; +#[doc = "Field `lo_lf_cz` writer - "] +pub type LO_LF_CZ_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LO_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_lf_r4` reader - "] +pub type LO_LF_R4_R = crate::FieldReader; +#[doc = "Field `lo_lf_r4` writer - "] +pub type LO_LF_R4_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LO_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_lf_r4_short` reader - "] +pub type LO_LF_R4_SHORT_R = crate::BitReader; +#[doc = "Field `lo_lf_r4_short` writer - "] +pub type LO_LF_R4_SHORT_W<'a, const O: u8> = crate::BitWriter<'a, u32, LO_SPEC, bool, O>; +#[doc = "Field `lo_slipped_dn` reader - "] +pub type LO_SLIPPED_DN_R = crate::BitReader; +#[doc = "Field `lo_slipped_dn` writer - "] +pub type LO_SLIPPED_DN_W<'a, const O: u8> = crate::BitWriter<'a, u32, LO_SPEC, bool, O>; +#[doc = "Field `lo_slipped_up` reader - "] +pub type LO_SLIPPED_UP_R = crate::BitReader; +#[doc = "Field `lo_slipped_up` writer - "] +pub type LO_SLIPPED_UP_W<'a, const O: u8> = crate::BitWriter<'a, u32, LO_SPEC, bool, O>; impl R { - #[doc = "Bit 24"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn lo_slipped_up(&self) -> LO_SLIPPED_UP_R { - LO_SLIPPED_UP_R::new(((self.bits >> 24) & 0x01) != 0) + pub fn lo_lf_rz_hw(&self) -> LO_LF_RZ_HW_R { + LO_LF_RZ_HW_R::new((self.bits & 3) as u8) } - #[doc = "Bit 20"] + #[doc = "Bits 4:5"] #[inline(always)] - pub fn lo_slipped_dn(&self) -> LO_SLIPPED_DN_R { - LO_SLIPPED_DN_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn lo_lf_r4_hw(&self) -> LO_LF_R4_HW_R { + LO_LF_R4_HW_R::new(((self.bits >> 4) & 3) as u8) } - #[doc = "Bit 18"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn lo_lf_r4_short(&self) -> LO_LF_R4_SHORT_R { - LO_LF_R4_SHORT_R::new(((self.bits >> 18) & 0x01) != 0) + pub fn lo_lf_cz_hw(&self) -> LO_LF_CZ_HW_R { + LO_LF_CZ_HW_R::new(((self.bits >> 8) & 3) as u8) } - #[doc = "Bits 16:17"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn lo_lf_r4(&self) -> LO_LF_R4_R { - LO_LF_R4_R::new(((self.bits >> 16) & 0x03) as u8) + pub fn lo_lf_rz(&self) -> LO_LF_RZ_R { + LO_LF_RZ_R::new(((self.bits >> 12) & 3) as u8) } #[doc = "Bits 14:15"] #[inline(always)] pub fn lo_lf_cz(&self) -> LO_LF_CZ_R { - LO_LF_CZ_R::new(((self.bits >> 14) & 0x03) as u8) + LO_LF_CZ_R::new(((self.bits >> 14) & 3) as u8) } - #[doc = "Bits 12:13"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn lo_lf_rz(&self) -> LO_LF_RZ_R { - LO_LF_RZ_R::new(((self.bits >> 12) & 0x03) as u8) + pub fn lo_lf_r4(&self) -> LO_LF_R4_R { + LO_LF_R4_R::new(((self.bits >> 16) & 3) as u8) } - #[doc = "Bits 8:9"] + #[doc = "Bit 18"] #[inline(always)] - pub fn lo_lf_cz_hw(&self) -> LO_LF_CZ_HW_R { - LO_LF_CZ_HW_R::new(((self.bits >> 8) & 0x03) as u8) + pub fn lo_lf_r4_short(&self) -> LO_LF_R4_SHORT_R { + LO_LF_R4_SHORT_R::new(((self.bits >> 18) & 1) != 0) } - #[doc = "Bits 4:5"] + #[doc = "Bit 20"] #[inline(always)] - pub fn lo_lf_r4_hw(&self) -> LO_LF_R4_HW_R { - LO_LF_R4_HW_R::new(((self.bits >> 4) & 0x03) as u8) + pub fn lo_slipped_dn(&self) -> LO_SLIPPED_DN_R { + LO_SLIPPED_DN_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bits 0:1"] + #[doc = "Bit 24"] #[inline(always)] - pub fn lo_lf_rz_hw(&self) -> LO_LF_RZ_HW_R { - LO_LF_RZ_HW_R::new((self.bits & 0x03) as u8) + pub fn lo_slipped_up(&self) -> LO_SLIPPED_UP_R { + LO_SLIPPED_UP_R::new(((self.bits >> 24) & 1) != 0) } } impl W { - #[doc = "Bit 24"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn lo_slipped_up(&mut self) -> LO_SLIPPED_UP_W { - LO_SLIPPED_UP_W { w: self } + #[must_use] + pub fn lo_lf_rz_hw(&mut self) -> LO_LF_RZ_HW_W<0> { + LO_LF_RZ_HW_W::new(self) } - #[doc = "Bit 20"] + #[doc = "Bits 4:5"] #[inline(always)] - pub fn lo_slipped_dn(&mut self) -> LO_SLIPPED_DN_W { - LO_SLIPPED_DN_W { w: self } + #[must_use] + pub fn lo_lf_r4_hw(&mut self) -> LO_LF_R4_HW_W<4> { + LO_LF_R4_HW_W::new(self) } - #[doc = "Bit 18"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn lo_lf_r4_short(&mut self) -> LO_LF_R4_SHORT_W { - LO_LF_R4_SHORT_W { w: self } + #[must_use] + pub fn lo_lf_cz_hw(&mut self) -> LO_LF_CZ_HW_W<8> { + LO_LF_CZ_HW_W::new(self) } - #[doc = "Bits 16:17"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn lo_lf_r4(&mut self) -> LO_LF_R4_W { - LO_LF_R4_W { w: self } + #[must_use] + pub fn lo_lf_rz(&mut self) -> LO_LF_RZ_W<12> { + LO_LF_RZ_W::new(self) } #[doc = "Bits 14:15"] #[inline(always)] - pub fn lo_lf_cz(&mut self) -> LO_LF_CZ_W { - LO_LF_CZ_W { w: self } + #[must_use] + pub fn lo_lf_cz(&mut self) -> LO_LF_CZ_W<14> { + LO_LF_CZ_W::new(self) } - #[doc = "Bits 12:13"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn lo_lf_rz(&mut self) -> LO_LF_RZ_W { - LO_LF_RZ_W { w: self } + #[must_use] + pub fn lo_lf_r4(&mut self) -> LO_LF_R4_W<16> { + LO_LF_R4_W::new(self) } - #[doc = "Bits 8:9"] + #[doc = "Bit 18"] #[inline(always)] - pub fn lo_lf_cz_hw(&mut self) -> LO_LF_CZ_HW_W { - LO_LF_CZ_HW_W { w: self } + #[must_use] + pub fn lo_lf_r4_short(&mut self) -> LO_LF_R4_SHORT_W<18> { + LO_LF_R4_SHORT_W::new(self) } - #[doc = "Bits 4:5"] + #[doc = "Bit 20"] #[inline(always)] - pub fn lo_lf_r4_hw(&mut self) -> LO_LF_R4_HW_W { - LO_LF_R4_HW_W { w: self } + #[must_use] + pub fn lo_slipped_dn(&mut self) -> LO_SLIPPED_DN_W<20> { + LO_SLIPPED_DN_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bit 24"] #[inline(always)] - pub fn lo_lf_rz_hw(&mut self) -> LO_LF_RZ_HW_W { - LO_LF_RZ_HW_W { w: self } + #[must_use] + pub fn lo_slipped_up(&mut self) -> LO_SLIPPED_UP_W<24> { + LO_SLIPPED_UP_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -407,11 +191,10 @@ impl crate::Readable for LO_SPEC { #[doc = "`write(|w| ..)` method takes [lo::W](W) writer structure"] impl crate::Writable for LO_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets lo to value 0"] impl crate::Resettable for LO_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/lo_cal_ctrl_hw1.rs b/src/rf/lo_cal_ctrl_hw1.rs index 7372993..b076a2a 100644 --- a/src/rf/lo_cal_ctrl_hw1.rs +++ b/src/rf/lo_cal_ctrl_hw1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,159 +28,81 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `lo_vco_freq_cw_2408` reader - "] -pub struct LO_VCO_FREQ_CW_2408_R(crate::FieldReader); -impl LO_VCO_FREQ_CW_2408_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_FREQ_CW_2408_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_FREQ_CW_2408_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_freq_cw_2408` writer - "] -pub struct LO_VCO_FREQ_CW_2408_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_FREQ_CW_2408_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 24)) | ((value as u32 & 0xff) << 24); - self.w - } -} -#[doc = "Field `lo_vco_idac_cw_2408` reader - "] -pub struct LO_VCO_IDAC_CW_2408_R(crate::FieldReader); -impl LO_VCO_IDAC_CW_2408_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_IDAC_CW_2408_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_IDAC_CW_2408_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_idac_cw_2408` writer - "] -pub struct LO_VCO_IDAC_CW_2408_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_IDAC_CW_2408_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 16)) | ((value as u32 & 0x1f) << 16); - self.w - } -} -#[doc = "Field `lo_vco_freq_cw_2404` reader - "] -pub struct LO_VCO_FREQ_CW_2404_R(crate::FieldReader); -impl LO_VCO_FREQ_CW_2404_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_FREQ_CW_2404_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_FREQ_CW_2404_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_freq_cw_2404` writer - "] -pub struct LO_VCO_FREQ_CW_2404_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_FREQ_CW_2404_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8); - self.w - } -} #[doc = "Field `lo_vco_idac_cw_2404` reader - "] -pub struct LO_VCO_IDAC_CW_2404_R(crate::FieldReader); -impl LO_VCO_IDAC_CW_2404_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_IDAC_CW_2404_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_IDAC_CW_2404_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type LO_VCO_IDAC_CW_2404_R = crate::FieldReader; #[doc = "Field `lo_vco_idac_cw_2404` writer - "] -pub struct LO_VCO_IDAC_CW_2404_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_IDAC_CW_2404_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type LO_VCO_IDAC_CW_2404_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW1_SPEC, u8, u8, 5, O>; +#[doc = "Field `lo_vco_freq_cw_2404` reader - "] +pub type LO_VCO_FREQ_CW_2404_R = crate::FieldReader; +#[doc = "Field `lo_vco_freq_cw_2404` writer - "] +pub type LO_VCO_FREQ_CW_2404_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW1_SPEC, u8, u8, 8, O>; +#[doc = "Field `lo_vco_idac_cw_2408` reader - "] +pub type LO_VCO_IDAC_CW_2408_R = crate::FieldReader; +#[doc = "Field `lo_vco_idac_cw_2408` writer - "] +pub type LO_VCO_IDAC_CW_2408_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW1_SPEC, u8, u8, 5, O>; +#[doc = "Field `lo_vco_freq_cw_2408` reader - "] +pub type LO_VCO_FREQ_CW_2408_R = crate::FieldReader; +#[doc = "Field `lo_vco_freq_cw_2408` writer - "] +pub type LO_VCO_FREQ_CW_2408_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW1_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:4"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x1f) | (value as u32 & 0x1f); - self.w + pub fn lo_vco_idac_cw_2404(&self) -> LO_VCO_IDAC_CW_2404_R { + LO_VCO_IDAC_CW_2404_R::new((self.bits & 0x1f) as u8) } -} -impl R { - #[doc = "Bits 24:31"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn lo_vco_freq_cw_2408(&self) -> LO_VCO_FREQ_CW_2408_R { - LO_VCO_FREQ_CW_2408_R::new(((self.bits >> 24) & 0xff) as u8) + pub fn lo_vco_freq_cw_2404(&self) -> LO_VCO_FREQ_CW_2404_R { + LO_VCO_FREQ_CW_2404_R::new(((self.bits >> 8) & 0xff) as u8) } #[doc = "Bits 16:20"] #[inline(always)] pub fn lo_vco_idac_cw_2408(&self) -> LO_VCO_IDAC_CW_2408_R { LO_VCO_IDAC_CW_2408_R::new(((self.bits >> 16) & 0x1f) as u8) } - #[doc = "Bits 8:15"] - #[inline(always)] - pub fn lo_vco_freq_cw_2404(&self) -> LO_VCO_FREQ_CW_2404_R { - LO_VCO_FREQ_CW_2404_R::new(((self.bits >> 8) & 0xff) as u8) - } - #[doc = "Bits 0:4"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn lo_vco_idac_cw_2404(&self) -> LO_VCO_IDAC_CW_2404_R { - LO_VCO_IDAC_CW_2404_R::new((self.bits & 0x1f) as u8) + pub fn lo_vco_freq_cw_2408(&self) -> LO_VCO_FREQ_CW_2408_R { + LO_VCO_FREQ_CW_2408_R::new(((self.bits >> 24) & 0xff) as u8) } } impl W { - #[doc = "Bits 24:31"] + #[doc = "Bits 0:4"] #[inline(always)] - pub fn lo_vco_freq_cw_2408(&mut self) -> LO_VCO_FREQ_CW_2408_W { - LO_VCO_FREQ_CW_2408_W { w: self } + #[must_use] + pub fn lo_vco_idac_cw_2404(&mut self) -> LO_VCO_IDAC_CW_2404_W<0> { + LO_VCO_IDAC_CW_2404_W::new(self) } - #[doc = "Bits 16:20"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn lo_vco_idac_cw_2408(&mut self) -> LO_VCO_IDAC_CW_2408_W { - LO_VCO_IDAC_CW_2408_W { w: self } + #[must_use] + pub fn lo_vco_freq_cw_2404(&mut self) -> LO_VCO_FREQ_CW_2404_W<8> { + LO_VCO_FREQ_CW_2404_W::new(self) } - #[doc = "Bits 8:15"] + #[doc = "Bits 16:20"] #[inline(always)] - pub fn lo_vco_freq_cw_2404(&mut self) -> LO_VCO_FREQ_CW_2404_W { - LO_VCO_FREQ_CW_2404_W { w: self } + #[must_use] + pub fn lo_vco_idac_cw_2408(&mut self) -> LO_VCO_IDAC_CW_2408_W<16> { + LO_VCO_IDAC_CW_2408_W::new(self) } - #[doc = "Bits 0:4"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn lo_vco_idac_cw_2404(&mut self) -> LO_VCO_IDAC_CW_2404_W { - LO_VCO_IDAC_CW_2404_W { w: self } + #[must_use] + pub fn lo_vco_freq_cw_2408(&mut self) -> LO_VCO_FREQ_CW_2408_W<24> { + LO_VCO_FREQ_CW_2408_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -197,11 +120,10 @@ impl crate::Readable for LO_CAL_CTRL_HW1_SPEC { #[doc = "`write(|w| ..)` method takes [lo_cal_ctrl_hw1::W](W) writer structure"] impl crate::Writable for LO_CAL_CTRL_HW1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets lo_cal_ctrl_hw1 to value 0"] impl crate::Resettable for LO_CAL_CTRL_HW1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/lo_cal_ctrl_hw10.rs b/src/rf/lo_cal_ctrl_hw10.rs index 2f42f3d..d03446e 100644 --- a/src/rf/lo_cal_ctrl_hw10.rs +++ b/src/rf/lo_cal_ctrl_hw10.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,159 +28,81 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `lo_vco_freq_cw_2480` reader - "] -pub struct LO_VCO_FREQ_CW_2480_R(crate::FieldReader); -impl LO_VCO_FREQ_CW_2480_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_FREQ_CW_2480_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_FREQ_CW_2480_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_freq_cw_2480` writer - "] -pub struct LO_VCO_FREQ_CW_2480_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_FREQ_CW_2480_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 24)) | ((value as u32 & 0xff) << 24); - self.w - } -} -#[doc = "Field `lo_vco_idac_cw_2480` reader - "] -pub struct LO_VCO_IDAC_CW_2480_R(crate::FieldReader); -impl LO_VCO_IDAC_CW_2480_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_IDAC_CW_2480_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_IDAC_CW_2480_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_idac_cw_2480` writer - "] -pub struct LO_VCO_IDAC_CW_2480_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_IDAC_CW_2480_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 16)) | ((value as u32 & 0x1f) << 16); - self.w - } -} -#[doc = "Field `lo_vco_freq_cw_2476` reader - "] -pub struct LO_VCO_FREQ_CW_2476_R(crate::FieldReader); -impl LO_VCO_FREQ_CW_2476_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_FREQ_CW_2476_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_FREQ_CW_2476_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_freq_cw_2476` writer - "] -pub struct LO_VCO_FREQ_CW_2476_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_FREQ_CW_2476_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8); - self.w - } -} #[doc = "Field `lo_vco_idac_cw_2476` reader - "] -pub struct LO_VCO_IDAC_CW_2476_R(crate::FieldReader); -impl LO_VCO_IDAC_CW_2476_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_IDAC_CW_2476_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_IDAC_CW_2476_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type LO_VCO_IDAC_CW_2476_R = crate::FieldReader; #[doc = "Field `lo_vco_idac_cw_2476` writer - "] -pub struct LO_VCO_IDAC_CW_2476_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_IDAC_CW_2476_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type LO_VCO_IDAC_CW_2476_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW10_SPEC, u8, u8, 5, O>; +#[doc = "Field `lo_vco_freq_cw_2476` reader - "] +pub type LO_VCO_FREQ_CW_2476_R = crate::FieldReader; +#[doc = "Field `lo_vco_freq_cw_2476` writer - "] +pub type LO_VCO_FREQ_CW_2476_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW10_SPEC, u8, u8, 8, O>; +#[doc = "Field `lo_vco_idac_cw_2480` reader - "] +pub type LO_VCO_IDAC_CW_2480_R = crate::FieldReader; +#[doc = "Field `lo_vco_idac_cw_2480` writer - "] +pub type LO_VCO_IDAC_CW_2480_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW10_SPEC, u8, u8, 5, O>; +#[doc = "Field `lo_vco_freq_cw_2480` reader - "] +pub type LO_VCO_FREQ_CW_2480_R = crate::FieldReader; +#[doc = "Field `lo_vco_freq_cw_2480` writer - "] +pub type LO_VCO_FREQ_CW_2480_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW10_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:4"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x1f) | (value as u32 & 0x1f); - self.w + pub fn lo_vco_idac_cw_2476(&self) -> LO_VCO_IDAC_CW_2476_R { + LO_VCO_IDAC_CW_2476_R::new((self.bits & 0x1f) as u8) } -} -impl R { - #[doc = "Bits 24:31"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn lo_vco_freq_cw_2480(&self) -> LO_VCO_FREQ_CW_2480_R { - LO_VCO_FREQ_CW_2480_R::new(((self.bits >> 24) & 0xff) as u8) + pub fn lo_vco_freq_cw_2476(&self) -> LO_VCO_FREQ_CW_2476_R { + LO_VCO_FREQ_CW_2476_R::new(((self.bits >> 8) & 0xff) as u8) } #[doc = "Bits 16:20"] #[inline(always)] pub fn lo_vco_idac_cw_2480(&self) -> LO_VCO_IDAC_CW_2480_R { LO_VCO_IDAC_CW_2480_R::new(((self.bits >> 16) & 0x1f) as u8) } - #[doc = "Bits 8:15"] - #[inline(always)] - pub fn lo_vco_freq_cw_2476(&self) -> LO_VCO_FREQ_CW_2476_R { - LO_VCO_FREQ_CW_2476_R::new(((self.bits >> 8) & 0xff) as u8) - } - #[doc = "Bits 0:4"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn lo_vco_idac_cw_2476(&self) -> LO_VCO_IDAC_CW_2476_R { - LO_VCO_IDAC_CW_2476_R::new((self.bits & 0x1f) as u8) + pub fn lo_vco_freq_cw_2480(&self) -> LO_VCO_FREQ_CW_2480_R { + LO_VCO_FREQ_CW_2480_R::new(((self.bits >> 24) & 0xff) as u8) } } impl W { - #[doc = "Bits 24:31"] + #[doc = "Bits 0:4"] #[inline(always)] - pub fn lo_vco_freq_cw_2480(&mut self) -> LO_VCO_FREQ_CW_2480_W { - LO_VCO_FREQ_CW_2480_W { w: self } + #[must_use] + pub fn lo_vco_idac_cw_2476(&mut self) -> LO_VCO_IDAC_CW_2476_W<0> { + LO_VCO_IDAC_CW_2476_W::new(self) } - #[doc = "Bits 16:20"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn lo_vco_idac_cw_2480(&mut self) -> LO_VCO_IDAC_CW_2480_W { - LO_VCO_IDAC_CW_2480_W { w: self } + #[must_use] + pub fn lo_vco_freq_cw_2476(&mut self) -> LO_VCO_FREQ_CW_2476_W<8> { + LO_VCO_FREQ_CW_2476_W::new(self) } - #[doc = "Bits 8:15"] + #[doc = "Bits 16:20"] #[inline(always)] - pub fn lo_vco_freq_cw_2476(&mut self) -> LO_VCO_FREQ_CW_2476_W { - LO_VCO_FREQ_CW_2476_W { w: self } + #[must_use] + pub fn lo_vco_idac_cw_2480(&mut self) -> LO_VCO_IDAC_CW_2480_W<16> { + LO_VCO_IDAC_CW_2480_W::new(self) } - #[doc = "Bits 0:4"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn lo_vco_idac_cw_2476(&mut self) -> LO_VCO_IDAC_CW_2476_W { - LO_VCO_IDAC_CW_2476_W { w: self } + #[must_use] + pub fn lo_vco_freq_cw_2480(&mut self) -> LO_VCO_FREQ_CW_2480_W<24> { + LO_VCO_FREQ_CW_2480_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -197,11 +120,10 @@ impl crate::Readable for LO_CAL_CTRL_HW10_SPEC { #[doc = "`write(|w| ..)` method takes [lo_cal_ctrl_hw10::W](W) writer structure"] impl crate::Writable for LO_CAL_CTRL_HW10_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets lo_cal_ctrl_hw10 to value 0"] impl crate::Resettable for LO_CAL_CTRL_HW10_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/lo_cal_ctrl_hw11.rs b/src/rf/lo_cal_ctrl_hw11.rs index 663fe3a..917dee1 100644 --- a/src/rf/lo_cal_ctrl_hw11.rs +++ b/src/rf/lo_cal_ctrl_hw11.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,87 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `lo_vco_freq_cw_2484` reader - "] -pub struct LO_VCO_FREQ_CW_2484_R(crate::FieldReader); -impl LO_VCO_FREQ_CW_2484_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_FREQ_CW_2484_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_FREQ_CW_2484_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_freq_cw_2484` writer - "] -pub struct LO_VCO_FREQ_CW_2484_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_FREQ_CW_2484_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8); - self.w - } -} #[doc = "Field `lo_vco_idac_cw_2484` reader - "] -pub struct LO_VCO_IDAC_CW_2484_R(crate::FieldReader); -impl LO_VCO_IDAC_CW_2484_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_IDAC_CW_2484_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_IDAC_CW_2484_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type LO_VCO_IDAC_CW_2484_R = crate::FieldReader; #[doc = "Field `lo_vco_idac_cw_2484` writer - "] -pub struct LO_VCO_IDAC_CW_2484_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_IDAC_CW_2484_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type LO_VCO_IDAC_CW_2484_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW11_SPEC, u8, u8, 5, O>; +#[doc = "Field `lo_vco_freq_cw_2484` reader - "] +pub type LO_VCO_FREQ_CW_2484_R = crate::FieldReader; +#[doc = "Field `lo_vco_freq_cw_2484` writer - "] +pub type LO_VCO_FREQ_CW_2484_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW11_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:4"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x1f) | (value as u32 & 0x1f); - self.w + pub fn lo_vco_idac_cw_2484(&self) -> LO_VCO_IDAC_CW_2484_R { + LO_VCO_IDAC_CW_2484_R::new((self.bits & 0x1f) as u8) } -} -impl R { #[doc = "Bits 8:15"] #[inline(always)] pub fn lo_vco_freq_cw_2484(&self) -> LO_VCO_FREQ_CW_2484_R { LO_VCO_FREQ_CW_2484_R::new(((self.bits >> 8) & 0xff) as u8) } - #[doc = "Bits 0:4"] - #[inline(always)] - pub fn lo_vco_idac_cw_2484(&self) -> LO_VCO_IDAC_CW_2484_R { - LO_VCO_IDAC_CW_2484_R::new((self.bits & 0x1f) as u8) - } } impl W { - #[doc = "Bits 8:15"] + #[doc = "Bits 0:4"] #[inline(always)] - pub fn lo_vco_freq_cw_2484(&mut self) -> LO_VCO_FREQ_CW_2484_W { - LO_VCO_FREQ_CW_2484_W { w: self } + #[must_use] + pub fn lo_vco_idac_cw_2484(&mut self) -> LO_VCO_IDAC_CW_2484_W<0> { + LO_VCO_IDAC_CW_2484_W::new(self) } - #[doc = "Bits 0:4"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn lo_vco_idac_cw_2484(&mut self) -> LO_VCO_IDAC_CW_2484_W { - LO_VCO_IDAC_CW_2484_W { w: self } + #[must_use] + pub fn lo_vco_freq_cw_2484(&mut self) -> LO_VCO_FREQ_CW_2484_W<8> { + LO_VCO_FREQ_CW_2484_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -125,11 +88,10 @@ impl crate::Readable for LO_CAL_CTRL_HW11_SPEC { #[doc = "`write(|w| ..)` method takes [lo_cal_ctrl_hw11::W](W) writer structure"] impl crate::Writable for LO_CAL_CTRL_HW11_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets lo_cal_ctrl_hw11 to value 0"] impl crate::Resettable for LO_CAL_CTRL_HW11_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/lo_cal_ctrl_hw2.rs b/src/rf/lo_cal_ctrl_hw2.rs index eec32cb..39e0539 100644 --- a/src/rf/lo_cal_ctrl_hw2.rs +++ b/src/rf/lo_cal_ctrl_hw2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,159 +28,81 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `lo_vco_freq_cw_2416` reader - "] -pub struct LO_VCO_FREQ_CW_2416_R(crate::FieldReader); -impl LO_VCO_FREQ_CW_2416_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_FREQ_CW_2416_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_FREQ_CW_2416_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_freq_cw_2416` writer - "] -pub struct LO_VCO_FREQ_CW_2416_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_FREQ_CW_2416_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 24)) | ((value as u32 & 0xff) << 24); - self.w - } -} -#[doc = "Field `lo_vco_idac_cw_2416` reader - "] -pub struct LO_VCO_IDAC_CW_2416_R(crate::FieldReader); -impl LO_VCO_IDAC_CW_2416_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_IDAC_CW_2416_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_IDAC_CW_2416_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_idac_cw_2416` writer - "] -pub struct LO_VCO_IDAC_CW_2416_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_IDAC_CW_2416_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 16)) | ((value as u32 & 0x1f) << 16); - self.w - } -} -#[doc = "Field `lo_vco_freq_cw_2412` reader - "] -pub struct LO_VCO_FREQ_CW_2412_R(crate::FieldReader); -impl LO_VCO_FREQ_CW_2412_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_FREQ_CW_2412_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_FREQ_CW_2412_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_freq_cw_2412` writer - "] -pub struct LO_VCO_FREQ_CW_2412_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_FREQ_CW_2412_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8); - self.w - } -} #[doc = "Field `lo_vco_idac_cw_2412` reader - "] -pub struct LO_VCO_IDAC_CW_2412_R(crate::FieldReader); -impl LO_VCO_IDAC_CW_2412_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_IDAC_CW_2412_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_IDAC_CW_2412_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type LO_VCO_IDAC_CW_2412_R = crate::FieldReader; #[doc = "Field `lo_vco_idac_cw_2412` writer - "] -pub struct LO_VCO_IDAC_CW_2412_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_IDAC_CW_2412_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type LO_VCO_IDAC_CW_2412_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW2_SPEC, u8, u8, 5, O>; +#[doc = "Field `lo_vco_freq_cw_2412` reader - "] +pub type LO_VCO_FREQ_CW_2412_R = crate::FieldReader; +#[doc = "Field `lo_vco_freq_cw_2412` writer - "] +pub type LO_VCO_FREQ_CW_2412_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW2_SPEC, u8, u8, 8, O>; +#[doc = "Field `lo_vco_idac_cw_2416` reader - "] +pub type LO_VCO_IDAC_CW_2416_R = crate::FieldReader; +#[doc = "Field `lo_vco_idac_cw_2416` writer - "] +pub type LO_VCO_IDAC_CW_2416_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW2_SPEC, u8, u8, 5, O>; +#[doc = "Field `lo_vco_freq_cw_2416` reader - "] +pub type LO_VCO_FREQ_CW_2416_R = crate::FieldReader; +#[doc = "Field `lo_vco_freq_cw_2416` writer - "] +pub type LO_VCO_FREQ_CW_2416_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW2_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:4"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x1f) | (value as u32 & 0x1f); - self.w + pub fn lo_vco_idac_cw_2412(&self) -> LO_VCO_IDAC_CW_2412_R { + LO_VCO_IDAC_CW_2412_R::new((self.bits & 0x1f) as u8) } -} -impl R { - #[doc = "Bits 24:31"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn lo_vco_freq_cw_2416(&self) -> LO_VCO_FREQ_CW_2416_R { - LO_VCO_FREQ_CW_2416_R::new(((self.bits >> 24) & 0xff) as u8) + pub fn lo_vco_freq_cw_2412(&self) -> LO_VCO_FREQ_CW_2412_R { + LO_VCO_FREQ_CW_2412_R::new(((self.bits >> 8) & 0xff) as u8) } #[doc = "Bits 16:20"] #[inline(always)] pub fn lo_vco_idac_cw_2416(&self) -> LO_VCO_IDAC_CW_2416_R { LO_VCO_IDAC_CW_2416_R::new(((self.bits >> 16) & 0x1f) as u8) } - #[doc = "Bits 8:15"] - #[inline(always)] - pub fn lo_vco_freq_cw_2412(&self) -> LO_VCO_FREQ_CW_2412_R { - LO_VCO_FREQ_CW_2412_R::new(((self.bits >> 8) & 0xff) as u8) - } - #[doc = "Bits 0:4"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn lo_vco_idac_cw_2412(&self) -> LO_VCO_IDAC_CW_2412_R { - LO_VCO_IDAC_CW_2412_R::new((self.bits & 0x1f) as u8) + pub fn lo_vco_freq_cw_2416(&self) -> LO_VCO_FREQ_CW_2416_R { + LO_VCO_FREQ_CW_2416_R::new(((self.bits >> 24) & 0xff) as u8) } } impl W { - #[doc = "Bits 24:31"] + #[doc = "Bits 0:4"] #[inline(always)] - pub fn lo_vco_freq_cw_2416(&mut self) -> LO_VCO_FREQ_CW_2416_W { - LO_VCO_FREQ_CW_2416_W { w: self } + #[must_use] + pub fn lo_vco_idac_cw_2412(&mut self) -> LO_VCO_IDAC_CW_2412_W<0> { + LO_VCO_IDAC_CW_2412_W::new(self) } - #[doc = "Bits 16:20"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn lo_vco_idac_cw_2416(&mut self) -> LO_VCO_IDAC_CW_2416_W { - LO_VCO_IDAC_CW_2416_W { w: self } + #[must_use] + pub fn lo_vco_freq_cw_2412(&mut self) -> LO_VCO_FREQ_CW_2412_W<8> { + LO_VCO_FREQ_CW_2412_W::new(self) } - #[doc = "Bits 8:15"] + #[doc = "Bits 16:20"] #[inline(always)] - pub fn lo_vco_freq_cw_2412(&mut self) -> LO_VCO_FREQ_CW_2412_W { - LO_VCO_FREQ_CW_2412_W { w: self } + #[must_use] + pub fn lo_vco_idac_cw_2416(&mut self) -> LO_VCO_IDAC_CW_2416_W<16> { + LO_VCO_IDAC_CW_2416_W::new(self) } - #[doc = "Bits 0:4"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn lo_vco_idac_cw_2412(&mut self) -> LO_VCO_IDAC_CW_2412_W { - LO_VCO_IDAC_CW_2412_W { w: self } + #[must_use] + pub fn lo_vco_freq_cw_2416(&mut self) -> LO_VCO_FREQ_CW_2416_W<24> { + LO_VCO_FREQ_CW_2416_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -197,11 +120,10 @@ impl crate::Readable for LO_CAL_CTRL_HW2_SPEC { #[doc = "`write(|w| ..)` method takes [lo_cal_ctrl_hw2::W](W) writer structure"] impl crate::Writable for LO_CAL_CTRL_HW2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets lo_cal_ctrl_hw2 to value 0"] impl crate::Resettable for LO_CAL_CTRL_HW2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/lo_cal_ctrl_hw3.rs b/src/rf/lo_cal_ctrl_hw3.rs index fcb0493..ac7aa8f 100644 --- a/src/rf/lo_cal_ctrl_hw3.rs +++ b/src/rf/lo_cal_ctrl_hw3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,159 +28,81 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `lo_vco_freq_cw_2424` reader - "] -pub struct LO_VCO_FREQ_CW_2424_R(crate::FieldReader); -impl LO_VCO_FREQ_CW_2424_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_FREQ_CW_2424_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_FREQ_CW_2424_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_freq_cw_2424` writer - "] -pub struct LO_VCO_FREQ_CW_2424_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_FREQ_CW_2424_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 24)) | ((value as u32 & 0xff) << 24); - self.w - } -} -#[doc = "Field `lo_vco_idac_cw_2424` reader - "] -pub struct LO_VCO_IDAC_CW_2424_R(crate::FieldReader); -impl LO_VCO_IDAC_CW_2424_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_IDAC_CW_2424_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_IDAC_CW_2424_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_idac_cw_2424` writer - "] -pub struct LO_VCO_IDAC_CW_2424_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_IDAC_CW_2424_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 16)) | ((value as u32 & 0x1f) << 16); - self.w - } -} -#[doc = "Field `lo_vco_freq_cw_2420` reader - "] -pub struct LO_VCO_FREQ_CW_2420_R(crate::FieldReader); -impl LO_VCO_FREQ_CW_2420_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_FREQ_CW_2420_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_FREQ_CW_2420_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_freq_cw_2420` writer - "] -pub struct LO_VCO_FREQ_CW_2420_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_FREQ_CW_2420_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8); - self.w - } -} #[doc = "Field `lo_vco_idac_cw_2420` reader - "] -pub struct LO_VCO_IDAC_CW_2420_R(crate::FieldReader); -impl LO_VCO_IDAC_CW_2420_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_IDAC_CW_2420_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_IDAC_CW_2420_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type LO_VCO_IDAC_CW_2420_R = crate::FieldReader; #[doc = "Field `lo_vco_idac_cw_2420` writer - "] -pub struct LO_VCO_IDAC_CW_2420_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_IDAC_CW_2420_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type LO_VCO_IDAC_CW_2420_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW3_SPEC, u8, u8, 5, O>; +#[doc = "Field `lo_vco_freq_cw_2420` reader - "] +pub type LO_VCO_FREQ_CW_2420_R = crate::FieldReader; +#[doc = "Field `lo_vco_freq_cw_2420` writer - "] +pub type LO_VCO_FREQ_CW_2420_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW3_SPEC, u8, u8, 8, O>; +#[doc = "Field `lo_vco_idac_cw_2424` reader - "] +pub type LO_VCO_IDAC_CW_2424_R = crate::FieldReader; +#[doc = "Field `lo_vco_idac_cw_2424` writer - "] +pub type LO_VCO_IDAC_CW_2424_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW3_SPEC, u8, u8, 5, O>; +#[doc = "Field `lo_vco_freq_cw_2424` reader - "] +pub type LO_VCO_FREQ_CW_2424_R = crate::FieldReader; +#[doc = "Field `lo_vco_freq_cw_2424` writer - "] +pub type LO_VCO_FREQ_CW_2424_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW3_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:4"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x1f) | (value as u32 & 0x1f); - self.w + pub fn lo_vco_idac_cw_2420(&self) -> LO_VCO_IDAC_CW_2420_R { + LO_VCO_IDAC_CW_2420_R::new((self.bits & 0x1f) as u8) } -} -impl R { - #[doc = "Bits 24:31"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn lo_vco_freq_cw_2424(&self) -> LO_VCO_FREQ_CW_2424_R { - LO_VCO_FREQ_CW_2424_R::new(((self.bits >> 24) & 0xff) as u8) + pub fn lo_vco_freq_cw_2420(&self) -> LO_VCO_FREQ_CW_2420_R { + LO_VCO_FREQ_CW_2420_R::new(((self.bits >> 8) & 0xff) as u8) } #[doc = "Bits 16:20"] #[inline(always)] pub fn lo_vco_idac_cw_2424(&self) -> LO_VCO_IDAC_CW_2424_R { LO_VCO_IDAC_CW_2424_R::new(((self.bits >> 16) & 0x1f) as u8) } - #[doc = "Bits 8:15"] - #[inline(always)] - pub fn lo_vco_freq_cw_2420(&self) -> LO_VCO_FREQ_CW_2420_R { - LO_VCO_FREQ_CW_2420_R::new(((self.bits >> 8) & 0xff) as u8) - } - #[doc = "Bits 0:4"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn lo_vco_idac_cw_2420(&self) -> LO_VCO_IDAC_CW_2420_R { - LO_VCO_IDAC_CW_2420_R::new((self.bits & 0x1f) as u8) + pub fn lo_vco_freq_cw_2424(&self) -> LO_VCO_FREQ_CW_2424_R { + LO_VCO_FREQ_CW_2424_R::new(((self.bits >> 24) & 0xff) as u8) } } impl W { - #[doc = "Bits 24:31"] + #[doc = "Bits 0:4"] #[inline(always)] - pub fn lo_vco_freq_cw_2424(&mut self) -> LO_VCO_FREQ_CW_2424_W { - LO_VCO_FREQ_CW_2424_W { w: self } + #[must_use] + pub fn lo_vco_idac_cw_2420(&mut self) -> LO_VCO_IDAC_CW_2420_W<0> { + LO_VCO_IDAC_CW_2420_W::new(self) } - #[doc = "Bits 16:20"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn lo_vco_idac_cw_2424(&mut self) -> LO_VCO_IDAC_CW_2424_W { - LO_VCO_IDAC_CW_2424_W { w: self } + #[must_use] + pub fn lo_vco_freq_cw_2420(&mut self) -> LO_VCO_FREQ_CW_2420_W<8> { + LO_VCO_FREQ_CW_2420_W::new(self) } - #[doc = "Bits 8:15"] + #[doc = "Bits 16:20"] #[inline(always)] - pub fn lo_vco_freq_cw_2420(&mut self) -> LO_VCO_FREQ_CW_2420_W { - LO_VCO_FREQ_CW_2420_W { w: self } + #[must_use] + pub fn lo_vco_idac_cw_2424(&mut self) -> LO_VCO_IDAC_CW_2424_W<16> { + LO_VCO_IDAC_CW_2424_W::new(self) } - #[doc = "Bits 0:4"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn lo_vco_idac_cw_2420(&mut self) -> LO_VCO_IDAC_CW_2420_W { - LO_VCO_IDAC_CW_2420_W { w: self } + #[must_use] + pub fn lo_vco_freq_cw_2424(&mut self) -> LO_VCO_FREQ_CW_2424_W<24> { + LO_VCO_FREQ_CW_2424_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -197,11 +120,10 @@ impl crate::Readable for LO_CAL_CTRL_HW3_SPEC { #[doc = "`write(|w| ..)` method takes [lo_cal_ctrl_hw3::W](W) writer structure"] impl crate::Writable for LO_CAL_CTRL_HW3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets lo_cal_ctrl_hw3 to value 0"] impl crate::Resettable for LO_CAL_CTRL_HW3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/lo_cal_ctrl_hw4.rs b/src/rf/lo_cal_ctrl_hw4.rs index c46dbe3..0ac7b29 100644 --- a/src/rf/lo_cal_ctrl_hw4.rs +++ b/src/rf/lo_cal_ctrl_hw4.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,159 +28,81 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `lo_vco_freq_cw_2432` reader - "] -pub struct LO_VCO_FREQ_CW_2432_R(crate::FieldReader); -impl LO_VCO_FREQ_CW_2432_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_FREQ_CW_2432_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_FREQ_CW_2432_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_freq_cw_2432` writer - "] -pub struct LO_VCO_FREQ_CW_2432_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_FREQ_CW_2432_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 24)) | ((value as u32 & 0xff) << 24); - self.w - } -} -#[doc = "Field `lo_vco_idac_cw_2432` reader - "] -pub struct LO_VCO_IDAC_CW_2432_R(crate::FieldReader); -impl LO_VCO_IDAC_CW_2432_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_IDAC_CW_2432_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_IDAC_CW_2432_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_idac_cw_2432` writer - "] -pub struct LO_VCO_IDAC_CW_2432_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_IDAC_CW_2432_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 16)) | ((value as u32 & 0x1f) << 16); - self.w - } -} -#[doc = "Field `lo_vco_freq_cw_2428` reader - "] -pub struct LO_VCO_FREQ_CW_2428_R(crate::FieldReader); -impl LO_VCO_FREQ_CW_2428_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_FREQ_CW_2428_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_FREQ_CW_2428_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_freq_cw_2428` writer - "] -pub struct LO_VCO_FREQ_CW_2428_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_FREQ_CW_2428_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8); - self.w - } -} #[doc = "Field `lo_vco_idac_cw_2428` reader - "] -pub struct LO_VCO_IDAC_CW_2428_R(crate::FieldReader); -impl LO_VCO_IDAC_CW_2428_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_IDAC_CW_2428_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_IDAC_CW_2428_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type LO_VCO_IDAC_CW_2428_R = crate::FieldReader; #[doc = "Field `lo_vco_idac_cw_2428` writer - "] -pub struct LO_VCO_IDAC_CW_2428_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_IDAC_CW_2428_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type LO_VCO_IDAC_CW_2428_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW4_SPEC, u8, u8, 5, O>; +#[doc = "Field `lo_vco_freq_cw_2428` reader - "] +pub type LO_VCO_FREQ_CW_2428_R = crate::FieldReader; +#[doc = "Field `lo_vco_freq_cw_2428` writer - "] +pub type LO_VCO_FREQ_CW_2428_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW4_SPEC, u8, u8, 8, O>; +#[doc = "Field `lo_vco_idac_cw_2432` reader - "] +pub type LO_VCO_IDAC_CW_2432_R = crate::FieldReader; +#[doc = "Field `lo_vco_idac_cw_2432` writer - "] +pub type LO_VCO_IDAC_CW_2432_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW4_SPEC, u8, u8, 5, O>; +#[doc = "Field `lo_vco_freq_cw_2432` reader - "] +pub type LO_VCO_FREQ_CW_2432_R = crate::FieldReader; +#[doc = "Field `lo_vco_freq_cw_2432` writer - "] +pub type LO_VCO_FREQ_CW_2432_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW4_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:4"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x1f) | (value as u32 & 0x1f); - self.w + pub fn lo_vco_idac_cw_2428(&self) -> LO_VCO_IDAC_CW_2428_R { + LO_VCO_IDAC_CW_2428_R::new((self.bits & 0x1f) as u8) } -} -impl R { - #[doc = "Bits 24:31"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn lo_vco_freq_cw_2432(&self) -> LO_VCO_FREQ_CW_2432_R { - LO_VCO_FREQ_CW_2432_R::new(((self.bits >> 24) & 0xff) as u8) + pub fn lo_vco_freq_cw_2428(&self) -> LO_VCO_FREQ_CW_2428_R { + LO_VCO_FREQ_CW_2428_R::new(((self.bits >> 8) & 0xff) as u8) } #[doc = "Bits 16:20"] #[inline(always)] pub fn lo_vco_idac_cw_2432(&self) -> LO_VCO_IDAC_CW_2432_R { LO_VCO_IDAC_CW_2432_R::new(((self.bits >> 16) & 0x1f) as u8) } - #[doc = "Bits 8:15"] - #[inline(always)] - pub fn lo_vco_freq_cw_2428(&self) -> LO_VCO_FREQ_CW_2428_R { - LO_VCO_FREQ_CW_2428_R::new(((self.bits >> 8) & 0xff) as u8) - } - #[doc = "Bits 0:4"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn lo_vco_idac_cw_2428(&self) -> LO_VCO_IDAC_CW_2428_R { - LO_VCO_IDAC_CW_2428_R::new((self.bits & 0x1f) as u8) + pub fn lo_vco_freq_cw_2432(&self) -> LO_VCO_FREQ_CW_2432_R { + LO_VCO_FREQ_CW_2432_R::new(((self.bits >> 24) & 0xff) as u8) } } impl W { - #[doc = "Bits 24:31"] + #[doc = "Bits 0:4"] #[inline(always)] - pub fn lo_vco_freq_cw_2432(&mut self) -> LO_VCO_FREQ_CW_2432_W { - LO_VCO_FREQ_CW_2432_W { w: self } + #[must_use] + pub fn lo_vco_idac_cw_2428(&mut self) -> LO_VCO_IDAC_CW_2428_W<0> { + LO_VCO_IDAC_CW_2428_W::new(self) } - #[doc = "Bits 16:20"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn lo_vco_idac_cw_2432(&mut self) -> LO_VCO_IDAC_CW_2432_W { - LO_VCO_IDAC_CW_2432_W { w: self } + #[must_use] + pub fn lo_vco_freq_cw_2428(&mut self) -> LO_VCO_FREQ_CW_2428_W<8> { + LO_VCO_FREQ_CW_2428_W::new(self) } - #[doc = "Bits 8:15"] + #[doc = "Bits 16:20"] #[inline(always)] - pub fn lo_vco_freq_cw_2428(&mut self) -> LO_VCO_FREQ_CW_2428_W { - LO_VCO_FREQ_CW_2428_W { w: self } + #[must_use] + pub fn lo_vco_idac_cw_2432(&mut self) -> LO_VCO_IDAC_CW_2432_W<16> { + LO_VCO_IDAC_CW_2432_W::new(self) } - #[doc = "Bits 0:4"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn lo_vco_idac_cw_2428(&mut self) -> LO_VCO_IDAC_CW_2428_W { - LO_VCO_IDAC_CW_2428_W { w: self } + #[must_use] + pub fn lo_vco_freq_cw_2432(&mut self) -> LO_VCO_FREQ_CW_2432_W<24> { + LO_VCO_FREQ_CW_2432_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -197,11 +120,10 @@ impl crate::Readable for LO_CAL_CTRL_HW4_SPEC { #[doc = "`write(|w| ..)` method takes [lo_cal_ctrl_hw4::W](W) writer structure"] impl crate::Writable for LO_CAL_CTRL_HW4_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets lo_cal_ctrl_hw4 to value 0"] impl crate::Resettable for LO_CAL_CTRL_HW4_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/lo_cal_ctrl_hw5.rs b/src/rf/lo_cal_ctrl_hw5.rs index 85967ca..ecc447c 100644 --- a/src/rf/lo_cal_ctrl_hw5.rs +++ b/src/rf/lo_cal_ctrl_hw5.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,159 +28,81 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `lo_vco_freq_cw_2440` reader - "] -pub struct LO_VCO_FREQ_CW_2440_R(crate::FieldReader); -impl LO_VCO_FREQ_CW_2440_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_FREQ_CW_2440_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_FREQ_CW_2440_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_freq_cw_2440` writer - "] -pub struct LO_VCO_FREQ_CW_2440_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_FREQ_CW_2440_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 24)) | ((value as u32 & 0xff) << 24); - self.w - } -} -#[doc = "Field `lo_vco_idac_cw_2440` reader - "] -pub struct LO_VCO_IDAC_CW_2440_R(crate::FieldReader); -impl LO_VCO_IDAC_CW_2440_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_IDAC_CW_2440_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_IDAC_CW_2440_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_idac_cw_2440` writer - "] -pub struct LO_VCO_IDAC_CW_2440_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_IDAC_CW_2440_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 16)) | ((value as u32 & 0x1f) << 16); - self.w - } -} -#[doc = "Field `lo_vco_freq_cw_2436` reader - "] -pub struct LO_VCO_FREQ_CW_2436_R(crate::FieldReader); -impl LO_VCO_FREQ_CW_2436_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_FREQ_CW_2436_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_FREQ_CW_2436_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_freq_cw_2436` writer - "] -pub struct LO_VCO_FREQ_CW_2436_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_FREQ_CW_2436_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8); - self.w - } -} #[doc = "Field `lo_vco_idac_cw_2436` reader - "] -pub struct LO_VCO_IDAC_CW_2436_R(crate::FieldReader); -impl LO_VCO_IDAC_CW_2436_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_IDAC_CW_2436_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_IDAC_CW_2436_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type LO_VCO_IDAC_CW_2436_R = crate::FieldReader; #[doc = "Field `lo_vco_idac_cw_2436` writer - "] -pub struct LO_VCO_IDAC_CW_2436_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_IDAC_CW_2436_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type LO_VCO_IDAC_CW_2436_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW5_SPEC, u8, u8, 5, O>; +#[doc = "Field `lo_vco_freq_cw_2436` reader - "] +pub type LO_VCO_FREQ_CW_2436_R = crate::FieldReader; +#[doc = "Field `lo_vco_freq_cw_2436` writer - "] +pub type LO_VCO_FREQ_CW_2436_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW5_SPEC, u8, u8, 8, O>; +#[doc = "Field `lo_vco_idac_cw_2440` reader - "] +pub type LO_VCO_IDAC_CW_2440_R = crate::FieldReader; +#[doc = "Field `lo_vco_idac_cw_2440` writer - "] +pub type LO_VCO_IDAC_CW_2440_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW5_SPEC, u8, u8, 5, O>; +#[doc = "Field `lo_vco_freq_cw_2440` reader - "] +pub type LO_VCO_FREQ_CW_2440_R = crate::FieldReader; +#[doc = "Field `lo_vco_freq_cw_2440` writer - "] +pub type LO_VCO_FREQ_CW_2440_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW5_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:4"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x1f) | (value as u32 & 0x1f); - self.w + pub fn lo_vco_idac_cw_2436(&self) -> LO_VCO_IDAC_CW_2436_R { + LO_VCO_IDAC_CW_2436_R::new((self.bits & 0x1f) as u8) } -} -impl R { - #[doc = "Bits 24:31"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn lo_vco_freq_cw_2440(&self) -> LO_VCO_FREQ_CW_2440_R { - LO_VCO_FREQ_CW_2440_R::new(((self.bits >> 24) & 0xff) as u8) + pub fn lo_vco_freq_cw_2436(&self) -> LO_VCO_FREQ_CW_2436_R { + LO_VCO_FREQ_CW_2436_R::new(((self.bits >> 8) & 0xff) as u8) } #[doc = "Bits 16:20"] #[inline(always)] pub fn lo_vco_idac_cw_2440(&self) -> LO_VCO_IDAC_CW_2440_R { LO_VCO_IDAC_CW_2440_R::new(((self.bits >> 16) & 0x1f) as u8) } - #[doc = "Bits 8:15"] - #[inline(always)] - pub fn lo_vco_freq_cw_2436(&self) -> LO_VCO_FREQ_CW_2436_R { - LO_VCO_FREQ_CW_2436_R::new(((self.bits >> 8) & 0xff) as u8) - } - #[doc = "Bits 0:4"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn lo_vco_idac_cw_2436(&self) -> LO_VCO_IDAC_CW_2436_R { - LO_VCO_IDAC_CW_2436_R::new((self.bits & 0x1f) as u8) + pub fn lo_vco_freq_cw_2440(&self) -> LO_VCO_FREQ_CW_2440_R { + LO_VCO_FREQ_CW_2440_R::new(((self.bits >> 24) & 0xff) as u8) } } impl W { - #[doc = "Bits 24:31"] + #[doc = "Bits 0:4"] #[inline(always)] - pub fn lo_vco_freq_cw_2440(&mut self) -> LO_VCO_FREQ_CW_2440_W { - LO_VCO_FREQ_CW_2440_W { w: self } + #[must_use] + pub fn lo_vco_idac_cw_2436(&mut self) -> LO_VCO_IDAC_CW_2436_W<0> { + LO_VCO_IDAC_CW_2436_W::new(self) } - #[doc = "Bits 16:20"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn lo_vco_idac_cw_2440(&mut self) -> LO_VCO_IDAC_CW_2440_W { - LO_VCO_IDAC_CW_2440_W { w: self } + #[must_use] + pub fn lo_vco_freq_cw_2436(&mut self) -> LO_VCO_FREQ_CW_2436_W<8> { + LO_VCO_FREQ_CW_2436_W::new(self) } - #[doc = "Bits 8:15"] + #[doc = "Bits 16:20"] #[inline(always)] - pub fn lo_vco_freq_cw_2436(&mut self) -> LO_VCO_FREQ_CW_2436_W { - LO_VCO_FREQ_CW_2436_W { w: self } + #[must_use] + pub fn lo_vco_idac_cw_2440(&mut self) -> LO_VCO_IDAC_CW_2440_W<16> { + LO_VCO_IDAC_CW_2440_W::new(self) } - #[doc = "Bits 0:4"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn lo_vco_idac_cw_2436(&mut self) -> LO_VCO_IDAC_CW_2436_W { - LO_VCO_IDAC_CW_2436_W { w: self } + #[must_use] + pub fn lo_vco_freq_cw_2440(&mut self) -> LO_VCO_FREQ_CW_2440_W<24> { + LO_VCO_FREQ_CW_2440_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -197,11 +120,10 @@ impl crate::Readable for LO_CAL_CTRL_HW5_SPEC { #[doc = "`write(|w| ..)` method takes [lo_cal_ctrl_hw5::W](W) writer structure"] impl crate::Writable for LO_CAL_CTRL_HW5_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets lo_cal_ctrl_hw5 to value 0"] impl crate::Resettable for LO_CAL_CTRL_HW5_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/lo_cal_ctrl_hw6.rs b/src/rf/lo_cal_ctrl_hw6.rs index 352663a..17cc6ff 100644 --- a/src/rf/lo_cal_ctrl_hw6.rs +++ b/src/rf/lo_cal_ctrl_hw6.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,159 +28,81 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `lo_vco_freq_cw_2448` reader - "] -pub struct LO_VCO_FREQ_CW_2448_R(crate::FieldReader); -impl LO_VCO_FREQ_CW_2448_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_FREQ_CW_2448_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_FREQ_CW_2448_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_freq_cw_2448` writer - "] -pub struct LO_VCO_FREQ_CW_2448_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_FREQ_CW_2448_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 24)) | ((value as u32 & 0xff) << 24); - self.w - } -} -#[doc = "Field `lo_vco_idac_cw_2448` reader - "] -pub struct LO_VCO_IDAC_CW_2448_R(crate::FieldReader); -impl LO_VCO_IDAC_CW_2448_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_IDAC_CW_2448_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_IDAC_CW_2448_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_idac_cw_2448` writer - "] -pub struct LO_VCO_IDAC_CW_2448_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_IDAC_CW_2448_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 16)) | ((value as u32 & 0x1f) << 16); - self.w - } -} -#[doc = "Field `lo_vco_freq_cw_2444` reader - "] -pub struct LO_VCO_FREQ_CW_2444_R(crate::FieldReader); -impl LO_VCO_FREQ_CW_2444_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_FREQ_CW_2444_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_FREQ_CW_2444_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_freq_cw_2444` writer - "] -pub struct LO_VCO_FREQ_CW_2444_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_FREQ_CW_2444_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8); - self.w - } -} #[doc = "Field `lo_vco_idac_cw_2444` reader - "] -pub struct LO_VCO_IDAC_CW_2444_R(crate::FieldReader); -impl LO_VCO_IDAC_CW_2444_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_IDAC_CW_2444_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_IDAC_CW_2444_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type LO_VCO_IDAC_CW_2444_R = crate::FieldReader; #[doc = "Field `lo_vco_idac_cw_2444` writer - "] -pub struct LO_VCO_IDAC_CW_2444_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_IDAC_CW_2444_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type LO_VCO_IDAC_CW_2444_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW6_SPEC, u8, u8, 5, O>; +#[doc = "Field `lo_vco_freq_cw_2444` reader - "] +pub type LO_VCO_FREQ_CW_2444_R = crate::FieldReader; +#[doc = "Field `lo_vco_freq_cw_2444` writer - "] +pub type LO_VCO_FREQ_CW_2444_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW6_SPEC, u8, u8, 8, O>; +#[doc = "Field `lo_vco_idac_cw_2448` reader - "] +pub type LO_VCO_IDAC_CW_2448_R = crate::FieldReader; +#[doc = "Field `lo_vco_idac_cw_2448` writer - "] +pub type LO_VCO_IDAC_CW_2448_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW6_SPEC, u8, u8, 5, O>; +#[doc = "Field `lo_vco_freq_cw_2448` reader - "] +pub type LO_VCO_FREQ_CW_2448_R = crate::FieldReader; +#[doc = "Field `lo_vco_freq_cw_2448` writer - "] +pub type LO_VCO_FREQ_CW_2448_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW6_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:4"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x1f) | (value as u32 & 0x1f); - self.w + pub fn lo_vco_idac_cw_2444(&self) -> LO_VCO_IDAC_CW_2444_R { + LO_VCO_IDAC_CW_2444_R::new((self.bits & 0x1f) as u8) } -} -impl R { - #[doc = "Bits 24:31"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn lo_vco_freq_cw_2448(&self) -> LO_VCO_FREQ_CW_2448_R { - LO_VCO_FREQ_CW_2448_R::new(((self.bits >> 24) & 0xff) as u8) + pub fn lo_vco_freq_cw_2444(&self) -> LO_VCO_FREQ_CW_2444_R { + LO_VCO_FREQ_CW_2444_R::new(((self.bits >> 8) & 0xff) as u8) } #[doc = "Bits 16:20"] #[inline(always)] pub fn lo_vco_idac_cw_2448(&self) -> LO_VCO_IDAC_CW_2448_R { LO_VCO_IDAC_CW_2448_R::new(((self.bits >> 16) & 0x1f) as u8) } - #[doc = "Bits 8:15"] - #[inline(always)] - pub fn lo_vco_freq_cw_2444(&self) -> LO_VCO_FREQ_CW_2444_R { - LO_VCO_FREQ_CW_2444_R::new(((self.bits >> 8) & 0xff) as u8) - } - #[doc = "Bits 0:4"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn lo_vco_idac_cw_2444(&self) -> LO_VCO_IDAC_CW_2444_R { - LO_VCO_IDAC_CW_2444_R::new((self.bits & 0x1f) as u8) + pub fn lo_vco_freq_cw_2448(&self) -> LO_VCO_FREQ_CW_2448_R { + LO_VCO_FREQ_CW_2448_R::new(((self.bits >> 24) & 0xff) as u8) } } impl W { - #[doc = "Bits 24:31"] + #[doc = "Bits 0:4"] #[inline(always)] - pub fn lo_vco_freq_cw_2448(&mut self) -> LO_VCO_FREQ_CW_2448_W { - LO_VCO_FREQ_CW_2448_W { w: self } + #[must_use] + pub fn lo_vco_idac_cw_2444(&mut self) -> LO_VCO_IDAC_CW_2444_W<0> { + LO_VCO_IDAC_CW_2444_W::new(self) } - #[doc = "Bits 16:20"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn lo_vco_idac_cw_2448(&mut self) -> LO_VCO_IDAC_CW_2448_W { - LO_VCO_IDAC_CW_2448_W { w: self } + #[must_use] + pub fn lo_vco_freq_cw_2444(&mut self) -> LO_VCO_FREQ_CW_2444_W<8> { + LO_VCO_FREQ_CW_2444_W::new(self) } - #[doc = "Bits 8:15"] + #[doc = "Bits 16:20"] #[inline(always)] - pub fn lo_vco_freq_cw_2444(&mut self) -> LO_VCO_FREQ_CW_2444_W { - LO_VCO_FREQ_CW_2444_W { w: self } + #[must_use] + pub fn lo_vco_idac_cw_2448(&mut self) -> LO_VCO_IDAC_CW_2448_W<16> { + LO_VCO_IDAC_CW_2448_W::new(self) } - #[doc = "Bits 0:4"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn lo_vco_idac_cw_2444(&mut self) -> LO_VCO_IDAC_CW_2444_W { - LO_VCO_IDAC_CW_2444_W { w: self } + #[must_use] + pub fn lo_vco_freq_cw_2448(&mut self) -> LO_VCO_FREQ_CW_2448_W<24> { + LO_VCO_FREQ_CW_2448_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -197,11 +120,10 @@ impl crate::Readable for LO_CAL_CTRL_HW6_SPEC { #[doc = "`write(|w| ..)` method takes [lo_cal_ctrl_hw6::W](W) writer structure"] impl crate::Writable for LO_CAL_CTRL_HW6_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets lo_cal_ctrl_hw6 to value 0"] impl crate::Resettable for LO_CAL_CTRL_HW6_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/lo_cal_ctrl_hw7.rs b/src/rf/lo_cal_ctrl_hw7.rs index 3b5902e..3d66632 100644 --- a/src/rf/lo_cal_ctrl_hw7.rs +++ b/src/rf/lo_cal_ctrl_hw7.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,159 +28,81 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `lo_vco_freq_cw_2456` reader - "] -pub struct LO_VCO_FREQ_CW_2456_R(crate::FieldReader); -impl LO_VCO_FREQ_CW_2456_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_FREQ_CW_2456_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_FREQ_CW_2456_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_freq_cw_2456` writer - "] -pub struct LO_VCO_FREQ_CW_2456_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_FREQ_CW_2456_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 24)) | ((value as u32 & 0xff) << 24); - self.w - } -} -#[doc = "Field `lo_vco_idac_cw_2456` reader - "] -pub struct LO_VCO_IDAC_CW_2456_R(crate::FieldReader); -impl LO_VCO_IDAC_CW_2456_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_IDAC_CW_2456_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_IDAC_CW_2456_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_idac_cw_2456` writer - "] -pub struct LO_VCO_IDAC_CW_2456_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_IDAC_CW_2456_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 16)) | ((value as u32 & 0x1f) << 16); - self.w - } -} -#[doc = "Field `lo_vco_freq_cw_2452` reader - "] -pub struct LO_VCO_FREQ_CW_2452_R(crate::FieldReader); -impl LO_VCO_FREQ_CW_2452_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_FREQ_CW_2452_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_FREQ_CW_2452_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_freq_cw_2452` writer - "] -pub struct LO_VCO_FREQ_CW_2452_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_FREQ_CW_2452_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8); - self.w - } -} #[doc = "Field `lo_vco_idac_cw_2452` reader - "] -pub struct LO_VCO_IDAC_CW_2452_R(crate::FieldReader); -impl LO_VCO_IDAC_CW_2452_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_IDAC_CW_2452_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_IDAC_CW_2452_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type LO_VCO_IDAC_CW_2452_R = crate::FieldReader; #[doc = "Field `lo_vco_idac_cw_2452` writer - "] -pub struct LO_VCO_IDAC_CW_2452_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_IDAC_CW_2452_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type LO_VCO_IDAC_CW_2452_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW7_SPEC, u8, u8, 5, O>; +#[doc = "Field `lo_vco_freq_cw_2452` reader - "] +pub type LO_VCO_FREQ_CW_2452_R = crate::FieldReader; +#[doc = "Field `lo_vco_freq_cw_2452` writer - "] +pub type LO_VCO_FREQ_CW_2452_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW7_SPEC, u8, u8, 8, O>; +#[doc = "Field `lo_vco_idac_cw_2456` reader - "] +pub type LO_VCO_IDAC_CW_2456_R = crate::FieldReader; +#[doc = "Field `lo_vco_idac_cw_2456` writer - "] +pub type LO_VCO_IDAC_CW_2456_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW7_SPEC, u8, u8, 5, O>; +#[doc = "Field `lo_vco_freq_cw_2456` reader - "] +pub type LO_VCO_FREQ_CW_2456_R = crate::FieldReader; +#[doc = "Field `lo_vco_freq_cw_2456` writer - "] +pub type LO_VCO_FREQ_CW_2456_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW7_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:4"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x1f) | (value as u32 & 0x1f); - self.w + pub fn lo_vco_idac_cw_2452(&self) -> LO_VCO_IDAC_CW_2452_R { + LO_VCO_IDAC_CW_2452_R::new((self.bits & 0x1f) as u8) } -} -impl R { - #[doc = "Bits 24:31"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn lo_vco_freq_cw_2456(&self) -> LO_VCO_FREQ_CW_2456_R { - LO_VCO_FREQ_CW_2456_R::new(((self.bits >> 24) & 0xff) as u8) + pub fn lo_vco_freq_cw_2452(&self) -> LO_VCO_FREQ_CW_2452_R { + LO_VCO_FREQ_CW_2452_R::new(((self.bits >> 8) & 0xff) as u8) } #[doc = "Bits 16:20"] #[inline(always)] pub fn lo_vco_idac_cw_2456(&self) -> LO_VCO_IDAC_CW_2456_R { LO_VCO_IDAC_CW_2456_R::new(((self.bits >> 16) & 0x1f) as u8) } - #[doc = "Bits 8:15"] - #[inline(always)] - pub fn lo_vco_freq_cw_2452(&self) -> LO_VCO_FREQ_CW_2452_R { - LO_VCO_FREQ_CW_2452_R::new(((self.bits >> 8) & 0xff) as u8) - } - #[doc = "Bits 0:4"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn lo_vco_idac_cw_2452(&self) -> LO_VCO_IDAC_CW_2452_R { - LO_VCO_IDAC_CW_2452_R::new((self.bits & 0x1f) as u8) + pub fn lo_vco_freq_cw_2456(&self) -> LO_VCO_FREQ_CW_2456_R { + LO_VCO_FREQ_CW_2456_R::new(((self.bits >> 24) & 0xff) as u8) } } impl W { - #[doc = "Bits 24:31"] + #[doc = "Bits 0:4"] #[inline(always)] - pub fn lo_vco_freq_cw_2456(&mut self) -> LO_VCO_FREQ_CW_2456_W { - LO_VCO_FREQ_CW_2456_W { w: self } + #[must_use] + pub fn lo_vco_idac_cw_2452(&mut self) -> LO_VCO_IDAC_CW_2452_W<0> { + LO_VCO_IDAC_CW_2452_W::new(self) } - #[doc = "Bits 16:20"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn lo_vco_idac_cw_2456(&mut self) -> LO_VCO_IDAC_CW_2456_W { - LO_VCO_IDAC_CW_2456_W { w: self } + #[must_use] + pub fn lo_vco_freq_cw_2452(&mut self) -> LO_VCO_FREQ_CW_2452_W<8> { + LO_VCO_FREQ_CW_2452_W::new(self) } - #[doc = "Bits 8:15"] + #[doc = "Bits 16:20"] #[inline(always)] - pub fn lo_vco_freq_cw_2452(&mut self) -> LO_VCO_FREQ_CW_2452_W { - LO_VCO_FREQ_CW_2452_W { w: self } + #[must_use] + pub fn lo_vco_idac_cw_2456(&mut self) -> LO_VCO_IDAC_CW_2456_W<16> { + LO_VCO_IDAC_CW_2456_W::new(self) } - #[doc = "Bits 0:4"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn lo_vco_idac_cw_2452(&mut self) -> LO_VCO_IDAC_CW_2452_W { - LO_VCO_IDAC_CW_2452_W { w: self } + #[must_use] + pub fn lo_vco_freq_cw_2456(&mut self) -> LO_VCO_FREQ_CW_2456_W<24> { + LO_VCO_FREQ_CW_2456_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -197,11 +120,10 @@ impl crate::Readable for LO_CAL_CTRL_HW7_SPEC { #[doc = "`write(|w| ..)` method takes [lo_cal_ctrl_hw7::W](W) writer structure"] impl crate::Writable for LO_CAL_CTRL_HW7_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets lo_cal_ctrl_hw7 to value 0"] impl crate::Resettable for LO_CAL_CTRL_HW7_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/lo_cal_ctrl_hw8.rs b/src/rf/lo_cal_ctrl_hw8.rs index 2968037..0679d9d 100644 --- a/src/rf/lo_cal_ctrl_hw8.rs +++ b/src/rf/lo_cal_ctrl_hw8.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,159 +28,81 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `lo_vco_freq_cw_2464` reader - "] -pub struct LO_VCO_FREQ_CW_2464_R(crate::FieldReader); -impl LO_VCO_FREQ_CW_2464_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_FREQ_CW_2464_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_FREQ_CW_2464_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_freq_cw_2464` writer - "] -pub struct LO_VCO_FREQ_CW_2464_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_FREQ_CW_2464_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 24)) | ((value as u32 & 0xff) << 24); - self.w - } -} -#[doc = "Field `lo_vco_idac_cw_2464` reader - "] -pub struct LO_VCO_IDAC_CW_2464_R(crate::FieldReader); -impl LO_VCO_IDAC_CW_2464_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_IDAC_CW_2464_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_IDAC_CW_2464_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_idac_cw_2464` writer - "] -pub struct LO_VCO_IDAC_CW_2464_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_IDAC_CW_2464_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 16)) | ((value as u32 & 0x1f) << 16); - self.w - } -} -#[doc = "Field `lo_vco_freq_cw_2460` reader - "] -pub struct LO_VCO_FREQ_CW_2460_R(crate::FieldReader); -impl LO_VCO_FREQ_CW_2460_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_FREQ_CW_2460_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_FREQ_CW_2460_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_freq_cw_2460` writer - "] -pub struct LO_VCO_FREQ_CW_2460_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_FREQ_CW_2460_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8); - self.w - } -} #[doc = "Field `lo_vco_idac_cw_2460` reader - "] -pub struct LO_VCO_IDAC_CW_2460_R(crate::FieldReader); -impl LO_VCO_IDAC_CW_2460_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_IDAC_CW_2460_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_IDAC_CW_2460_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type LO_VCO_IDAC_CW_2460_R = crate::FieldReader; #[doc = "Field `lo_vco_idac_cw_2460` writer - "] -pub struct LO_VCO_IDAC_CW_2460_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_IDAC_CW_2460_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type LO_VCO_IDAC_CW_2460_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW8_SPEC, u8, u8, 5, O>; +#[doc = "Field `lo_vco_freq_cw_2460` reader - "] +pub type LO_VCO_FREQ_CW_2460_R = crate::FieldReader; +#[doc = "Field `lo_vco_freq_cw_2460` writer - "] +pub type LO_VCO_FREQ_CW_2460_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW8_SPEC, u8, u8, 8, O>; +#[doc = "Field `lo_vco_idac_cw_2464` reader - "] +pub type LO_VCO_IDAC_CW_2464_R = crate::FieldReader; +#[doc = "Field `lo_vco_idac_cw_2464` writer - "] +pub type LO_VCO_IDAC_CW_2464_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW8_SPEC, u8, u8, 5, O>; +#[doc = "Field `lo_vco_freq_cw_2464` reader - "] +pub type LO_VCO_FREQ_CW_2464_R = crate::FieldReader; +#[doc = "Field `lo_vco_freq_cw_2464` writer - "] +pub type LO_VCO_FREQ_CW_2464_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW8_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:4"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x1f) | (value as u32 & 0x1f); - self.w + pub fn lo_vco_idac_cw_2460(&self) -> LO_VCO_IDAC_CW_2460_R { + LO_VCO_IDAC_CW_2460_R::new((self.bits & 0x1f) as u8) } -} -impl R { - #[doc = "Bits 24:31"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn lo_vco_freq_cw_2464(&self) -> LO_VCO_FREQ_CW_2464_R { - LO_VCO_FREQ_CW_2464_R::new(((self.bits >> 24) & 0xff) as u8) + pub fn lo_vco_freq_cw_2460(&self) -> LO_VCO_FREQ_CW_2460_R { + LO_VCO_FREQ_CW_2460_R::new(((self.bits >> 8) & 0xff) as u8) } #[doc = "Bits 16:20"] #[inline(always)] pub fn lo_vco_idac_cw_2464(&self) -> LO_VCO_IDAC_CW_2464_R { LO_VCO_IDAC_CW_2464_R::new(((self.bits >> 16) & 0x1f) as u8) } - #[doc = "Bits 8:15"] - #[inline(always)] - pub fn lo_vco_freq_cw_2460(&self) -> LO_VCO_FREQ_CW_2460_R { - LO_VCO_FREQ_CW_2460_R::new(((self.bits >> 8) & 0xff) as u8) - } - #[doc = "Bits 0:4"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn lo_vco_idac_cw_2460(&self) -> LO_VCO_IDAC_CW_2460_R { - LO_VCO_IDAC_CW_2460_R::new((self.bits & 0x1f) as u8) + pub fn lo_vco_freq_cw_2464(&self) -> LO_VCO_FREQ_CW_2464_R { + LO_VCO_FREQ_CW_2464_R::new(((self.bits >> 24) & 0xff) as u8) } } impl W { - #[doc = "Bits 24:31"] + #[doc = "Bits 0:4"] #[inline(always)] - pub fn lo_vco_freq_cw_2464(&mut self) -> LO_VCO_FREQ_CW_2464_W { - LO_VCO_FREQ_CW_2464_W { w: self } + #[must_use] + pub fn lo_vco_idac_cw_2460(&mut self) -> LO_VCO_IDAC_CW_2460_W<0> { + LO_VCO_IDAC_CW_2460_W::new(self) } - #[doc = "Bits 16:20"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn lo_vco_idac_cw_2464(&mut self) -> LO_VCO_IDAC_CW_2464_W { - LO_VCO_IDAC_CW_2464_W { w: self } + #[must_use] + pub fn lo_vco_freq_cw_2460(&mut self) -> LO_VCO_FREQ_CW_2460_W<8> { + LO_VCO_FREQ_CW_2460_W::new(self) } - #[doc = "Bits 8:15"] + #[doc = "Bits 16:20"] #[inline(always)] - pub fn lo_vco_freq_cw_2460(&mut self) -> LO_VCO_FREQ_CW_2460_W { - LO_VCO_FREQ_CW_2460_W { w: self } + #[must_use] + pub fn lo_vco_idac_cw_2464(&mut self) -> LO_VCO_IDAC_CW_2464_W<16> { + LO_VCO_IDAC_CW_2464_W::new(self) } - #[doc = "Bits 0:4"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn lo_vco_idac_cw_2460(&mut self) -> LO_VCO_IDAC_CW_2460_W { - LO_VCO_IDAC_CW_2460_W { w: self } + #[must_use] + pub fn lo_vco_freq_cw_2464(&mut self) -> LO_VCO_FREQ_CW_2464_W<24> { + LO_VCO_FREQ_CW_2464_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -197,11 +120,10 @@ impl crate::Readable for LO_CAL_CTRL_HW8_SPEC { #[doc = "`write(|w| ..)` method takes [lo_cal_ctrl_hw8::W](W) writer structure"] impl crate::Writable for LO_CAL_CTRL_HW8_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets lo_cal_ctrl_hw8 to value 0"] impl crate::Resettable for LO_CAL_CTRL_HW8_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/lo_cal_ctrl_hw9.rs b/src/rf/lo_cal_ctrl_hw9.rs index 5979b4b..48bd6fd 100644 --- a/src/rf/lo_cal_ctrl_hw9.rs +++ b/src/rf/lo_cal_ctrl_hw9.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,159 +28,81 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `lo_vco_freq_cw_2472` reader - "] -pub struct LO_VCO_FREQ_CW_2472_R(crate::FieldReader); -impl LO_VCO_FREQ_CW_2472_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_FREQ_CW_2472_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_FREQ_CW_2472_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_freq_cw_2472` writer - "] -pub struct LO_VCO_FREQ_CW_2472_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_FREQ_CW_2472_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 24)) | ((value as u32 & 0xff) << 24); - self.w - } -} -#[doc = "Field `lo_vco_idac_cw_2472` reader - "] -pub struct LO_VCO_IDAC_CW_2472_R(crate::FieldReader); -impl LO_VCO_IDAC_CW_2472_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_IDAC_CW_2472_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_IDAC_CW_2472_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_idac_cw_2472` writer - "] -pub struct LO_VCO_IDAC_CW_2472_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_IDAC_CW_2472_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 16)) | ((value as u32 & 0x1f) << 16); - self.w - } -} -#[doc = "Field `lo_vco_freq_cw_2468` reader - "] -pub struct LO_VCO_FREQ_CW_2468_R(crate::FieldReader); -impl LO_VCO_FREQ_CW_2468_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_FREQ_CW_2468_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_FREQ_CW_2468_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_freq_cw_2468` writer - "] -pub struct LO_VCO_FREQ_CW_2468_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_FREQ_CW_2468_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8); - self.w - } -} #[doc = "Field `lo_vco_idac_cw_2468` reader - "] -pub struct LO_VCO_IDAC_CW_2468_R(crate::FieldReader); -impl LO_VCO_IDAC_CW_2468_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_IDAC_CW_2468_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_IDAC_CW_2468_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type LO_VCO_IDAC_CW_2468_R = crate::FieldReader; #[doc = "Field `lo_vco_idac_cw_2468` writer - "] -pub struct LO_VCO_IDAC_CW_2468_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_IDAC_CW_2468_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type LO_VCO_IDAC_CW_2468_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW9_SPEC, u8, u8, 5, O>; +#[doc = "Field `lo_vco_freq_cw_2468` reader - "] +pub type LO_VCO_FREQ_CW_2468_R = crate::FieldReader; +#[doc = "Field `lo_vco_freq_cw_2468` writer - "] +pub type LO_VCO_FREQ_CW_2468_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW9_SPEC, u8, u8, 8, O>; +#[doc = "Field `lo_vco_idac_cw_2472` reader - "] +pub type LO_VCO_IDAC_CW_2472_R = crate::FieldReader; +#[doc = "Field `lo_vco_idac_cw_2472` writer - "] +pub type LO_VCO_IDAC_CW_2472_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW9_SPEC, u8, u8, 5, O>; +#[doc = "Field `lo_vco_freq_cw_2472` reader - "] +pub type LO_VCO_FREQ_CW_2472_R = crate::FieldReader; +#[doc = "Field `lo_vco_freq_cw_2472` writer - "] +pub type LO_VCO_FREQ_CW_2472_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_CAL_CTRL_HW9_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:4"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x1f) | (value as u32 & 0x1f); - self.w + pub fn lo_vco_idac_cw_2468(&self) -> LO_VCO_IDAC_CW_2468_R { + LO_VCO_IDAC_CW_2468_R::new((self.bits & 0x1f) as u8) } -} -impl R { - #[doc = "Bits 24:31"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn lo_vco_freq_cw_2472(&self) -> LO_VCO_FREQ_CW_2472_R { - LO_VCO_FREQ_CW_2472_R::new(((self.bits >> 24) & 0xff) as u8) + pub fn lo_vco_freq_cw_2468(&self) -> LO_VCO_FREQ_CW_2468_R { + LO_VCO_FREQ_CW_2468_R::new(((self.bits >> 8) & 0xff) as u8) } #[doc = "Bits 16:20"] #[inline(always)] pub fn lo_vco_idac_cw_2472(&self) -> LO_VCO_IDAC_CW_2472_R { LO_VCO_IDAC_CW_2472_R::new(((self.bits >> 16) & 0x1f) as u8) } - #[doc = "Bits 8:15"] - #[inline(always)] - pub fn lo_vco_freq_cw_2468(&self) -> LO_VCO_FREQ_CW_2468_R { - LO_VCO_FREQ_CW_2468_R::new(((self.bits >> 8) & 0xff) as u8) - } - #[doc = "Bits 0:4"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn lo_vco_idac_cw_2468(&self) -> LO_VCO_IDAC_CW_2468_R { - LO_VCO_IDAC_CW_2468_R::new((self.bits & 0x1f) as u8) + pub fn lo_vco_freq_cw_2472(&self) -> LO_VCO_FREQ_CW_2472_R { + LO_VCO_FREQ_CW_2472_R::new(((self.bits >> 24) & 0xff) as u8) } } impl W { - #[doc = "Bits 24:31"] + #[doc = "Bits 0:4"] #[inline(always)] - pub fn lo_vco_freq_cw_2472(&mut self) -> LO_VCO_FREQ_CW_2472_W { - LO_VCO_FREQ_CW_2472_W { w: self } + #[must_use] + pub fn lo_vco_idac_cw_2468(&mut self) -> LO_VCO_IDAC_CW_2468_W<0> { + LO_VCO_IDAC_CW_2468_W::new(self) } - #[doc = "Bits 16:20"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn lo_vco_idac_cw_2472(&mut self) -> LO_VCO_IDAC_CW_2472_W { - LO_VCO_IDAC_CW_2472_W { w: self } + #[must_use] + pub fn lo_vco_freq_cw_2468(&mut self) -> LO_VCO_FREQ_CW_2468_W<8> { + LO_VCO_FREQ_CW_2468_W::new(self) } - #[doc = "Bits 8:15"] + #[doc = "Bits 16:20"] #[inline(always)] - pub fn lo_vco_freq_cw_2468(&mut self) -> LO_VCO_FREQ_CW_2468_W { - LO_VCO_FREQ_CW_2468_W { w: self } + #[must_use] + pub fn lo_vco_idac_cw_2472(&mut self) -> LO_VCO_IDAC_CW_2472_W<16> { + LO_VCO_IDAC_CW_2472_W::new(self) } - #[doc = "Bits 0:4"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn lo_vco_idac_cw_2468(&mut self) -> LO_VCO_IDAC_CW_2468_W { - LO_VCO_IDAC_CW_2468_W { w: self } + #[must_use] + pub fn lo_vco_freq_cw_2472(&mut self) -> LO_VCO_FREQ_CW_2472_W<24> { + LO_VCO_FREQ_CW_2472_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -197,11 +120,10 @@ impl crate::Readable for LO_CAL_CTRL_HW9_SPEC { #[doc = "`write(|w| ..)` method takes [lo_cal_ctrl_hw9::W](W) writer structure"] impl crate::Writable for LO_CAL_CTRL_HW9_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets lo_cal_ctrl_hw9 to value 0"] impl crate::Resettable for LO_CAL_CTRL_HW9_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/lo_reg_ctrl_hw1.rs b/src/rf/lo_reg_ctrl_hw1.rs index 435ef85..0441bdd 100644 --- a/src/rf/lo_reg_ctrl_hw1.rs +++ b/src/rf/lo_reg_ctrl_hw1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,415 +28,175 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `lo_lf_r4_tx` reader - "] -pub struct LO_LF_R4_TX_R(crate::FieldReader); -impl LO_LF_R4_TX_R { - pub(crate) fn new(bits: u8) -> Self { - LO_LF_R4_TX_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_LF_R4_TX_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_lf_r4_tx` writer - "] -pub struct LO_LF_R4_TX_W<'a> { - w: &'a mut W, -} -impl<'a> LO_LF_R4_TX_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 24)) | ((value as u32 & 0x03) << 24); - self.w - } -} -#[doc = "Field `lo_lf_r4_rx` reader - "] -pub struct LO_LF_R4_RX_R(crate::FieldReader); -impl LO_LF_R4_RX_R { - pub(crate) fn new(bits: u8) -> Self { - LO_LF_R4_RX_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_LF_R4_RX_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_lf_r4_rx` writer - "] -pub struct LO_LF_R4_RX_W<'a> { - w: &'a mut W, -} -impl<'a> LO_LF_R4_RX_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 20)) | ((value as u32 & 0x03) << 20); - self.w - } -} -#[doc = "Field `lo_lf_rz_tx` reader - "] -pub struct LO_LF_RZ_TX_R(crate::FieldReader); -impl LO_LF_RZ_TX_R { - pub(crate) fn new(bits: u8) -> Self { - LO_LF_RZ_TX_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_LF_RZ_TX_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_lf_rz_tx` writer - "] -pub struct LO_LF_RZ_TX_W<'a> { - w: &'a mut W, -} -impl<'a> LO_LF_RZ_TX_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 16)) | ((value as u32 & 0x03) << 16); - self.w - } -} -#[doc = "Field `lo_lf_rz_rx` reader - "] -pub struct LO_LF_RZ_RX_R(crate::FieldReader); -impl LO_LF_RZ_RX_R { - pub(crate) fn new(bits: u8) -> Self { - LO_LF_RZ_RX_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_LF_RZ_RX_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_lf_rz_rx` writer - "] -pub struct LO_LF_RZ_RX_W<'a> { - w: &'a mut W, -} -impl<'a> LO_LF_RZ_RX_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 12)) | ((value as u32 & 0x03) << 12); - self.w - } -} -#[doc = "Field `lo_lf_cz_tx` reader - "] -pub struct LO_LF_CZ_TX_R(crate::FieldReader); -impl LO_LF_CZ_TX_R { - pub(crate) fn new(bits: u8) -> Self { - LO_LF_CZ_TX_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_LF_CZ_TX_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_lf_cz_tx` writer - "] -pub struct LO_LF_CZ_TX_W<'a> { - w: &'a mut W, -} -impl<'a> LO_LF_CZ_TX_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} -#[doc = "Field `lo_lf_cz_rx` reader - "] -pub struct LO_LF_CZ_RX_R(crate::FieldReader); -impl LO_LF_CZ_RX_R { - pub(crate) fn new(bits: u8) -> Self { - LO_LF_CZ_RX_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_LF_CZ_RX_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_lf_cz_rx` writer - "] -pub struct LO_LF_CZ_RX_W<'a> { - w: &'a mut W, -} -impl<'a> LO_LF_CZ_RX_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 4)) | ((value as u32 & 0x03) << 4); - self.w - } -} -#[doc = "Field `lo_cp_sel_tx` reader - "] -pub struct LO_CP_SEL_TX_R(crate::FieldReader); -impl LO_CP_SEL_TX_R { - pub(crate) fn new(bits: bool) -> Self { - LO_CP_SEL_TX_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_CP_SEL_TX_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_cp_sel_tx` writer - "] -pub struct LO_CP_SEL_TX_W<'a> { - w: &'a mut W, -} -impl<'a> LO_CP_SEL_TX_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `lo_cp_sel_rx` reader - "] -pub struct LO_CP_SEL_RX_R(crate::FieldReader); -impl LO_CP_SEL_RX_R { - pub(crate) fn new(bits: bool) -> Self { - LO_CP_SEL_RX_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_CP_SEL_RX_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_cp_sel_rx` writer - "] -pub struct LO_CP_SEL_RX_W<'a> { - w: &'a mut W, -} -impl<'a> LO_CP_SEL_RX_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `lo_fbdv_halfstep_en_tx` reader - "] -pub struct LO_FBDV_HALFSTEP_EN_TX_R(crate::FieldReader); -impl LO_FBDV_HALFSTEP_EN_TX_R { - pub(crate) fn new(bits: bool) -> Self { - LO_FBDV_HALFSTEP_EN_TX_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_FBDV_HALFSTEP_EN_TX_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_fbdv_halfstep_en_tx` writer - "] -pub struct LO_FBDV_HALFSTEP_EN_TX_W<'a> { - w: &'a mut W, -} -impl<'a> LO_FBDV_HALFSTEP_EN_TX_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `lo_fbdv_halfstep_en_rx` reader - "] -pub struct LO_FBDV_HALFSTEP_EN_RX_R(crate::FieldReader); -impl LO_FBDV_HALFSTEP_EN_RX_R { - pub(crate) fn new(bits: bool) -> Self { - LO_FBDV_HALFSTEP_EN_RX_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_FBDV_HALFSTEP_EN_RX_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type LO_FBDV_HALFSTEP_EN_RX_R = crate::BitReader; #[doc = "Field `lo_fbdv_halfstep_en_rx` writer - "] -pub struct LO_FBDV_HALFSTEP_EN_RX_W<'a> { - w: &'a mut W, -} -impl<'a> LO_FBDV_HALFSTEP_EN_RX_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type LO_FBDV_HALFSTEP_EN_RX_W<'a, const O: u8> = + crate::BitWriter<'a, u32, LO_REG_CTRL_HW1_SPEC, bool, O>; +#[doc = "Field `lo_fbdv_halfstep_en_tx` reader - "] +pub type LO_FBDV_HALFSTEP_EN_TX_R = crate::BitReader; +#[doc = "Field `lo_fbdv_halfstep_en_tx` writer - "] +pub type LO_FBDV_HALFSTEP_EN_TX_W<'a, const O: u8> = + crate::BitWriter<'a, u32, LO_REG_CTRL_HW1_SPEC, bool, O>; +#[doc = "Field `lo_cp_sel_rx` reader - "] +pub type LO_CP_SEL_RX_R = crate::BitReader; +#[doc = "Field `lo_cp_sel_rx` writer - "] +pub type LO_CP_SEL_RX_W<'a, const O: u8> = crate::BitWriter<'a, u32, LO_REG_CTRL_HW1_SPEC, bool, O>; +#[doc = "Field `lo_cp_sel_tx` reader - "] +pub type LO_CP_SEL_TX_R = crate::BitReader; +#[doc = "Field `lo_cp_sel_tx` writer - "] +pub type LO_CP_SEL_TX_W<'a, const O: u8> = crate::BitWriter<'a, u32, LO_REG_CTRL_HW1_SPEC, bool, O>; +#[doc = "Field `lo_lf_cz_rx` reader - "] +pub type LO_LF_CZ_RX_R = crate::FieldReader; +#[doc = "Field `lo_lf_cz_rx` writer - "] +pub type LO_LF_CZ_RX_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_REG_CTRL_HW1_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_lf_cz_tx` reader - "] +pub type LO_LF_CZ_TX_R = crate::FieldReader; +#[doc = "Field `lo_lf_cz_tx` writer - "] +pub type LO_LF_CZ_TX_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_REG_CTRL_HW1_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_lf_rz_rx` reader - "] +pub type LO_LF_RZ_RX_R = crate::FieldReader; +#[doc = "Field `lo_lf_rz_rx` writer - "] +pub type LO_LF_RZ_RX_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_REG_CTRL_HW1_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_lf_rz_tx` reader - "] +pub type LO_LF_RZ_TX_R = crate::FieldReader; +#[doc = "Field `lo_lf_rz_tx` writer - "] +pub type LO_LF_RZ_TX_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_REG_CTRL_HW1_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_lf_r4_rx` reader - "] +pub type LO_LF_R4_RX_R = crate::FieldReader; +#[doc = "Field `lo_lf_r4_rx` writer - "] +pub type LO_LF_R4_RX_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_REG_CTRL_HW1_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_lf_r4_tx` reader - "] +pub type LO_LF_R4_TX_R = crate::FieldReader; +#[doc = "Field `lo_lf_r4_tx` writer - "] +pub type LO_LF_R4_TX_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_REG_CTRL_HW1_SPEC, u8, u8, 2, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn lo_fbdv_halfstep_en_rx(&self) -> LO_FBDV_HALFSTEP_EN_RX_R { + LO_FBDV_HALFSTEP_EN_RX_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bits 24:25"] + #[doc = "Bit 1"] #[inline(always)] - pub fn lo_lf_r4_tx(&self) -> LO_LF_R4_TX_R { - LO_LF_R4_TX_R::new(((self.bits >> 24) & 0x03) as u8) + pub fn lo_fbdv_halfstep_en_tx(&self) -> LO_FBDV_HALFSTEP_EN_TX_R { + LO_FBDV_HALFSTEP_EN_TX_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bits 20:21"] + #[doc = "Bit 2"] #[inline(always)] - pub fn lo_lf_r4_rx(&self) -> LO_LF_R4_RX_R { - LO_LF_R4_RX_R::new(((self.bits >> 20) & 0x03) as u8) + pub fn lo_cp_sel_rx(&self) -> LO_CP_SEL_RX_R { + LO_CP_SEL_RX_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bits 16:17"] + #[doc = "Bit 3"] #[inline(always)] - pub fn lo_lf_rz_tx(&self) -> LO_LF_RZ_TX_R { - LO_LF_RZ_TX_R::new(((self.bits >> 16) & 0x03) as u8) + pub fn lo_cp_sel_tx(&self) -> LO_CP_SEL_TX_R { + LO_CP_SEL_TX_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bits 12:13"] + #[doc = "Bits 4:5"] #[inline(always)] - pub fn lo_lf_rz_rx(&self) -> LO_LF_RZ_RX_R { - LO_LF_RZ_RX_R::new(((self.bits >> 12) & 0x03) as u8) + pub fn lo_lf_cz_rx(&self) -> LO_LF_CZ_RX_R { + LO_LF_CZ_RX_R::new(((self.bits >> 4) & 3) as u8) } #[doc = "Bits 8:9"] #[inline(always)] pub fn lo_lf_cz_tx(&self) -> LO_LF_CZ_TX_R { - LO_LF_CZ_TX_R::new(((self.bits >> 8) & 0x03) as u8) - } - #[doc = "Bits 4:5"] - #[inline(always)] - pub fn lo_lf_cz_rx(&self) -> LO_LF_CZ_RX_R { - LO_LF_CZ_RX_R::new(((self.bits >> 4) & 0x03) as u8) + LO_LF_CZ_TX_R::new(((self.bits >> 8) & 3) as u8) } - #[doc = "Bit 3"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn lo_cp_sel_tx(&self) -> LO_CP_SEL_TX_R { - LO_CP_SEL_TX_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn lo_lf_rz_rx(&self) -> LO_LF_RZ_RX_R { + LO_LF_RZ_RX_R::new(((self.bits >> 12) & 3) as u8) } - #[doc = "Bit 2"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn lo_cp_sel_rx(&self) -> LO_CP_SEL_RX_R { - LO_CP_SEL_RX_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn lo_lf_rz_tx(&self) -> LO_LF_RZ_TX_R { + LO_LF_RZ_TX_R::new(((self.bits >> 16) & 3) as u8) } - #[doc = "Bit 1"] + #[doc = "Bits 20:21"] #[inline(always)] - pub fn lo_fbdv_halfstep_en_tx(&self) -> LO_FBDV_HALFSTEP_EN_TX_R { - LO_FBDV_HALFSTEP_EN_TX_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn lo_lf_r4_rx(&self) -> LO_LF_R4_RX_R { + LO_LF_R4_RX_R::new(((self.bits >> 20) & 3) as u8) } - #[doc = "Bit 0"] + #[doc = "Bits 24:25"] #[inline(always)] - pub fn lo_fbdv_halfstep_en_rx(&self) -> LO_FBDV_HALFSTEP_EN_RX_R { - LO_FBDV_HALFSTEP_EN_RX_R::new((self.bits & 0x01) != 0) + pub fn lo_lf_r4_tx(&self) -> LO_LF_R4_TX_R { + LO_LF_R4_TX_R::new(((self.bits >> 24) & 3) as u8) } } impl W { - #[doc = "Bits 24:25"] + #[doc = "Bit 0"] #[inline(always)] - pub fn lo_lf_r4_tx(&mut self) -> LO_LF_R4_TX_W { - LO_LF_R4_TX_W { w: self } + #[must_use] + pub fn lo_fbdv_halfstep_en_rx(&mut self) -> LO_FBDV_HALFSTEP_EN_RX_W<0> { + LO_FBDV_HALFSTEP_EN_RX_W::new(self) } - #[doc = "Bits 20:21"] + #[doc = "Bit 1"] #[inline(always)] - pub fn lo_lf_r4_rx(&mut self) -> LO_LF_R4_RX_W { - LO_LF_R4_RX_W { w: self } + #[must_use] + pub fn lo_fbdv_halfstep_en_tx(&mut self) -> LO_FBDV_HALFSTEP_EN_TX_W<1> { + LO_FBDV_HALFSTEP_EN_TX_W::new(self) } - #[doc = "Bits 16:17"] + #[doc = "Bit 2"] #[inline(always)] - pub fn lo_lf_rz_tx(&mut self) -> LO_LF_RZ_TX_W { - LO_LF_RZ_TX_W { w: self } + #[must_use] + pub fn lo_cp_sel_rx(&mut self) -> LO_CP_SEL_RX_W<2> { + LO_CP_SEL_RX_W::new(self) } - #[doc = "Bits 12:13"] + #[doc = "Bit 3"] #[inline(always)] - pub fn lo_lf_rz_rx(&mut self) -> LO_LF_RZ_RX_W { - LO_LF_RZ_RX_W { w: self } + #[must_use] + pub fn lo_cp_sel_tx(&mut self) -> LO_CP_SEL_TX_W<3> { + LO_CP_SEL_TX_W::new(self) } - #[doc = "Bits 8:9"] + #[doc = "Bits 4:5"] #[inline(always)] - pub fn lo_lf_cz_tx(&mut self) -> LO_LF_CZ_TX_W { - LO_LF_CZ_TX_W { w: self } + #[must_use] + pub fn lo_lf_cz_rx(&mut self) -> LO_LF_CZ_RX_W<4> { + LO_LF_CZ_RX_W::new(self) } - #[doc = "Bits 4:5"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn lo_lf_cz_rx(&mut self) -> LO_LF_CZ_RX_W { - LO_LF_CZ_RX_W { w: self } + #[must_use] + pub fn lo_lf_cz_tx(&mut self) -> LO_LF_CZ_TX_W<8> { + LO_LF_CZ_TX_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn lo_cp_sel_tx(&mut self) -> LO_CP_SEL_TX_W { - LO_CP_SEL_TX_W { w: self } + #[must_use] + pub fn lo_lf_rz_rx(&mut self) -> LO_LF_RZ_RX_W<12> { + LO_LF_RZ_RX_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn lo_cp_sel_rx(&mut self) -> LO_CP_SEL_RX_W { - LO_CP_SEL_RX_W { w: self } + #[must_use] + pub fn lo_lf_rz_tx(&mut self) -> LO_LF_RZ_TX_W<16> { + LO_LF_RZ_TX_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bits 20:21"] #[inline(always)] - pub fn lo_fbdv_halfstep_en_tx(&mut self) -> LO_FBDV_HALFSTEP_EN_TX_W { - LO_FBDV_HALFSTEP_EN_TX_W { w: self } + #[must_use] + pub fn lo_lf_r4_rx(&mut self) -> LO_LF_R4_RX_W<20> { + LO_LF_R4_RX_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bits 24:25"] #[inline(always)] - pub fn lo_fbdv_halfstep_en_rx(&mut self) -> LO_FBDV_HALFSTEP_EN_RX_W { - LO_FBDV_HALFSTEP_EN_RX_W { w: self } + #[must_use] + pub fn lo_lf_r4_tx(&mut self) -> LO_LF_R4_TX_W<24> { + LO_LF_R4_TX_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -453,11 +214,10 @@ impl crate::Readable for LO_REG_CTRL_HW1_SPEC { #[doc = "`write(|w| ..)` method takes [lo_reg_ctrl_hw1::W](W) writer structure"] impl crate::Writable for LO_REG_CTRL_HW1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets lo_reg_ctrl_hw1 to value 0"] impl crate::Resettable for LO_REG_CTRL_HW1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/lo_sdm_ctrl_hw1.rs b/src/rf/lo_sdm_ctrl_hw1.rs index 00bafd4..8111e3d 100644 --- a/src/rf/lo_sdm_ctrl_hw1.rs +++ b/src/rf/lo_sdm_ctrl_hw1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,519 +28,241 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `lo_sdm_dither_sel_wlan_2484` reader - "] -pub struct LO_SDM_DITHER_SEL_WLAN_2484_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_WLAN_2484_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_WLAN_2484_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_WLAN_2484_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_wlan_2484` writer - "] -pub struct LO_SDM_DITHER_SEL_WLAN_2484_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_WLAN_2484_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 26)) | ((value as u32 & 0x03) << 26); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_wlan_2472` reader - "] -pub struct LO_SDM_DITHER_SEL_WLAN_2472_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_WLAN_2472_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_WLAN_2472_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_WLAN_2472_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_wlan_2472` writer - "] -pub struct LO_SDM_DITHER_SEL_WLAN_2472_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_WLAN_2472_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 24)) | ((value as u32 & 0x03) << 24); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_wlan_2467` reader - "] -pub struct LO_SDM_DITHER_SEL_WLAN_2467_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_WLAN_2467_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_WLAN_2467_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_WLAN_2467_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_wlan_2467` writer - "] -pub struct LO_SDM_DITHER_SEL_WLAN_2467_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_WLAN_2467_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 22)) | ((value as u32 & 0x03) << 22); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_wlan_2462` reader - "] -pub struct LO_SDM_DITHER_SEL_WLAN_2462_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_WLAN_2462_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_WLAN_2462_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_WLAN_2462_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_wlan_2462` writer - "] -pub struct LO_SDM_DITHER_SEL_WLAN_2462_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_WLAN_2462_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 20)) | ((value as u32 & 0x03) << 20); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_wlan_2457` reader - "] -pub struct LO_SDM_DITHER_SEL_WLAN_2457_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_WLAN_2457_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_WLAN_2457_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_WLAN_2457_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_wlan_2457` writer - "] -pub struct LO_SDM_DITHER_SEL_WLAN_2457_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_WLAN_2457_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 18)) | ((value as u32 & 0x03) << 18); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_wlan_2452` reader - "] -pub struct LO_SDM_DITHER_SEL_WLAN_2452_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_WLAN_2452_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_WLAN_2452_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_WLAN_2452_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_wlan_2452` writer - "] -pub struct LO_SDM_DITHER_SEL_WLAN_2452_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_WLAN_2452_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 16)) | ((value as u32 & 0x03) << 16); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_wlan_2447` reader - "] -pub struct LO_SDM_DITHER_SEL_WLAN_2447_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_WLAN_2447_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_WLAN_2447_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_WLAN_2447_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_wlan_2447` writer - "] -pub struct LO_SDM_DITHER_SEL_WLAN_2447_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_WLAN_2447_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 14)) | ((value as u32 & 0x03) << 14); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_wlan_2442` reader - "] -pub struct LO_SDM_DITHER_SEL_WLAN_2442_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_WLAN_2442_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_WLAN_2442_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_WLAN_2442_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_wlan_2442` writer - "] -pub struct LO_SDM_DITHER_SEL_WLAN_2442_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_WLAN_2442_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 12)) | ((value as u32 & 0x03) << 12); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_wlan_2437` reader - "] -pub struct LO_SDM_DITHER_SEL_WLAN_2437_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_WLAN_2437_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_WLAN_2437_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_WLAN_2437_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_wlan_2437` writer - "] -pub struct LO_SDM_DITHER_SEL_WLAN_2437_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_WLAN_2437_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 10)) | ((value as u32 & 0x03) << 10); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_wlan_2432` reader - "] -pub struct LO_SDM_DITHER_SEL_WLAN_2432_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_WLAN_2432_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_WLAN_2432_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_WLAN_2432_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_wlan_2432` writer - "] -pub struct LO_SDM_DITHER_SEL_WLAN_2432_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_WLAN_2432_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_wlan_2427` reader - "] -pub struct LO_SDM_DITHER_SEL_WLAN_2427_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_WLAN_2427_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_WLAN_2427_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_WLAN_2427_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_wlan_2427` writer - "] -pub struct LO_SDM_DITHER_SEL_WLAN_2427_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_WLAN_2427_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 6)) | ((value as u32 & 0x03) << 6); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_wlan_2422` reader - "] -pub struct LO_SDM_DITHER_SEL_WLAN_2422_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_WLAN_2422_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_WLAN_2422_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_WLAN_2422_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_wlan_2422` writer - "] -pub struct LO_SDM_DITHER_SEL_WLAN_2422_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_WLAN_2422_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 4)) | ((value as u32 & 0x03) << 4); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_wlan_2417` reader - "] -pub struct LO_SDM_DITHER_SEL_WLAN_2417_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_WLAN_2417_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_WLAN_2417_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_WLAN_2417_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_wlan_2417` writer - "] -pub struct LO_SDM_DITHER_SEL_WLAN_2417_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_WLAN_2417_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 2)) | ((value as u32 & 0x03) << 2); - self.w - } -} #[doc = "Field `lo_sdm_dither_sel_wlan_2412` reader - "] -pub struct LO_SDM_DITHER_SEL_WLAN_2412_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_WLAN_2412_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_WLAN_2412_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_WLAN_2412_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type LO_SDM_DITHER_SEL_WLAN_2412_R = crate::FieldReader; #[doc = "Field `lo_sdm_dither_sel_wlan_2412` writer - "] -pub struct LO_SDM_DITHER_SEL_WLAN_2412_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_WLAN_2412_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type LO_SDM_DITHER_SEL_WLAN_2412_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW1_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_wlan_2417` reader - "] +pub type LO_SDM_DITHER_SEL_WLAN_2417_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_wlan_2417` writer - "] +pub type LO_SDM_DITHER_SEL_WLAN_2417_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW1_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_wlan_2422` reader - "] +pub type LO_SDM_DITHER_SEL_WLAN_2422_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_wlan_2422` writer - "] +pub type LO_SDM_DITHER_SEL_WLAN_2422_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW1_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_wlan_2427` reader - "] +pub type LO_SDM_DITHER_SEL_WLAN_2427_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_wlan_2427` writer - "] +pub type LO_SDM_DITHER_SEL_WLAN_2427_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW1_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_wlan_2432` reader - "] +pub type LO_SDM_DITHER_SEL_WLAN_2432_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_wlan_2432` writer - "] +pub type LO_SDM_DITHER_SEL_WLAN_2432_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW1_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_wlan_2437` reader - "] +pub type LO_SDM_DITHER_SEL_WLAN_2437_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_wlan_2437` writer - "] +pub type LO_SDM_DITHER_SEL_WLAN_2437_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW1_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_wlan_2442` reader - "] +pub type LO_SDM_DITHER_SEL_WLAN_2442_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_wlan_2442` writer - "] +pub type LO_SDM_DITHER_SEL_WLAN_2442_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW1_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_wlan_2447` reader - "] +pub type LO_SDM_DITHER_SEL_WLAN_2447_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_wlan_2447` writer - "] +pub type LO_SDM_DITHER_SEL_WLAN_2447_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW1_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_wlan_2452` reader - "] +pub type LO_SDM_DITHER_SEL_WLAN_2452_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_wlan_2452` writer - "] +pub type LO_SDM_DITHER_SEL_WLAN_2452_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW1_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_wlan_2457` reader - "] +pub type LO_SDM_DITHER_SEL_WLAN_2457_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_wlan_2457` writer - "] +pub type LO_SDM_DITHER_SEL_WLAN_2457_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW1_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_wlan_2462` reader - "] +pub type LO_SDM_DITHER_SEL_WLAN_2462_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_wlan_2462` writer - "] +pub type LO_SDM_DITHER_SEL_WLAN_2462_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW1_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_wlan_2467` reader - "] +pub type LO_SDM_DITHER_SEL_WLAN_2467_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_wlan_2467` writer - "] +pub type LO_SDM_DITHER_SEL_WLAN_2467_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW1_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_wlan_2472` reader - "] +pub type LO_SDM_DITHER_SEL_WLAN_2472_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_wlan_2472` writer - "] +pub type LO_SDM_DITHER_SEL_WLAN_2472_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW1_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_wlan_2484` reader - "] +pub type LO_SDM_DITHER_SEL_WLAN_2484_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_wlan_2484` writer - "] +pub type LO_SDM_DITHER_SEL_WLAN_2484_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW1_SPEC, u8, u8, 2, O>; +impl R { + #[doc = "Bits 0:1"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w + pub fn lo_sdm_dither_sel_wlan_2412(&self) -> LO_SDM_DITHER_SEL_WLAN_2412_R { + LO_SDM_DITHER_SEL_WLAN_2412_R::new((self.bits & 3) as u8) } -} -impl R { - #[doc = "Bits 26:27"] + #[doc = "Bits 2:3"] #[inline(always)] - pub fn lo_sdm_dither_sel_wlan_2484(&self) -> LO_SDM_DITHER_SEL_WLAN_2484_R { - LO_SDM_DITHER_SEL_WLAN_2484_R::new(((self.bits >> 26) & 0x03) as u8) + pub fn lo_sdm_dither_sel_wlan_2417(&self) -> LO_SDM_DITHER_SEL_WLAN_2417_R { + LO_SDM_DITHER_SEL_WLAN_2417_R::new(((self.bits >> 2) & 3) as u8) } - #[doc = "Bits 24:25"] + #[doc = "Bits 4:5"] #[inline(always)] - pub fn lo_sdm_dither_sel_wlan_2472(&self) -> LO_SDM_DITHER_SEL_WLAN_2472_R { - LO_SDM_DITHER_SEL_WLAN_2472_R::new(((self.bits >> 24) & 0x03) as u8) + pub fn lo_sdm_dither_sel_wlan_2422(&self) -> LO_SDM_DITHER_SEL_WLAN_2422_R { + LO_SDM_DITHER_SEL_WLAN_2422_R::new(((self.bits >> 4) & 3) as u8) } - #[doc = "Bits 22:23"] + #[doc = "Bits 6:7"] #[inline(always)] - pub fn lo_sdm_dither_sel_wlan_2467(&self) -> LO_SDM_DITHER_SEL_WLAN_2467_R { - LO_SDM_DITHER_SEL_WLAN_2467_R::new(((self.bits >> 22) & 0x03) as u8) + pub fn lo_sdm_dither_sel_wlan_2427(&self) -> LO_SDM_DITHER_SEL_WLAN_2427_R { + LO_SDM_DITHER_SEL_WLAN_2427_R::new(((self.bits >> 6) & 3) as u8) } - #[doc = "Bits 20:21"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn lo_sdm_dither_sel_wlan_2462(&self) -> LO_SDM_DITHER_SEL_WLAN_2462_R { - LO_SDM_DITHER_SEL_WLAN_2462_R::new(((self.bits >> 20) & 0x03) as u8) + pub fn lo_sdm_dither_sel_wlan_2432(&self) -> LO_SDM_DITHER_SEL_WLAN_2432_R { + LO_SDM_DITHER_SEL_WLAN_2432_R::new(((self.bits >> 8) & 3) as u8) } - #[doc = "Bits 18:19"] + #[doc = "Bits 10:11"] #[inline(always)] - pub fn lo_sdm_dither_sel_wlan_2457(&self) -> LO_SDM_DITHER_SEL_WLAN_2457_R { - LO_SDM_DITHER_SEL_WLAN_2457_R::new(((self.bits >> 18) & 0x03) as u8) + pub fn lo_sdm_dither_sel_wlan_2437(&self) -> LO_SDM_DITHER_SEL_WLAN_2437_R { + LO_SDM_DITHER_SEL_WLAN_2437_R::new(((self.bits >> 10) & 3) as u8) } - #[doc = "Bits 16:17"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn lo_sdm_dither_sel_wlan_2452(&self) -> LO_SDM_DITHER_SEL_WLAN_2452_R { - LO_SDM_DITHER_SEL_WLAN_2452_R::new(((self.bits >> 16) & 0x03) as u8) + pub fn lo_sdm_dither_sel_wlan_2442(&self) -> LO_SDM_DITHER_SEL_WLAN_2442_R { + LO_SDM_DITHER_SEL_WLAN_2442_R::new(((self.bits >> 12) & 3) as u8) } #[doc = "Bits 14:15"] #[inline(always)] pub fn lo_sdm_dither_sel_wlan_2447(&self) -> LO_SDM_DITHER_SEL_WLAN_2447_R { - LO_SDM_DITHER_SEL_WLAN_2447_R::new(((self.bits >> 14) & 0x03) as u8) + LO_SDM_DITHER_SEL_WLAN_2447_R::new(((self.bits >> 14) & 3) as u8) } - #[doc = "Bits 12:13"] - #[inline(always)] - pub fn lo_sdm_dither_sel_wlan_2442(&self) -> LO_SDM_DITHER_SEL_WLAN_2442_R { - LO_SDM_DITHER_SEL_WLAN_2442_R::new(((self.bits >> 12) & 0x03) as u8) - } - #[doc = "Bits 10:11"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn lo_sdm_dither_sel_wlan_2437(&self) -> LO_SDM_DITHER_SEL_WLAN_2437_R { - LO_SDM_DITHER_SEL_WLAN_2437_R::new(((self.bits >> 10) & 0x03) as u8) + pub fn lo_sdm_dither_sel_wlan_2452(&self) -> LO_SDM_DITHER_SEL_WLAN_2452_R { + LO_SDM_DITHER_SEL_WLAN_2452_R::new(((self.bits >> 16) & 3) as u8) } - #[doc = "Bits 8:9"] + #[doc = "Bits 18:19"] #[inline(always)] - pub fn lo_sdm_dither_sel_wlan_2432(&self) -> LO_SDM_DITHER_SEL_WLAN_2432_R { - LO_SDM_DITHER_SEL_WLAN_2432_R::new(((self.bits >> 8) & 0x03) as u8) + pub fn lo_sdm_dither_sel_wlan_2457(&self) -> LO_SDM_DITHER_SEL_WLAN_2457_R { + LO_SDM_DITHER_SEL_WLAN_2457_R::new(((self.bits >> 18) & 3) as u8) } - #[doc = "Bits 6:7"] + #[doc = "Bits 20:21"] #[inline(always)] - pub fn lo_sdm_dither_sel_wlan_2427(&self) -> LO_SDM_DITHER_SEL_WLAN_2427_R { - LO_SDM_DITHER_SEL_WLAN_2427_R::new(((self.bits >> 6) & 0x03) as u8) + pub fn lo_sdm_dither_sel_wlan_2462(&self) -> LO_SDM_DITHER_SEL_WLAN_2462_R { + LO_SDM_DITHER_SEL_WLAN_2462_R::new(((self.bits >> 20) & 3) as u8) } - #[doc = "Bits 4:5"] + #[doc = "Bits 22:23"] #[inline(always)] - pub fn lo_sdm_dither_sel_wlan_2422(&self) -> LO_SDM_DITHER_SEL_WLAN_2422_R { - LO_SDM_DITHER_SEL_WLAN_2422_R::new(((self.bits >> 4) & 0x03) as u8) + pub fn lo_sdm_dither_sel_wlan_2467(&self) -> LO_SDM_DITHER_SEL_WLAN_2467_R { + LO_SDM_DITHER_SEL_WLAN_2467_R::new(((self.bits >> 22) & 3) as u8) } - #[doc = "Bits 2:3"] + #[doc = "Bits 24:25"] #[inline(always)] - pub fn lo_sdm_dither_sel_wlan_2417(&self) -> LO_SDM_DITHER_SEL_WLAN_2417_R { - LO_SDM_DITHER_SEL_WLAN_2417_R::new(((self.bits >> 2) & 0x03) as u8) + pub fn lo_sdm_dither_sel_wlan_2472(&self) -> LO_SDM_DITHER_SEL_WLAN_2472_R { + LO_SDM_DITHER_SEL_WLAN_2472_R::new(((self.bits >> 24) & 3) as u8) } - #[doc = "Bits 0:1"] + #[doc = "Bits 26:27"] #[inline(always)] - pub fn lo_sdm_dither_sel_wlan_2412(&self) -> LO_SDM_DITHER_SEL_WLAN_2412_R { - LO_SDM_DITHER_SEL_WLAN_2412_R::new((self.bits & 0x03) as u8) + pub fn lo_sdm_dither_sel_wlan_2484(&self) -> LO_SDM_DITHER_SEL_WLAN_2484_R { + LO_SDM_DITHER_SEL_WLAN_2484_R::new(((self.bits >> 26) & 3) as u8) } } impl W { - #[doc = "Bits 26:27"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn lo_sdm_dither_sel_wlan_2484(&mut self) -> LO_SDM_DITHER_SEL_WLAN_2484_W { - LO_SDM_DITHER_SEL_WLAN_2484_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_wlan_2412(&mut self) -> LO_SDM_DITHER_SEL_WLAN_2412_W<0> { + LO_SDM_DITHER_SEL_WLAN_2412_W::new(self) } - #[doc = "Bits 24:25"] + #[doc = "Bits 2:3"] #[inline(always)] - pub fn lo_sdm_dither_sel_wlan_2472(&mut self) -> LO_SDM_DITHER_SEL_WLAN_2472_W { - LO_SDM_DITHER_SEL_WLAN_2472_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_wlan_2417(&mut self) -> LO_SDM_DITHER_SEL_WLAN_2417_W<2> { + LO_SDM_DITHER_SEL_WLAN_2417_W::new(self) } - #[doc = "Bits 22:23"] + #[doc = "Bits 4:5"] #[inline(always)] - pub fn lo_sdm_dither_sel_wlan_2467(&mut self) -> LO_SDM_DITHER_SEL_WLAN_2467_W { - LO_SDM_DITHER_SEL_WLAN_2467_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_wlan_2422(&mut self) -> LO_SDM_DITHER_SEL_WLAN_2422_W<4> { + LO_SDM_DITHER_SEL_WLAN_2422_W::new(self) } - #[doc = "Bits 20:21"] + #[doc = "Bits 6:7"] #[inline(always)] - pub fn lo_sdm_dither_sel_wlan_2462(&mut self) -> LO_SDM_DITHER_SEL_WLAN_2462_W { - LO_SDM_DITHER_SEL_WLAN_2462_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_wlan_2427(&mut self) -> LO_SDM_DITHER_SEL_WLAN_2427_W<6> { + LO_SDM_DITHER_SEL_WLAN_2427_W::new(self) } - #[doc = "Bits 18:19"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn lo_sdm_dither_sel_wlan_2457(&mut self) -> LO_SDM_DITHER_SEL_WLAN_2457_W { - LO_SDM_DITHER_SEL_WLAN_2457_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_wlan_2432(&mut self) -> LO_SDM_DITHER_SEL_WLAN_2432_W<8> { + LO_SDM_DITHER_SEL_WLAN_2432_W::new(self) } - #[doc = "Bits 16:17"] + #[doc = "Bits 10:11"] #[inline(always)] - pub fn lo_sdm_dither_sel_wlan_2452(&mut self) -> LO_SDM_DITHER_SEL_WLAN_2452_W { - LO_SDM_DITHER_SEL_WLAN_2452_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_wlan_2437(&mut self) -> LO_SDM_DITHER_SEL_WLAN_2437_W<10> { + LO_SDM_DITHER_SEL_WLAN_2437_W::new(self) } - #[doc = "Bits 14:15"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn lo_sdm_dither_sel_wlan_2447(&mut self) -> LO_SDM_DITHER_SEL_WLAN_2447_W { - LO_SDM_DITHER_SEL_WLAN_2447_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_wlan_2442(&mut self) -> LO_SDM_DITHER_SEL_WLAN_2442_W<12> { + LO_SDM_DITHER_SEL_WLAN_2442_W::new(self) } - #[doc = "Bits 12:13"] + #[doc = "Bits 14:15"] #[inline(always)] - pub fn lo_sdm_dither_sel_wlan_2442(&mut self) -> LO_SDM_DITHER_SEL_WLAN_2442_W { - LO_SDM_DITHER_SEL_WLAN_2442_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_wlan_2447(&mut self) -> LO_SDM_DITHER_SEL_WLAN_2447_W<14> { + LO_SDM_DITHER_SEL_WLAN_2447_W::new(self) } - #[doc = "Bits 10:11"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn lo_sdm_dither_sel_wlan_2437(&mut self) -> LO_SDM_DITHER_SEL_WLAN_2437_W { - LO_SDM_DITHER_SEL_WLAN_2437_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_wlan_2452(&mut self) -> LO_SDM_DITHER_SEL_WLAN_2452_W<16> { + LO_SDM_DITHER_SEL_WLAN_2452_W::new(self) } - #[doc = "Bits 8:9"] + #[doc = "Bits 18:19"] #[inline(always)] - pub fn lo_sdm_dither_sel_wlan_2432(&mut self) -> LO_SDM_DITHER_SEL_WLAN_2432_W { - LO_SDM_DITHER_SEL_WLAN_2432_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_wlan_2457(&mut self) -> LO_SDM_DITHER_SEL_WLAN_2457_W<18> { + LO_SDM_DITHER_SEL_WLAN_2457_W::new(self) } - #[doc = "Bits 6:7"] + #[doc = "Bits 20:21"] #[inline(always)] - pub fn lo_sdm_dither_sel_wlan_2427(&mut self) -> LO_SDM_DITHER_SEL_WLAN_2427_W { - LO_SDM_DITHER_SEL_WLAN_2427_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_wlan_2462(&mut self) -> LO_SDM_DITHER_SEL_WLAN_2462_W<20> { + LO_SDM_DITHER_SEL_WLAN_2462_W::new(self) } - #[doc = "Bits 4:5"] + #[doc = "Bits 22:23"] #[inline(always)] - pub fn lo_sdm_dither_sel_wlan_2422(&mut self) -> LO_SDM_DITHER_SEL_WLAN_2422_W { - LO_SDM_DITHER_SEL_WLAN_2422_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_wlan_2467(&mut self) -> LO_SDM_DITHER_SEL_WLAN_2467_W<22> { + LO_SDM_DITHER_SEL_WLAN_2467_W::new(self) } - #[doc = "Bits 2:3"] + #[doc = "Bits 24:25"] #[inline(always)] - pub fn lo_sdm_dither_sel_wlan_2417(&mut self) -> LO_SDM_DITHER_SEL_WLAN_2417_W { - LO_SDM_DITHER_SEL_WLAN_2417_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_wlan_2472(&mut self) -> LO_SDM_DITHER_SEL_WLAN_2472_W<24> { + LO_SDM_DITHER_SEL_WLAN_2472_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bits 26:27"] #[inline(always)] - pub fn lo_sdm_dither_sel_wlan_2412(&mut self) -> LO_SDM_DITHER_SEL_WLAN_2412_W { - LO_SDM_DITHER_SEL_WLAN_2412_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_wlan_2484(&mut self) -> LO_SDM_DITHER_SEL_WLAN_2484_W<26> { + LO_SDM_DITHER_SEL_WLAN_2484_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -557,11 +280,10 @@ impl crate::Readable for LO_SDM_CTRL_HW1_SPEC { #[doc = "`write(|w| ..)` method takes [lo_sdm_ctrl_hw1::W](W) writer structure"] impl crate::Writable for LO_SDM_CTRL_HW1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets lo_sdm_ctrl_hw1 to value 0"] impl crate::Resettable for LO_SDM_CTRL_HW1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/lo_sdm_ctrl_hw2.rs b/src/rf/lo_sdm_ctrl_hw2.rs index ce315dc..e67a160 100644 --- a/src/rf/lo_sdm_ctrl_hw2.rs +++ b/src/rf/lo_sdm_ctrl_hw2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,591 +28,273 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `lo_sdm_dither_sel_ble_2432` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2432_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2432_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2432_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2432_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2432` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2432_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2432_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 30)) | ((value as u32 & 0x03) << 30); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2430` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2430_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2430_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2430_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2430_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2430` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2430_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2430_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 28)) | ((value as u32 & 0x03) << 28); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2428` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2428_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2428_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2428_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2428_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2428` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2428_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2428_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 26)) | ((value as u32 & 0x03) << 26); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2426` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2426_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2426_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2426_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2426_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2426` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2426_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2426_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 24)) | ((value as u32 & 0x03) << 24); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2424` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2424_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2424_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2424_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2424_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2424` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2424_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2424_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 22)) | ((value as u32 & 0x03) << 22); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2422` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2422_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2422_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2422_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2422_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2422` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2422_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2422_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 20)) | ((value as u32 & 0x03) << 20); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2420` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2420_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2420_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2420_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2420_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2420` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2420_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2420_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 18)) | ((value as u32 & 0x03) << 18); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2418` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2418_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2418_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2418_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2418_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2418` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2418_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2418_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 16)) | ((value as u32 & 0x03) << 16); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2416` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2416_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2416_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2416_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2416_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2416` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2416_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2416_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 14)) | ((value as u32 & 0x03) << 14); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2414` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2414_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2414_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2414_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2414_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2414` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2414_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2414_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 12)) | ((value as u32 & 0x03) << 12); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2412` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2412_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2412_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2412_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2412_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2412` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2412_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2412_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 10)) | ((value as u32 & 0x03) << 10); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2410` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2410_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2410_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2410_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2410_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2410` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2410_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2410_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2408` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2408_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2408_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2408_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2408_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2408` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2408_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2408_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 6)) | ((value as u32 & 0x03) << 6); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2406` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2406_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2406_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2406_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2406_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2406` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2406_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2406_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 4)) | ((value as u32 & 0x03) << 4); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2404` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2404_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2404_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2404_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2404_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2404` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2404_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2404_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 2)) | ((value as u32 & 0x03) << 2); - self.w - } -} #[doc = "Field `lo_sdm_dither_sel_ble_2402` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2402_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2402_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2402_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2402_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type LO_SDM_DITHER_SEL_BLE_2402_R = crate::FieldReader; #[doc = "Field `lo_sdm_dither_sel_ble_2402` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2402_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2402_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type LO_SDM_DITHER_SEL_BLE_2402_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW2_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2404` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2404_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2404` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2404_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW2_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2406` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2406_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2406` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2406_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW2_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2408` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2408_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2408` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2408_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW2_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2410` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2410_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2410` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2410_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW2_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2412` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2412_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2412` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2412_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW2_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2414` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2414_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2414` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2414_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW2_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2416` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2416_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2416` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2416_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW2_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2418` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2418_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2418` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2418_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW2_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2420` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2420_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2420` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2420_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW2_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2422` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2422_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2422` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2422_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW2_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2424` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2424_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2424` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2424_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW2_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2426` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2426_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2426` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2426_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW2_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2428` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2428_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2428` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2428_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW2_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2430` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2430_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2430` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2430_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW2_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2432` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2432_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2432` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2432_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW2_SPEC, u8, u8, 2, O>; +impl R { + #[doc = "Bits 0:1"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w + pub fn lo_sdm_dither_sel_ble_2402(&self) -> LO_SDM_DITHER_SEL_BLE_2402_R { + LO_SDM_DITHER_SEL_BLE_2402_R::new((self.bits & 3) as u8) } -} -impl R { - #[doc = "Bits 30:31"] + #[doc = "Bits 2:3"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2432(&self) -> LO_SDM_DITHER_SEL_BLE_2432_R { - LO_SDM_DITHER_SEL_BLE_2432_R::new(((self.bits >> 30) & 0x03) as u8) + pub fn lo_sdm_dither_sel_ble_2404(&self) -> LO_SDM_DITHER_SEL_BLE_2404_R { + LO_SDM_DITHER_SEL_BLE_2404_R::new(((self.bits >> 2) & 3) as u8) } - #[doc = "Bits 28:29"] + #[doc = "Bits 4:5"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2430(&self) -> LO_SDM_DITHER_SEL_BLE_2430_R { - LO_SDM_DITHER_SEL_BLE_2430_R::new(((self.bits >> 28) & 0x03) as u8) + pub fn lo_sdm_dither_sel_ble_2406(&self) -> LO_SDM_DITHER_SEL_BLE_2406_R { + LO_SDM_DITHER_SEL_BLE_2406_R::new(((self.bits >> 4) & 3) as u8) } - #[doc = "Bits 26:27"] + #[doc = "Bits 6:7"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2428(&self) -> LO_SDM_DITHER_SEL_BLE_2428_R { - LO_SDM_DITHER_SEL_BLE_2428_R::new(((self.bits >> 26) & 0x03) as u8) + pub fn lo_sdm_dither_sel_ble_2408(&self) -> LO_SDM_DITHER_SEL_BLE_2408_R { + LO_SDM_DITHER_SEL_BLE_2408_R::new(((self.bits >> 6) & 3) as u8) } - #[doc = "Bits 24:25"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2426(&self) -> LO_SDM_DITHER_SEL_BLE_2426_R { - LO_SDM_DITHER_SEL_BLE_2426_R::new(((self.bits >> 24) & 0x03) as u8) + pub fn lo_sdm_dither_sel_ble_2410(&self) -> LO_SDM_DITHER_SEL_BLE_2410_R { + LO_SDM_DITHER_SEL_BLE_2410_R::new(((self.bits >> 8) & 3) as u8) } - #[doc = "Bits 22:23"] + #[doc = "Bits 10:11"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2424(&self) -> LO_SDM_DITHER_SEL_BLE_2424_R { - LO_SDM_DITHER_SEL_BLE_2424_R::new(((self.bits >> 22) & 0x03) as u8) + pub fn lo_sdm_dither_sel_ble_2412(&self) -> LO_SDM_DITHER_SEL_BLE_2412_R { + LO_SDM_DITHER_SEL_BLE_2412_R::new(((self.bits >> 10) & 3) as u8) } - #[doc = "Bits 20:21"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2422(&self) -> LO_SDM_DITHER_SEL_BLE_2422_R { - LO_SDM_DITHER_SEL_BLE_2422_R::new(((self.bits >> 20) & 0x03) as u8) + pub fn lo_sdm_dither_sel_ble_2414(&self) -> LO_SDM_DITHER_SEL_BLE_2414_R { + LO_SDM_DITHER_SEL_BLE_2414_R::new(((self.bits >> 12) & 3) as u8) } - #[doc = "Bits 18:19"] + #[doc = "Bits 14:15"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2420(&self) -> LO_SDM_DITHER_SEL_BLE_2420_R { - LO_SDM_DITHER_SEL_BLE_2420_R::new(((self.bits >> 18) & 0x03) as u8) + pub fn lo_sdm_dither_sel_ble_2416(&self) -> LO_SDM_DITHER_SEL_BLE_2416_R { + LO_SDM_DITHER_SEL_BLE_2416_R::new(((self.bits >> 14) & 3) as u8) } #[doc = "Bits 16:17"] #[inline(always)] pub fn lo_sdm_dither_sel_ble_2418(&self) -> LO_SDM_DITHER_SEL_BLE_2418_R { - LO_SDM_DITHER_SEL_BLE_2418_R::new(((self.bits >> 16) & 0x03) as u8) + LO_SDM_DITHER_SEL_BLE_2418_R::new(((self.bits >> 16) & 3) as u8) } - #[doc = "Bits 14:15"] - #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2416(&self) -> LO_SDM_DITHER_SEL_BLE_2416_R { - LO_SDM_DITHER_SEL_BLE_2416_R::new(((self.bits >> 14) & 0x03) as u8) - } - #[doc = "Bits 12:13"] + #[doc = "Bits 18:19"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2414(&self) -> LO_SDM_DITHER_SEL_BLE_2414_R { - LO_SDM_DITHER_SEL_BLE_2414_R::new(((self.bits >> 12) & 0x03) as u8) + pub fn lo_sdm_dither_sel_ble_2420(&self) -> LO_SDM_DITHER_SEL_BLE_2420_R { + LO_SDM_DITHER_SEL_BLE_2420_R::new(((self.bits >> 18) & 3) as u8) } - #[doc = "Bits 10:11"] + #[doc = "Bits 20:21"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2412(&self) -> LO_SDM_DITHER_SEL_BLE_2412_R { - LO_SDM_DITHER_SEL_BLE_2412_R::new(((self.bits >> 10) & 0x03) as u8) + pub fn lo_sdm_dither_sel_ble_2422(&self) -> LO_SDM_DITHER_SEL_BLE_2422_R { + LO_SDM_DITHER_SEL_BLE_2422_R::new(((self.bits >> 20) & 3) as u8) } - #[doc = "Bits 8:9"] + #[doc = "Bits 22:23"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2410(&self) -> LO_SDM_DITHER_SEL_BLE_2410_R { - LO_SDM_DITHER_SEL_BLE_2410_R::new(((self.bits >> 8) & 0x03) as u8) + pub fn lo_sdm_dither_sel_ble_2424(&self) -> LO_SDM_DITHER_SEL_BLE_2424_R { + LO_SDM_DITHER_SEL_BLE_2424_R::new(((self.bits >> 22) & 3) as u8) } - #[doc = "Bits 6:7"] + #[doc = "Bits 24:25"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2408(&self) -> LO_SDM_DITHER_SEL_BLE_2408_R { - LO_SDM_DITHER_SEL_BLE_2408_R::new(((self.bits >> 6) & 0x03) as u8) + pub fn lo_sdm_dither_sel_ble_2426(&self) -> LO_SDM_DITHER_SEL_BLE_2426_R { + LO_SDM_DITHER_SEL_BLE_2426_R::new(((self.bits >> 24) & 3) as u8) } - #[doc = "Bits 4:5"] + #[doc = "Bits 26:27"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2406(&self) -> LO_SDM_DITHER_SEL_BLE_2406_R { - LO_SDM_DITHER_SEL_BLE_2406_R::new(((self.bits >> 4) & 0x03) as u8) + pub fn lo_sdm_dither_sel_ble_2428(&self) -> LO_SDM_DITHER_SEL_BLE_2428_R { + LO_SDM_DITHER_SEL_BLE_2428_R::new(((self.bits >> 26) & 3) as u8) } - #[doc = "Bits 2:3"] + #[doc = "Bits 28:29"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2404(&self) -> LO_SDM_DITHER_SEL_BLE_2404_R { - LO_SDM_DITHER_SEL_BLE_2404_R::new(((self.bits >> 2) & 0x03) as u8) + pub fn lo_sdm_dither_sel_ble_2430(&self) -> LO_SDM_DITHER_SEL_BLE_2430_R { + LO_SDM_DITHER_SEL_BLE_2430_R::new(((self.bits >> 28) & 3) as u8) } - #[doc = "Bits 0:1"] + #[doc = "Bits 30:31"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2402(&self) -> LO_SDM_DITHER_SEL_BLE_2402_R { - LO_SDM_DITHER_SEL_BLE_2402_R::new((self.bits & 0x03) as u8) + pub fn lo_sdm_dither_sel_ble_2432(&self) -> LO_SDM_DITHER_SEL_BLE_2432_R { + LO_SDM_DITHER_SEL_BLE_2432_R::new(((self.bits >> 30) & 3) as u8) } } impl W { - #[doc = "Bits 30:31"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2432(&mut self) -> LO_SDM_DITHER_SEL_BLE_2432_W { - LO_SDM_DITHER_SEL_BLE_2432_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2402(&mut self) -> LO_SDM_DITHER_SEL_BLE_2402_W<0> { + LO_SDM_DITHER_SEL_BLE_2402_W::new(self) } - #[doc = "Bits 28:29"] + #[doc = "Bits 2:3"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2430(&mut self) -> LO_SDM_DITHER_SEL_BLE_2430_W { - LO_SDM_DITHER_SEL_BLE_2430_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2404(&mut self) -> LO_SDM_DITHER_SEL_BLE_2404_W<2> { + LO_SDM_DITHER_SEL_BLE_2404_W::new(self) } - #[doc = "Bits 26:27"] + #[doc = "Bits 4:5"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2428(&mut self) -> LO_SDM_DITHER_SEL_BLE_2428_W { - LO_SDM_DITHER_SEL_BLE_2428_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2406(&mut self) -> LO_SDM_DITHER_SEL_BLE_2406_W<4> { + LO_SDM_DITHER_SEL_BLE_2406_W::new(self) } - #[doc = "Bits 24:25"] + #[doc = "Bits 6:7"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2426(&mut self) -> LO_SDM_DITHER_SEL_BLE_2426_W { - LO_SDM_DITHER_SEL_BLE_2426_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2408(&mut self) -> LO_SDM_DITHER_SEL_BLE_2408_W<6> { + LO_SDM_DITHER_SEL_BLE_2408_W::new(self) } - #[doc = "Bits 22:23"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2424(&mut self) -> LO_SDM_DITHER_SEL_BLE_2424_W { - LO_SDM_DITHER_SEL_BLE_2424_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2410(&mut self) -> LO_SDM_DITHER_SEL_BLE_2410_W<8> { + LO_SDM_DITHER_SEL_BLE_2410_W::new(self) } - #[doc = "Bits 20:21"] + #[doc = "Bits 10:11"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2422(&mut self) -> LO_SDM_DITHER_SEL_BLE_2422_W { - LO_SDM_DITHER_SEL_BLE_2422_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2412(&mut self) -> LO_SDM_DITHER_SEL_BLE_2412_W<10> { + LO_SDM_DITHER_SEL_BLE_2412_W::new(self) } - #[doc = "Bits 18:19"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2420(&mut self) -> LO_SDM_DITHER_SEL_BLE_2420_W { - LO_SDM_DITHER_SEL_BLE_2420_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2414(&mut self) -> LO_SDM_DITHER_SEL_BLE_2414_W<12> { + LO_SDM_DITHER_SEL_BLE_2414_W::new(self) } - #[doc = "Bits 16:17"] + #[doc = "Bits 14:15"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2418(&mut self) -> LO_SDM_DITHER_SEL_BLE_2418_W { - LO_SDM_DITHER_SEL_BLE_2418_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2416(&mut self) -> LO_SDM_DITHER_SEL_BLE_2416_W<14> { + LO_SDM_DITHER_SEL_BLE_2416_W::new(self) } - #[doc = "Bits 14:15"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2416(&mut self) -> LO_SDM_DITHER_SEL_BLE_2416_W { - LO_SDM_DITHER_SEL_BLE_2416_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2418(&mut self) -> LO_SDM_DITHER_SEL_BLE_2418_W<16> { + LO_SDM_DITHER_SEL_BLE_2418_W::new(self) } - #[doc = "Bits 12:13"] + #[doc = "Bits 18:19"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2414(&mut self) -> LO_SDM_DITHER_SEL_BLE_2414_W { - LO_SDM_DITHER_SEL_BLE_2414_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2420(&mut self) -> LO_SDM_DITHER_SEL_BLE_2420_W<18> { + LO_SDM_DITHER_SEL_BLE_2420_W::new(self) } - #[doc = "Bits 10:11"] + #[doc = "Bits 20:21"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2412(&mut self) -> LO_SDM_DITHER_SEL_BLE_2412_W { - LO_SDM_DITHER_SEL_BLE_2412_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2422(&mut self) -> LO_SDM_DITHER_SEL_BLE_2422_W<20> { + LO_SDM_DITHER_SEL_BLE_2422_W::new(self) } - #[doc = "Bits 8:9"] + #[doc = "Bits 22:23"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2410(&mut self) -> LO_SDM_DITHER_SEL_BLE_2410_W { - LO_SDM_DITHER_SEL_BLE_2410_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2424(&mut self) -> LO_SDM_DITHER_SEL_BLE_2424_W<22> { + LO_SDM_DITHER_SEL_BLE_2424_W::new(self) } - #[doc = "Bits 6:7"] + #[doc = "Bits 24:25"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2408(&mut self) -> LO_SDM_DITHER_SEL_BLE_2408_W { - LO_SDM_DITHER_SEL_BLE_2408_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2426(&mut self) -> LO_SDM_DITHER_SEL_BLE_2426_W<24> { + LO_SDM_DITHER_SEL_BLE_2426_W::new(self) } - #[doc = "Bits 4:5"] + #[doc = "Bits 26:27"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2406(&mut self) -> LO_SDM_DITHER_SEL_BLE_2406_W { - LO_SDM_DITHER_SEL_BLE_2406_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2428(&mut self) -> LO_SDM_DITHER_SEL_BLE_2428_W<26> { + LO_SDM_DITHER_SEL_BLE_2428_W::new(self) } - #[doc = "Bits 2:3"] + #[doc = "Bits 28:29"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2404(&mut self) -> LO_SDM_DITHER_SEL_BLE_2404_W { - LO_SDM_DITHER_SEL_BLE_2404_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2430(&mut self) -> LO_SDM_DITHER_SEL_BLE_2430_W<28> { + LO_SDM_DITHER_SEL_BLE_2430_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bits 30:31"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2402(&mut self) -> LO_SDM_DITHER_SEL_BLE_2402_W { - LO_SDM_DITHER_SEL_BLE_2402_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2432(&mut self) -> LO_SDM_DITHER_SEL_BLE_2432_W<30> { + LO_SDM_DITHER_SEL_BLE_2432_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -629,11 +312,10 @@ impl crate::Readable for LO_SDM_CTRL_HW2_SPEC { #[doc = "`write(|w| ..)` method takes [lo_sdm_ctrl_hw2::W](W) writer structure"] impl crate::Writable for LO_SDM_CTRL_HW2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets lo_sdm_ctrl_hw2 to value 0"] impl crate::Resettable for LO_SDM_CTRL_HW2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/lo_sdm_ctrl_hw3.rs b/src/rf/lo_sdm_ctrl_hw3.rs index 5c14dca..3e8171e 100644 --- a/src/rf/lo_sdm_ctrl_hw3.rs +++ b/src/rf/lo_sdm_ctrl_hw3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,591 +28,273 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `lo_sdm_dither_sel_ble_2464` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2464_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2464_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2464_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2464_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2464` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2464_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2464_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 30)) | ((value as u32 & 0x03) << 30); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2462` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2462_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2462_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2462_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2462_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2462` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2462_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2462_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 28)) | ((value as u32 & 0x03) << 28); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2460` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2460_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2460_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2460_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2460_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2460` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2460_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2460_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 26)) | ((value as u32 & 0x03) << 26); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2458` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2458_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2458_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2458_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2458_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2458` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2458_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2458_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 24)) | ((value as u32 & 0x03) << 24); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2456` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2456_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2456_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2456_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2456_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2456` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2456_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2456_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 22)) | ((value as u32 & 0x03) << 22); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2454` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2454_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2454_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2454_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2454_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2454` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2454_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2454_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 20)) | ((value as u32 & 0x03) << 20); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2452` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2452_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2452_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2452_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2452_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2452` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2452_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2452_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 18)) | ((value as u32 & 0x03) << 18); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2450` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2450_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2450_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2450_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2450_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2450` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2450_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2450_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 16)) | ((value as u32 & 0x03) << 16); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2448` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2448_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2448_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2448_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2448_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2448` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2448_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2448_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 14)) | ((value as u32 & 0x03) << 14); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2446` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2446_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2446_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2446_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2446_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2446` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2446_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2446_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 12)) | ((value as u32 & 0x03) << 12); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2444` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2444_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2444_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2444_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2444_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2444` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2444_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2444_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 10)) | ((value as u32 & 0x03) << 10); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2442` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2442_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2442_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2442_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2442_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2442` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2442_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2442_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2440` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2440_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2440_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2440_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2440_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2440` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2440_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2440_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 6)) | ((value as u32 & 0x03) << 6); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2438` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2438_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2438_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2438_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2438_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2438` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2438_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2438_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 4)) | ((value as u32 & 0x03) << 4); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2436` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2436_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2436_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2436_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2436_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2436` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2436_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2436_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 2)) | ((value as u32 & 0x03) << 2); - self.w - } -} #[doc = "Field `lo_sdm_dither_sel_ble_2434` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2434_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2434_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2434_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2434_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type LO_SDM_DITHER_SEL_BLE_2434_R = crate::FieldReader; #[doc = "Field `lo_sdm_dither_sel_ble_2434` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2434_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2434_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type LO_SDM_DITHER_SEL_BLE_2434_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW3_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2436` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2436_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2436` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2436_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW3_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2438` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2438_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2438` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2438_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW3_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2440` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2440_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2440` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2440_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW3_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2442` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2442_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2442` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2442_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW3_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2444` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2444_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2444` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2444_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW3_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2446` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2446_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2446` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2446_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW3_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2448` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2448_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2448` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2448_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW3_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2450` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2450_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2450` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2450_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW3_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2452` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2452_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2452` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2452_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW3_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2454` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2454_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2454` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2454_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW3_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2456` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2456_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2456` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2456_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW3_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2458` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2458_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2458` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2458_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW3_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2460` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2460_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2460` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2460_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW3_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2462` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2462_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2462` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2462_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW3_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2464` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2464_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2464` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2464_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW3_SPEC, u8, u8, 2, O>; +impl R { + #[doc = "Bits 0:1"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w + pub fn lo_sdm_dither_sel_ble_2434(&self) -> LO_SDM_DITHER_SEL_BLE_2434_R { + LO_SDM_DITHER_SEL_BLE_2434_R::new((self.bits & 3) as u8) } -} -impl R { - #[doc = "Bits 30:31"] + #[doc = "Bits 2:3"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2464(&self) -> LO_SDM_DITHER_SEL_BLE_2464_R { - LO_SDM_DITHER_SEL_BLE_2464_R::new(((self.bits >> 30) & 0x03) as u8) + pub fn lo_sdm_dither_sel_ble_2436(&self) -> LO_SDM_DITHER_SEL_BLE_2436_R { + LO_SDM_DITHER_SEL_BLE_2436_R::new(((self.bits >> 2) & 3) as u8) } - #[doc = "Bits 28:29"] + #[doc = "Bits 4:5"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2462(&self) -> LO_SDM_DITHER_SEL_BLE_2462_R { - LO_SDM_DITHER_SEL_BLE_2462_R::new(((self.bits >> 28) & 0x03) as u8) + pub fn lo_sdm_dither_sel_ble_2438(&self) -> LO_SDM_DITHER_SEL_BLE_2438_R { + LO_SDM_DITHER_SEL_BLE_2438_R::new(((self.bits >> 4) & 3) as u8) } - #[doc = "Bits 26:27"] + #[doc = "Bits 6:7"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2460(&self) -> LO_SDM_DITHER_SEL_BLE_2460_R { - LO_SDM_DITHER_SEL_BLE_2460_R::new(((self.bits >> 26) & 0x03) as u8) + pub fn lo_sdm_dither_sel_ble_2440(&self) -> LO_SDM_DITHER_SEL_BLE_2440_R { + LO_SDM_DITHER_SEL_BLE_2440_R::new(((self.bits >> 6) & 3) as u8) } - #[doc = "Bits 24:25"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2458(&self) -> LO_SDM_DITHER_SEL_BLE_2458_R { - LO_SDM_DITHER_SEL_BLE_2458_R::new(((self.bits >> 24) & 0x03) as u8) + pub fn lo_sdm_dither_sel_ble_2442(&self) -> LO_SDM_DITHER_SEL_BLE_2442_R { + LO_SDM_DITHER_SEL_BLE_2442_R::new(((self.bits >> 8) & 3) as u8) } - #[doc = "Bits 22:23"] + #[doc = "Bits 10:11"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2456(&self) -> LO_SDM_DITHER_SEL_BLE_2456_R { - LO_SDM_DITHER_SEL_BLE_2456_R::new(((self.bits >> 22) & 0x03) as u8) + pub fn lo_sdm_dither_sel_ble_2444(&self) -> LO_SDM_DITHER_SEL_BLE_2444_R { + LO_SDM_DITHER_SEL_BLE_2444_R::new(((self.bits >> 10) & 3) as u8) } - #[doc = "Bits 20:21"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2454(&self) -> LO_SDM_DITHER_SEL_BLE_2454_R { - LO_SDM_DITHER_SEL_BLE_2454_R::new(((self.bits >> 20) & 0x03) as u8) + pub fn lo_sdm_dither_sel_ble_2446(&self) -> LO_SDM_DITHER_SEL_BLE_2446_R { + LO_SDM_DITHER_SEL_BLE_2446_R::new(((self.bits >> 12) & 3) as u8) } - #[doc = "Bits 18:19"] + #[doc = "Bits 14:15"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2452(&self) -> LO_SDM_DITHER_SEL_BLE_2452_R { - LO_SDM_DITHER_SEL_BLE_2452_R::new(((self.bits >> 18) & 0x03) as u8) + pub fn lo_sdm_dither_sel_ble_2448(&self) -> LO_SDM_DITHER_SEL_BLE_2448_R { + LO_SDM_DITHER_SEL_BLE_2448_R::new(((self.bits >> 14) & 3) as u8) } #[doc = "Bits 16:17"] #[inline(always)] pub fn lo_sdm_dither_sel_ble_2450(&self) -> LO_SDM_DITHER_SEL_BLE_2450_R { - LO_SDM_DITHER_SEL_BLE_2450_R::new(((self.bits >> 16) & 0x03) as u8) + LO_SDM_DITHER_SEL_BLE_2450_R::new(((self.bits >> 16) & 3) as u8) } - #[doc = "Bits 14:15"] - #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2448(&self) -> LO_SDM_DITHER_SEL_BLE_2448_R { - LO_SDM_DITHER_SEL_BLE_2448_R::new(((self.bits >> 14) & 0x03) as u8) - } - #[doc = "Bits 12:13"] + #[doc = "Bits 18:19"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2446(&self) -> LO_SDM_DITHER_SEL_BLE_2446_R { - LO_SDM_DITHER_SEL_BLE_2446_R::new(((self.bits >> 12) & 0x03) as u8) + pub fn lo_sdm_dither_sel_ble_2452(&self) -> LO_SDM_DITHER_SEL_BLE_2452_R { + LO_SDM_DITHER_SEL_BLE_2452_R::new(((self.bits >> 18) & 3) as u8) } - #[doc = "Bits 10:11"] + #[doc = "Bits 20:21"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2444(&self) -> LO_SDM_DITHER_SEL_BLE_2444_R { - LO_SDM_DITHER_SEL_BLE_2444_R::new(((self.bits >> 10) & 0x03) as u8) + pub fn lo_sdm_dither_sel_ble_2454(&self) -> LO_SDM_DITHER_SEL_BLE_2454_R { + LO_SDM_DITHER_SEL_BLE_2454_R::new(((self.bits >> 20) & 3) as u8) } - #[doc = "Bits 8:9"] + #[doc = "Bits 22:23"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2442(&self) -> LO_SDM_DITHER_SEL_BLE_2442_R { - LO_SDM_DITHER_SEL_BLE_2442_R::new(((self.bits >> 8) & 0x03) as u8) + pub fn lo_sdm_dither_sel_ble_2456(&self) -> LO_SDM_DITHER_SEL_BLE_2456_R { + LO_SDM_DITHER_SEL_BLE_2456_R::new(((self.bits >> 22) & 3) as u8) } - #[doc = "Bits 6:7"] + #[doc = "Bits 24:25"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2440(&self) -> LO_SDM_DITHER_SEL_BLE_2440_R { - LO_SDM_DITHER_SEL_BLE_2440_R::new(((self.bits >> 6) & 0x03) as u8) + pub fn lo_sdm_dither_sel_ble_2458(&self) -> LO_SDM_DITHER_SEL_BLE_2458_R { + LO_SDM_DITHER_SEL_BLE_2458_R::new(((self.bits >> 24) & 3) as u8) } - #[doc = "Bits 4:5"] + #[doc = "Bits 26:27"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2438(&self) -> LO_SDM_DITHER_SEL_BLE_2438_R { - LO_SDM_DITHER_SEL_BLE_2438_R::new(((self.bits >> 4) & 0x03) as u8) + pub fn lo_sdm_dither_sel_ble_2460(&self) -> LO_SDM_DITHER_SEL_BLE_2460_R { + LO_SDM_DITHER_SEL_BLE_2460_R::new(((self.bits >> 26) & 3) as u8) } - #[doc = "Bits 2:3"] + #[doc = "Bits 28:29"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2436(&self) -> LO_SDM_DITHER_SEL_BLE_2436_R { - LO_SDM_DITHER_SEL_BLE_2436_R::new(((self.bits >> 2) & 0x03) as u8) + pub fn lo_sdm_dither_sel_ble_2462(&self) -> LO_SDM_DITHER_SEL_BLE_2462_R { + LO_SDM_DITHER_SEL_BLE_2462_R::new(((self.bits >> 28) & 3) as u8) } - #[doc = "Bits 0:1"] + #[doc = "Bits 30:31"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2434(&self) -> LO_SDM_DITHER_SEL_BLE_2434_R { - LO_SDM_DITHER_SEL_BLE_2434_R::new((self.bits & 0x03) as u8) + pub fn lo_sdm_dither_sel_ble_2464(&self) -> LO_SDM_DITHER_SEL_BLE_2464_R { + LO_SDM_DITHER_SEL_BLE_2464_R::new(((self.bits >> 30) & 3) as u8) } } impl W { - #[doc = "Bits 30:31"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2464(&mut self) -> LO_SDM_DITHER_SEL_BLE_2464_W { - LO_SDM_DITHER_SEL_BLE_2464_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2434(&mut self) -> LO_SDM_DITHER_SEL_BLE_2434_W<0> { + LO_SDM_DITHER_SEL_BLE_2434_W::new(self) } - #[doc = "Bits 28:29"] + #[doc = "Bits 2:3"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2462(&mut self) -> LO_SDM_DITHER_SEL_BLE_2462_W { - LO_SDM_DITHER_SEL_BLE_2462_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2436(&mut self) -> LO_SDM_DITHER_SEL_BLE_2436_W<2> { + LO_SDM_DITHER_SEL_BLE_2436_W::new(self) } - #[doc = "Bits 26:27"] + #[doc = "Bits 4:5"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2460(&mut self) -> LO_SDM_DITHER_SEL_BLE_2460_W { - LO_SDM_DITHER_SEL_BLE_2460_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2438(&mut self) -> LO_SDM_DITHER_SEL_BLE_2438_W<4> { + LO_SDM_DITHER_SEL_BLE_2438_W::new(self) } - #[doc = "Bits 24:25"] + #[doc = "Bits 6:7"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2458(&mut self) -> LO_SDM_DITHER_SEL_BLE_2458_W { - LO_SDM_DITHER_SEL_BLE_2458_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2440(&mut self) -> LO_SDM_DITHER_SEL_BLE_2440_W<6> { + LO_SDM_DITHER_SEL_BLE_2440_W::new(self) } - #[doc = "Bits 22:23"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2456(&mut self) -> LO_SDM_DITHER_SEL_BLE_2456_W { - LO_SDM_DITHER_SEL_BLE_2456_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2442(&mut self) -> LO_SDM_DITHER_SEL_BLE_2442_W<8> { + LO_SDM_DITHER_SEL_BLE_2442_W::new(self) } - #[doc = "Bits 20:21"] + #[doc = "Bits 10:11"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2454(&mut self) -> LO_SDM_DITHER_SEL_BLE_2454_W { - LO_SDM_DITHER_SEL_BLE_2454_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2444(&mut self) -> LO_SDM_DITHER_SEL_BLE_2444_W<10> { + LO_SDM_DITHER_SEL_BLE_2444_W::new(self) } - #[doc = "Bits 18:19"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2452(&mut self) -> LO_SDM_DITHER_SEL_BLE_2452_W { - LO_SDM_DITHER_SEL_BLE_2452_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2446(&mut self) -> LO_SDM_DITHER_SEL_BLE_2446_W<12> { + LO_SDM_DITHER_SEL_BLE_2446_W::new(self) } - #[doc = "Bits 16:17"] + #[doc = "Bits 14:15"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2450(&mut self) -> LO_SDM_DITHER_SEL_BLE_2450_W { - LO_SDM_DITHER_SEL_BLE_2450_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2448(&mut self) -> LO_SDM_DITHER_SEL_BLE_2448_W<14> { + LO_SDM_DITHER_SEL_BLE_2448_W::new(self) } - #[doc = "Bits 14:15"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2448(&mut self) -> LO_SDM_DITHER_SEL_BLE_2448_W { - LO_SDM_DITHER_SEL_BLE_2448_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2450(&mut self) -> LO_SDM_DITHER_SEL_BLE_2450_W<16> { + LO_SDM_DITHER_SEL_BLE_2450_W::new(self) } - #[doc = "Bits 12:13"] + #[doc = "Bits 18:19"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2446(&mut self) -> LO_SDM_DITHER_SEL_BLE_2446_W { - LO_SDM_DITHER_SEL_BLE_2446_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2452(&mut self) -> LO_SDM_DITHER_SEL_BLE_2452_W<18> { + LO_SDM_DITHER_SEL_BLE_2452_W::new(self) } - #[doc = "Bits 10:11"] + #[doc = "Bits 20:21"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2444(&mut self) -> LO_SDM_DITHER_SEL_BLE_2444_W { - LO_SDM_DITHER_SEL_BLE_2444_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2454(&mut self) -> LO_SDM_DITHER_SEL_BLE_2454_W<20> { + LO_SDM_DITHER_SEL_BLE_2454_W::new(self) } - #[doc = "Bits 8:9"] + #[doc = "Bits 22:23"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2442(&mut self) -> LO_SDM_DITHER_SEL_BLE_2442_W { - LO_SDM_DITHER_SEL_BLE_2442_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2456(&mut self) -> LO_SDM_DITHER_SEL_BLE_2456_W<22> { + LO_SDM_DITHER_SEL_BLE_2456_W::new(self) } - #[doc = "Bits 6:7"] + #[doc = "Bits 24:25"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2440(&mut self) -> LO_SDM_DITHER_SEL_BLE_2440_W { - LO_SDM_DITHER_SEL_BLE_2440_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2458(&mut self) -> LO_SDM_DITHER_SEL_BLE_2458_W<24> { + LO_SDM_DITHER_SEL_BLE_2458_W::new(self) } - #[doc = "Bits 4:5"] + #[doc = "Bits 26:27"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2438(&mut self) -> LO_SDM_DITHER_SEL_BLE_2438_W { - LO_SDM_DITHER_SEL_BLE_2438_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2460(&mut self) -> LO_SDM_DITHER_SEL_BLE_2460_W<26> { + LO_SDM_DITHER_SEL_BLE_2460_W::new(self) } - #[doc = "Bits 2:3"] + #[doc = "Bits 28:29"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2436(&mut self) -> LO_SDM_DITHER_SEL_BLE_2436_W { - LO_SDM_DITHER_SEL_BLE_2436_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2462(&mut self) -> LO_SDM_DITHER_SEL_BLE_2462_W<28> { + LO_SDM_DITHER_SEL_BLE_2462_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bits 30:31"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2434(&mut self) -> LO_SDM_DITHER_SEL_BLE_2434_W { - LO_SDM_DITHER_SEL_BLE_2434_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2464(&mut self) -> LO_SDM_DITHER_SEL_BLE_2464_W<30> { + LO_SDM_DITHER_SEL_BLE_2464_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -629,11 +312,10 @@ impl crate::Readable for LO_SDM_CTRL_HW3_SPEC { #[doc = "`write(|w| ..)` method takes [lo_sdm_ctrl_hw3::W](W) writer structure"] impl crate::Writable for LO_SDM_CTRL_HW3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets lo_sdm_ctrl_hw3 to value 0"] impl crate::Resettable for LO_SDM_CTRL_HW3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/lo_sdm_ctrl_hw4.rs b/src/rf/lo_sdm_ctrl_hw4.rs index ea0ec2b..32ab02c 100644 --- a/src/rf/lo_sdm_ctrl_hw4.rs +++ b/src/rf/lo_sdm_ctrl_hw4.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,339 +28,161 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `lo_sdm_dither_sel_ble_tx` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_TX_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_TX_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_TX_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_TX_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_tx` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_TX_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_TX_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 16)) | ((value as u32 & 0x03) << 16); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2480` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2480_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2480_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2480_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2480_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2480` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2480_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2480_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 14)) | ((value as u32 & 0x03) << 14); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2478` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2478_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2478_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2478_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2478_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2478` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2478_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2478_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 12)) | ((value as u32 & 0x03) << 12); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2476` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2476_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2476_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2476_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2476_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2476` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2476_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2476_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 10)) | ((value as u32 & 0x03) << 10); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2474` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2474_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2474_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2474_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2474_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2474` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2474_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2474_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2472` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2472_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2472_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2472_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2472_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2472` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2472_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2472_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 6)) | ((value as u32 & 0x03) << 6); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2470` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2470_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2470_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2470_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2470_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2470` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2470_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2470_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 4)) | ((value as u32 & 0x03) << 4); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2468` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2468_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2468_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2468_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2468_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel_ble_2468` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2468_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2468_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 2)) | ((value as u32 & 0x03) << 2); - self.w - } -} #[doc = "Field `lo_sdm_dither_sel_ble_2466` reader - "] -pub struct LO_SDM_DITHER_SEL_BLE_2466_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_BLE_2466_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_BLE_2466_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_BLE_2466_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type LO_SDM_DITHER_SEL_BLE_2466_R = crate::FieldReader; #[doc = "Field `lo_sdm_dither_sel_ble_2466` writer - "] -pub struct LO_SDM_DITHER_SEL_BLE_2466_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_BLE_2466_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w - } -} +pub type LO_SDM_DITHER_SEL_BLE_2466_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW4_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2468` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2468_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2468` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2468_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW4_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2470` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2470_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2470` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2470_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW4_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2472` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2472_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2472` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2472_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW4_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2474` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2474_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2474` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2474_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW4_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2476` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2476_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2476` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2476_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW4_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2478` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2478_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2478` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2478_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW4_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_2480` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_2480_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_2480` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_2480_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW4_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_dither_sel_ble_tx` reader - "] +pub type LO_SDM_DITHER_SEL_BLE_TX_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel_ble_tx` writer - "] +pub type LO_SDM_DITHER_SEL_BLE_TX_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW4_SPEC, u8, u8, 2, O>; impl R { - #[doc = "Bits 16:17"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_tx(&self) -> LO_SDM_DITHER_SEL_BLE_TX_R { - LO_SDM_DITHER_SEL_BLE_TX_R::new(((self.bits >> 16) & 0x03) as u8) + pub fn lo_sdm_dither_sel_ble_2466(&self) -> LO_SDM_DITHER_SEL_BLE_2466_R { + LO_SDM_DITHER_SEL_BLE_2466_R::new((self.bits & 3) as u8) } - #[doc = "Bits 14:15"] + #[doc = "Bits 2:3"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2480(&self) -> LO_SDM_DITHER_SEL_BLE_2480_R { - LO_SDM_DITHER_SEL_BLE_2480_R::new(((self.bits >> 14) & 0x03) as u8) + pub fn lo_sdm_dither_sel_ble_2468(&self) -> LO_SDM_DITHER_SEL_BLE_2468_R { + LO_SDM_DITHER_SEL_BLE_2468_R::new(((self.bits >> 2) & 3) as u8) } - #[doc = "Bits 12:13"] + #[doc = "Bits 4:5"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2478(&self) -> LO_SDM_DITHER_SEL_BLE_2478_R { - LO_SDM_DITHER_SEL_BLE_2478_R::new(((self.bits >> 12) & 0x03) as u8) + pub fn lo_sdm_dither_sel_ble_2470(&self) -> LO_SDM_DITHER_SEL_BLE_2470_R { + LO_SDM_DITHER_SEL_BLE_2470_R::new(((self.bits >> 4) & 3) as u8) } - #[doc = "Bits 10:11"] + #[doc = "Bits 6:7"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2476(&self) -> LO_SDM_DITHER_SEL_BLE_2476_R { - LO_SDM_DITHER_SEL_BLE_2476_R::new(((self.bits >> 10) & 0x03) as u8) + pub fn lo_sdm_dither_sel_ble_2472(&self) -> LO_SDM_DITHER_SEL_BLE_2472_R { + LO_SDM_DITHER_SEL_BLE_2472_R::new(((self.bits >> 6) & 3) as u8) } #[doc = "Bits 8:9"] #[inline(always)] pub fn lo_sdm_dither_sel_ble_2474(&self) -> LO_SDM_DITHER_SEL_BLE_2474_R { - LO_SDM_DITHER_SEL_BLE_2474_R::new(((self.bits >> 8) & 0x03) as u8) + LO_SDM_DITHER_SEL_BLE_2474_R::new(((self.bits >> 8) & 3) as u8) } - #[doc = "Bits 6:7"] + #[doc = "Bits 10:11"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2472(&self) -> LO_SDM_DITHER_SEL_BLE_2472_R { - LO_SDM_DITHER_SEL_BLE_2472_R::new(((self.bits >> 6) & 0x03) as u8) + pub fn lo_sdm_dither_sel_ble_2476(&self) -> LO_SDM_DITHER_SEL_BLE_2476_R { + LO_SDM_DITHER_SEL_BLE_2476_R::new(((self.bits >> 10) & 3) as u8) } - #[doc = "Bits 4:5"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2470(&self) -> LO_SDM_DITHER_SEL_BLE_2470_R { - LO_SDM_DITHER_SEL_BLE_2470_R::new(((self.bits >> 4) & 0x03) as u8) + pub fn lo_sdm_dither_sel_ble_2478(&self) -> LO_SDM_DITHER_SEL_BLE_2478_R { + LO_SDM_DITHER_SEL_BLE_2478_R::new(((self.bits >> 12) & 3) as u8) } - #[doc = "Bits 2:3"] + #[doc = "Bits 14:15"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2468(&self) -> LO_SDM_DITHER_SEL_BLE_2468_R { - LO_SDM_DITHER_SEL_BLE_2468_R::new(((self.bits >> 2) & 0x03) as u8) + pub fn lo_sdm_dither_sel_ble_2480(&self) -> LO_SDM_DITHER_SEL_BLE_2480_R { + LO_SDM_DITHER_SEL_BLE_2480_R::new(((self.bits >> 14) & 3) as u8) } - #[doc = "Bits 0:1"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2466(&self) -> LO_SDM_DITHER_SEL_BLE_2466_R { - LO_SDM_DITHER_SEL_BLE_2466_R::new((self.bits & 0x03) as u8) + pub fn lo_sdm_dither_sel_ble_tx(&self) -> LO_SDM_DITHER_SEL_BLE_TX_R { + LO_SDM_DITHER_SEL_BLE_TX_R::new(((self.bits >> 16) & 3) as u8) } } impl W { - #[doc = "Bits 16:17"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_tx(&mut self) -> LO_SDM_DITHER_SEL_BLE_TX_W { - LO_SDM_DITHER_SEL_BLE_TX_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2466(&mut self) -> LO_SDM_DITHER_SEL_BLE_2466_W<0> { + LO_SDM_DITHER_SEL_BLE_2466_W::new(self) } - #[doc = "Bits 14:15"] + #[doc = "Bits 2:3"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2480(&mut self) -> LO_SDM_DITHER_SEL_BLE_2480_W { - LO_SDM_DITHER_SEL_BLE_2480_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2468(&mut self) -> LO_SDM_DITHER_SEL_BLE_2468_W<2> { + LO_SDM_DITHER_SEL_BLE_2468_W::new(self) } - #[doc = "Bits 12:13"] + #[doc = "Bits 4:5"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2478(&mut self) -> LO_SDM_DITHER_SEL_BLE_2478_W { - LO_SDM_DITHER_SEL_BLE_2478_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2470(&mut self) -> LO_SDM_DITHER_SEL_BLE_2470_W<4> { + LO_SDM_DITHER_SEL_BLE_2470_W::new(self) } - #[doc = "Bits 10:11"] + #[doc = "Bits 6:7"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2476(&mut self) -> LO_SDM_DITHER_SEL_BLE_2476_W { - LO_SDM_DITHER_SEL_BLE_2476_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2472(&mut self) -> LO_SDM_DITHER_SEL_BLE_2472_W<6> { + LO_SDM_DITHER_SEL_BLE_2472_W::new(self) } #[doc = "Bits 8:9"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2474(&mut self) -> LO_SDM_DITHER_SEL_BLE_2474_W { - LO_SDM_DITHER_SEL_BLE_2474_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2474(&mut self) -> LO_SDM_DITHER_SEL_BLE_2474_W<8> { + LO_SDM_DITHER_SEL_BLE_2474_W::new(self) } - #[doc = "Bits 6:7"] + #[doc = "Bits 10:11"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2472(&mut self) -> LO_SDM_DITHER_SEL_BLE_2472_W { - LO_SDM_DITHER_SEL_BLE_2472_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2476(&mut self) -> LO_SDM_DITHER_SEL_BLE_2476_W<10> { + LO_SDM_DITHER_SEL_BLE_2476_W::new(self) } - #[doc = "Bits 4:5"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2470(&mut self) -> LO_SDM_DITHER_SEL_BLE_2470_W { - LO_SDM_DITHER_SEL_BLE_2470_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2478(&mut self) -> LO_SDM_DITHER_SEL_BLE_2478_W<12> { + LO_SDM_DITHER_SEL_BLE_2478_W::new(self) } - #[doc = "Bits 2:3"] + #[doc = "Bits 14:15"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2468(&mut self) -> LO_SDM_DITHER_SEL_BLE_2468_W { - LO_SDM_DITHER_SEL_BLE_2468_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_2480(&mut self) -> LO_SDM_DITHER_SEL_BLE_2480_W<14> { + LO_SDM_DITHER_SEL_BLE_2480_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn lo_sdm_dither_sel_ble_2466(&mut self) -> LO_SDM_DITHER_SEL_BLE_2466_W { - LO_SDM_DITHER_SEL_BLE_2466_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_ble_tx(&mut self) -> LO_SDM_DITHER_SEL_BLE_TX_W<16> { + LO_SDM_DITHER_SEL_BLE_TX_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -377,11 +200,10 @@ impl crate::Readable for LO_SDM_CTRL_HW4_SPEC { #[doc = "`write(|w| ..)` method takes [lo_sdm_ctrl_hw4::W](W) writer structure"] impl crate::Writable for LO_SDM_CTRL_HW4_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets lo_sdm_ctrl_hw4 to value 0"] impl crate::Resettable for LO_SDM_CTRL_HW4_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/lo_sdm_ctrl_hw5.rs b/src/rf/lo_sdm_ctrl_hw5.rs index f5f1f42..555e7e5 100644 --- a/src/rf/lo_sdm_ctrl_hw5.rs +++ b/src/rf/lo_sdm_ctrl_hw5.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,87 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `lo_sdm_bypass_mode` reader - "] -pub struct LO_SDM_BYPASS_MODE_R(crate::FieldReader); -impl LO_SDM_BYPASS_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_BYPASS_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_BYPASS_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_bypass_mode` writer - "] -pub struct LO_SDM_BYPASS_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_BYPASS_MODE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 12)) | ((value as u32 & 0x3f) << 12); - self.w - } -} #[doc = "Field `lo_center_freq_mhz` reader - "] -pub struct LO_CENTER_FREQ_MHZ_R(crate::FieldReader); -impl LO_CENTER_FREQ_MHZ_R { - pub(crate) fn new(bits: u16) -> Self { - LO_CENTER_FREQ_MHZ_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_CENTER_FREQ_MHZ_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type LO_CENTER_FREQ_MHZ_R = crate::FieldReader; #[doc = "Field `lo_center_freq_mhz` writer - "] -pub struct LO_CENTER_FREQ_MHZ_W<'a> { - w: &'a mut W, -} -impl<'a> LO_CENTER_FREQ_MHZ_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type LO_CENTER_FREQ_MHZ_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW5_SPEC, u16, u16, 12, O>; +#[doc = "Field `lo_sdm_bypass_mode` reader - "] +pub type LO_SDM_BYPASS_MODE_R = crate::FieldReader; +#[doc = "Field `lo_sdm_bypass_mode` writer - "] +pub type LO_SDM_BYPASS_MODE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW5_SPEC, u8, u8, 6, O>; +impl R { + #[doc = "Bits 0:11"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x0fff) | (value as u32 & 0x0fff); - self.w + pub fn lo_center_freq_mhz(&self) -> LO_CENTER_FREQ_MHZ_R { + LO_CENTER_FREQ_MHZ_R::new((self.bits & 0x0fff) as u16) } -} -impl R { #[doc = "Bits 12:17"] #[inline(always)] pub fn lo_sdm_bypass_mode(&self) -> LO_SDM_BYPASS_MODE_R { LO_SDM_BYPASS_MODE_R::new(((self.bits >> 12) & 0x3f) as u8) } - #[doc = "Bits 0:11"] - #[inline(always)] - pub fn lo_center_freq_mhz(&self) -> LO_CENTER_FREQ_MHZ_R { - LO_CENTER_FREQ_MHZ_R::new((self.bits & 0x0fff) as u16) - } } impl W { - #[doc = "Bits 12:17"] + #[doc = "Bits 0:11"] #[inline(always)] - pub fn lo_sdm_bypass_mode(&mut self) -> LO_SDM_BYPASS_MODE_W { - LO_SDM_BYPASS_MODE_W { w: self } + #[must_use] + pub fn lo_center_freq_mhz(&mut self) -> LO_CENTER_FREQ_MHZ_W<0> { + LO_CENTER_FREQ_MHZ_W::new(self) } - #[doc = "Bits 0:11"] + #[doc = "Bits 12:17"] #[inline(always)] - pub fn lo_center_freq_mhz(&mut self) -> LO_CENTER_FREQ_MHZ_W { - LO_CENTER_FREQ_MHZ_W { w: self } + #[must_use] + pub fn lo_sdm_bypass_mode(&mut self) -> LO_SDM_BYPASS_MODE_W<12> { + LO_SDM_BYPASS_MODE_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -125,11 +88,10 @@ impl crate::Readable for LO_SDM_CTRL_HW5_SPEC { #[doc = "`write(|w| ..)` method takes [lo_sdm_ctrl_hw5::W](W) writer structure"] impl crate::Writable for LO_SDM_CTRL_HW5_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets lo_sdm_ctrl_hw5 to value 0"] impl crate::Resettable for LO_SDM_CTRL_HW5_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/lo_sdm_ctrl_hw6.rs b/src/rf/lo_sdm_ctrl_hw6.rs index 07d8f70..4965f3e 100644 --- a/src/rf/lo_sdm_ctrl_hw6.rs +++ b/src/rf/lo_sdm_ctrl_hw6.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `lo_sdmin_center` reader - "] -pub struct LO_SDMIN_CENTER_R(crate::FieldReader); -impl LO_SDMIN_CENTER_R { - pub(crate) fn new(bits: u32) -> Self { - LO_SDMIN_CENTER_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDMIN_CENTER_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type LO_SDMIN_CENTER_R = crate::FieldReader; #[doc = "Field `lo_sdmin_center` writer - "] -pub struct LO_SDMIN_CENTER_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDMIN_CENTER_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0x1fff_ffff) | (value as u32 & 0x1fff_ffff); - self.w - } -} +pub type LO_SDMIN_CENTER_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW6_SPEC, u32, u32, 29, O>; impl R { #[doc = "Bits 0:28"] #[inline(always)] pub fn lo_sdmin_center(&self) -> LO_SDMIN_CENTER_R { - LO_SDMIN_CENTER_R::new((self.bits & 0x1fff_ffff) as u32) + LO_SDMIN_CENTER_R::new(self.bits & 0x1fff_ffff) } } impl W { #[doc = "Bits 0:28"] #[inline(always)] - pub fn lo_sdmin_center(&mut self) -> LO_SDMIN_CENTER_W { - LO_SDMIN_CENTER_W { w: self } + #[must_use] + pub fn lo_sdmin_center(&mut self) -> LO_SDMIN_CENTER_W<0> { + LO_SDMIN_CENTER_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for LO_SDM_CTRL_HW6_SPEC { #[doc = "`write(|w| ..)` method takes [lo_sdm_ctrl_hw6::W](W) writer structure"] impl crate::Writable for LO_SDM_CTRL_HW6_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets lo_sdm_ctrl_hw6 to value 0"] impl crate::Resettable for LO_SDM_CTRL_HW6_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/lo_sdm_ctrl_hw7.rs b/src/rf/lo_sdm_ctrl_hw7.rs index 33658f2..49cd8e0 100644 --- a/src/rf/lo_sdm_ctrl_hw7.rs +++ b/src/rf/lo_sdm_ctrl_hw7.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `lo_sdmin_1m` reader - "] -pub struct LO_SDMIN_1M_R(crate::FieldReader); -impl LO_SDMIN_1M_R { - pub(crate) fn new(bits: u32) -> Self { - LO_SDMIN_1M_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDMIN_1M_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type LO_SDMIN_1M_R = crate::FieldReader; #[doc = "Field `lo_sdmin_1m` writer - "] -pub struct LO_SDMIN_1M_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDMIN_1M_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0x000f_ffff) | (value as u32 & 0x000f_ffff); - self.w - } -} +pub type LO_SDMIN_1M_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW7_SPEC, u32, u32, 20, O>; impl R { #[doc = "Bits 0:19"] #[inline(always)] pub fn lo_sdmin_1m(&self) -> LO_SDMIN_1M_R { - LO_SDMIN_1M_R::new((self.bits & 0x000f_ffff) as u32) + LO_SDMIN_1M_R::new(self.bits & 0x000f_ffff) } } impl W { #[doc = "Bits 0:19"] #[inline(always)] - pub fn lo_sdmin_1m(&mut self) -> LO_SDMIN_1M_W { - LO_SDMIN_1M_W { w: self } + #[must_use] + pub fn lo_sdmin_1m(&mut self) -> LO_SDMIN_1M_W<0> { + LO_SDMIN_1M_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for LO_SDM_CTRL_HW7_SPEC { #[doc = "`write(|w| ..)` method takes [lo_sdm_ctrl_hw7::W](W) writer structure"] impl crate::Writable for LO_SDM_CTRL_HW7_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets lo_sdm_ctrl_hw7 to value 0"] impl crate::Resettable for LO_SDM_CTRL_HW7_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/lo_sdm_ctrl_hw8.rs b/src/rf/lo_sdm_ctrl_hw8.rs index 309b4cf..070a407 100644 --- a/src/rf/lo_sdm_ctrl_hw8.rs +++ b/src/rf/lo_sdm_ctrl_hw8.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `lo_sdmin_if` reader - "] -pub struct LO_SDMIN_IF_R(crate::FieldReader); -impl LO_SDMIN_IF_R { - pub(crate) fn new(bits: u32) -> Self { - LO_SDMIN_IF_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDMIN_IF_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type LO_SDMIN_IF_R = crate::FieldReader; #[doc = "Field `lo_sdmin_if` writer - "] -pub struct LO_SDMIN_IF_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDMIN_IF_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0x000f_ffff) | (value as u32 & 0x000f_ffff); - self.w - } -} +pub type LO_SDMIN_IF_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LO_SDM_CTRL_HW8_SPEC, u32, u32, 20, O>; impl R { #[doc = "Bits 0:19"] #[inline(always)] pub fn lo_sdmin_if(&self) -> LO_SDMIN_IF_R { - LO_SDMIN_IF_R::new((self.bits & 0x000f_ffff) as u32) + LO_SDMIN_IF_R::new(self.bits & 0x000f_ffff) } } impl W { #[doc = "Bits 0:19"] #[inline(always)] - pub fn lo_sdmin_if(&mut self) -> LO_SDMIN_IF_W { - LO_SDMIN_IF_W { w: self } + #[must_use] + pub fn lo_sdmin_if(&mut self) -> LO_SDMIN_IF_W<0> { + LO_SDMIN_IF_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for LO_SDM_CTRL_HW8_SPEC { #[doc = "`write(|w| ..)` method takes [lo_sdm_ctrl_hw8::W](W) writer structure"] impl crate::Writable for LO_SDM_CTRL_HW8_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets lo_sdm_ctrl_hw8 to value 0"] impl crate::Resettable for LO_SDM_CTRL_HW8_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/lodist.rs b/src/rf/lodist.rs index 971dfdb..7b80c34 100644 --- a/src/rf/lodist.rs +++ b/src/rf/lodist.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,363 +28,138 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `lo_lodist_rxbuf_stre` reader - "] -pub struct LO_LODIST_RXBUF_STRE_R(crate::FieldReader); -impl LO_LODIST_RXBUF_STRE_R { - pub(crate) fn new(bits: bool) -> Self { - LO_LODIST_RXBUF_STRE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_LODIST_RXBUF_STRE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_lodist_rxbuf_stre` writer - "] -pub struct LO_LODIST_RXBUF_STRE_W<'a> { - w: &'a mut W, -} -impl<'a> LO_LODIST_RXBUF_STRE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 28)) | ((value as u32 & 0x01) << 28); - self.w - } -} -#[doc = "Field `lo_lodist_txbuf_stre` reader - "] -pub struct LO_LODIST_TXBUF_STRE_R(crate::FieldReader); -impl LO_LODIST_TXBUF_STRE_R { - pub(crate) fn new(bits: bool) -> Self { - LO_LODIST_TXBUF_STRE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_LODIST_TXBUF_STRE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_lodist_txbuf_stre` writer - "] -pub struct LO_LODIST_TXBUF_STRE_W<'a> { - w: &'a mut W, -} -impl<'a> LO_LODIST_TXBUF_STRE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24); - self.w - } -} -#[doc = "Field `lo_osmx_cap` reader - "] -pub struct LO_OSMX_CAP_R(crate::FieldReader); -impl LO_OSMX_CAP_R { - pub(crate) fn new(bits: u8) -> Self { - LO_OSMX_CAP_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_OSMX_CAP_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_osmx_cap` writer - "] -pub struct LO_OSMX_CAP_W<'a> { - w: &'a mut W, -} -impl<'a> LO_OSMX_CAP_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 20)) | ((value as u32 & 0x0f) << 20); - self.w - } -} -#[doc = "Field `lo_osmx_capbank_bias` reader - "] -pub struct LO_OSMX_CAPBANK_BIAS_R(crate::FieldReader); -impl LO_OSMX_CAPBANK_BIAS_R { - pub(crate) fn new(bits: u8) -> Self { - LO_OSMX_CAPBANK_BIAS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_OSMX_CAPBANK_BIAS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_osmx_capbank_bias` writer - "] -pub struct LO_OSMX_CAPBANK_BIAS_W<'a> { - w: &'a mut W, -} -impl<'a> LO_OSMX_CAPBANK_BIAS_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 16)) | ((value as u32 & 0x03) << 16); - self.w - } -} -#[doc = "Field `lo_osmx_vbuf_stre` reader - "] -pub struct LO_OSMX_VBUF_STRE_R(crate::FieldReader); -impl LO_OSMX_VBUF_STRE_R { - pub(crate) fn new(bits: bool) -> Self { - LO_OSMX_VBUF_STRE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_OSMX_VBUF_STRE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_osmx_vbuf_stre` writer - "] -pub struct LO_OSMX_VBUF_STRE_W<'a> { - w: &'a mut W, -} -impl<'a> LO_OSMX_VBUF_STRE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} -#[doc = "Field `lo_osmx_fix_cap` reader - "] -pub struct LO_OSMX_FIX_CAP_R(crate::FieldReader); -impl LO_OSMX_FIX_CAP_R { - pub(crate) fn new(bits: bool) -> Self { - LO_OSMX_FIX_CAP_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_OSMX_FIX_CAP_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_osmx_fix_cap` writer - "] -pub struct LO_OSMX_FIX_CAP_W<'a> { - w: &'a mut W, -} -impl<'a> LO_OSMX_FIX_CAP_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `lo_osmx_en_xgm` reader - "] -pub struct LO_OSMX_EN_XGM_R(crate::FieldReader); -impl LO_OSMX_EN_XGM_R { - pub(crate) fn new(bits: bool) -> Self { - LO_OSMX_EN_XGM_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_OSMX_EN_XGM_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_osmx_en_xgm` writer - "] -pub struct LO_OSMX_EN_XGM_W<'a> { - w: &'a mut W, -} -impl<'a> LO_OSMX_EN_XGM_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} #[doc = "Field `lo_osmx_xgm_boost` reader - "] -pub struct LO_OSMX_XGM_BOOST_R(crate::FieldReader); -impl LO_OSMX_XGM_BOOST_R { - pub(crate) fn new(bits: bool) -> Self { - LO_OSMX_XGM_BOOST_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_OSMX_XGM_BOOST_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type LO_OSMX_XGM_BOOST_R = crate::BitReader; #[doc = "Field `lo_osmx_xgm_boost` writer - "] -pub struct LO_OSMX_XGM_BOOST_W<'a> { - w: &'a mut W, -} -impl<'a> LO_OSMX_XGM_BOOST_W<'a> { - #[doc = r"Sets the field bit"] +pub type LO_OSMX_XGM_BOOST_W<'a, const O: u8> = crate::BitWriter<'a, u32, LODIST_SPEC, bool, O>; +#[doc = "Field `lo_osmx_en_xgm` reader - "] +pub type LO_OSMX_EN_XGM_R = crate::BitReader; +#[doc = "Field `lo_osmx_en_xgm` writer - "] +pub type LO_OSMX_EN_XGM_W<'a, const O: u8> = crate::BitWriter<'a, u32, LODIST_SPEC, bool, O>; +#[doc = "Field `lo_osmx_fix_cap` reader - "] +pub type LO_OSMX_FIX_CAP_R = crate::BitReader; +#[doc = "Field `lo_osmx_fix_cap` writer - "] +pub type LO_OSMX_FIX_CAP_W<'a, const O: u8> = crate::BitWriter<'a, u32, LODIST_SPEC, bool, O>; +#[doc = "Field `lo_osmx_vbuf_stre` reader - "] +pub type LO_OSMX_VBUF_STRE_R = crate::BitReader; +#[doc = "Field `lo_osmx_vbuf_stre` writer - "] +pub type LO_OSMX_VBUF_STRE_W<'a, const O: u8> = crate::BitWriter<'a, u32, LODIST_SPEC, bool, O>; +#[doc = "Field `lo_osmx_capbank_bias` reader - "] +pub type LO_OSMX_CAPBANK_BIAS_R = crate::FieldReader; +#[doc = "Field `lo_osmx_capbank_bias` writer - "] +pub type LO_OSMX_CAPBANK_BIAS_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, LODIST_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_osmx_cap` reader - "] +pub type LO_OSMX_CAP_R = crate::FieldReader; +#[doc = "Field `lo_osmx_cap` writer - "] +pub type LO_OSMX_CAP_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LODIST_SPEC, u8, u8, 4, O>; +#[doc = "Field `lo_lodist_txbuf_stre` reader - "] +pub type LO_LODIST_TXBUF_STRE_R = crate::BitReader; +#[doc = "Field `lo_lodist_txbuf_stre` writer - "] +pub type LO_LODIST_TXBUF_STRE_W<'a, const O: u8> = crate::BitWriter<'a, u32, LODIST_SPEC, bool, O>; +#[doc = "Field `lo_lodist_rxbuf_stre` reader - "] +pub type LO_LODIST_RXBUF_STRE_R = crate::BitReader; +#[doc = "Field `lo_lodist_rxbuf_stre` writer - "] +pub type LO_LODIST_RXBUF_STRE_W<'a, const O: u8> = crate::BitWriter<'a, u32, LODIST_SPEC, bool, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn lo_osmx_xgm_boost(&self) -> LO_OSMX_XGM_BOOST_R { + LO_OSMX_XGM_BOOST_R::new((self.bits & 1) != 0) } - #[doc = r"Clears the field bit"] + #[doc = "Bit 4"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn lo_osmx_en_xgm(&self) -> LO_OSMX_EN_XGM_R { + LO_OSMX_EN_XGM_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = r"Writes raw bits to the field"] + #[doc = "Bit 8"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn lo_osmx_fix_cap(&self) -> LO_OSMX_FIX_CAP_R { + LO_OSMX_FIX_CAP_R::new(((self.bits >> 8) & 1) != 0) } -} -impl R { - #[doc = "Bit 28"] + #[doc = "Bit 12"] #[inline(always)] - pub fn lo_lodist_rxbuf_stre(&self) -> LO_LODIST_RXBUF_STRE_R { - LO_LODIST_RXBUF_STRE_R::new(((self.bits >> 28) & 0x01) != 0) + pub fn lo_osmx_vbuf_stre(&self) -> LO_OSMX_VBUF_STRE_R { + LO_OSMX_VBUF_STRE_R::new(((self.bits >> 12) & 1) != 0) } - #[doc = "Bit 24"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn lo_lodist_txbuf_stre(&self) -> LO_LODIST_TXBUF_STRE_R { - LO_LODIST_TXBUF_STRE_R::new(((self.bits >> 24) & 0x01) != 0) + pub fn lo_osmx_capbank_bias(&self) -> LO_OSMX_CAPBANK_BIAS_R { + LO_OSMX_CAPBANK_BIAS_R::new(((self.bits >> 16) & 3) as u8) } #[doc = "Bits 20:23"] #[inline(always)] pub fn lo_osmx_cap(&self) -> LO_OSMX_CAP_R { LO_OSMX_CAP_R::new(((self.bits >> 20) & 0x0f) as u8) } - #[doc = "Bits 16:17"] - #[inline(always)] - pub fn lo_osmx_capbank_bias(&self) -> LO_OSMX_CAPBANK_BIAS_R { - LO_OSMX_CAPBANK_BIAS_R::new(((self.bits >> 16) & 0x03) as u8) - } - #[doc = "Bit 12"] - #[inline(always)] - pub fn lo_osmx_vbuf_stre(&self) -> LO_OSMX_VBUF_STRE_R { - LO_OSMX_VBUF_STRE_R::new(((self.bits >> 12) & 0x01) != 0) - } - #[doc = "Bit 8"] - #[inline(always)] - pub fn lo_osmx_fix_cap(&self) -> LO_OSMX_FIX_CAP_R { - LO_OSMX_FIX_CAP_R::new(((self.bits >> 8) & 0x01) != 0) - } - #[doc = "Bit 4"] + #[doc = "Bit 24"] #[inline(always)] - pub fn lo_osmx_en_xgm(&self) -> LO_OSMX_EN_XGM_R { - LO_OSMX_EN_XGM_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn lo_lodist_txbuf_stre(&self) -> LO_LODIST_TXBUF_STRE_R { + LO_LODIST_TXBUF_STRE_R::new(((self.bits >> 24) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 28"] #[inline(always)] - pub fn lo_osmx_xgm_boost(&self) -> LO_OSMX_XGM_BOOST_R { - LO_OSMX_XGM_BOOST_R::new((self.bits & 0x01) != 0) + pub fn lo_lodist_rxbuf_stre(&self) -> LO_LODIST_RXBUF_STRE_R { + LO_LODIST_RXBUF_STRE_R::new(((self.bits >> 28) & 1) != 0) } } impl W { - #[doc = "Bit 28"] + #[doc = "Bit 0"] #[inline(always)] - pub fn lo_lodist_rxbuf_stre(&mut self) -> LO_LODIST_RXBUF_STRE_W { - LO_LODIST_RXBUF_STRE_W { w: self } + #[must_use] + pub fn lo_osmx_xgm_boost(&mut self) -> LO_OSMX_XGM_BOOST_W<0> { + LO_OSMX_XGM_BOOST_W::new(self) } - #[doc = "Bit 24"] + #[doc = "Bit 4"] #[inline(always)] - pub fn lo_lodist_txbuf_stre(&mut self) -> LO_LODIST_TXBUF_STRE_W { - LO_LODIST_TXBUF_STRE_W { w: self } + #[must_use] + pub fn lo_osmx_en_xgm(&mut self) -> LO_OSMX_EN_XGM_W<4> { + LO_OSMX_EN_XGM_W::new(self) } - #[doc = "Bits 20:23"] + #[doc = "Bit 8"] #[inline(always)] - pub fn lo_osmx_cap(&mut self) -> LO_OSMX_CAP_W { - LO_OSMX_CAP_W { w: self } + #[must_use] + pub fn lo_osmx_fix_cap(&mut self) -> LO_OSMX_FIX_CAP_W<8> { + LO_OSMX_FIX_CAP_W::new(self) } - #[doc = "Bits 16:17"] + #[doc = "Bit 12"] #[inline(always)] - pub fn lo_osmx_capbank_bias(&mut self) -> LO_OSMX_CAPBANK_BIAS_W { - LO_OSMX_CAPBANK_BIAS_W { w: self } + #[must_use] + pub fn lo_osmx_vbuf_stre(&mut self) -> LO_OSMX_VBUF_STRE_W<12> { + LO_OSMX_VBUF_STRE_W::new(self) } - #[doc = "Bit 12"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn lo_osmx_vbuf_stre(&mut self) -> LO_OSMX_VBUF_STRE_W { - LO_OSMX_VBUF_STRE_W { w: self } + #[must_use] + pub fn lo_osmx_capbank_bias(&mut self) -> LO_OSMX_CAPBANK_BIAS_W<16> { + LO_OSMX_CAPBANK_BIAS_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bits 20:23"] #[inline(always)] - pub fn lo_osmx_fix_cap(&mut self) -> LO_OSMX_FIX_CAP_W { - LO_OSMX_FIX_CAP_W { w: self } + #[must_use] + pub fn lo_osmx_cap(&mut self) -> LO_OSMX_CAP_W<20> { + LO_OSMX_CAP_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 24"] #[inline(always)] - pub fn lo_osmx_en_xgm(&mut self) -> LO_OSMX_EN_XGM_W { - LO_OSMX_EN_XGM_W { w: self } + #[must_use] + pub fn lo_lodist_txbuf_stre(&mut self) -> LO_LODIST_TXBUF_STRE_W<24> { + LO_LODIST_TXBUF_STRE_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 28"] #[inline(always)] - pub fn lo_osmx_xgm_boost(&mut self) -> LO_OSMX_XGM_BOOST_W { - LO_OSMX_XGM_BOOST_W { w: self } + #[must_use] + pub fn lo_lodist_rxbuf_stre(&mut self) -> LO_LODIST_RXBUF_STRE_W<28> { + LO_LODIST_RXBUF_STRE_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -401,11 +177,10 @@ impl crate::Readable for LODIST_SPEC { #[doc = "`write(|w| ..)` method takes [lodist::W](W) writer structure"] impl crate::Writable for LODIST_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets lodist to value 0"] impl crate::Resettable for LODIST_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/pa1.rs b/src/rf/pa1.rs index 4234b12..761121c 100644 --- a/src/rf/pa1.rs +++ b/src/rf/pa1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,497 +28,197 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `pa_att_gc` reader - "] -pub struct PA_ATT_GC_R(crate::FieldReader); -impl PA_ATT_GC_R { - pub(crate) fn new(bits: u8) -> Self { - PA_ATT_GC_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PA_ATT_GC_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pa_att_gc` writer - "] -pub struct PA_ATT_GC_W<'a> { - w: &'a mut W, -} -impl<'a> PA_ATT_GC_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 28)) | ((value as u32 & 0x0f) << 28); - self.w - } -} -#[doc = "Field `pa_pwrmx_bm` reader - "] -pub struct PA_PWRMX_BM_R(crate::FieldReader); -impl PA_PWRMX_BM_R { - pub(crate) fn new(bits: u8) -> Self { - PA_PWRMX_BM_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PA_PWRMX_BM_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pa_pwrmx_bm` writer - "] -pub struct PA_PWRMX_BM_W<'a> { - w: &'a mut W, -} -impl<'a> PA_PWRMX_BM_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 24)) | ((value as u32 & 0x07) << 24); - self.w - } -} -#[doc = "Field `pa_pwrmx_dac_pn_switch` reader - "] -pub struct PA_PWRMX_DAC_PN_SWITCH_R(crate::FieldReader); -impl PA_PWRMX_DAC_PN_SWITCH_R { - pub(crate) fn new(bits: bool) -> Self { - PA_PWRMX_DAC_PN_SWITCH_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PA_PWRMX_DAC_PN_SWITCH_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pa_pwrmx_dac_pn_switch` writer - "] -pub struct PA_PWRMX_DAC_PN_SWITCH_W<'a> { - w: &'a mut W, -} -impl<'a> PA_PWRMX_DAC_PN_SWITCH_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 22)) | ((value as u32 & 0x01) << 22); - self.w - } -} -#[doc = "Field `pa_pwrmx_osdac` reader - "] -pub struct PA_PWRMX_OSDAC_R(crate::FieldReader); -impl PA_PWRMX_OSDAC_R { - pub(crate) fn new(bits: u8) -> Self { - PA_PWRMX_OSDAC_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PA_PWRMX_OSDAC_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pa_pwrmx_osdac` writer - "] -pub struct PA_PWRMX_OSDAC_W<'a> { - w: &'a mut W, -} -impl<'a> PA_PWRMX_OSDAC_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 18)) | ((value as u32 & 0x0f) << 18); - self.w - } -} -#[doc = "Field `pa_lz_bias_en` reader - "] -pub struct PA_LZ_BIAS_EN_R(crate::FieldReader); -impl PA_LZ_BIAS_EN_R { - pub(crate) fn new(bits: bool) -> Self { - PA_LZ_BIAS_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PA_LZ_BIAS_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pa_lz_bias_en` writer - "] -pub struct PA_LZ_BIAS_EN_W<'a> { - w: &'a mut W, -} -impl<'a> PA_LZ_BIAS_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w - } -} -#[doc = "Field `pa_ib_fix` reader - "] -pub struct PA_IB_FIX_R(crate::FieldReader); -impl PA_IB_FIX_R { - pub(crate) fn new(bits: bool) -> Self { - PA_IB_FIX_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PA_IB_FIX_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pa_ib_fix` writer - "] -pub struct PA_IB_FIX_W<'a> { - w: &'a mut W, -} -impl<'a> PA_IB_FIX_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `pa_half_on` reader - "] -pub struct PA_HALF_ON_R(crate::FieldReader); -impl PA_HALF_ON_R { - pub(crate) fn new(bits: bool) -> Self { - PA_HALF_ON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PA_HALF_ON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pa_half_on` writer - "] -pub struct PA_HALF_ON_W<'a> { - w: &'a mut W, -} -impl<'a> PA_HALF_ON_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15); - self.w - } -} -#[doc = "Field `pa_vbcas` reader - "] -pub struct PA_VBCAS_R(crate::FieldReader); -impl PA_VBCAS_R { - pub(crate) fn new(bits: u8) -> Self { - PA_VBCAS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PA_VBCAS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pa_vbcas` writer - "] -pub struct PA_VBCAS_W<'a> { - w: &'a mut W, -} -impl<'a> PA_VBCAS_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 12)) | ((value as u32 & 0x07) << 12); - self.w - } -} -#[doc = "Field `pa_vbcore` reader - "] -pub struct PA_VBCORE_R(crate::FieldReader); -impl PA_VBCORE_R { - pub(crate) fn new(bits: u8) -> Self { - PA_VBCORE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PA_VBCORE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pa_vbcore` writer - "] -pub struct PA_VBCORE_W<'a> { - w: &'a mut W, -} -impl<'a> PA_VBCORE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 8)) | ((value as u32 & 0x0f) << 8); - self.w - } -} -#[doc = "Field `pa_iet` reader - "] -pub struct PA_IET_R(crate::FieldReader); -impl PA_IET_R { - pub(crate) fn new(bits: u8) -> Self { - PA_IET_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PA_IET_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pa_iet` writer - "] -pub struct PA_IET_W<'a> { - w: &'a mut W, -} -impl<'a> PA_IET_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 4)) | ((value as u32 & 0x0f) << 4); - self.w - } -} +#[doc = "Field `pa_iaq` reader - "] +pub type PA_IAQ_R = crate::FieldReader; +#[doc = "Field `pa_iaq` writer - "] +pub type PA_IAQ_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PA1_SPEC, u8, u8, 3, O>; #[doc = "Field `pa_etb_en` reader - "] -pub struct PA_ETB_EN_R(crate::FieldReader); -impl PA_ETB_EN_R { - pub(crate) fn new(bits: bool) -> Self { - PA_ETB_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PA_ETB_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PA_ETB_EN_R = crate::BitReader; #[doc = "Field `pa_etb_en` writer - "] -pub struct PA_ETB_EN_W<'a> { - w: &'a mut W, -} -impl<'a> PA_ETB_EN_W<'a> { - #[doc = r"Sets the field bit"] +pub type PA_ETB_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PA1_SPEC, bool, O>; +#[doc = "Field `pa_iet` reader - "] +pub type PA_IET_R = crate::FieldReader; +#[doc = "Field `pa_iet` writer - "] +pub type PA_IET_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PA1_SPEC, u8, u8, 4, O>; +#[doc = "Field `pa_vbcore` reader - "] +pub type PA_VBCORE_R = crate::FieldReader; +#[doc = "Field `pa_vbcore` writer - "] +pub type PA_VBCORE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PA1_SPEC, u8, u8, 4, O>; +#[doc = "Field `pa_vbcas` reader - "] +pub type PA_VBCAS_R = crate::FieldReader; +#[doc = "Field `pa_vbcas` writer - "] +pub type PA_VBCAS_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PA1_SPEC, u8, u8, 3, O>; +#[doc = "Field `pa_half_on` reader - "] +pub type PA_HALF_ON_R = crate::BitReader; +#[doc = "Field `pa_half_on` writer - "] +pub type PA_HALF_ON_W<'a, const O: u8> = crate::BitWriter<'a, u32, PA1_SPEC, bool, O>; +#[doc = "Field `pa_ib_fix` reader - "] +pub type PA_IB_FIX_R = crate::BitReader; +#[doc = "Field `pa_ib_fix` writer - "] +pub type PA_IB_FIX_W<'a, const O: u8> = crate::BitWriter<'a, u32, PA1_SPEC, bool, O>; +#[doc = "Field `pa_lz_bias_en` reader - "] +pub type PA_LZ_BIAS_EN_R = crate::BitReader; +#[doc = "Field `pa_lz_bias_en` writer - "] +pub type PA_LZ_BIAS_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PA1_SPEC, bool, O>; +#[doc = "Field `pa_pwrmx_osdac` reader - "] +pub type PA_PWRMX_OSDAC_R = crate::FieldReader; +#[doc = "Field `pa_pwrmx_osdac` writer - "] +pub type PA_PWRMX_OSDAC_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PA1_SPEC, u8, u8, 4, O>; +#[doc = "Field `pa_pwrmx_dac_pn_switch` reader - "] +pub type PA_PWRMX_DAC_PN_SWITCH_R = crate::BitReader; +#[doc = "Field `pa_pwrmx_dac_pn_switch` writer - "] +pub type PA_PWRMX_DAC_PN_SWITCH_W<'a, const O: u8> = crate::BitWriter<'a, u32, PA1_SPEC, bool, O>; +#[doc = "Field `pa_pwrmx_bm` reader - "] +pub type PA_PWRMX_BM_R = crate::FieldReader; +#[doc = "Field `pa_pwrmx_bm` writer - "] +pub type PA_PWRMX_BM_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PA1_SPEC, u8, u8, 3, O>; +#[doc = "Field `pa_att_gc` reader - "] +pub type PA_ATT_GC_R = crate::FieldReader; +#[doc = "Field `pa_att_gc` writer - "] +pub type PA_ATT_GC_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PA1_SPEC, u8, u8, 4, O>; +impl R { + #[doc = "Bits 0:2"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn pa_iaq(&self) -> PA_IAQ_R { + PA_IAQ_R::new((self.bits & 7) as u8) } - #[doc = r"Clears the field bit"] + #[doc = "Bit 3"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn pa_etb_en(&self) -> PA_ETB_EN_R { + PA_ETB_EN_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = r"Writes raw bits to the field"] + #[doc = "Bits 4:7"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `pa_iaq` reader - "] -pub struct PA_IAQ_R(crate::FieldReader); -impl PA_IAQ_R { - pub(crate) fn new(bits: u8) -> Self { - PA_IAQ_R(crate::FieldReader::new(bits)) + pub fn pa_iet(&self) -> PA_IET_R { + PA_IET_R::new(((self.bits >> 4) & 0x0f) as u8) } -} -impl core::ops::Deref for PA_IAQ_R { - type Target = crate::FieldReader; + #[doc = "Bits 8:11"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn pa_vbcore(&self) -> PA_VBCORE_R { + PA_VBCORE_R::new(((self.bits >> 8) & 0x0f) as u8) } -} -#[doc = "Field `pa_iaq` writer - "] -pub struct PA_IAQ_W<'a> { - w: &'a mut W, -} -impl<'a> PA_IAQ_W<'a> { - #[doc = r"Writes raw bits to the field"] + #[doc = "Bits 12:14"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x07) | (value as u32 & 0x07); - self.w + pub fn pa_vbcas(&self) -> PA_VBCAS_R { + PA_VBCAS_R::new(((self.bits >> 12) & 7) as u8) } -} -impl R { - #[doc = "Bits 28:31"] + #[doc = "Bit 15"] #[inline(always)] - pub fn pa_att_gc(&self) -> PA_ATT_GC_R { - PA_ATT_GC_R::new(((self.bits >> 28) & 0x0f) as u8) + pub fn pa_half_on(&self) -> PA_HALF_ON_R { + PA_HALF_ON_R::new(((self.bits >> 15) & 1) != 0) } - #[doc = "Bits 24:26"] + #[doc = "Bit 16"] #[inline(always)] - pub fn pa_pwrmx_bm(&self) -> PA_PWRMX_BM_R { - PA_PWRMX_BM_R::new(((self.bits >> 24) & 0x07) as u8) + pub fn pa_ib_fix(&self) -> PA_IB_FIX_R { + PA_IB_FIX_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 22"] + #[doc = "Bit 17"] #[inline(always)] - pub fn pa_pwrmx_dac_pn_switch(&self) -> PA_PWRMX_DAC_PN_SWITCH_R { - PA_PWRMX_DAC_PN_SWITCH_R::new(((self.bits >> 22) & 0x01) != 0) + pub fn pa_lz_bias_en(&self) -> PA_LZ_BIAS_EN_R { + PA_LZ_BIAS_EN_R::new(((self.bits >> 17) & 1) != 0) } #[doc = "Bits 18:21"] #[inline(always)] pub fn pa_pwrmx_osdac(&self) -> PA_PWRMX_OSDAC_R { PA_PWRMX_OSDAC_R::new(((self.bits >> 18) & 0x0f) as u8) } - #[doc = "Bit 17"] - #[inline(always)] - pub fn pa_lz_bias_en(&self) -> PA_LZ_BIAS_EN_R { - PA_LZ_BIAS_EN_R::new(((self.bits >> 17) & 0x01) != 0) - } - #[doc = "Bit 16"] - #[inline(always)] - pub fn pa_ib_fix(&self) -> PA_IB_FIX_R { - PA_IB_FIX_R::new(((self.bits >> 16) & 0x01) != 0) - } - #[doc = "Bit 15"] - #[inline(always)] - pub fn pa_half_on(&self) -> PA_HALF_ON_R { - PA_HALF_ON_R::new(((self.bits >> 15) & 0x01) != 0) - } - #[doc = "Bits 12:14"] - #[inline(always)] - pub fn pa_vbcas(&self) -> PA_VBCAS_R { - PA_VBCAS_R::new(((self.bits >> 12) & 0x07) as u8) - } - #[doc = "Bits 8:11"] - #[inline(always)] - pub fn pa_vbcore(&self) -> PA_VBCORE_R { - PA_VBCORE_R::new(((self.bits >> 8) & 0x0f) as u8) - } - #[doc = "Bits 4:7"] + #[doc = "Bit 22"] #[inline(always)] - pub fn pa_iet(&self) -> PA_IET_R { - PA_IET_R::new(((self.bits >> 4) & 0x0f) as u8) + pub fn pa_pwrmx_dac_pn_switch(&self) -> PA_PWRMX_DAC_PN_SWITCH_R { + PA_PWRMX_DAC_PN_SWITCH_R::new(((self.bits >> 22) & 1) != 0) } - #[doc = "Bit 3"] + #[doc = "Bits 24:26"] #[inline(always)] - pub fn pa_etb_en(&self) -> PA_ETB_EN_R { - PA_ETB_EN_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn pa_pwrmx_bm(&self) -> PA_PWRMX_BM_R { + PA_PWRMX_BM_R::new(((self.bits >> 24) & 7) as u8) } - #[doc = "Bits 0:2"] + #[doc = "Bits 28:31"] #[inline(always)] - pub fn pa_iaq(&self) -> PA_IAQ_R { - PA_IAQ_R::new((self.bits & 0x07) as u8) + pub fn pa_att_gc(&self) -> PA_ATT_GC_R { + PA_ATT_GC_R::new(((self.bits >> 28) & 0x0f) as u8) } } impl W { - #[doc = "Bits 28:31"] + #[doc = "Bits 0:2"] #[inline(always)] - pub fn pa_att_gc(&mut self) -> PA_ATT_GC_W { - PA_ATT_GC_W { w: self } + #[must_use] + pub fn pa_iaq(&mut self) -> PA_IAQ_W<0> { + PA_IAQ_W::new(self) } - #[doc = "Bits 24:26"] + #[doc = "Bit 3"] #[inline(always)] - pub fn pa_pwrmx_bm(&mut self) -> PA_PWRMX_BM_W { - PA_PWRMX_BM_W { w: self } + #[must_use] + pub fn pa_etb_en(&mut self) -> PA_ETB_EN_W<3> { + PA_ETB_EN_W::new(self) } - #[doc = "Bit 22"] + #[doc = "Bits 4:7"] #[inline(always)] - pub fn pa_pwrmx_dac_pn_switch(&mut self) -> PA_PWRMX_DAC_PN_SWITCH_W { - PA_PWRMX_DAC_PN_SWITCH_W { w: self } + #[must_use] + pub fn pa_iet(&mut self) -> PA_IET_W<4> { + PA_IET_W::new(self) } - #[doc = "Bits 18:21"] + #[doc = "Bits 8:11"] #[inline(always)] - pub fn pa_pwrmx_osdac(&mut self) -> PA_PWRMX_OSDAC_W { - PA_PWRMX_OSDAC_W { w: self } + #[must_use] + pub fn pa_vbcore(&mut self) -> PA_VBCORE_W<8> { + PA_VBCORE_W::new(self) } - #[doc = "Bit 17"] + #[doc = "Bits 12:14"] #[inline(always)] - pub fn pa_lz_bias_en(&mut self) -> PA_LZ_BIAS_EN_W { - PA_LZ_BIAS_EN_W { w: self } + #[must_use] + pub fn pa_vbcas(&mut self) -> PA_VBCAS_W<12> { + PA_VBCAS_W::new(self) } - #[doc = "Bit 16"] + #[doc = "Bit 15"] #[inline(always)] - pub fn pa_ib_fix(&mut self) -> PA_IB_FIX_W { - PA_IB_FIX_W { w: self } + #[must_use] + pub fn pa_half_on(&mut self) -> PA_HALF_ON_W<15> { + PA_HALF_ON_W::new(self) } - #[doc = "Bit 15"] + #[doc = "Bit 16"] #[inline(always)] - pub fn pa_half_on(&mut self) -> PA_HALF_ON_W { - PA_HALF_ON_W { w: self } + #[must_use] + pub fn pa_ib_fix(&mut self) -> PA_IB_FIX_W<16> { + PA_IB_FIX_W::new(self) } - #[doc = "Bits 12:14"] + #[doc = "Bit 17"] #[inline(always)] - pub fn pa_vbcas(&mut self) -> PA_VBCAS_W { - PA_VBCAS_W { w: self } + #[must_use] + pub fn pa_lz_bias_en(&mut self) -> PA_LZ_BIAS_EN_W<17> { + PA_LZ_BIAS_EN_W::new(self) } - #[doc = "Bits 8:11"] + #[doc = "Bits 18:21"] #[inline(always)] - pub fn pa_vbcore(&mut self) -> PA_VBCORE_W { - PA_VBCORE_W { w: self } + #[must_use] + pub fn pa_pwrmx_osdac(&mut self) -> PA_PWRMX_OSDAC_W<18> { + PA_PWRMX_OSDAC_W::new(self) } - #[doc = "Bits 4:7"] + #[doc = "Bit 22"] #[inline(always)] - pub fn pa_iet(&mut self) -> PA_IET_W { - PA_IET_W { w: self } + #[must_use] + pub fn pa_pwrmx_dac_pn_switch(&mut self) -> PA_PWRMX_DAC_PN_SWITCH_W<22> { + PA_PWRMX_DAC_PN_SWITCH_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bits 24:26"] #[inline(always)] - pub fn pa_etb_en(&mut self) -> PA_ETB_EN_W { - PA_ETB_EN_W { w: self } + #[must_use] + pub fn pa_pwrmx_bm(&mut self) -> PA_PWRMX_BM_W<24> { + PA_PWRMX_BM_W::new(self) } - #[doc = "Bits 0:2"] + #[doc = "Bits 28:31"] #[inline(always)] - pub fn pa_iaq(&mut self) -> PA_IAQ_W { - PA_IAQ_W { w: self } + #[must_use] + pub fn pa_att_gc(&mut self) -> PA_ATT_GC_W<28> { + PA_ATT_GC_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -535,11 +236,10 @@ impl crate::Readable for PA1_SPEC { #[doc = "`write(|w| ..)` method takes [pa1::W](W) writer structure"] impl crate::Writable for PA1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pa1 to value 0"] impl crate::Resettable for PA1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/pa2.rs b/src/rf/pa2.rs index a6f88c9..979d33e 100644 --- a/src/rf/pa2.rs +++ b/src/rf/pa2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,261 +28,107 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `pa_ib_fix_hw` reader - "] -pub struct PA_IB_FIX_HW_R(crate::FieldReader); -impl PA_IB_FIX_HW_R { - pub(crate) fn new(bits: bool) -> Self { - PA_IB_FIX_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PA_IB_FIX_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pa_ib_fix_hw` writer - "] -pub struct PA_IB_FIX_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PA_IB_FIX_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w - } -} -#[doc = "Field `pa_half_on_hw` reader - "] -pub struct PA_HALF_ON_HW_R(crate::FieldReader); -impl PA_HALF_ON_HW_R { - pub(crate) fn new(bits: bool) -> Self { - PA_HALF_ON_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PA_HALF_ON_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pa_half_on_hw` writer - "] -pub struct PA_HALF_ON_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PA_HALF_ON_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `pa_vbcas_hw` reader - "] -pub struct PA_VBCAS_HW_R(crate::FieldReader); -impl PA_VBCAS_HW_R { - pub(crate) fn new(bits: u8) -> Self { - PA_VBCAS_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PA_VBCAS_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pa_vbcas_hw` writer - "] -pub struct PA_VBCAS_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PA_VBCAS_HW_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 12)) | ((value as u32 & 0x07) << 12); - self.w - } -} -#[doc = "Field `pa_vbcore_hw` reader - "] -pub struct PA_VBCORE_HW_R(crate::FieldReader); -impl PA_VBCORE_HW_R { - pub(crate) fn new(bits: u8) -> Self { - PA_VBCORE_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PA_VBCORE_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pa_vbcore_hw` writer - "] -pub struct PA_VBCORE_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PA_VBCORE_HW_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 8)) | ((value as u32 & 0x0f) << 8); - self.w - } -} -#[doc = "Field `pa_iet_hw` reader - "] -pub struct PA_IET_HW_R(crate::FieldReader); -impl PA_IET_HW_R { - pub(crate) fn new(bits: u8) -> Self { - PA_IET_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PA_IET_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pa_iet_hw` writer - "] -pub struct PA_IET_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PA_IET_HW_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 4)) | ((value as u32 & 0x0f) << 4); - self.w - } -} #[doc = "Field `pa_etb_en_hw` reader - "] -pub struct PA_ETB_EN_HW_R(crate::FieldReader); -impl PA_ETB_EN_HW_R { - pub(crate) fn new(bits: bool) -> Self { - PA_ETB_EN_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PA_ETB_EN_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PA_ETB_EN_HW_R = crate::BitReader; #[doc = "Field `pa_etb_en_hw` writer - "] -pub struct PA_ETB_EN_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PA_ETB_EN_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} +pub type PA_ETB_EN_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PA2_SPEC, bool, O>; +#[doc = "Field `pa_iet_hw` reader - "] +pub type PA_IET_HW_R = crate::FieldReader; +#[doc = "Field `pa_iet_hw` writer - "] +pub type PA_IET_HW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PA2_SPEC, u8, u8, 4, O>; +#[doc = "Field `pa_vbcore_hw` reader - "] +pub type PA_VBCORE_HW_R = crate::FieldReader; +#[doc = "Field `pa_vbcore_hw` writer - "] +pub type PA_VBCORE_HW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PA2_SPEC, u8, u8, 4, O>; +#[doc = "Field `pa_vbcas_hw` reader - "] +pub type PA_VBCAS_HW_R = crate::FieldReader; +#[doc = "Field `pa_vbcas_hw` writer - "] +pub type PA_VBCAS_HW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PA2_SPEC, u8, u8, 3, O>; +#[doc = "Field `pa_half_on_hw` reader - "] +pub type PA_HALF_ON_HW_R = crate::BitReader; +#[doc = "Field `pa_half_on_hw` writer - "] +pub type PA_HALF_ON_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PA2_SPEC, bool, O>; +#[doc = "Field `pa_ib_fix_hw` reader - "] +pub type PA_IB_FIX_HW_R = crate::BitReader; +#[doc = "Field `pa_ib_fix_hw` writer - "] +pub type PA_IB_FIX_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PA2_SPEC, bool, O>; impl R { - #[doc = "Bit 17"] - #[inline(always)] - pub fn pa_ib_fix_hw(&self) -> PA_IB_FIX_HW_R { - PA_IB_FIX_HW_R::new(((self.bits >> 17) & 0x01) != 0) - } - #[doc = "Bit 16"] + #[doc = "Bit 3"] #[inline(always)] - pub fn pa_half_on_hw(&self) -> PA_HALF_ON_HW_R { - PA_HALF_ON_HW_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn pa_etb_en_hw(&self) -> PA_ETB_EN_HW_R { + PA_ETB_EN_HW_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bits 12:14"] + #[doc = "Bits 4:7"] #[inline(always)] - pub fn pa_vbcas_hw(&self) -> PA_VBCAS_HW_R { - PA_VBCAS_HW_R::new(((self.bits >> 12) & 0x07) as u8) + pub fn pa_iet_hw(&self) -> PA_IET_HW_R { + PA_IET_HW_R::new(((self.bits >> 4) & 0x0f) as u8) } #[doc = "Bits 8:11"] #[inline(always)] pub fn pa_vbcore_hw(&self) -> PA_VBCORE_HW_R { PA_VBCORE_HW_R::new(((self.bits >> 8) & 0x0f) as u8) } - #[doc = "Bits 4:7"] + #[doc = "Bits 12:14"] #[inline(always)] - pub fn pa_iet_hw(&self) -> PA_IET_HW_R { - PA_IET_HW_R::new(((self.bits >> 4) & 0x0f) as u8) + pub fn pa_vbcas_hw(&self) -> PA_VBCAS_HW_R { + PA_VBCAS_HW_R::new(((self.bits >> 12) & 7) as u8) } - #[doc = "Bit 3"] + #[doc = "Bit 16"] #[inline(always)] - pub fn pa_etb_en_hw(&self) -> PA_ETB_EN_HW_R { - PA_ETB_EN_HW_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn pa_half_on_hw(&self) -> PA_HALF_ON_HW_R { + PA_HALF_ON_HW_R::new(((self.bits >> 16) & 1) != 0) } -} -impl W { #[doc = "Bit 17"] #[inline(always)] - pub fn pa_ib_fix_hw(&mut self) -> PA_IB_FIX_HW_W { - PA_IB_FIX_HW_W { w: self } + pub fn pa_ib_fix_hw(&self) -> PA_IB_FIX_HW_R { + PA_IB_FIX_HW_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bit 16"] +} +impl W { + #[doc = "Bit 3"] #[inline(always)] - pub fn pa_half_on_hw(&mut self) -> PA_HALF_ON_HW_W { - PA_HALF_ON_HW_W { w: self } + #[must_use] + pub fn pa_etb_en_hw(&mut self) -> PA_ETB_EN_HW_W<3> { + PA_ETB_EN_HW_W::new(self) } - #[doc = "Bits 12:14"] + #[doc = "Bits 4:7"] #[inline(always)] - pub fn pa_vbcas_hw(&mut self) -> PA_VBCAS_HW_W { - PA_VBCAS_HW_W { w: self } + #[must_use] + pub fn pa_iet_hw(&mut self) -> PA_IET_HW_W<4> { + PA_IET_HW_W::new(self) } #[doc = "Bits 8:11"] #[inline(always)] - pub fn pa_vbcore_hw(&mut self) -> PA_VBCORE_HW_W { - PA_VBCORE_HW_W { w: self } + #[must_use] + pub fn pa_vbcore_hw(&mut self) -> PA_VBCORE_HW_W<8> { + PA_VBCORE_HW_W::new(self) } - #[doc = "Bits 4:7"] + #[doc = "Bits 12:14"] #[inline(always)] - pub fn pa_iet_hw(&mut self) -> PA_IET_HW_W { - PA_IET_HW_W { w: self } + #[must_use] + pub fn pa_vbcas_hw(&mut self) -> PA_VBCAS_HW_W<12> { + PA_VBCAS_HW_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bit 16"] + #[inline(always)] + #[must_use] + pub fn pa_half_on_hw(&mut self) -> PA_HALF_ON_HW_W<16> { + PA_HALF_ON_HW_W::new(self) + } + #[doc = "Bit 17"] #[inline(always)] - pub fn pa_etb_en_hw(&mut self) -> PA_ETB_EN_HW_W { - PA_ETB_EN_HW_W { w: self } + #[must_use] + pub fn pa_ib_fix_hw(&mut self) -> PA_IB_FIX_HW_W<17> { + PA_IB_FIX_HW_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -299,11 +146,10 @@ impl crate::Readable for PA2_SPEC { #[doc = "`write(|w| ..)` method takes [pa2::W](W) writer structure"] impl crate::Writable for PA2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pa2 to value 0"] impl crate::Resettable for PA2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/pa_reg_ctrl_hw1.rs b/src/rf/pa_reg_ctrl_hw1.rs index bed248e..bb3ef6b 100644 --- a/src/rf/pa_reg_ctrl_hw1.rs +++ b/src/rf/pa_reg_ctrl_hw1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,123 +28,65 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `pa_vbcas_11n` reader - "] -pub struct PA_VBCAS_11N_R(crate::FieldReader); -impl PA_VBCAS_11N_R { - pub(crate) fn new(bits: u8) -> Self { - PA_VBCAS_11N_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PA_VBCAS_11N_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pa_vbcas_11n` writer - "] -pub struct PA_VBCAS_11N_W<'a> { - w: &'a mut W, -} -impl<'a> PA_VBCAS_11N_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 20)) | ((value as u32 & 0x07) << 20); - self.w - } -} -#[doc = "Field `pa_vbcore_11n` reader - "] -pub struct PA_VBCORE_11N_R(crate::FieldReader); -impl PA_VBCORE_11N_R { - pub(crate) fn new(bits: u8) -> Self { - PA_VBCORE_11N_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PA_VBCORE_11N_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pa_vbcore_11n` writer - "] -pub struct PA_VBCORE_11N_W<'a> { - w: &'a mut W, -} -impl<'a> PA_VBCORE_11N_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 16)) | ((value as u32 & 0x0f) << 16); - self.w - } -} #[doc = "Field `pa_iet_11n` reader - "] -pub struct PA_IET_11N_R(crate::FieldReader); -impl PA_IET_11N_R { - pub(crate) fn new(bits: u8) -> Self { - PA_IET_11N_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PA_IET_11N_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PA_IET_11N_R = crate::FieldReader; #[doc = "Field `pa_iet_11n` writer - "] -pub struct PA_IET_11N_W<'a> { - w: &'a mut W, -} -impl<'a> PA_IET_11N_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 12)) | ((value as u32 & 0x0f) << 12); - self.w - } -} +pub type PA_IET_11N_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PA_REG_CTRL_HW1_SPEC, u8, u8, 4, O>; +#[doc = "Field `pa_vbcore_11n` reader - "] +pub type PA_VBCORE_11N_R = crate::FieldReader; +#[doc = "Field `pa_vbcore_11n` writer - "] +pub type PA_VBCORE_11N_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PA_REG_CTRL_HW1_SPEC, u8, u8, 4, O>; +#[doc = "Field `pa_vbcas_11n` reader - "] +pub type PA_VBCAS_11N_R = crate::FieldReader; +#[doc = "Field `pa_vbcas_11n` writer - "] +pub type PA_VBCAS_11N_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PA_REG_CTRL_HW1_SPEC, u8, u8, 3, O>; impl R { - #[doc = "Bits 20:22"] + #[doc = "Bits 12:15"] #[inline(always)] - pub fn pa_vbcas_11n(&self) -> PA_VBCAS_11N_R { - PA_VBCAS_11N_R::new(((self.bits >> 20) & 0x07) as u8) + pub fn pa_iet_11n(&self) -> PA_IET_11N_R { + PA_IET_11N_R::new(((self.bits >> 12) & 0x0f) as u8) } #[doc = "Bits 16:19"] #[inline(always)] pub fn pa_vbcore_11n(&self) -> PA_VBCORE_11N_R { PA_VBCORE_11N_R::new(((self.bits >> 16) & 0x0f) as u8) } - #[doc = "Bits 12:15"] + #[doc = "Bits 20:22"] #[inline(always)] - pub fn pa_iet_11n(&self) -> PA_IET_11N_R { - PA_IET_11N_R::new(((self.bits >> 12) & 0x0f) as u8) + pub fn pa_vbcas_11n(&self) -> PA_VBCAS_11N_R { + PA_VBCAS_11N_R::new(((self.bits >> 20) & 7) as u8) } } impl W { - #[doc = "Bits 20:22"] + #[doc = "Bits 12:15"] #[inline(always)] - pub fn pa_vbcas_11n(&mut self) -> PA_VBCAS_11N_W { - PA_VBCAS_11N_W { w: self } + #[must_use] + pub fn pa_iet_11n(&mut self) -> PA_IET_11N_W<12> { + PA_IET_11N_W::new(self) } #[doc = "Bits 16:19"] #[inline(always)] - pub fn pa_vbcore_11n(&mut self) -> PA_VBCORE_11N_W { - PA_VBCORE_11N_W { w: self } + #[must_use] + pub fn pa_vbcore_11n(&mut self) -> PA_VBCORE_11N_W<16> { + PA_VBCORE_11N_W::new(self) } - #[doc = "Bits 12:15"] + #[doc = "Bits 20:22"] #[inline(always)] - pub fn pa_iet_11n(&mut self) -> PA_IET_11N_W { - PA_IET_11N_W { w: self } + #[must_use] + pub fn pa_vbcas_11n(&mut self) -> PA_VBCAS_11N_W<20> { + PA_VBCAS_11N_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -161,11 +104,10 @@ impl crate::Readable for PA_REG_CTRL_HW1_SPEC { #[doc = "`write(|w| ..)` method takes [pa_reg_ctrl_hw1::W](W) writer structure"] impl crate::Writable for PA_REG_CTRL_HW1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pa_reg_ctrl_hw1 to value 0"] impl crate::Resettable for PA_REG_CTRL_HW1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/pa_reg_ctrl_hw2.rs b/src/rf/pa_reg_ctrl_hw2.rs index 5ede578..8b062ed 100644 --- a/src/rf/pa_reg_ctrl_hw2.rs +++ b/src/rf/pa_reg_ctrl_hw2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,231 +28,113 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `pa_vbcas_11b` reader - "] -pub struct PA_VBCAS_11B_R(crate::FieldReader); -impl PA_VBCAS_11B_R { - pub(crate) fn new(bits: u8) -> Self { - PA_VBCAS_11B_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PA_VBCAS_11B_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pa_vbcas_11b` writer - "] -pub struct PA_VBCAS_11B_W<'a> { - w: &'a mut W, -} -impl<'a> PA_VBCAS_11B_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 20)) | ((value as u32 & 0x07) << 20); - self.w - } -} -#[doc = "Field `pa_vbcore_11b` reader - "] -pub struct PA_VBCORE_11B_R(crate::FieldReader); -impl PA_VBCORE_11B_R { - pub(crate) fn new(bits: u8) -> Self { - PA_VBCORE_11B_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PA_VBCORE_11B_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pa_vbcore_11b` writer - "] -pub struct PA_VBCORE_11B_W<'a> { - w: &'a mut W, -} -impl<'a> PA_VBCORE_11B_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 16)) | ((value as u32 & 0x0f) << 16); - self.w - } -} -#[doc = "Field `pa_iet_11b` reader - "] -pub struct PA_IET_11B_R(crate::FieldReader); -impl PA_IET_11B_R { - pub(crate) fn new(bits: u8) -> Self { - PA_IET_11B_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PA_IET_11B_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pa_iet_11b` writer - "] -pub struct PA_IET_11B_W<'a> { - w: &'a mut W, -} -impl<'a> PA_IET_11B_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 12)) | ((value as u32 & 0x0f) << 12); - self.w - } -} -#[doc = "Field `pa_vbcas_11g` reader - "] -pub struct PA_VBCAS_11G_R(crate::FieldReader); -impl PA_VBCAS_11G_R { - pub(crate) fn new(bits: u8) -> Self { - PA_VBCAS_11G_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PA_VBCAS_11G_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pa_vbcas_11g` writer - "] -pub struct PA_VBCAS_11G_W<'a> { - w: &'a mut W, -} -impl<'a> PA_VBCAS_11G_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 8)) | ((value as u32 & 0x07) << 8); - self.w - } -} -#[doc = "Field `pa_vbcore_11g` reader - "] -pub struct PA_VBCORE_11G_R(crate::FieldReader); -impl PA_VBCORE_11G_R { - pub(crate) fn new(bits: u8) -> Self { - PA_VBCORE_11G_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PA_VBCORE_11G_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pa_vbcore_11g` writer - "] -pub struct PA_VBCORE_11G_W<'a> { - w: &'a mut W, -} -impl<'a> PA_VBCORE_11G_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 4)) | ((value as u32 & 0x0f) << 4); - self.w - } -} #[doc = "Field `pa_iet_11g` reader - "] -pub struct PA_IET_11G_R(crate::FieldReader); -impl PA_IET_11G_R { - pub(crate) fn new(bits: u8) -> Self { - PA_IET_11G_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PA_IET_11G_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PA_IET_11G_R = crate::FieldReader; #[doc = "Field `pa_iet_11g` writer - "] -pub struct PA_IET_11G_W<'a> { - w: &'a mut W, -} -impl<'a> PA_IET_11G_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type PA_IET_11G_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PA_REG_CTRL_HW2_SPEC, u8, u8, 4, O>; +#[doc = "Field `pa_vbcore_11g` reader - "] +pub type PA_VBCORE_11G_R = crate::FieldReader; +#[doc = "Field `pa_vbcore_11g` writer - "] +pub type PA_VBCORE_11G_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PA_REG_CTRL_HW2_SPEC, u8, u8, 4, O>; +#[doc = "Field `pa_vbcas_11g` reader - "] +pub type PA_VBCAS_11G_R = crate::FieldReader; +#[doc = "Field `pa_vbcas_11g` writer - "] +pub type PA_VBCAS_11G_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PA_REG_CTRL_HW2_SPEC, u8, u8, 3, O>; +#[doc = "Field `pa_iet_11b` reader - "] +pub type PA_IET_11B_R = crate::FieldReader; +#[doc = "Field `pa_iet_11b` writer - "] +pub type PA_IET_11B_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PA_REG_CTRL_HW2_SPEC, u8, u8, 4, O>; +#[doc = "Field `pa_vbcore_11b` reader - "] +pub type PA_VBCORE_11B_R = crate::FieldReader; +#[doc = "Field `pa_vbcore_11b` writer - "] +pub type PA_VBCORE_11B_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PA_REG_CTRL_HW2_SPEC, u8, u8, 4, O>; +#[doc = "Field `pa_vbcas_11b` reader - "] +pub type PA_VBCAS_11B_R = crate::FieldReader; +#[doc = "Field `pa_vbcas_11b` writer - "] +pub type PA_VBCAS_11B_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, PA_REG_CTRL_HW2_SPEC, u8, u8, 3, O>; +impl R { + #[doc = "Bits 0:3"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x0f) | (value as u32 & 0x0f); - self.w + pub fn pa_iet_11g(&self) -> PA_IET_11G_R { + PA_IET_11G_R::new((self.bits & 0x0f) as u8) } -} -impl R { - #[doc = "Bits 20:22"] + #[doc = "Bits 4:7"] #[inline(always)] - pub fn pa_vbcas_11b(&self) -> PA_VBCAS_11B_R { - PA_VBCAS_11B_R::new(((self.bits >> 20) & 0x07) as u8) + pub fn pa_vbcore_11g(&self) -> PA_VBCORE_11G_R { + PA_VBCORE_11G_R::new(((self.bits >> 4) & 0x0f) as u8) } - #[doc = "Bits 16:19"] + #[doc = "Bits 8:10"] #[inline(always)] - pub fn pa_vbcore_11b(&self) -> PA_VBCORE_11B_R { - PA_VBCORE_11B_R::new(((self.bits >> 16) & 0x0f) as u8) + pub fn pa_vbcas_11g(&self) -> PA_VBCAS_11G_R { + PA_VBCAS_11G_R::new(((self.bits >> 8) & 7) as u8) } #[doc = "Bits 12:15"] #[inline(always)] pub fn pa_iet_11b(&self) -> PA_IET_11B_R { PA_IET_11B_R::new(((self.bits >> 12) & 0x0f) as u8) } - #[doc = "Bits 8:10"] - #[inline(always)] - pub fn pa_vbcas_11g(&self) -> PA_VBCAS_11G_R { - PA_VBCAS_11G_R::new(((self.bits >> 8) & 0x07) as u8) - } - #[doc = "Bits 4:7"] + #[doc = "Bits 16:19"] #[inline(always)] - pub fn pa_vbcore_11g(&self) -> PA_VBCORE_11G_R { - PA_VBCORE_11G_R::new(((self.bits >> 4) & 0x0f) as u8) + pub fn pa_vbcore_11b(&self) -> PA_VBCORE_11B_R { + PA_VBCORE_11B_R::new(((self.bits >> 16) & 0x0f) as u8) } - #[doc = "Bits 0:3"] + #[doc = "Bits 20:22"] #[inline(always)] - pub fn pa_iet_11g(&self) -> PA_IET_11G_R { - PA_IET_11G_R::new((self.bits & 0x0f) as u8) + pub fn pa_vbcas_11b(&self) -> PA_VBCAS_11B_R { + PA_VBCAS_11B_R::new(((self.bits >> 20) & 7) as u8) } } impl W { - #[doc = "Bits 20:22"] + #[doc = "Bits 0:3"] #[inline(always)] - pub fn pa_vbcas_11b(&mut self) -> PA_VBCAS_11B_W { - PA_VBCAS_11B_W { w: self } + #[must_use] + pub fn pa_iet_11g(&mut self) -> PA_IET_11G_W<0> { + PA_IET_11G_W::new(self) } - #[doc = "Bits 16:19"] + #[doc = "Bits 4:7"] #[inline(always)] - pub fn pa_vbcore_11b(&mut self) -> PA_VBCORE_11B_W { - PA_VBCORE_11B_W { w: self } + #[must_use] + pub fn pa_vbcore_11g(&mut self) -> PA_VBCORE_11G_W<4> { + PA_VBCORE_11G_W::new(self) } - #[doc = "Bits 12:15"] + #[doc = "Bits 8:10"] #[inline(always)] - pub fn pa_iet_11b(&mut self) -> PA_IET_11B_W { - PA_IET_11B_W { w: self } + #[must_use] + pub fn pa_vbcas_11g(&mut self) -> PA_VBCAS_11G_W<8> { + PA_VBCAS_11G_W::new(self) } - #[doc = "Bits 8:10"] + #[doc = "Bits 12:15"] #[inline(always)] - pub fn pa_vbcas_11g(&mut self) -> PA_VBCAS_11G_W { - PA_VBCAS_11G_W { w: self } + #[must_use] + pub fn pa_iet_11b(&mut self) -> PA_IET_11B_W<12> { + PA_IET_11B_W::new(self) } - #[doc = "Bits 4:7"] + #[doc = "Bits 16:19"] #[inline(always)] - pub fn pa_vbcore_11g(&mut self) -> PA_VBCORE_11G_W { - PA_VBCORE_11G_W { w: self } + #[must_use] + pub fn pa_vbcore_11b(&mut self) -> PA_VBCORE_11B_W<16> { + PA_VBCORE_11B_W::new(self) } - #[doc = "Bits 0:3"] + #[doc = "Bits 20:22"] #[inline(always)] - pub fn pa_iet_11g(&mut self) -> PA_IET_11G_W { - PA_IET_11G_W { w: self } + #[must_use] + pub fn pa_vbcas_11b(&mut self) -> PA_VBCAS_11B_W<20> { + PA_VBCAS_11B_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -269,11 +152,10 @@ impl crate::Readable for PA_REG_CTRL_HW2_SPEC { #[doc = "`write(|w| ..)` method takes [pa_reg_ctrl_hw2::W](W) writer structure"] impl crate::Writable for PA_REG_CTRL_HW2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pa_reg_ctrl_hw2 to value 0"] impl crate::Resettable for PA_REG_CTRL_HW2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/pa_reg_wifi_ctrl_hw.rs b/src/rf/pa_reg_wifi_ctrl_hw.rs index bf2dbb6..ad7983b 100644 --- a/src/rf/pa_reg_wifi_ctrl_hw.rs +++ b/src/rf/pa_reg_wifi_ctrl_hw.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,153 +28,65 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `pa_ib_fix_wifi` reader - "] -pub struct PA_IB_FIX_WIFI_R(crate::FieldReader); -impl PA_IB_FIX_WIFI_R { - pub(crate) fn new(bits: bool) -> Self { - PA_IB_FIX_WIFI_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PA_IB_FIX_WIFI_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pa_ib_fix_wifi` writer - "] -pub struct PA_IB_FIX_WIFI_W<'a> { - w: &'a mut W, -} -impl<'a> PA_IB_FIX_WIFI_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `pa_etb_en_wifi` reader - "] -pub struct PA_ETB_EN_WIFI_R(crate::FieldReader); -impl PA_ETB_EN_WIFI_R { - pub(crate) fn new(bits: bool) -> Self { - PA_ETB_EN_WIFI_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PA_ETB_EN_WIFI_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pa_etb_en_wifi` writer - "] -pub struct PA_ETB_EN_WIFI_W<'a> { - w: &'a mut W, -} -impl<'a> PA_ETB_EN_WIFI_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} #[doc = "Field `pa_half_on_wifi` reader - "] -pub struct PA_HALF_ON_WIFI_R(crate::FieldReader); -impl PA_HALF_ON_WIFI_R { - pub(crate) fn new(bits: bool) -> Self { - PA_HALF_ON_WIFI_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PA_HALF_ON_WIFI_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PA_HALF_ON_WIFI_R = crate::BitReader; #[doc = "Field `pa_half_on_wifi` writer - "] -pub struct PA_HALF_ON_WIFI_W<'a> { - w: &'a mut W, -} -impl<'a> PA_HALF_ON_WIFI_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type PA_HALF_ON_WIFI_W<'a, const O: u8> = + crate::BitWriter<'a, u32, PA_REG_WIFI_CTRL_HW_SPEC, bool, O>; +#[doc = "Field `pa_etb_en_wifi` reader - "] +pub type PA_ETB_EN_WIFI_R = crate::BitReader; +#[doc = "Field `pa_etb_en_wifi` writer - "] +pub type PA_ETB_EN_WIFI_W<'a, const O: u8> = + crate::BitWriter<'a, u32, PA_REG_WIFI_CTRL_HW_SPEC, bool, O>; +#[doc = "Field `pa_ib_fix_wifi` reader - "] +pub type PA_IB_FIX_WIFI_R = crate::BitReader; +#[doc = "Field `pa_ib_fix_wifi` writer - "] +pub type PA_IB_FIX_WIFI_W<'a, const O: u8> = + crate::BitWriter<'a, u32, PA_REG_WIFI_CTRL_HW_SPEC, bool, O>; impl R { - #[doc = "Bit 16"] + #[doc = "Bit 0"] #[inline(always)] - pub fn pa_ib_fix_wifi(&self) -> PA_IB_FIX_WIFI_R { - PA_IB_FIX_WIFI_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn pa_half_on_wifi(&self) -> PA_HALF_ON_WIFI_R { + PA_HALF_ON_WIFI_R::new((self.bits & 1) != 0) } #[doc = "Bit 8"] #[inline(always)] pub fn pa_etb_en_wifi(&self) -> PA_ETB_EN_WIFI_R { - PA_ETB_EN_WIFI_R::new(((self.bits >> 8) & 0x01) != 0) + PA_ETB_EN_WIFI_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 16"] #[inline(always)] - pub fn pa_half_on_wifi(&self) -> PA_HALF_ON_WIFI_R { - PA_HALF_ON_WIFI_R::new((self.bits & 0x01) != 0) + pub fn pa_ib_fix_wifi(&self) -> PA_IB_FIX_WIFI_R { + PA_IB_FIX_WIFI_R::new(((self.bits >> 16) & 1) != 0) } } impl W { - #[doc = "Bit 16"] + #[doc = "Bit 0"] #[inline(always)] - pub fn pa_ib_fix_wifi(&mut self) -> PA_IB_FIX_WIFI_W { - PA_IB_FIX_WIFI_W { w: self } + #[must_use] + pub fn pa_half_on_wifi(&mut self) -> PA_HALF_ON_WIFI_W<0> { + PA_HALF_ON_WIFI_W::new(self) } #[doc = "Bit 8"] #[inline(always)] - pub fn pa_etb_en_wifi(&mut self) -> PA_ETB_EN_WIFI_W { - PA_ETB_EN_WIFI_W { w: self } + #[must_use] + pub fn pa_etb_en_wifi(&mut self) -> PA_ETB_EN_WIFI_W<8> { + PA_ETB_EN_WIFI_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 16"] #[inline(always)] - pub fn pa_half_on_wifi(&mut self) -> PA_HALF_ON_WIFI_W { - PA_HALF_ON_WIFI_W { w: self } + #[must_use] + pub fn pa_ib_fix_wifi(&mut self) -> PA_IB_FIX_WIFI_W<16> { + PA_IB_FIX_WIFI_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -191,11 +104,10 @@ impl crate::Readable for PA_REG_WIFI_CTRL_HW_SPEC { #[doc = "`write(|w| ..)` method takes [pa_reg_wifi_ctrl_hw::W](W) writer structure"] impl crate::Writable for PA_REG_WIFI_CTRL_HW_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pa_reg_wifi_ctrl_hw to value 0"] impl crate::Resettable for PA_REG_WIFI_CTRL_HW_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/pfdcp.rs b/src/rf/pfdcp.rs index 4138288..07d5258 100644 --- a/src/rf/pfdcp.rs +++ b/src/rf/pfdcp.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,429 +28,152 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `lo_pfd_rst_csd_hw` reader - "] -pub struct LO_PFD_RST_CSD_HW_R(crate::FieldReader); -impl LO_PFD_RST_CSD_HW_R { - pub(crate) fn new(bits: bool) -> Self { - LO_PFD_RST_CSD_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_PFD_RST_CSD_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_pfd_rst_csd_hw` writer - "] -pub struct LO_PFD_RST_CSD_HW_W<'a> { - w: &'a mut W, -} -impl<'a> LO_PFD_RST_CSD_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 29)) | ((value as u32 & 0x01) << 29); - self.w - } -} -#[doc = "Field `lo_pfd_rst_csd` reader - "] -pub struct LO_PFD_RST_CSD_R(crate::FieldReader); -impl LO_PFD_RST_CSD_R { - pub(crate) fn new(bits: bool) -> Self { - LO_PFD_RST_CSD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_PFD_RST_CSD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_pfd_rst_csd` writer - "] -pub struct LO_PFD_RST_CSD_W<'a> { - w: &'a mut W, -} -impl<'a> LO_PFD_RST_CSD_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 28)) | ((value as u32 & 0x01) << 28); - self.w - } -} -#[doc = "Field `lo_pfd_rvdd_boost` reader - "] -pub struct LO_PFD_RVDD_BOOST_R(crate::FieldReader); -impl LO_PFD_RVDD_BOOST_R { - pub(crate) fn new(bits: bool) -> Self { - LO_PFD_RVDD_BOOST_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_PFD_RVDD_BOOST_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_pfd_rvdd_boost` writer - "] -pub struct LO_PFD_RVDD_BOOST_W<'a> { - w: &'a mut W, -} -impl<'a> LO_PFD_RVDD_BOOST_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24); - self.w - } -} -#[doc = "Field `lo_cp_hiz` reader - "] -pub struct LO_CP_HIZ_R(crate::FieldReader); -impl LO_CP_HIZ_R { - pub(crate) fn new(bits: bool) -> Self { - LO_CP_HIZ_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_CP_HIZ_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_cp_hiz` writer - "] -pub struct LO_CP_HIZ_W<'a> { - w: &'a mut W, -} -impl<'a> LO_CP_HIZ_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w - } -} -#[doc = "Field `lo_cp_opamp_en` reader - "] -pub struct LO_CP_OPAMP_EN_R(crate::FieldReader); -impl LO_CP_OPAMP_EN_R { - pub(crate) fn new(bits: bool) -> Self { - LO_CP_OPAMP_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_CP_OPAMP_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_cp_opamp_en` writer - "] -pub struct LO_CP_OPAMP_EN_W<'a> { - w: &'a mut W, -} -impl<'a> LO_CP_OPAMP_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `lo_cp_ota_en` reader - "] -pub struct LO_CP_OTA_EN_R(crate::FieldReader); -impl LO_CP_OTA_EN_R { - pub(crate) fn new(bits: bool) -> Self { - LO_CP_OTA_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_CP_OTA_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_cp_ota_en` writer - "] -pub struct LO_CP_OTA_EN_W<'a> { - w: &'a mut W, -} -impl<'a> LO_CP_OTA_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} -#[doc = "Field `lo_cp_startup_en` reader - "] -pub struct LO_CP_STARTUP_EN_R(crate::FieldReader); -impl LO_CP_STARTUP_EN_R { - pub(crate) fn new(bits: bool) -> Self { - LO_CP_STARTUP_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_CP_STARTUP_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_cp_startup_en` writer - "] -pub struct LO_CP_STARTUP_EN_W<'a> { - w: &'a mut W, -} -impl<'a> LO_CP_STARTUP_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `lo_cp_sel_hw` reader - "] -pub struct LO_CP_SEL_HW_R(crate::FieldReader); -impl LO_CP_SEL_HW_R { - pub(crate) fn new(bits: bool) -> Self { - LO_CP_SEL_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_CP_SEL_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_cp_sel_hw` writer - "] -pub struct LO_CP_SEL_HW_W<'a> { - w: &'a mut W, -} -impl<'a> LO_CP_SEL_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} #[doc = "Field `lo_cp_sel` reader - "] -pub struct LO_CP_SEL_R(crate::FieldReader); -impl LO_CP_SEL_R { - pub(crate) fn new(bits: bool) -> Self { - LO_CP_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_CP_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type LO_CP_SEL_R = crate::BitReader; #[doc = "Field `lo_cp_sel` writer - "] -pub struct LO_CP_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> LO_CP_SEL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type LO_CP_SEL_W<'a, const O: u8> = crate::BitWriter<'a, u32, PFDCP_SPEC, bool, O>; +#[doc = "Field `lo_cp_sel_hw` reader - "] +pub type LO_CP_SEL_HW_R = crate::BitReader; +#[doc = "Field `lo_cp_sel_hw` writer - "] +pub type LO_CP_SEL_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PFDCP_SPEC, bool, O>; +#[doc = "Field `lo_cp_startup_en` reader - "] +pub type LO_CP_STARTUP_EN_R = crate::BitReader; +#[doc = "Field `lo_cp_startup_en` writer - "] +pub type LO_CP_STARTUP_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PFDCP_SPEC, bool, O>; +#[doc = "Field `lo_cp_ota_en` reader - "] +pub type LO_CP_OTA_EN_R = crate::BitReader; +#[doc = "Field `lo_cp_ota_en` writer - "] +pub type LO_CP_OTA_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PFDCP_SPEC, bool, O>; +#[doc = "Field `lo_cp_opamp_en` reader - "] +pub type LO_CP_OPAMP_EN_R = crate::BitReader; +#[doc = "Field `lo_cp_opamp_en` writer - "] +pub type LO_CP_OPAMP_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PFDCP_SPEC, bool, O>; +#[doc = "Field `lo_cp_hiz` reader - "] +pub type LO_CP_HIZ_R = crate::BitReader; +#[doc = "Field `lo_cp_hiz` writer - "] +pub type LO_CP_HIZ_W<'a, const O: u8> = crate::BitWriter<'a, u32, PFDCP_SPEC, bool, O>; +#[doc = "Field `lo_pfd_rvdd_boost` reader - "] +pub type LO_PFD_RVDD_BOOST_R = crate::BitReader; +#[doc = "Field `lo_pfd_rvdd_boost` writer - "] +pub type LO_PFD_RVDD_BOOST_W<'a, const O: u8> = crate::BitWriter<'a, u32, PFDCP_SPEC, bool, O>; +#[doc = "Field `lo_pfd_rst_csd` reader - "] +pub type LO_PFD_RST_CSD_R = crate::BitReader; +#[doc = "Field `lo_pfd_rst_csd` writer - "] +pub type LO_PFD_RST_CSD_W<'a, const O: u8> = crate::BitWriter<'a, u32, PFDCP_SPEC, bool, O>; +#[doc = "Field `lo_pfd_rst_csd_hw` reader - "] +pub type LO_PFD_RST_CSD_HW_R = crate::BitReader; +#[doc = "Field `lo_pfd_rst_csd_hw` writer - "] +pub type LO_PFD_RST_CSD_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PFDCP_SPEC, bool, O>; impl R { - #[doc = "Bit 29"] + #[doc = "Bit 0"] #[inline(always)] - pub fn lo_pfd_rst_csd_hw(&self) -> LO_PFD_RST_CSD_HW_R { - LO_PFD_RST_CSD_HW_R::new(((self.bits >> 29) & 0x01) != 0) + pub fn lo_cp_sel(&self) -> LO_CP_SEL_R { + LO_CP_SEL_R::new((self.bits & 1) != 0) } - #[doc = "Bit 28"] + #[doc = "Bit 4"] #[inline(always)] - pub fn lo_pfd_rst_csd(&self) -> LO_PFD_RST_CSD_R { - LO_PFD_RST_CSD_R::new(((self.bits >> 28) & 0x01) != 0) + pub fn lo_cp_sel_hw(&self) -> LO_CP_SEL_HW_R { + LO_CP_SEL_HW_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 24"] + #[doc = "Bit 8"] #[inline(always)] - pub fn lo_pfd_rvdd_boost(&self) -> LO_PFD_RVDD_BOOST_R { - LO_PFD_RVDD_BOOST_R::new(((self.bits >> 24) & 0x01) != 0) + pub fn lo_cp_startup_en(&self) -> LO_CP_STARTUP_EN_R { + LO_CP_STARTUP_EN_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bit 20"] + #[doc = "Bit 12"] #[inline(always)] - pub fn lo_cp_hiz(&self) -> LO_CP_HIZ_R { - LO_CP_HIZ_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn lo_cp_ota_en(&self) -> LO_CP_OTA_EN_R { + LO_CP_OTA_EN_R::new(((self.bits >> 12) & 1) != 0) } #[doc = "Bit 16"] #[inline(always)] pub fn lo_cp_opamp_en(&self) -> LO_CP_OPAMP_EN_R { - LO_CP_OPAMP_EN_R::new(((self.bits >> 16) & 0x01) != 0) + LO_CP_OPAMP_EN_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 12"] + #[doc = "Bit 20"] #[inline(always)] - pub fn lo_cp_ota_en(&self) -> LO_CP_OTA_EN_R { - LO_CP_OTA_EN_R::new(((self.bits >> 12) & 0x01) != 0) + pub fn lo_cp_hiz(&self) -> LO_CP_HIZ_R { + LO_CP_HIZ_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bit 8"] + #[doc = "Bit 24"] #[inline(always)] - pub fn lo_cp_startup_en(&self) -> LO_CP_STARTUP_EN_R { - LO_CP_STARTUP_EN_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn lo_pfd_rvdd_boost(&self) -> LO_PFD_RVDD_BOOST_R { + LO_PFD_RVDD_BOOST_R::new(((self.bits >> 24) & 1) != 0) } - #[doc = "Bit 4"] + #[doc = "Bit 28"] #[inline(always)] - pub fn lo_cp_sel_hw(&self) -> LO_CP_SEL_HW_R { - LO_CP_SEL_HW_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn lo_pfd_rst_csd(&self) -> LO_PFD_RST_CSD_R { + LO_PFD_RST_CSD_R::new(((self.bits >> 28) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 29"] #[inline(always)] - pub fn lo_cp_sel(&self) -> LO_CP_SEL_R { - LO_CP_SEL_R::new((self.bits & 0x01) != 0) + pub fn lo_pfd_rst_csd_hw(&self) -> LO_PFD_RST_CSD_HW_R { + LO_PFD_RST_CSD_HW_R::new(((self.bits >> 29) & 1) != 0) } } impl W { - #[doc = "Bit 29"] + #[doc = "Bit 0"] #[inline(always)] - pub fn lo_pfd_rst_csd_hw(&mut self) -> LO_PFD_RST_CSD_HW_W { - LO_PFD_RST_CSD_HW_W { w: self } + #[must_use] + pub fn lo_cp_sel(&mut self) -> LO_CP_SEL_W<0> { + LO_CP_SEL_W::new(self) } - #[doc = "Bit 28"] + #[doc = "Bit 4"] #[inline(always)] - pub fn lo_pfd_rst_csd(&mut self) -> LO_PFD_RST_CSD_W { - LO_PFD_RST_CSD_W { w: self } + #[must_use] + pub fn lo_cp_sel_hw(&mut self) -> LO_CP_SEL_HW_W<4> { + LO_CP_SEL_HW_W::new(self) } - #[doc = "Bit 24"] + #[doc = "Bit 8"] #[inline(always)] - pub fn lo_pfd_rvdd_boost(&mut self) -> LO_PFD_RVDD_BOOST_W { - LO_PFD_RVDD_BOOST_W { w: self } + #[must_use] + pub fn lo_cp_startup_en(&mut self) -> LO_CP_STARTUP_EN_W<8> { + LO_CP_STARTUP_EN_W::new(self) } - #[doc = "Bit 20"] + #[doc = "Bit 12"] #[inline(always)] - pub fn lo_cp_hiz(&mut self) -> LO_CP_HIZ_W { - LO_CP_HIZ_W { w: self } + #[must_use] + pub fn lo_cp_ota_en(&mut self) -> LO_CP_OTA_EN_W<12> { + LO_CP_OTA_EN_W::new(self) } #[doc = "Bit 16"] #[inline(always)] - pub fn lo_cp_opamp_en(&mut self) -> LO_CP_OPAMP_EN_W { - LO_CP_OPAMP_EN_W { w: self } + #[must_use] + pub fn lo_cp_opamp_en(&mut self) -> LO_CP_OPAMP_EN_W<16> { + LO_CP_OPAMP_EN_W::new(self) } - #[doc = "Bit 12"] + #[doc = "Bit 20"] #[inline(always)] - pub fn lo_cp_ota_en(&mut self) -> LO_CP_OTA_EN_W { - LO_CP_OTA_EN_W { w: self } + #[must_use] + pub fn lo_cp_hiz(&mut self) -> LO_CP_HIZ_W<20> { + LO_CP_HIZ_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bit 24"] #[inline(always)] - pub fn lo_cp_startup_en(&mut self) -> LO_CP_STARTUP_EN_W { - LO_CP_STARTUP_EN_W { w: self } + #[must_use] + pub fn lo_pfd_rvdd_boost(&mut self) -> LO_PFD_RVDD_BOOST_W<24> { + LO_PFD_RVDD_BOOST_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 28"] #[inline(always)] - pub fn lo_cp_sel_hw(&mut self) -> LO_CP_SEL_HW_W { - LO_CP_SEL_HW_W { w: self } + #[must_use] + pub fn lo_pfd_rst_csd(&mut self) -> LO_PFD_RST_CSD_W<28> { + LO_PFD_RST_CSD_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 29"] #[inline(always)] - pub fn lo_cp_sel(&mut self) -> LO_CP_SEL_W { - LO_CP_SEL_W { w: self } + #[must_use] + pub fn lo_pfd_rst_csd_hw(&mut self) -> LO_PFD_RST_CSD_HW_W<29> { + LO_PFD_RST_CSD_HW_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -467,11 +191,10 @@ impl crate::Readable for PFDCP_SPEC { #[doc = "`write(|w| ..)` method takes [pfdcp::W](W) writer structure"] impl crate::Writable for PFDCP_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pfdcp to value 0"] impl crate::Resettable for PFDCP_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/pmip_mv2aon.rs b/src/rf/pmip_mv2aon.rs index 097f91a..3205841 100644 --- a/src/rf/pmip_mv2aon.rs +++ b/src/rf/pmip_mv2aon.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,13 +28,15 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } impl W { #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -51,11 +54,10 @@ impl crate::Readable for PMIP_MV2AON_SPEC { #[doc = "`write(|w| ..)` method takes [pmip_mv2aon::W](W) writer structure"] impl crate::Writable for PMIP_MV2AON_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pmip_mv2aon to value 0"] impl crate::Resettable for PMIP_MV2AON_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/ppu_ctrl_hw.rs b/src/rf/ppu_ctrl_hw.rs index e81f7c4..07242c0 100644 --- a/src/rf/ppu_ctrl_hw.rs +++ b/src/rf/ppu_ctrl_hw.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,429 +28,152 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `ppu_txbuf_hw` reader - "] -pub struct PPU_TXBUF_HW_R(crate::FieldReader); -impl PPU_TXBUF_HW_R { - pub(crate) fn new(bits: bool) -> Self { - PPU_TXBUF_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PPU_TXBUF_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ppu_txbuf_hw` writer - "] -pub struct PPU_TXBUF_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PPU_TXBUF_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 25)) | ((value as u32 & 0x01) << 25); - self.w - } -} -#[doc = "Field `ppu_rxbuf_hw` reader - "] -pub struct PPU_RXBUF_HW_R(crate::FieldReader); -impl PPU_RXBUF_HW_R { - pub(crate) fn new(bits: bool) -> Self { - PPU_RXBUF_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PPU_RXBUF_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ppu_rxbuf_hw` writer - "] -pub struct PPU_RXBUF_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PPU_RXBUF_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24); - self.w - } -} -#[doc = "Field `ppu_osmx_hw` reader - "] -pub struct PPU_OSMX_HW_R(crate::FieldReader); -impl PPU_OSMX_HW_R { - pub(crate) fn new(bits: bool) -> Self { - PPU_OSMX_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PPU_OSMX_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ppu_osmx_hw` writer - "] -pub struct PPU_OSMX_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PPU_OSMX_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23); - self.w - } -} -#[doc = "Field `ppu_pfd_hw` reader - "] -pub struct PPU_PFD_HW_R(crate::FieldReader); -impl PPU_PFD_HW_R { - pub(crate) fn new(bits: bool) -> Self { - PPU_PFD_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PPU_PFD_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ppu_pfd_hw` writer - "] -pub struct PPU_PFD_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PPU_PFD_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 22)) | ((value as u32 & 0x01) << 22); - self.w - } -} -#[doc = "Field `ppu_fbdv_hw` reader - "] -pub struct PPU_FBDV_HW_R(crate::FieldReader); -impl PPU_FBDV_HW_R { - pub(crate) fn new(bits: bool) -> Self { - PPU_FBDV_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PPU_FBDV_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ppu_fbdv_hw` writer - "] -pub struct PPU_FBDV_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PPU_FBDV_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); - self.w - } -} -#[doc = "Field `ppu_vco_hw` reader - "] -pub struct PPU_VCO_HW_R(crate::FieldReader); -impl PPU_VCO_HW_R { - pub(crate) fn new(bits: bool) -> Self { - PPU_VCO_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PPU_VCO_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ppu_vco_hw` writer - "] -pub struct PPU_VCO_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PPU_VCO_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w - } -} -#[doc = "Field `ppu_rbb_hw` reader - "] -pub struct PPU_RBB_HW_R(crate::FieldReader); -impl PPU_RBB_HW_R { - pub(crate) fn new(bits: bool) -> Self { - PPU_RBB_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PPU_RBB_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ppu_rbb_hw` writer - "] -pub struct PPU_RBB_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PPU_RBB_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w - } -} -#[doc = "Field `ppu_rmxgm_hw` reader - "] -pub struct PPU_RMXGM_HW_R(crate::FieldReader); -impl PPU_RMXGM_HW_R { - pub(crate) fn new(bits: bool) -> Self { - PPU_RMXGM_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PPU_RMXGM_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ppu_rmxgm_hw` writer - "] -pub struct PPU_RMXGM_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PPU_RMXGM_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w - } -} #[doc = "Field `ppu_lna_hw` reader - "] -pub struct PPU_LNA_HW_R(crate::FieldReader); -impl PPU_LNA_HW_R { - pub(crate) fn new(bits: bool) -> Self { - PPU_LNA_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PPU_LNA_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PPU_LNA_HW_R = crate::BitReader; #[doc = "Field `ppu_lna_hw` writer - "] -pub struct PPU_LNA_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PPU_LNA_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} +pub type PPU_LNA_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPU_CTRL_HW_SPEC, bool, O>; +#[doc = "Field `ppu_rmxgm_hw` reader - "] +pub type PPU_RMXGM_HW_R = crate::BitReader; +#[doc = "Field `ppu_rmxgm_hw` writer - "] +pub type PPU_RMXGM_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPU_CTRL_HW_SPEC, bool, O>; +#[doc = "Field `ppu_rbb_hw` reader - "] +pub type PPU_RBB_HW_R = crate::BitReader; +#[doc = "Field `ppu_rbb_hw` writer - "] +pub type PPU_RBB_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPU_CTRL_HW_SPEC, bool, O>; +#[doc = "Field `ppu_vco_hw` reader - "] +pub type PPU_VCO_HW_R = crate::BitReader; +#[doc = "Field `ppu_vco_hw` writer - "] +pub type PPU_VCO_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPU_CTRL_HW_SPEC, bool, O>; +#[doc = "Field `ppu_fbdv_hw` reader - "] +pub type PPU_FBDV_HW_R = crate::BitReader; +#[doc = "Field `ppu_fbdv_hw` writer - "] +pub type PPU_FBDV_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPU_CTRL_HW_SPEC, bool, O>; +#[doc = "Field `ppu_pfd_hw` reader - "] +pub type PPU_PFD_HW_R = crate::BitReader; +#[doc = "Field `ppu_pfd_hw` writer - "] +pub type PPU_PFD_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPU_CTRL_HW_SPEC, bool, O>; +#[doc = "Field `ppu_osmx_hw` reader - "] +pub type PPU_OSMX_HW_R = crate::BitReader; +#[doc = "Field `ppu_osmx_hw` writer - "] +pub type PPU_OSMX_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPU_CTRL_HW_SPEC, bool, O>; +#[doc = "Field `ppu_rxbuf_hw` reader - "] +pub type PPU_RXBUF_HW_R = crate::BitReader; +#[doc = "Field `ppu_rxbuf_hw` writer - "] +pub type PPU_RXBUF_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPU_CTRL_HW_SPEC, bool, O>; +#[doc = "Field `ppu_txbuf_hw` reader - "] +pub type PPU_TXBUF_HW_R = crate::BitReader; +#[doc = "Field `ppu_txbuf_hw` writer - "] +pub type PPU_TXBUF_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PPU_CTRL_HW_SPEC, bool, O>; impl R { - #[doc = "Bit 25"] + #[doc = "Bit 8"] #[inline(always)] - pub fn ppu_txbuf_hw(&self) -> PPU_TXBUF_HW_R { - PPU_TXBUF_HW_R::new(((self.bits >> 25) & 0x01) != 0) + pub fn ppu_lna_hw(&self) -> PPU_LNA_HW_R { + PPU_LNA_HW_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bit 24"] + #[doc = "Bit 9"] #[inline(always)] - pub fn ppu_rxbuf_hw(&self) -> PPU_RXBUF_HW_R { - PPU_RXBUF_HW_R::new(((self.bits >> 24) & 0x01) != 0) + pub fn ppu_rmxgm_hw(&self) -> PPU_RMXGM_HW_R { + PPU_RMXGM_HW_R::new(((self.bits >> 9) & 1) != 0) } - #[doc = "Bit 23"] + #[doc = "Bit 11"] #[inline(always)] - pub fn ppu_osmx_hw(&self) -> PPU_OSMX_HW_R { - PPU_OSMX_HW_R::new(((self.bits >> 23) & 0x01) != 0) + pub fn ppu_rbb_hw(&self) -> PPU_RBB_HW_R { + PPU_RBB_HW_R::new(((self.bits >> 11) & 1) != 0) } - #[doc = "Bit 22"] + #[doc = "Bit 20"] #[inline(always)] - pub fn ppu_pfd_hw(&self) -> PPU_PFD_HW_R { - PPU_PFD_HW_R::new(((self.bits >> 22) & 0x01) != 0) + pub fn ppu_vco_hw(&self) -> PPU_VCO_HW_R { + PPU_VCO_HW_R::new(((self.bits >> 20) & 1) != 0) } #[doc = "Bit 21"] #[inline(always)] pub fn ppu_fbdv_hw(&self) -> PPU_FBDV_HW_R { - PPU_FBDV_HW_R::new(((self.bits >> 21) & 0x01) != 0) + PPU_FBDV_HW_R::new(((self.bits >> 21) & 1) != 0) } - #[doc = "Bit 20"] + #[doc = "Bit 22"] #[inline(always)] - pub fn ppu_vco_hw(&self) -> PPU_VCO_HW_R { - PPU_VCO_HW_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn ppu_pfd_hw(&self) -> PPU_PFD_HW_R { + PPU_PFD_HW_R::new(((self.bits >> 22) & 1) != 0) } - #[doc = "Bit 11"] + #[doc = "Bit 23"] #[inline(always)] - pub fn ppu_rbb_hw(&self) -> PPU_RBB_HW_R { - PPU_RBB_HW_R::new(((self.bits >> 11) & 0x01) != 0) + pub fn ppu_osmx_hw(&self) -> PPU_OSMX_HW_R { + PPU_OSMX_HW_R::new(((self.bits >> 23) & 1) != 0) } - #[doc = "Bit 9"] + #[doc = "Bit 24"] #[inline(always)] - pub fn ppu_rmxgm_hw(&self) -> PPU_RMXGM_HW_R { - PPU_RMXGM_HW_R::new(((self.bits >> 9) & 0x01) != 0) + pub fn ppu_rxbuf_hw(&self) -> PPU_RXBUF_HW_R { + PPU_RXBUF_HW_R::new(((self.bits >> 24) & 1) != 0) } - #[doc = "Bit 8"] + #[doc = "Bit 25"] #[inline(always)] - pub fn ppu_lna_hw(&self) -> PPU_LNA_HW_R { - PPU_LNA_HW_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn ppu_txbuf_hw(&self) -> PPU_TXBUF_HW_R { + PPU_TXBUF_HW_R::new(((self.bits >> 25) & 1) != 0) } } impl W { - #[doc = "Bit 25"] + #[doc = "Bit 8"] #[inline(always)] - pub fn ppu_txbuf_hw(&mut self) -> PPU_TXBUF_HW_W { - PPU_TXBUF_HW_W { w: self } + #[must_use] + pub fn ppu_lna_hw(&mut self) -> PPU_LNA_HW_W<8> { + PPU_LNA_HW_W::new(self) } - #[doc = "Bit 24"] + #[doc = "Bit 9"] #[inline(always)] - pub fn ppu_rxbuf_hw(&mut self) -> PPU_RXBUF_HW_W { - PPU_RXBUF_HW_W { w: self } + #[must_use] + pub fn ppu_rmxgm_hw(&mut self) -> PPU_RMXGM_HW_W<9> { + PPU_RMXGM_HW_W::new(self) } - #[doc = "Bit 23"] + #[doc = "Bit 11"] #[inline(always)] - pub fn ppu_osmx_hw(&mut self) -> PPU_OSMX_HW_W { - PPU_OSMX_HW_W { w: self } + #[must_use] + pub fn ppu_rbb_hw(&mut self) -> PPU_RBB_HW_W<11> { + PPU_RBB_HW_W::new(self) } - #[doc = "Bit 22"] + #[doc = "Bit 20"] #[inline(always)] - pub fn ppu_pfd_hw(&mut self) -> PPU_PFD_HW_W { - PPU_PFD_HW_W { w: self } + #[must_use] + pub fn ppu_vco_hw(&mut self) -> PPU_VCO_HW_W<20> { + PPU_VCO_HW_W::new(self) } #[doc = "Bit 21"] #[inline(always)] - pub fn ppu_fbdv_hw(&mut self) -> PPU_FBDV_HW_W { - PPU_FBDV_HW_W { w: self } + #[must_use] + pub fn ppu_fbdv_hw(&mut self) -> PPU_FBDV_HW_W<21> { + PPU_FBDV_HW_W::new(self) } - #[doc = "Bit 20"] + #[doc = "Bit 22"] #[inline(always)] - pub fn ppu_vco_hw(&mut self) -> PPU_VCO_HW_W { - PPU_VCO_HW_W { w: self } + #[must_use] + pub fn ppu_pfd_hw(&mut self) -> PPU_PFD_HW_W<22> { + PPU_PFD_HW_W::new(self) } - #[doc = "Bit 11"] + #[doc = "Bit 23"] #[inline(always)] - pub fn ppu_rbb_hw(&mut self) -> PPU_RBB_HW_W { - PPU_RBB_HW_W { w: self } + #[must_use] + pub fn ppu_osmx_hw(&mut self) -> PPU_OSMX_HW_W<23> { + PPU_OSMX_HW_W::new(self) } - #[doc = "Bit 9"] + #[doc = "Bit 24"] #[inline(always)] - pub fn ppu_rmxgm_hw(&mut self) -> PPU_RMXGM_HW_W { - PPU_RMXGM_HW_W { w: self } + #[must_use] + pub fn ppu_rxbuf_hw(&mut self) -> PPU_RXBUF_HW_W<24> { + PPU_RXBUF_HW_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bit 25"] #[inline(always)] - pub fn ppu_lna_hw(&mut self) -> PPU_LNA_HW_W { - PPU_LNA_HW_W { w: self } + #[must_use] + pub fn ppu_txbuf_hw(&mut self) -> PPU_TXBUF_HW_W<25> { + PPU_TXBUF_HW_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -467,11 +191,10 @@ impl crate::Readable for PPU_CTRL_HW_SPEC { #[doc = "`write(|w| ..)` method takes [ppu_ctrl_hw::W](W) writer structure"] impl crate::Writable for PPU_CTRL_HW_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ppu_ctrl_hw to value 0"] impl crate::Resettable for PPU_CTRL_HW_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/pucr1.rs b/src/rf/pucr1.rs index 474a063..70b98d5 100644 --- a/src/rf/pucr1.rs +++ b/src/rf/pucr1.rs @@ -7,1139 +7,398 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { - fn from(reader: crate::R) -> Self { - R(reader) - } -} -#[doc = "Register `pucr1` writer"] -pub struct W(crate::W); -impl core::ops::Deref for W { - type Target = crate::W; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -impl core::ops::DerefMut for W { - #[inline(always)] - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } -} -impl core::convert::From> for W { - fn from(writer: crate::W) -> Self { - W(writer) - } -} -#[doc = "Field `pu_tosdac` reader - "] -pub struct PU_TOSDAC_R(crate::FieldReader); -impl PU_TOSDAC_R { - pub(crate) fn new(bits: bool) -> Self { - PU_TOSDAC_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_TOSDAC_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_tosdac` writer - "] -pub struct PU_TOSDAC_W<'a> { - w: &'a mut W, -} -impl<'a> PU_TOSDAC_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 31)) | ((value as u32 & 0x01) << 31); - self.w - } -} -#[doc = "Field `pu_pwrmx` reader - "] -pub struct PU_PWRMX_R(crate::FieldReader); -impl PU_PWRMX_R { - pub(crate) fn new(bits: bool) -> Self { - PU_PWRMX_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_PWRMX_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_pwrmx` writer - "] -pub struct PU_PWRMX_W<'a> { - w: &'a mut W, -} -impl<'a> PU_PWRMX_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 30)) | ((value as u32 & 0x01) << 30); - self.w - } -} -#[doc = "Field `pu_rosdac` reader - "] -pub struct PU_ROSDAC_R(crate::FieldReader); -impl PU_ROSDAC_R { - pub(crate) fn new(bits: bool) -> Self { - PU_ROSDAC_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_ROSDAC_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_rosdac` writer - "] -pub struct PU_ROSDAC_W<'a> { - w: &'a mut W, -} -impl<'a> PU_ROSDAC_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 29)) | ((value as u32 & 0x01) << 29); - self.w - } -} -#[doc = "Field `pu_pkdet` reader - "] -pub struct PU_PKDET_R(crate::FieldReader); -impl PU_PKDET_R { - pub(crate) fn new(bits: bool) -> Self { - PU_PKDET_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_PKDET_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_pkdet` writer - "] -pub struct PU_PKDET_W<'a> { - w: &'a mut W, -} -impl<'a> PU_PKDET_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 28)) | ((value as u32 & 0x01) << 28); - self.w - } -} -#[doc = "Field `trsw_en` reader - "] -pub struct TRSW_EN_R(crate::FieldReader); -impl TRSW_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TRSW_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TRSW_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `trsw_en` writer - "] -pub struct TRSW_EN_W<'a> { - w: &'a mut W, -} -impl<'a> TRSW_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 26)) | ((value as u32 & 0x01) << 26); - self.w - } -} -#[doc = "Field `pu_txbuf` reader - "] -pub struct PU_TXBUF_R(crate::FieldReader); -impl PU_TXBUF_R { - pub(crate) fn new(bits: bool) -> Self { - PU_TXBUF_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_TXBUF_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_txbuf` writer - "] -pub struct PU_TXBUF_W<'a> { - w: &'a mut W, -} -impl<'a> PU_TXBUF_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 25)) | ((value as u32 & 0x01) << 25); - self.w - } -} -#[doc = "Field `pu_rxbuf` reader - "] -pub struct PU_RXBUF_R(crate::FieldReader); -impl PU_RXBUF_R { - pub(crate) fn new(bits: bool) -> Self { - PU_RXBUF_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_RXBUF_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_rxbuf` writer - "] -pub struct PU_RXBUF_W<'a> { - w: &'a mut W, -} -impl<'a> PU_RXBUF_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24); - self.w - } -} -#[doc = "Field `pu_osmx` reader - "] -pub struct PU_OSMX_R(crate::FieldReader); -impl PU_OSMX_R { - pub(crate) fn new(bits: bool) -> Self { - PU_OSMX_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_OSMX_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_osmx` writer - "] -pub struct PU_OSMX_W<'a> { - w: &'a mut W, -} -impl<'a> PU_OSMX_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23); - self.w - } -} -#[doc = "Field `pu_pfd` reader - "] -pub struct PU_PFD_R(crate::FieldReader); -impl PU_PFD_R { - pub(crate) fn new(bits: bool) -> Self { - PU_PFD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_PFD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_pfd` writer - "] -pub struct PU_PFD_W<'a> { - w: &'a mut W, -} -impl<'a> PU_PFD_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 22)) | ((value as u32 & 0x01) << 22); - self.w - } -} -#[doc = "Field `pu_fbdv` reader - "] -pub struct PU_FBDV_R(crate::FieldReader); -impl PU_FBDV_R { - pub(crate) fn new(bits: bool) -> Self { - PU_FBDV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_FBDV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_fbdv` writer - "] -pub struct PU_FBDV_W<'a> { - w: &'a mut W, -} -impl<'a> PU_FBDV_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); - self.w - } -} -#[doc = "Field `pu_vco` reader - "] -pub struct PU_VCO_R(crate::FieldReader); -impl PU_VCO_R { - pub(crate) fn new(bits: bool) -> Self { - PU_VCO_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_VCO_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_vco` writer - "] -pub struct PU_VCO_W<'a> { - w: &'a mut W, -} -impl<'a> PU_VCO_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w - } -} -#[doc = "Field `pu_dac` reader - "] -pub struct PU_DAC_R(crate::FieldReader); -impl PU_DAC_R { - pub(crate) fn new(bits: bool) -> Self { - PU_DAC_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_DAC_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_dac` writer - "] -pub struct PU_DAC_W<'a> { - w: &'a mut W, -} -impl<'a> PU_DAC_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 19)) | ((value as u32 & 0x01) << 19); - self.w - } -} -#[doc = "Field `pu_tbb` reader - "] -pub struct PU_TBB_R(crate::FieldReader); -impl PU_TBB_R { - pub(crate) fn new(bits: bool) -> Self { - PU_TBB_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_TBB_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_tbb` writer - "] -pub struct PU_TBB_W<'a> { - w: &'a mut W, -} -impl<'a> PU_TBB_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18); - self.w - } -} -#[doc = "Field `pu_tmx` reader - "] -pub struct PU_TMX_R(crate::FieldReader); -impl PU_TMX_R { - pub(crate) fn new(bits: bool) -> Self { - PU_TMX_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_TMX_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_tmx` writer - "] -pub struct PU_TMX_W<'a> { - w: &'a mut W, -} -impl<'a> PU_TMX_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w - } -} -#[doc = "Field `pu_pa` reader - "] -pub struct PU_PA_R(crate::FieldReader); -impl PU_PA_R { - pub(crate) fn new(bits: bool) -> Self { - PU_PA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_PA_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_pa` writer - "] -pub struct PU_PA_W<'a> { - w: &'a mut W, -} -impl<'a> PU_PA_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `pu_op_atest` reader - "] -pub struct PU_OP_ATEST_R(crate::FieldReader); -impl PU_OP_ATEST_R { - pub(crate) fn new(bits: bool) -> Self { - PU_OP_ATEST_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_OP_ATEST_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_op_atest` writer - "] -pub struct PU_OP_ATEST_W<'a> { - w: &'a mut W, -} -impl<'a> PU_OP_ATEST_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15); - self.w - } -} -#[doc = "Field `pu_adc` reader - "] -pub struct PU_ADC_R(crate::FieldReader); -impl PU_ADC_R { - pub(crate) fn new(bits: bool) -> Self { - PU_ADC_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_ADC_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_adc` writer - "] -pub struct PU_ADC_W<'a> { - w: &'a mut W, -} -impl<'a> PU_ADC_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14); - self.w - } -} -#[doc = "Field `adc_clk_en` reader - "] -pub struct ADC_CLK_EN_R(crate::FieldReader); -impl ADC_CLK_EN_R { - pub(crate) fn new(bits: bool) -> Self { - ADC_CLK_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ADC_CLK_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `adc_clk_en` writer - "] -pub struct ADC_CLK_EN_W<'a> { - w: &'a mut W, -} -impl<'a> ADC_CLK_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13); - self.w - } -} -#[doc = "Field `pu_adda_ldo` reader - "] -pub struct PU_ADDA_LDO_R(crate::FieldReader); -impl PU_ADDA_LDO_R { - pub(crate) fn new(bits: bool) -> Self { - PU_ADDA_LDO_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_ADDA_LDO_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_adda_ldo` writer - "] -pub struct PU_ADDA_LDO_W<'a> { - w: &'a mut W, -} -impl<'a> PU_ADDA_LDO_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} -#[doc = "Field `pu_rbb` reader - "] -pub struct PU_RBB_R(crate::FieldReader); -impl PU_RBB_R { - pub(crate) fn new(bits: bool) -> Self { - PU_RBB_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_RBB_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_rbb` writer - "] -pub struct PU_RBB_W<'a> { - w: &'a mut W, -} -impl<'a> PU_RBB_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w - } -} -#[doc = "Field `pu_rmx` reader - "] -pub struct PU_RMX_R(crate::FieldReader); -impl PU_RMX_R { - pub(crate) fn new(bits: bool) -> Self { - PU_RMX_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_RMX_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_rmx` writer - "] -pub struct PU_RMX_W<'a> { - w: &'a mut W, -} -impl<'a> PU_RMX_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +impl From> for R { #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); - self.w - } -} -#[doc = "Field `pu_rmxgm` reader - "] -pub struct PU_RMXGM_R(crate::FieldReader); -impl PU_RMXGM_R { - pub(crate) fn new(bits: bool) -> Self { - PU_RMXGM_R(crate::FieldReader::new(bits)) + fn from(reader: crate::R) -> Self { + R(reader) } } -impl core::ops::Deref for PU_RMXGM_R { - type Target = crate::FieldReader; +#[doc = "Register `pucr1` writer"] +pub struct W(crate::W); +impl core::ops::Deref for W { + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } -#[doc = "Field `pu_rmxgm` writer - "] -pub struct PU_RMXGM_W<'a> { - w: &'a mut W, -} -impl<'a> PU_RMXGM_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w - } -} -#[doc = "Field `pu_lna` reader - "] -pub struct PU_LNA_R(crate::FieldReader); -impl PU_LNA_R { - pub(crate) fn new(bits: bool) -> Self { - PU_LNA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_LNA_R { - type Target = crate::FieldReader; +impl core::ops::DerefMut for W { #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 } } -#[doc = "Field `pu_lna` writer - "] -pub struct PU_LNA_W<'a> { - w: &'a mut W, -} -impl<'a> PU_LNA_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +impl From> for W { #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w + fn from(writer: crate::W) -> Self { + W(writer) } } #[doc = "Field `pu_sfreg` reader - "] -pub struct PU_SFREG_R(crate::FieldReader); -impl PU_SFREG_R { - pub(crate) fn new(bits: bool) -> Self { - PU_SFREG_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_SFREG_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PU_SFREG_R = crate::BitReader; #[doc = "Field `pu_sfreg` writer - "] -pub struct PU_SFREG_W<'a> { - w: &'a mut W, -} -impl<'a> PU_SFREG_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type PU_SFREG_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_SPEC, bool, O>; +#[doc = "Field `pu_lna` reader - "] +pub type PU_LNA_R = crate::BitReader; +#[doc = "Field `pu_lna` writer - "] +pub type PU_LNA_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_SPEC, bool, O>; +#[doc = "Field `pu_rmxgm` reader - "] +pub type PU_RMXGM_R = crate::BitReader; +#[doc = "Field `pu_rmxgm` writer - "] +pub type PU_RMXGM_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_SPEC, bool, O>; +#[doc = "Field `pu_rmx` reader - "] +pub type PU_RMX_R = crate::BitReader; +#[doc = "Field `pu_rmx` writer - "] +pub type PU_RMX_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_SPEC, bool, O>; +#[doc = "Field `pu_rbb` reader - "] +pub type PU_RBB_R = crate::BitReader; +#[doc = "Field `pu_rbb` writer - "] +pub type PU_RBB_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_SPEC, bool, O>; +#[doc = "Field `pu_adda_ldo` reader - "] +pub type PU_ADDA_LDO_R = crate::BitReader; +#[doc = "Field `pu_adda_ldo` writer - "] +pub type PU_ADDA_LDO_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_SPEC, bool, O>; +#[doc = "Field `adc_clk_en` reader - "] +pub type ADC_CLK_EN_R = crate::BitReader; +#[doc = "Field `adc_clk_en` writer - "] +pub type ADC_CLK_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_SPEC, bool, O>; +#[doc = "Field `pu_adc` reader - "] +pub type PU_ADC_R = crate::BitReader; +#[doc = "Field `pu_adc` writer - "] +pub type PU_ADC_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_SPEC, bool, O>; +#[doc = "Field `pu_op_atest` reader - "] +pub type PU_OP_ATEST_R = crate::BitReader; +#[doc = "Field `pu_op_atest` writer - "] +pub type PU_OP_ATEST_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_SPEC, bool, O>; +#[doc = "Field `pu_pa` reader - "] +pub type PU_PA_R = crate::BitReader; +#[doc = "Field `pu_pa` writer - "] +pub type PU_PA_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_SPEC, bool, O>; +#[doc = "Field `pu_tmx` reader - "] +pub type PU_TMX_R = crate::BitReader; +#[doc = "Field `pu_tmx` writer - "] +pub type PU_TMX_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_SPEC, bool, O>; +#[doc = "Field `pu_tbb` reader - "] +pub type PU_TBB_R = crate::BitReader; +#[doc = "Field `pu_tbb` writer - "] +pub type PU_TBB_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_SPEC, bool, O>; +#[doc = "Field `pu_dac` reader - "] +pub type PU_DAC_R = crate::BitReader; +#[doc = "Field `pu_dac` writer - "] +pub type PU_DAC_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_SPEC, bool, O>; +#[doc = "Field `pu_vco` reader - "] +pub type PU_VCO_R = crate::BitReader; +#[doc = "Field `pu_vco` writer - "] +pub type PU_VCO_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_SPEC, bool, O>; +#[doc = "Field `pu_fbdv` reader - "] +pub type PU_FBDV_R = crate::BitReader; +#[doc = "Field `pu_fbdv` writer - "] +pub type PU_FBDV_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_SPEC, bool, O>; +#[doc = "Field `pu_pfd` reader - "] +pub type PU_PFD_R = crate::BitReader; +#[doc = "Field `pu_pfd` writer - "] +pub type PU_PFD_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_SPEC, bool, O>; +#[doc = "Field `pu_osmx` reader - "] +pub type PU_OSMX_R = crate::BitReader; +#[doc = "Field `pu_osmx` writer - "] +pub type PU_OSMX_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_SPEC, bool, O>; +#[doc = "Field `pu_rxbuf` reader - "] +pub type PU_RXBUF_R = crate::BitReader; +#[doc = "Field `pu_rxbuf` writer - "] +pub type PU_RXBUF_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_SPEC, bool, O>; +#[doc = "Field `pu_txbuf` reader - "] +pub type PU_TXBUF_R = crate::BitReader; +#[doc = "Field `pu_txbuf` writer - "] +pub type PU_TXBUF_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_SPEC, bool, O>; +#[doc = "Field `trsw_en` reader - "] +pub type TRSW_EN_R = crate::BitReader; +#[doc = "Field `trsw_en` writer - "] +pub type TRSW_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_SPEC, bool, O>; +#[doc = "Field `pu_pkdet` reader - "] +pub type PU_PKDET_R = crate::BitReader; +#[doc = "Field `pu_pkdet` writer - "] +pub type PU_PKDET_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_SPEC, bool, O>; +#[doc = "Field `pu_rosdac` reader - "] +pub type PU_ROSDAC_R = crate::BitReader; +#[doc = "Field `pu_rosdac` writer - "] +pub type PU_ROSDAC_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_SPEC, bool, O>; +#[doc = "Field `pu_pwrmx` reader - "] +pub type PU_PWRMX_R = crate::BitReader; +#[doc = "Field `pu_pwrmx` writer - "] +pub type PU_PWRMX_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_SPEC, bool, O>; +#[doc = "Field `pu_tosdac` reader - "] +pub type PU_TOSDAC_R = crate::BitReader; +#[doc = "Field `pu_tosdac` writer - "] +pub type PU_TOSDAC_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_SPEC, bool, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn pu_sfreg(&self) -> PU_SFREG_R { + PU_SFREG_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bit 31"] + #[doc = "Bit 8"] #[inline(always)] - pub fn pu_tosdac(&self) -> PU_TOSDAC_R { - PU_TOSDAC_R::new(((self.bits >> 31) & 0x01) != 0) + pub fn pu_lna(&self) -> PU_LNA_R { + PU_LNA_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bit 30"] + #[doc = "Bit 9"] #[inline(always)] - pub fn pu_pwrmx(&self) -> PU_PWRMX_R { - PU_PWRMX_R::new(((self.bits >> 30) & 0x01) != 0) + pub fn pu_rmxgm(&self) -> PU_RMXGM_R { + PU_RMXGM_R::new(((self.bits >> 9) & 1) != 0) } - #[doc = "Bit 29"] + #[doc = "Bit 10"] #[inline(always)] - pub fn pu_rosdac(&self) -> PU_ROSDAC_R { - PU_ROSDAC_R::new(((self.bits >> 29) & 0x01) != 0) + pub fn pu_rmx(&self) -> PU_RMX_R { + PU_RMX_R::new(((self.bits >> 10) & 1) != 0) } - #[doc = "Bit 28"] + #[doc = "Bit 11"] #[inline(always)] - pub fn pu_pkdet(&self) -> PU_PKDET_R { - PU_PKDET_R::new(((self.bits >> 28) & 0x01) != 0) + pub fn pu_rbb(&self) -> PU_RBB_R { + PU_RBB_R::new(((self.bits >> 11) & 1) != 0) } - #[doc = "Bit 26"] + #[doc = "Bit 12"] #[inline(always)] - pub fn trsw_en(&self) -> TRSW_EN_R { - TRSW_EN_R::new(((self.bits >> 26) & 0x01) != 0) + pub fn pu_adda_ldo(&self) -> PU_ADDA_LDO_R { + PU_ADDA_LDO_R::new(((self.bits >> 12) & 1) != 0) } - #[doc = "Bit 25"] + #[doc = "Bit 13"] #[inline(always)] - pub fn pu_txbuf(&self) -> PU_TXBUF_R { - PU_TXBUF_R::new(((self.bits >> 25) & 0x01) != 0) + pub fn adc_clk_en(&self) -> ADC_CLK_EN_R { + ADC_CLK_EN_R::new(((self.bits >> 13) & 1) != 0) } - #[doc = "Bit 24"] + #[doc = "Bit 14"] #[inline(always)] - pub fn pu_rxbuf(&self) -> PU_RXBUF_R { - PU_RXBUF_R::new(((self.bits >> 24) & 0x01) != 0) + pub fn pu_adc(&self) -> PU_ADC_R { + PU_ADC_R::new(((self.bits >> 14) & 1) != 0) } - #[doc = "Bit 23"] + #[doc = "Bit 15"] #[inline(always)] - pub fn pu_osmx(&self) -> PU_OSMX_R { - PU_OSMX_R::new(((self.bits >> 23) & 0x01) != 0) + pub fn pu_op_atest(&self) -> PU_OP_ATEST_R { + PU_OP_ATEST_R::new(((self.bits >> 15) & 1) != 0) } - #[doc = "Bit 22"] + #[doc = "Bit 16"] #[inline(always)] - pub fn pu_pfd(&self) -> PU_PFD_R { - PU_PFD_R::new(((self.bits >> 22) & 0x01) != 0) + pub fn pu_pa(&self) -> PU_PA_R { + PU_PA_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 21"] + #[doc = "Bit 17"] #[inline(always)] - pub fn pu_fbdv(&self) -> PU_FBDV_R { - PU_FBDV_R::new(((self.bits >> 21) & 0x01) != 0) + pub fn pu_tmx(&self) -> PU_TMX_R { + PU_TMX_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bit 20"] + #[doc = "Bit 18"] #[inline(always)] - pub fn pu_vco(&self) -> PU_VCO_R { - PU_VCO_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn pu_tbb(&self) -> PU_TBB_R { + PU_TBB_R::new(((self.bits >> 18) & 1) != 0) } #[doc = "Bit 19"] #[inline(always)] pub fn pu_dac(&self) -> PU_DAC_R { - PU_DAC_R::new(((self.bits >> 19) & 0x01) != 0) - } - #[doc = "Bit 18"] - #[inline(always)] - pub fn pu_tbb(&self) -> PU_TBB_R { - PU_TBB_R::new(((self.bits >> 18) & 0x01) != 0) + PU_DAC_R::new(((self.bits >> 19) & 1) != 0) } - #[doc = "Bit 17"] + #[doc = "Bit 20"] #[inline(always)] - pub fn pu_tmx(&self) -> PU_TMX_R { - PU_TMX_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn pu_vco(&self) -> PU_VCO_R { + PU_VCO_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bit 16"] + #[doc = "Bit 21"] #[inline(always)] - pub fn pu_pa(&self) -> PU_PA_R { - PU_PA_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn pu_fbdv(&self) -> PU_FBDV_R { + PU_FBDV_R::new(((self.bits >> 21) & 1) != 0) } - #[doc = "Bit 15"] + #[doc = "Bit 22"] #[inline(always)] - pub fn pu_op_atest(&self) -> PU_OP_ATEST_R { - PU_OP_ATEST_R::new(((self.bits >> 15) & 0x01) != 0) + pub fn pu_pfd(&self) -> PU_PFD_R { + PU_PFD_R::new(((self.bits >> 22) & 1) != 0) } - #[doc = "Bit 14"] + #[doc = "Bit 23"] #[inline(always)] - pub fn pu_adc(&self) -> PU_ADC_R { - PU_ADC_R::new(((self.bits >> 14) & 0x01) != 0) + pub fn pu_osmx(&self) -> PU_OSMX_R { + PU_OSMX_R::new(((self.bits >> 23) & 1) != 0) } - #[doc = "Bit 13"] + #[doc = "Bit 24"] #[inline(always)] - pub fn adc_clk_en(&self) -> ADC_CLK_EN_R { - ADC_CLK_EN_R::new(((self.bits >> 13) & 0x01) != 0) + pub fn pu_rxbuf(&self) -> PU_RXBUF_R { + PU_RXBUF_R::new(((self.bits >> 24) & 1) != 0) } - #[doc = "Bit 12"] + #[doc = "Bit 25"] #[inline(always)] - pub fn pu_adda_ldo(&self) -> PU_ADDA_LDO_R { - PU_ADDA_LDO_R::new(((self.bits >> 12) & 0x01) != 0) + pub fn pu_txbuf(&self) -> PU_TXBUF_R { + PU_TXBUF_R::new(((self.bits >> 25) & 1) != 0) } - #[doc = "Bit 11"] + #[doc = "Bit 26"] #[inline(always)] - pub fn pu_rbb(&self) -> PU_RBB_R { - PU_RBB_R::new(((self.bits >> 11) & 0x01) != 0) + pub fn trsw_en(&self) -> TRSW_EN_R { + TRSW_EN_R::new(((self.bits >> 26) & 1) != 0) } - #[doc = "Bit 10"] + #[doc = "Bit 28"] #[inline(always)] - pub fn pu_rmx(&self) -> PU_RMX_R { - PU_RMX_R::new(((self.bits >> 10) & 0x01) != 0) + pub fn pu_pkdet(&self) -> PU_PKDET_R { + PU_PKDET_R::new(((self.bits >> 28) & 1) != 0) } - #[doc = "Bit 9"] + #[doc = "Bit 29"] #[inline(always)] - pub fn pu_rmxgm(&self) -> PU_RMXGM_R { - PU_RMXGM_R::new(((self.bits >> 9) & 0x01) != 0) + pub fn pu_rosdac(&self) -> PU_ROSDAC_R { + PU_ROSDAC_R::new(((self.bits >> 29) & 1) != 0) } - #[doc = "Bit 8"] + #[doc = "Bit 30"] #[inline(always)] - pub fn pu_lna(&self) -> PU_LNA_R { - PU_LNA_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn pu_pwrmx(&self) -> PU_PWRMX_R { + PU_PWRMX_R::new(((self.bits >> 30) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 31"] #[inline(always)] - pub fn pu_sfreg(&self) -> PU_SFREG_R { - PU_SFREG_R::new((self.bits & 0x01) != 0) + pub fn pu_tosdac(&self) -> PU_TOSDAC_R { + PU_TOSDAC_R::new(((self.bits >> 31) & 1) != 0) } } impl W { - #[doc = "Bit 31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn pu_tosdac(&mut self) -> PU_TOSDAC_W { - PU_TOSDAC_W { w: self } + #[must_use] + pub fn pu_sfreg(&mut self) -> PU_SFREG_W<0> { + PU_SFREG_W::new(self) } - #[doc = "Bit 30"] + #[doc = "Bit 8"] #[inline(always)] - pub fn pu_pwrmx(&mut self) -> PU_PWRMX_W { - PU_PWRMX_W { w: self } + #[must_use] + pub fn pu_lna(&mut self) -> PU_LNA_W<8> { + PU_LNA_W::new(self) } - #[doc = "Bit 29"] + #[doc = "Bit 9"] #[inline(always)] - pub fn pu_rosdac(&mut self) -> PU_ROSDAC_W { - PU_ROSDAC_W { w: self } + #[must_use] + pub fn pu_rmxgm(&mut self) -> PU_RMXGM_W<9> { + PU_RMXGM_W::new(self) } - #[doc = "Bit 28"] + #[doc = "Bit 10"] #[inline(always)] - pub fn pu_pkdet(&mut self) -> PU_PKDET_W { - PU_PKDET_W { w: self } + #[must_use] + pub fn pu_rmx(&mut self) -> PU_RMX_W<10> { + PU_RMX_W::new(self) } - #[doc = "Bit 26"] + #[doc = "Bit 11"] #[inline(always)] - pub fn trsw_en(&mut self) -> TRSW_EN_W { - TRSW_EN_W { w: self } + #[must_use] + pub fn pu_rbb(&mut self) -> PU_RBB_W<11> { + PU_RBB_W::new(self) } - #[doc = "Bit 25"] + #[doc = "Bit 12"] #[inline(always)] - pub fn pu_txbuf(&mut self) -> PU_TXBUF_W { - PU_TXBUF_W { w: self } + #[must_use] + pub fn pu_adda_ldo(&mut self) -> PU_ADDA_LDO_W<12> { + PU_ADDA_LDO_W::new(self) } - #[doc = "Bit 24"] + #[doc = "Bit 13"] #[inline(always)] - pub fn pu_rxbuf(&mut self) -> PU_RXBUF_W { - PU_RXBUF_W { w: self } + #[must_use] + pub fn adc_clk_en(&mut self) -> ADC_CLK_EN_W<13> { + ADC_CLK_EN_W::new(self) } - #[doc = "Bit 23"] + #[doc = "Bit 14"] #[inline(always)] - pub fn pu_osmx(&mut self) -> PU_OSMX_W { - PU_OSMX_W { w: self } + #[must_use] + pub fn pu_adc(&mut self) -> PU_ADC_W<14> { + PU_ADC_W::new(self) } - #[doc = "Bit 22"] + #[doc = "Bit 15"] #[inline(always)] - pub fn pu_pfd(&mut self) -> PU_PFD_W { - PU_PFD_W { w: self } + #[must_use] + pub fn pu_op_atest(&mut self) -> PU_OP_ATEST_W<15> { + PU_OP_ATEST_W::new(self) } - #[doc = "Bit 21"] + #[doc = "Bit 16"] #[inline(always)] - pub fn pu_fbdv(&mut self) -> PU_FBDV_W { - PU_FBDV_W { w: self } + #[must_use] + pub fn pu_pa(&mut self) -> PU_PA_W<16> { + PU_PA_W::new(self) } - #[doc = "Bit 20"] + #[doc = "Bit 17"] #[inline(always)] - pub fn pu_vco(&mut self) -> PU_VCO_W { - PU_VCO_W { w: self } + #[must_use] + pub fn pu_tmx(&mut self) -> PU_TMX_W<17> { + PU_TMX_W::new(self) } - #[doc = "Bit 19"] + #[doc = "Bit 18"] #[inline(always)] - pub fn pu_dac(&mut self) -> PU_DAC_W { - PU_DAC_W { w: self } + #[must_use] + pub fn pu_tbb(&mut self) -> PU_TBB_W<18> { + PU_TBB_W::new(self) } - #[doc = "Bit 18"] + #[doc = "Bit 19"] #[inline(always)] - pub fn pu_tbb(&mut self) -> PU_TBB_W { - PU_TBB_W { w: self } + #[must_use] + pub fn pu_dac(&mut self) -> PU_DAC_W<19> { + PU_DAC_W::new(self) } - #[doc = "Bit 17"] + #[doc = "Bit 20"] #[inline(always)] - pub fn pu_tmx(&mut self) -> PU_TMX_W { - PU_TMX_W { w: self } + #[must_use] + pub fn pu_vco(&mut self) -> PU_VCO_W<20> { + PU_VCO_W::new(self) } - #[doc = "Bit 16"] + #[doc = "Bit 21"] #[inline(always)] - pub fn pu_pa(&mut self) -> PU_PA_W { - PU_PA_W { w: self } + #[must_use] + pub fn pu_fbdv(&mut self) -> PU_FBDV_W<21> { + PU_FBDV_W::new(self) } - #[doc = "Bit 15"] + #[doc = "Bit 22"] #[inline(always)] - pub fn pu_op_atest(&mut self) -> PU_OP_ATEST_W { - PU_OP_ATEST_W { w: self } + #[must_use] + pub fn pu_pfd(&mut self) -> PU_PFD_W<22> { + PU_PFD_W::new(self) } - #[doc = "Bit 14"] + #[doc = "Bit 23"] #[inline(always)] - pub fn pu_adc(&mut self) -> PU_ADC_W { - PU_ADC_W { w: self } + #[must_use] + pub fn pu_osmx(&mut self) -> PU_OSMX_W<23> { + PU_OSMX_W::new(self) } - #[doc = "Bit 13"] + #[doc = "Bit 24"] #[inline(always)] - pub fn adc_clk_en(&mut self) -> ADC_CLK_EN_W { - ADC_CLK_EN_W { w: self } + #[must_use] + pub fn pu_rxbuf(&mut self) -> PU_RXBUF_W<24> { + PU_RXBUF_W::new(self) } - #[doc = "Bit 12"] + #[doc = "Bit 25"] #[inline(always)] - pub fn pu_adda_ldo(&mut self) -> PU_ADDA_LDO_W { - PU_ADDA_LDO_W { w: self } + #[must_use] + pub fn pu_txbuf(&mut self) -> PU_TXBUF_W<25> { + PU_TXBUF_W::new(self) } - #[doc = "Bit 11"] + #[doc = "Bit 26"] #[inline(always)] - pub fn pu_rbb(&mut self) -> PU_RBB_W { - PU_RBB_W { w: self } + #[must_use] + pub fn trsw_en(&mut self) -> TRSW_EN_W<26> { + TRSW_EN_W::new(self) } - #[doc = "Bit 10"] + #[doc = "Bit 28"] #[inline(always)] - pub fn pu_rmx(&mut self) -> PU_RMX_W { - PU_RMX_W { w: self } + #[must_use] + pub fn pu_pkdet(&mut self) -> PU_PKDET_W<28> { + PU_PKDET_W::new(self) } - #[doc = "Bit 9"] + #[doc = "Bit 29"] #[inline(always)] - pub fn pu_rmxgm(&mut self) -> PU_RMXGM_W { - PU_RMXGM_W { w: self } + #[must_use] + pub fn pu_rosdac(&mut self) -> PU_ROSDAC_W<29> { + PU_ROSDAC_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bit 30"] #[inline(always)] - pub fn pu_lna(&mut self) -> PU_LNA_W { - PU_LNA_W { w: self } + #[must_use] + pub fn pu_pwrmx(&mut self) -> PU_PWRMX_W<30> { + PU_PWRMX_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 31"] #[inline(always)] - pub fn pu_sfreg(&mut self) -> PU_SFREG_W { - PU_SFREG_W { w: self } + #[must_use] + pub fn pu_tosdac(&mut self) -> PU_TOSDAC_W<31> { + PU_TOSDAC_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -1157,11 +416,10 @@ impl crate::Readable for PUCR1_SPEC { #[doc = "`write(|w| ..)` method takes [pucr1::W](W) writer structure"] impl crate::Writable for PUCR1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pucr1 to value 0"] impl crate::Resettable for PUCR1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/pucr1_hw.rs b/src/rf/pucr1_hw.rs index 01cd7d3..299f7b3 100644 --- a/src/rf/pucr1_hw.rs +++ b/src/rf/pucr1_hw.rs @@ -7,1047 +7,368 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { - fn from(reader: crate::R) -> Self { - R(reader) - } -} -#[doc = "Register `pucr1_hw` writer"] -pub struct W(crate::W); -impl core::ops::Deref for W { - type Target = crate::W; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -impl core::ops::DerefMut for W { - #[inline(always)] - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } -} -impl core::convert::From> for W { - fn from(writer: crate::W) -> Self { - W(writer) - } -} -#[doc = "Field `pu_tosdac_hw` reader - "] -pub struct PU_TOSDAC_HW_R(crate::FieldReader); -impl PU_TOSDAC_HW_R { - pub(crate) fn new(bits: bool) -> Self { - PU_TOSDAC_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_TOSDAC_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_tosdac_hw` writer - "] -pub struct PU_TOSDAC_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PU_TOSDAC_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 31)) | ((value as u32 & 0x01) << 31); - self.w - } -} -#[doc = "Field `pu_rosdac_hw` reader - "] -pub struct PU_ROSDAC_HW_R(crate::FieldReader); -impl PU_ROSDAC_HW_R { - pub(crate) fn new(bits: bool) -> Self { - PU_ROSDAC_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_ROSDAC_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_rosdac_hw` writer - "] -pub struct PU_ROSDAC_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PU_ROSDAC_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 29)) | ((value as u32 & 0x01) << 29); - self.w - } -} -#[doc = "Field `pu_pkdet_hw` reader - "] -pub struct PU_PKDET_HW_R(crate::FieldReader); -impl PU_PKDET_HW_R { - pub(crate) fn new(bits: bool) -> Self { - PU_PKDET_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_PKDET_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_pkdet_hw` writer - "] -pub struct PU_PKDET_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PU_PKDET_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 28)) | ((value as u32 & 0x01) << 28); - self.w - } -} -#[doc = "Field `trsw_en_hw` reader - "] -pub struct TRSW_EN_HW_R(crate::FieldReader); -impl TRSW_EN_HW_R { - pub(crate) fn new(bits: bool) -> Self { - TRSW_EN_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TRSW_EN_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `trsw_en_hw` writer - "] -pub struct TRSW_EN_HW_W<'a> { - w: &'a mut W, -} -impl<'a> TRSW_EN_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 26)) | ((value as u32 & 0x01) << 26); - self.w - } -} -#[doc = "Field `pu_txbuf_hw` reader - "] -pub struct PU_TXBUF_HW_R(crate::FieldReader); -impl PU_TXBUF_HW_R { - pub(crate) fn new(bits: bool) -> Self { - PU_TXBUF_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_TXBUF_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_txbuf_hw` writer - "] -pub struct PU_TXBUF_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PU_TXBUF_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 25)) | ((value as u32 & 0x01) << 25); - self.w - } -} -#[doc = "Field `pu_rxbuf_hw` reader - "] -pub struct PU_RXBUF_HW_R(crate::FieldReader); -impl PU_RXBUF_HW_R { - pub(crate) fn new(bits: bool) -> Self { - PU_RXBUF_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_RXBUF_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_rxbuf_hw` writer - "] -pub struct PU_RXBUF_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PU_RXBUF_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24); - self.w - } -} -#[doc = "Field `pu_osmx_hw` reader - "] -pub struct PU_OSMX_HW_R(crate::FieldReader); -impl PU_OSMX_HW_R { - pub(crate) fn new(bits: bool) -> Self { - PU_OSMX_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_OSMX_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_osmx_hw` writer - "] -pub struct PU_OSMX_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PU_OSMX_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23); - self.w - } -} -#[doc = "Field `pu_pfd_hw` reader - "] -pub struct PU_PFD_HW_R(crate::FieldReader); -impl PU_PFD_HW_R { - pub(crate) fn new(bits: bool) -> Self { - PU_PFD_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_PFD_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_pfd_hw` writer - "] -pub struct PU_PFD_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PU_PFD_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 22)) | ((value as u32 & 0x01) << 22); - self.w - } -} -#[doc = "Field `pu_fbdv_hw` reader - "] -pub struct PU_FBDV_HW_R(crate::FieldReader); -impl PU_FBDV_HW_R { - pub(crate) fn new(bits: bool) -> Self { - PU_FBDV_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_FBDV_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_fbdv_hw` writer - "] -pub struct PU_FBDV_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PU_FBDV_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); - self.w - } -} -#[doc = "Field `pu_vco_hw` reader - "] -pub struct PU_VCO_HW_R(crate::FieldReader); -impl PU_VCO_HW_R { - pub(crate) fn new(bits: bool) -> Self { - PU_VCO_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_VCO_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_vco_hw` writer - "] -pub struct PU_VCO_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PU_VCO_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w - } -} -#[doc = "Field `pu_dac_hw` reader - "] -pub struct PU_DAC_HW_R(crate::FieldReader); -impl PU_DAC_HW_R { - pub(crate) fn new(bits: bool) -> Self { - PU_DAC_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_DAC_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_dac_hw` writer - "] -pub struct PU_DAC_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PU_DAC_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 19)) | ((value as u32 & 0x01) << 19); - self.w - } -} -#[doc = "Field `pu_tbb_hw` reader - "] -pub struct PU_TBB_HW_R(crate::FieldReader); -impl PU_TBB_HW_R { - pub(crate) fn new(bits: bool) -> Self { - PU_TBB_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_TBB_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_tbb_hw` writer - "] -pub struct PU_TBB_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PU_TBB_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18); - self.w - } -} -#[doc = "Field `pu_tmx_hw` reader - "] -pub struct PU_TMX_HW_R(crate::FieldReader); -impl PU_TMX_HW_R { - pub(crate) fn new(bits: bool) -> Self { - PU_TMX_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_TMX_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_tmx_hw` writer - "] -pub struct PU_TMX_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PU_TMX_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w - } -} -#[doc = "Field `pu_pa_hw` reader - "] -pub struct PU_PA_HW_R(crate::FieldReader); -impl PU_PA_HW_R { - pub(crate) fn new(bits: bool) -> Self { - PU_PA_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_PA_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_pa_hw` writer - "] -pub struct PU_PA_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PU_PA_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `pu_adc_hw` reader - "] -pub struct PU_ADC_HW_R(crate::FieldReader); -impl PU_ADC_HW_R { - pub(crate) fn new(bits: bool) -> Self { - PU_ADC_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_ADC_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_adc_hw` writer - "] -pub struct PU_ADC_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PU_ADC_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14); - self.w - } -} -#[doc = "Field `adc_clk_en_hw` reader - "] -pub struct ADC_CLK_EN_HW_R(crate::FieldReader); -impl ADC_CLK_EN_HW_R { - pub(crate) fn new(bits: bool) -> Self { - ADC_CLK_EN_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ADC_CLK_EN_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `adc_clk_en_hw` writer - "] -pub struct ADC_CLK_EN_HW_W<'a> { - w: &'a mut W, -} -impl<'a> ADC_CLK_EN_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13); - self.w - } -} -#[doc = "Field `pu_adda_ldo_hw` reader - "] -pub struct PU_ADDA_LDO_HW_R(crate::FieldReader); -impl PU_ADDA_LDO_HW_R { - pub(crate) fn new(bits: bool) -> Self { - PU_ADDA_LDO_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_ADDA_LDO_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_adda_ldo_hw` writer - "] -pub struct PU_ADDA_LDO_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PU_ADDA_LDO_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} -#[doc = "Field `pu_rbb_hw` reader - "] -pub struct PU_RBB_HW_R(crate::FieldReader); -impl PU_RBB_HW_R { - pub(crate) fn new(bits: bool) -> Self { - PU_RBB_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_RBB_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_rbb_hw` writer - "] -pub struct PU_RBB_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PU_RBB_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w - } -} -#[doc = "Field `pu_rmx_hw` reader - "] -pub struct PU_RMX_HW_R(crate::FieldReader); -impl PU_RMX_HW_R { - pub(crate) fn new(bits: bool) -> Self { - PU_RMX_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_RMX_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pu_rmx_hw` writer - "] -pub struct PU_RMX_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PU_RMX_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +impl From> for R { #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); - self.w - } -} -#[doc = "Field `pu_rmxgm_hw` reader - "] -pub struct PU_RMXGM_HW_R(crate::FieldReader); -impl PU_RMXGM_HW_R { - pub(crate) fn new(bits: bool) -> Self { - PU_RMXGM_HW_R(crate::FieldReader::new(bits)) + fn from(reader: crate::R) -> Self { + R(reader) } } -impl core::ops::Deref for PU_RMXGM_HW_R { - type Target = crate::FieldReader; +#[doc = "Register `pucr1_hw` writer"] +pub struct W(crate::W); +impl core::ops::Deref for W { + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } -#[doc = "Field `pu_rmxgm_hw` writer - "] -pub struct PU_RMXGM_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PU_RMXGM_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w - } -} -#[doc = "Field `pu_lna_hw` reader - "] -pub struct PU_LNA_HW_R(crate::FieldReader); -impl PU_LNA_HW_R { - pub(crate) fn new(bits: bool) -> Self { - PU_LNA_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_LNA_HW_R { - type Target = crate::FieldReader; +impl core::ops::DerefMut for W { #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 } } -#[doc = "Field `pu_lna_hw` writer - "] -pub struct PU_LNA_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PU_LNA_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +impl From> for W { #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w + fn from(writer: crate::W) -> Self { + W(writer) } } #[doc = "Field `pu_sfreg_hw` reader - "] -pub struct PU_SFREG_HW_R(crate::FieldReader); -impl PU_SFREG_HW_R { - pub(crate) fn new(bits: bool) -> Self { - PU_SFREG_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_SFREG_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PU_SFREG_HW_R = crate::BitReader; #[doc = "Field `pu_sfreg_hw` writer - "] -pub struct PU_SFREG_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PU_SFREG_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type PU_SFREG_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>; +#[doc = "Field `pu_lna_hw` reader - "] +pub type PU_LNA_HW_R = crate::BitReader; +#[doc = "Field `pu_lna_hw` writer - "] +pub type PU_LNA_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>; +#[doc = "Field `pu_rmxgm_hw` reader - "] +pub type PU_RMXGM_HW_R = crate::BitReader; +#[doc = "Field `pu_rmxgm_hw` writer - "] +pub type PU_RMXGM_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>; +#[doc = "Field `pu_rmx_hw` reader - "] +pub type PU_RMX_HW_R = crate::BitReader; +#[doc = "Field `pu_rmx_hw` writer - "] +pub type PU_RMX_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>; +#[doc = "Field `pu_rbb_hw` reader - "] +pub type PU_RBB_HW_R = crate::BitReader; +#[doc = "Field `pu_rbb_hw` writer - "] +pub type PU_RBB_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>; +#[doc = "Field `pu_adda_ldo_hw` reader - "] +pub type PU_ADDA_LDO_HW_R = crate::BitReader; +#[doc = "Field `pu_adda_ldo_hw` writer - "] +pub type PU_ADDA_LDO_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>; +#[doc = "Field `adc_clk_en_hw` reader - "] +pub type ADC_CLK_EN_HW_R = crate::BitReader; +#[doc = "Field `adc_clk_en_hw` writer - "] +pub type ADC_CLK_EN_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>; +#[doc = "Field `pu_adc_hw` reader - "] +pub type PU_ADC_HW_R = crate::BitReader; +#[doc = "Field `pu_adc_hw` writer - "] +pub type PU_ADC_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>; +#[doc = "Field `pu_pa_hw` reader - "] +pub type PU_PA_HW_R = crate::BitReader; +#[doc = "Field `pu_pa_hw` writer - "] +pub type PU_PA_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>; +#[doc = "Field `pu_tmx_hw` reader - "] +pub type PU_TMX_HW_R = crate::BitReader; +#[doc = "Field `pu_tmx_hw` writer - "] +pub type PU_TMX_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>; +#[doc = "Field `pu_tbb_hw` reader - "] +pub type PU_TBB_HW_R = crate::BitReader; +#[doc = "Field `pu_tbb_hw` writer - "] +pub type PU_TBB_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>; +#[doc = "Field `pu_dac_hw` reader - "] +pub type PU_DAC_HW_R = crate::BitReader; +#[doc = "Field `pu_dac_hw` writer - "] +pub type PU_DAC_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>; +#[doc = "Field `pu_vco_hw` reader - "] +pub type PU_VCO_HW_R = crate::BitReader; +#[doc = "Field `pu_vco_hw` writer - "] +pub type PU_VCO_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>; +#[doc = "Field `pu_fbdv_hw` reader - "] +pub type PU_FBDV_HW_R = crate::BitReader; +#[doc = "Field `pu_fbdv_hw` writer - "] +pub type PU_FBDV_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>; +#[doc = "Field `pu_pfd_hw` reader - "] +pub type PU_PFD_HW_R = crate::BitReader; +#[doc = "Field `pu_pfd_hw` writer - "] +pub type PU_PFD_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>; +#[doc = "Field `pu_osmx_hw` reader - "] +pub type PU_OSMX_HW_R = crate::BitReader; +#[doc = "Field `pu_osmx_hw` writer - "] +pub type PU_OSMX_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>; +#[doc = "Field `pu_rxbuf_hw` reader - "] +pub type PU_RXBUF_HW_R = crate::BitReader; +#[doc = "Field `pu_rxbuf_hw` writer - "] +pub type PU_RXBUF_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>; +#[doc = "Field `pu_txbuf_hw` reader - "] +pub type PU_TXBUF_HW_R = crate::BitReader; +#[doc = "Field `pu_txbuf_hw` writer - "] +pub type PU_TXBUF_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>; +#[doc = "Field `trsw_en_hw` reader - "] +pub type TRSW_EN_HW_R = crate::BitReader; +#[doc = "Field `trsw_en_hw` writer - "] +pub type TRSW_EN_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>; +#[doc = "Field `pu_pkdet_hw` reader - "] +pub type PU_PKDET_HW_R = crate::BitReader; +#[doc = "Field `pu_pkdet_hw` writer - "] +pub type PU_PKDET_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>; +#[doc = "Field `pu_rosdac_hw` reader - "] +pub type PU_ROSDAC_HW_R = crate::BitReader; +#[doc = "Field `pu_rosdac_hw` writer - "] +pub type PU_ROSDAC_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>; +#[doc = "Field `pu_tosdac_hw` reader - "] +pub type PU_TOSDAC_HW_R = crate::BitReader; +#[doc = "Field `pu_tosdac_hw` writer - "] +pub type PU_TOSDAC_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUCR1_HW_SPEC, bool, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn pu_sfreg_hw(&self) -> PU_SFREG_HW_R { + PU_SFREG_HW_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bit 31"] + #[doc = "Bit 8"] #[inline(always)] - pub fn pu_tosdac_hw(&self) -> PU_TOSDAC_HW_R { - PU_TOSDAC_HW_R::new(((self.bits >> 31) & 0x01) != 0) + pub fn pu_lna_hw(&self) -> PU_LNA_HW_R { + PU_LNA_HW_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bit 29"] + #[doc = "Bit 9"] #[inline(always)] - pub fn pu_rosdac_hw(&self) -> PU_ROSDAC_HW_R { - PU_ROSDAC_HW_R::new(((self.bits >> 29) & 0x01) != 0) + pub fn pu_rmxgm_hw(&self) -> PU_RMXGM_HW_R { + PU_RMXGM_HW_R::new(((self.bits >> 9) & 1) != 0) } - #[doc = "Bit 28"] + #[doc = "Bit 10"] #[inline(always)] - pub fn pu_pkdet_hw(&self) -> PU_PKDET_HW_R { - PU_PKDET_HW_R::new(((self.bits >> 28) & 0x01) != 0) + pub fn pu_rmx_hw(&self) -> PU_RMX_HW_R { + PU_RMX_HW_R::new(((self.bits >> 10) & 1) != 0) } - #[doc = "Bit 26"] + #[doc = "Bit 11"] #[inline(always)] - pub fn trsw_en_hw(&self) -> TRSW_EN_HW_R { - TRSW_EN_HW_R::new(((self.bits >> 26) & 0x01) != 0) + pub fn pu_rbb_hw(&self) -> PU_RBB_HW_R { + PU_RBB_HW_R::new(((self.bits >> 11) & 1) != 0) } - #[doc = "Bit 25"] + #[doc = "Bit 12"] #[inline(always)] - pub fn pu_txbuf_hw(&self) -> PU_TXBUF_HW_R { - PU_TXBUF_HW_R::new(((self.bits >> 25) & 0x01) != 0) + pub fn pu_adda_ldo_hw(&self) -> PU_ADDA_LDO_HW_R { + PU_ADDA_LDO_HW_R::new(((self.bits >> 12) & 1) != 0) } - #[doc = "Bit 24"] + #[doc = "Bit 13"] #[inline(always)] - pub fn pu_rxbuf_hw(&self) -> PU_RXBUF_HW_R { - PU_RXBUF_HW_R::new(((self.bits >> 24) & 0x01) != 0) + pub fn adc_clk_en_hw(&self) -> ADC_CLK_EN_HW_R { + ADC_CLK_EN_HW_R::new(((self.bits >> 13) & 1) != 0) } - #[doc = "Bit 23"] + #[doc = "Bit 14"] #[inline(always)] - pub fn pu_osmx_hw(&self) -> PU_OSMX_HW_R { - PU_OSMX_HW_R::new(((self.bits >> 23) & 0x01) != 0) + pub fn pu_adc_hw(&self) -> PU_ADC_HW_R { + PU_ADC_HW_R::new(((self.bits >> 14) & 1) != 0) } - #[doc = "Bit 22"] + #[doc = "Bit 16"] #[inline(always)] - pub fn pu_pfd_hw(&self) -> PU_PFD_HW_R { - PU_PFD_HW_R::new(((self.bits >> 22) & 0x01) != 0) + pub fn pu_pa_hw(&self) -> PU_PA_HW_R { + PU_PA_HW_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 21"] + #[doc = "Bit 17"] #[inline(always)] - pub fn pu_fbdv_hw(&self) -> PU_FBDV_HW_R { - PU_FBDV_HW_R::new(((self.bits >> 21) & 0x01) != 0) + pub fn pu_tmx_hw(&self) -> PU_TMX_HW_R { + PU_TMX_HW_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bit 20"] + #[doc = "Bit 18"] #[inline(always)] - pub fn pu_vco_hw(&self) -> PU_VCO_HW_R { - PU_VCO_HW_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn pu_tbb_hw(&self) -> PU_TBB_HW_R { + PU_TBB_HW_R::new(((self.bits >> 18) & 1) != 0) } #[doc = "Bit 19"] #[inline(always)] pub fn pu_dac_hw(&self) -> PU_DAC_HW_R { - PU_DAC_HW_R::new(((self.bits >> 19) & 0x01) != 0) - } - #[doc = "Bit 18"] - #[inline(always)] - pub fn pu_tbb_hw(&self) -> PU_TBB_HW_R { - PU_TBB_HW_R::new(((self.bits >> 18) & 0x01) != 0) + PU_DAC_HW_R::new(((self.bits >> 19) & 1) != 0) } - #[doc = "Bit 17"] + #[doc = "Bit 20"] #[inline(always)] - pub fn pu_tmx_hw(&self) -> PU_TMX_HW_R { - PU_TMX_HW_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn pu_vco_hw(&self) -> PU_VCO_HW_R { + PU_VCO_HW_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bit 16"] + #[doc = "Bit 21"] #[inline(always)] - pub fn pu_pa_hw(&self) -> PU_PA_HW_R { - PU_PA_HW_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn pu_fbdv_hw(&self) -> PU_FBDV_HW_R { + PU_FBDV_HW_R::new(((self.bits >> 21) & 1) != 0) } - #[doc = "Bit 14"] + #[doc = "Bit 22"] #[inline(always)] - pub fn pu_adc_hw(&self) -> PU_ADC_HW_R { - PU_ADC_HW_R::new(((self.bits >> 14) & 0x01) != 0) + pub fn pu_pfd_hw(&self) -> PU_PFD_HW_R { + PU_PFD_HW_R::new(((self.bits >> 22) & 1) != 0) } - #[doc = "Bit 13"] + #[doc = "Bit 23"] #[inline(always)] - pub fn adc_clk_en_hw(&self) -> ADC_CLK_EN_HW_R { - ADC_CLK_EN_HW_R::new(((self.bits >> 13) & 0x01) != 0) + pub fn pu_osmx_hw(&self) -> PU_OSMX_HW_R { + PU_OSMX_HW_R::new(((self.bits >> 23) & 1) != 0) } - #[doc = "Bit 12"] + #[doc = "Bit 24"] #[inline(always)] - pub fn pu_adda_ldo_hw(&self) -> PU_ADDA_LDO_HW_R { - PU_ADDA_LDO_HW_R::new(((self.bits >> 12) & 0x01) != 0) + pub fn pu_rxbuf_hw(&self) -> PU_RXBUF_HW_R { + PU_RXBUF_HW_R::new(((self.bits >> 24) & 1) != 0) } - #[doc = "Bit 11"] + #[doc = "Bit 25"] #[inline(always)] - pub fn pu_rbb_hw(&self) -> PU_RBB_HW_R { - PU_RBB_HW_R::new(((self.bits >> 11) & 0x01) != 0) + pub fn pu_txbuf_hw(&self) -> PU_TXBUF_HW_R { + PU_TXBUF_HW_R::new(((self.bits >> 25) & 1) != 0) } - #[doc = "Bit 10"] + #[doc = "Bit 26"] #[inline(always)] - pub fn pu_rmx_hw(&self) -> PU_RMX_HW_R { - PU_RMX_HW_R::new(((self.bits >> 10) & 0x01) != 0) + pub fn trsw_en_hw(&self) -> TRSW_EN_HW_R { + TRSW_EN_HW_R::new(((self.bits >> 26) & 1) != 0) } - #[doc = "Bit 9"] + #[doc = "Bit 28"] #[inline(always)] - pub fn pu_rmxgm_hw(&self) -> PU_RMXGM_HW_R { - PU_RMXGM_HW_R::new(((self.bits >> 9) & 0x01) != 0) + pub fn pu_pkdet_hw(&self) -> PU_PKDET_HW_R { + PU_PKDET_HW_R::new(((self.bits >> 28) & 1) != 0) } - #[doc = "Bit 8"] + #[doc = "Bit 29"] #[inline(always)] - pub fn pu_lna_hw(&self) -> PU_LNA_HW_R { - PU_LNA_HW_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn pu_rosdac_hw(&self) -> PU_ROSDAC_HW_R { + PU_ROSDAC_HW_R::new(((self.bits >> 29) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 31"] #[inline(always)] - pub fn pu_sfreg_hw(&self) -> PU_SFREG_HW_R { - PU_SFREG_HW_R::new((self.bits & 0x01) != 0) + pub fn pu_tosdac_hw(&self) -> PU_TOSDAC_HW_R { + PU_TOSDAC_HW_R::new(((self.bits >> 31) & 1) != 0) } } impl W { - #[doc = "Bit 31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn pu_tosdac_hw(&mut self) -> PU_TOSDAC_HW_W { - PU_TOSDAC_HW_W { w: self } + #[must_use] + pub fn pu_sfreg_hw(&mut self) -> PU_SFREG_HW_W<0> { + PU_SFREG_HW_W::new(self) } - #[doc = "Bit 29"] + #[doc = "Bit 8"] #[inline(always)] - pub fn pu_rosdac_hw(&mut self) -> PU_ROSDAC_HW_W { - PU_ROSDAC_HW_W { w: self } + #[must_use] + pub fn pu_lna_hw(&mut self) -> PU_LNA_HW_W<8> { + PU_LNA_HW_W::new(self) } - #[doc = "Bit 28"] + #[doc = "Bit 9"] #[inline(always)] - pub fn pu_pkdet_hw(&mut self) -> PU_PKDET_HW_W { - PU_PKDET_HW_W { w: self } + #[must_use] + pub fn pu_rmxgm_hw(&mut self) -> PU_RMXGM_HW_W<9> { + PU_RMXGM_HW_W::new(self) } - #[doc = "Bit 26"] + #[doc = "Bit 10"] #[inline(always)] - pub fn trsw_en_hw(&mut self) -> TRSW_EN_HW_W { - TRSW_EN_HW_W { w: self } + #[must_use] + pub fn pu_rmx_hw(&mut self) -> PU_RMX_HW_W<10> { + PU_RMX_HW_W::new(self) } - #[doc = "Bit 25"] + #[doc = "Bit 11"] #[inline(always)] - pub fn pu_txbuf_hw(&mut self) -> PU_TXBUF_HW_W { - PU_TXBUF_HW_W { w: self } + #[must_use] + pub fn pu_rbb_hw(&mut self) -> PU_RBB_HW_W<11> { + PU_RBB_HW_W::new(self) } - #[doc = "Bit 24"] + #[doc = "Bit 12"] #[inline(always)] - pub fn pu_rxbuf_hw(&mut self) -> PU_RXBUF_HW_W { - PU_RXBUF_HW_W { w: self } + #[must_use] + pub fn pu_adda_ldo_hw(&mut self) -> PU_ADDA_LDO_HW_W<12> { + PU_ADDA_LDO_HW_W::new(self) } - #[doc = "Bit 23"] + #[doc = "Bit 13"] #[inline(always)] - pub fn pu_osmx_hw(&mut self) -> PU_OSMX_HW_W { - PU_OSMX_HW_W { w: self } + #[must_use] + pub fn adc_clk_en_hw(&mut self) -> ADC_CLK_EN_HW_W<13> { + ADC_CLK_EN_HW_W::new(self) } - #[doc = "Bit 22"] + #[doc = "Bit 14"] #[inline(always)] - pub fn pu_pfd_hw(&mut self) -> PU_PFD_HW_W { - PU_PFD_HW_W { w: self } + #[must_use] + pub fn pu_adc_hw(&mut self) -> PU_ADC_HW_W<14> { + PU_ADC_HW_W::new(self) } - #[doc = "Bit 21"] + #[doc = "Bit 16"] #[inline(always)] - pub fn pu_fbdv_hw(&mut self) -> PU_FBDV_HW_W { - PU_FBDV_HW_W { w: self } + #[must_use] + pub fn pu_pa_hw(&mut self) -> PU_PA_HW_W<16> { + PU_PA_HW_W::new(self) } - #[doc = "Bit 20"] + #[doc = "Bit 17"] #[inline(always)] - pub fn pu_vco_hw(&mut self) -> PU_VCO_HW_W { - PU_VCO_HW_W { w: self } + #[must_use] + pub fn pu_tmx_hw(&mut self) -> PU_TMX_HW_W<17> { + PU_TMX_HW_W::new(self) } - #[doc = "Bit 19"] + #[doc = "Bit 18"] #[inline(always)] - pub fn pu_dac_hw(&mut self) -> PU_DAC_HW_W { - PU_DAC_HW_W { w: self } + #[must_use] + pub fn pu_tbb_hw(&mut self) -> PU_TBB_HW_W<18> { + PU_TBB_HW_W::new(self) } - #[doc = "Bit 18"] + #[doc = "Bit 19"] #[inline(always)] - pub fn pu_tbb_hw(&mut self) -> PU_TBB_HW_W { - PU_TBB_HW_W { w: self } + #[must_use] + pub fn pu_dac_hw(&mut self) -> PU_DAC_HW_W<19> { + PU_DAC_HW_W::new(self) } - #[doc = "Bit 17"] + #[doc = "Bit 20"] #[inline(always)] - pub fn pu_tmx_hw(&mut self) -> PU_TMX_HW_W { - PU_TMX_HW_W { w: self } + #[must_use] + pub fn pu_vco_hw(&mut self) -> PU_VCO_HW_W<20> { + PU_VCO_HW_W::new(self) } - #[doc = "Bit 16"] + #[doc = "Bit 21"] #[inline(always)] - pub fn pu_pa_hw(&mut self) -> PU_PA_HW_W { - PU_PA_HW_W { w: self } + #[must_use] + pub fn pu_fbdv_hw(&mut self) -> PU_FBDV_HW_W<21> { + PU_FBDV_HW_W::new(self) } - #[doc = "Bit 14"] + #[doc = "Bit 22"] #[inline(always)] - pub fn pu_adc_hw(&mut self) -> PU_ADC_HW_W { - PU_ADC_HW_W { w: self } + #[must_use] + pub fn pu_pfd_hw(&mut self) -> PU_PFD_HW_W<22> { + PU_PFD_HW_W::new(self) } - #[doc = "Bit 13"] + #[doc = "Bit 23"] #[inline(always)] - pub fn adc_clk_en_hw(&mut self) -> ADC_CLK_EN_HW_W { - ADC_CLK_EN_HW_W { w: self } + #[must_use] + pub fn pu_osmx_hw(&mut self) -> PU_OSMX_HW_W<23> { + PU_OSMX_HW_W::new(self) } - #[doc = "Bit 12"] + #[doc = "Bit 24"] #[inline(always)] - pub fn pu_adda_ldo_hw(&mut self) -> PU_ADDA_LDO_HW_W { - PU_ADDA_LDO_HW_W { w: self } + #[must_use] + pub fn pu_rxbuf_hw(&mut self) -> PU_RXBUF_HW_W<24> { + PU_RXBUF_HW_W::new(self) } - #[doc = "Bit 11"] + #[doc = "Bit 25"] #[inline(always)] - pub fn pu_rbb_hw(&mut self) -> PU_RBB_HW_W { - PU_RBB_HW_W { w: self } + #[must_use] + pub fn pu_txbuf_hw(&mut self) -> PU_TXBUF_HW_W<25> { + PU_TXBUF_HW_W::new(self) } - #[doc = "Bit 10"] + #[doc = "Bit 26"] #[inline(always)] - pub fn pu_rmx_hw(&mut self) -> PU_RMX_HW_W { - PU_RMX_HW_W { w: self } + #[must_use] + pub fn trsw_en_hw(&mut self) -> TRSW_EN_HW_W<26> { + TRSW_EN_HW_W::new(self) } - #[doc = "Bit 9"] + #[doc = "Bit 28"] #[inline(always)] - pub fn pu_rmxgm_hw(&mut self) -> PU_RMXGM_HW_W { - PU_RMXGM_HW_W { w: self } + #[must_use] + pub fn pu_pkdet_hw(&mut self) -> PU_PKDET_HW_W<28> { + PU_PKDET_HW_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bit 29"] #[inline(always)] - pub fn pu_lna_hw(&mut self) -> PU_LNA_HW_W { - PU_LNA_HW_W { w: self } + #[must_use] + pub fn pu_rosdac_hw(&mut self) -> PU_ROSDAC_HW_W<29> { + PU_ROSDAC_HW_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 31"] #[inline(always)] - pub fn pu_sfreg_hw(&mut self) -> PU_SFREG_HW_W { - PU_SFREG_HW_W { w: self } + #[must_use] + pub fn pu_tosdac_hw(&mut self) -> PU_TOSDAC_HW_W<31> { + PU_TOSDAC_HW_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -1065,11 +386,10 @@ impl crate::Readable for PUCR1_HW_SPEC { #[doc = "`write(|w| ..)` method takes [pucr1_hw::W](W) writer structure"] impl crate::Writable for PUCR1_HW_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pucr1_hw to value 0"] impl crate::Resettable for PUCR1_HW_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/pucr2.rs b/src/rf/pucr2.rs index 4d6c07e..ec7fb25 100644 --- a/src/rf/pucr2.rs +++ b/src/rf/pucr2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,13 +28,15 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } impl W { #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -51,11 +54,10 @@ impl crate::Readable for PUCR2_SPEC { #[doc = "`write(|w| ..)` method takes [pucr2::W](W) writer structure"] impl crate::Writable for PUCR2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pucr2 to value 0"] impl crate::Resettable for PUCR2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/pucr2_hw.rs b/src/rf/pucr2_hw.rs index 2923bf6..c002885 100644 --- a/src/rf/pucr2_hw.rs +++ b/src/rf/pucr2_hw.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,13 +28,15 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } impl W { #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -51,11 +54,10 @@ impl crate::Readable for PUCR2_HW_SPEC { #[doc = "`write(|w| ..)` method takes [pucr2_hw::W](W) writer structure"] impl crate::Writable for PUCR2_HW_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pucr2_hw to value 0"] impl crate::Resettable for PUCR2_HW_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/pud_ctrl_hw.rs b/src/rf/pud_ctrl_hw.rs index 79177fa..ab92467 100644 --- a/src/rf/pud_ctrl_hw.rs +++ b/src/rf/pud_ctrl_hw.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,61 +28,32 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `pud_vco_hw` reader - "] -pub struct PUD_VCO_HW_R(crate::FieldReader); -impl PUD_VCO_HW_R { - pub(crate) fn new(bits: bool) -> Self { - PUD_VCO_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PUD_VCO_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PUD_VCO_HW_R = crate::BitReader; #[doc = "Field `pud_vco_hw` writer - "] -pub struct PUD_VCO_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PUD_VCO_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w - } -} +pub type PUD_VCO_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUD_CTRL_HW_SPEC, bool, O>; impl R { #[doc = "Bit 20"] #[inline(always)] pub fn pud_vco_hw(&self) -> PUD_VCO_HW_R { - PUD_VCO_HW_R::new(((self.bits >> 20) & 0x01) != 0) + PUD_VCO_HW_R::new(((self.bits >> 20) & 1) != 0) } } impl W { #[doc = "Bit 20"] #[inline(always)] - pub fn pud_vco_hw(&mut self) -> PUD_VCO_HW_W { - PUD_VCO_HW_W { w: self } + #[must_use] + pub fn pud_vco_hw(&mut self) -> PUD_VCO_HW_W<20> { + PUD_VCO_HW_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -99,11 +71,10 @@ impl crate::Readable for PUD_CTRL_HW_SPEC { #[doc = "`write(|w| ..)` method takes [pud_ctrl_hw::W](W) writer structure"] impl crate::Writable for PUD_CTRL_HW_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets pud_ctrl_hw to value 0"] impl crate::Resettable for PUD_CTRL_HW_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rbb1.rs b/src/rf/rbb1.rs index 89d1bc4..7e23755 100644 --- a/src/rf/rbb1.rs +++ b/src/rf/rbb1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,205 +28,92 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rosdac_range` reader - "] -pub struct ROSDAC_RANGE_R(crate::FieldReader); -impl ROSDAC_RANGE_R { - pub(crate) fn new(bits: bool) -> Self { - ROSDAC_RANGE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ROSDAC_RANGE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rosdac_range` writer - "] -pub struct ROSDAC_RANGE_W<'a> { - w: &'a mut W, -} -impl<'a> ROSDAC_RANGE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 31)) | ((value as u32 & 0x01) << 31); - self.w - } -} -#[doc = "Field `rosdac_i_hw` reader - "] -pub struct ROSDAC_I_HW_R(crate::FieldReader); -impl ROSDAC_I_HW_R { - pub(crate) fn new(bits: u8) -> Self { - ROSDAC_I_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ROSDAC_I_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rosdac_i_hw` writer - "] -pub struct ROSDAC_I_HW_W<'a> { - w: &'a mut W, -} -impl<'a> ROSDAC_I_HW_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 24)) | ((value as u32 & 0x3f) << 24); - self.w - } -} -#[doc = "Field `rosdac_q_hw` reader - "] -pub struct ROSDAC_Q_HW_R(crate::FieldReader); -impl ROSDAC_Q_HW_R { - pub(crate) fn new(bits: u8) -> Self { - ROSDAC_Q_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ROSDAC_Q_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rosdac_q_hw` writer - "] -pub struct ROSDAC_Q_HW_W<'a> { - w: &'a mut W, -} -impl<'a> ROSDAC_Q_HW_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 16)) | ((value as u32 & 0x3f) << 16); - self.w - } -} -#[doc = "Field `rosdac_i` reader - "] -pub struct ROSDAC_I_R(crate::FieldReader); -impl ROSDAC_I_R { - pub(crate) fn new(bits: u8) -> Self { - ROSDAC_I_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ROSDAC_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rosdac_i` writer - "] -pub struct ROSDAC_I_W<'a> { - w: &'a mut W, -} -impl<'a> ROSDAC_I_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 8)) | ((value as u32 & 0x3f) << 8); - self.w - } -} #[doc = "Field `rosdac_q` reader - "] -pub struct ROSDAC_Q_R(crate::FieldReader); -impl ROSDAC_Q_R { - pub(crate) fn new(bits: u8) -> Self { - ROSDAC_Q_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ROSDAC_Q_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type ROSDAC_Q_R = crate::FieldReader; #[doc = "Field `rosdac_q` writer - "] -pub struct ROSDAC_Q_W<'a> { - w: &'a mut W, -} -impl<'a> ROSDAC_Q_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x3f) | (value as u32 & 0x3f); - self.w - } -} +pub type ROSDAC_Q_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RBB1_SPEC, u8, u8, 6, O>; +#[doc = "Field `rosdac_i` reader - "] +pub type ROSDAC_I_R = crate::FieldReader; +#[doc = "Field `rosdac_i` writer - "] +pub type ROSDAC_I_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RBB1_SPEC, u8, u8, 6, O>; +#[doc = "Field `rosdac_q_hw` reader - "] +pub type ROSDAC_Q_HW_R = crate::FieldReader; +#[doc = "Field `rosdac_q_hw` writer - "] +pub type ROSDAC_Q_HW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RBB1_SPEC, u8, u8, 6, O>; +#[doc = "Field `rosdac_i_hw` reader - "] +pub type ROSDAC_I_HW_R = crate::FieldReader; +#[doc = "Field `rosdac_i_hw` writer - "] +pub type ROSDAC_I_HW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RBB1_SPEC, u8, u8, 6, O>; +#[doc = "Field `rosdac_range` reader - "] +pub type ROSDAC_RANGE_R = crate::BitReader; +#[doc = "Field `rosdac_range` writer - "] +pub type ROSDAC_RANGE_W<'a, const O: u8> = crate::BitWriter<'a, u32, RBB1_SPEC, bool, O>; impl R { - #[doc = "Bit 31"] + #[doc = "Bits 0:5"] #[inline(always)] - pub fn rosdac_range(&self) -> ROSDAC_RANGE_R { - ROSDAC_RANGE_R::new(((self.bits >> 31) & 0x01) != 0) + pub fn rosdac_q(&self) -> ROSDAC_Q_R { + ROSDAC_Q_R::new((self.bits & 0x3f) as u8) } - #[doc = "Bits 24:29"] + #[doc = "Bits 8:13"] #[inline(always)] - pub fn rosdac_i_hw(&self) -> ROSDAC_I_HW_R { - ROSDAC_I_HW_R::new(((self.bits >> 24) & 0x3f) as u8) + pub fn rosdac_i(&self) -> ROSDAC_I_R { + ROSDAC_I_R::new(((self.bits >> 8) & 0x3f) as u8) } #[doc = "Bits 16:21"] #[inline(always)] pub fn rosdac_q_hw(&self) -> ROSDAC_Q_HW_R { ROSDAC_Q_HW_R::new(((self.bits >> 16) & 0x3f) as u8) } - #[doc = "Bits 8:13"] + #[doc = "Bits 24:29"] #[inline(always)] - pub fn rosdac_i(&self) -> ROSDAC_I_R { - ROSDAC_I_R::new(((self.bits >> 8) & 0x3f) as u8) + pub fn rosdac_i_hw(&self) -> ROSDAC_I_HW_R { + ROSDAC_I_HW_R::new(((self.bits >> 24) & 0x3f) as u8) } - #[doc = "Bits 0:5"] + #[doc = "Bit 31"] #[inline(always)] - pub fn rosdac_q(&self) -> ROSDAC_Q_R { - ROSDAC_Q_R::new((self.bits & 0x3f) as u8) + pub fn rosdac_range(&self) -> ROSDAC_RANGE_R { + ROSDAC_RANGE_R::new(((self.bits >> 31) & 1) != 0) } } impl W { - #[doc = "Bit 31"] + #[doc = "Bits 0:5"] #[inline(always)] - pub fn rosdac_range(&mut self) -> ROSDAC_RANGE_W { - ROSDAC_RANGE_W { w: self } + #[must_use] + pub fn rosdac_q(&mut self) -> ROSDAC_Q_W<0> { + ROSDAC_Q_W::new(self) } - #[doc = "Bits 24:29"] + #[doc = "Bits 8:13"] #[inline(always)] - pub fn rosdac_i_hw(&mut self) -> ROSDAC_I_HW_W { - ROSDAC_I_HW_W { w: self } + #[must_use] + pub fn rosdac_i(&mut self) -> ROSDAC_I_W<8> { + ROSDAC_I_W::new(self) } #[doc = "Bits 16:21"] #[inline(always)] - pub fn rosdac_q_hw(&mut self) -> ROSDAC_Q_HW_W { - ROSDAC_Q_HW_W { w: self } + #[must_use] + pub fn rosdac_q_hw(&mut self) -> ROSDAC_Q_HW_W<16> { + ROSDAC_Q_HW_W::new(self) } - #[doc = "Bits 8:13"] + #[doc = "Bits 24:29"] #[inline(always)] - pub fn rosdac_i(&mut self) -> ROSDAC_I_W { - ROSDAC_I_W { w: self } + #[must_use] + pub fn rosdac_i_hw(&mut self) -> ROSDAC_I_HW_W<24> { + ROSDAC_I_HW_W::new(self) } - #[doc = "Bits 0:5"] + #[doc = "Bit 31"] #[inline(always)] - pub fn rosdac_q(&mut self) -> ROSDAC_Q_W { - ROSDAC_Q_W { w: self } + #[must_use] + pub fn rosdac_range(&mut self) -> ROSDAC_RANGE_W<31> { + ROSDAC_RANGE_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -243,11 +131,10 @@ impl crate::Readable for RBB1_SPEC { #[doc = "`write(|w| ..)` method takes [rbb1::W](W) writer structure"] impl crate::Writable for RBB1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rbb1 to value 0"] impl crate::Resettable for RBB1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rbb2.rs b/src/rf/rbb2.rs index 2497c9c..565306a 100644 --- a/src/rf/rbb2.rs +++ b/src/rf/rbb2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,159 +28,77 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rbb_cap1_fc_i` reader - "] -pub struct RBB_CAP1_FC_I_R(crate::FieldReader); -impl RBB_CAP1_FC_I_R { - pub(crate) fn new(bits: u8) -> Self { - RBB_CAP1_FC_I_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RBB_CAP1_FC_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rbb_cap1_fc_i` writer - "] -pub struct RBB_CAP1_FC_I_W<'a> { - w: &'a mut W, -} -impl<'a> RBB_CAP1_FC_I_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 24)) | ((value as u32 & 0x3f) << 24); - self.w - } -} -#[doc = "Field `rbb_cap1_fc_q` reader - "] -pub struct RBB_CAP1_FC_Q_R(crate::FieldReader); -impl RBB_CAP1_FC_Q_R { - pub(crate) fn new(bits: u8) -> Self { - RBB_CAP1_FC_Q_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RBB_CAP1_FC_Q_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rbb_cap1_fc_q` writer - "] -pub struct RBB_CAP1_FC_Q_W<'a> { - w: &'a mut W, -} -impl<'a> RBB_CAP1_FC_Q_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 16)) | ((value as u32 & 0x3f) << 16); - self.w - } -} -#[doc = "Field `rbb_cap2_fc_i` reader - "] -pub struct RBB_CAP2_FC_I_R(crate::FieldReader); -impl RBB_CAP2_FC_I_R { - pub(crate) fn new(bits: u8) -> Self { - RBB_CAP2_FC_I_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RBB_CAP2_FC_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rbb_cap2_fc_i` writer - "] -pub struct RBB_CAP2_FC_I_W<'a> { - w: &'a mut W, -} -impl<'a> RBB_CAP2_FC_I_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 8)) | ((value as u32 & 0x3f) << 8); - self.w - } -} #[doc = "Field `rbb_cap2_fc_q` reader - "] -pub struct RBB_CAP2_FC_Q_R(crate::FieldReader); -impl RBB_CAP2_FC_Q_R { - pub(crate) fn new(bits: u8) -> Self { - RBB_CAP2_FC_Q_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RBB_CAP2_FC_Q_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RBB_CAP2_FC_Q_R = crate::FieldReader; #[doc = "Field `rbb_cap2_fc_q` writer - "] -pub struct RBB_CAP2_FC_Q_W<'a> { - w: &'a mut W, -} -impl<'a> RBB_CAP2_FC_Q_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type RBB_CAP2_FC_Q_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RBB2_SPEC, u8, u8, 6, O>; +#[doc = "Field `rbb_cap2_fc_i` reader - "] +pub type RBB_CAP2_FC_I_R = crate::FieldReader; +#[doc = "Field `rbb_cap2_fc_i` writer - "] +pub type RBB_CAP2_FC_I_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RBB2_SPEC, u8, u8, 6, O>; +#[doc = "Field `rbb_cap1_fc_q` reader - "] +pub type RBB_CAP1_FC_Q_R = crate::FieldReader; +#[doc = "Field `rbb_cap1_fc_q` writer - "] +pub type RBB_CAP1_FC_Q_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RBB2_SPEC, u8, u8, 6, O>; +#[doc = "Field `rbb_cap1_fc_i` reader - "] +pub type RBB_CAP1_FC_I_R = crate::FieldReader; +#[doc = "Field `rbb_cap1_fc_i` writer - "] +pub type RBB_CAP1_FC_I_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RBB2_SPEC, u8, u8, 6, O>; +impl R { + #[doc = "Bits 0:5"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x3f) | (value as u32 & 0x3f); - self.w + pub fn rbb_cap2_fc_q(&self) -> RBB_CAP2_FC_Q_R { + RBB_CAP2_FC_Q_R::new((self.bits & 0x3f) as u8) } -} -impl R { - #[doc = "Bits 24:29"] + #[doc = "Bits 8:13"] #[inline(always)] - pub fn rbb_cap1_fc_i(&self) -> RBB_CAP1_FC_I_R { - RBB_CAP1_FC_I_R::new(((self.bits >> 24) & 0x3f) as u8) + pub fn rbb_cap2_fc_i(&self) -> RBB_CAP2_FC_I_R { + RBB_CAP2_FC_I_R::new(((self.bits >> 8) & 0x3f) as u8) } #[doc = "Bits 16:21"] #[inline(always)] pub fn rbb_cap1_fc_q(&self) -> RBB_CAP1_FC_Q_R { RBB_CAP1_FC_Q_R::new(((self.bits >> 16) & 0x3f) as u8) } - #[doc = "Bits 8:13"] - #[inline(always)] - pub fn rbb_cap2_fc_i(&self) -> RBB_CAP2_FC_I_R { - RBB_CAP2_FC_I_R::new(((self.bits >> 8) & 0x3f) as u8) - } - #[doc = "Bits 0:5"] + #[doc = "Bits 24:29"] #[inline(always)] - pub fn rbb_cap2_fc_q(&self) -> RBB_CAP2_FC_Q_R { - RBB_CAP2_FC_Q_R::new((self.bits & 0x3f) as u8) + pub fn rbb_cap1_fc_i(&self) -> RBB_CAP1_FC_I_R { + RBB_CAP1_FC_I_R::new(((self.bits >> 24) & 0x3f) as u8) } } impl W { - #[doc = "Bits 24:29"] + #[doc = "Bits 0:5"] #[inline(always)] - pub fn rbb_cap1_fc_i(&mut self) -> RBB_CAP1_FC_I_W { - RBB_CAP1_FC_I_W { w: self } + #[must_use] + pub fn rbb_cap2_fc_q(&mut self) -> RBB_CAP2_FC_Q_W<0> { + RBB_CAP2_FC_Q_W::new(self) } - #[doc = "Bits 16:21"] + #[doc = "Bits 8:13"] #[inline(always)] - pub fn rbb_cap1_fc_q(&mut self) -> RBB_CAP1_FC_Q_W { - RBB_CAP1_FC_Q_W { w: self } + #[must_use] + pub fn rbb_cap2_fc_i(&mut self) -> RBB_CAP2_FC_I_W<8> { + RBB_CAP2_FC_I_W::new(self) } - #[doc = "Bits 8:13"] + #[doc = "Bits 16:21"] #[inline(always)] - pub fn rbb_cap2_fc_i(&mut self) -> RBB_CAP2_FC_I_W { - RBB_CAP2_FC_I_W { w: self } + #[must_use] + pub fn rbb_cap1_fc_q(&mut self) -> RBB_CAP1_FC_Q_W<16> { + RBB_CAP1_FC_Q_W::new(self) } - #[doc = "Bits 0:5"] + #[doc = "Bits 24:29"] #[inline(always)] - pub fn rbb_cap2_fc_q(&mut self) -> RBB_CAP2_FC_Q_W { - RBB_CAP2_FC_Q_W { w: self } + #[must_use] + pub fn rbb_cap1_fc_i(&mut self) -> RBB_CAP1_FC_I_W<24> { + RBB_CAP1_FC_I_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -197,11 +116,10 @@ impl crate::Readable for RBB2_SPEC { #[doc = "`write(|w| ..)` method takes [rbb2::W](W) writer structure"] impl crate::Writable for RBB2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rbb2 to value 0"] impl crate::Resettable for RBB2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rbb3.rs b/src/rf/rbb3.rs index 3ec2091..7092d79 100644 --- a/src/rf/rbb3.rs +++ b/src/rf/rbb3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,471 +28,182 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `pwr_det_en` reader - "] -pub struct PWR_DET_EN_R(crate::FieldReader); -impl PWR_DET_EN_R { - pub(crate) fn new(bits: bool) -> Self { - PWR_DET_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWR_DET_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwr_det_en` writer - "] -pub struct PWR_DET_EN_W<'a> { - w: &'a mut W, -} -impl<'a> PWR_DET_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 31)) | ((value as u32 & 0x01) << 31); - self.w - } -} -#[doc = "Field `rxiqcal_en` reader - "] -pub struct RXIQCAL_EN_R(crate::FieldReader); -impl RXIQCAL_EN_R { - pub(crate) fn new(bits: bool) -> Self { - RXIQCAL_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RXIQCAL_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rxiqcal_en` writer - "] -pub struct RXIQCAL_EN_W<'a> { - w: &'a mut W, -} -impl<'a> RXIQCAL_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 28)) | ((value as u32 & 0x01) << 28); - self.w - } -} -#[doc = "Field `rbb_bw` reader - "] -pub struct RBB_BW_R(crate::FieldReader); -impl RBB_BW_R { - pub(crate) fn new(bits: u8) -> Self { - RBB_BW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RBB_BW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rbb_bw` writer - "] -pub struct RBB_BW_W<'a> { - w: &'a mut W, -} -impl<'a> RBB_BW_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 24)) | ((value as u32 & 0x03) << 24); - self.w - } -} -#[doc = "Field `rbb_tia_iqbias_short` reader - "] -pub struct RBB_TIA_IQBIAS_SHORT_R(crate::FieldReader); -impl RBB_TIA_IQBIAS_SHORT_R { - pub(crate) fn new(bits: bool) -> Self { - RBB_TIA_IQBIAS_SHORT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RBB_TIA_IQBIAS_SHORT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rbb_tia_iqbias_short` writer - "] -pub struct RBB_TIA_IQBIAS_SHORT_W<'a> { - w: &'a mut W, -} -impl<'a> RBB_TIA_IQBIAS_SHORT_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); - self.w - } -} -#[doc = "Field `rbb_bq_iqbias_short` reader - "] -pub struct RBB_BQ_IQBIAS_SHORT_R(crate::FieldReader); -impl RBB_BQ_IQBIAS_SHORT_R { - pub(crate) fn new(bits: bool) -> Self { - RBB_BQ_IQBIAS_SHORT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RBB_BQ_IQBIAS_SHORT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rbb_bq_iqbias_short` writer - "] -pub struct RBB_BQ_IQBIAS_SHORT_W<'a> { - w: &'a mut W, -} -impl<'a> RBB_BQ_IQBIAS_SHORT_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w - } -} -#[doc = "Field `rbb_vcm` reader - "] -pub struct RBB_VCM_R(crate::FieldReader); -impl RBB_VCM_R { - pub(crate) fn new(bits: u8) -> Self { - RBB_VCM_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RBB_VCM_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rbb_vcm` writer - "] -pub struct RBB_VCM_W<'a> { - w: &'a mut W, -} -impl<'a> RBB_VCM_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 16)) | ((value as u32 & 0x03) << 16); - self.w - } -} -#[doc = "Field `rbb_bm_op` reader - "] -pub struct RBB_BM_OP_R(crate::FieldReader); -impl RBB_BM_OP_R { - pub(crate) fn new(bits: u8) -> Self { - RBB_BM_OP_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RBB_BM_OP_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rbb_bm_op` writer - "] -pub struct RBB_BM_OP_W<'a> { - w: &'a mut W, -} -impl<'a> RBB_BM_OP_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 12)) | ((value as u32 & 0x07) << 12); - self.w - } -} -#[doc = "Field `rbb_deq` reader - "] -pub struct RBB_DEQ_R(crate::FieldReader); -impl RBB_DEQ_R { - pub(crate) fn new(bits: u8) -> Self { - RBB_DEQ_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RBB_DEQ_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rbb_deq` writer - "] -pub struct RBB_DEQ_W<'a> { - w: &'a mut W, -} -impl<'a> RBB_DEQ_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} -#[doc = "Field `rbb_bt_fif_tune` reader - "] -pub struct RBB_BT_FIF_TUNE_R(crate::FieldReader); -impl RBB_BT_FIF_TUNE_R { - pub(crate) fn new(bits: u8) -> Self { - RBB_BT_FIF_TUNE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RBB_BT_FIF_TUNE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rbb_bt_fif_tune` writer - "] -pub struct RBB_BT_FIF_TUNE_W<'a> { - w: &'a mut W, -} -impl<'a> RBB_BT_FIF_TUNE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 5)) | ((value as u32 & 0x03) << 5); - self.w - } -} -#[doc = "Field `rbb_bt_mode` reader - "] -pub struct RBB_BT_MODE_R(crate::FieldReader); -impl RBB_BT_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - RBB_BT_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RBB_BT_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rbb_bt_mode` writer - "] -pub struct RBB_BT_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> RBB_BT_MODE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} #[doc = "Field `rbb_bt_mode_hw` reader - "] -pub struct RBB_BT_MODE_HW_R(crate::FieldReader); -impl RBB_BT_MODE_HW_R { - pub(crate) fn new(bits: bool) -> Self { - RBB_BT_MODE_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RBB_BT_MODE_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RBB_BT_MODE_HW_R = crate::BitReader; #[doc = "Field `rbb_bt_mode_hw` writer - "] -pub struct RBB_BT_MODE_HW_W<'a> { - w: &'a mut W, -} -impl<'a> RBB_BT_MODE_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type RBB_BT_MODE_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, RBB3_SPEC, bool, O>; +#[doc = "Field `rbb_bt_mode` reader - "] +pub type RBB_BT_MODE_R = crate::BitReader; +#[doc = "Field `rbb_bt_mode` writer - "] +pub type RBB_BT_MODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, RBB3_SPEC, bool, O>; +#[doc = "Field `rbb_bt_fif_tune` reader - "] +pub type RBB_BT_FIF_TUNE_R = crate::FieldReader; +#[doc = "Field `rbb_bt_fif_tune` writer - "] +pub type RBB_BT_FIF_TUNE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RBB3_SPEC, u8, u8, 2, O>; +#[doc = "Field `rbb_deq` reader - "] +pub type RBB_DEQ_R = crate::FieldReader; +#[doc = "Field `rbb_deq` writer - "] +pub type RBB_DEQ_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RBB3_SPEC, u8, u8, 2, O>; +#[doc = "Field `rbb_bm_op` reader - "] +pub type RBB_BM_OP_R = crate::FieldReader; +#[doc = "Field `rbb_bm_op` writer - "] +pub type RBB_BM_OP_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RBB3_SPEC, u8, u8, 3, O>; +#[doc = "Field `rbb_vcm` reader - "] +pub type RBB_VCM_R = crate::FieldReader; +#[doc = "Field `rbb_vcm` writer - "] +pub type RBB_VCM_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RBB3_SPEC, u8, u8, 2, O>; +#[doc = "Field `rbb_bq_iqbias_short` reader - "] +pub type RBB_BQ_IQBIAS_SHORT_R = crate::BitReader; +#[doc = "Field `rbb_bq_iqbias_short` writer - "] +pub type RBB_BQ_IQBIAS_SHORT_W<'a, const O: u8> = crate::BitWriter<'a, u32, RBB3_SPEC, bool, O>; +#[doc = "Field `rbb_tia_iqbias_short` reader - "] +pub type RBB_TIA_IQBIAS_SHORT_R = crate::BitReader; +#[doc = "Field `rbb_tia_iqbias_short` writer - "] +pub type RBB_TIA_IQBIAS_SHORT_W<'a, const O: u8> = crate::BitWriter<'a, u32, RBB3_SPEC, bool, O>; +#[doc = "Field `rbb_bw` reader - "] +pub type RBB_BW_R = crate::FieldReader; +#[doc = "Field `rbb_bw` writer - "] +pub type RBB_BW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RBB3_SPEC, u8, u8, 2, O>; +#[doc = "Field `rxiqcal_en` reader - "] +pub type RXIQCAL_EN_R = crate::BitReader; +#[doc = "Field `rxiqcal_en` writer - "] +pub type RXIQCAL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RBB3_SPEC, bool, O>; +#[doc = "Field `pwr_det_en` reader - "] +pub type PWR_DET_EN_R = crate::BitReader; +#[doc = "Field `pwr_det_en` writer - "] +pub type PWR_DET_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RBB3_SPEC, bool, O>; impl R { - #[doc = "Bit 31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn pwr_det_en(&self) -> PWR_DET_EN_R { - PWR_DET_EN_R::new(((self.bits >> 31) & 0x01) != 0) + pub fn rbb_bt_mode_hw(&self) -> RBB_BT_MODE_HW_R { + RBB_BT_MODE_HW_R::new((self.bits & 1) != 0) } - #[doc = "Bit 28"] + #[doc = "Bit 4"] #[inline(always)] - pub fn rxiqcal_en(&self) -> RXIQCAL_EN_R { - RXIQCAL_EN_R::new(((self.bits >> 28) & 0x01) != 0) + pub fn rbb_bt_mode(&self) -> RBB_BT_MODE_R { + RBB_BT_MODE_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bits 24:25"] + #[doc = "Bits 5:6"] #[inline(always)] - pub fn rbb_bw(&self) -> RBB_BW_R { - RBB_BW_R::new(((self.bits >> 24) & 0x03) as u8) + pub fn rbb_bt_fif_tune(&self) -> RBB_BT_FIF_TUNE_R { + RBB_BT_FIF_TUNE_R::new(((self.bits >> 5) & 3) as u8) } - #[doc = "Bit 21"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn rbb_tia_iqbias_short(&self) -> RBB_TIA_IQBIAS_SHORT_R { - RBB_TIA_IQBIAS_SHORT_R::new(((self.bits >> 21) & 0x01) != 0) + pub fn rbb_deq(&self) -> RBB_DEQ_R { + RBB_DEQ_R::new(((self.bits >> 8) & 3) as u8) } - #[doc = "Bit 20"] + #[doc = "Bits 12:14"] #[inline(always)] - pub fn rbb_bq_iqbias_short(&self) -> RBB_BQ_IQBIAS_SHORT_R { - RBB_BQ_IQBIAS_SHORT_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn rbb_bm_op(&self) -> RBB_BM_OP_R { + RBB_BM_OP_R::new(((self.bits >> 12) & 7) as u8) } #[doc = "Bits 16:17"] #[inline(always)] pub fn rbb_vcm(&self) -> RBB_VCM_R { - RBB_VCM_R::new(((self.bits >> 16) & 0x03) as u8) + RBB_VCM_R::new(((self.bits >> 16) & 3) as u8) } - #[doc = "Bits 12:14"] + #[doc = "Bit 20"] #[inline(always)] - pub fn rbb_bm_op(&self) -> RBB_BM_OP_R { - RBB_BM_OP_R::new(((self.bits >> 12) & 0x07) as u8) + pub fn rbb_bq_iqbias_short(&self) -> RBB_BQ_IQBIAS_SHORT_R { + RBB_BQ_IQBIAS_SHORT_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bits 8:9"] + #[doc = "Bit 21"] #[inline(always)] - pub fn rbb_deq(&self) -> RBB_DEQ_R { - RBB_DEQ_R::new(((self.bits >> 8) & 0x03) as u8) + pub fn rbb_tia_iqbias_short(&self) -> RBB_TIA_IQBIAS_SHORT_R { + RBB_TIA_IQBIAS_SHORT_R::new(((self.bits >> 21) & 1) != 0) } - #[doc = "Bits 5:6"] + #[doc = "Bits 24:25"] #[inline(always)] - pub fn rbb_bt_fif_tune(&self) -> RBB_BT_FIF_TUNE_R { - RBB_BT_FIF_TUNE_R::new(((self.bits >> 5) & 0x03) as u8) + pub fn rbb_bw(&self) -> RBB_BW_R { + RBB_BW_R::new(((self.bits >> 24) & 3) as u8) } - #[doc = "Bit 4"] + #[doc = "Bit 28"] #[inline(always)] - pub fn rbb_bt_mode(&self) -> RBB_BT_MODE_R { - RBB_BT_MODE_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn rxiqcal_en(&self) -> RXIQCAL_EN_R { + RXIQCAL_EN_R::new(((self.bits >> 28) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 31"] #[inline(always)] - pub fn rbb_bt_mode_hw(&self) -> RBB_BT_MODE_HW_R { - RBB_BT_MODE_HW_R::new((self.bits & 0x01) != 0) + pub fn pwr_det_en(&self) -> PWR_DET_EN_R { + PWR_DET_EN_R::new(((self.bits >> 31) & 1) != 0) } } impl W { - #[doc = "Bit 31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn pwr_det_en(&mut self) -> PWR_DET_EN_W { - PWR_DET_EN_W { w: self } + #[must_use] + pub fn rbb_bt_mode_hw(&mut self) -> RBB_BT_MODE_HW_W<0> { + RBB_BT_MODE_HW_W::new(self) } - #[doc = "Bit 28"] + #[doc = "Bit 4"] #[inline(always)] - pub fn rxiqcal_en(&mut self) -> RXIQCAL_EN_W { - RXIQCAL_EN_W { w: self } + #[must_use] + pub fn rbb_bt_mode(&mut self) -> RBB_BT_MODE_W<4> { + RBB_BT_MODE_W::new(self) } - #[doc = "Bits 24:25"] + #[doc = "Bits 5:6"] #[inline(always)] - pub fn rbb_bw(&mut self) -> RBB_BW_W { - RBB_BW_W { w: self } + #[must_use] + pub fn rbb_bt_fif_tune(&mut self) -> RBB_BT_FIF_TUNE_W<5> { + RBB_BT_FIF_TUNE_W::new(self) } - #[doc = "Bit 21"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn rbb_tia_iqbias_short(&mut self) -> RBB_TIA_IQBIAS_SHORT_W { - RBB_TIA_IQBIAS_SHORT_W { w: self } + #[must_use] + pub fn rbb_deq(&mut self) -> RBB_DEQ_W<8> { + RBB_DEQ_W::new(self) } - #[doc = "Bit 20"] + #[doc = "Bits 12:14"] #[inline(always)] - pub fn rbb_bq_iqbias_short(&mut self) -> RBB_BQ_IQBIAS_SHORT_W { - RBB_BQ_IQBIAS_SHORT_W { w: self } + #[must_use] + pub fn rbb_bm_op(&mut self) -> RBB_BM_OP_W<12> { + RBB_BM_OP_W::new(self) } #[doc = "Bits 16:17"] #[inline(always)] - pub fn rbb_vcm(&mut self) -> RBB_VCM_W { - RBB_VCM_W { w: self } + #[must_use] + pub fn rbb_vcm(&mut self) -> RBB_VCM_W<16> { + RBB_VCM_W::new(self) } - #[doc = "Bits 12:14"] + #[doc = "Bit 20"] #[inline(always)] - pub fn rbb_bm_op(&mut self) -> RBB_BM_OP_W { - RBB_BM_OP_W { w: self } + #[must_use] + pub fn rbb_bq_iqbias_short(&mut self) -> RBB_BQ_IQBIAS_SHORT_W<20> { + RBB_BQ_IQBIAS_SHORT_W::new(self) } - #[doc = "Bits 8:9"] + #[doc = "Bit 21"] #[inline(always)] - pub fn rbb_deq(&mut self) -> RBB_DEQ_W { - RBB_DEQ_W { w: self } + #[must_use] + pub fn rbb_tia_iqbias_short(&mut self) -> RBB_TIA_IQBIAS_SHORT_W<21> { + RBB_TIA_IQBIAS_SHORT_W::new(self) } - #[doc = "Bits 5:6"] + #[doc = "Bits 24:25"] #[inline(always)] - pub fn rbb_bt_fif_tune(&mut self) -> RBB_BT_FIF_TUNE_W { - RBB_BT_FIF_TUNE_W { w: self } + #[must_use] + pub fn rbb_bw(&mut self) -> RBB_BW_W<24> { + RBB_BW_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 28"] #[inline(always)] - pub fn rbb_bt_mode(&mut self) -> RBB_BT_MODE_W { - RBB_BT_MODE_W { w: self } + #[must_use] + pub fn rxiqcal_en(&mut self) -> RXIQCAL_EN_W<28> { + RXIQCAL_EN_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 31"] #[inline(always)] - pub fn rbb_bt_mode_hw(&mut self) -> RBB_BT_MODE_HW_W { - RBB_BT_MODE_HW_W { w: self } + #[must_use] + pub fn pwr_det_en(&mut self) -> PWR_DET_EN_W<31> { + PWR_DET_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -509,11 +221,10 @@ impl crate::Readable for RBB3_SPEC { #[doc = "`write(|w| ..)` method takes [rbb3::W](W) writer structure"] impl crate::Writable for RBB3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rbb3 to value 0"] impl crate::Resettable for RBB3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rbb4.rs b/src/rf/rbb4.rs index 0ba39c1..aa2cf7f 100644 --- a/src/rf/rbb4.rs +++ b/src/rf/rbb4.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,327 +28,122 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `pkdet_out_latch` reader - "] -pub struct PKDET_OUT_LATCH_R(crate::FieldReader); -impl PKDET_OUT_LATCH_R { - pub(crate) fn new(bits: bool) -> Self { - PKDET_OUT_LATCH_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PKDET_OUT_LATCH_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pkdet_out_latch` writer - "] -pub struct PKDET_OUT_LATCH_W<'a> { - w: &'a mut W, -} -impl<'a> PKDET_OUT_LATCH_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24); - self.w - } -} -#[doc = "Field `pkdet_out_raw` reader - "] -pub struct PKDET_OUT_RAW_R(crate::FieldReader); -impl PKDET_OUT_RAW_R { - pub(crate) fn new(bits: bool) -> Self { - PKDET_OUT_RAW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PKDET_OUT_RAW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pkdet_out_raw` writer - "] -pub struct PKDET_OUT_RAW_W<'a> { - w: &'a mut W, -} -impl<'a> PKDET_OUT_RAW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w - } -} -#[doc = "Field `rbb_pkdet_en_hw` reader - "] -pub struct RBB_PKDET_EN_HW_R(crate::FieldReader); -impl RBB_PKDET_EN_HW_R { - pub(crate) fn new(bits: bool) -> Self { - RBB_PKDET_EN_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RBB_PKDET_EN_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rbb_pkdet_en_hw` writer - "] -pub struct RBB_PKDET_EN_HW_W<'a> { - w: &'a mut W, -} -impl<'a> RBB_PKDET_EN_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `rbb_pkdet_out_rstn_hw` reader - "] -pub struct RBB_PKDET_OUT_RSTN_HW_R(crate::FieldReader); -impl RBB_PKDET_OUT_RSTN_HW_R { - pub(crate) fn new(bits: bool) -> Self { - RBB_PKDET_OUT_RSTN_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RBB_PKDET_OUT_RSTN_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rbb_pkdet_out_rstn_hw` writer - "] -pub struct RBB_PKDET_OUT_RSTN_HW_W<'a> { - w: &'a mut W, -} -impl<'a> RBB_PKDET_OUT_RSTN_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} -#[doc = "Field `rbb_pkdet_en` reader - "] -pub struct RBB_PKDET_EN_R(crate::FieldReader); -impl RBB_PKDET_EN_R { - pub(crate) fn new(bits: bool) -> Self { - RBB_PKDET_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RBB_PKDET_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rbb_pkdet_en` writer - "] -pub struct RBB_PKDET_EN_W<'a> { - w: &'a mut W, -} -impl<'a> RBB_PKDET_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `rbb_pkdet_out_rstn` reader - "] -pub struct RBB_PKDET_OUT_RSTN_R(crate::FieldReader); -impl RBB_PKDET_OUT_RSTN_R { - pub(crate) fn new(bits: bool) -> Self { - RBB_PKDET_OUT_RSTN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RBB_PKDET_OUT_RSTN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rbb_pkdet_out_rstn` writer - "] -pub struct RBB_PKDET_OUT_RSTN_W<'a> { - w: &'a mut W, -} -impl<'a> RBB_PKDET_OUT_RSTN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} #[doc = "Field `rbb_pkdet_vth` reader - "] -pub struct RBB_PKDET_VTH_R(crate::FieldReader); -impl RBB_PKDET_VTH_R { - pub(crate) fn new(bits: u8) -> Self { - RBB_PKDET_VTH_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RBB_PKDET_VTH_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RBB_PKDET_VTH_R = crate::FieldReader; #[doc = "Field `rbb_pkdet_vth` writer - "] -pub struct RBB_PKDET_VTH_W<'a> { - w: &'a mut W, -} -impl<'a> RBB_PKDET_VTH_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x0f) | (value as u32 & 0x0f); - self.w - } -} +pub type RBB_PKDET_VTH_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RBB4_SPEC, u8, u8, 4, O>; +#[doc = "Field `rbb_pkdet_out_rstn` reader - "] +pub type RBB_PKDET_OUT_RSTN_R = crate::BitReader; +#[doc = "Field `rbb_pkdet_out_rstn` writer - "] +pub type RBB_PKDET_OUT_RSTN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RBB4_SPEC, bool, O>; +#[doc = "Field `rbb_pkdet_en` reader - "] +pub type RBB_PKDET_EN_R = crate::BitReader; +#[doc = "Field `rbb_pkdet_en` writer - "] +pub type RBB_PKDET_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RBB4_SPEC, bool, O>; +#[doc = "Field `rbb_pkdet_out_rstn_hw` reader - "] +pub type RBB_PKDET_OUT_RSTN_HW_R = crate::BitReader; +#[doc = "Field `rbb_pkdet_out_rstn_hw` writer - "] +pub type RBB_PKDET_OUT_RSTN_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, RBB4_SPEC, bool, O>; +#[doc = "Field `rbb_pkdet_en_hw` reader - "] +pub type RBB_PKDET_EN_HW_R = crate::BitReader; +#[doc = "Field `rbb_pkdet_en_hw` writer - "] +pub type RBB_PKDET_EN_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, RBB4_SPEC, bool, O>; +#[doc = "Field `pkdet_out_raw` reader - "] +pub type PKDET_OUT_RAW_R = crate::BitReader; +#[doc = "Field `pkdet_out_raw` writer - "] +pub type PKDET_OUT_RAW_W<'a, const O: u8> = crate::BitWriter<'a, u32, RBB4_SPEC, bool, O>; +#[doc = "Field `pkdet_out_latch` reader - "] +pub type PKDET_OUT_LATCH_R = crate::BitReader; +#[doc = "Field `pkdet_out_latch` writer - "] +pub type PKDET_OUT_LATCH_W<'a, const O: u8> = crate::BitWriter<'a, u32, RBB4_SPEC, bool, O>; impl R { - #[doc = "Bit 24"] + #[doc = "Bits 0:3"] #[inline(always)] - pub fn pkdet_out_latch(&self) -> PKDET_OUT_LATCH_R { - PKDET_OUT_LATCH_R::new(((self.bits >> 24) & 0x01) != 0) + pub fn rbb_pkdet_vth(&self) -> RBB_PKDET_VTH_R { + RBB_PKDET_VTH_R::new((self.bits & 0x0f) as u8) } - #[doc = "Bit 20"] + #[doc = "Bit 4"] #[inline(always)] - pub fn pkdet_out_raw(&self) -> PKDET_OUT_RAW_R { - PKDET_OUT_RAW_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn rbb_pkdet_out_rstn(&self) -> RBB_PKDET_OUT_RSTN_R { + RBB_PKDET_OUT_RSTN_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 16"] + #[doc = "Bit 8"] #[inline(always)] - pub fn rbb_pkdet_en_hw(&self) -> RBB_PKDET_EN_HW_R { - RBB_PKDET_EN_HW_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn rbb_pkdet_en(&self) -> RBB_PKDET_EN_R { + RBB_PKDET_EN_R::new(((self.bits >> 8) & 1) != 0) } #[doc = "Bit 12"] #[inline(always)] pub fn rbb_pkdet_out_rstn_hw(&self) -> RBB_PKDET_OUT_RSTN_HW_R { - RBB_PKDET_OUT_RSTN_HW_R::new(((self.bits >> 12) & 0x01) != 0) + RBB_PKDET_OUT_RSTN_HW_R::new(((self.bits >> 12) & 1) != 0) } - #[doc = "Bit 8"] + #[doc = "Bit 16"] #[inline(always)] - pub fn rbb_pkdet_en(&self) -> RBB_PKDET_EN_R { - RBB_PKDET_EN_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn rbb_pkdet_en_hw(&self) -> RBB_PKDET_EN_HW_R { + RBB_PKDET_EN_HW_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 4"] + #[doc = "Bit 20"] #[inline(always)] - pub fn rbb_pkdet_out_rstn(&self) -> RBB_PKDET_OUT_RSTN_R { - RBB_PKDET_OUT_RSTN_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn pkdet_out_raw(&self) -> PKDET_OUT_RAW_R { + PKDET_OUT_RAW_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bits 0:3"] + #[doc = "Bit 24"] #[inline(always)] - pub fn rbb_pkdet_vth(&self) -> RBB_PKDET_VTH_R { - RBB_PKDET_VTH_R::new((self.bits & 0x0f) as u8) + pub fn pkdet_out_latch(&self) -> PKDET_OUT_LATCH_R { + PKDET_OUT_LATCH_R::new(((self.bits >> 24) & 1) != 0) } } impl W { - #[doc = "Bit 24"] + #[doc = "Bits 0:3"] #[inline(always)] - pub fn pkdet_out_latch(&mut self) -> PKDET_OUT_LATCH_W { - PKDET_OUT_LATCH_W { w: self } + #[must_use] + pub fn rbb_pkdet_vth(&mut self) -> RBB_PKDET_VTH_W<0> { + RBB_PKDET_VTH_W::new(self) } - #[doc = "Bit 20"] + #[doc = "Bit 4"] #[inline(always)] - pub fn pkdet_out_raw(&mut self) -> PKDET_OUT_RAW_W { - PKDET_OUT_RAW_W { w: self } + #[must_use] + pub fn rbb_pkdet_out_rstn(&mut self) -> RBB_PKDET_OUT_RSTN_W<4> { + RBB_PKDET_OUT_RSTN_W::new(self) } - #[doc = "Bit 16"] + #[doc = "Bit 8"] #[inline(always)] - pub fn rbb_pkdet_en_hw(&mut self) -> RBB_PKDET_EN_HW_W { - RBB_PKDET_EN_HW_W { w: self } + #[must_use] + pub fn rbb_pkdet_en(&mut self) -> RBB_PKDET_EN_W<8> { + RBB_PKDET_EN_W::new(self) } #[doc = "Bit 12"] #[inline(always)] - pub fn rbb_pkdet_out_rstn_hw(&mut self) -> RBB_PKDET_OUT_RSTN_HW_W { - RBB_PKDET_OUT_RSTN_HW_W { w: self } + #[must_use] + pub fn rbb_pkdet_out_rstn_hw(&mut self) -> RBB_PKDET_OUT_RSTN_HW_W<12> { + RBB_PKDET_OUT_RSTN_HW_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bit 16"] #[inline(always)] - pub fn rbb_pkdet_en(&mut self) -> RBB_PKDET_EN_W { - RBB_PKDET_EN_W { w: self } + #[must_use] + pub fn rbb_pkdet_en_hw(&mut self) -> RBB_PKDET_EN_HW_W<16> { + RBB_PKDET_EN_HW_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 20"] #[inline(always)] - pub fn rbb_pkdet_out_rstn(&mut self) -> RBB_PKDET_OUT_RSTN_W { - RBB_PKDET_OUT_RSTN_W { w: self } + #[must_use] + pub fn pkdet_out_raw(&mut self) -> PKDET_OUT_RAW_W<20> { + PKDET_OUT_RAW_W::new(self) } - #[doc = "Bits 0:3"] + #[doc = "Bit 24"] #[inline(always)] - pub fn rbb_pkdet_vth(&mut self) -> RBB_PKDET_VTH_W { - RBB_PKDET_VTH_W { w: self } + #[must_use] + pub fn pkdet_out_latch(&mut self) -> PKDET_OUT_LATCH_W<24> { + PKDET_OUT_LATCH_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -365,11 +161,10 @@ impl crate::Readable for RBB4_SPEC { #[doc = "`write(|w| ..)` method takes [rbb4::W](W) writer structure"] impl crate::Writable for RBB4_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rbb4 to value 0"] impl crate::Resettable for RBB4_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rbb_bw_ctrl_hw.rs b/src/rf/rbb_bw_ctrl_hw.rs index 1a67047..7093e4d 100644 --- a/src/rf/rbb_bw_ctrl_hw.rs +++ b/src/rf/rbb_bw_ctrl_hw.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,61 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `rbb_bt_mode_ble` reader - "] -pub struct RBB_BT_MODE_BLE_R(crate::FieldReader); -impl RBB_BT_MODE_BLE_R { - pub(crate) fn new(bits: bool) -> Self { - RBB_BT_MODE_BLE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RBB_BT_MODE_BLE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RBB_BT_MODE_BLE_R = crate::BitReader; #[doc = "Field `rbb_bt_mode_ble` writer - "] -pub struct RBB_BT_MODE_BLE_W<'a> { - w: &'a mut W, -} -impl<'a> RBB_BT_MODE_BLE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type RBB_BT_MODE_BLE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RBB_BW_CTRL_HW_SPEC, bool, O>; impl R { #[doc = "Bit 0"] #[inline(always)] pub fn rbb_bt_mode_ble(&self) -> RBB_BT_MODE_BLE_R { - RBB_BT_MODE_BLE_R::new((self.bits & 0x01) != 0) + RBB_BT_MODE_BLE_R::new((self.bits & 1) != 0) } } impl W { #[doc = "Bit 0"] #[inline(always)] - pub fn rbb_bt_mode_ble(&mut self) -> RBB_BT_MODE_BLE_W { - RBB_BT_MODE_BLE_W { w: self } + #[must_use] + pub fn rbb_bt_mode_ble(&mut self) -> RBB_BT_MODE_BLE_W<0> { + RBB_BT_MODE_BLE_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -99,11 +72,10 @@ impl crate::Readable for RBB_BW_CTRL_HW_SPEC { #[doc = "`write(|w| ..)` method takes [rbb_bw_ctrl_hw::W](W) writer structure"] impl crate::Writable for RBB_BW_CTRL_HW_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rbb_bw_ctrl_hw to value 0"] impl crate::Resettable for RBB_BW_CTRL_HW_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rbb_gain_index1.rs b/src/rf/rbb_gain_index1.rs index 343c8a7..fe5f9ed 100644 --- a/src/rf/rbb_gain_index1.rs +++ b/src/rf/rbb_gain_index1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,303 +28,145 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `gain_ctrl3_gc_rbb2` reader - "] -pub struct GAIN_CTRL3_GC_RBB2_R(crate::FieldReader); -impl GAIN_CTRL3_GC_RBB2_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL3_GC_RBB2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL3_GC_RBB2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl3_gc_rbb2` writer - "] -pub struct GAIN_CTRL3_GC_RBB2_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL3_GC_RBB2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 28)) | ((value as u32 & 0x07) << 28); - self.w - } -} -#[doc = "Field `gain_ctrl3_gc_rbb1` reader - "] -pub struct GAIN_CTRL3_GC_RBB1_R(crate::FieldReader); -impl GAIN_CTRL3_GC_RBB1_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL3_GC_RBB1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL3_GC_RBB1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl3_gc_rbb1` writer - "] -pub struct GAIN_CTRL3_GC_RBB1_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL3_GC_RBB1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 24)) | ((value as u32 & 0x03) << 24); - self.w - } -} -#[doc = "Field `gain_ctrl2_gc_rbb2` reader - "] -pub struct GAIN_CTRL2_GC_RBB2_R(crate::FieldReader); -impl GAIN_CTRL2_GC_RBB2_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL2_GC_RBB2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL2_GC_RBB2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl2_gc_rbb2` writer - "] -pub struct GAIN_CTRL2_GC_RBB2_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL2_GC_RBB2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 20)) | ((value as u32 & 0x07) << 20); - self.w - } -} -#[doc = "Field `gain_ctrl2_gc_rbb1` reader - "] -pub struct GAIN_CTRL2_GC_RBB1_R(crate::FieldReader); -impl GAIN_CTRL2_GC_RBB1_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL2_GC_RBB1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL2_GC_RBB1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl2_gc_rbb1` writer - "] -pub struct GAIN_CTRL2_GC_RBB1_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL2_GC_RBB1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 16)) | ((value as u32 & 0x03) << 16); - self.w - } -} -#[doc = "Field `gain_ctrl1_gc_rbb2` reader - "] -pub struct GAIN_CTRL1_GC_RBB2_R(crate::FieldReader); -impl GAIN_CTRL1_GC_RBB2_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL1_GC_RBB2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL1_GC_RBB2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl1_gc_rbb2` writer - "] -pub struct GAIN_CTRL1_GC_RBB2_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL1_GC_RBB2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 12)) | ((value as u32 & 0x07) << 12); - self.w - } -} -#[doc = "Field `gain_ctrl1_gc_rbb1` reader - "] -pub struct GAIN_CTRL1_GC_RBB1_R(crate::FieldReader); -impl GAIN_CTRL1_GC_RBB1_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL1_GC_RBB1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL1_GC_RBB1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl1_gc_rbb1` writer - "] -pub struct GAIN_CTRL1_GC_RBB1_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL1_GC_RBB1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} -#[doc = "Field `gain_ctrl0_gc_rbb2` reader - "] -pub struct GAIN_CTRL0_GC_RBB2_R(crate::FieldReader); -impl GAIN_CTRL0_GC_RBB2_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL0_GC_RBB2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL0_GC_RBB2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl0_gc_rbb2` writer - "] -pub struct GAIN_CTRL0_GC_RBB2_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL0_GC_RBB2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 4)) | ((value as u32 & 0x07) << 4); - self.w - } -} #[doc = "Field `gain_ctrl0_gc_rbb1` reader - "] -pub struct GAIN_CTRL0_GC_RBB1_R(crate::FieldReader); -impl GAIN_CTRL0_GC_RBB1_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL0_GC_RBB1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL0_GC_RBB1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type GAIN_CTRL0_GC_RBB1_R = crate::FieldReader; #[doc = "Field `gain_ctrl0_gc_rbb1` writer - "] -pub struct GAIN_CTRL0_GC_RBB1_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL0_GC_RBB1_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type GAIN_CTRL0_GC_RBB1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RBB_GAIN_INDEX1_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl0_gc_rbb2` reader - "] +pub type GAIN_CTRL0_GC_RBB2_R = crate::FieldReader; +#[doc = "Field `gain_ctrl0_gc_rbb2` writer - "] +pub type GAIN_CTRL0_GC_RBB2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RBB_GAIN_INDEX1_SPEC, u8, u8, 3, O>; +#[doc = "Field `gain_ctrl1_gc_rbb1` reader - "] +pub type GAIN_CTRL1_GC_RBB1_R = crate::FieldReader; +#[doc = "Field `gain_ctrl1_gc_rbb1` writer - "] +pub type GAIN_CTRL1_GC_RBB1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RBB_GAIN_INDEX1_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl1_gc_rbb2` reader - "] +pub type GAIN_CTRL1_GC_RBB2_R = crate::FieldReader; +#[doc = "Field `gain_ctrl1_gc_rbb2` writer - "] +pub type GAIN_CTRL1_GC_RBB2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RBB_GAIN_INDEX1_SPEC, u8, u8, 3, O>; +#[doc = "Field `gain_ctrl2_gc_rbb1` reader - "] +pub type GAIN_CTRL2_GC_RBB1_R = crate::FieldReader; +#[doc = "Field `gain_ctrl2_gc_rbb1` writer - "] +pub type GAIN_CTRL2_GC_RBB1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RBB_GAIN_INDEX1_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl2_gc_rbb2` reader - "] +pub type GAIN_CTRL2_GC_RBB2_R = crate::FieldReader; +#[doc = "Field `gain_ctrl2_gc_rbb2` writer - "] +pub type GAIN_CTRL2_GC_RBB2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RBB_GAIN_INDEX1_SPEC, u8, u8, 3, O>; +#[doc = "Field `gain_ctrl3_gc_rbb1` reader - "] +pub type GAIN_CTRL3_GC_RBB1_R = crate::FieldReader; +#[doc = "Field `gain_ctrl3_gc_rbb1` writer - "] +pub type GAIN_CTRL3_GC_RBB1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RBB_GAIN_INDEX1_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl3_gc_rbb2` reader - "] +pub type GAIN_CTRL3_GC_RBB2_R = crate::FieldReader; +#[doc = "Field `gain_ctrl3_gc_rbb2` writer - "] +pub type GAIN_CTRL3_GC_RBB2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RBB_GAIN_INDEX1_SPEC, u8, u8, 3, O>; +impl R { + #[doc = "Bits 0:1"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w + pub fn gain_ctrl0_gc_rbb1(&self) -> GAIN_CTRL0_GC_RBB1_R { + GAIN_CTRL0_GC_RBB1_R::new((self.bits & 3) as u8) } -} -impl R { - #[doc = "Bits 28:30"] + #[doc = "Bits 4:6"] #[inline(always)] - pub fn gain_ctrl3_gc_rbb2(&self) -> GAIN_CTRL3_GC_RBB2_R { - GAIN_CTRL3_GC_RBB2_R::new(((self.bits >> 28) & 0x07) as u8) + pub fn gain_ctrl0_gc_rbb2(&self) -> GAIN_CTRL0_GC_RBB2_R { + GAIN_CTRL0_GC_RBB2_R::new(((self.bits >> 4) & 7) as u8) } - #[doc = "Bits 24:25"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn gain_ctrl3_gc_rbb1(&self) -> GAIN_CTRL3_GC_RBB1_R { - GAIN_CTRL3_GC_RBB1_R::new(((self.bits >> 24) & 0x03) as u8) + pub fn gain_ctrl1_gc_rbb1(&self) -> GAIN_CTRL1_GC_RBB1_R { + GAIN_CTRL1_GC_RBB1_R::new(((self.bits >> 8) & 3) as u8) } - #[doc = "Bits 20:22"] + #[doc = "Bits 12:14"] #[inline(always)] - pub fn gain_ctrl2_gc_rbb2(&self) -> GAIN_CTRL2_GC_RBB2_R { - GAIN_CTRL2_GC_RBB2_R::new(((self.bits >> 20) & 0x07) as u8) + pub fn gain_ctrl1_gc_rbb2(&self) -> GAIN_CTRL1_GC_RBB2_R { + GAIN_CTRL1_GC_RBB2_R::new(((self.bits >> 12) & 7) as u8) } #[doc = "Bits 16:17"] #[inline(always)] pub fn gain_ctrl2_gc_rbb1(&self) -> GAIN_CTRL2_GC_RBB1_R { - GAIN_CTRL2_GC_RBB1_R::new(((self.bits >> 16) & 0x03) as u8) + GAIN_CTRL2_GC_RBB1_R::new(((self.bits >> 16) & 3) as u8) } - #[doc = "Bits 12:14"] - #[inline(always)] - pub fn gain_ctrl1_gc_rbb2(&self) -> GAIN_CTRL1_GC_RBB2_R { - GAIN_CTRL1_GC_RBB2_R::new(((self.bits >> 12) & 0x07) as u8) - } - #[doc = "Bits 8:9"] + #[doc = "Bits 20:22"] #[inline(always)] - pub fn gain_ctrl1_gc_rbb1(&self) -> GAIN_CTRL1_GC_RBB1_R { - GAIN_CTRL1_GC_RBB1_R::new(((self.bits >> 8) & 0x03) as u8) + pub fn gain_ctrl2_gc_rbb2(&self) -> GAIN_CTRL2_GC_RBB2_R { + GAIN_CTRL2_GC_RBB2_R::new(((self.bits >> 20) & 7) as u8) } - #[doc = "Bits 4:6"] + #[doc = "Bits 24:25"] #[inline(always)] - pub fn gain_ctrl0_gc_rbb2(&self) -> GAIN_CTRL0_GC_RBB2_R { - GAIN_CTRL0_GC_RBB2_R::new(((self.bits >> 4) & 0x07) as u8) + pub fn gain_ctrl3_gc_rbb1(&self) -> GAIN_CTRL3_GC_RBB1_R { + GAIN_CTRL3_GC_RBB1_R::new(((self.bits >> 24) & 3) as u8) } - #[doc = "Bits 0:1"] + #[doc = "Bits 28:30"] #[inline(always)] - pub fn gain_ctrl0_gc_rbb1(&self) -> GAIN_CTRL0_GC_RBB1_R { - GAIN_CTRL0_GC_RBB1_R::new((self.bits & 0x03) as u8) + pub fn gain_ctrl3_gc_rbb2(&self) -> GAIN_CTRL3_GC_RBB2_R { + GAIN_CTRL3_GC_RBB2_R::new(((self.bits >> 28) & 7) as u8) } } impl W { - #[doc = "Bits 28:30"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn gain_ctrl3_gc_rbb2(&mut self) -> GAIN_CTRL3_GC_RBB2_W { - GAIN_CTRL3_GC_RBB2_W { w: self } + #[must_use] + pub fn gain_ctrl0_gc_rbb1(&mut self) -> GAIN_CTRL0_GC_RBB1_W<0> { + GAIN_CTRL0_GC_RBB1_W::new(self) } - #[doc = "Bits 24:25"] + #[doc = "Bits 4:6"] #[inline(always)] - pub fn gain_ctrl3_gc_rbb1(&mut self) -> GAIN_CTRL3_GC_RBB1_W { - GAIN_CTRL3_GC_RBB1_W { w: self } + #[must_use] + pub fn gain_ctrl0_gc_rbb2(&mut self) -> GAIN_CTRL0_GC_RBB2_W<4> { + GAIN_CTRL0_GC_RBB2_W::new(self) } - #[doc = "Bits 20:22"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn gain_ctrl2_gc_rbb2(&mut self) -> GAIN_CTRL2_GC_RBB2_W { - GAIN_CTRL2_GC_RBB2_W { w: self } + #[must_use] + pub fn gain_ctrl1_gc_rbb1(&mut self) -> GAIN_CTRL1_GC_RBB1_W<8> { + GAIN_CTRL1_GC_RBB1_W::new(self) } - #[doc = "Bits 16:17"] + #[doc = "Bits 12:14"] #[inline(always)] - pub fn gain_ctrl2_gc_rbb1(&mut self) -> GAIN_CTRL2_GC_RBB1_W { - GAIN_CTRL2_GC_RBB1_W { w: self } + #[must_use] + pub fn gain_ctrl1_gc_rbb2(&mut self) -> GAIN_CTRL1_GC_RBB2_W<12> { + GAIN_CTRL1_GC_RBB2_W::new(self) } - #[doc = "Bits 12:14"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn gain_ctrl1_gc_rbb2(&mut self) -> GAIN_CTRL1_GC_RBB2_W { - GAIN_CTRL1_GC_RBB2_W { w: self } + #[must_use] + pub fn gain_ctrl2_gc_rbb1(&mut self) -> GAIN_CTRL2_GC_RBB1_W<16> { + GAIN_CTRL2_GC_RBB1_W::new(self) } - #[doc = "Bits 8:9"] + #[doc = "Bits 20:22"] #[inline(always)] - pub fn gain_ctrl1_gc_rbb1(&mut self) -> GAIN_CTRL1_GC_RBB1_W { - GAIN_CTRL1_GC_RBB1_W { w: self } + #[must_use] + pub fn gain_ctrl2_gc_rbb2(&mut self) -> GAIN_CTRL2_GC_RBB2_W<20> { + GAIN_CTRL2_GC_RBB2_W::new(self) } - #[doc = "Bits 4:6"] + #[doc = "Bits 24:25"] #[inline(always)] - pub fn gain_ctrl0_gc_rbb2(&mut self) -> GAIN_CTRL0_GC_RBB2_W { - GAIN_CTRL0_GC_RBB2_W { w: self } + #[must_use] + pub fn gain_ctrl3_gc_rbb1(&mut self) -> GAIN_CTRL3_GC_RBB1_W<24> { + GAIN_CTRL3_GC_RBB1_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bits 28:30"] #[inline(always)] - pub fn gain_ctrl0_gc_rbb1(&mut self) -> GAIN_CTRL0_GC_RBB1_W { - GAIN_CTRL0_GC_RBB1_W { w: self } + #[must_use] + pub fn gain_ctrl3_gc_rbb2(&mut self) -> GAIN_CTRL3_GC_RBB2_W<28> { + GAIN_CTRL3_GC_RBB2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -341,11 +184,10 @@ impl crate::Readable for RBB_GAIN_INDEX1_SPEC { #[doc = "`write(|w| ..)` method takes [rbb_gain_index1::W](W) writer structure"] impl crate::Writable for RBB_GAIN_INDEX1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rbb_gain_index1 to value 0"] impl crate::Resettable for RBB_GAIN_INDEX1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rbb_gain_index2.rs b/src/rf/rbb_gain_index2.rs index 4d02bc5..5d94f6b 100644 --- a/src/rf/rbb_gain_index2.rs +++ b/src/rf/rbb_gain_index2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,303 +28,145 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `gain_ctrl7_gc_rbb2` reader - "] -pub struct GAIN_CTRL7_GC_RBB2_R(crate::FieldReader); -impl GAIN_CTRL7_GC_RBB2_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL7_GC_RBB2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL7_GC_RBB2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl7_gc_rbb2` writer - "] -pub struct GAIN_CTRL7_GC_RBB2_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL7_GC_RBB2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 28)) | ((value as u32 & 0x07) << 28); - self.w - } -} -#[doc = "Field `gain_ctrl7_gc_rbb1` reader - "] -pub struct GAIN_CTRL7_GC_RBB1_R(crate::FieldReader); -impl GAIN_CTRL7_GC_RBB1_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL7_GC_RBB1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL7_GC_RBB1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl7_gc_rbb1` writer - "] -pub struct GAIN_CTRL7_GC_RBB1_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL7_GC_RBB1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 24)) | ((value as u32 & 0x03) << 24); - self.w - } -} -#[doc = "Field `gain_ctrl6_gc_rbb2` reader - "] -pub struct GAIN_CTRL6_GC_RBB2_R(crate::FieldReader); -impl GAIN_CTRL6_GC_RBB2_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL6_GC_RBB2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL6_GC_RBB2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl6_gc_rbb2` writer - "] -pub struct GAIN_CTRL6_GC_RBB2_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL6_GC_RBB2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 20)) | ((value as u32 & 0x07) << 20); - self.w - } -} -#[doc = "Field `gain_ctrl6_gc_rbb1` reader - "] -pub struct GAIN_CTRL6_GC_RBB1_R(crate::FieldReader); -impl GAIN_CTRL6_GC_RBB1_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL6_GC_RBB1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL6_GC_RBB1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl6_gc_rbb1` writer - "] -pub struct GAIN_CTRL6_GC_RBB1_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL6_GC_RBB1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 16)) | ((value as u32 & 0x03) << 16); - self.w - } -} -#[doc = "Field `gain_ctrl5_gc_rbb2` reader - "] -pub struct GAIN_CTRL5_GC_RBB2_R(crate::FieldReader); -impl GAIN_CTRL5_GC_RBB2_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL5_GC_RBB2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL5_GC_RBB2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl5_gc_rbb2` writer - "] -pub struct GAIN_CTRL5_GC_RBB2_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL5_GC_RBB2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 12)) | ((value as u32 & 0x07) << 12); - self.w - } -} -#[doc = "Field `gain_ctrl5_gc_rbb1` reader - "] -pub struct GAIN_CTRL5_GC_RBB1_R(crate::FieldReader); -impl GAIN_CTRL5_GC_RBB1_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL5_GC_RBB1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL5_GC_RBB1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl5_gc_rbb1` writer - "] -pub struct GAIN_CTRL5_GC_RBB1_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL5_GC_RBB1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} -#[doc = "Field `gain_ctrl4_gc_rbb2` reader - "] -pub struct GAIN_CTRL4_GC_RBB2_R(crate::FieldReader); -impl GAIN_CTRL4_GC_RBB2_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL4_GC_RBB2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL4_GC_RBB2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl4_gc_rbb2` writer - "] -pub struct GAIN_CTRL4_GC_RBB2_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL4_GC_RBB2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 4)) | ((value as u32 & 0x07) << 4); - self.w - } -} #[doc = "Field `gain_ctrl4_gc_rbb1` reader - "] -pub struct GAIN_CTRL4_GC_RBB1_R(crate::FieldReader); -impl GAIN_CTRL4_GC_RBB1_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL4_GC_RBB1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL4_GC_RBB1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type GAIN_CTRL4_GC_RBB1_R = crate::FieldReader; #[doc = "Field `gain_ctrl4_gc_rbb1` writer - "] -pub struct GAIN_CTRL4_GC_RBB1_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL4_GC_RBB1_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type GAIN_CTRL4_GC_RBB1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RBB_GAIN_INDEX2_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl4_gc_rbb2` reader - "] +pub type GAIN_CTRL4_GC_RBB2_R = crate::FieldReader; +#[doc = "Field `gain_ctrl4_gc_rbb2` writer - "] +pub type GAIN_CTRL4_GC_RBB2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RBB_GAIN_INDEX2_SPEC, u8, u8, 3, O>; +#[doc = "Field `gain_ctrl5_gc_rbb1` reader - "] +pub type GAIN_CTRL5_GC_RBB1_R = crate::FieldReader; +#[doc = "Field `gain_ctrl5_gc_rbb1` writer - "] +pub type GAIN_CTRL5_GC_RBB1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RBB_GAIN_INDEX2_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl5_gc_rbb2` reader - "] +pub type GAIN_CTRL5_GC_RBB2_R = crate::FieldReader; +#[doc = "Field `gain_ctrl5_gc_rbb2` writer - "] +pub type GAIN_CTRL5_GC_RBB2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RBB_GAIN_INDEX2_SPEC, u8, u8, 3, O>; +#[doc = "Field `gain_ctrl6_gc_rbb1` reader - "] +pub type GAIN_CTRL6_GC_RBB1_R = crate::FieldReader; +#[doc = "Field `gain_ctrl6_gc_rbb1` writer - "] +pub type GAIN_CTRL6_GC_RBB1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RBB_GAIN_INDEX2_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl6_gc_rbb2` reader - "] +pub type GAIN_CTRL6_GC_RBB2_R = crate::FieldReader; +#[doc = "Field `gain_ctrl6_gc_rbb2` writer - "] +pub type GAIN_CTRL6_GC_RBB2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RBB_GAIN_INDEX2_SPEC, u8, u8, 3, O>; +#[doc = "Field `gain_ctrl7_gc_rbb1` reader - "] +pub type GAIN_CTRL7_GC_RBB1_R = crate::FieldReader; +#[doc = "Field `gain_ctrl7_gc_rbb1` writer - "] +pub type GAIN_CTRL7_GC_RBB1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RBB_GAIN_INDEX2_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl7_gc_rbb2` reader - "] +pub type GAIN_CTRL7_GC_RBB2_R = crate::FieldReader; +#[doc = "Field `gain_ctrl7_gc_rbb2` writer - "] +pub type GAIN_CTRL7_GC_RBB2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RBB_GAIN_INDEX2_SPEC, u8, u8, 3, O>; +impl R { + #[doc = "Bits 0:1"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w + pub fn gain_ctrl4_gc_rbb1(&self) -> GAIN_CTRL4_GC_RBB1_R { + GAIN_CTRL4_GC_RBB1_R::new((self.bits & 3) as u8) } -} -impl R { - #[doc = "Bits 28:30"] + #[doc = "Bits 4:6"] #[inline(always)] - pub fn gain_ctrl7_gc_rbb2(&self) -> GAIN_CTRL7_GC_RBB2_R { - GAIN_CTRL7_GC_RBB2_R::new(((self.bits >> 28) & 0x07) as u8) + pub fn gain_ctrl4_gc_rbb2(&self) -> GAIN_CTRL4_GC_RBB2_R { + GAIN_CTRL4_GC_RBB2_R::new(((self.bits >> 4) & 7) as u8) } - #[doc = "Bits 24:25"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn gain_ctrl7_gc_rbb1(&self) -> GAIN_CTRL7_GC_RBB1_R { - GAIN_CTRL7_GC_RBB1_R::new(((self.bits >> 24) & 0x03) as u8) + pub fn gain_ctrl5_gc_rbb1(&self) -> GAIN_CTRL5_GC_RBB1_R { + GAIN_CTRL5_GC_RBB1_R::new(((self.bits >> 8) & 3) as u8) } - #[doc = "Bits 20:22"] + #[doc = "Bits 12:14"] #[inline(always)] - pub fn gain_ctrl6_gc_rbb2(&self) -> GAIN_CTRL6_GC_RBB2_R { - GAIN_CTRL6_GC_RBB2_R::new(((self.bits >> 20) & 0x07) as u8) + pub fn gain_ctrl5_gc_rbb2(&self) -> GAIN_CTRL5_GC_RBB2_R { + GAIN_CTRL5_GC_RBB2_R::new(((self.bits >> 12) & 7) as u8) } #[doc = "Bits 16:17"] #[inline(always)] pub fn gain_ctrl6_gc_rbb1(&self) -> GAIN_CTRL6_GC_RBB1_R { - GAIN_CTRL6_GC_RBB1_R::new(((self.bits >> 16) & 0x03) as u8) + GAIN_CTRL6_GC_RBB1_R::new(((self.bits >> 16) & 3) as u8) } - #[doc = "Bits 12:14"] - #[inline(always)] - pub fn gain_ctrl5_gc_rbb2(&self) -> GAIN_CTRL5_GC_RBB2_R { - GAIN_CTRL5_GC_RBB2_R::new(((self.bits >> 12) & 0x07) as u8) - } - #[doc = "Bits 8:9"] + #[doc = "Bits 20:22"] #[inline(always)] - pub fn gain_ctrl5_gc_rbb1(&self) -> GAIN_CTRL5_GC_RBB1_R { - GAIN_CTRL5_GC_RBB1_R::new(((self.bits >> 8) & 0x03) as u8) + pub fn gain_ctrl6_gc_rbb2(&self) -> GAIN_CTRL6_GC_RBB2_R { + GAIN_CTRL6_GC_RBB2_R::new(((self.bits >> 20) & 7) as u8) } - #[doc = "Bits 4:6"] + #[doc = "Bits 24:25"] #[inline(always)] - pub fn gain_ctrl4_gc_rbb2(&self) -> GAIN_CTRL4_GC_RBB2_R { - GAIN_CTRL4_GC_RBB2_R::new(((self.bits >> 4) & 0x07) as u8) + pub fn gain_ctrl7_gc_rbb1(&self) -> GAIN_CTRL7_GC_RBB1_R { + GAIN_CTRL7_GC_RBB1_R::new(((self.bits >> 24) & 3) as u8) } - #[doc = "Bits 0:1"] + #[doc = "Bits 28:30"] #[inline(always)] - pub fn gain_ctrl4_gc_rbb1(&self) -> GAIN_CTRL4_GC_RBB1_R { - GAIN_CTRL4_GC_RBB1_R::new((self.bits & 0x03) as u8) + pub fn gain_ctrl7_gc_rbb2(&self) -> GAIN_CTRL7_GC_RBB2_R { + GAIN_CTRL7_GC_RBB2_R::new(((self.bits >> 28) & 7) as u8) } } impl W { - #[doc = "Bits 28:30"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn gain_ctrl7_gc_rbb2(&mut self) -> GAIN_CTRL7_GC_RBB2_W { - GAIN_CTRL7_GC_RBB2_W { w: self } + #[must_use] + pub fn gain_ctrl4_gc_rbb1(&mut self) -> GAIN_CTRL4_GC_RBB1_W<0> { + GAIN_CTRL4_GC_RBB1_W::new(self) } - #[doc = "Bits 24:25"] + #[doc = "Bits 4:6"] #[inline(always)] - pub fn gain_ctrl7_gc_rbb1(&mut self) -> GAIN_CTRL7_GC_RBB1_W { - GAIN_CTRL7_GC_RBB1_W { w: self } + #[must_use] + pub fn gain_ctrl4_gc_rbb2(&mut self) -> GAIN_CTRL4_GC_RBB2_W<4> { + GAIN_CTRL4_GC_RBB2_W::new(self) } - #[doc = "Bits 20:22"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn gain_ctrl6_gc_rbb2(&mut self) -> GAIN_CTRL6_GC_RBB2_W { - GAIN_CTRL6_GC_RBB2_W { w: self } + #[must_use] + pub fn gain_ctrl5_gc_rbb1(&mut self) -> GAIN_CTRL5_GC_RBB1_W<8> { + GAIN_CTRL5_GC_RBB1_W::new(self) } - #[doc = "Bits 16:17"] + #[doc = "Bits 12:14"] #[inline(always)] - pub fn gain_ctrl6_gc_rbb1(&mut self) -> GAIN_CTRL6_GC_RBB1_W { - GAIN_CTRL6_GC_RBB1_W { w: self } + #[must_use] + pub fn gain_ctrl5_gc_rbb2(&mut self) -> GAIN_CTRL5_GC_RBB2_W<12> { + GAIN_CTRL5_GC_RBB2_W::new(self) } - #[doc = "Bits 12:14"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn gain_ctrl5_gc_rbb2(&mut self) -> GAIN_CTRL5_GC_RBB2_W { - GAIN_CTRL5_GC_RBB2_W { w: self } + #[must_use] + pub fn gain_ctrl6_gc_rbb1(&mut self) -> GAIN_CTRL6_GC_RBB1_W<16> { + GAIN_CTRL6_GC_RBB1_W::new(self) } - #[doc = "Bits 8:9"] + #[doc = "Bits 20:22"] #[inline(always)] - pub fn gain_ctrl5_gc_rbb1(&mut self) -> GAIN_CTRL5_GC_RBB1_W { - GAIN_CTRL5_GC_RBB1_W { w: self } + #[must_use] + pub fn gain_ctrl6_gc_rbb2(&mut self) -> GAIN_CTRL6_GC_RBB2_W<20> { + GAIN_CTRL6_GC_RBB2_W::new(self) } - #[doc = "Bits 4:6"] + #[doc = "Bits 24:25"] #[inline(always)] - pub fn gain_ctrl4_gc_rbb2(&mut self) -> GAIN_CTRL4_GC_RBB2_W { - GAIN_CTRL4_GC_RBB2_W { w: self } + #[must_use] + pub fn gain_ctrl7_gc_rbb1(&mut self) -> GAIN_CTRL7_GC_RBB1_W<24> { + GAIN_CTRL7_GC_RBB1_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bits 28:30"] #[inline(always)] - pub fn gain_ctrl4_gc_rbb1(&mut self) -> GAIN_CTRL4_GC_RBB1_W { - GAIN_CTRL4_GC_RBB1_W { w: self } + #[must_use] + pub fn gain_ctrl7_gc_rbb2(&mut self) -> GAIN_CTRL7_GC_RBB2_W<28> { + GAIN_CTRL7_GC_RBB2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -341,11 +184,10 @@ impl crate::Readable for RBB_GAIN_INDEX2_SPEC { #[doc = "`write(|w| ..)` method takes [rbb_gain_index2::W](W) writer structure"] impl crate::Writable for RBB_GAIN_INDEX2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rbb_gain_index2 to value 0"] impl crate::Resettable for RBB_GAIN_INDEX2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rbb_gain_index3.rs b/src/rf/rbb_gain_index3.rs index a34ee0c..e268fa7 100644 --- a/src/rf/rbb_gain_index3.rs +++ b/src/rf/rbb_gain_index3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,303 +28,145 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `gain_ctrl11_gc_rbb2` reader - "] -pub struct GAIN_CTRL11_GC_RBB2_R(crate::FieldReader); -impl GAIN_CTRL11_GC_RBB2_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL11_GC_RBB2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL11_GC_RBB2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl11_gc_rbb2` writer - "] -pub struct GAIN_CTRL11_GC_RBB2_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL11_GC_RBB2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 28)) | ((value as u32 & 0x07) << 28); - self.w - } -} -#[doc = "Field `gain_ctrl11_gc_rbb1` reader - "] -pub struct GAIN_CTRL11_GC_RBB1_R(crate::FieldReader); -impl GAIN_CTRL11_GC_RBB1_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL11_GC_RBB1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL11_GC_RBB1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl11_gc_rbb1` writer - "] -pub struct GAIN_CTRL11_GC_RBB1_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL11_GC_RBB1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 24)) | ((value as u32 & 0x03) << 24); - self.w - } -} -#[doc = "Field `gain_ctrl10_gc_rbb2` reader - "] -pub struct GAIN_CTRL10_GC_RBB2_R(crate::FieldReader); -impl GAIN_CTRL10_GC_RBB2_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL10_GC_RBB2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL10_GC_RBB2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl10_gc_rbb2` writer - "] -pub struct GAIN_CTRL10_GC_RBB2_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL10_GC_RBB2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 20)) | ((value as u32 & 0x07) << 20); - self.w - } -} -#[doc = "Field `gain_ctrl10_gc_rbb1` reader - "] -pub struct GAIN_CTRL10_GC_RBB1_R(crate::FieldReader); -impl GAIN_CTRL10_GC_RBB1_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL10_GC_RBB1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL10_GC_RBB1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl10_gc_rbb1` writer - "] -pub struct GAIN_CTRL10_GC_RBB1_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL10_GC_RBB1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 16)) | ((value as u32 & 0x03) << 16); - self.w - } -} -#[doc = "Field `gain_ctrl9_gc_rbb2` reader - "] -pub struct GAIN_CTRL9_GC_RBB2_R(crate::FieldReader); -impl GAIN_CTRL9_GC_RBB2_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL9_GC_RBB2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL9_GC_RBB2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl9_gc_rbb2` writer - "] -pub struct GAIN_CTRL9_GC_RBB2_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL9_GC_RBB2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 12)) | ((value as u32 & 0x07) << 12); - self.w - } -} -#[doc = "Field `gain_ctrl9_gc_rbb1` reader - "] -pub struct GAIN_CTRL9_GC_RBB1_R(crate::FieldReader); -impl GAIN_CTRL9_GC_RBB1_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL9_GC_RBB1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL9_GC_RBB1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl9_gc_rbb1` writer - "] -pub struct GAIN_CTRL9_GC_RBB1_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL9_GC_RBB1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} -#[doc = "Field `gain_ctrl8_gc_rbb2` reader - "] -pub struct GAIN_CTRL8_GC_RBB2_R(crate::FieldReader); -impl GAIN_CTRL8_GC_RBB2_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL8_GC_RBB2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL8_GC_RBB2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl8_gc_rbb2` writer - "] -pub struct GAIN_CTRL8_GC_RBB2_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL8_GC_RBB2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 4)) | ((value as u32 & 0x07) << 4); - self.w - } -} #[doc = "Field `gain_ctrl8_gc_rbb1` reader - "] -pub struct GAIN_CTRL8_GC_RBB1_R(crate::FieldReader); -impl GAIN_CTRL8_GC_RBB1_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL8_GC_RBB1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL8_GC_RBB1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type GAIN_CTRL8_GC_RBB1_R = crate::FieldReader; #[doc = "Field `gain_ctrl8_gc_rbb1` writer - "] -pub struct GAIN_CTRL8_GC_RBB1_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL8_GC_RBB1_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type GAIN_CTRL8_GC_RBB1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RBB_GAIN_INDEX3_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl8_gc_rbb2` reader - "] +pub type GAIN_CTRL8_GC_RBB2_R = crate::FieldReader; +#[doc = "Field `gain_ctrl8_gc_rbb2` writer - "] +pub type GAIN_CTRL8_GC_RBB2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RBB_GAIN_INDEX3_SPEC, u8, u8, 3, O>; +#[doc = "Field `gain_ctrl9_gc_rbb1` reader - "] +pub type GAIN_CTRL9_GC_RBB1_R = crate::FieldReader; +#[doc = "Field `gain_ctrl9_gc_rbb1` writer - "] +pub type GAIN_CTRL9_GC_RBB1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RBB_GAIN_INDEX3_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl9_gc_rbb2` reader - "] +pub type GAIN_CTRL9_GC_RBB2_R = crate::FieldReader; +#[doc = "Field `gain_ctrl9_gc_rbb2` writer - "] +pub type GAIN_CTRL9_GC_RBB2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RBB_GAIN_INDEX3_SPEC, u8, u8, 3, O>; +#[doc = "Field `gain_ctrl10_gc_rbb1` reader - "] +pub type GAIN_CTRL10_GC_RBB1_R = crate::FieldReader; +#[doc = "Field `gain_ctrl10_gc_rbb1` writer - "] +pub type GAIN_CTRL10_GC_RBB1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RBB_GAIN_INDEX3_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl10_gc_rbb2` reader - "] +pub type GAIN_CTRL10_GC_RBB2_R = crate::FieldReader; +#[doc = "Field `gain_ctrl10_gc_rbb2` writer - "] +pub type GAIN_CTRL10_GC_RBB2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RBB_GAIN_INDEX3_SPEC, u8, u8, 3, O>; +#[doc = "Field `gain_ctrl11_gc_rbb1` reader - "] +pub type GAIN_CTRL11_GC_RBB1_R = crate::FieldReader; +#[doc = "Field `gain_ctrl11_gc_rbb1` writer - "] +pub type GAIN_CTRL11_GC_RBB1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RBB_GAIN_INDEX3_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl11_gc_rbb2` reader - "] +pub type GAIN_CTRL11_GC_RBB2_R = crate::FieldReader; +#[doc = "Field `gain_ctrl11_gc_rbb2` writer - "] +pub type GAIN_CTRL11_GC_RBB2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RBB_GAIN_INDEX3_SPEC, u8, u8, 3, O>; +impl R { + #[doc = "Bits 0:1"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w + pub fn gain_ctrl8_gc_rbb1(&self) -> GAIN_CTRL8_GC_RBB1_R { + GAIN_CTRL8_GC_RBB1_R::new((self.bits & 3) as u8) } -} -impl R { - #[doc = "Bits 28:30"] + #[doc = "Bits 4:6"] #[inline(always)] - pub fn gain_ctrl11_gc_rbb2(&self) -> GAIN_CTRL11_GC_RBB2_R { - GAIN_CTRL11_GC_RBB2_R::new(((self.bits >> 28) & 0x07) as u8) + pub fn gain_ctrl8_gc_rbb2(&self) -> GAIN_CTRL8_GC_RBB2_R { + GAIN_CTRL8_GC_RBB2_R::new(((self.bits >> 4) & 7) as u8) } - #[doc = "Bits 24:25"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn gain_ctrl11_gc_rbb1(&self) -> GAIN_CTRL11_GC_RBB1_R { - GAIN_CTRL11_GC_RBB1_R::new(((self.bits >> 24) & 0x03) as u8) + pub fn gain_ctrl9_gc_rbb1(&self) -> GAIN_CTRL9_GC_RBB1_R { + GAIN_CTRL9_GC_RBB1_R::new(((self.bits >> 8) & 3) as u8) } - #[doc = "Bits 20:22"] + #[doc = "Bits 12:14"] #[inline(always)] - pub fn gain_ctrl10_gc_rbb2(&self) -> GAIN_CTRL10_GC_RBB2_R { - GAIN_CTRL10_GC_RBB2_R::new(((self.bits >> 20) & 0x07) as u8) + pub fn gain_ctrl9_gc_rbb2(&self) -> GAIN_CTRL9_GC_RBB2_R { + GAIN_CTRL9_GC_RBB2_R::new(((self.bits >> 12) & 7) as u8) } #[doc = "Bits 16:17"] #[inline(always)] pub fn gain_ctrl10_gc_rbb1(&self) -> GAIN_CTRL10_GC_RBB1_R { - GAIN_CTRL10_GC_RBB1_R::new(((self.bits >> 16) & 0x03) as u8) + GAIN_CTRL10_GC_RBB1_R::new(((self.bits >> 16) & 3) as u8) } - #[doc = "Bits 12:14"] - #[inline(always)] - pub fn gain_ctrl9_gc_rbb2(&self) -> GAIN_CTRL9_GC_RBB2_R { - GAIN_CTRL9_GC_RBB2_R::new(((self.bits >> 12) & 0x07) as u8) - } - #[doc = "Bits 8:9"] + #[doc = "Bits 20:22"] #[inline(always)] - pub fn gain_ctrl9_gc_rbb1(&self) -> GAIN_CTRL9_GC_RBB1_R { - GAIN_CTRL9_GC_RBB1_R::new(((self.bits >> 8) & 0x03) as u8) + pub fn gain_ctrl10_gc_rbb2(&self) -> GAIN_CTRL10_GC_RBB2_R { + GAIN_CTRL10_GC_RBB2_R::new(((self.bits >> 20) & 7) as u8) } - #[doc = "Bits 4:6"] + #[doc = "Bits 24:25"] #[inline(always)] - pub fn gain_ctrl8_gc_rbb2(&self) -> GAIN_CTRL8_GC_RBB2_R { - GAIN_CTRL8_GC_RBB2_R::new(((self.bits >> 4) & 0x07) as u8) + pub fn gain_ctrl11_gc_rbb1(&self) -> GAIN_CTRL11_GC_RBB1_R { + GAIN_CTRL11_GC_RBB1_R::new(((self.bits >> 24) & 3) as u8) } - #[doc = "Bits 0:1"] + #[doc = "Bits 28:30"] #[inline(always)] - pub fn gain_ctrl8_gc_rbb1(&self) -> GAIN_CTRL8_GC_RBB1_R { - GAIN_CTRL8_GC_RBB1_R::new((self.bits & 0x03) as u8) + pub fn gain_ctrl11_gc_rbb2(&self) -> GAIN_CTRL11_GC_RBB2_R { + GAIN_CTRL11_GC_RBB2_R::new(((self.bits >> 28) & 7) as u8) } } impl W { - #[doc = "Bits 28:30"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn gain_ctrl11_gc_rbb2(&mut self) -> GAIN_CTRL11_GC_RBB2_W { - GAIN_CTRL11_GC_RBB2_W { w: self } + #[must_use] + pub fn gain_ctrl8_gc_rbb1(&mut self) -> GAIN_CTRL8_GC_RBB1_W<0> { + GAIN_CTRL8_GC_RBB1_W::new(self) } - #[doc = "Bits 24:25"] + #[doc = "Bits 4:6"] #[inline(always)] - pub fn gain_ctrl11_gc_rbb1(&mut self) -> GAIN_CTRL11_GC_RBB1_W { - GAIN_CTRL11_GC_RBB1_W { w: self } + #[must_use] + pub fn gain_ctrl8_gc_rbb2(&mut self) -> GAIN_CTRL8_GC_RBB2_W<4> { + GAIN_CTRL8_GC_RBB2_W::new(self) } - #[doc = "Bits 20:22"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn gain_ctrl10_gc_rbb2(&mut self) -> GAIN_CTRL10_GC_RBB2_W { - GAIN_CTRL10_GC_RBB2_W { w: self } + #[must_use] + pub fn gain_ctrl9_gc_rbb1(&mut self) -> GAIN_CTRL9_GC_RBB1_W<8> { + GAIN_CTRL9_GC_RBB1_W::new(self) } - #[doc = "Bits 16:17"] + #[doc = "Bits 12:14"] #[inline(always)] - pub fn gain_ctrl10_gc_rbb1(&mut self) -> GAIN_CTRL10_GC_RBB1_W { - GAIN_CTRL10_GC_RBB1_W { w: self } + #[must_use] + pub fn gain_ctrl9_gc_rbb2(&mut self) -> GAIN_CTRL9_GC_RBB2_W<12> { + GAIN_CTRL9_GC_RBB2_W::new(self) } - #[doc = "Bits 12:14"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn gain_ctrl9_gc_rbb2(&mut self) -> GAIN_CTRL9_GC_RBB2_W { - GAIN_CTRL9_GC_RBB2_W { w: self } + #[must_use] + pub fn gain_ctrl10_gc_rbb1(&mut self) -> GAIN_CTRL10_GC_RBB1_W<16> { + GAIN_CTRL10_GC_RBB1_W::new(self) } - #[doc = "Bits 8:9"] + #[doc = "Bits 20:22"] #[inline(always)] - pub fn gain_ctrl9_gc_rbb1(&mut self) -> GAIN_CTRL9_GC_RBB1_W { - GAIN_CTRL9_GC_RBB1_W { w: self } + #[must_use] + pub fn gain_ctrl10_gc_rbb2(&mut self) -> GAIN_CTRL10_GC_RBB2_W<20> { + GAIN_CTRL10_GC_RBB2_W::new(self) } - #[doc = "Bits 4:6"] + #[doc = "Bits 24:25"] #[inline(always)] - pub fn gain_ctrl8_gc_rbb2(&mut self) -> GAIN_CTRL8_GC_RBB2_W { - GAIN_CTRL8_GC_RBB2_W { w: self } + #[must_use] + pub fn gain_ctrl11_gc_rbb1(&mut self) -> GAIN_CTRL11_GC_RBB1_W<24> { + GAIN_CTRL11_GC_RBB1_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bits 28:30"] #[inline(always)] - pub fn gain_ctrl8_gc_rbb1(&mut self) -> GAIN_CTRL8_GC_RBB1_W { - GAIN_CTRL8_GC_RBB1_W { w: self } + #[must_use] + pub fn gain_ctrl11_gc_rbb2(&mut self) -> GAIN_CTRL11_GC_RBB2_W<28> { + GAIN_CTRL11_GC_RBB2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -341,11 +184,10 @@ impl crate::Readable for RBB_GAIN_INDEX3_SPEC { #[doc = "`write(|w| ..)` method takes [rbb_gain_index3::W](W) writer structure"] impl crate::Writable for RBB_GAIN_INDEX3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rbb_gain_index3 to value 0"] impl crate::Resettable for RBB_GAIN_INDEX3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rbb_gain_index4.rs b/src/rf/rbb_gain_index4.rs index 668074e..9fc22d0 100644 --- a/src/rf/rbb_gain_index4.rs +++ b/src/rf/rbb_gain_index4.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,303 +28,145 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `gain_ctrl15_gc_rbb2` reader - "] -pub struct GAIN_CTRL15_GC_RBB2_R(crate::FieldReader); -impl GAIN_CTRL15_GC_RBB2_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL15_GC_RBB2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL15_GC_RBB2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl15_gc_rbb2` writer - "] -pub struct GAIN_CTRL15_GC_RBB2_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL15_GC_RBB2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 28)) | ((value as u32 & 0x07) << 28); - self.w - } -} -#[doc = "Field `gain_ctrl15_gc_rbb1` reader - "] -pub struct GAIN_CTRL15_GC_RBB1_R(crate::FieldReader); -impl GAIN_CTRL15_GC_RBB1_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL15_GC_RBB1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL15_GC_RBB1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl15_gc_rbb1` writer - "] -pub struct GAIN_CTRL15_GC_RBB1_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL15_GC_RBB1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 24)) | ((value as u32 & 0x03) << 24); - self.w - } -} -#[doc = "Field `gain_ctrl14_gc_rbb2` reader - "] -pub struct GAIN_CTRL14_GC_RBB2_R(crate::FieldReader); -impl GAIN_CTRL14_GC_RBB2_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL14_GC_RBB2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL14_GC_RBB2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl14_gc_rbb2` writer - "] -pub struct GAIN_CTRL14_GC_RBB2_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL14_GC_RBB2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 20)) | ((value as u32 & 0x07) << 20); - self.w - } -} -#[doc = "Field `gain_ctrl14_gc_rbb1` reader - "] -pub struct GAIN_CTRL14_GC_RBB1_R(crate::FieldReader); -impl GAIN_CTRL14_GC_RBB1_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL14_GC_RBB1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL14_GC_RBB1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl14_gc_rbb1` writer - "] -pub struct GAIN_CTRL14_GC_RBB1_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL14_GC_RBB1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 16)) | ((value as u32 & 0x03) << 16); - self.w - } -} -#[doc = "Field `gain_ctrl13_gc_rbb2` reader - "] -pub struct GAIN_CTRL13_GC_RBB2_R(crate::FieldReader); -impl GAIN_CTRL13_GC_RBB2_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL13_GC_RBB2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL13_GC_RBB2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl13_gc_rbb2` writer - "] -pub struct GAIN_CTRL13_GC_RBB2_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL13_GC_RBB2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 12)) | ((value as u32 & 0x07) << 12); - self.w - } -} -#[doc = "Field `gain_ctrl13_gc_rbb1` reader - "] -pub struct GAIN_CTRL13_GC_RBB1_R(crate::FieldReader); -impl GAIN_CTRL13_GC_RBB1_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL13_GC_RBB1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL13_GC_RBB1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl13_gc_rbb1` writer - "] -pub struct GAIN_CTRL13_GC_RBB1_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL13_GC_RBB1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} -#[doc = "Field `gain_ctrl12_gc_rbb2` reader - "] -pub struct GAIN_CTRL12_GC_RBB2_R(crate::FieldReader); -impl GAIN_CTRL12_GC_RBB2_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL12_GC_RBB2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL12_GC_RBB2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl12_gc_rbb2` writer - "] -pub struct GAIN_CTRL12_GC_RBB2_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL12_GC_RBB2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 4)) | ((value as u32 & 0x07) << 4); - self.w - } -} #[doc = "Field `gain_ctrl12_gc_rbb1` reader - "] -pub struct GAIN_CTRL12_GC_RBB1_R(crate::FieldReader); -impl GAIN_CTRL12_GC_RBB1_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL12_GC_RBB1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL12_GC_RBB1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type GAIN_CTRL12_GC_RBB1_R = crate::FieldReader; #[doc = "Field `gain_ctrl12_gc_rbb1` writer - "] -pub struct GAIN_CTRL12_GC_RBB1_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL12_GC_RBB1_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type GAIN_CTRL12_GC_RBB1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RBB_GAIN_INDEX4_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl12_gc_rbb2` reader - "] +pub type GAIN_CTRL12_GC_RBB2_R = crate::FieldReader; +#[doc = "Field `gain_ctrl12_gc_rbb2` writer - "] +pub type GAIN_CTRL12_GC_RBB2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RBB_GAIN_INDEX4_SPEC, u8, u8, 3, O>; +#[doc = "Field `gain_ctrl13_gc_rbb1` reader - "] +pub type GAIN_CTRL13_GC_RBB1_R = crate::FieldReader; +#[doc = "Field `gain_ctrl13_gc_rbb1` writer - "] +pub type GAIN_CTRL13_GC_RBB1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RBB_GAIN_INDEX4_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl13_gc_rbb2` reader - "] +pub type GAIN_CTRL13_GC_RBB2_R = crate::FieldReader; +#[doc = "Field `gain_ctrl13_gc_rbb2` writer - "] +pub type GAIN_CTRL13_GC_RBB2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RBB_GAIN_INDEX4_SPEC, u8, u8, 3, O>; +#[doc = "Field `gain_ctrl14_gc_rbb1` reader - "] +pub type GAIN_CTRL14_GC_RBB1_R = crate::FieldReader; +#[doc = "Field `gain_ctrl14_gc_rbb1` writer - "] +pub type GAIN_CTRL14_GC_RBB1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RBB_GAIN_INDEX4_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl14_gc_rbb2` reader - "] +pub type GAIN_CTRL14_GC_RBB2_R = crate::FieldReader; +#[doc = "Field `gain_ctrl14_gc_rbb2` writer - "] +pub type GAIN_CTRL14_GC_RBB2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RBB_GAIN_INDEX4_SPEC, u8, u8, 3, O>; +#[doc = "Field `gain_ctrl15_gc_rbb1` reader - "] +pub type GAIN_CTRL15_GC_RBB1_R = crate::FieldReader; +#[doc = "Field `gain_ctrl15_gc_rbb1` writer - "] +pub type GAIN_CTRL15_GC_RBB1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RBB_GAIN_INDEX4_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl15_gc_rbb2` reader - "] +pub type GAIN_CTRL15_GC_RBB2_R = crate::FieldReader; +#[doc = "Field `gain_ctrl15_gc_rbb2` writer - "] +pub type GAIN_CTRL15_GC_RBB2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RBB_GAIN_INDEX4_SPEC, u8, u8, 3, O>; +impl R { + #[doc = "Bits 0:1"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w + pub fn gain_ctrl12_gc_rbb1(&self) -> GAIN_CTRL12_GC_RBB1_R { + GAIN_CTRL12_GC_RBB1_R::new((self.bits & 3) as u8) } -} -impl R { - #[doc = "Bits 28:30"] + #[doc = "Bits 4:6"] #[inline(always)] - pub fn gain_ctrl15_gc_rbb2(&self) -> GAIN_CTRL15_GC_RBB2_R { - GAIN_CTRL15_GC_RBB2_R::new(((self.bits >> 28) & 0x07) as u8) + pub fn gain_ctrl12_gc_rbb2(&self) -> GAIN_CTRL12_GC_RBB2_R { + GAIN_CTRL12_GC_RBB2_R::new(((self.bits >> 4) & 7) as u8) } - #[doc = "Bits 24:25"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn gain_ctrl15_gc_rbb1(&self) -> GAIN_CTRL15_GC_RBB1_R { - GAIN_CTRL15_GC_RBB1_R::new(((self.bits >> 24) & 0x03) as u8) + pub fn gain_ctrl13_gc_rbb1(&self) -> GAIN_CTRL13_GC_RBB1_R { + GAIN_CTRL13_GC_RBB1_R::new(((self.bits >> 8) & 3) as u8) } - #[doc = "Bits 20:22"] + #[doc = "Bits 12:14"] #[inline(always)] - pub fn gain_ctrl14_gc_rbb2(&self) -> GAIN_CTRL14_GC_RBB2_R { - GAIN_CTRL14_GC_RBB2_R::new(((self.bits >> 20) & 0x07) as u8) + pub fn gain_ctrl13_gc_rbb2(&self) -> GAIN_CTRL13_GC_RBB2_R { + GAIN_CTRL13_GC_RBB2_R::new(((self.bits >> 12) & 7) as u8) } #[doc = "Bits 16:17"] #[inline(always)] pub fn gain_ctrl14_gc_rbb1(&self) -> GAIN_CTRL14_GC_RBB1_R { - GAIN_CTRL14_GC_RBB1_R::new(((self.bits >> 16) & 0x03) as u8) + GAIN_CTRL14_GC_RBB1_R::new(((self.bits >> 16) & 3) as u8) } - #[doc = "Bits 12:14"] - #[inline(always)] - pub fn gain_ctrl13_gc_rbb2(&self) -> GAIN_CTRL13_GC_RBB2_R { - GAIN_CTRL13_GC_RBB2_R::new(((self.bits >> 12) & 0x07) as u8) - } - #[doc = "Bits 8:9"] + #[doc = "Bits 20:22"] #[inline(always)] - pub fn gain_ctrl13_gc_rbb1(&self) -> GAIN_CTRL13_GC_RBB1_R { - GAIN_CTRL13_GC_RBB1_R::new(((self.bits >> 8) & 0x03) as u8) + pub fn gain_ctrl14_gc_rbb2(&self) -> GAIN_CTRL14_GC_RBB2_R { + GAIN_CTRL14_GC_RBB2_R::new(((self.bits >> 20) & 7) as u8) } - #[doc = "Bits 4:6"] + #[doc = "Bits 24:25"] #[inline(always)] - pub fn gain_ctrl12_gc_rbb2(&self) -> GAIN_CTRL12_GC_RBB2_R { - GAIN_CTRL12_GC_RBB2_R::new(((self.bits >> 4) & 0x07) as u8) + pub fn gain_ctrl15_gc_rbb1(&self) -> GAIN_CTRL15_GC_RBB1_R { + GAIN_CTRL15_GC_RBB1_R::new(((self.bits >> 24) & 3) as u8) } - #[doc = "Bits 0:1"] + #[doc = "Bits 28:30"] #[inline(always)] - pub fn gain_ctrl12_gc_rbb1(&self) -> GAIN_CTRL12_GC_RBB1_R { - GAIN_CTRL12_GC_RBB1_R::new((self.bits & 0x03) as u8) + pub fn gain_ctrl15_gc_rbb2(&self) -> GAIN_CTRL15_GC_RBB2_R { + GAIN_CTRL15_GC_RBB2_R::new(((self.bits >> 28) & 7) as u8) } } impl W { - #[doc = "Bits 28:30"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn gain_ctrl15_gc_rbb2(&mut self) -> GAIN_CTRL15_GC_RBB2_W { - GAIN_CTRL15_GC_RBB2_W { w: self } + #[must_use] + pub fn gain_ctrl12_gc_rbb1(&mut self) -> GAIN_CTRL12_GC_RBB1_W<0> { + GAIN_CTRL12_GC_RBB1_W::new(self) } - #[doc = "Bits 24:25"] + #[doc = "Bits 4:6"] #[inline(always)] - pub fn gain_ctrl15_gc_rbb1(&mut self) -> GAIN_CTRL15_GC_RBB1_W { - GAIN_CTRL15_GC_RBB1_W { w: self } + #[must_use] + pub fn gain_ctrl12_gc_rbb2(&mut self) -> GAIN_CTRL12_GC_RBB2_W<4> { + GAIN_CTRL12_GC_RBB2_W::new(self) } - #[doc = "Bits 20:22"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn gain_ctrl14_gc_rbb2(&mut self) -> GAIN_CTRL14_GC_RBB2_W { - GAIN_CTRL14_GC_RBB2_W { w: self } + #[must_use] + pub fn gain_ctrl13_gc_rbb1(&mut self) -> GAIN_CTRL13_GC_RBB1_W<8> { + GAIN_CTRL13_GC_RBB1_W::new(self) } - #[doc = "Bits 16:17"] + #[doc = "Bits 12:14"] #[inline(always)] - pub fn gain_ctrl14_gc_rbb1(&mut self) -> GAIN_CTRL14_GC_RBB1_W { - GAIN_CTRL14_GC_RBB1_W { w: self } + #[must_use] + pub fn gain_ctrl13_gc_rbb2(&mut self) -> GAIN_CTRL13_GC_RBB2_W<12> { + GAIN_CTRL13_GC_RBB2_W::new(self) } - #[doc = "Bits 12:14"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn gain_ctrl13_gc_rbb2(&mut self) -> GAIN_CTRL13_GC_RBB2_W { - GAIN_CTRL13_GC_RBB2_W { w: self } + #[must_use] + pub fn gain_ctrl14_gc_rbb1(&mut self) -> GAIN_CTRL14_GC_RBB1_W<16> { + GAIN_CTRL14_GC_RBB1_W::new(self) } - #[doc = "Bits 8:9"] + #[doc = "Bits 20:22"] #[inline(always)] - pub fn gain_ctrl13_gc_rbb1(&mut self) -> GAIN_CTRL13_GC_RBB1_W { - GAIN_CTRL13_GC_RBB1_W { w: self } + #[must_use] + pub fn gain_ctrl14_gc_rbb2(&mut self) -> GAIN_CTRL14_GC_RBB2_W<20> { + GAIN_CTRL14_GC_RBB2_W::new(self) } - #[doc = "Bits 4:6"] + #[doc = "Bits 24:25"] #[inline(always)] - pub fn gain_ctrl12_gc_rbb2(&mut self) -> GAIN_CTRL12_GC_RBB2_W { - GAIN_CTRL12_GC_RBB2_W { w: self } + #[must_use] + pub fn gain_ctrl15_gc_rbb1(&mut self) -> GAIN_CTRL15_GC_RBB1_W<24> { + GAIN_CTRL15_GC_RBB1_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bits 28:30"] #[inline(always)] - pub fn gain_ctrl12_gc_rbb1(&mut self) -> GAIN_CTRL12_GC_RBB1_W { - GAIN_CTRL12_GC_RBB1_W { w: self } + #[must_use] + pub fn gain_ctrl15_gc_rbb2(&mut self) -> GAIN_CTRL15_GC_RBB2_W<28> { + GAIN_CTRL15_GC_RBB2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -341,11 +184,10 @@ impl crate::Readable for RBB_GAIN_INDEX4_SPEC { #[doc = "`write(|w| ..)` method takes [rbb_gain_index4::W](W) writer structure"] impl crate::Writable for RBB_GAIN_INDEX4_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rbb_gain_index4 to value 0"] impl crate::Resettable for RBB_GAIN_INDEX4_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rbb_gain_index5.rs b/src/rf/rbb_gain_index5.rs index c05bf7f..9f9e79a 100644 --- a/src/rf/rbb_gain_index5.rs +++ b/src/rf/rbb_gain_index5.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,87 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `gain_ctrl16_gc_rbb2` reader - "] -pub struct GAIN_CTRL16_GC_RBB2_R(crate::FieldReader); -impl GAIN_CTRL16_GC_RBB2_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL16_GC_RBB2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL16_GC_RBB2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl16_gc_rbb2` writer - "] -pub struct GAIN_CTRL16_GC_RBB2_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL16_GC_RBB2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 4)) | ((value as u32 & 0x07) << 4); - self.w - } -} #[doc = "Field `gain_ctrl16_gc_rbb1` reader - "] -pub struct GAIN_CTRL16_GC_RBB1_R(crate::FieldReader); -impl GAIN_CTRL16_GC_RBB1_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL16_GC_RBB1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL16_GC_RBB1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type GAIN_CTRL16_GC_RBB1_R = crate::FieldReader; #[doc = "Field `gain_ctrl16_gc_rbb1` writer - "] -pub struct GAIN_CTRL16_GC_RBB1_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL16_GC_RBB1_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type GAIN_CTRL16_GC_RBB1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RBB_GAIN_INDEX5_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl16_gc_rbb2` reader - "] +pub type GAIN_CTRL16_GC_RBB2_R = crate::FieldReader; +#[doc = "Field `gain_ctrl16_gc_rbb2` writer - "] +pub type GAIN_CTRL16_GC_RBB2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RBB_GAIN_INDEX5_SPEC, u8, u8, 3, O>; +impl R { + #[doc = "Bits 0:1"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w + pub fn gain_ctrl16_gc_rbb1(&self) -> GAIN_CTRL16_GC_RBB1_R { + GAIN_CTRL16_GC_RBB1_R::new((self.bits & 3) as u8) } -} -impl R { #[doc = "Bits 4:6"] #[inline(always)] pub fn gain_ctrl16_gc_rbb2(&self) -> GAIN_CTRL16_GC_RBB2_R { - GAIN_CTRL16_GC_RBB2_R::new(((self.bits >> 4) & 0x07) as u8) - } - #[doc = "Bits 0:1"] - #[inline(always)] - pub fn gain_ctrl16_gc_rbb1(&self) -> GAIN_CTRL16_GC_RBB1_R { - GAIN_CTRL16_GC_RBB1_R::new((self.bits & 0x03) as u8) + GAIN_CTRL16_GC_RBB2_R::new(((self.bits >> 4) & 7) as u8) } } impl W { - #[doc = "Bits 4:6"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn gain_ctrl16_gc_rbb2(&mut self) -> GAIN_CTRL16_GC_RBB2_W { - GAIN_CTRL16_GC_RBB2_W { w: self } + #[must_use] + pub fn gain_ctrl16_gc_rbb1(&mut self) -> GAIN_CTRL16_GC_RBB1_W<0> { + GAIN_CTRL16_GC_RBB1_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bits 4:6"] #[inline(always)] - pub fn gain_ctrl16_gc_rbb1(&mut self) -> GAIN_CTRL16_GC_RBB1_W { - GAIN_CTRL16_GC_RBB1_W { w: self } + #[must_use] + pub fn gain_ctrl16_gc_rbb2(&mut self) -> GAIN_CTRL16_GC_RBB2_W<4> { + GAIN_CTRL16_GC_RBB2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -125,11 +88,10 @@ impl crate::Readable for RBB_GAIN_INDEX5_SPEC { #[doc = "`write(|w| ..)` method takes [rbb_gain_index5::W](W) writer structure"] impl crate::Writable for RBB_GAIN_INDEX5_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rbb_gain_index5 to value 0"] impl crate::Resettable for RBB_GAIN_INDEX5_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rf_base_ctrl1.rs b/src/rf/rf_base_ctrl1.rs index efc231d..54c4d07 100644 --- a/src/rf/rf_base_ctrl1.rs +++ b/src/rf/rf_base_ctrl1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,267 +28,129 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `mbg_trim` reader - "] -pub struct MBG_TRIM_R(crate::FieldReader); -impl MBG_TRIM_R { - pub(crate) fn new(bits: u8) -> Self { - MBG_TRIM_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for MBG_TRIM_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `mbg_trim` writer - "] -pub struct MBG_TRIM_W<'a> { - w: &'a mut W, -} -impl<'a> MBG_TRIM_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 27)) | ((value as u32 & 0x03) << 27); - self.w - } -} -#[doc = "Field `pud_pa_dly` reader - "] -pub struct PUD_PA_DLY_R(crate::FieldReader); -impl PUD_PA_DLY_R { - pub(crate) fn new(bits: u8) -> Self { - PUD_PA_DLY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PUD_PA_DLY_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pud_pa_dly` writer - "] -pub struct PUD_PA_DLY_W<'a> { - w: &'a mut W, -} -impl<'a> PUD_PA_DLY_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 14)) | ((value as u32 & 0x03) << 14); - self.w - } -} -#[doc = "Field `pud_iref_dly` reader - "] -pub struct PUD_IREF_DLY_R(crate::FieldReader); -impl PUD_IREF_DLY_R { - pub(crate) fn new(bits: u8) -> Self { - PUD_IREF_DLY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PUD_IREF_DLY_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pud_iref_dly` writer - "] -pub struct PUD_IREF_DLY_W<'a> { - w: &'a mut W, -} -impl<'a> PUD_IREF_DLY_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 12)) | ((value as u32 & 0x03) << 12); - self.w - } -} -#[doc = "Field `pud_vco_dly` reader - "] -pub struct PUD_VCO_DLY_R(crate::FieldReader); -impl PUD_VCO_DLY_R { - pub(crate) fn new(bits: u8) -> Self { - PUD_VCO_DLY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PUD_VCO_DLY_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pud_vco_dly` writer - "] -pub struct PUD_VCO_DLY_W<'a> { - w: &'a mut W, -} -impl<'a> PUD_VCO_DLY_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 10)) | ((value as u32 & 0x03) << 10); - self.w - } -} -#[doc = "Field `ppu_lead` reader - "] -pub struct PPU_LEAD_R(crate::FieldReader); -impl PPU_LEAD_R { - pub(crate) fn new(bits: u8) -> Self { - PPU_LEAD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PPU_LEAD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ppu_lead` writer - "] -pub struct PPU_LEAD_W<'a> { - w: &'a mut W, -} -impl<'a> PPU_LEAD_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} -#[doc = "Field `lo_sdm_rst_dly` reader - "] -pub struct LO_SDM_RST_DLY_R(crate::FieldReader); -impl LO_SDM_RST_DLY_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_RST_DLY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_RST_DLY_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_rst_dly` writer - "] -pub struct LO_SDM_RST_DLY_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_RST_DLY_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 2)) | ((value as u32 & 0x03) << 2); - self.w - } -} #[doc = "Field `aupll_sdm_rst_dly` reader - "] -pub struct AUPLL_SDM_RST_DLY_R(crate::FieldReader); -impl AUPLL_SDM_RST_DLY_R { - pub(crate) fn new(bits: u8) -> Self { - AUPLL_SDM_RST_DLY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for AUPLL_SDM_RST_DLY_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type AUPLL_SDM_RST_DLY_R = crate::FieldReader; #[doc = "Field `aupll_sdm_rst_dly` writer - "] -pub struct AUPLL_SDM_RST_DLY_W<'a> { - w: &'a mut W, -} -impl<'a> AUPLL_SDM_RST_DLY_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w - } -} +pub type AUPLL_SDM_RST_DLY_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_BASE_CTRL1_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_rst_dly` reader - "] +pub type LO_SDM_RST_DLY_R = crate::FieldReader; +#[doc = "Field `lo_sdm_rst_dly` writer - "] +pub type LO_SDM_RST_DLY_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_BASE_CTRL1_SPEC, u8, u8, 2, O>; +#[doc = "Field `ppu_lead` reader - "] +pub type PPU_LEAD_R = crate::FieldReader; +#[doc = "Field `ppu_lead` writer - "] +pub type PPU_LEAD_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_BASE_CTRL1_SPEC, u8, u8, 2, O>; +#[doc = "Field `pud_vco_dly` reader - "] +pub type PUD_VCO_DLY_R = crate::FieldReader; +#[doc = "Field `pud_vco_dly` writer - "] +pub type PUD_VCO_DLY_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_BASE_CTRL1_SPEC, u8, u8, 2, O>; +#[doc = "Field `pud_iref_dly` reader - "] +pub type PUD_IREF_DLY_R = crate::FieldReader; +#[doc = "Field `pud_iref_dly` writer - "] +pub type PUD_IREF_DLY_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_BASE_CTRL1_SPEC, u8, u8, 2, O>; +#[doc = "Field `pud_pa_dly` reader - "] +pub type PUD_PA_DLY_R = crate::FieldReader; +#[doc = "Field `pud_pa_dly` writer - "] +pub type PUD_PA_DLY_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_BASE_CTRL1_SPEC, u8, u8, 2, O>; +#[doc = "Field `mbg_trim` reader - "] +pub type MBG_TRIM_R = crate::FieldReader; +#[doc = "Field `mbg_trim` writer - "] +pub type MBG_TRIM_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_BASE_CTRL1_SPEC, u8, u8, 2, O>; impl R { - #[doc = "Bits 27:28"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn mbg_trim(&self) -> MBG_TRIM_R { - MBG_TRIM_R::new(((self.bits >> 27) & 0x03) as u8) + pub fn aupll_sdm_rst_dly(&self) -> AUPLL_SDM_RST_DLY_R { + AUPLL_SDM_RST_DLY_R::new((self.bits & 3) as u8) } - #[doc = "Bits 14:15"] + #[doc = "Bits 2:3"] #[inline(always)] - pub fn pud_pa_dly(&self) -> PUD_PA_DLY_R { - PUD_PA_DLY_R::new(((self.bits >> 14) & 0x03) as u8) + pub fn lo_sdm_rst_dly(&self) -> LO_SDM_RST_DLY_R { + LO_SDM_RST_DLY_R::new(((self.bits >> 2) & 3) as u8) } - #[doc = "Bits 12:13"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn pud_iref_dly(&self) -> PUD_IREF_DLY_R { - PUD_IREF_DLY_R::new(((self.bits >> 12) & 0x03) as u8) + pub fn ppu_lead(&self) -> PPU_LEAD_R { + PPU_LEAD_R::new(((self.bits >> 8) & 3) as u8) } #[doc = "Bits 10:11"] #[inline(always)] pub fn pud_vco_dly(&self) -> PUD_VCO_DLY_R { - PUD_VCO_DLY_R::new(((self.bits >> 10) & 0x03) as u8) + PUD_VCO_DLY_R::new(((self.bits >> 10) & 3) as u8) } - #[doc = "Bits 8:9"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn ppu_lead(&self) -> PPU_LEAD_R { - PPU_LEAD_R::new(((self.bits >> 8) & 0x03) as u8) + pub fn pud_iref_dly(&self) -> PUD_IREF_DLY_R { + PUD_IREF_DLY_R::new(((self.bits >> 12) & 3) as u8) } - #[doc = "Bits 2:3"] + #[doc = "Bits 14:15"] #[inline(always)] - pub fn lo_sdm_rst_dly(&self) -> LO_SDM_RST_DLY_R { - LO_SDM_RST_DLY_R::new(((self.bits >> 2) & 0x03) as u8) + pub fn pud_pa_dly(&self) -> PUD_PA_DLY_R { + PUD_PA_DLY_R::new(((self.bits >> 14) & 3) as u8) } - #[doc = "Bits 0:1"] + #[doc = "Bits 27:28"] #[inline(always)] - pub fn aupll_sdm_rst_dly(&self) -> AUPLL_SDM_RST_DLY_R { - AUPLL_SDM_RST_DLY_R::new((self.bits & 0x03) as u8) + pub fn mbg_trim(&self) -> MBG_TRIM_R { + MBG_TRIM_R::new(((self.bits >> 27) & 3) as u8) } } impl W { - #[doc = "Bits 27:28"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn mbg_trim(&mut self) -> MBG_TRIM_W { - MBG_TRIM_W { w: self } + #[must_use] + pub fn aupll_sdm_rst_dly(&mut self) -> AUPLL_SDM_RST_DLY_W<0> { + AUPLL_SDM_RST_DLY_W::new(self) } - #[doc = "Bits 14:15"] + #[doc = "Bits 2:3"] #[inline(always)] - pub fn pud_pa_dly(&mut self) -> PUD_PA_DLY_W { - PUD_PA_DLY_W { w: self } + #[must_use] + pub fn lo_sdm_rst_dly(&mut self) -> LO_SDM_RST_DLY_W<2> { + LO_SDM_RST_DLY_W::new(self) } - #[doc = "Bits 12:13"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn pud_iref_dly(&mut self) -> PUD_IREF_DLY_W { - PUD_IREF_DLY_W { w: self } + #[must_use] + pub fn ppu_lead(&mut self) -> PPU_LEAD_W<8> { + PPU_LEAD_W::new(self) } #[doc = "Bits 10:11"] #[inline(always)] - pub fn pud_vco_dly(&mut self) -> PUD_VCO_DLY_W { - PUD_VCO_DLY_W { w: self } + #[must_use] + pub fn pud_vco_dly(&mut self) -> PUD_VCO_DLY_W<10> { + PUD_VCO_DLY_W::new(self) } - #[doc = "Bits 8:9"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn ppu_lead(&mut self) -> PPU_LEAD_W { - PPU_LEAD_W { w: self } + #[must_use] + pub fn pud_iref_dly(&mut self) -> PUD_IREF_DLY_W<12> { + PUD_IREF_DLY_W::new(self) } - #[doc = "Bits 2:3"] + #[doc = "Bits 14:15"] #[inline(always)] - pub fn lo_sdm_rst_dly(&mut self) -> LO_SDM_RST_DLY_W { - LO_SDM_RST_DLY_W { w: self } + #[must_use] + pub fn pud_pa_dly(&mut self) -> PUD_PA_DLY_W<14> { + PUD_PA_DLY_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bits 27:28"] #[inline(always)] - pub fn aupll_sdm_rst_dly(&mut self) -> AUPLL_SDM_RST_DLY_W { - AUPLL_SDM_RST_DLY_W { w: self } + #[must_use] + pub fn mbg_trim(&mut self) -> MBG_TRIM_W<27> { + MBG_TRIM_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -305,11 +168,10 @@ impl crate::Readable for RF_BASE_CTRL1_SPEC { #[doc = "`write(|w| ..)` method takes [rf_base_ctrl1::W](W) writer structure"] impl crate::Writable for RF_BASE_CTRL1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rf_base_ctrl1 to value 0"] impl crate::Resettable for RF_BASE_CTRL1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rf_base_ctrl2.rs b/src/rf/rf_base_ctrl2.rs index 127af12..85dbcc3 100644 --- a/src/rf/rf_base_ctrl2.rs +++ b/src/rf/rf_base_ctrl2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,13 +28,15 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } impl W { #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -51,11 +54,10 @@ impl crate::Readable for RF_BASE_CTRL2_SPEC { #[doc = "`write(|w| ..)` method takes [rf_base_ctrl2::W](W) writer structure"] impl crate::Writable for RF_BASE_CTRL2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rf_base_ctrl2 to value 0"] impl crate::Resettable for RF_BASE_CTRL2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rf_data_temp_0.rs b/src/rf/rf_data_temp_0.rs index 74661ac..a8bd875 100644 --- a/src/rf/rf_data_temp_0.rs +++ b/src/rf/rf_data_temp_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `rf_data_temp_0` reader - "] -pub struct RF_DATA_TEMP_0_R(crate::FieldReader); -impl RF_DATA_TEMP_0_R { - pub(crate) fn new(bits: u32) -> Self { - RF_DATA_TEMP_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_DATA_TEMP_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RF_DATA_TEMP_0_R = crate::FieldReader; #[doc = "Field `rf_data_temp_0` writer - "] -pub struct RF_DATA_TEMP_0_W<'a> { - w: &'a mut W, -} -impl<'a> RF_DATA_TEMP_0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type RF_DATA_TEMP_0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_DATA_TEMP_0_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn rf_data_temp_0(&self) -> RF_DATA_TEMP_0_R { - RF_DATA_TEMP_0_R::new((self.bits & 0xffff_ffff) as u32) + RF_DATA_TEMP_0_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn rf_data_temp_0(&mut self) -> RF_DATA_TEMP_0_W { - RF_DATA_TEMP_0_W { w: self } + #[must_use] + pub fn rf_data_temp_0(&mut self) -> RF_DATA_TEMP_0_W<0> { + RF_DATA_TEMP_0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for RF_DATA_TEMP_0_SPEC { #[doc = "`write(|w| ..)` method takes [rf_data_temp_0::W](W) writer structure"] impl crate::Writable for RF_DATA_TEMP_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rf_data_temp_0 to value 0"] impl crate::Resettable for RF_DATA_TEMP_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rf_data_temp_1.rs b/src/rf/rf_data_temp_1.rs index c6991d8..a1383f8 100644 --- a/src/rf/rf_data_temp_1.rs +++ b/src/rf/rf_data_temp_1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `rf_data_temp_1` reader - "] -pub struct RF_DATA_TEMP_1_R(crate::FieldReader); -impl RF_DATA_TEMP_1_R { - pub(crate) fn new(bits: u32) -> Self { - RF_DATA_TEMP_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_DATA_TEMP_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RF_DATA_TEMP_1_R = crate::FieldReader; #[doc = "Field `rf_data_temp_1` writer - "] -pub struct RF_DATA_TEMP_1_W<'a> { - w: &'a mut W, -} -impl<'a> RF_DATA_TEMP_1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type RF_DATA_TEMP_1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_DATA_TEMP_1_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn rf_data_temp_1(&self) -> RF_DATA_TEMP_1_R { - RF_DATA_TEMP_1_R::new((self.bits & 0xffff_ffff) as u32) + RF_DATA_TEMP_1_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn rf_data_temp_1(&mut self) -> RF_DATA_TEMP_1_W { - RF_DATA_TEMP_1_W { w: self } + #[must_use] + pub fn rf_data_temp_1(&mut self) -> RF_DATA_TEMP_1_W<0> { + RF_DATA_TEMP_1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for RF_DATA_TEMP_1_SPEC { #[doc = "`write(|w| ..)` method takes [rf_data_temp_1::W](W) writer structure"] impl crate::Writable for RF_DATA_TEMP_1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rf_data_temp_1 to value 0"] impl crate::Resettable for RF_DATA_TEMP_1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rf_data_temp_2.rs b/src/rf/rf_data_temp_2.rs index d0534dc..f97c6f4 100644 --- a/src/rf/rf_data_temp_2.rs +++ b/src/rf/rf_data_temp_2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `rf_data_temp_2` reader - "] -pub struct RF_DATA_TEMP_2_R(crate::FieldReader); -impl RF_DATA_TEMP_2_R { - pub(crate) fn new(bits: u32) -> Self { - RF_DATA_TEMP_2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_DATA_TEMP_2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RF_DATA_TEMP_2_R = crate::FieldReader; #[doc = "Field `rf_data_temp_2` writer - "] -pub struct RF_DATA_TEMP_2_W<'a> { - w: &'a mut W, -} -impl<'a> RF_DATA_TEMP_2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type RF_DATA_TEMP_2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_DATA_TEMP_2_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn rf_data_temp_2(&self) -> RF_DATA_TEMP_2_R { - RF_DATA_TEMP_2_R::new((self.bits & 0xffff_ffff) as u32) + RF_DATA_TEMP_2_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn rf_data_temp_2(&mut self) -> RF_DATA_TEMP_2_W { - RF_DATA_TEMP_2_W { w: self } + #[must_use] + pub fn rf_data_temp_2(&mut self) -> RF_DATA_TEMP_2_W<0> { + RF_DATA_TEMP_2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for RF_DATA_TEMP_2_SPEC { #[doc = "`write(|w| ..)` method takes [rf_data_temp_2::W](W) writer structure"] impl crate::Writable for RF_DATA_TEMP_2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rf_data_temp_2 to value 0"] impl crate::Resettable for RF_DATA_TEMP_2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rf_data_temp_3.rs b/src/rf/rf_data_temp_3.rs index 8e98161..3f74306 100644 --- a/src/rf/rf_data_temp_3.rs +++ b/src/rf/rf_data_temp_3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `rf_data_temp_3` reader - "] -pub struct RF_DATA_TEMP_3_R(crate::FieldReader); -impl RF_DATA_TEMP_3_R { - pub(crate) fn new(bits: u32) -> Self { - RF_DATA_TEMP_3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_DATA_TEMP_3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RF_DATA_TEMP_3_R = crate::FieldReader; #[doc = "Field `rf_data_temp_3` writer - "] -pub struct RF_DATA_TEMP_3_W<'a> { - w: &'a mut W, -} -impl<'a> RF_DATA_TEMP_3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type RF_DATA_TEMP_3_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_DATA_TEMP_3_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn rf_data_temp_3(&self) -> RF_DATA_TEMP_3_R { - RF_DATA_TEMP_3_R::new((self.bits & 0xffff_ffff) as u32) + RF_DATA_TEMP_3_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn rf_data_temp_3(&mut self) -> RF_DATA_TEMP_3_W { - RF_DATA_TEMP_3_W { w: self } + #[must_use] + pub fn rf_data_temp_3(&mut self) -> RF_DATA_TEMP_3_W<0> { + RF_DATA_TEMP_3_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for RF_DATA_TEMP_3_SPEC { #[doc = "`write(|w| ..)` method takes [rf_data_temp_3::W](W) writer structure"] impl crate::Writable for RF_DATA_TEMP_3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rf_data_temp_3 to value 0"] impl crate::Resettable for RF_DATA_TEMP_3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rf_fsm_ctrl0.rs b/src/rf/rf_fsm_ctrl0.rs index 2d77a28..9af58bc 100644 --- a/src/rf/rf_fsm_ctrl0.rs +++ b/src/rf/rf_fsm_ctrl0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,37 +28,17 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `rf_ch_ind_wifi` reader - "] -pub struct RF_CH_IND_WIFI_R(crate::FieldReader); -impl RF_CH_IND_WIFI_R { - pub(crate) fn new(bits: u16) -> Self { - RF_CH_IND_WIFI_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_CH_IND_WIFI_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RF_CH_IND_WIFI_R = crate::FieldReader; #[doc = "Field `rf_ch_ind_wifi` writer - "] -pub struct RF_CH_IND_WIFI_W<'a> { - w: &'a mut W, -} -impl<'a> RF_CH_IND_WIFI_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x0fff) | (value as u32 & 0x0fff); - self.w - } -} +pub type RF_CH_IND_WIFI_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_FSM_CTRL0_SPEC, u16, u16, 12, O>; impl R { #[doc = "Bits 0:11"] #[inline(always)] @@ -68,10 +49,12 @@ impl R { impl W { #[doc = "Bits 0:11"] #[inline(always)] - pub fn rf_ch_ind_wifi(&mut self) -> RF_CH_IND_WIFI_W { - RF_CH_IND_WIFI_W { w: self } + #[must_use] + pub fn rf_ch_ind_wifi(&mut self) -> RF_CH_IND_WIFI_W<0> { + RF_CH_IND_WIFI_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for RF_FSM_CTRL0_SPEC { #[doc = "`write(|w| ..)` method takes [rf_fsm_ctrl0::W](W) writer structure"] impl crate::Writable for RF_FSM_CTRL0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rf_fsm_ctrl0 to value 0"] impl crate::Resettable for RF_FSM_CTRL0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rf_fsm_ctrl1.rs b/src/rf/rf_fsm_ctrl1.rs index 626fa7d..a01bfc3 100644 --- a/src/rf/rf_fsm_ctrl1.rs +++ b/src/rf/rf_fsm_ctrl1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,271 +28,112 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rf_fsm_pu_pa_dly_n` reader - "] -pub struct RF_FSM_PU_PA_DLY_N_R(crate::FieldReader); -impl RF_FSM_PU_PA_DLY_N_R { - pub(crate) fn new(bits: u16) -> Self { - RF_FSM_PU_PA_DLY_N_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_FSM_PU_PA_DLY_N_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_fsm_pu_pa_dly_n` writer - "] -pub struct RF_FSM_PU_PA_DLY_N_W<'a> { - w: &'a mut W, -} -impl<'a> RF_FSM_PU_PA_DLY_N_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03ff << 20)) | ((value as u32 & 0x03ff) << 20); - self.w - } -} -#[doc = "Field `rf_fsm_lo_rdy_sbclr` reader - "] -pub struct RF_FSM_LO_RDY_SBCLR_R(crate::FieldReader); -impl RF_FSM_LO_RDY_SBCLR_R { - pub(crate) fn new(bits: bool) -> Self { - RF_FSM_LO_RDY_SBCLR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_FSM_LO_RDY_SBCLR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_fsm_lo_rdy_sbclr` writer - "] -pub struct RF_FSM_LO_RDY_SBCLR_W<'a> { - w: &'a mut W, -} -impl<'a> RF_FSM_LO_RDY_SBCLR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 19)) | ((value as u32 & 0x01) << 19); - self.w - } -} -#[doc = "Field `rf_fsm_lo_rdy_4s_1` reader - "] -pub struct RF_FSM_LO_RDY_4S_1_R(crate::FieldReader); -impl RF_FSM_LO_RDY_4S_1_R { - pub(crate) fn new(bits: bool) -> Self { - RF_FSM_LO_RDY_4S_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_FSM_LO_RDY_4S_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_fsm_lo_rdy_4s_1` writer - "] -pub struct RF_FSM_LO_RDY_4S_1_W<'a> { - w: &'a mut W, -} -impl<'a> RF_FSM_LO_RDY_4S_1_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18); - self.w - } -} -#[doc = "Field `rf_fsm_lo_rdy_rst` reader - "] -pub struct RF_FSM_LO_RDY_RST_R(crate::FieldReader); -impl RF_FSM_LO_RDY_RST_R { - pub(crate) fn new(bits: bool) -> Self { - RF_FSM_LO_RDY_RST_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_FSM_LO_RDY_RST_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_fsm_lo_rdy_rst` writer - "] -pub struct RF_FSM_LO_RDY_RST_W<'a> { - w: &'a mut W, -} -impl<'a> RF_FSM_LO_RDY_RST_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w - } -} +#[doc = "Field `rf_fsm_lo_time` reader - "] +pub type RF_FSM_LO_TIME_R = crate::FieldReader; +#[doc = "Field `rf_fsm_lo_time` writer - "] +pub type RF_FSM_LO_TIME_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_FSM_CTRL1_SPEC, u16, u16, 16, O>; #[doc = "Field `rf_fsm_lo_rdy` reader - "] -pub struct RF_FSM_LO_RDY_R(crate::FieldReader); -impl RF_FSM_LO_RDY_R { - pub(crate) fn new(bits: bool) -> Self { - RF_FSM_LO_RDY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_FSM_LO_RDY_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RF_FSM_LO_RDY_R = crate::BitReader; #[doc = "Field `rf_fsm_lo_rdy` writer - "] -pub struct RF_FSM_LO_RDY_W<'a> { - w: &'a mut W, -} -impl<'a> RF_FSM_LO_RDY_W<'a> { - #[doc = r"Sets the field bit"] +pub type RF_FSM_LO_RDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, RF_FSM_CTRL1_SPEC, bool, O>; +#[doc = "Field `rf_fsm_lo_rdy_rst` reader - "] +pub type RF_FSM_LO_RDY_RST_R = crate::BitReader; +#[doc = "Field `rf_fsm_lo_rdy_rst` writer - "] +pub type RF_FSM_LO_RDY_RST_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RF_FSM_CTRL1_SPEC, bool, O>; +#[doc = "Field `rf_fsm_lo_rdy_4s_1` reader - "] +pub type RF_FSM_LO_RDY_4S_1_R = crate::BitReader; +#[doc = "Field `rf_fsm_lo_rdy_4s_1` writer - "] +pub type RF_FSM_LO_RDY_4S_1_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RF_FSM_CTRL1_SPEC, bool, O>; +#[doc = "Field `rf_fsm_lo_rdy_sbclr` reader - "] +pub type RF_FSM_LO_RDY_SBCLR_R = crate::BitReader; +#[doc = "Field `rf_fsm_lo_rdy_sbclr` writer - "] +pub type RF_FSM_LO_RDY_SBCLR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RF_FSM_CTRL1_SPEC, bool, O>; +#[doc = "Field `rf_fsm_pu_pa_dly_n` reader - "] +pub type RF_FSM_PU_PA_DLY_N_R = crate::FieldReader; +#[doc = "Field `rf_fsm_pu_pa_dly_n` writer - "] +pub type RF_FSM_PU_PA_DLY_N_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_FSM_CTRL1_SPEC, u16, u16, 10, O>; +impl R { + #[doc = "Bits 0:15"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn rf_fsm_lo_time(&self) -> RF_FSM_LO_TIME_R { + RF_FSM_LO_TIME_R::new((self.bits & 0xffff) as u16) } - #[doc = r"Clears the field bit"] + #[doc = "Bit 16"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn rf_fsm_lo_rdy(&self) -> RF_FSM_LO_RDY_R { + RF_FSM_LO_RDY_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = r"Writes raw bits to the field"] + #[doc = "Bit 17"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `rf_fsm_lo_time` reader - "] -pub struct RF_FSM_LO_TIME_R(crate::FieldReader); -impl RF_FSM_LO_TIME_R { - pub(crate) fn new(bits: u16) -> Self { - RF_FSM_LO_TIME_R(crate::FieldReader::new(bits)) + pub fn rf_fsm_lo_rdy_rst(&self) -> RF_FSM_LO_RDY_RST_R { + RF_FSM_LO_RDY_RST_R::new(((self.bits >> 17) & 1) != 0) } -} -impl core::ops::Deref for RF_FSM_LO_TIME_R { - type Target = crate::FieldReader; + #[doc = "Bit 18"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn rf_fsm_lo_rdy_4s_1(&self) -> RF_FSM_LO_RDY_4S_1_R { + RF_FSM_LO_RDY_4S_1_R::new(((self.bits >> 18) & 1) != 0) } -} -#[doc = "Field `rf_fsm_lo_time` writer - "] -pub struct RF_FSM_LO_TIME_W<'a> { - w: &'a mut W, -} -impl<'a> RF_FSM_LO_TIME_W<'a> { - #[doc = r"Writes raw bits to the field"] + #[doc = "Bit 19"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w + pub fn rf_fsm_lo_rdy_sbclr(&self) -> RF_FSM_LO_RDY_SBCLR_R { + RF_FSM_LO_RDY_SBCLR_R::new(((self.bits >> 19) & 1) != 0) } -} -impl R { #[doc = "Bits 20:29"] #[inline(always)] pub fn rf_fsm_pu_pa_dly_n(&self) -> RF_FSM_PU_PA_DLY_N_R { RF_FSM_PU_PA_DLY_N_R::new(((self.bits >> 20) & 0x03ff) as u16) } - #[doc = "Bit 19"] - #[inline(always)] - pub fn rf_fsm_lo_rdy_sbclr(&self) -> RF_FSM_LO_RDY_SBCLR_R { - RF_FSM_LO_RDY_SBCLR_R::new(((self.bits >> 19) & 0x01) != 0) - } - #[doc = "Bit 18"] - #[inline(always)] - pub fn rf_fsm_lo_rdy_4s_1(&self) -> RF_FSM_LO_RDY_4S_1_R { - RF_FSM_LO_RDY_4S_1_R::new(((self.bits >> 18) & 0x01) != 0) - } - #[doc = "Bit 17"] - #[inline(always)] - pub fn rf_fsm_lo_rdy_rst(&self) -> RF_FSM_LO_RDY_RST_R { - RF_FSM_LO_RDY_RST_R::new(((self.bits >> 17) & 0x01) != 0) - } - #[doc = "Bit 16"] - #[inline(always)] - pub fn rf_fsm_lo_rdy(&self) -> RF_FSM_LO_RDY_R { - RF_FSM_LO_RDY_R::new(((self.bits >> 16) & 0x01) != 0) - } - #[doc = "Bits 0:15"] - #[inline(always)] - pub fn rf_fsm_lo_time(&self) -> RF_FSM_LO_TIME_R { - RF_FSM_LO_TIME_R::new((self.bits & 0xffff) as u16) - } } impl W { - #[doc = "Bits 20:29"] + #[doc = "Bits 0:15"] #[inline(always)] - pub fn rf_fsm_pu_pa_dly_n(&mut self) -> RF_FSM_PU_PA_DLY_N_W { - RF_FSM_PU_PA_DLY_N_W { w: self } + #[must_use] + pub fn rf_fsm_lo_time(&mut self) -> RF_FSM_LO_TIME_W<0> { + RF_FSM_LO_TIME_W::new(self) } - #[doc = "Bit 19"] + #[doc = "Bit 16"] #[inline(always)] - pub fn rf_fsm_lo_rdy_sbclr(&mut self) -> RF_FSM_LO_RDY_SBCLR_W { - RF_FSM_LO_RDY_SBCLR_W { w: self } + #[must_use] + pub fn rf_fsm_lo_rdy(&mut self) -> RF_FSM_LO_RDY_W<16> { + RF_FSM_LO_RDY_W::new(self) } - #[doc = "Bit 18"] + #[doc = "Bit 17"] #[inline(always)] - pub fn rf_fsm_lo_rdy_4s_1(&mut self) -> RF_FSM_LO_RDY_4S_1_W { - RF_FSM_LO_RDY_4S_1_W { w: self } + #[must_use] + pub fn rf_fsm_lo_rdy_rst(&mut self) -> RF_FSM_LO_RDY_RST_W<17> { + RF_FSM_LO_RDY_RST_W::new(self) } - #[doc = "Bit 17"] + #[doc = "Bit 18"] #[inline(always)] - pub fn rf_fsm_lo_rdy_rst(&mut self) -> RF_FSM_LO_RDY_RST_W { - RF_FSM_LO_RDY_RST_W { w: self } + #[must_use] + pub fn rf_fsm_lo_rdy_4s_1(&mut self) -> RF_FSM_LO_RDY_4S_1_W<18> { + RF_FSM_LO_RDY_4S_1_W::new(self) } - #[doc = "Bit 16"] + #[doc = "Bit 19"] #[inline(always)] - pub fn rf_fsm_lo_rdy(&mut self) -> RF_FSM_LO_RDY_W { - RF_FSM_LO_RDY_W { w: self } + #[must_use] + pub fn rf_fsm_lo_rdy_sbclr(&mut self) -> RF_FSM_LO_RDY_SBCLR_W<19> { + RF_FSM_LO_RDY_SBCLR_W::new(self) } - #[doc = "Bits 0:15"] + #[doc = "Bits 20:29"] #[inline(always)] - pub fn rf_fsm_lo_time(&mut self) -> RF_FSM_LO_TIME_W { - RF_FSM_LO_TIME_W { w: self } + #[must_use] + pub fn rf_fsm_pu_pa_dly_n(&mut self) -> RF_FSM_PU_PA_DLY_N_W<20> { + RF_FSM_PU_PA_DLY_N_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -309,11 +151,10 @@ impl crate::Readable for RF_FSM_CTRL1_SPEC { #[doc = "`write(|w| ..)` method takes [rf_fsm_ctrl1::W](W) writer structure"] impl crate::Writable for RF_FSM_CTRL1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rf_fsm_ctrl1 to value 0"] impl crate::Resettable for RF_FSM_CTRL1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rf_fsm_ctrl2.rs b/src/rf/rf_fsm_ctrl2.rs index 087a55b..8a510b0 100644 --- a/src/rf/rf_fsm_ctrl2.rs +++ b/src/rf/rf_fsm_ctrl2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,307 +28,129 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rf_fsm_dfe_rx_dly_n` reader - "] -pub struct RF_FSM_DFE_RX_DLY_N_R(crate::FieldReader); -impl RF_FSM_DFE_RX_DLY_N_R { - pub(crate) fn new(bits: u16) -> Self { - RF_FSM_DFE_RX_DLY_N_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_FSM_DFE_RX_DLY_N_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_fsm_dfe_rx_dly_n` writer - "] -pub struct RF_FSM_DFE_RX_DLY_N_W<'a> { - w: &'a mut W, -} -impl<'a> RF_FSM_DFE_RX_DLY_N_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03ff << 20)) | ((value as u32 & 0x03ff) << 20); - self.w - } -} -#[doc = "Field `rf_fsm_dfe_tx_dly_n` reader - "] -pub struct RF_FSM_DFE_TX_DLY_N_R(crate::FieldReader); -impl RF_FSM_DFE_TX_DLY_N_R { - pub(crate) fn new(bits: u16) -> Self { - RF_FSM_DFE_TX_DLY_N_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_FSM_DFE_TX_DLY_N_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_fsm_dfe_tx_dly_n` writer - "] -pub struct RF_FSM_DFE_TX_DLY_N_W<'a> { - w: &'a mut W, -} -impl<'a> RF_FSM_DFE_TX_DLY_N_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03ff << 10)) | ((value as u32 & 0x03ff) << 10); - self.w - } -} -#[doc = "Field `rf_trx_ble_4s_en` reader - "] -pub struct RF_TRX_BLE_4S_EN_R(crate::FieldReader); -impl RF_TRX_BLE_4S_EN_R { - pub(crate) fn new(bits: bool) -> Self { - RF_TRX_BLE_4S_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_TRX_BLE_4S_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_trx_ble_4s_en` writer - "] -pub struct RF_TRX_BLE_4S_EN_W<'a> { - w: &'a mut W, -} -impl<'a> RF_TRX_BLE_4S_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w - } -} -#[doc = "Field `rf_trx_sw_ble_4s` reader - "] -pub struct RF_TRX_SW_BLE_4S_R(crate::FieldReader); -impl RF_TRX_SW_BLE_4S_R { - pub(crate) fn new(bits: bool) -> Self { - RF_TRX_SW_BLE_4S_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_TRX_SW_BLE_4S_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_trx_sw_ble_4s` writer - "] -pub struct RF_TRX_SW_BLE_4S_W<'a> { - w: &'a mut W, -} -impl<'a> RF_TRX_SW_BLE_4S_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w - } -} -#[doc = "Field `rf_trx_en_ble_4s` reader - "] -pub struct RF_TRX_EN_BLE_4S_R(crate::FieldReader); -impl RF_TRX_EN_BLE_4S_R { - pub(crate) fn new(bits: bool) -> Self { - RF_TRX_EN_BLE_4S_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_TRX_EN_BLE_4S_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_trx_en_ble_4s` writer - "] -pub struct RF_TRX_EN_BLE_4S_W<'a> { - w: &'a mut W, -} -impl<'a> RF_TRX_EN_BLE_4S_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} -#[doc = "Field `rf_fsm_st_dbg_en` reader - "] -pub struct RF_FSM_ST_DBG_EN_R(crate::FieldReader); -impl RF_FSM_ST_DBG_EN_R { - pub(crate) fn new(bits: bool) -> Self { - RF_FSM_ST_DBG_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_FSM_ST_DBG_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_fsm_st_dbg_en` writer - "] -pub struct RF_FSM_ST_DBG_EN_W<'a> { - w: &'a mut W, -} -impl<'a> RF_FSM_ST_DBG_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} #[doc = "Field `rf_fsm_st_dbg` reader - "] -pub struct RF_FSM_ST_DBG_R(crate::FieldReader); -impl RF_FSM_ST_DBG_R { - pub(crate) fn new(bits: u8) -> Self { - RF_FSM_ST_DBG_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_FSM_ST_DBG_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RF_FSM_ST_DBG_R = crate::FieldReader; #[doc = "Field `rf_fsm_st_dbg` writer - "] -pub struct RF_FSM_ST_DBG_W<'a> { - w: &'a mut W, -} -impl<'a> RF_FSM_ST_DBG_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x07) | (value as u32 & 0x07); - self.w - } -} +pub type RF_FSM_ST_DBG_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_FSM_CTRL2_SPEC, u8, u8, 3, O>; +#[doc = "Field `rf_fsm_st_dbg_en` reader - "] +pub type RF_FSM_ST_DBG_EN_R = crate::BitReader; +#[doc = "Field `rf_fsm_st_dbg_en` writer - "] +pub type RF_FSM_ST_DBG_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RF_FSM_CTRL2_SPEC, bool, O>; +#[doc = "Field `rf_trx_en_ble_4s` reader - "] +pub type RF_TRX_EN_BLE_4S_R = crate::BitReader; +#[doc = "Field `rf_trx_en_ble_4s` writer - "] +pub type RF_TRX_EN_BLE_4S_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RF_FSM_CTRL2_SPEC, bool, O>; +#[doc = "Field `rf_trx_sw_ble_4s` reader - "] +pub type RF_TRX_SW_BLE_4S_R = crate::BitReader; +#[doc = "Field `rf_trx_sw_ble_4s` writer - "] +pub type RF_TRX_SW_BLE_4S_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RF_FSM_CTRL2_SPEC, bool, O>; +#[doc = "Field `rf_trx_ble_4s_en` reader - "] +pub type RF_TRX_BLE_4S_EN_R = crate::BitReader; +#[doc = "Field `rf_trx_ble_4s_en` writer - "] +pub type RF_TRX_BLE_4S_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RF_FSM_CTRL2_SPEC, bool, O>; +#[doc = "Field `rf_fsm_dfe_tx_dly_n` reader - "] +pub type RF_FSM_DFE_TX_DLY_N_R = crate::FieldReader; +#[doc = "Field `rf_fsm_dfe_tx_dly_n` writer - "] +pub type RF_FSM_DFE_TX_DLY_N_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_FSM_CTRL2_SPEC, u16, u16, 10, O>; +#[doc = "Field `rf_fsm_dfe_rx_dly_n` reader - "] +pub type RF_FSM_DFE_RX_DLY_N_R = crate::FieldReader; +#[doc = "Field `rf_fsm_dfe_rx_dly_n` writer - "] +pub type RF_FSM_DFE_RX_DLY_N_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_FSM_CTRL2_SPEC, u16, u16, 10, O>; impl R { - #[doc = "Bits 20:29"] + #[doc = "Bits 0:2"] #[inline(always)] - pub fn rf_fsm_dfe_rx_dly_n(&self) -> RF_FSM_DFE_RX_DLY_N_R { - RF_FSM_DFE_RX_DLY_N_R::new(((self.bits >> 20) & 0x03ff) as u16) + pub fn rf_fsm_st_dbg(&self) -> RF_FSM_ST_DBG_R { + RF_FSM_ST_DBG_R::new((self.bits & 7) as u8) } - #[doc = "Bits 10:19"] + #[doc = "Bit 3"] #[inline(always)] - pub fn rf_fsm_dfe_tx_dly_n(&self) -> RF_FSM_DFE_TX_DLY_N_R { - RF_FSM_DFE_TX_DLY_N_R::new(((self.bits >> 10) & 0x03ff) as u16) + pub fn rf_fsm_st_dbg_en(&self) -> RF_FSM_ST_DBG_EN_R { + RF_FSM_ST_DBG_EN_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bit 6"] + #[doc = "Bit 4"] #[inline(always)] - pub fn rf_trx_ble_4s_en(&self) -> RF_TRX_BLE_4S_EN_R { - RF_TRX_BLE_4S_EN_R::new(((self.bits >> 6) & 0x01) != 0) + pub fn rf_trx_en_ble_4s(&self) -> RF_TRX_EN_BLE_4S_R { + RF_TRX_EN_BLE_4S_R::new(((self.bits >> 4) & 1) != 0) } #[doc = "Bit 5"] #[inline(always)] pub fn rf_trx_sw_ble_4s(&self) -> RF_TRX_SW_BLE_4S_R { - RF_TRX_SW_BLE_4S_R::new(((self.bits >> 5) & 0x01) != 0) + RF_TRX_SW_BLE_4S_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 4"] + #[doc = "Bit 6"] #[inline(always)] - pub fn rf_trx_en_ble_4s(&self) -> RF_TRX_EN_BLE_4S_R { - RF_TRX_EN_BLE_4S_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn rf_trx_ble_4s_en(&self) -> RF_TRX_BLE_4S_EN_R { + RF_TRX_BLE_4S_EN_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = "Bit 3"] + #[doc = "Bits 10:19"] #[inline(always)] - pub fn rf_fsm_st_dbg_en(&self) -> RF_FSM_ST_DBG_EN_R { - RF_FSM_ST_DBG_EN_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn rf_fsm_dfe_tx_dly_n(&self) -> RF_FSM_DFE_TX_DLY_N_R { + RF_FSM_DFE_TX_DLY_N_R::new(((self.bits >> 10) & 0x03ff) as u16) } - #[doc = "Bits 0:2"] + #[doc = "Bits 20:29"] #[inline(always)] - pub fn rf_fsm_st_dbg(&self) -> RF_FSM_ST_DBG_R { - RF_FSM_ST_DBG_R::new((self.bits & 0x07) as u8) + pub fn rf_fsm_dfe_rx_dly_n(&self) -> RF_FSM_DFE_RX_DLY_N_R { + RF_FSM_DFE_RX_DLY_N_R::new(((self.bits >> 20) & 0x03ff) as u16) } } impl W { - #[doc = "Bits 20:29"] + #[doc = "Bits 0:2"] #[inline(always)] - pub fn rf_fsm_dfe_rx_dly_n(&mut self) -> RF_FSM_DFE_RX_DLY_N_W { - RF_FSM_DFE_RX_DLY_N_W { w: self } + #[must_use] + pub fn rf_fsm_st_dbg(&mut self) -> RF_FSM_ST_DBG_W<0> { + RF_FSM_ST_DBG_W::new(self) } - #[doc = "Bits 10:19"] + #[doc = "Bit 3"] #[inline(always)] - pub fn rf_fsm_dfe_tx_dly_n(&mut self) -> RF_FSM_DFE_TX_DLY_N_W { - RF_FSM_DFE_TX_DLY_N_W { w: self } + #[must_use] + pub fn rf_fsm_st_dbg_en(&mut self) -> RF_FSM_ST_DBG_EN_W<3> { + RF_FSM_ST_DBG_EN_W::new(self) } - #[doc = "Bit 6"] + #[doc = "Bit 4"] #[inline(always)] - pub fn rf_trx_ble_4s_en(&mut self) -> RF_TRX_BLE_4S_EN_W { - RF_TRX_BLE_4S_EN_W { w: self } + #[must_use] + pub fn rf_trx_en_ble_4s(&mut self) -> RF_TRX_EN_BLE_4S_W<4> { + RF_TRX_EN_BLE_4S_W::new(self) } #[doc = "Bit 5"] #[inline(always)] - pub fn rf_trx_sw_ble_4s(&mut self) -> RF_TRX_SW_BLE_4S_W { - RF_TRX_SW_BLE_4S_W { w: self } + #[must_use] + pub fn rf_trx_sw_ble_4s(&mut self) -> RF_TRX_SW_BLE_4S_W<5> { + RF_TRX_SW_BLE_4S_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 6"] #[inline(always)] - pub fn rf_trx_en_ble_4s(&mut self) -> RF_TRX_EN_BLE_4S_W { - RF_TRX_EN_BLE_4S_W { w: self } + #[must_use] + pub fn rf_trx_ble_4s_en(&mut self) -> RF_TRX_BLE_4S_EN_W<6> { + RF_TRX_BLE_4S_EN_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bits 10:19"] #[inline(always)] - pub fn rf_fsm_st_dbg_en(&mut self) -> RF_FSM_ST_DBG_EN_W { - RF_FSM_ST_DBG_EN_W { w: self } + #[must_use] + pub fn rf_fsm_dfe_tx_dly_n(&mut self) -> RF_FSM_DFE_TX_DLY_N_W<10> { + RF_FSM_DFE_TX_DLY_N_W::new(self) } - #[doc = "Bits 0:2"] + #[doc = "Bits 20:29"] #[inline(always)] - pub fn rf_fsm_st_dbg(&mut self) -> RF_FSM_ST_DBG_W { - RF_FSM_ST_DBG_W { w: self } + #[must_use] + pub fn rf_fsm_dfe_rx_dly_n(&mut self) -> RF_FSM_DFE_RX_DLY_N_W<20> { + RF_FSM_DFE_RX_DLY_N_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -345,11 +168,10 @@ impl crate::Readable for RF_FSM_CTRL2_SPEC { #[doc = "`write(|w| ..)` method takes [rf_fsm_ctrl2::W](W) writer structure"] impl crate::Writable for RF_FSM_CTRL2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rf_fsm_ctrl2 to value 0"] impl crate::Resettable for RF_FSM_CTRL2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rf_fsm_ctrl_hw.rs b/src/rf/rf_fsm_ctrl_hw.rs index 4282fdb..1f333c3 100644 --- a/src/rf/rf_fsm_ctrl_hw.rs +++ b/src/rf/rf_fsm_ctrl_hw.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,425 +28,176 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rf_rc_state_value` reader - "] -pub struct RF_RC_STATE_VALUE_R(crate::FieldReader); -impl RF_RC_STATE_VALUE_R { - pub(crate) fn new(bits: u8) -> Self { - RF_RC_STATE_VALUE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_RC_STATE_VALUE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_rc_state_value` writer - "] -pub struct RF_RC_STATE_VALUE_W<'a> { - w: &'a mut W, -} -impl<'a> RF_RC_STATE_VALUE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 28)) | ((value as u32 & 0x07) << 28); - self.w - } -} -#[doc = "Field `rf_fsm_st_int_set` reader - "] -pub struct RF_FSM_ST_INT_SET_R(crate::FieldReader); -impl RF_FSM_ST_INT_SET_R { - pub(crate) fn new(bits: bool) -> Self { - RF_FSM_ST_INT_SET_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_FSM_ST_INT_SET_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_fsm_st_int_set` writer - "] -pub struct RF_FSM_ST_INT_SET_W<'a> { - w: &'a mut W, -} -impl<'a> RF_FSM_ST_INT_SET_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24); - self.w - } -} -#[doc = "Field `rf_fsm_st_int_clr` reader - "] -pub struct RF_FSM_ST_INT_CLR_R(crate::FieldReader); -impl RF_FSM_ST_INT_CLR_R { - pub(crate) fn new(bits: bool) -> Self { - RF_FSM_ST_INT_CLR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_FSM_ST_INT_CLR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_fsm_st_int_clr` writer - "] -pub struct RF_FSM_ST_INT_CLR_W<'a> { - w: &'a mut W, -} -impl<'a> RF_FSM_ST_INT_CLR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w - } -} -#[doc = "Field `rf_fsm_st_int` reader - "] -pub struct RF_FSM_ST_INT_R(crate::FieldReader); -impl RF_FSM_ST_INT_R { - pub(crate) fn new(bits: bool) -> Self { - RF_FSM_ST_INT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_FSM_ST_INT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_fsm_st_int` writer - "] -pub struct RF_FSM_ST_INT_W<'a> { - w: &'a mut W, -} -impl<'a> RF_FSM_ST_INT_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `rf_fsm_st_int_sel` reader - "] -pub struct RF_FSM_ST_INT_SEL_R(crate::FieldReader); -impl RF_FSM_ST_INT_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - RF_FSM_ST_INT_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_FSM_ST_INT_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_fsm_st_int_sel` writer - "] -pub struct RF_FSM_ST_INT_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> RF_FSM_ST_INT_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 12)) | ((value as u32 & 0x07) << 12); - self.w - } -} -#[doc = "Field `rf_rc_state_dbg_en` reader - "] -pub struct RF_RC_STATE_DBG_EN_R(crate::FieldReader); -impl RF_RC_STATE_DBG_EN_R { - pub(crate) fn new(bits: bool) -> Self { - RF_RC_STATE_DBG_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_RC_STATE_DBG_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_rc_state_dbg_en` writer - "] -pub struct RF_RC_STATE_DBG_EN_W<'a> { - w: &'a mut W, -} -impl<'a> RF_RC_STATE_DBG_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w - } -} -#[doc = "Field `rf_rc_state_dbg` reader - "] -pub struct RF_RC_STATE_DBG_R(crate::FieldReader); -impl RF_RC_STATE_DBG_R { - pub(crate) fn new(bits: u8) -> Self { - RF_RC_STATE_DBG_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_RC_STATE_DBG_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_rc_state_dbg` writer - "] -pub struct RF_RC_STATE_DBG_W<'a> { - w: &'a mut W, -} -impl<'a> RF_RC_STATE_DBG_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 8)) | ((value as u32 & 0x07) << 8); - self.w - } -} -#[doc = "Field `rf_fsm_state` reader - "] -pub struct RF_FSM_STATE_R(crate::FieldReader); -impl RF_FSM_STATE_R { - pub(crate) fn new(bits: u8) -> Self { - RF_FSM_STATE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_FSM_STATE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_fsm_state` writer - "] -pub struct RF_FSM_STATE_W<'a> { - w: &'a mut W, -} -impl<'a> RF_FSM_STATE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 4)) | ((value as u32 & 0x07) << 4); - self.w - } -} -#[doc = "Field `rf_fsm_t2r_cal_mode` reader - "] -pub struct RF_FSM_T2R_CAL_MODE_R(crate::FieldReader); -impl RF_FSM_T2R_CAL_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - RF_FSM_T2R_CAL_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_FSM_T2R_CAL_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_fsm_t2r_cal_mode` writer - "] -pub struct RF_FSM_T2R_CAL_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> RF_FSM_T2R_CAL_MODE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 2)) | ((value as u32 & 0x03) << 2); - self.w - } -} #[doc = "Field `rf_fsm_ctrl_en` reader - "] -pub struct RF_FSM_CTRL_EN_R(crate::FieldReader); -impl RF_FSM_CTRL_EN_R { - pub(crate) fn new(bits: bool) -> Self { - RF_FSM_CTRL_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_FSM_CTRL_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RF_FSM_CTRL_EN_R = crate::BitReader; #[doc = "Field `rf_fsm_ctrl_en` writer - "] -pub struct RF_FSM_CTRL_EN_W<'a> { - w: &'a mut W, -} -impl<'a> RF_FSM_CTRL_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type RF_FSM_CTRL_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RF_FSM_CTRL_HW_SPEC, bool, O>; +#[doc = "Field `rf_fsm_t2r_cal_mode` reader - "] +pub type RF_FSM_T2R_CAL_MODE_R = crate::FieldReader; +#[doc = "Field `rf_fsm_t2r_cal_mode` writer - "] +pub type RF_FSM_T2R_CAL_MODE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_FSM_CTRL_HW_SPEC, u8, u8, 2, O>; +#[doc = "Field `rf_fsm_state` reader - "] +pub type RF_FSM_STATE_R = crate::FieldReader; +#[doc = "Field `rf_fsm_state` writer - "] +pub type RF_FSM_STATE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_FSM_CTRL_HW_SPEC, u8, u8, 3, O>; +#[doc = "Field `rf_rc_state_dbg` reader - "] +pub type RF_RC_STATE_DBG_R = crate::FieldReader; +#[doc = "Field `rf_rc_state_dbg` writer - "] +pub type RF_RC_STATE_DBG_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_FSM_CTRL_HW_SPEC, u8, u8, 3, O>; +#[doc = "Field `rf_rc_state_dbg_en` reader - "] +pub type RF_RC_STATE_DBG_EN_R = crate::BitReader; +#[doc = "Field `rf_rc_state_dbg_en` writer - "] +pub type RF_RC_STATE_DBG_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RF_FSM_CTRL_HW_SPEC, bool, O>; +#[doc = "Field `rf_fsm_st_int_sel` reader - "] +pub type RF_FSM_ST_INT_SEL_R = crate::FieldReader; +#[doc = "Field `rf_fsm_st_int_sel` writer - "] +pub type RF_FSM_ST_INT_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_FSM_CTRL_HW_SPEC, u8, u8, 3, O>; +#[doc = "Field `rf_fsm_st_int` reader - "] +pub type RF_FSM_ST_INT_R = crate::BitReader; +#[doc = "Field `rf_fsm_st_int` writer - "] +pub type RF_FSM_ST_INT_W<'a, const O: u8> = crate::BitWriter<'a, u32, RF_FSM_CTRL_HW_SPEC, bool, O>; +#[doc = "Field `rf_fsm_st_int_clr` reader - "] +pub type RF_FSM_ST_INT_CLR_R = crate::BitReader; +#[doc = "Field `rf_fsm_st_int_clr` writer - "] +pub type RF_FSM_ST_INT_CLR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RF_FSM_CTRL_HW_SPEC, bool, O>; +#[doc = "Field `rf_fsm_st_int_set` reader - "] +pub type RF_FSM_ST_INT_SET_R = crate::BitReader; +#[doc = "Field `rf_fsm_st_int_set` writer - "] +pub type RF_FSM_ST_INT_SET_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RF_FSM_CTRL_HW_SPEC, bool, O>; +#[doc = "Field `rf_rc_state_value` reader - "] +pub type RF_RC_STATE_VALUE_R = crate::FieldReader; +#[doc = "Field `rf_rc_state_value` writer - "] +pub type RF_RC_STATE_VALUE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_FSM_CTRL_HW_SPEC, u8, u8, 3, O>; +impl R { + #[doc = "Bit 1"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w + pub fn rf_fsm_ctrl_en(&self) -> RF_FSM_CTRL_EN_R { + RF_FSM_CTRL_EN_R::new(((self.bits >> 1) & 1) != 0) } -} -impl R { - #[doc = "Bits 28:30"] + #[doc = "Bits 2:3"] #[inline(always)] - pub fn rf_rc_state_value(&self) -> RF_RC_STATE_VALUE_R { - RF_RC_STATE_VALUE_R::new(((self.bits >> 28) & 0x07) as u8) + pub fn rf_fsm_t2r_cal_mode(&self) -> RF_FSM_T2R_CAL_MODE_R { + RF_FSM_T2R_CAL_MODE_R::new(((self.bits >> 2) & 3) as u8) } - #[doc = "Bit 24"] + #[doc = "Bits 4:6"] #[inline(always)] - pub fn rf_fsm_st_int_set(&self) -> RF_FSM_ST_INT_SET_R { - RF_FSM_ST_INT_SET_R::new(((self.bits >> 24) & 0x01) != 0) + pub fn rf_fsm_state(&self) -> RF_FSM_STATE_R { + RF_FSM_STATE_R::new(((self.bits >> 4) & 7) as u8) } - #[doc = "Bit 20"] + #[doc = "Bits 8:10"] #[inline(always)] - pub fn rf_fsm_st_int_clr(&self) -> RF_FSM_ST_INT_CLR_R { - RF_FSM_ST_INT_CLR_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn rf_rc_state_dbg(&self) -> RF_RC_STATE_DBG_R { + RF_RC_STATE_DBG_R::new(((self.bits >> 8) & 7) as u8) } - #[doc = "Bit 16"] + #[doc = "Bit 11"] #[inline(always)] - pub fn rf_fsm_st_int(&self) -> RF_FSM_ST_INT_R { - RF_FSM_ST_INT_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn rf_rc_state_dbg_en(&self) -> RF_RC_STATE_DBG_EN_R { + RF_RC_STATE_DBG_EN_R::new(((self.bits >> 11) & 1) != 0) } #[doc = "Bits 12:14"] #[inline(always)] pub fn rf_fsm_st_int_sel(&self) -> RF_FSM_ST_INT_SEL_R { - RF_FSM_ST_INT_SEL_R::new(((self.bits >> 12) & 0x07) as u8) + RF_FSM_ST_INT_SEL_R::new(((self.bits >> 12) & 7) as u8) } - #[doc = "Bit 11"] - #[inline(always)] - pub fn rf_rc_state_dbg_en(&self) -> RF_RC_STATE_DBG_EN_R { - RF_RC_STATE_DBG_EN_R::new(((self.bits >> 11) & 0x01) != 0) - } - #[doc = "Bits 8:10"] + #[doc = "Bit 16"] #[inline(always)] - pub fn rf_rc_state_dbg(&self) -> RF_RC_STATE_DBG_R { - RF_RC_STATE_DBG_R::new(((self.bits >> 8) & 0x07) as u8) + pub fn rf_fsm_st_int(&self) -> RF_FSM_ST_INT_R { + RF_FSM_ST_INT_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bits 4:6"] + #[doc = "Bit 20"] #[inline(always)] - pub fn rf_fsm_state(&self) -> RF_FSM_STATE_R { - RF_FSM_STATE_R::new(((self.bits >> 4) & 0x07) as u8) + pub fn rf_fsm_st_int_clr(&self) -> RF_FSM_ST_INT_CLR_R { + RF_FSM_ST_INT_CLR_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bits 2:3"] + #[doc = "Bit 24"] #[inline(always)] - pub fn rf_fsm_t2r_cal_mode(&self) -> RF_FSM_T2R_CAL_MODE_R { - RF_FSM_T2R_CAL_MODE_R::new(((self.bits >> 2) & 0x03) as u8) + pub fn rf_fsm_st_int_set(&self) -> RF_FSM_ST_INT_SET_R { + RF_FSM_ST_INT_SET_R::new(((self.bits >> 24) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bits 28:30"] #[inline(always)] - pub fn rf_fsm_ctrl_en(&self) -> RF_FSM_CTRL_EN_R { - RF_FSM_CTRL_EN_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn rf_rc_state_value(&self) -> RF_RC_STATE_VALUE_R { + RF_RC_STATE_VALUE_R::new(((self.bits >> 28) & 7) as u8) } } impl W { - #[doc = "Bits 28:30"] + #[doc = "Bit 1"] #[inline(always)] - pub fn rf_rc_state_value(&mut self) -> RF_RC_STATE_VALUE_W { - RF_RC_STATE_VALUE_W { w: self } + #[must_use] + pub fn rf_fsm_ctrl_en(&mut self) -> RF_FSM_CTRL_EN_W<1> { + RF_FSM_CTRL_EN_W::new(self) } - #[doc = "Bit 24"] + #[doc = "Bits 2:3"] #[inline(always)] - pub fn rf_fsm_st_int_set(&mut self) -> RF_FSM_ST_INT_SET_W { - RF_FSM_ST_INT_SET_W { w: self } + #[must_use] + pub fn rf_fsm_t2r_cal_mode(&mut self) -> RF_FSM_T2R_CAL_MODE_W<2> { + RF_FSM_T2R_CAL_MODE_W::new(self) } - #[doc = "Bit 20"] + #[doc = "Bits 4:6"] #[inline(always)] - pub fn rf_fsm_st_int_clr(&mut self) -> RF_FSM_ST_INT_CLR_W { - RF_FSM_ST_INT_CLR_W { w: self } + #[must_use] + pub fn rf_fsm_state(&mut self) -> RF_FSM_STATE_W<4> { + RF_FSM_STATE_W::new(self) } - #[doc = "Bit 16"] + #[doc = "Bits 8:10"] #[inline(always)] - pub fn rf_fsm_st_int(&mut self) -> RF_FSM_ST_INT_W { - RF_FSM_ST_INT_W { w: self } + #[must_use] + pub fn rf_rc_state_dbg(&mut self) -> RF_RC_STATE_DBG_W<8> { + RF_RC_STATE_DBG_W::new(self) } - #[doc = "Bits 12:14"] + #[doc = "Bit 11"] #[inline(always)] - pub fn rf_fsm_st_int_sel(&mut self) -> RF_FSM_ST_INT_SEL_W { - RF_FSM_ST_INT_SEL_W { w: self } + #[must_use] + pub fn rf_rc_state_dbg_en(&mut self) -> RF_RC_STATE_DBG_EN_W<11> { + RF_RC_STATE_DBG_EN_W::new(self) } - #[doc = "Bit 11"] + #[doc = "Bits 12:14"] #[inline(always)] - pub fn rf_rc_state_dbg_en(&mut self) -> RF_RC_STATE_DBG_EN_W { - RF_RC_STATE_DBG_EN_W { w: self } + #[must_use] + pub fn rf_fsm_st_int_sel(&mut self) -> RF_FSM_ST_INT_SEL_W<12> { + RF_FSM_ST_INT_SEL_W::new(self) } - #[doc = "Bits 8:10"] + #[doc = "Bit 16"] #[inline(always)] - pub fn rf_rc_state_dbg(&mut self) -> RF_RC_STATE_DBG_W { - RF_RC_STATE_DBG_W { w: self } + #[must_use] + pub fn rf_fsm_st_int(&mut self) -> RF_FSM_ST_INT_W<16> { + RF_FSM_ST_INT_W::new(self) } - #[doc = "Bits 4:6"] + #[doc = "Bit 20"] #[inline(always)] - pub fn rf_fsm_state(&mut self) -> RF_FSM_STATE_W { - RF_FSM_STATE_W { w: self } + #[must_use] + pub fn rf_fsm_st_int_clr(&mut self) -> RF_FSM_ST_INT_CLR_W<20> { + RF_FSM_ST_INT_CLR_W::new(self) } - #[doc = "Bits 2:3"] + #[doc = "Bit 24"] #[inline(always)] - pub fn rf_fsm_t2r_cal_mode(&mut self) -> RF_FSM_T2R_CAL_MODE_W { - RF_FSM_T2R_CAL_MODE_W { w: self } + #[must_use] + pub fn rf_fsm_st_int_set(&mut self) -> RF_FSM_ST_INT_SET_W<24> { + RF_FSM_ST_INT_SET_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bits 28:30"] #[inline(always)] - pub fn rf_fsm_ctrl_en(&mut self) -> RF_FSM_CTRL_EN_W { - RF_FSM_CTRL_EN_W { w: self } + #[must_use] + pub fn rf_rc_state_value(&mut self) -> RF_RC_STATE_VALUE_W<28> { + RF_RC_STATE_VALUE_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -463,11 +215,10 @@ impl crate::Readable for RF_FSM_CTRL_HW_SPEC { #[doc = "`write(|w| ..)` method takes [rf_fsm_ctrl_hw::W](W) writer structure"] impl crate::Writable for RF_FSM_CTRL_HW_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rf_fsm_ctrl_hw to value 0"] impl crate::Resettable for RF_FSM_CTRL_HW_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rf_fsm_ctrl_sw.rs b/src/rf/rf_fsm_ctrl_sw.rs index 466116f..06561cf 100644 --- a/src/rf/rf_fsm_ctrl_sw.rs +++ b/src/rf/rf_fsm_ctrl_sw.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,235 +28,95 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `lo_unlocked` reader - "] -pub struct LO_UNLOCKED_R(crate::FieldReader); -impl LO_UNLOCKED_R { - pub(crate) fn new(bits: bool) -> Self { - LO_UNLOCKED_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_UNLOCKED_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_unlocked` writer - "] -pub struct LO_UNLOCKED_W<'a> { - w: &'a mut W, -} -impl<'a> LO_UNLOCKED_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w - } -} -#[doc = "Field `inc_cal_timeout` reader - "] -pub struct INC_CAL_TIMEOUT_R(crate::FieldReader); -impl INC_CAL_TIMEOUT_R { - pub(crate) fn new(bits: bool) -> Self { - INC_CAL_TIMEOUT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for INC_CAL_TIMEOUT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `inc_cal_timeout` writer - "] -pub struct INC_CAL_TIMEOUT_W<'a> { - w: &'a mut W, -} -impl<'a> INC_CAL_TIMEOUT_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `full_cal_en` reader - "] -pub struct FULL_CAL_EN_R(crate::FieldReader); -impl FULL_CAL_EN_R { - pub(crate) fn new(bits: bool) -> Self { - FULL_CAL_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for FULL_CAL_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `full_cal_en` writer - "] -pub struct FULL_CAL_EN_W<'a> { - w: &'a mut W, -} -impl<'a> FULL_CAL_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} -#[doc = "Field `rf_fsm_sw_st_vld` reader - "] -pub struct RF_FSM_SW_ST_VLD_R(crate::FieldReader); -impl RF_FSM_SW_ST_VLD_R { - pub(crate) fn new(bits: bool) -> Self { - RF_FSM_SW_ST_VLD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_FSM_SW_ST_VLD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_fsm_sw_st_vld` writer - "] -pub struct RF_FSM_SW_ST_VLD_W<'a> { - w: &'a mut W, -} -impl<'a> RF_FSM_SW_ST_VLD_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} #[doc = "Field `rf_fsm_sw_st` reader - "] -pub struct RF_FSM_SW_ST_R(crate::FieldReader); -impl RF_FSM_SW_ST_R { - pub(crate) fn new(bits: u8) -> Self { - RF_FSM_SW_ST_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_FSM_SW_ST_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RF_FSM_SW_ST_R = crate::FieldReader; #[doc = "Field `rf_fsm_sw_st` writer - "] -pub struct RF_FSM_SW_ST_W<'a> { - w: &'a mut W, -} -impl<'a> RF_FSM_SW_ST_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x1f) | (value as u32 & 0x1f); - self.w - } -} +pub type RF_FSM_SW_ST_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_FSM_CTRL_SW_SPEC, u8, u8, 5, O>; +#[doc = "Field `rf_fsm_sw_st_vld` reader - "] +pub type RF_FSM_SW_ST_VLD_R = crate::BitReader; +#[doc = "Field `rf_fsm_sw_st_vld` writer - "] +pub type RF_FSM_SW_ST_VLD_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RF_FSM_CTRL_SW_SPEC, bool, O>; +#[doc = "Field `full_cal_en` reader - "] +pub type FULL_CAL_EN_R = crate::BitReader; +#[doc = "Field `full_cal_en` writer - "] +pub type FULL_CAL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RF_FSM_CTRL_SW_SPEC, bool, O>; +#[doc = "Field `inc_cal_timeout` reader - "] +pub type INC_CAL_TIMEOUT_R = crate::BitReader; +#[doc = "Field `inc_cal_timeout` writer - "] +pub type INC_CAL_TIMEOUT_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RF_FSM_CTRL_SW_SPEC, bool, O>; +#[doc = "Field `lo_unlocked` reader - "] +pub type LO_UNLOCKED_R = crate::BitReader; +#[doc = "Field `lo_unlocked` writer - "] +pub type LO_UNLOCKED_W<'a, const O: u8> = crate::BitWriter<'a, u32, RF_FSM_CTRL_SW_SPEC, bool, O>; impl R { - #[doc = "Bit 20"] + #[doc = "Bits 0:4"] #[inline(always)] - pub fn lo_unlocked(&self) -> LO_UNLOCKED_R { - LO_UNLOCKED_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn rf_fsm_sw_st(&self) -> RF_FSM_SW_ST_R { + RF_FSM_SW_ST_R::new((self.bits & 0x1f) as u8) } - #[doc = "Bit 16"] + #[doc = "Bit 8"] #[inline(always)] - pub fn inc_cal_timeout(&self) -> INC_CAL_TIMEOUT_R { - INC_CAL_TIMEOUT_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn rf_fsm_sw_st_vld(&self) -> RF_FSM_SW_ST_VLD_R { + RF_FSM_SW_ST_VLD_R::new(((self.bits >> 8) & 1) != 0) } #[doc = "Bit 12"] #[inline(always)] pub fn full_cal_en(&self) -> FULL_CAL_EN_R { - FULL_CAL_EN_R::new(((self.bits >> 12) & 0x01) != 0) + FULL_CAL_EN_R::new(((self.bits >> 12) & 1) != 0) } - #[doc = "Bit 8"] + #[doc = "Bit 16"] #[inline(always)] - pub fn rf_fsm_sw_st_vld(&self) -> RF_FSM_SW_ST_VLD_R { - RF_FSM_SW_ST_VLD_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn inc_cal_timeout(&self) -> INC_CAL_TIMEOUT_R { + INC_CAL_TIMEOUT_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bits 0:4"] + #[doc = "Bit 20"] #[inline(always)] - pub fn rf_fsm_sw_st(&self) -> RF_FSM_SW_ST_R { - RF_FSM_SW_ST_R::new((self.bits & 0x1f) as u8) + pub fn lo_unlocked(&self) -> LO_UNLOCKED_R { + LO_UNLOCKED_R::new(((self.bits >> 20) & 1) != 0) } } impl W { - #[doc = "Bit 20"] + #[doc = "Bits 0:4"] #[inline(always)] - pub fn lo_unlocked(&mut self) -> LO_UNLOCKED_W { - LO_UNLOCKED_W { w: self } + #[must_use] + pub fn rf_fsm_sw_st(&mut self) -> RF_FSM_SW_ST_W<0> { + RF_FSM_SW_ST_W::new(self) } - #[doc = "Bit 16"] + #[doc = "Bit 8"] #[inline(always)] - pub fn inc_cal_timeout(&mut self) -> INC_CAL_TIMEOUT_W { - INC_CAL_TIMEOUT_W { w: self } + #[must_use] + pub fn rf_fsm_sw_st_vld(&mut self) -> RF_FSM_SW_ST_VLD_W<8> { + RF_FSM_SW_ST_VLD_W::new(self) } #[doc = "Bit 12"] #[inline(always)] - pub fn full_cal_en(&mut self) -> FULL_CAL_EN_W { - FULL_CAL_EN_W { w: self } + #[must_use] + pub fn full_cal_en(&mut self) -> FULL_CAL_EN_W<12> { + FULL_CAL_EN_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bit 16"] #[inline(always)] - pub fn rf_fsm_sw_st_vld(&mut self) -> RF_FSM_SW_ST_VLD_W { - RF_FSM_SW_ST_VLD_W { w: self } + #[must_use] + pub fn inc_cal_timeout(&mut self) -> INC_CAL_TIMEOUT_W<16> { + INC_CAL_TIMEOUT_W::new(self) } - #[doc = "Bits 0:4"] + #[doc = "Bit 20"] #[inline(always)] - pub fn rf_fsm_sw_st(&mut self) -> RF_FSM_SW_ST_W { - RF_FSM_SW_ST_W { w: self } + #[must_use] + pub fn lo_unlocked(&mut self) -> LO_UNLOCKED_W<20> { + LO_UNLOCKED_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -273,11 +134,10 @@ impl crate::Readable for RF_FSM_CTRL_SW_SPEC { #[doc = "`write(|w| ..)` method takes [rf_fsm_ctrl_sw::W](W) writer structure"] impl crate::Writable for RF_FSM_CTRL_SW_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rf_fsm_ctrl_sw to value 0"] impl crate::Resettable for RF_FSM_CTRL_SW_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rf_ical_ctrl0.rs b/src/rf/rf_ical_ctrl0.rs index 8be7101..38183cd 100644 --- a/src/rf/rf_ical_ctrl0.rs +++ b/src/rf/rf_ical_ctrl0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,215 +28,97 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rf_ical_f_ud_inv_en` reader - "] -pub struct RF_ICAL_F_UD_INV_EN_R(crate::FieldReader); -impl RF_ICAL_F_UD_INV_EN_R { - pub(crate) fn new(bits: bool) -> Self { - RF_ICAL_F_UD_INV_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_ICAL_F_UD_INV_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_ical_f_ud_inv_en` writer - "] -pub struct RF_ICAL_F_UD_INV_EN_W<'a> { - w: &'a mut W, -} -impl<'a> RF_ICAL_F_UD_INV_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 31)) | ((value as u32 & 0x01) << 31); - self.w - } -} -#[doc = "Field `rf_ical_a_ud_inv_en` reader - "] -pub struct RF_ICAL_A_UD_INV_EN_R(crate::FieldReader); -impl RF_ICAL_A_UD_INV_EN_R { - pub(crate) fn new(bits: bool) -> Self { - RF_ICAL_A_UD_INV_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_ICAL_A_UD_INV_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_ical_a_ud_inv_en` writer - "] -pub struct RF_ICAL_A_UD_INV_EN_W<'a> { - w: &'a mut W, -} -impl<'a> RF_ICAL_A_UD_INV_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 30)) | ((value as u32 & 0x01) << 30); - self.w - } -} -#[doc = "Field `rf_ical_f_cnt_n` reader - "] -pub struct RF_ICAL_F_CNT_N_R(crate::FieldReader); -impl RF_ICAL_F_CNT_N_R { - pub(crate) fn new(bits: u16) -> Self { - RF_ICAL_F_CNT_N_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_ICAL_F_CNT_N_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_ical_f_cnt_n` writer - "] -pub struct RF_ICAL_F_CNT_N_W<'a> { - w: &'a mut W, -} -impl<'a> RF_ICAL_F_CNT_N_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03ff << 20)) | ((value as u32 & 0x03ff) << 20); - self.w - } -} -#[doc = "Field `rf_ical_a_cnt_n` reader - "] -pub struct RF_ICAL_A_CNT_N_R(crate::FieldReader); -impl RF_ICAL_A_CNT_N_R { - pub(crate) fn new(bits: u16) -> Self { - RF_ICAL_A_CNT_N_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_ICAL_A_CNT_N_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_ical_a_cnt_n` writer - "] -pub struct RF_ICAL_A_CNT_N_W<'a> { - w: &'a mut W, -} -impl<'a> RF_ICAL_A_CNT_N_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03ff << 10)) | ((value as u32 & 0x03ff) << 10); - self.w - } -} #[doc = "Field `rf_ical_r_cnt_n` reader - "] -pub struct RF_ICAL_R_CNT_N_R(crate::FieldReader); -impl RF_ICAL_R_CNT_N_R { - pub(crate) fn new(bits: u16) -> Self { - RF_ICAL_R_CNT_N_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_ICAL_R_CNT_N_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RF_ICAL_R_CNT_N_R = crate::FieldReader; #[doc = "Field `rf_ical_r_cnt_n` writer - "] -pub struct RF_ICAL_R_CNT_N_W<'a> { - w: &'a mut W, -} -impl<'a> RF_ICAL_R_CNT_N_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03ff) | (value as u32 & 0x03ff); - self.w - } -} +pub type RF_ICAL_R_CNT_N_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_ICAL_CTRL0_SPEC, u16, u16, 10, O>; +#[doc = "Field `rf_ical_a_cnt_n` reader - "] +pub type RF_ICAL_A_CNT_N_R = crate::FieldReader; +#[doc = "Field `rf_ical_a_cnt_n` writer - "] +pub type RF_ICAL_A_CNT_N_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_ICAL_CTRL0_SPEC, u16, u16, 10, O>; +#[doc = "Field `rf_ical_f_cnt_n` reader - "] +pub type RF_ICAL_F_CNT_N_R = crate::FieldReader; +#[doc = "Field `rf_ical_f_cnt_n` writer - "] +pub type RF_ICAL_F_CNT_N_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_ICAL_CTRL0_SPEC, u16, u16, 10, O>; +#[doc = "Field `rf_ical_a_ud_inv_en` reader - "] +pub type RF_ICAL_A_UD_INV_EN_R = crate::BitReader; +#[doc = "Field `rf_ical_a_ud_inv_en` writer - "] +pub type RF_ICAL_A_UD_INV_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RF_ICAL_CTRL0_SPEC, bool, O>; +#[doc = "Field `rf_ical_f_ud_inv_en` reader - "] +pub type RF_ICAL_F_UD_INV_EN_R = crate::BitReader; +#[doc = "Field `rf_ical_f_ud_inv_en` writer - "] +pub type RF_ICAL_F_UD_INV_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RF_ICAL_CTRL0_SPEC, bool, O>; impl R { - #[doc = "Bit 31"] + #[doc = "Bits 0:9"] #[inline(always)] - pub fn rf_ical_f_ud_inv_en(&self) -> RF_ICAL_F_UD_INV_EN_R { - RF_ICAL_F_UD_INV_EN_R::new(((self.bits >> 31) & 0x01) != 0) + pub fn rf_ical_r_cnt_n(&self) -> RF_ICAL_R_CNT_N_R { + RF_ICAL_R_CNT_N_R::new((self.bits & 0x03ff) as u16) } - #[doc = "Bit 30"] + #[doc = "Bits 10:19"] #[inline(always)] - pub fn rf_ical_a_ud_inv_en(&self) -> RF_ICAL_A_UD_INV_EN_R { - RF_ICAL_A_UD_INV_EN_R::new(((self.bits >> 30) & 0x01) != 0) + pub fn rf_ical_a_cnt_n(&self) -> RF_ICAL_A_CNT_N_R { + RF_ICAL_A_CNT_N_R::new(((self.bits >> 10) & 0x03ff) as u16) } #[doc = "Bits 20:29"] #[inline(always)] pub fn rf_ical_f_cnt_n(&self) -> RF_ICAL_F_CNT_N_R { RF_ICAL_F_CNT_N_R::new(((self.bits >> 20) & 0x03ff) as u16) } - #[doc = "Bits 10:19"] + #[doc = "Bit 30"] #[inline(always)] - pub fn rf_ical_a_cnt_n(&self) -> RF_ICAL_A_CNT_N_R { - RF_ICAL_A_CNT_N_R::new(((self.bits >> 10) & 0x03ff) as u16) + pub fn rf_ical_a_ud_inv_en(&self) -> RF_ICAL_A_UD_INV_EN_R { + RF_ICAL_A_UD_INV_EN_R::new(((self.bits >> 30) & 1) != 0) } - #[doc = "Bits 0:9"] + #[doc = "Bit 31"] #[inline(always)] - pub fn rf_ical_r_cnt_n(&self) -> RF_ICAL_R_CNT_N_R { - RF_ICAL_R_CNT_N_R::new((self.bits & 0x03ff) as u16) + pub fn rf_ical_f_ud_inv_en(&self) -> RF_ICAL_F_UD_INV_EN_R { + RF_ICAL_F_UD_INV_EN_R::new(((self.bits >> 31) & 1) != 0) } } impl W { - #[doc = "Bit 31"] + #[doc = "Bits 0:9"] #[inline(always)] - pub fn rf_ical_f_ud_inv_en(&mut self) -> RF_ICAL_F_UD_INV_EN_W { - RF_ICAL_F_UD_INV_EN_W { w: self } + #[must_use] + pub fn rf_ical_r_cnt_n(&mut self) -> RF_ICAL_R_CNT_N_W<0> { + RF_ICAL_R_CNT_N_W::new(self) } - #[doc = "Bit 30"] + #[doc = "Bits 10:19"] #[inline(always)] - pub fn rf_ical_a_ud_inv_en(&mut self) -> RF_ICAL_A_UD_INV_EN_W { - RF_ICAL_A_UD_INV_EN_W { w: self } + #[must_use] + pub fn rf_ical_a_cnt_n(&mut self) -> RF_ICAL_A_CNT_N_W<10> { + RF_ICAL_A_CNT_N_W::new(self) } #[doc = "Bits 20:29"] #[inline(always)] - pub fn rf_ical_f_cnt_n(&mut self) -> RF_ICAL_F_CNT_N_W { - RF_ICAL_F_CNT_N_W { w: self } + #[must_use] + pub fn rf_ical_f_cnt_n(&mut self) -> RF_ICAL_F_CNT_N_W<20> { + RF_ICAL_F_CNT_N_W::new(self) } - #[doc = "Bits 10:19"] + #[doc = "Bit 30"] #[inline(always)] - pub fn rf_ical_a_cnt_n(&mut self) -> RF_ICAL_A_CNT_N_W { - RF_ICAL_A_CNT_N_W { w: self } + #[must_use] + pub fn rf_ical_a_ud_inv_en(&mut self) -> RF_ICAL_A_UD_INV_EN_W<30> { + RF_ICAL_A_UD_INV_EN_W::new(self) } - #[doc = "Bits 0:9"] + #[doc = "Bit 31"] #[inline(always)] - pub fn rf_ical_r_cnt_n(&mut self) -> RF_ICAL_R_CNT_N_W { - RF_ICAL_R_CNT_N_W { w: self } + #[must_use] + pub fn rf_ical_f_ud_inv_en(&mut self) -> RF_ICAL_F_UD_INV_EN_W<31> { + RF_ICAL_F_UD_INV_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -253,11 +136,10 @@ impl crate::Readable for RF_ICAL_CTRL0_SPEC { #[doc = "`write(|w| ..)` method takes [rf_ical_ctrl0::W](W) writer structure"] impl crate::Writable for RF_ICAL_CTRL0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rf_ical_ctrl0 to value 0"] impl crate::Resettable for RF_ICAL_CTRL0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rf_ical_ctrl1.rs b/src/rf/rf_ical_ctrl1.rs index bda000e..972d77a 100644 --- a/src/rf/rf_ical_ctrl1.rs +++ b/src/rf/rf_ical_ctrl1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,123 +28,65 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rf_ical_r_os_i` reader - "] -pub struct RF_ICAL_R_OS_I_R(crate::FieldReader); -impl RF_ICAL_R_OS_I_R { - pub(crate) fn new(bits: u16) -> Self { - RF_ICAL_R_OS_I_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_ICAL_R_OS_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_ical_r_os_i` writer - "] -pub struct RF_ICAL_R_OS_I_W<'a> { - w: &'a mut W, -} -impl<'a> RF_ICAL_R_OS_I_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03ff << 20)) | ((value as u32 & 0x03ff) << 20); - self.w - } -} -#[doc = "Field `rf_ical_r_os_q` reader - "] -pub struct RF_ICAL_R_OS_Q_R(crate::FieldReader); -impl RF_ICAL_R_OS_Q_R { - pub(crate) fn new(bits: u16) -> Self { - RF_ICAL_R_OS_Q_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_ICAL_R_OS_Q_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_ical_r_os_q` writer - "] -pub struct RF_ICAL_R_OS_Q_W<'a> { - w: &'a mut W, -} -impl<'a> RF_ICAL_R_OS_Q_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03ff << 10)) | ((value as u32 & 0x03ff) << 10); - self.w - } -} #[doc = "Field `rf_ical_r_avg_n` reader - "] -pub struct RF_ICAL_R_AVG_N_R(crate::FieldReader); -impl RF_ICAL_R_AVG_N_R { - pub(crate) fn new(bits: u8) -> Self { - RF_ICAL_R_AVG_N_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_ICAL_R_AVG_N_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RF_ICAL_R_AVG_N_R = crate::FieldReader; #[doc = "Field `rf_ical_r_avg_n` writer - "] -pub struct RF_ICAL_R_AVG_N_W<'a> { - w: &'a mut W, -} -impl<'a> RF_ICAL_R_AVG_N_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x1f) | (value as u32 & 0x1f); - self.w - } -} +pub type RF_ICAL_R_AVG_N_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_ICAL_CTRL1_SPEC, u8, u8, 5, O>; +#[doc = "Field `rf_ical_r_os_q` reader - "] +pub type RF_ICAL_R_OS_Q_R = crate::FieldReader; +#[doc = "Field `rf_ical_r_os_q` writer - "] +pub type RF_ICAL_R_OS_Q_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_ICAL_CTRL1_SPEC, u16, u16, 10, O>; +#[doc = "Field `rf_ical_r_os_i` reader - "] +pub type RF_ICAL_R_OS_I_R = crate::FieldReader; +#[doc = "Field `rf_ical_r_os_i` writer - "] +pub type RF_ICAL_R_OS_I_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_ICAL_CTRL1_SPEC, u16, u16, 10, O>; impl R { - #[doc = "Bits 20:29"] + #[doc = "Bits 0:4"] #[inline(always)] - pub fn rf_ical_r_os_i(&self) -> RF_ICAL_R_OS_I_R { - RF_ICAL_R_OS_I_R::new(((self.bits >> 20) & 0x03ff) as u16) + pub fn rf_ical_r_avg_n(&self) -> RF_ICAL_R_AVG_N_R { + RF_ICAL_R_AVG_N_R::new((self.bits & 0x1f) as u8) } #[doc = "Bits 10:19"] #[inline(always)] pub fn rf_ical_r_os_q(&self) -> RF_ICAL_R_OS_Q_R { RF_ICAL_R_OS_Q_R::new(((self.bits >> 10) & 0x03ff) as u16) } - #[doc = "Bits 0:4"] + #[doc = "Bits 20:29"] #[inline(always)] - pub fn rf_ical_r_avg_n(&self) -> RF_ICAL_R_AVG_N_R { - RF_ICAL_R_AVG_N_R::new((self.bits & 0x1f) as u8) + pub fn rf_ical_r_os_i(&self) -> RF_ICAL_R_OS_I_R { + RF_ICAL_R_OS_I_R::new(((self.bits >> 20) & 0x03ff) as u16) } } impl W { - #[doc = "Bits 20:29"] + #[doc = "Bits 0:4"] #[inline(always)] - pub fn rf_ical_r_os_i(&mut self) -> RF_ICAL_R_OS_I_W { - RF_ICAL_R_OS_I_W { w: self } + #[must_use] + pub fn rf_ical_r_avg_n(&mut self) -> RF_ICAL_R_AVG_N_W<0> { + RF_ICAL_R_AVG_N_W::new(self) } #[doc = "Bits 10:19"] #[inline(always)] - pub fn rf_ical_r_os_q(&mut self) -> RF_ICAL_R_OS_Q_W { - RF_ICAL_R_OS_Q_W { w: self } + #[must_use] + pub fn rf_ical_r_os_q(&mut self) -> RF_ICAL_R_OS_Q_W<10> { + RF_ICAL_R_OS_Q_W::new(self) } - #[doc = "Bits 0:4"] + #[doc = "Bits 20:29"] #[inline(always)] - pub fn rf_ical_r_avg_n(&mut self) -> RF_ICAL_R_AVG_N_W { - RF_ICAL_R_AVG_N_W { w: self } + #[must_use] + pub fn rf_ical_r_os_i(&mut self) -> RF_ICAL_R_OS_I_W<20> { + RF_ICAL_R_OS_I_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -161,11 +104,10 @@ impl crate::Readable for RF_ICAL_CTRL1_SPEC { #[doc = "`write(|w| ..)` method takes [rf_ical_ctrl1::W](W) writer structure"] impl crate::Writable for RF_ICAL_CTRL1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rf_ical_ctrl1 to value 0"] impl crate::Resettable for RF_ICAL_CTRL1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rf_ical_ctrl2.rs b/src/rf/rf_ical_ctrl2.rs index 909696e..23a853b 100644 --- a/src/rf/rf_ical_ctrl2.rs +++ b/src/rf/rf_ical_ctrl2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,37 +28,17 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `rf_ical_period_n` reader - "] -pub struct RF_ICAL_PERIOD_N_R(crate::FieldReader); -impl RF_ICAL_PERIOD_N_R { - pub(crate) fn new(bits: u16) -> Self { - RF_ICAL_PERIOD_N_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_ICAL_PERIOD_N_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RF_ICAL_PERIOD_N_R = crate::FieldReader; #[doc = "Field `rf_ical_period_n` writer - "] -pub struct RF_ICAL_PERIOD_N_W<'a> { - w: &'a mut W, -} -impl<'a> RF_ICAL_PERIOD_N_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w - } -} +pub type RF_ICAL_PERIOD_N_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_ICAL_CTRL2_SPEC, u16, u16, 16, O>; impl R { #[doc = "Bits 0:15"] #[inline(always)] @@ -68,10 +49,12 @@ impl R { impl W { #[doc = "Bits 0:15"] #[inline(always)] - pub fn rf_ical_period_n(&mut self) -> RF_ICAL_PERIOD_N_W { - RF_ICAL_PERIOD_N_W { w: self } + #[must_use] + pub fn rf_ical_period_n(&mut self) -> RF_ICAL_PERIOD_N_W<0> { + RF_ICAL_PERIOD_N_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for RF_ICAL_CTRL2_SPEC { #[doc = "`write(|w| ..)` method takes [rf_ical_ctrl2::W](W) writer structure"] impl crate::Writable for RF_ICAL_CTRL2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rf_ical_ctrl2 to value 0"] impl crate::Resettable for RF_ICAL_CTRL2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rf_pkdet_ctrl0.rs b/src/rf/rf_pkdet_ctrl0.rs index 60bf9af..5219f93 100644 --- a/src/rf/rf_pkdet_ctrl0.rs +++ b/src/rf/rf_pkdet_ctrl0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,143 +28,65 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `pkdet_out_mode` reader - "] -pub struct PKDET_OUT_MODE_R(crate::FieldReader); -impl PKDET_OUT_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - PKDET_OUT_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PKDET_OUT_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pkdet_out_mode` writer - "] -pub struct PKDET_OUT_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> PKDET_OUT_MODE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w - } -} -#[doc = "Field `pkdet_out_cnt_en` reader - "] -pub struct PKDET_OUT_CNT_EN_R(crate::FieldReader); -impl PKDET_OUT_CNT_EN_R { - pub(crate) fn new(bits: bool) -> Self { - PKDET_OUT_CNT_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PKDET_OUT_CNT_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pkdet_out_cnt_en` writer - "] -pub struct PKDET_OUT_CNT_EN_W<'a> { - w: &'a mut W, -} -impl<'a> PKDET_OUT_CNT_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} #[doc = "Field `pkdet_out_cnt_sts` reader - "] -pub struct PKDET_OUT_CNT_STS_R(crate::FieldReader); -impl PKDET_OUT_CNT_STS_R { - pub(crate) fn new(bits: u8) -> Self { - PKDET_OUT_CNT_STS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PKDET_OUT_CNT_STS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PKDET_OUT_CNT_STS_R = crate::FieldReader; #[doc = "Field `pkdet_out_cnt_sts` writer - "] -pub struct PKDET_OUT_CNT_STS_W<'a> { - w: &'a mut W, -} -impl<'a> PKDET_OUT_CNT_STS_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x0f) | (value as u32 & 0x0f); - self.w - } -} +pub type PKDET_OUT_CNT_STS_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_PKDET_CTRL0_SPEC, u8, u8, 4, O>; +#[doc = "Field `pkdet_out_cnt_en` reader - "] +pub type PKDET_OUT_CNT_EN_R = crate::BitReader; +#[doc = "Field `pkdet_out_cnt_en` writer - "] +pub type PKDET_OUT_CNT_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RF_PKDET_CTRL0_SPEC, bool, O>; +#[doc = "Field `pkdet_out_mode` reader - "] +pub type PKDET_OUT_MODE_R = crate::BitReader; +#[doc = "Field `pkdet_out_mode` writer - "] +pub type PKDET_OUT_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RF_PKDET_CTRL0_SPEC, bool, O>; impl R { - #[doc = "Bit 5"] + #[doc = "Bits 0:3"] #[inline(always)] - pub fn pkdet_out_mode(&self) -> PKDET_OUT_MODE_R { - PKDET_OUT_MODE_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn pkdet_out_cnt_sts(&self) -> PKDET_OUT_CNT_STS_R { + PKDET_OUT_CNT_STS_R::new((self.bits & 0x0f) as u8) } #[doc = "Bit 4"] #[inline(always)] pub fn pkdet_out_cnt_en(&self) -> PKDET_OUT_CNT_EN_R { - PKDET_OUT_CNT_EN_R::new(((self.bits >> 4) & 0x01) != 0) + PKDET_OUT_CNT_EN_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bits 0:3"] + #[doc = "Bit 5"] #[inline(always)] - pub fn pkdet_out_cnt_sts(&self) -> PKDET_OUT_CNT_STS_R { - PKDET_OUT_CNT_STS_R::new((self.bits & 0x0f) as u8) + pub fn pkdet_out_mode(&self) -> PKDET_OUT_MODE_R { + PKDET_OUT_MODE_R::new(((self.bits >> 5) & 1) != 0) } } impl W { - #[doc = "Bit 5"] + #[doc = "Bits 0:3"] #[inline(always)] - pub fn pkdet_out_mode(&mut self) -> PKDET_OUT_MODE_W { - PKDET_OUT_MODE_W { w: self } + #[must_use] + pub fn pkdet_out_cnt_sts(&mut self) -> PKDET_OUT_CNT_STS_W<0> { + PKDET_OUT_CNT_STS_W::new(self) } #[doc = "Bit 4"] #[inline(always)] - pub fn pkdet_out_cnt_en(&mut self) -> PKDET_OUT_CNT_EN_W { - PKDET_OUT_CNT_EN_W { w: self } + #[must_use] + pub fn pkdet_out_cnt_en(&mut self) -> PKDET_OUT_CNT_EN_W<4> { + PKDET_OUT_CNT_EN_W::new(self) } - #[doc = "Bits 0:3"] + #[doc = "Bit 5"] #[inline(always)] - pub fn pkdet_out_cnt_sts(&mut self) -> PKDET_OUT_CNT_STS_W { - PKDET_OUT_CNT_STS_W { w: self } + #[must_use] + pub fn pkdet_out_mode(&mut self) -> PKDET_OUT_MODE_W<5> { + PKDET_OUT_MODE_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -181,11 +104,10 @@ impl crate::Readable for RF_PKDET_CTRL0_SPEC { #[doc = "`write(|w| ..)` method takes [rf_pkdet_ctrl0::W](W) writer structure"] impl crate::Writable for RF_PKDET_CTRL0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rf_pkdet_ctrl0 to value 0"] impl crate::Resettable for RF_PKDET_CTRL0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rf_resv_reg_0.rs b/src/rf/rf_resv_reg_0.rs index 76c2c7d..7cfd680 100644 --- a/src/rf/rf_resv_reg_0.rs +++ b/src/rf/rf_resv_reg_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `rf_reserved0` reader - "] -pub struct RF_RESERVED0_R(crate::FieldReader); -impl RF_RESERVED0_R { - pub(crate) fn new(bits: u32) -> Self { - RF_RESERVED0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_RESERVED0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RF_RESERVED0_R = crate::FieldReader; #[doc = "Field `rf_reserved0` writer - "] -pub struct RF_RESERVED0_W<'a> { - w: &'a mut W, -} -impl<'a> RF_RESERVED0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type RF_RESERVED0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_RESV_REG_0_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn rf_reserved0(&self) -> RF_RESERVED0_R { - RF_RESERVED0_R::new((self.bits & 0xffff_ffff) as u32) + RF_RESERVED0_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn rf_reserved0(&mut self) -> RF_RESERVED0_W { - RF_RESERVED0_W { w: self } + #[must_use] + pub fn rf_reserved0(&mut self) -> RF_RESERVED0_W<0> { + RF_RESERVED0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for RF_RESV_REG_0_SPEC { #[doc = "`write(|w| ..)` method takes [rf_resv_reg_0::W](W) writer structure"] impl crate::Writable for RF_RESV_REG_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rf_resv_reg_0 to value 0"] impl crate::Resettable for RF_RESV_REG_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rf_resv_reg_1.rs b/src/rf/rf_resv_reg_1.rs index 69945d5..eb301a8 100644 --- a/src/rf/rf_resv_reg_1.rs +++ b/src/rf/rf_resv_reg_1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `rf_reserved1` reader - "] -pub struct RF_RESERVED1_R(crate::FieldReader); -impl RF_RESERVED1_R { - pub(crate) fn new(bits: u32) -> Self { - RF_RESERVED1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_RESERVED1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RF_RESERVED1_R = crate::FieldReader; #[doc = "Field `rf_reserved1` writer - "] -pub struct RF_RESERVED1_W<'a> { - w: &'a mut W, -} -impl<'a> RF_RESERVED1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type RF_RESERVED1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_RESV_REG_1_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn rf_reserved1(&self) -> RF_RESERVED1_R { - RF_RESERVED1_R::new((self.bits & 0xffff_ffff) as u32) + RF_RESERVED1_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn rf_reserved1(&mut self) -> RF_RESERVED1_W { - RF_RESERVED1_W { w: self } + #[must_use] + pub fn rf_reserved1(&mut self) -> RF_RESERVED1_W<0> { + RF_RESERVED1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for RF_RESV_REG_1_SPEC { #[doc = "`write(|w| ..)` method takes [rf_resv_reg_1::W](W) writer structure"] impl crate::Writable for RF_RESV_REG_1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rf_resv_reg_1 to value 0"] impl crate::Resettable for RF_RESV_REG_1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rf_resv_reg_2.rs b/src/rf/rf_resv_reg_2.rs index 2575286..d47c0d9 100644 --- a/src/rf/rf_resv_reg_2.rs +++ b/src/rf/rf_resv_reg_2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `rf_reserved2` reader - "] -pub struct RF_RESERVED2_R(crate::FieldReader); -impl RF_RESERVED2_R { - pub(crate) fn new(bits: u32) -> Self { - RF_RESERVED2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_RESERVED2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RF_RESERVED2_R = crate::FieldReader; #[doc = "Field `rf_reserved2` writer - "] -pub struct RF_RESERVED2_W<'a> { - w: &'a mut W, -} -impl<'a> RF_RESERVED2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type RF_RESERVED2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_RESV_REG_2_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn rf_reserved2(&self) -> RF_RESERVED2_R { - RF_RESERVED2_R::new((self.bits & 0xffff_ffff) as u32) + RF_RESERVED2_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn rf_reserved2(&mut self) -> RF_RESERVED2_W { - RF_RESERVED2_W { w: self } + #[must_use] + pub fn rf_reserved2(&mut self) -> RF_RESERVED2_W<0> { + RF_RESERVED2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for RF_RESV_REG_2_SPEC { #[doc = "`write(|w| ..)` method takes [rf_resv_reg_2::W](W) writer structure"] impl crate::Writable for RF_RESV_REG_2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rf_resv_reg_2 to value 0"] impl crate::Resettable for RF_RESV_REG_2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rf_rev.rs b/src/rf/rf_rev.rs index ebfe6b6..0f82bd7 100644 --- a/src/rf/rf_rev.rs +++ b/src/rf/rf_rev.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,123 +28,62 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `hw_rev` reader - "] -pub struct HW_REV_R(crate::FieldReader); -impl HW_REV_R { - pub(crate) fn new(bits: u8) -> Self { - HW_REV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for HW_REV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `hw_rev` writer - "] -pub struct HW_REV_W<'a> { - w: &'a mut W, -} -impl<'a> HW_REV_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 16)) | ((value as u32 & 0xff) << 16); - self.w - } -} -#[doc = "Field `fw_rev` reader - "] -pub struct FW_REV_R(crate::FieldReader); -impl FW_REV_R { - pub(crate) fn new(bits: u8) -> Self { - FW_REV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for FW_REV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `fw_rev` writer - "] -pub struct FW_REV_W<'a> { - w: &'a mut W, -} -impl<'a> FW_REV_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8); - self.w - } -} #[doc = "Field `rf_id` reader - "] -pub struct RF_ID_R(crate::FieldReader); -impl RF_ID_R { - pub(crate) fn new(bits: u8) -> Self { - RF_ID_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_ID_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RF_ID_R = crate::FieldReader; #[doc = "Field `rf_id` writer - "] -pub struct RF_ID_W<'a> { - w: &'a mut W, -} -impl<'a> RF_ID_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff); - self.w - } -} +pub type RF_ID_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RF_REV_SPEC, u8, u8, 8, O>; +#[doc = "Field `fw_rev` reader - "] +pub type FW_REV_R = crate::FieldReader; +#[doc = "Field `fw_rev` writer - "] +pub type FW_REV_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RF_REV_SPEC, u8, u8, 8, O>; +#[doc = "Field `hw_rev` reader - "] +pub type HW_REV_R = crate::FieldReader; +#[doc = "Field `hw_rev` writer - "] +pub type HW_REV_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RF_REV_SPEC, u8, u8, 8, O>; impl R { - #[doc = "Bits 16:23"] + #[doc = "Bits 0:7"] #[inline(always)] - pub fn hw_rev(&self) -> HW_REV_R { - HW_REV_R::new(((self.bits >> 16) & 0xff) as u8) + pub fn rf_id(&self) -> RF_ID_R { + RF_ID_R::new((self.bits & 0xff) as u8) } #[doc = "Bits 8:15"] #[inline(always)] pub fn fw_rev(&self) -> FW_REV_R { FW_REV_R::new(((self.bits >> 8) & 0xff) as u8) } - #[doc = "Bits 0:7"] + #[doc = "Bits 16:23"] #[inline(always)] - pub fn rf_id(&self) -> RF_ID_R { - RF_ID_R::new((self.bits & 0xff) as u8) + pub fn hw_rev(&self) -> HW_REV_R { + HW_REV_R::new(((self.bits >> 16) & 0xff) as u8) } } impl W { - #[doc = "Bits 16:23"] + #[doc = "Bits 0:7"] #[inline(always)] - pub fn hw_rev(&mut self) -> HW_REV_W { - HW_REV_W { w: self } + #[must_use] + pub fn rf_id(&mut self) -> RF_ID_W<0> { + RF_ID_W::new(self) } #[doc = "Bits 8:15"] #[inline(always)] - pub fn fw_rev(&mut self) -> FW_REV_W { - FW_REV_W { w: self } + #[must_use] + pub fn fw_rev(&mut self) -> FW_REV_W<8> { + FW_REV_W::new(self) } - #[doc = "Bits 0:7"] + #[doc = "Bits 16:23"] #[inline(always)] - pub fn rf_id(&mut self) -> RF_ID_W { - RF_ID_W { w: self } + #[must_use] + pub fn hw_rev(&mut self) -> HW_REV_W<16> { + HW_REV_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -161,11 +101,10 @@ impl crate::Readable for RF_REV_SPEC { #[doc = "`write(|w| ..)` method takes [rf_rev::W](W) writer structure"] impl crate::Writable for RF_REV_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rf_rev to value 0"] impl crate::Resettable for RF_REV_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rf_sram_ctrl0.rs b/src/rf/rf_sram_ctrl0.rs index ced668f..0583a64 100644 --- a/src/rf/rf_sram_ctrl0.rs +++ b/src/rf/rf_sram_ctrl0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,179 +28,80 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rf_sram_ext_clr` reader - "] -pub struct RF_SRAM_EXT_CLR_R(crate::FieldReader); -impl RF_SRAM_EXT_CLR_R { - pub(crate) fn new(bits: bool) -> Self { - RF_SRAM_EXT_CLR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_SRAM_EXT_CLR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_sram_ext_clr` writer - "] -pub struct RF_SRAM_EXT_CLR_W<'a> { - w: &'a mut W, -} -impl<'a> RF_SRAM_EXT_CLR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 19)) | ((value as u32 & 0x01) << 19); - self.w - } -} -#[doc = "Field `rf_sram_swap` reader - "] -pub struct RF_SRAM_SWAP_R(crate::FieldReader); -impl RF_SRAM_SWAP_R { - pub(crate) fn new(bits: bool) -> Self { - RF_SRAM_SWAP_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_SRAM_SWAP_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_sram_swap` writer - "] -pub struct RF_SRAM_SWAP_W<'a> { - w: &'a mut W, -} -impl<'a> RF_SRAM_SWAP_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18); - self.w - } -} -#[doc = "Field `rf_sram_link_mode` reader - "] -pub struct RF_SRAM_LINK_MODE_R(crate::FieldReader); -impl RF_SRAM_LINK_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - RF_SRAM_LINK_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_SRAM_LINK_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_sram_link_mode` writer - "] -pub struct RF_SRAM_LINK_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> RF_SRAM_LINK_MODE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 16)) | ((value as u32 & 0x03) << 16); - self.w - } -} #[doc = "Field `rf_sram_link_dly` reader - "] -pub struct RF_SRAM_LINK_DLY_R(crate::FieldReader); -impl RF_SRAM_LINK_DLY_R { - pub(crate) fn new(bits: u16) -> Self { - RF_SRAM_LINK_DLY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_SRAM_LINK_DLY_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RF_SRAM_LINK_DLY_R = crate::FieldReader; #[doc = "Field `rf_sram_link_dly` writer - "] -pub struct RF_SRAM_LINK_DLY_W<'a> { - w: &'a mut W, -} -impl<'a> RF_SRAM_LINK_DLY_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type RF_SRAM_LINK_DLY_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_SRAM_CTRL0_SPEC, u16, u16, 16, O>; +#[doc = "Field `rf_sram_link_mode` reader - "] +pub type RF_SRAM_LINK_MODE_R = crate::FieldReader; +#[doc = "Field `rf_sram_link_mode` writer - "] +pub type RF_SRAM_LINK_MODE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_SRAM_CTRL0_SPEC, u8, u8, 2, O>; +#[doc = "Field `rf_sram_swap` reader - "] +pub type RF_SRAM_SWAP_R = crate::BitReader; +#[doc = "Field `rf_sram_swap` writer - "] +pub type RF_SRAM_SWAP_W<'a, const O: u8> = crate::BitWriter<'a, u32, RF_SRAM_CTRL0_SPEC, bool, O>; +#[doc = "Field `rf_sram_ext_clr` reader - "] +pub type RF_SRAM_EXT_CLR_R = crate::BitReader; +#[doc = "Field `rf_sram_ext_clr` writer - "] +pub type RF_SRAM_EXT_CLR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RF_SRAM_CTRL0_SPEC, bool, O>; +impl R { + #[doc = "Bits 0:15"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w + pub fn rf_sram_link_dly(&self) -> RF_SRAM_LINK_DLY_R { + RF_SRAM_LINK_DLY_R::new((self.bits & 0xffff) as u16) } -} -impl R { - #[doc = "Bit 19"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn rf_sram_ext_clr(&self) -> RF_SRAM_EXT_CLR_R { - RF_SRAM_EXT_CLR_R::new(((self.bits >> 19) & 0x01) != 0) + pub fn rf_sram_link_mode(&self) -> RF_SRAM_LINK_MODE_R { + RF_SRAM_LINK_MODE_R::new(((self.bits >> 16) & 3) as u8) } #[doc = "Bit 18"] #[inline(always)] pub fn rf_sram_swap(&self) -> RF_SRAM_SWAP_R { - RF_SRAM_SWAP_R::new(((self.bits >> 18) & 0x01) != 0) - } - #[doc = "Bits 16:17"] - #[inline(always)] - pub fn rf_sram_link_mode(&self) -> RF_SRAM_LINK_MODE_R { - RF_SRAM_LINK_MODE_R::new(((self.bits >> 16) & 0x03) as u8) + RF_SRAM_SWAP_R::new(((self.bits >> 18) & 1) != 0) } - #[doc = "Bits 0:15"] + #[doc = "Bit 19"] #[inline(always)] - pub fn rf_sram_link_dly(&self) -> RF_SRAM_LINK_DLY_R { - RF_SRAM_LINK_DLY_R::new((self.bits & 0xffff) as u16) + pub fn rf_sram_ext_clr(&self) -> RF_SRAM_EXT_CLR_R { + RF_SRAM_EXT_CLR_R::new(((self.bits >> 19) & 1) != 0) } } impl W { - #[doc = "Bit 19"] + #[doc = "Bits 0:15"] #[inline(always)] - pub fn rf_sram_ext_clr(&mut self) -> RF_SRAM_EXT_CLR_W { - RF_SRAM_EXT_CLR_W { w: self } + #[must_use] + pub fn rf_sram_link_dly(&mut self) -> RF_SRAM_LINK_DLY_W<0> { + RF_SRAM_LINK_DLY_W::new(self) } - #[doc = "Bit 18"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn rf_sram_swap(&mut self) -> RF_SRAM_SWAP_W { - RF_SRAM_SWAP_W { w: self } + #[must_use] + pub fn rf_sram_link_mode(&mut self) -> RF_SRAM_LINK_MODE_W<16> { + RF_SRAM_LINK_MODE_W::new(self) } - #[doc = "Bits 16:17"] + #[doc = "Bit 18"] #[inline(always)] - pub fn rf_sram_link_mode(&mut self) -> RF_SRAM_LINK_MODE_W { - RF_SRAM_LINK_MODE_W { w: self } + #[must_use] + pub fn rf_sram_swap(&mut self) -> RF_SRAM_SWAP_W<18> { + RF_SRAM_SWAP_W::new(self) } - #[doc = "Bits 0:15"] + #[doc = "Bit 19"] #[inline(always)] - pub fn rf_sram_link_dly(&mut self) -> RF_SRAM_LINK_DLY_W { - RF_SRAM_LINK_DLY_W { w: self } + #[must_use] + pub fn rf_sram_ext_clr(&mut self) -> RF_SRAM_EXT_CLR_W<19> { + RF_SRAM_EXT_CLR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -217,11 +119,10 @@ impl crate::Readable for RF_SRAM_CTRL0_SPEC { #[doc = "`write(|w| ..)` method takes [rf_sram_ctrl0::W](W) writer structure"] impl crate::Writable for RF_SRAM_CTRL0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rf_sram_ctrl0 to value 0"] impl crate::Resettable for RF_SRAM_CTRL0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rf_sram_ctrl1.rs b/src/rf/rf_sram_ctrl1.rs index 98667df..cb5dc1b 100644 --- a/src/rf/rf_sram_ctrl1.rs +++ b/src/rf/rf_sram_ctrl1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,235 +28,96 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rf_sram_adc_done_cnt` reader - "] -pub struct RF_SRAM_ADC_DONE_CNT_R(crate::FieldReader); -impl RF_SRAM_ADC_DONE_CNT_R { - pub(crate) fn new(bits: u16) -> Self { - RF_SRAM_ADC_DONE_CNT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_SRAM_ADC_DONE_CNT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_sram_adc_done_cnt` writer - "] -pub struct RF_SRAM_ADC_DONE_CNT_W<'a> { - w: &'a mut W, -} -impl<'a> RF_SRAM_ADC_DONE_CNT_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xffff << 16)) | ((value as u32 & 0xffff) << 16); - self.w - } -} -#[doc = "Field `rf_sram_adc_sts_clr` reader - "] -pub struct RF_SRAM_ADC_STS_CLR_R(crate::FieldReader); -impl RF_SRAM_ADC_STS_CLR_R { - pub(crate) fn new(bits: bool) -> Self { - RF_SRAM_ADC_STS_CLR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_SRAM_ADC_STS_CLR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_sram_adc_sts_clr` writer - "] -pub struct RF_SRAM_ADC_STS_CLR_W<'a> { - w: &'a mut W, -} -impl<'a> RF_SRAM_ADC_STS_CLR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `rf_sram_adc_loop_en` reader - "] -pub struct RF_SRAM_ADC_LOOP_EN_R(crate::FieldReader); -impl RF_SRAM_ADC_LOOP_EN_R { - pub(crate) fn new(bits: bool) -> Self { - RF_SRAM_ADC_LOOP_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_SRAM_ADC_LOOP_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_sram_adc_loop_en` writer - "] -pub struct RF_SRAM_ADC_LOOP_EN_W<'a> { - w: &'a mut W, -} -impl<'a> RF_SRAM_ADC_LOOP_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `rf_sram_adc_en` reader - "] -pub struct RF_SRAM_ADC_EN_R(crate::FieldReader); -impl RF_SRAM_ADC_EN_R { - pub(crate) fn new(bits: bool) -> Self { - RF_SRAM_ADC_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_SRAM_ADC_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_sram_adc_en` writer - "] -pub struct RF_SRAM_ADC_EN_W<'a> { - w: &'a mut W, -} -impl<'a> RF_SRAM_ADC_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `rf_sram_adc_done` reader - "] -pub struct RF_SRAM_ADC_DONE_R(crate::FieldReader); -impl RF_SRAM_ADC_DONE_R { - pub(crate) fn new(bits: bool) -> Self { - RF_SRAM_ADC_DONE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_SRAM_ADC_DONE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RF_SRAM_ADC_DONE_R = crate::BitReader; #[doc = "Field `rf_sram_adc_done` writer - "] -pub struct RF_SRAM_ADC_DONE_W<'a> { - w: &'a mut W, -} -impl<'a> RF_SRAM_ADC_DONE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type RF_SRAM_ADC_DONE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RF_SRAM_CTRL1_SPEC, bool, O>; +#[doc = "Field `rf_sram_adc_en` reader - "] +pub type RF_SRAM_ADC_EN_R = crate::BitReader; +#[doc = "Field `rf_sram_adc_en` writer - "] +pub type RF_SRAM_ADC_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RF_SRAM_CTRL1_SPEC, bool, O>; +#[doc = "Field `rf_sram_adc_loop_en` reader - "] +pub type RF_SRAM_ADC_LOOP_EN_R = crate::BitReader; +#[doc = "Field `rf_sram_adc_loop_en` writer - "] +pub type RF_SRAM_ADC_LOOP_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RF_SRAM_CTRL1_SPEC, bool, O>; +#[doc = "Field `rf_sram_adc_sts_clr` reader - "] +pub type RF_SRAM_ADC_STS_CLR_R = crate::BitReader; +#[doc = "Field `rf_sram_adc_sts_clr` writer - "] +pub type RF_SRAM_ADC_STS_CLR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RF_SRAM_CTRL1_SPEC, bool, O>; +#[doc = "Field `rf_sram_adc_done_cnt` reader - "] +pub type RF_SRAM_ADC_DONE_CNT_R = crate::FieldReader; +#[doc = "Field `rf_sram_adc_done_cnt` writer - "] +pub type RF_SRAM_ADC_DONE_CNT_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_SRAM_CTRL1_SPEC, u16, u16, 16, O>; impl R { - #[doc = "Bits 16:31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn rf_sram_adc_done_cnt(&self) -> RF_SRAM_ADC_DONE_CNT_R { - RF_SRAM_ADC_DONE_CNT_R::new(((self.bits >> 16) & 0xffff) as u16) + pub fn rf_sram_adc_done(&self) -> RF_SRAM_ADC_DONE_R { + RF_SRAM_ADC_DONE_R::new((self.bits & 1) != 0) } - #[doc = "Bit 3"] + #[doc = "Bit 1"] #[inline(always)] - pub fn rf_sram_adc_sts_clr(&self) -> RF_SRAM_ADC_STS_CLR_R { - RF_SRAM_ADC_STS_CLR_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn rf_sram_adc_en(&self) -> RF_SRAM_ADC_EN_R { + RF_SRAM_ADC_EN_R::new(((self.bits >> 1) & 1) != 0) } #[doc = "Bit 2"] #[inline(always)] pub fn rf_sram_adc_loop_en(&self) -> RF_SRAM_ADC_LOOP_EN_R { - RF_SRAM_ADC_LOOP_EN_R::new(((self.bits >> 2) & 0x01) != 0) + RF_SRAM_ADC_LOOP_EN_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 3"] #[inline(always)] - pub fn rf_sram_adc_en(&self) -> RF_SRAM_ADC_EN_R { - RF_SRAM_ADC_EN_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn rf_sram_adc_sts_clr(&self) -> RF_SRAM_ADC_STS_CLR_R { + RF_SRAM_ADC_STS_CLR_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bits 16:31"] #[inline(always)] - pub fn rf_sram_adc_done(&self) -> RF_SRAM_ADC_DONE_R { - RF_SRAM_ADC_DONE_R::new((self.bits & 0x01) != 0) + pub fn rf_sram_adc_done_cnt(&self) -> RF_SRAM_ADC_DONE_CNT_R { + RF_SRAM_ADC_DONE_CNT_R::new(((self.bits >> 16) & 0xffff) as u16) } } impl W { - #[doc = "Bits 16:31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn rf_sram_adc_done_cnt(&mut self) -> RF_SRAM_ADC_DONE_CNT_W { - RF_SRAM_ADC_DONE_CNT_W { w: self } + #[must_use] + pub fn rf_sram_adc_done(&mut self) -> RF_SRAM_ADC_DONE_W<0> { + RF_SRAM_ADC_DONE_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bit 1"] #[inline(always)] - pub fn rf_sram_adc_sts_clr(&mut self) -> RF_SRAM_ADC_STS_CLR_W { - RF_SRAM_ADC_STS_CLR_W { w: self } + #[must_use] + pub fn rf_sram_adc_en(&mut self) -> RF_SRAM_ADC_EN_W<1> { + RF_SRAM_ADC_EN_W::new(self) } #[doc = "Bit 2"] #[inline(always)] - pub fn rf_sram_adc_loop_en(&mut self) -> RF_SRAM_ADC_LOOP_EN_W { - RF_SRAM_ADC_LOOP_EN_W { w: self } + #[must_use] + pub fn rf_sram_adc_loop_en(&mut self) -> RF_SRAM_ADC_LOOP_EN_W<2> { + RF_SRAM_ADC_LOOP_EN_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 3"] #[inline(always)] - pub fn rf_sram_adc_en(&mut self) -> RF_SRAM_ADC_EN_W { - RF_SRAM_ADC_EN_W { w: self } + #[must_use] + pub fn rf_sram_adc_sts_clr(&mut self) -> RF_SRAM_ADC_STS_CLR_W<3> { + RF_SRAM_ADC_STS_CLR_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bits 16:31"] #[inline(always)] - pub fn rf_sram_adc_done(&mut self) -> RF_SRAM_ADC_DONE_W { - RF_SRAM_ADC_DONE_W { w: self } + #[must_use] + pub fn rf_sram_adc_done_cnt(&mut self) -> RF_SRAM_ADC_DONE_CNT_W<16> { + RF_SRAM_ADC_DONE_CNT_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -273,11 +135,10 @@ impl crate::Readable for RF_SRAM_CTRL1_SPEC { #[doc = "`write(|w| ..)` method takes [rf_sram_ctrl1::W](W) writer structure"] impl crate::Writable for RF_SRAM_CTRL1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rf_sram_ctrl1 to value 0"] impl crate::Resettable for RF_SRAM_CTRL1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rf_sram_ctrl2.rs b/src/rf/rf_sram_ctrl2.rs index 5f35759..3ed13db 100644 --- a/src/rf/rf_sram_ctrl2.rs +++ b/src/rf/rf_sram_ctrl2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,87 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rf_sram_adc_addr_start` reader - "] -pub struct RF_SRAM_ADC_ADDR_START_R(crate::FieldReader); -impl RF_SRAM_ADC_ADDR_START_R { - pub(crate) fn new(bits: u16) -> Self { - RF_SRAM_ADC_ADDR_START_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_SRAM_ADC_ADDR_START_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_sram_adc_addr_start` writer - "] -pub struct RF_SRAM_ADC_ADDR_START_W<'a> { - w: &'a mut W, -} -impl<'a> RF_SRAM_ADC_ADDR_START_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xffff << 16)) | ((value as u32 & 0xffff) << 16); - self.w - } -} #[doc = "Field `rf_sram_adc_addr_end` reader - "] -pub struct RF_SRAM_ADC_ADDR_END_R(crate::FieldReader); -impl RF_SRAM_ADC_ADDR_END_R { - pub(crate) fn new(bits: u16) -> Self { - RF_SRAM_ADC_ADDR_END_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_SRAM_ADC_ADDR_END_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RF_SRAM_ADC_ADDR_END_R = crate::FieldReader; #[doc = "Field `rf_sram_adc_addr_end` writer - "] -pub struct RF_SRAM_ADC_ADDR_END_W<'a> { - w: &'a mut W, -} -impl<'a> RF_SRAM_ADC_ADDR_END_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type RF_SRAM_ADC_ADDR_END_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_SRAM_CTRL2_SPEC, u16, u16, 16, O>; +#[doc = "Field `rf_sram_adc_addr_start` reader - "] +pub type RF_SRAM_ADC_ADDR_START_R = crate::FieldReader; +#[doc = "Field `rf_sram_adc_addr_start` writer - "] +pub type RF_SRAM_ADC_ADDR_START_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_SRAM_CTRL2_SPEC, u16, u16, 16, O>; +impl R { + #[doc = "Bits 0:15"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w + pub fn rf_sram_adc_addr_end(&self) -> RF_SRAM_ADC_ADDR_END_R { + RF_SRAM_ADC_ADDR_END_R::new((self.bits & 0xffff) as u16) } -} -impl R { #[doc = "Bits 16:31"] #[inline(always)] pub fn rf_sram_adc_addr_start(&self) -> RF_SRAM_ADC_ADDR_START_R { RF_SRAM_ADC_ADDR_START_R::new(((self.bits >> 16) & 0xffff) as u16) } - #[doc = "Bits 0:15"] - #[inline(always)] - pub fn rf_sram_adc_addr_end(&self) -> RF_SRAM_ADC_ADDR_END_R { - RF_SRAM_ADC_ADDR_END_R::new((self.bits & 0xffff) as u16) - } } impl W { - #[doc = "Bits 16:31"] + #[doc = "Bits 0:15"] #[inline(always)] - pub fn rf_sram_adc_addr_start(&mut self) -> RF_SRAM_ADC_ADDR_START_W { - RF_SRAM_ADC_ADDR_START_W { w: self } + #[must_use] + pub fn rf_sram_adc_addr_end(&mut self) -> RF_SRAM_ADC_ADDR_END_W<0> { + RF_SRAM_ADC_ADDR_END_W::new(self) } - #[doc = "Bits 0:15"] + #[doc = "Bits 16:31"] #[inline(always)] - pub fn rf_sram_adc_addr_end(&mut self) -> RF_SRAM_ADC_ADDR_END_W { - RF_SRAM_ADC_ADDR_END_W { w: self } + #[must_use] + pub fn rf_sram_adc_addr_start(&mut self) -> RF_SRAM_ADC_ADDR_START_W<16> { + RF_SRAM_ADC_ADDR_START_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -125,11 +88,10 @@ impl crate::Readable for RF_SRAM_CTRL2_SPEC { #[doc = "`write(|w| ..)` method takes [rf_sram_ctrl2::W](W) writer structure"] impl crate::Writable for RF_SRAM_CTRL2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rf_sram_ctrl2 to value 0"] impl crate::Resettable for RF_SRAM_CTRL2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rf_sram_ctrl3.rs b/src/rf/rf_sram_ctrl3.rs index 4a6c49b..65d7c7c 100644 --- a/src/rf/rf_sram_ctrl3.rs +++ b/src/rf/rf_sram_ctrl3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `rf_sram_adc_sts` reader - "] -pub struct RF_SRAM_ADC_STS_R(crate::FieldReader); -impl RF_SRAM_ADC_STS_R { - pub(crate) fn new(bits: u32) -> Self { - RF_SRAM_ADC_STS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_SRAM_ADC_STS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RF_SRAM_ADC_STS_R = crate::FieldReader; #[doc = "Field `rf_sram_adc_sts` writer - "] -pub struct RF_SRAM_ADC_STS_W<'a> { - w: &'a mut W, -} -impl<'a> RF_SRAM_ADC_STS_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type RF_SRAM_ADC_STS_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_SRAM_CTRL3_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn rf_sram_adc_sts(&self) -> RF_SRAM_ADC_STS_R { - RF_SRAM_ADC_STS_R::new((self.bits & 0xffff_ffff) as u32) + RF_SRAM_ADC_STS_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn rf_sram_adc_sts(&mut self) -> RF_SRAM_ADC_STS_W { - RF_SRAM_ADC_STS_W { w: self } + #[must_use] + pub fn rf_sram_adc_sts(&mut self) -> RF_SRAM_ADC_STS_W<0> { + RF_SRAM_ADC_STS_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for RF_SRAM_CTRL3_SPEC { #[doc = "`write(|w| ..)` method takes [rf_sram_ctrl3::W](W) writer structure"] impl crate::Writable for RF_SRAM_CTRL3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rf_sram_ctrl3 to value 0"] impl crate::Resettable for RF_SRAM_CTRL3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rf_sram_ctrl4.rs b/src/rf/rf_sram_ctrl4.rs index 45af67a..a9c8ff1 100644 --- a/src/rf/rf_sram_ctrl4.rs +++ b/src/rf/rf_sram_ctrl4.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,235 +28,96 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rf_sram_dac_done_cnt` reader - "] -pub struct RF_SRAM_DAC_DONE_CNT_R(crate::FieldReader); -impl RF_SRAM_DAC_DONE_CNT_R { - pub(crate) fn new(bits: u16) -> Self { - RF_SRAM_DAC_DONE_CNT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_SRAM_DAC_DONE_CNT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_sram_dac_done_cnt` writer - "] -pub struct RF_SRAM_DAC_DONE_CNT_W<'a> { - w: &'a mut W, -} -impl<'a> RF_SRAM_DAC_DONE_CNT_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xffff << 16)) | ((value as u32 & 0xffff) << 16); - self.w - } -} -#[doc = "Field `rf_sram_dac_sts_clr` reader - "] -pub struct RF_SRAM_DAC_STS_CLR_R(crate::FieldReader); -impl RF_SRAM_DAC_STS_CLR_R { - pub(crate) fn new(bits: bool) -> Self { - RF_SRAM_DAC_STS_CLR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_SRAM_DAC_STS_CLR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_sram_dac_sts_clr` writer - "] -pub struct RF_SRAM_DAC_STS_CLR_W<'a> { - w: &'a mut W, -} -impl<'a> RF_SRAM_DAC_STS_CLR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `rf_sram_dac_loop_en` reader - "] -pub struct RF_SRAM_DAC_LOOP_EN_R(crate::FieldReader); -impl RF_SRAM_DAC_LOOP_EN_R { - pub(crate) fn new(bits: bool) -> Self { - RF_SRAM_DAC_LOOP_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_SRAM_DAC_LOOP_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_sram_dac_loop_en` writer - "] -pub struct RF_SRAM_DAC_LOOP_EN_W<'a> { - w: &'a mut W, -} -impl<'a> RF_SRAM_DAC_LOOP_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `rf_sram_dac_en` reader - "] -pub struct RF_SRAM_DAC_EN_R(crate::FieldReader); -impl RF_SRAM_DAC_EN_R { - pub(crate) fn new(bits: bool) -> Self { - RF_SRAM_DAC_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_SRAM_DAC_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_sram_dac_en` writer - "] -pub struct RF_SRAM_DAC_EN_W<'a> { - w: &'a mut W, -} -impl<'a> RF_SRAM_DAC_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `rf_sram_dac_done` reader - "] -pub struct RF_SRAM_DAC_DONE_R(crate::FieldReader); -impl RF_SRAM_DAC_DONE_R { - pub(crate) fn new(bits: bool) -> Self { - RF_SRAM_DAC_DONE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_SRAM_DAC_DONE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RF_SRAM_DAC_DONE_R = crate::BitReader; #[doc = "Field `rf_sram_dac_done` writer - "] -pub struct RF_SRAM_DAC_DONE_W<'a> { - w: &'a mut W, -} -impl<'a> RF_SRAM_DAC_DONE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type RF_SRAM_DAC_DONE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RF_SRAM_CTRL4_SPEC, bool, O>; +#[doc = "Field `rf_sram_dac_en` reader - "] +pub type RF_SRAM_DAC_EN_R = crate::BitReader; +#[doc = "Field `rf_sram_dac_en` writer - "] +pub type RF_SRAM_DAC_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RF_SRAM_CTRL4_SPEC, bool, O>; +#[doc = "Field `rf_sram_dac_loop_en` reader - "] +pub type RF_SRAM_DAC_LOOP_EN_R = crate::BitReader; +#[doc = "Field `rf_sram_dac_loop_en` writer - "] +pub type RF_SRAM_DAC_LOOP_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RF_SRAM_CTRL4_SPEC, bool, O>; +#[doc = "Field `rf_sram_dac_sts_clr` reader - "] +pub type RF_SRAM_DAC_STS_CLR_R = crate::BitReader; +#[doc = "Field `rf_sram_dac_sts_clr` writer - "] +pub type RF_SRAM_DAC_STS_CLR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RF_SRAM_CTRL4_SPEC, bool, O>; +#[doc = "Field `rf_sram_dac_done_cnt` reader - "] +pub type RF_SRAM_DAC_DONE_CNT_R = crate::FieldReader; +#[doc = "Field `rf_sram_dac_done_cnt` writer - "] +pub type RF_SRAM_DAC_DONE_CNT_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_SRAM_CTRL4_SPEC, u16, u16, 16, O>; impl R { - #[doc = "Bits 16:31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn rf_sram_dac_done_cnt(&self) -> RF_SRAM_DAC_DONE_CNT_R { - RF_SRAM_DAC_DONE_CNT_R::new(((self.bits >> 16) & 0xffff) as u16) + pub fn rf_sram_dac_done(&self) -> RF_SRAM_DAC_DONE_R { + RF_SRAM_DAC_DONE_R::new((self.bits & 1) != 0) } - #[doc = "Bit 3"] + #[doc = "Bit 1"] #[inline(always)] - pub fn rf_sram_dac_sts_clr(&self) -> RF_SRAM_DAC_STS_CLR_R { - RF_SRAM_DAC_STS_CLR_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn rf_sram_dac_en(&self) -> RF_SRAM_DAC_EN_R { + RF_SRAM_DAC_EN_R::new(((self.bits >> 1) & 1) != 0) } #[doc = "Bit 2"] #[inline(always)] pub fn rf_sram_dac_loop_en(&self) -> RF_SRAM_DAC_LOOP_EN_R { - RF_SRAM_DAC_LOOP_EN_R::new(((self.bits >> 2) & 0x01) != 0) + RF_SRAM_DAC_LOOP_EN_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 3"] #[inline(always)] - pub fn rf_sram_dac_en(&self) -> RF_SRAM_DAC_EN_R { - RF_SRAM_DAC_EN_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn rf_sram_dac_sts_clr(&self) -> RF_SRAM_DAC_STS_CLR_R { + RF_SRAM_DAC_STS_CLR_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bits 16:31"] #[inline(always)] - pub fn rf_sram_dac_done(&self) -> RF_SRAM_DAC_DONE_R { - RF_SRAM_DAC_DONE_R::new((self.bits & 0x01) != 0) + pub fn rf_sram_dac_done_cnt(&self) -> RF_SRAM_DAC_DONE_CNT_R { + RF_SRAM_DAC_DONE_CNT_R::new(((self.bits >> 16) & 0xffff) as u16) } } impl W { - #[doc = "Bits 16:31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn rf_sram_dac_done_cnt(&mut self) -> RF_SRAM_DAC_DONE_CNT_W { - RF_SRAM_DAC_DONE_CNT_W { w: self } + #[must_use] + pub fn rf_sram_dac_done(&mut self) -> RF_SRAM_DAC_DONE_W<0> { + RF_SRAM_DAC_DONE_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bit 1"] #[inline(always)] - pub fn rf_sram_dac_sts_clr(&mut self) -> RF_SRAM_DAC_STS_CLR_W { - RF_SRAM_DAC_STS_CLR_W { w: self } + #[must_use] + pub fn rf_sram_dac_en(&mut self) -> RF_SRAM_DAC_EN_W<1> { + RF_SRAM_DAC_EN_W::new(self) } #[doc = "Bit 2"] #[inline(always)] - pub fn rf_sram_dac_loop_en(&mut self) -> RF_SRAM_DAC_LOOP_EN_W { - RF_SRAM_DAC_LOOP_EN_W { w: self } + #[must_use] + pub fn rf_sram_dac_loop_en(&mut self) -> RF_SRAM_DAC_LOOP_EN_W<2> { + RF_SRAM_DAC_LOOP_EN_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 3"] #[inline(always)] - pub fn rf_sram_dac_en(&mut self) -> RF_SRAM_DAC_EN_W { - RF_SRAM_DAC_EN_W { w: self } + #[must_use] + pub fn rf_sram_dac_sts_clr(&mut self) -> RF_SRAM_DAC_STS_CLR_W<3> { + RF_SRAM_DAC_STS_CLR_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bits 16:31"] #[inline(always)] - pub fn rf_sram_dac_done(&mut self) -> RF_SRAM_DAC_DONE_W { - RF_SRAM_DAC_DONE_W { w: self } + #[must_use] + pub fn rf_sram_dac_done_cnt(&mut self) -> RF_SRAM_DAC_DONE_CNT_W<16> { + RF_SRAM_DAC_DONE_CNT_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -273,11 +135,10 @@ impl crate::Readable for RF_SRAM_CTRL4_SPEC { #[doc = "`write(|w| ..)` method takes [rf_sram_ctrl4::W](W) writer structure"] impl crate::Writable for RF_SRAM_CTRL4_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rf_sram_ctrl4 to value 0"] impl crate::Resettable for RF_SRAM_CTRL4_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rf_sram_ctrl5.rs b/src/rf/rf_sram_ctrl5.rs index 3bc93fd..e70f551 100644 --- a/src/rf/rf_sram_ctrl5.rs +++ b/src/rf/rf_sram_ctrl5.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,87 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rf_sram_dac_addr_start` reader - "] -pub struct RF_SRAM_DAC_ADDR_START_R(crate::FieldReader); -impl RF_SRAM_DAC_ADDR_START_R { - pub(crate) fn new(bits: u16) -> Self { - RF_SRAM_DAC_ADDR_START_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_SRAM_DAC_ADDR_START_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_sram_dac_addr_start` writer - "] -pub struct RF_SRAM_DAC_ADDR_START_W<'a> { - w: &'a mut W, -} -impl<'a> RF_SRAM_DAC_ADDR_START_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xffff << 16)) | ((value as u32 & 0xffff) << 16); - self.w - } -} #[doc = "Field `rf_sram_dac_addr_end` reader - "] -pub struct RF_SRAM_DAC_ADDR_END_R(crate::FieldReader); -impl RF_SRAM_DAC_ADDR_END_R { - pub(crate) fn new(bits: u16) -> Self { - RF_SRAM_DAC_ADDR_END_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_SRAM_DAC_ADDR_END_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RF_SRAM_DAC_ADDR_END_R = crate::FieldReader; #[doc = "Field `rf_sram_dac_addr_end` writer - "] -pub struct RF_SRAM_DAC_ADDR_END_W<'a> { - w: &'a mut W, -} -impl<'a> RF_SRAM_DAC_ADDR_END_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type RF_SRAM_DAC_ADDR_END_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_SRAM_CTRL5_SPEC, u16, u16, 16, O>; +#[doc = "Field `rf_sram_dac_addr_start` reader - "] +pub type RF_SRAM_DAC_ADDR_START_R = crate::FieldReader; +#[doc = "Field `rf_sram_dac_addr_start` writer - "] +pub type RF_SRAM_DAC_ADDR_START_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_SRAM_CTRL5_SPEC, u16, u16, 16, O>; +impl R { + #[doc = "Bits 0:15"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w + pub fn rf_sram_dac_addr_end(&self) -> RF_SRAM_DAC_ADDR_END_R { + RF_SRAM_DAC_ADDR_END_R::new((self.bits & 0xffff) as u16) } -} -impl R { #[doc = "Bits 16:31"] #[inline(always)] pub fn rf_sram_dac_addr_start(&self) -> RF_SRAM_DAC_ADDR_START_R { RF_SRAM_DAC_ADDR_START_R::new(((self.bits >> 16) & 0xffff) as u16) } - #[doc = "Bits 0:15"] - #[inline(always)] - pub fn rf_sram_dac_addr_end(&self) -> RF_SRAM_DAC_ADDR_END_R { - RF_SRAM_DAC_ADDR_END_R::new((self.bits & 0xffff) as u16) - } } impl W { - #[doc = "Bits 16:31"] + #[doc = "Bits 0:15"] #[inline(always)] - pub fn rf_sram_dac_addr_start(&mut self) -> RF_SRAM_DAC_ADDR_START_W { - RF_SRAM_DAC_ADDR_START_W { w: self } + #[must_use] + pub fn rf_sram_dac_addr_end(&mut self) -> RF_SRAM_DAC_ADDR_END_W<0> { + RF_SRAM_DAC_ADDR_END_W::new(self) } - #[doc = "Bits 0:15"] + #[doc = "Bits 16:31"] #[inline(always)] - pub fn rf_sram_dac_addr_end(&mut self) -> RF_SRAM_DAC_ADDR_END_W { - RF_SRAM_DAC_ADDR_END_W { w: self } + #[must_use] + pub fn rf_sram_dac_addr_start(&mut self) -> RF_SRAM_DAC_ADDR_START_W<16> { + RF_SRAM_DAC_ADDR_START_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -125,11 +88,10 @@ impl crate::Readable for RF_SRAM_CTRL5_SPEC { #[doc = "`write(|w| ..)` method takes [rf_sram_ctrl5::W](W) writer structure"] impl crate::Writable for RF_SRAM_CTRL5_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rf_sram_ctrl5 to value 0"] impl crate::Resettable for RF_SRAM_CTRL5_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rf_sram_ctrl6.rs b/src/rf/rf_sram_ctrl6.rs index 1bce0d2..3f0521a 100644 --- a/src/rf/rf_sram_ctrl6.rs +++ b/src/rf/rf_sram_ctrl6.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `rf_sram_dac_sts` reader - "] -pub struct RF_SRAM_DAC_STS_R(crate::FieldReader); -impl RF_SRAM_DAC_STS_R { - pub(crate) fn new(bits: u32) -> Self { - RF_SRAM_DAC_STS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_SRAM_DAC_STS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RF_SRAM_DAC_STS_R = crate::FieldReader; #[doc = "Field `rf_sram_dac_sts` writer - "] -pub struct RF_SRAM_DAC_STS_W<'a> { - w: &'a mut W, -} -impl<'a> RF_SRAM_DAC_STS_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type RF_SRAM_DAC_STS_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RF_SRAM_CTRL6_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn rf_sram_dac_sts(&self) -> RF_SRAM_DAC_STS_R { - RF_SRAM_DAC_STS_R::new((self.bits & 0xffff_ffff) as u32) + RF_SRAM_DAC_STS_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn rf_sram_dac_sts(&mut self) -> RF_SRAM_DAC_STS_W { - RF_SRAM_DAC_STS_W { w: self } + #[must_use] + pub fn rf_sram_dac_sts(&mut self) -> RF_SRAM_DAC_STS_W<0> { + RF_SRAM_DAC_STS_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for RF_SRAM_CTRL6_SPEC { #[doc = "`write(|w| ..)` method takes [rf_sram_ctrl6::W](W) writer structure"] impl crate::Writable for RF_SRAM_CTRL6_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rf_sram_ctrl6 to value 0"] impl crate::Resettable for RF_SRAM_CTRL6_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rfcal_ctrlen.rs b/src/rf/rfcal_ctrlen.rs index 4615a89..cd51bbb 100644 --- a/src/rf/rfcal_ctrlen.rs +++ b/src/rf/rfcal_ctrlen.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,843 +28,288 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `dpd_en` reader - "] -pub struct DPD_EN_R(crate::FieldReader); -impl DPD_EN_R { - pub(crate) fn new(bits: bool) -> Self { - DPD_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DPD_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dpd_en` writer - "] -pub struct DPD_EN_W<'a> { - w: &'a mut W, -} -impl<'a> DPD_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w - } -} -#[doc = "Field `tsencal_en` reader - "] -pub struct TSENCAL_EN_R(crate::FieldReader); -impl TSENCAL_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TSENCAL_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TSENCAL_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tsencal_en` writer - "] -pub struct TSENCAL_EN_W<'a> { - w: &'a mut W, -} -impl<'a> TSENCAL_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `pwdet_cal_en` reader - "] -pub struct PWDET_CAL_EN_R(crate::FieldReader); -impl PWDET_CAL_EN_R { - pub(crate) fn new(bits: bool) -> Self { - PWDET_CAL_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWDET_CAL_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwdet_cal_en` writer - "] -pub struct PWDET_CAL_EN_W<'a> { - w: &'a mut W, -} -impl<'a> PWDET_CAL_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15); - self.w - } -} -#[doc = "Field `riqcal_en` reader - "] -pub struct RIQCAL_EN_R(crate::FieldReader); -impl RIQCAL_EN_R { - pub(crate) fn new(bits: bool) -> Self { - RIQCAL_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RIQCAL_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `riqcal_en` writer - "] -pub struct RIQCAL_EN_W<'a> { - w: &'a mut W, -} -impl<'a> RIQCAL_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14); - self.w - } -} -#[doc = "Field `tiqcal_en` reader - "] -pub struct TIQCAL_EN_R(crate::FieldReader); -impl TIQCAL_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TIQCAL_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TIQCAL_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tiqcal_en` writer - "] -pub struct TIQCAL_EN_W<'a> { - w: &'a mut W, -} -impl<'a> TIQCAL_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13); - self.w - } -} -#[doc = "Field `lo_leakcal_en` reader - "] -pub struct LO_LEAKCAL_EN_R(crate::FieldReader); -impl LO_LEAKCAL_EN_R { - pub(crate) fn new(bits: bool) -> Self { - LO_LEAKCAL_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_LEAKCAL_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_leakcal_en` writer - "] -pub struct LO_LEAKCAL_EN_W<'a> { - w: &'a mut W, -} -impl<'a> LO_LEAKCAL_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} -#[doc = "Field `rccal_en` reader - "] -pub struct RCCAL_EN_R(crate::FieldReader); -impl RCCAL_EN_R { - pub(crate) fn new(bits: bool) -> Self { - RCCAL_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RCCAL_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rccal_en` writer - "] -pub struct RCCAL_EN_W<'a> { - w: &'a mut W, -} -impl<'a> RCCAL_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w - } -} -#[doc = "Field `toscal_en` reader - "] -pub struct TOSCAL_EN_R(crate::FieldReader); -impl TOSCAL_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TOSCAL_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TOSCAL_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `toscal_en` writer - "] -pub struct TOSCAL_EN_W<'a> { - w: &'a mut W, -} -impl<'a> TOSCAL_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); - self.w - } -} -#[doc = "Field `roscal_en` reader - "] -pub struct ROSCAL_EN_R(crate::FieldReader); -impl ROSCAL_EN_R { - pub(crate) fn new(bits: bool) -> Self { - ROSCAL_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ROSCAL_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `roscal_en` writer - "] -pub struct ROSCAL_EN_W<'a> { - w: &'a mut W, -} -impl<'a> ROSCAL_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w - } -} -#[doc = "Field `clkpll_cal_en` reader - "] -pub struct CLKPLL_CAL_EN_R(crate::FieldReader); -impl CLKPLL_CAL_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CLKPLL_CAL_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_CAL_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_cal_en` writer - "] -pub struct CLKPLL_CAL_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_CAL_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `roscal_inc_en` reader - "] -pub struct ROSCAL_INC_EN_R(crate::FieldReader); -impl ROSCAL_INC_EN_R { - pub(crate) fn new(bits: bool) -> Self { - ROSCAL_INC_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ROSCAL_INC_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `roscal_inc_en` writer - "] -pub struct ROSCAL_INC_EN_W<'a> { - w: &'a mut W, -} -impl<'a> ROSCAL_INC_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7); - self.w - } -} -#[doc = "Field `acal_inc_en` reader - "] -pub struct ACAL_INC_EN_R(crate::FieldReader); -impl ACAL_INC_EN_R { - pub(crate) fn new(bits: bool) -> Self { - ACAL_INC_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ACAL_INC_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `acal_inc_en` writer - "] -pub struct ACAL_INC_EN_W<'a> { - w: &'a mut W, -} -impl<'a> ACAL_INC_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w - } -} -#[doc = "Field `fcal_inc_en` reader - "] -pub struct FCAL_INC_EN_R(crate::FieldReader); -impl FCAL_INC_EN_R { - pub(crate) fn new(bits: bool) -> Self { - FCAL_INC_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for FCAL_INC_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `fcal_inc_en` writer - "] -pub struct FCAL_INC_EN_W<'a> { - w: &'a mut W, -} -impl<'a> FCAL_INC_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w - } -} -#[doc = "Field `acal_en` reader - "] -pub struct ACAL_EN_R(crate::FieldReader); -impl ACAL_EN_R { - pub(crate) fn new(bits: bool) -> Self { - ACAL_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ACAL_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `acal_en` writer - "] -pub struct ACAL_EN_W<'a> { - w: &'a mut W, -} -impl<'a> ACAL_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} -#[doc = "Field `fcal_en` reader - "] -pub struct FCAL_EN_R(crate::FieldReader); -impl FCAL_EN_R { - pub(crate) fn new(bits: bool) -> Self { - FCAL_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for FCAL_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `fcal_en` writer - "] -pub struct FCAL_EN_W<'a> { - w: &'a mut W, -} -impl<'a> FCAL_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `dl_rfcal_table_en` reader - "] -pub struct DL_RFCAL_TABLE_EN_R(crate::FieldReader); -impl DL_RFCAL_TABLE_EN_R { - pub(crate) fn new(bits: bool) -> Self { - DL_RFCAL_TABLE_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DL_RFCAL_TABLE_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dl_rfcal_table_en` writer - "] -pub struct DL_RFCAL_TABLE_EN_W<'a> { - w: &'a mut W, -} -impl<'a> DL_RFCAL_TABLE_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `adc_oscal_en` reader - "] -pub struct ADC_OSCAL_EN_R(crate::FieldReader); -impl ADC_OSCAL_EN_R { - pub(crate) fn new(bits: bool) -> Self { - ADC_OSCAL_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ADC_OSCAL_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `adc_oscal_en` writer - "] -pub struct ADC_OSCAL_EN_W<'a> { - w: &'a mut W, -} -impl<'a> ADC_OSCAL_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `rcal_en_resv` reader - "] -pub struct RCAL_EN_RESV_R(crate::FieldReader); -impl RCAL_EN_RESV_R { - pub(crate) fn new(bits: bool) -> Self { - RCAL_EN_RESV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RCAL_EN_RESV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RCAL_EN_RESV_R = crate::BitReader; #[doc = "Field `rcal_en_resv` writer - "] -pub struct RCAL_EN_RESV_W<'a> { - w: &'a mut W, -} -impl<'a> RCAL_EN_RESV_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type RCAL_EN_RESV_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_CTRLEN_SPEC, bool, O>; +#[doc = "Field `adc_oscal_en` reader - "] +pub type ADC_OSCAL_EN_R = crate::BitReader; +#[doc = "Field `adc_oscal_en` writer - "] +pub type ADC_OSCAL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_CTRLEN_SPEC, bool, O>; +#[doc = "Field `dl_rfcal_table_en` reader - "] +pub type DL_RFCAL_TABLE_EN_R = crate::BitReader; +#[doc = "Field `dl_rfcal_table_en` writer - "] +pub type DL_RFCAL_TABLE_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RFCAL_CTRLEN_SPEC, bool, O>; +#[doc = "Field `fcal_en` reader - "] +pub type FCAL_EN_R = crate::BitReader; +#[doc = "Field `fcal_en` writer - "] +pub type FCAL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_CTRLEN_SPEC, bool, O>; +#[doc = "Field `acal_en` reader - "] +pub type ACAL_EN_R = crate::BitReader; +#[doc = "Field `acal_en` writer - "] +pub type ACAL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_CTRLEN_SPEC, bool, O>; +#[doc = "Field `fcal_inc_en` reader - "] +pub type FCAL_INC_EN_R = crate::BitReader; +#[doc = "Field `fcal_inc_en` writer - "] +pub type FCAL_INC_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_CTRLEN_SPEC, bool, O>; +#[doc = "Field `acal_inc_en` reader - "] +pub type ACAL_INC_EN_R = crate::BitReader; +#[doc = "Field `acal_inc_en` writer - "] +pub type ACAL_INC_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_CTRLEN_SPEC, bool, O>; +#[doc = "Field `roscal_inc_en` reader - "] +pub type ROSCAL_INC_EN_R = crate::BitReader; +#[doc = "Field `roscal_inc_en` writer - "] +pub type ROSCAL_INC_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_CTRLEN_SPEC, bool, O>; +#[doc = "Field `clkpll_cal_en` reader - "] +pub type CLKPLL_CAL_EN_R = crate::BitReader; +#[doc = "Field `clkpll_cal_en` writer - "] +pub type CLKPLL_CAL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_CTRLEN_SPEC, bool, O>; +#[doc = "Field `roscal_en` reader - "] +pub type ROSCAL_EN_R = crate::BitReader; +#[doc = "Field `roscal_en` writer - "] +pub type ROSCAL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_CTRLEN_SPEC, bool, O>; +#[doc = "Field `toscal_en` reader - "] +pub type TOSCAL_EN_R = crate::BitReader; +#[doc = "Field `toscal_en` writer - "] +pub type TOSCAL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_CTRLEN_SPEC, bool, O>; +#[doc = "Field `rccal_en` reader - "] +pub type RCCAL_EN_R = crate::BitReader; +#[doc = "Field `rccal_en` writer - "] +pub type RCCAL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_CTRLEN_SPEC, bool, O>; +#[doc = "Field `lo_leakcal_en` reader - "] +pub type LO_LEAKCAL_EN_R = crate::BitReader; +#[doc = "Field `lo_leakcal_en` writer - "] +pub type LO_LEAKCAL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_CTRLEN_SPEC, bool, O>; +#[doc = "Field `tiqcal_en` reader - "] +pub type TIQCAL_EN_R = crate::BitReader; +#[doc = "Field `tiqcal_en` writer - "] +pub type TIQCAL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_CTRLEN_SPEC, bool, O>; +#[doc = "Field `riqcal_en` reader - "] +pub type RIQCAL_EN_R = crate::BitReader; +#[doc = "Field `riqcal_en` writer - "] +pub type RIQCAL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_CTRLEN_SPEC, bool, O>; +#[doc = "Field `pwdet_cal_en` reader - "] +pub type PWDET_CAL_EN_R = crate::BitReader; +#[doc = "Field `pwdet_cal_en` writer - "] +pub type PWDET_CAL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_CTRLEN_SPEC, bool, O>; +#[doc = "Field `tsencal_en` reader - "] +pub type TSENCAL_EN_R = crate::BitReader; +#[doc = "Field `tsencal_en` writer - "] +pub type TSENCAL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_CTRLEN_SPEC, bool, O>; +#[doc = "Field `dpd_en` reader - "] +pub type DPD_EN_R = crate::BitReader; +#[doc = "Field `dpd_en` writer - "] +pub type DPD_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_CTRLEN_SPEC, bool, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn rcal_en_resv(&self) -> RCAL_EN_RESV_R { + RCAL_EN_RESV_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bit 17"] + #[doc = "Bit 1"] #[inline(always)] - pub fn dpd_en(&self) -> DPD_EN_R { - DPD_EN_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn adc_oscal_en(&self) -> ADC_OSCAL_EN_R { + ADC_OSCAL_EN_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 16"] + #[doc = "Bit 2"] #[inline(always)] - pub fn tsencal_en(&self) -> TSENCAL_EN_R { - TSENCAL_EN_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn dl_rfcal_table_en(&self) -> DL_RFCAL_TABLE_EN_R { + DL_RFCAL_TABLE_EN_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 15"] + #[doc = "Bit 3"] #[inline(always)] - pub fn pwdet_cal_en(&self) -> PWDET_CAL_EN_R { - PWDET_CAL_EN_R::new(((self.bits >> 15) & 0x01) != 0) + pub fn fcal_en(&self) -> FCAL_EN_R { + FCAL_EN_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bit 14"] + #[doc = "Bit 4"] #[inline(always)] - pub fn riqcal_en(&self) -> RIQCAL_EN_R { - RIQCAL_EN_R::new(((self.bits >> 14) & 0x01) != 0) + pub fn acal_en(&self) -> ACAL_EN_R { + ACAL_EN_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 13"] + #[doc = "Bit 5"] #[inline(always)] - pub fn tiqcal_en(&self) -> TIQCAL_EN_R { - TIQCAL_EN_R::new(((self.bits >> 13) & 0x01) != 0) + pub fn fcal_inc_en(&self) -> FCAL_INC_EN_R { + FCAL_INC_EN_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 12"] + #[doc = "Bit 6"] #[inline(always)] - pub fn lo_leakcal_en(&self) -> LO_LEAKCAL_EN_R { - LO_LEAKCAL_EN_R::new(((self.bits >> 12) & 0x01) != 0) + pub fn acal_inc_en(&self) -> ACAL_INC_EN_R { + ACAL_INC_EN_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = "Bit 11"] + #[doc = "Bit 7"] #[inline(always)] - pub fn rccal_en(&self) -> RCCAL_EN_R { - RCCAL_EN_R::new(((self.bits >> 11) & 0x01) != 0) + pub fn roscal_inc_en(&self) -> ROSCAL_INC_EN_R { + ROSCAL_INC_EN_R::new(((self.bits >> 7) & 1) != 0) } - #[doc = "Bit 10"] + #[doc = "Bit 8"] #[inline(always)] - pub fn toscal_en(&self) -> TOSCAL_EN_R { - TOSCAL_EN_R::new(((self.bits >> 10) & 0x01) != 0) + pub fn clkpll_cal_en(&self) -> CLKPLL_CAL_EN_R { + CLKPLL_CAL_EN_R::new(((self.bits >> 8) & 1) != 0) } #[doc = "Bit 9"] #[inline(always)] pub fn roscal_en(&self) -> ROSCAL_EN_R { - ROSCAL_EN_R::new(((self.bits >> 9) & 0x01) != 0) + ROSCAL_EN_R::new(((self.bits >> 9) & 1) != 0) } - #[doc = "Bit 8"] - #[inline(always)] - pub fn clkpll_cal_en(&self) -> CLKPLL_CAL_EN_R { - CLKPLL_CAL_EN_R::new(((self.bits >> 8) & 0x01) != 0) - } - #[doc = "Bit 7"] + #[doc = "Bit 10"] #[inline(always)] - pub fn roscal_inc_en(&self) -> ROSCAL_INC_EN_R { - ROSCAL_INC_EN_R::new(((self.bits >> 7) & 0x01) != 0) + pub fn toscal_en(&self) -> TOSCAL_EN_R { + TOSCAL_EN_R::new(((self.bits >> 10) & 1) != 0) } - #[doc = "Bit 6"] + #[doc = "Bit 11"] #[inline(always)] - pub fn acal_inc_en(&self) -> ACAL_INC_EN_R { - ACAL_INC_EN_R::new(((self.bits >> 6) & 0x01) != 0) + pub fn rccal_en(&self) -> RCCAL_EN_R { + RCCAL_EN_R::new(((self.bits >> 11) & 1) != 0) } - #[doc = "Bit 5"] + #[doc = "Bit 12"] #[inline(always)] - pub fn fcal_inc_en(&self) -> FCAL_INC_EN_R { - FCAL_INC_EN_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn lo_leakcal_en(&self) -> LO_LEAKCAL_EN_R { + LO_LEAKCAL_EN_R::new(((self.bits >> 12) & 1) != 0) } - #[doc = "Bit 4"] + #[doc = "Bit 13"] #[inline(always)] - pub fn acal_en(&self) -> ACAL_EN_R { - ACAL_EN_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn tiqcal_en(&self) -> TIQCAL_EN_R { + TIQCAL_EN_R::new(((self.bits >> 13) & 1) != 0) } - #[doc = "Bit 3"] + #[doc = "Bit 14"] #[inline(always)] - pub fn fcal_en(&self) -> FCAL_EN_R { - FCAL_EN_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn riqcal_en(&self) -> RIQCAL_EN_R { + RIQCAL_EN_R::new(((self.bits >> 14) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bit 15"] #[inline(always)] - pub fn dl_rfcal_table_en(&self) -> DL_RFCAL_TABLE_EN_R { - DL_RFCAL_TABLE_EN_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn pwdet_cal_en(&self) -> PWDET_CAL_EN_R { + PWDET_CAL_EN_R::new(((self.bits >> 15) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 16"] #[inline(always)] - pub fn adc_oscal_en(&self) -> ADC_OSCAL_EN_R { - ADC_OSCAL_EN_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn tsencal_en(&self) -> TSENCAL_EN_R { + TSENCAL_EN_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 17"] #[inline(always)] - pub fn rcal_en_resv(&self) -> RCAL_EN_RESV_R { - RCAL_EN_RESV_R::new((self.bits & 0x01) != 0) + pub fn dpd_en(&self) -> DPD_EN_R { + DPD_EN_R::new(((self.bits >> 17) & 1) != 0) } } impl W { - #[doc = "Bit 17"] + #[doc = "Bit 0"] #[inline(always)] - pub fn dpd_en(&mut self) -> DPD_EN_W { - DPD_EN_W { w: self } + #[must_use] + pub fn rcal_en_resv(&mut self) -> RCAL_EN_RESV_W<0> { + RCAL_EN_RESV_W::new(self) } - #[doc = "Bit 16"] + #[doc = "Bit 1"] #[inline(always)] - pub fn tsencal_en(&mut self) -> TSENCAL_EN_W { - TSENCAL_EN_W { w: self } + #[must_use] + pub fn adc_oscal_en(&mut self) -> ADC_OSCAL_EN_W<1> { + ADC_OSCAL_EN_W::new(self) } - #[doc = "Bit 15"] + #[doc = "Bit 2"] #[inline(always)] - pub fn pwdet_cal_en(&mut self) -> PWDET_CAL_EN_W { - PWDET_CAL_EN_W { w: self } + #[must_use] + pub fn dl_rfcal_table_en(&mut self) -> DL_RFCAL_TABLE_EN_W<2> { + DL_RFCAL_TABLE_EN_W::new(self) } - #[doc = "Bit 14"] + #[doc = "Bit 3"] #[inline(always)] - pub fn riqcal_en(&mut self) -> RIQCAL_EN_W { - RIQCAL_EN_W { w: self } + #[must_use] + pub fn fcal_en(&mut self) -> FCAL_EN_W<3> { + FCAL_EN_W::new(self) } - #[doc = "Bit 13"] + #[doc = "Bit 4"] #[inline(always)] - pub fn tiqcal_en(&mut self) -> TIQCAL_EN_W { - TIQCAL_EN_W { w: self } + #[must_use] + pub fn acal_en(&mut self) -> ACAL_EN_W<4> { + ACAL_EN_W::new(self) } - #[doc = "Bit 12"] + #[doc = "Bit 5"] #[inline(always)] - pub fn lo_leakcal_en(&mut self) -> LO_LEAKCAL_EN_W { - LO_LEAKCAL_EN_W { w: self } + #[must_use] + pub fn fcal_inc_en(&mut self) -> FCAL_INC_EN_W<5> { + FCAL_INC_EN_W::new(self) } - #[doc = "Bit 11"] + #[doc = "Bit 6"] #[inline(always)] - pub fn rccal_en(&mut self) -> RCCAL_EN_W { - RCCAL_EN_W { w: self } + #[must_use] + pub fn acal_inc_en(&mut self) -> ACAL_INC_EN_W<6> { + ACAL_INC_EN_W::new(self) } - #[doc = "Bit 10"] + #[doc = "Bit 7"] #[inline(always)] - pub fn toscal_en(&mut self) -> TOSCAL_EN_W { - TOSCAL_EN_W { w: self } + #[must_use] + pub fn roscal_inc_en(&mut self) -> ROSCAL_INC_EN_W<7> { + ROSCAL_INC_EN_W::new(self) } - #[doc = "Bit 9"] + #[doc = "Bit 8"] #[inline(always)] - pub fn roscal_en(&mut self) -> ROSCAL_EN_W { - ROSCAL_EN_W { w: self } + #[must_use] + pub fn clkpll_cal_en(&mut self) -> CLKPLL_CAL_EN_W<8> { + CLKPLL_CAL_EN_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bit 9"] #[inline(always)] - pub fn clkpll_cal_en(&mut self) -> CLKPLL_CAL_EN_W { - CLKPLL_CAL_EN_W { w: self } + #[must_use] + pub fn roscal_en(&mut self) -> ROSCAL_EN_W<9> { + ROSCAL_EN_W::new(self) } - #[doc = "Bit 7"] + #[doc = "Bit 10"] #[inline(always)] - pub fn roscal_inc_en(&mut self) -> ROSCAL_INC_EN_W { - ROSCAL_INC_EN_W { w: self } + #[must_use] + pub fn toscal_en(&mut self) -> TOSCAL_EN_W<10> { + TOSCAL_EN_W::new(self) } - #[doc = "Bit 6"] + #[doc = "Bit 11"] #[inline(always)] - pub fn acal_inc_en(&mut self) -> ACAL_INC_EN_W { - ACAL_INC_EN_W { w: self } + #[must_use] + pub fn rccal_en(&mut self) -> RCCAL_EN_W<11> { + RCCAL_EN_W::new(self) } - #[doc = "Bit 5"] + #[doc = "Bit 12"] #[inline(always)] - pub fn fcal_inc_en(&mut self) -> FCAL_INC_EN_W { - FCAL_INC_EN_W { w: self } + #[must_use] + pub fn lo_leakcal_en(&mut self) -> LO_LEAKCAL_EN_W<12> { + LO_LEAKCAL_EN_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 13"] #[inline(always)] - pub fn acal_en(&mut self) -> ACAL_EN_W { - ACAL_EN_W { w: self } + #[must_use] + pub fn tiqcal_en(&mut self) -> TIQCAL_EN_W<13> { + TIQCAL_EN_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bit 14"] #[inline(always)] - pub fn fcal_en(&mut self) -> FCAL_EN_W { - FCAL_EN_W { w: self } + #[must_use] + pub fn riqcal_en(&mut self) -> RIQCAL_EN_W<14> { + RIQCAL_EN_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bit 15"] #[inline(always)] - pub fn dl_rfcal_table_en(&mut self) -> DL_RFCAL_TABLE_EN_W { - DL_RFCAL_TABLE_EN_W { w: self } + #[must_use] + pub fn pwdet_cal_en(&mut self) -> PWDET_CAL_EN_W<15> { + PWDET_CAL_EN_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 16"] #[inline(always)] - pub fn adc_oscal_en(&mut self) -> ADC_OSCAL_EN_W { - ADC_OSCAL_EN_W { w: self } + #[must_use] + pub fn tsencal_en(&mut self) -> TSENCAL_EN_W<16> { + TSENCAL_EN_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 17"] #[inline(always)] - pub fn rcal_en_resv(&mut self) -> RCAL_EN_RESV_W { - RCAL_EN_RESV_W { w: self } + #[must_use] + pub fn dpd_en(&mut self) -> DPD_EN_W<17> { + DPD_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -881,11 +327,10 @@ impl crate::Readable for RFCAL_CTRLEN_SPEC { #[doc = "`write(|w| ..)` method takes [rfcal_ctrlen::W](W) writer structure"] impl crate::Writable for RFCAL_CTRLEN_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rfcal_ctrlen to value 0"] impl crate::Resettable for RFCAL_CTRLEN_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rfcal_stateen.rs b/src/rf/rfcal_stateen.rs index beda9be..52aeb62 100644 --- a/src/rf/rfcal_stateen.rs +++ b/src/rf/rfcal_stateen.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,833 +28,292 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rfcal_level` reader - "] -pub struct RFCAL_LEVEL_R(crate::FieldReader); -impl RFCAL_LEVEL_R { - pub(crate) fn new(bits: u8) -> Self { - RFCAL_LEVEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RFCAL_LEVEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rfcal_level` writer - "] -pub struct RFCAL_LEVEL_W<'a> { - w: &'a mut W, -} -impl<'a> RFCAL_LEVEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 30)) | ((value as u32 & 0x03) << 30); - self.w - } -} -#[doc = "Field `dpd_sten` reader - "] -pub struct DPD_STEN_R(crate::FieldReader); -impl DPD_STEN_R { - pub(crate) fn new(bits: bool) -> Self { - DPD_STEN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DPD_STEN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dpd_sten` writer - "] -pub struct DPD_STEN_W<'a> { - w: &'a mut W, -} -impl<'a> DPD_STEN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `tsencal_sten` reader - "] -pub struct TSENCAL_STEN_R(crate::FieldReader); -impl TSENCAL_STEN_R { - pub(crate) fn new(bits: bool) -> Self { - TSENCAL_STEN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TSENCAL_STEN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tsencal_sten` writer - "] -pub struct TSENCAL_STEN_W<'a> { - w: &'a mut W, -} -impl<'a> TSENCAL_STEN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15); - self.w - } -} -#[doc = "Field `pwdet_cal_sten` reader - "] -pub struct PWDET_CAL_STEN_R(crate::FieldReader); -impl PWDET_CAL_STEN_R { - pub(crate) fn new(bits: bool) -> Self { - PWDET_CAL_STEN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWDET_CAL_STEN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwdet_cal_sten` writer - "] -pub struct PWDET_CAL_STEN_W<'a> { - w: &'a mut W, -} -impl<'a> PWDET_CAL_STEN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14); - self.w - } -} -#[doc = "Field `riqcal_sten` reader - "] -pub struct RIQCAL_STEN_R(crate::FieldReader); -impl RIQCAL_STEN_R { - pub(crate) fn new(bits: bool) -> Self { - RIQCAL_STEN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RIQCAL_STEN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `riqcal_sten` writer - "] -pub struct RIQCAL_STEN_W<'a> { - w: &'a mut W, -} -impl<'a> RIQCAL_STEN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13); - self.w - } -} -#[doc = "Field `tiqcal_sten` reader - "] -pub struct TIQCAL_STEN_R(crate::FieldReader); -impl TIQCAL_STEN_R { - pub(crate) fn new(bits: bool) -> Self { - TIQCAL_STEN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TIQCAL_STEN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tiqcal_sten` writer - "] -pub struct TIQCAL_STEN_W<'a> { - w: &'a mut W, -} -impl<'a> TIQCAL_STEN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} -#[doc = "Field `lo_leakcal_sten` reader - "] -pub struct LO_LEAKCAL_STEN_R(crate::FieldReader); -impl LO_LEAKCAL_STEN_R { - pub(crate) fn new(bits: bool) -> Self { - LO_LEAKCAL_STEN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_LEAKCAL_STEN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_leakcal_sten` writer - "] -pub struct LO_LEAKCAL_STEN_W<'a> { - w: &'a mut W, -} -impl<'a> LO_LEAKCAL_STEN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w - } -} -#[doc = "Field `rccal_sten` reader - "] -pub struct RCCAL_STEN_R(crate::FieldReader); -impl RCCAL_STEN_R { - pub(crate) fn new(bits: bool) -> Self { - RCCAL_STEN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RCCAL_STEN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rccal_sten` writer - "] -pub struct RCCAL_STEN_W<'a> { - w: &'a mut W, -} -impl<'a> RCCAL_STEN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); - self.w - } -} -#[doc = "Field `toscal_sten_resv` reader - "] -pub struct TOSCAL_STEN_RESV_R(crate::FieldReader); -impl TOSCAL_STEN_RESV_R { - pub(crate) fn new(bits: bool) -> Self { - TOSCAL_STEN_RESV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TOSCAL_STEN_RESV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `toscal_sten_resv` writer - "] -pub struct TOSCAL_STEN_RESV_W<'a> { - w: &'a mut W, -} -impl<'a> TOSCAL_STEN_RESV_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w - } -} -#[doc = "Field `roscal_sten` reader - "] -pub struct ROSCAL_STEN_R(crate::FieldReader); -impl ROSCAL_STEN_R { - pub(crate) fn new(bits: bool) -> Self { - ROSCAL_STEN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ROSCAL_STEN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `roscal_sten` writer - "] -pub struct ROSCAL_STEN_W<'a> { - w: &'a mut W, -} -impl<'a> ROSCAL_STEN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `clkpll_cal_sten` reader - "] -pub struct CLKPLL_CAL_STEN_R(crate::FieldReader); -impl CLKPLL_CAL_STEN_R { - pub(crate) fn new(bits: bool) -> Self { - CLKPLL_CAL_STEN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_CAL_STEN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_cal_sten` writer - "] -pub struct CLKPLL_CAL_STEN_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_CAL_STEN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7); - self.w - } -} -#[doc = "Field `inc_acal_sten` reader - "] -pub struct INC_ACAL_STEN_R(crate::FieldReader); -impl INC_ACAL_STEN_R { - pub(crate) fn new(bits: bool) -> Self { - INC_ACAL_STEN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for INC_ACAL_STEN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `inc_acal_sten` writer - "] -pub struct INC_ACAL_STEN_W<'a> { - w: &'a mut W, -} -impl<'a> INC_ACAL_STEN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w - } -} -#[doc = "Field `inc_fcal_sten` reader - "] -pub struct INC_FCAL_STEN_R(crate::FieldReader); -impl INC_FCAL_STEN_R { - pub(crate) fn new(bits: bool) -> Self { - INC_FCAL_STEN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for INC_FCAL_STEN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `inc_fcal_sten` writer - "] -pub struct INC_FCAL_STEN_W<'a> { - w: &'a mut W, -} -impl<'a> INC_FCAL_STEN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w - } -} -#[doc = "Field `acal_sten` reader - "] -pub struct ACAL_STEN_R(crate::FieldReader); -impl ACAL_STEN_R { - pub(crate) fn new(bits: bool) -> Self { - ACAL_STEN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ACAL_STEN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `acal_sten` writer - "] -pub struct ACAL_STEN_W<'a> { - w: &'a mut W, -} -impl<'a> ACAL_STEN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} -#[doc = "Field `fcal_sten` reader - "] -pub struct FCAL_STEN_R(crate::FieldReader); -impl FCAL_STEN_R { - pub(crate) fn new(bits: bool) -> Self { - FCAL_STEN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for FCAL_STEN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `fcal_sten` writer - "] -pub struct FCAL_STEN_W<'a> { - w: &'a mut W, -} -impl<'a> FCAL_STEN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `dl_rfcal_table_sten` reader - "] -pub struct DL_RFCAL_TABLE_STEN_R(crate::FieldReader); -impl DL_RFCAL_TABLE_STEN_R { - pub(crate) fn new(bits: bool) -> Self { - DL_RFCAL_TABLE_STEN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DL_RFCAL_TABLE_STEN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dl_rfcal_table_sten` writer - "] -pub struct DL_RFCAL_TABLE_STEN_W<'a> { - w: &'a mut W, -} -impl<'a> DL_RFCAL_TABLE_STEN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `adc_oscal_sten` reader - "] -pub struct ADC_OSCAL_STEN_R(crate::FieldReader); -impl ADC_OSCAL_STEN_R { - pub(crate) fn new(bits: bool) -> Self { - ADC_OSCAL_STEN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ADC_OSCAL_STEN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `adc_oscal_sten` writer - "] -pub struct ADC_OSCAL_STEN_W<'a> { - w: &'a mut W, -} -impl<'a> ADC_OSCAL_STEN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `rcal_sten_resv` reader - "] -pub struct RCAL_STEN_RESV_R(crate::FieldReader); -impl RCAL_STEN_RESV_R { - pub(crate) fn new(bits: bool) -> Self { - RCAL_STEN_RESV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RCAL_STEN_RESV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RCAL_STEN_RESV_R = crate::BitReader; #[doc = "Field `rcal_sten_resv` writer - "] -pub struct RCAL_STEN_RESV_W<'a> { - w: &'a mut W, -} -impl<'a> RCAL_STEN_RESV_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type RCAL_STEN_RESV_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_STATEEN_SPEC, bool, O>; +#[doc = "Field `adc_oscal_sten` reader - "] +pub type ADC_OSCAL_STEN_R = crate::BitReader; +#[doc = "Field `adc_oscal_sten` writer - "] +pub type ADC_OSCAL_STEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_STATEEN_SPEC, bool, O>; +#[doc = "Field `dl_rfcal_table_sten` reader - "] +pub type DL_RFCAL_TABLE_STEN_R = crate::BitReader; +#[doc = "Field `dl_rfcal_table_sten` writer - "] +pub type DL_RFCAL_TABLE_STEN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RFCAL_STATEEN_SPEC, bool, O>; +#[doc = "Field `fcal_sten` reader - "] +pub type FCAL_STEN_R = crate::BitReader; +#[doc = "Field `fcal_sten` writer - "] +pub type FCAL_STEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_STATEEN_SPEC, bool, O>; +#[doc = "Field `acal_sten` reader - "] +pub type ACAL_STEN_R = crate::BitReader; +#[doc = "Field `acal_sten` writer - "] +pub type ACAL_STEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_STATEEN_SPEC, bool, O>; +#[doc = "Field `inc_fcal_sten` reader - "] +pub type INC_FCAL_STEN_R = crate::BitReader; +#[doc = "Field `inc_fcal_sten` writer - "] +pub type INC_FCAL_STEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_STATEEN_SPEC, bool, O>; +#[doc = "Field `inc_acal_sten` reader - "] +pub type INC_ACAL_STEN_R = crate::BitReader; +#[doc = "Field `inc_acal_sten` writer - "] +pub type INC_ACAL_STEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_STATEEN_SPEC, bool, O>; +#[doc = "Field `clkpll_cal_sten` reader - "] +pub type CLKPLL_CAL_STEN_R = crate::BitReader; +#[doc = "Field `clkpll_cal_sten` writer - "] +pub type CLKPLL_CAL_STEN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RFCAL_STATEEN_SPEC, bool, O>; +#[doc = "Field `roscal_sten` reader - "] +pub type ROSCAL_STEN_R = crate::BitReader; +#[doc = "Field `roscal_sten` writer - "] +pub type ROSCAL_STEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_STATEEN_SPEC, bool, O>; +#[doc = "Field `toscal_sten_resv` reader - "] +pub type TOSCAL_STEN_RESV_R = crate::BitReader; +#[doc = "Field `toscal_sten_resv` writer - "] +pub type TOSCAL_STEN_RESV_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RFCAL_STATEEN_SPEC, bool, O>; +#[doc = "Field `rccal_sten` reader - "] +pub type RCCAL_STEN_R = crate::BitReader; +#[doc = "Field `rccal_sten` writer - "] +pub type RCCAL_STEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_STATEEN_SPEC, bool, O>; +#[doc = "Field `lo_leakcal_sten` reader - "] +pub type LO_LEAKCAL_STEN_R = crate::BitReader; +#[doc = "Field `lo_leakcal_sten` writer - "] +pub type LO_LEAKCAL_STEN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RFCAL_STATEEN_SPEC, bool, O>; +#[doc = "Field `tiqcal_sten` reader - "] +pub type TIQCAL_STEN_R = crate::BitReader; +#[doc = "Field `tiqcal_sten` writer - "] +pub type TIQCAL_STEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_STATEEN_SPEC, bool, O>; +#[doc = "Field `riqcal_sten` reader - "] +pub type RIQCAL_STEN_R = crate::BitReader; +#[doc = "Field `riqcal_sten` writer - "] +pub type RIQCAL_STEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_STATEEN_SPEC, bool, O>; +#[doc = "Field `pwdet_cal_sten` reader - "] +pub type PWDET_CAL_STEN_R = crate::BitReader; +#[doc = "Field `pwdet_cal_sten` writer - "] +pub type PWDET_CAL_STEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_STATEEN_SPEC, bool, O>; +#[doc = "Field `tsencal_sten` reader - "] +pub type TSENCAL_STEN_R = crate::BitReader; +#[doc = "Field `tsencal_sten` writer - "] +pub type TSENCAL_STEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_STATEEN_SPEC, bool, O>; +#[doc = "Field `dpd_sten` reader - "] +pub type DPD_STEN_R = crate::BitReader; +#[doc = "Field `dpd_sten` writer - "] +pub type DPD_STEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCAL_STATEEN_SPEC, bool, O>; +#[doc = "Field `rfcal_level` reader - "] +pub type RFCAL_LEVEL_R = crate::FieldReader; +#[doc = "Field `rfcal_level` writer - "] +pub type RFCAL_LEVEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RFCAL_STATEEN_SPEC, u8, u8, 2, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn rcal_sten_resv(&self) -> RCAL_STEN_RESV_R { + RCAL_STEN_RESV_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bits 30:31"] + #[doc = "Bit 1"] #[inline(always)] - pub fn rfcal_level(&self) -> RFCAL_LEVEL_R { - RFCAL_LEVEL_R::new(((self.bits >> 30) & 0x03) as u8) + pub fn adc_oscal_sten(&self) -> ADC_OSCAL_STEN_R { + ADC_OSCAL_STEN_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 16"] + #[doc = "Bit 2"] #[inline(always)] - pub fn dpd_sten(&self) -> DPD_STEN_R { - DPD_STEN_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn dl_rfcal_table_sten(&self) -> DL_RFCAL_TABLE_STEN_R { + DL_RFCAL_TABLE_STEN_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 15"] + #[doc = "Bit 3"] #[inline(always)] - pub fn tsencal_sten(&self) -> TSENCAL_STEN_R { - TSENCAL_STEN_R::new(((self.bits >> 15) & 0x01) != 0) + pub fn fcal_sten(&self) -> FCAL_STEN_R { + FCAL_STEN_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bit 14"] + #[doc = "Bit 4"] #[inline(always)] - pub fn pwdet_cal_sten(&self) -> PWDET_CAL_STEN_R { - PWDET_CAL_STEN_R::new(((self.bits >> 14) & 0x01) != 0) + pub fn acal_sten(&self) -> ACAL_STEN_R { + ACAL_STEN_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 13"] + #[doc = "Bit 5"] #[inline(always)] - pub fn riqcal_sten(&self) -> RIQCAL_STEN_R { - RIQCAL_STEN_R::new(((self.bits >> 13) & 0x01) != 0) + pub fn inc_fcal_sten(&self) -> INC_FCAL_STEN_R { + INC_FCAL_STEN_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 12"] + #[doc = "Bit 6"] #[inline(always)] - pub fn tiqcal_sten(&self) -> TIQCAL_STEN_R { - TIQCAL_STEN_R::new(((self.bits >> 12) & 0x01) != 0) + pub fn inc_acal_sten(&self) -> INC_ACAL_STEN_R { + INC_ACAL_STEN_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = "Bit 11"] + #[doc = "Bit 7"] #[inline(always)] - pub fn lo_leakcal_sten(&self) -> LO_LEAKCAL_STEN_R { - LO_LEAKCAL_STEN_R::new(((self.bits >> 11) & 0x01) != 0) + pub fn clkpll_cal_sten(&self) -> CLKPLL_CAL_STEN_R { + CLKPLL_CAL_STEN_R::new(((self.bits >> 7) & 1) != 0) } - #[doc = "Bit 10"] + #[doc = "Bit 8"] #[inline(always)] - pub fn rccal_sten(&self) -> RCCAL_STEN_R { - RCCAL_STEN_R::new(((self.bits >> 10) & 0x01) != 0) + pub fn roscal_sten(&self) -> ROSCAL_STEN_R { + ROSCAL_STEN_R::new(((self.bits >> 8) & 1) != 0) } #[doc = "Bit 9"] #[inline(always)] pub fn toscal_sten_resv(&self) -> TOSCAL_STEN_RESV_R { - TOSCAL_STEN_RESV_R::new(((self.bits >> 9) & 0x01) != 0) + TOSCAL_STEN_RESV_R::new(((self.bits >> 9) & 1) != 0) } - #[doc = "Bit 8"] - #[inline(always)] - pub fn roscal_sten(&self) -> ROSCAL_STEN_R { - ROSCAL_STEN_R::new(((self.bits >> 8) & 0x01) != 0) - } - #[doc = "Bit 7"] + #[doc = "Bit 10"] #[inline(always)] - pub fn clkpll_cal_sten(&self) -> CLKPLL_CAL_STEN_R { - CLKPLL_CAL_STEN_R::new(((self.bits >> 7) & 0x01) != 0) + pub fn rccal_sten(&self) -> RCCAL_STEN_R { + RCCAL_STEN_R::new(((self.bits >> 10) & 1) != 0) } - #[doc = "Bit 6"] + #[doc = "Bit 11"] #[inline(always)] - pub fn inc_acal_sten(&self) -> INC_ACAL_STEN_R { - INC_ACAL_STEN_R::new(((self.bits >> 6) & 0x01) != 0) + pub fn lo_leakcal_sten(&self) -> LO_LEAKCAL_STEN_R { + LO_LEAKCAL_STEN_R::new(((self.bits >> 11) & 1) != 0) } - #[doc = "Bit 5"] + #[doc = "Bit 12"] #[inline(always)] - pub fn inc_fcal_sten(&self) -> INC_FCAL_STEN_R { - INC_FCAL_STEN_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn tiqcal_sten(&self) -> TIQCAL_STEN_R { + TIQCAL_STEN_R::new(((self.bits >> 12) & 1) != 0) } - #[doc = "Bit 4"] + #[doc = "Bit 13"] #[inline(always)] - pub fn acal_sten(&self) -> ACAL_STEN_R { - ACAL_STEN_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn riqcal_sten(&self) -> RIQCAL_STEN_R { + RIQCAL_STEN_R::new(((self.bits >> 13) & 1) != 0) } - #[doc = "Bit 3"] + #[doc = "Bit 14"] #[inline(always)] - pub fn fcal_sten(&self) -> FCAL_STEN_R { - FCAL_STEN_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn pwdet_cal_sten(&self) -> PWDET_CAL_STEN_R { + PWDET_CAL_STEN_R::new(((self.bits >> 14) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bit 15"] #[inline(always)] - pub fn dl_rfcal_table_sten(&self) -> DL_RFCAL_TABLE_STEN_R { - DL_RFCAL_TABLE_STEN_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn tsencal_sten(&self) -> TSENCAL_STEN_R { + TSENCAL_STEN_R::new(((self.bits >> 15) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 16"] #[inline(always)] - pub fn adc_oscal_sten(&self) -> ADC_OSCAL_STEN_R { - ADC_OSCAL_STEN_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn dpd_sten(&self) -> DPD_STEN_R { + DPD_STEN_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bits 30:31"] #[inline(always)] - pub fn rcal_sten_resv(&self) -> RCAL_STEN_RESV_R { - RCAL_STEN_RESV_R::new((self.bits & 0x01) != 0) + pub fn rfcal_level(&self) -> RFCAL_LEVEL_R { + RFCAL_LEVEL_R::new(((self.bits >> 30) & 3) as u8) } } impl W { - #[doc = "Bits 30:31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn rfcal_level(&mut self) -> RFCAL_LEVEL_W { - RFCAL_LEVEL_W { w: self } + #[must_use] + pub fn rcal_sten_resv(&mut self) -> RCAL_STEN_RESV_W<0> { + RCAL_STEN_RESV_W::new(self) } - #[doc = "Bit 16"] + #[doc = "Bit 1"] #[inline(always)] - pub fn dpd_sten(&mut self) -> DPD_STEN_W { - DPD_STEN_W { w: self } + #[must_use] + pub fn adc_oscal_sten(&mut self) -> ADC_OSCAL_STEN_W<1> { + ADC_OSCAL_STEN_W::new(self) } - #[doc = "Bit 15"] + #[doc = "Bit 2"] #[inline(always)] - pub fn tsencal_sten(&mut self) -> TSENCAL_STEN_W { - TSENCAL_STEN_W { w: self } + #[must_use] + pub fn dl_rfcal_table_sten(&mut self) -> DL_RFCAL_TABLE_STEN_W<2> { + DL_RFCAL_TABLE_STEN_W::new(self) } - #[doc = "Bit 14"] + #[doc = "Bit 3"] #[inline(always)] - pub fn pwdet_cal_sten(&mut self) -> PWDET_CAL_STEN_W { - PWDET_CAL_STEN_W { w: self } + #[must_use] + pub fn fcal_sten(&mut self) -> FCAL_STEN_W<3> { + FCAL_STEN_W::new(self) } - #[doc = "Bit 13"] + #[doc = "Bit 4"] #[inline(always)] - pub fn riqcal_sten(&mut self) -> RIQCAL_STEN_W { - RIQCAL_STEN_W { w: self } + #[must_use] + pub fn acal_sten(&mut self) -> ACAL_STEN_W<4> { + ACAL_STEN_W::new(self) } - #[doc = "Bit 12"] + #[doc = "Bit 5"] #[inline(always)] - pub fn tiqcal_sten(&mut self) -> TIQCAL_STEN_W { - TIQCAL_STEN_W { w: self } + #[must_use] + pub fn inc_fcal_sten(&mut self) -> INC_FCAL_STEN_W<5> { + INC_FCAL_STEN_W::new(self) } - #[doc = "Bit 11"] + #[doc = "Bit 6"] #[inline(always)] - pub fn lo_leakcal_sten(&mut self) -> LO_LEAKCAL_STEN_W { - LO_LEAKCAL_STEN_W { w: self } + #[must_use] + pub fn inc_acal_sten(&mut self) -> INC_ACAL_STEN_W<6> { + INC_ACAL_STEN_W::new(self) } - #[doc = "Bit 10"] + #[doc = "Bit 7"] #[inline(always)] - pub fn rccal_sten(&mut self) -> RCCAL_STEN_W { - RCCAL_STEN_W { w: self } + #[must_use] + pub fn clkpll_cal_sten(&mut self) -> CLKPLL_CAL_STEN_W<7> { + CLKPLL_CAL_STEN_W::new(self) } - #[doc = "Bit 9"] + #[doc = "Bit 8"] #[inline(always)] - pub fn toscal_sten_resv(&mut self) -> TOSCAL_STEN_RESV_W { - TOSCAL_STEN_RESV_W { w: self } + #[must_use] + pub fn roscal_sten(&mut self) -> ROSCAL_STEN_W<8> { + ROSCAL_STEN_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bit 9"] #[inline(always)] - pub fn roscal_sten(&mut self) -> ROSCAL_STEN_W { - ROSCAL_STEN_W { w: self } + #[must_use] + pub fn toscal_sten_resv(&mut self) -> TOSCAL_STEN_RESV_W<9> { + TOSCAL_STEN_RESV_W::new(self) } - #[doc = "Bit 7"] + #[doc = "Bit 10"] #[inline(always)] - pub fn clkpll_cal_sten(&mut self) -> CLKPLL_CAL_STEN_W { - CLKPLL_CAL_STEN_W { w: self } + #[must_use] + pub fn rccal_sten(&mut self) -> RCCAL_STEN_W<10> { + RCCAL_STEN_W::new(self) } - #[doc = "Bit 6"] + #[doc = "Bit 11"] #[inline(always)] - pub fn inc_acal_sten(&mut self) -> INC_ACAL_STEN_W { - INC_ACAL_STEN_W { w: self } + #[must_use] + pub fn lo_leakcal_sten(&mut self) -> LO_LEAKCAL_STEN_W<11> { + LO_LEAKCAL_STEN_W::new(self) } - #[doc = "Bit 5"] + #[doc = "Bit 12"] #[inline(always)] - pub fn inc_fcal_sten(&mut self) -> INC_FCAL_STEN_W { - INC_FCAL_STEN_W { w: self } + #[must_use] + pub fn tiqcal_sten(&mut self) -> TIQCAL_STEN_W<12> { + TIQCAL_STEN_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 13"] #[inline(always)] - pub fn acal_sten(&mut self) -> ACAL_STEN_W { - ACAL_STEN_W { w: self } + #[must_use] + pub fn riqcal_sten(&mut self) -> RIQCAL_STEN_W<13> { + RIQCAL_STEN_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bit 14"] #[inline(always)] - pub fn fcal_sten(&mut self) -> FCAL_STEN_W { - FCAL_STEN_W { w: self } + #[must_use] + pub fn pwdet_cal_sten(&mut self) -> PWDET_CAL_STEN_W<14> { + PWDET_CAL_STEN_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bit 15"] #[inline(always)] - pub fn dl_rfcal_table_sten(&mut self) -> DL_RFCAL_TABLE_STEN_W { - DL_RFCAL_TABLE_STEN_W { w: self } + #[must_use] + pub fn tsencal_sten(&mut self) -> TSENCAL_STEN_W<15> { + TSENCAL_STEN_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 16"] #[inline(always)] - pub fn adc_oscal_sten(&mut self) -> ADC_OSCAL_STEN_W { - ADC_OSCAL_STEN_W { w: self } + #[must_use] + pub fn dpd_sten(&mut self) -> DPD_STEN_W<16> { + DPD_STEN_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bits 30:31"] #[inline(always)] - pub fn rcal_sten_resv(&mut self) -> RCAL_STEN_RESV_W { - RCAL_STEN_RESV_W { w: self } + #[must_use] + pub fn rfcal_level(&mut self) -> RFCAL_LEVEL_W<30> { + RFCAL_LEVEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -871,11 +331,10 @@ impl crate::Readable for RFCAL_STATEEN_SPEC { #[doc = "`write(|w| ..)` method takes [rfcal_stateen::W](W) writer structure"] impl crate::Writable for RFCAL_STATEEN_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rfcal_stateen to value 0"] impl crate::Resettable for RFCAL_STATEEN_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rfcal_status.rs b/src/rf/rfcal_status.rs index 881fe3a..cf33ab9 100644 --- a/src/rf/rfcal_status.rs +++ b/src/rf/rfcal_status.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,591 +28,273 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `dpd_status` reader - "] -pub struct DPD_STATUS_R(crate::FieldReader); -impl DPD_STATUS_R { - pub(crate) fn new(bits: u8) -> Self { - DPD_STATUS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DPD_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dpd_status` writer - "] -pub struct DPD_STATUS_W<'a> { - w: &'a mut W, -} -impl<'a> DPD_STATUS_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 30)) | ((value as u32 & 0x03) << 30); - self.w - } -} -#[doc = "Field `tenscal_status` reader - "] -pub struct TENSCAL_STATUS_R(crate::FieldReader); -impl TENSCAL_STATUS_R { - pub(crate) fn new(bits: u8) -> Self { - TENSCAL_STATUS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TENSCAL_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tenscal_status` writer - "] -pub struct TENSCAL_STATUS_W<'a> { - w: &'a mut W, -} -impl<'a> TENSCAL_STATUS_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 28)) | ((value as u32 & 0x03) << 28); - self.w - } -} -#[doc = "Field `pwdet_cal_status` reader - "] -pub struct PWDET_CAL_STATUS_R(crate::FieldReader); -impl PWDET_CAL_STATUS_R { - pub(crate) fn new(bits: u8) -> Self { - PWDET_CAL_STATUS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PWDET_CAL_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pwdet_cal_status` writer - "] -pub struct PWDET_CAL_STATUS_W<'a> { - w: &'a mut W, -} -impl<'a> PWDET_CAL_STATUS_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 26)) | ((value as u32 & 0x03) << 26); - self.w - } -} -#[doc = "Field `riqcal_status_resv` reader - "] -pub struct RIQCAL_STATUS_RESV_R(crate::FieldReader); -impl RIQCAL_STATUS_RESV_R { - pub(crate) fn new(bits: u8) -> Self { - RIQCAL_STATUS_RESV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RIQCAL_STATUS_RESV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `riqcal_status_resv` writer - "] -pub struct RIQCAL_STATUS_RESV_W<'a> { - w: &'a mut W, -} -impl<'a> RIQCAL_STATUS_RESV_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 24)) | ((value as u32 & 0x03) << 24); - self.w - } -} -#[doc = "Field `tiqcal_status_resv` reader - "] -pub struct TIQCAL_STATUS_RESV_R(crate::FieldReader); -impl TIQCAL_STATUS_RESV_R { - pub(crate) fn new(bits: u8) -> Self { - TIQCAL_STATUS_RESV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TIQCAL_STATUS_RESV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tiqcal_status_resv` writer - "] -pub struct TIQCAL_STATUS_RESV_W<'a> { - w: &'a mut W, -} -impl<'a> TIQCAL_STATUS_RESV_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 22)) | ((value as u32 & 0x03) << 22); - self.w - } -} -#[doc = "Field `lo_leakcal_status` reader - "] -pub struct LO_LEAKCAL_STATUS_R(crate::FieldReader); -impl LO_LEAKCAL_STATUS_R { - pub(crate) fn new(bits: u8) -> Self { - LO_LEAKCAL_STATUS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_LEAKCAL_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_leakcal_status` writer - "] -pub struct LO_LEAKCAL_STATUS_W<'a> { - w: &'a mut W, -} -impl<'a> LO_LEAKCAL_STATUS_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 20)) | ((value as u32 & 0x03) << 20); - self.w - } -} -#[doc = "Field `rccal_status` reader - "] -pub struct RCCAL_STATUS_R(crate::FieldReader); -impl RCCAL_STATUS_R { - pub(crate) fn new(bits: u8) -> Self { - RCCAL_STATUS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RCCAL_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rccal_status` writer - "] -pub struct RCCAL_STATUS_W<'a> { - w: &'a mut W, -} -impl<'a> RCCAL_STATUS_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 18)) | ((value as u32 & 0x03) << 18); - self.w - } -} -#[doc = "Field `tos_status` reader - "] -pub struct TOS_STATUS_R(crate::FieldReader); -impl TOS_STATUS_R { - pub(crate) fn new(bits: u8) -> Self { - TOS_STATUS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TOS_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tos_status` writer - "] -pub struct TOS_STATUS_W<'a> { - w: &'a mut W, -} -impl<'a> TOS_STATUS_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 16)) | ((value as u32 & 0x03) << 16); - self.w - } -} -#[doc = "Field `ros_status` reader - "] -pub struct ROS_STATUS_R(crate::FieldReader); -impl ROS_STATUS_R { - pub(crate) fn new(bits: u8) -> Self { - ROS_STATUS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ROS_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ros_status` writer - "] -pub struct ROS_STATUS_W<'a> { - w: &'a mut W, -} -impl<'a> ROS_STATUS_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 14)) | ((value as u32 & 0x03) << 14); - self.w - } -} -#[doc = "Field `clkpll_cal_status` reader - "] -pub struct CLKPLL_CAL_STATUS_R(crate::FieldReader); -impl CLKPLL_CAL_STATUS_R { - pub(crate) fn new(bits: u8) -> Self { - CLKPLL_CAL_STATUS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CLKPLL_CAL_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `clkpll_cal_status` writer - "] -pub struct CLKPLL_CAL_STATUS_W<'a> { - w: &'a mut W, -} -impl<'a> CLKPLL_CAL_STATUS_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 12)) | ((value as u32 & 0x03) << 12); - self.w - } -} -#[doc = "Field `inc_acal_status` reader - "] -pub struct INC_ACAL_STATUS_R(crate::FieldReader); -impl INC_ACAL_STATUS_R { - pub(crate) fn new(bits: u8) -> Self { - INC_ACAL_STATUS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for INC_ACAL_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `inc_acal_status` writer - "] -pub struct INC_ACAL_STATUS_W<'a> { - w: &'a mut W, -} -impl<'a> INC_ACAL_STATUS_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 10)) | ((value as u32 & 0x03) << 10); - self.w - } -} -#[doc = "Field `inc_fcal_status` reader - "] -pub struct INC_FCAL_STATUS_R(crate::FieldReader); -impl INC_FCAL_STATUS_R { - pub(crate) fn new(bits: u8) -> Self { - INC_FCAL_STATUS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for INC_FCAL_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `inc_fcal_status` writer - "] -pub struct INC_FCAL_STATUS_W<'a> { - w: &'a mut W, -} -impl<'a> INC_FCAL_STATUS_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} -#[doc = "Field `acal_status` reader - "] -pub struct ACAL_STATUS_R(crate::FieldReader); -impl ACAL_STATUS_R { - pub(crate) fn new(bits: u8) -> Self { - ACAL_STATUS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ACAL_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `acal_status` writer - "] -pub struct ACAL_STATUS_W<'a> { - w: &'a mut W, -} -impl<'a> ACAL_STATUS_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 6)) | ((value as u32 & 0x03) << 6); - self.w - } -} -#[doc = "Field `fcal_status` reader - "] -pub struct FCAL_STATUS_R(crate::FieldReader); -impl FCAL_STATUS_R { - pub(crate) fn new(bits: u8) -> Self { - FCAL_STATUS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for FCAL_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `fcal_status` writer - "] -pub struct FCAL_STATUS_W<'a> { - w: &'a mut W, -} -impl<'a> FCAL_STATUS_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 4)) | ((value as u32 & 0x03) << 4); - self.w - } -} -#[doc = "Field `adc_oscal_status` reader - "] -pub struct ADC_OSCAL_STATUS_R(crate::FieldReader); -impl ADC_OSCAL_STATUS_R { - pub(crate) fn new(bits: u8) -> Self { - ADC_OSCAL_STATUS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ADC_OSCAL_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `adc_oscal_status` writer - "] -pub struct ADC_OSCAL_STATUS_W<'a> { - w: &'a mut W, -} -impl<'a> ADC_OSCAL_STATUS_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 2)) | ((value as u32 & 0x03) << 2); - self.w - } -} #[doc = "Field `rcal_status` reader - "] -pub struct RCAL_STATUS_R(crate::FieldReader); -impl RCAL_STATUS_R { - pub(crate) fn new(bits: u8) -> Self { - RCAL_STATUS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RCAL_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RCAL_STATUS_R = crate::FieldReader; #[doc = "Field `rcal_status` writer - "] -pub struct RCAL_STATUS_W<'a> { - w: &'a mut W, -} -impl<'a> RCAL_STATUS_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type RCAL_STATUS_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RFCAL_STATUS_SPEC, u8, u8, 2, O>; +#[doc = "Field `adc_oscal_status` reader - "] +pub type ADC_OSCAL_STATUS_R = crate::FieldReader; +#[doc = "Field `adc_oscal_status` writer - "] +pub type ADC_OSCAL_STATUS_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RFCAL_STATUS_SPEC, u8, u8, 2, O>; +#[doc = "Field `fcal_status` reader - "] +pub type FCAL_STATUS_R = crate::FieldReader; +#[doc = "Field `fcal_status` writer - "] +pub type FCAL_STATUS_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RFCAL_STATUS_SPEC, u8, u8, 2, O>; +#[doc = "Field `acal_status` reader - "] +pub type ACAL_STATUS_R = crate::FieldReader; +#[doc = "Field `acal_status` writer - "] +pub type ACAL_STATUS_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RFCAL_STATUS_SPEC, u8, u8, 2, O>; +#[doc = "Field `inc_fcal_status` reader - "] +pub type INC_FCAL_STATUS_R = crate::FieldReader; +#[doc = "Field `inc_fcal_status` writer - "] +pub type INC_FCAL_STATUS_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RFCAL_STATUS_SPEC, u8, u8, 2, O>; +#[doc = "Field `inc_acal_status` reader - "] +pub type INC_ACAL_STATUS_R = crate::FieldReader; +#[doc = "Field `inc_acal_status` writer - "] +pub type INC_ACAL_STATUS_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RFCAL_STATUS_SPEC, u8, u8, 2, O>; +#[doc = "Field `clkpll_cal_status` reader - "] +pub type CLKPLL_CAL_STATUS_R = crate::FieldReader; +#[doc = "Field `clkpll_cal_status` writer - "] +pub type CLKPLL_CAL_STATUS_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RFCAL_STATUS_SPEC, u8, u8, 2, O>; +#[doc = "Field `ros_status` reader - "] +pub type ROS_STATUS_R = crate::FieldReader; +#[doc = "Field `ros_status` writer - "] +pub type ROS_STATUS_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RFCAL_STATUS_SPEC, u8, u8, 2, O>; +#[doc = "Field `tos_status` reader - "] +pub type TOS_STATUS_R = crate::FieldReader; +#[doc = "Field `tos_status` writer - "] +pub type TOS_STATUS_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RFCAL_STATUS_SPEC, u8, u8, 2, O>; +#[doc = "Field `rccal_status` reader - "] +pub type RCCAL_STATUS_R = crate::FieldReader; +#[doc = "Field `rccal_status` writer - "] +pub type RCCAL_STATUS_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RFCAL_STATUS_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_leakcal_status` reader - "] +pub type LO_LEAKCAL_STATUS_R = crate::FieldReader; +#[doc = "Field `lo_leakcal_status` writer - "] +pub type LO_LEAKCAL_STATUS_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RFCAL_STATUS_SPEC, u8, u8, 2, O>; +#[doc = "Field `tiqcal_status_resv` reader - "] +pub type TIQCAL_STATUS_RESV_R = crate::FieldReader; +#[doc = "Field `tiqcal_status_resv` writer - "] +pub type TIQCAL_STATUS_RESV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RFCAL_STATUS_SPEC, u8, u8, 2, O>; +#[doc = "Field `riqcal_status_resv` reader - "] +pub type RIQCAL_STATUS_RESV_R = crate::FieldReader; +#[doc = "Field `riqcal_status_resv` writer - "] +pub type RIQCAL_STATUS_RESV_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RFCAL_STATUS_SPEC, u8, u8, 2, O>; +#[doc = "Field `pwdet_cal_status` reader - "] +pub type PWDET_CAL_STATUS_R = crate::FieldReader; +#[doc = "Field `pwdet_cal_status` writer - "] +pub type PWDET_CAL_STATUS_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RFCAL_STATUS_SPEC, u8, u8, 2, O>; +#[doc = "Field `tenscal_status` reader - "] +pub type TENSCAL_STATUS_R = crate::FieldReader; +#[doc = "Field `tenscal_status` writer - "] +pub type TENSCAL_STATUS_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RFCAL_STATUS_SPEC, u8, u8, 2, O>; +#[doc = "Field `dpd_status` reader - "] +pub type DPD_STATUS_R = crate::FieldReader; +#[doc = "Field `dpd_status` writer - "] +pub type DPD_STATUS_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RFCAL_STATUS_SPEC, u8, u8, 2, O>; +impl R { + #[doc = "Bits 0:1"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w + pub fn rcal_status(&self) -> RCAL_STATUS_R { + RCAL_STATUS_R::new((self.bits & 3) as u8) } -} -impl R { - #[doc = "Bits 30:31"] + #[doc = "Bits 2:3"] #[inline(always)] - pub fn dpd_status(&self) -> DPD_STATUS_R { - DPD_STATUS_R::new(((self.bits >> 30) & 0x03) as u8) + pub fn adc_oscal_status(&self) -> ADC_OSCAL_STATUS_R { + ADC_OSCAL_STATUS_R::new(((self.bits >> 2) & 3) as u8) } - #[doc = "Bits 28:29"] + #[doc = "Bits 4:5"] #[inline(always)] - pub fn tenscal_status(&self) -> TENSCAL_STATUS_R { - TENSCAL_STATUS_R::new(((self.bits >> 28) & 0x03) as u8) + pub fn fcal_status(&self) -> FCAL_STATUS_R { + FCAL_STATUS_R::new(((self.bits >> 4) & 3) as u8) } - #[doc = "Bits 26:27"] + #[doc = "Bits 6:7"] #[inline(always)] - pub fn pwdet_cal_status(&self) -> PWDET_CAL_STATUS_R { - PWDET_CAL_STATUS_R::new(((self.bits >> 26) & 0x03) as u8) + pub fn acal_status(&self) -> ACAL_STATUS_R { + ACAL_STATUS_R::new(((self.bits >> 6) & 3) as u8) } - #[doc = "Bits 24:25"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn riqcal_status_resv(&self) -> RIQCAL_STATUS_RESV_R { - RIQCAL_STATUS_RESV_R::new(((self.bits >> 24) & 0x03) as u8) + pub fn inc_fcal_status(&self) -> INC_FCAL_STATUS_R { + INC_FCAL_STATUS_R::new(((self.bits >> 8) & 3) as u8) } - #[doc = "Bits 22:23"] + #[doc = "Bits 10:11"] #[inline(always)] - pub fn tiqcal_status_resv(&self) -> TIQCAL_STATUS_RESV_R { - TIQCAL_STATUS_RESV_R::new(((self.bits >> 22) & 0x03) as u8) + pub fn inc_acal_status(&self) -> INC_ACAL_STATUS_R { + INC_ACAL_STATUS_R::new(((self.bits >> 10) & 3) as u8) } - #[doc = "Bits 20:21"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn lo_leakcal_status(&self) -> LO_LEAKCAL_STATUS_R { - LO_LEAKCAL_STATUS_R::new(((self.bits >> 20) & 0x03) as u8) + pub fn clkpll_cal_status(&self) -> CLKPLL_CAL_STATUS_R { + CLKPLL_CAL_STATUS_R::new(((self.bits >> 12) & 3) as u8) } - #[doc = "Bits 18:19"] + #[doc = "Bits 14:15"] #[inline(always)] - pub fn rccal_status(&self) -> RCCAL_STATUS_R { - RCCAL_STATUS_R::new(((self.bits >> 18) & 0x03) as u8) + pub fn ros_status(&self) -> ROS_STATUS_R { + ROS_STATUS_R::new(((self.bits >> 14) & 3) as u8) } #[doc = "Bits 16:17"] #[inline(always)] pub fn tos_status(&self) -> TOS_STATUS_R { - TOS_STATUS_R::new(((self.bits >> 16) & 0x03) as u8) + TOS_STATUS_R::new(((self.bits >> 16) & 3) as u8) } - #[doc = "Bits 14:15"] - #[inline(always)] - pub fn ros_status(&self) -> ROS_STATUS_R { - ROS_STATUS_R::new(((self.bits >> 14) & 0x03) as u8) - } - #[doc = "Bits 12:13"] + #[doc = "Bits 18:19"] #[inline(always)] - pub fn clkpll_cal_status(&self) -> CLKPLL_CAL_STATUS_R { - CLKPLL_CAL_STATUS_R::new(((self.bits >> 12) & 0x03) as u8) + pub fn rccal_status(&self) -> RCCAL_STATUS_R { + RCCAL_STATUS_R::new(((self.bits >> 18) & 3) as u8) } - #[doc = "Bits 10:11"] + #[doc = "Bits 20:21"] #[inline(always)] - pub fn inc_acal_status(&self) -> INC_ACAL_STATUS_R { - INC_ACAL_STATUS_R::new(((self.bits >> 10) & 0x03) as u8) + pub fn lo_leakcal_status(&self) -> LO_LEAKCAL_STATUS_R { + LO_LEAKCAL_STATUS_R::new(((self.bits >> 20) & 3) as u8) } - #[doc = "Bits 8:9"] + #[doc = "Bits 22:23"] #[inline(always)] - pub fn inc_fcal_status(&self) -> INC_FCAL_STATUS_R { - INC_FCAL_STATUS_R::new(((self.bits >> 8) & 0x03) as u8) + pub fn tiqcal_status_resv(&self) -> TIQCAL_STATUS_RESV_R { + TIQCAL_STATUS_RESV_R::new(((self.bits >> 22) & 3) as u8) } - #[doc = "Bits 6:7"] + #[doc = "Bits 24:25"] #[inline(always)] - pub fn acal_status(&self) -> ACAL_STATUS_R { - ACAL_STATUS_R::new(((self.bits >> 6) & 0x03) as u8) + pub fn riqcal_status_resv(&self) -> RIQCAL_STATUS_RESV_R { + RIQCAL_STATUS_RESV_R::new(((self.bits >> 24) & 3) as u8) } - #[doc = "Bits 4:5"] + #[doc = "Bits 26:27"] #[inline(always)] - pub fn fcal_status(&self) -> FCAL_STATUS_R { - FCAL_STATUS_R::new(((self.bits >> 4) & 0x03) as u8) + pub fn pwdet_cal_status(&self) -> PWDET_CAL_STATUS_R { + PWDET_CAL_STATUS_R::new(((self.bits >> 26) & 3) as u8) } - #[doc = "Bits 2:3"] + #[doc = "Bits 28:29"] #[inline(always)] - pub fn adc_oscal_status(&self) -> ADC_OSCAL_STATUS_R { - ADC_OSCAL_STATUS_R::new(((self.bits >> 2) & 0x03) as u8) + pub fn tenscal_status(&self) -> TENSCAL_STATUS_R { + TENSCAL_STATUS_R::new(((self.bits >> 28) & 3) as u8) } - #[doc = "Bits 0:1"] + #[doc = "Bits 30:31"] #[inline(always)] - pub fn rcal_status(&self) -> RCAL_STATUS_R { - RCAL_STATUS_R::new((self.bits & 0x03) as u8) + pub fn dpd_status(&self) -> DPD_STATUS_R { + DPD_STATUS_R::new(((self.bits >> 30) & 3) as u8) } } impl W { - #[doc = "Bits 30:31"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn dpd_status(&mut self) -> DPD_STATUS_W { - DPD_STATUS_W { w: self } + #[must_use] + pub fn rcal_status(&mut self) -> RCAL_STATUS_W<0> { + RCAL_STATUS_W::new(self) } - #[doc = "Bits 28:29"] + #[doc = "Bits 2:3"] #[inline(always)] - pub fn tenscal_status(&mut self) -> TENSCAL_STATUS_W { - TENSCAL_STATUS_W { w: self } + #[must_use] + pub fn adc_oscal_status(&mut self) -> ADC_OSCAL_STATUS_W<2> { + ADC_OSCAL_STATUS_W::new(self) } - #[doc = "Bits 26:27"] + #[doc = "Bits 4:5"] #[inline(always)] - pub fn pwdet_cal_status(&mut self) -> PWDET_CAL_STATUS_W { - PWDET_CAL_STATUS_W { w: self } + #[must_use] + pub fn fcal_status(&mut self) -> FCAL_STATUS_W<4> { + FCAL_STATUS_W::new(self) } - #[doc = "Bits 24:25"] + #[doc = "Bits 6:7"] #[inline(always)] - pub fn riqcal_status_resv(&mut self) -> RIQCAL_STATUS_RESV_W { - RIQCAL_STATUS_RESV_W { w: self } + #[must_use] + pub fn acal_status(&mut self) -> ACAL_STATUS_W<6> { + ACAL_STATUS_W::new(self) } - #[doc = "Bits 22:23"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn tiqcal_status_resv(&mut self) -> TIQCAL_STATUS_RESV_W { - TIQCAL_STATUS_RESV_W { w: self } + #[must_use] + pub fn inc_fcal_status(&mut self) -> INC_FCAL_STATUS_W<8> { + INC_FCAL_STATUS_W::new(self) } - #[doc = "Bits 20:21"] + #[doc = "Bits 10:11"] #[inline(always)] - pub fn lo_leakcal_status(&mut self) -> LO_LEAKCAL_STATUS_W { - LO_LEAKCAL_STATUS_W { w: self } + #[must_use] + pub fn inc_acal_status(&mut self) -> INC_ACAL_STATUS_W<10> { + INC_ACAL_STATUS_W::new(self) } - #[doc = "Bits 18:19"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn rccal_status(&mut self) -> RCCAL_STATUS_W { - RCCAL_STATUS_W { w: self } + #[must_use] + pub fn clkpll_cal_status(&mut self) -> CLKPLL_CAL_STATUS_W<12> { + CLKPLL_CAL_STATUS_W::new(self) } - #[doc = "Bits 16:17"] + #[doc = "Bits 14:15"] #[inline(always)] - pub fn tos_status(&mut self) -> TOS_STATUS_W { - TOS_STATUS_W { w: self } + #[must_use] + pub fn ros_status(&mut self) -> ROS_STATUS_W<14> { + ROS_STATUS_W::new(self) } - #[doc = "Bits 14:15"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn ros_status(&mut self) -> ROS_STATUS_W { - ROS_STATUS_W { w: self } + #[must_use] + pub fn tos_status(&mut self) -> TOS_STATUS_W<16> { + TOS_STATUS_W::new(self) } - #[doc = "Bits 12:13"] + #[doc = "Bits 18:19"] #[inline(always)] - pub fn clkpll_cal_status(&mut self) -> CLKPLL_CAL_STATUS_W { - CLKPLL_CAL_STATUS_W { w: self } + #[must_use] + pub fn rccal_status(&mut self) -> RCCAL_STATUS_W<18> { + RCCAL_STATUS_W::new(self) } - #[doc = "Bits 10:11"] + #[doc = "Bits 20:21"] #[inline(always)] - pub fn inc_acal_status(&mut self) -> INC_ACAL_STATUS_W { - INC_ACAL_STATUS_W { w: self } + #[must_use] + pub fn lo_leakcal_status(&mut self) -> LO_LEAKCAL_STATUS_W<20> { + LO_LEAKCAL_STATUS_W::new(self) } - #[doc = "Bits 8:9"] + #[doc = "Bits 22:23"] #[inline(always)] - pub fn inc_fcal_status(&mut self) -> INC_FCAL_STATUS_W { - INC_FCAL_STATUS_W { w: self } + #[must_use] + pub fn tiqcal_status_resv(&mut self) -> TIQCAL_STATUS_RESV_W<22> { + TIQCAL_STATUS_RESV_W::new(self) } - #[doc = "Bits 6:7"] + #[doc = "Bits 24:25"] #[inline(always)] - pub fn acal_status(&mut self) -> ACAL_STATUS_W { - ACAL_STATUS_W { w: self } + #[must_use] + pub fn riqcal_status_resv(&mut self) -> RIQCAL_STATUS_RESV_W<24> { + RIQCAL_STATUS_RESV_W::new(self) } - #[doc = "Bits 4:5"] + #[doc = "Bits 26:27"] #[inline(always)] - pub fn fcal_status(&mut self) -> FCAL_STATUS_W { - FCAL_STATUS_W { w: self } + #[must_use] + pub fn pwdet_cal_status(&mut self) -> PWDET_CAL_STATUS_W<26> { + PWDET_CAL_STATUS_W::new(self) } - #[doc = "Bits 2:3"] + #[doc = "Bits 28:29"] #[inline(always)] - pub fn adc_oscal_status(&mut self) -> ADC_OSCAL_STATUS_W { - ADC_OSCAL_STATUS_W { w: self } + #[must_use] + pub fn tenscal_status(&mut self) -> TENSCAL_STATUS_W<28> { + TENSCAL_STATUS_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bits 30:31"] #[inline(always)] - pub fn rcal_status(&mut self) -> RCAL_STATUS_W { - RCAL_STATUS_W { w: self } + #[must_use] + pub fn dpd_status(&mut self) -> DPD_STATUS_W<30> { + DPD_STATUS_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -629,11 +312,10 @@ impl crate::Readable for RFCAL_STATUS_SPEC { #[doc = "`write(|w| ..)` method takes [rfcal_status::W](W) writer structure"] impl crate::Writable for RFCAL_STATUS_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rfcal_status to value 0"] impl crate::Resettable for RFCAL_STATUS_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rfcal_status2.rs b/src/rf/rfcal_status2.rs index 69fdc0a..f22ba24 100644 --- a/src/rf/rfcal_status2.rs +++ b/src/rf/rfcal_status2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `dl_rfcal_table_status` reader - "] -pub struct DL_RFCAL_TABLE_STATUS_R(crate::FieldReader); -impl DL_RFCAL_TABLE_STATUS_R { - pub(crate) fn new(bits: u8) -> Self { - DL_RFCAL_TABLE_STATUS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DL_RFCAL_TABLE_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type DL_RFCAL_TABLE_STATUS_R = crate::FieldReader; #[doc = "Field `dl_rfcal_table_status` writer - "] -pub struct DL_RFCAL_TABLE_STATUS_W<'a> { - w: &'a mut W, -} -impl<'a> DL_RFCAL_TABLE_STATUS_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w - } -} +pub type DL_RFCAL_TABLE_STATUS_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RFCAL_STATUS2_SPEC, u8, u8, 2, O>; impl R { #[doc = "Bits 0:1"] #[inline(always)] pub fn dl_rfcal_table_status(&self) -> DL_RFCAL_TABLE_STATUS_R { - DL_RFCAL_TABLE_STATUS_R::new((self.bits & 0x03) as u8) + DL_RFCAL_TABLE_STATUS_R::new((self.bits & 3) as u8) } } impl W { #[doc = "Bits 0:1"] #[inline(always)] - pub fn dl_rfcal_table_status(&mut self) -> DL_RFCAL_TABLE_STATUS_W { - DL_RFCAL_TABLE_STATUS_W { w: self } + #[must_use] + pub fn dl_rfcal_table_status(&mut self) -> DL_RFCAL_TABLE_STATUS_W<0> { + DL_RFCAL_TABLE_STATUS_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for RFCAL_STATUS2_SPEC { #[doc = "`write(|w| ..)` method takes [rfcal_status2::W](W) writer structure"] impl crate::Writable for RFCAL_STATUS2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rfcal_status2 to value 0"] impl crate::Resettable for RFCAL_STATUS2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rfctrl_hw_en.rs b/src/rf/rfctrl_hw_en.rs index 414b62b..8964302 100644 --- a/src/rf/rfctrl_hw_en.rs +++ b/src/rf/rfctrl_hw_en.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,613 +28,216 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `adda_ctrl_hw` reader - "] -pub struct ADDA_CTRL_HW_R(crate::FieldReader); -impl ADDA_CTRL_HW_R { - pub(crate) fn new(bits: bool) -> Self { - ADDA_CTRL_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ADDA_CTRL_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `adda_ctrl_hw` writer - "] -pub struct ADDA_CTRL_HW_W<'a> { - w: &'a mut W, -} -impl<'a> ADDA_CTRL_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} -#[doc = "Field `rbb_pkdet_out_rstn_ctrl_hw` reader - "] -pub struct RBB_PKDET_OUT_RSTN_CTRL_HW_R(crate::FieldReader); -impl RBB_PKDET_OUT_RSTN_CTRL_HW_R { - pub(crate) fn new(bits: bool) -> Self { - RBB_PKDET_OUT_RSTN_CTRL_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RBB_PKDET_OUT_RSTN_CTRL_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rbb_pkdet_out_rstn_ctrl_hw` writer - "] -pub struct RBB_PKDET_OUT_RSTN_CTRL_HW_W<'a> { - w: &'a mut W, -} -impl<'a> RBB_PKDET_OUT_RSTN_CTRL_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w - } -} -#[doc = "Field `rbb_pkdet_en_ctrl_hw` reader - "] -pub struct RBB_PKDET_EN_CTRL_HW_R(crate::FieldReader); -impl RBB_PKDET_EN_CTRL_HW_R { - pub(crate) fn new(bits: bool) -> Self { - RBB_PKDET_EN_CTRL_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RBB_PKDET_EN_CTRL_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rbb_pkdet_en_ctrl_hw` writer - "] -pub struct RBB_PKDET_EN_CTRL_HW_W<'a> { - w: &'a mut W, -} -impl<'a> RBB_PKDET_EN_CTRL_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); - self.w - } -} -#[doc = "Field `sdm_ctrl_hw` reader - "] -pub struct SDM_CTRL_HW_R(crate::FieldReader); -impl SDM_CTRL_HW_R { - pub(crate) fn new(bits: bool) -> Self { - SDM_CTRL_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SDM_CTRL_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sdm_ctrl_hw` writer - "] -pub struct SDM_CTRL_HW_W<'a> { - w: &'a mut W, -} -impl<'a> SDM_CTRL_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w - } -} -#[doc = "Field `inc_fcal_ctrl_en_hw` reader - "] -pub struct INC_FCAL_CTRL_EN_HW_R(crate::FieldReader); -impl INC_FCAL_CTRL_EN_HW_R { - pub(crate) fn new(bits: bool) -> Self { - INC_FCAL_CTRL_EN_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for INC_FCAL_CTRL_EN_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `inc_fcal_ctrl_en_hw` writer - "] -pub struct INC_FCAL_CTRL_EN_HW_W<'a> { - w: &'a mut W, -} -impl<'a> INC_FCAL_CTRL_EN_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `inc_acal_ctrl_en_hw` reader - "] -pub struct INC_ACAL_CTRL_EN_HW_R(crate::FieldReader); -impl INC_ACAL_CTRL_EN_HW_R { - pub(crate) fn new(bits: bool) -> Self { - INC_ACAL_CTRL_EN_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for INC_ACAL_CTRL_EN_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `inc_acal_ctrl_en_hw` writer - "] -pub struct INC_ACAL_CTRL_EN_HW_W<'a> { - w: &'a mut W, -} -impl<'a> INC_ACAL_CTRL_EN_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7); - self.w - } -} -#[doc = "Field `lo_ctrl_hw` reader - "] -pub struct LO_CTRL_HW_R(crate::FieldReader); -impl LO_CTRL_HW_R { - pub(crate) fn new(bits: bool) -> Self { - LO_CTRL_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_CTRL_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_ctrl_hw` writer - "] -pub struct LO_CTRL_HW_W<'a> { - w: &'a mut W, -} -impl<'a> LO_CTRL_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w - } -} -#[doc = "Field `trxcal_ctrl_hw` reader - "] -pub struct TRXCAL_CTRL_HW_R(crate::FieldReader); -impl TRXCAL_CTRL_HW_R { - pub(crate) fn new(bits: bool) -> Self { - TRXCAL_CTRL_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TRXCAL_CTRL_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `trxcal_ctrl_hw` writer - "] -pub struct TRXCAL_CTRL_HW_W<'a> { - w: &'a mut W, -} -impl<'a> TRXCAL_CTRL_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w - } -} -#[doc = "Field `rbb_bw_ctrl_hw` reader - "] -pub struct RBB_BW_CTRL_HW_R(crate::FieldReader); -impl RBB_BW_CTRL_HW_R { - pub(crate) fn new(bits: bool) -> Self { - RBB_BW_CTRL_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RBB_BW_CTRL_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rbb_bw_ctrl_hw` writer - "] -pub struct RBB_BW_CTRL_HW_W<'a> { - w: &'a mut W, -} -impl<'a> RBB_BW_CTRL_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} -#[doc = "Field `lna_ctrl_hw` reader - "] -pub struct LNA_CTRL_HW_R(crate::FieldReader); -impl LNA_CTRL_HW_R { - pub(crate) fn new(bits: bool) -> Self { - LNA_CTRL_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LNA_CTRL_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lna_ctrl_hw` writer - "] -pub struct LNA_CTRL_HW_W<'a> { - w: &'a mut W, -} -impl<'a> LNA_CTRL_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `tx_gain_ctrl_hw` reader - "] -pub struct TX_GAIN_CTRL_HW_R(crate::FieldReader); -impl TX_GAIN_CTRL_HW_R { - pub(crate) fn new(bits: bool) -> Self { - TX_GAIN_CTRL_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_GAIN_CTRL_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_gain_ctrl_hw` writer - "] -pub struct TX_GAIN_CTRL_HW_W<'a> { - w: &'a mut W, -} -impl<'a> TX_GAIN_CTRL_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `rx_gain_ctrl_hw` reader - "] -pub struct RX_GAIN_CTRL_HW_R(crate::FieldReader); -impl RX_GAIN_CTRL_HW_R { - pub(crate) fn new(bits: bool) -> Self { - RX_GAIN_CTRL_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_GAIN_CTRL_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_gain_ctrl_hw` writer - "] -pub struct RX_GAIN_CTRL_HW_W<'a> { - w: &'a mut W, -} -impl<'a> RX_GAIN_CTRL_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `pu_ctrl_hw` reader - "] -pub struct PU_CTRL_HW_R(crate::FieldReader); -impl PU_CTRL_HW_R { - pub(crate) fn new(bits: bool) -> Self { - PU_CTRL_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PU_CTRL_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type PU_CTRL_HW_R = crate::BitReader; #[doc = "Field `pu_ctrl_hw` writer - "] -pub struct PU_CTRL_HW_W<'a> { - w: &'a mut W, -} -impl<'a> PU_CTRL_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type PU_CTRL_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCTRL_HW_EN_SPEC, bool, O>; +#[doc = "Field `rx_gain_ctrl_hw` reader - "] +pub type RX_GAIN_CTRL_HW_R = crate::BitReader; +#[doc = "Field `rx_gain_ctrl_hw` writer - "] +pub type RX_GAIN_CTRL_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCTRL_HW_EN_SPEC, bool, O>; +#[doc = "Field `tx_gain_ctrl_hw` reader - "] +pub type TX_GAIN_CTRL_HW_R = crate::BitReader; +#[doc = "Field `tx_gain_ctrl_hw` writer - "] +pub type TX_GAIN_CTRL_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCTRL_HW_EN_SPEC, bool, O>; +#[doc = "Field `lna_ctrl_hw` reader - "] +pub type LNA_CTRL_HW_R = crate::BitReader; +#[doc = "Field `lna_ctrl_hw` writer - "] +pub type LNA_CTRL_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCTRL_HW_EN_SPEC, bool, O>; +#[doc = "Field `rbb_bw_ctrl_hw` reader - "] +pub type RBB_BW_CTRL_HW_R = crate::BitReader; +#[doc = "Field `rbb_bw_ctrl_hw` writer - "] +pub type RBB_BW_CTRL_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCTRL_HW_EN_SPEC, bool, O>; +#[doc = "Field `trxcal_ctrl_hw` reader - "] +pub type TRXCAL_CTRL_HW_R = crate::BitReader; +#[doc = "Field `trxcal_ctrl_hw` writer - "] +pub type TRXCAL_CTRL_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCTRL_HW_EN_SPEC, bool, O>; +#[doc = "Field `lo_ctrl_hw` reader - "] +pub type LO_CTRL_HW_R = crate::BitReader; +#[doc = "Field `lo_ctrl_hw` writer - "] +pub type LO_CTRL_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCTRL_HW_EN_SPEC, bool, O>; +#[doc = "Field `inc_acal_ctrl_en_hw` reader - "] +pub type INC_ACAL_CTRL_EN_HW_R = crate::BitReader; +#[doc = "Field `inc_acal_ctrl_en_hw` writer - "] +pub type INC_ACAL_CTRL_EN_HW_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RFCTRL_HW_EN_SPEC, bool, O>; +#[doc = "Field `inc_fcal_ctrl_en_hw` reader - "] +pub type INC_FCAL_CTRL_EN_HW_R = crate::BitReader; +#[doc = "Field `inc_fcal_ctrl_en_hw` writer - "] +pub type INC_FCAL_CTRL_EN_HW_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RFCTRL_HW_EN_SPEC, bool, O>; +#[doc = "Field `sdm_ctrl_hw` reader - "] +pub type SDM_CTRL_HW_R = crate::BitReader; +#[doc = "Field `sdm_ctrl_hw` writer - "] +pub type SDM_CTRL_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCTRL_HW_EN_SPEC, bool, O>; +#[doc = "Field `rbb_pkdet_en_ctrl_hw` reader - "] +pub type RBB_PKDET_EN_CTRL_HW_R = crate::BitReader; +#[doc = "Field `rbb_pkdet_en_ctrl_hw` writer - "] +pub type RBB_PKDET_EN_CTRL_HW_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RFCTRL_HW_EN_SPEC, bool, O>; +#[doc = "Field `rbb_pkdet_out_rstn_ctrl_hw` reader - "] +pub type RBB_PKDET_OUT_RSTN_CTRL_HW_R = crate::BitReader; +#[doc = "Field `rbb_pkdet_out_rstn_ctrl_hw` writer - "] +pub type RBB_PKDET_OUT_RSTN_CTRL_HW_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RFCTRL_HW_EN_SPEC, bool, O>; +#[doc = "Field `adda_ctrl_hw` reader - "] +pub type ADDA_CTRL_HW_R = crate::BitReader; +#[doc = "Field `adda_ctrl_hw` writer - "] +pub type ADDA_CTRL_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFCTRL_HW_EN_SPEC, bool, O>; impl R { - #[doc = "Bit 12"] + #[doc = "Bit 0"] #[inline(always)] - pub fn adda_ctrl_hw(&self) -> ADDA_CTRL_HW_R { - ADDA_CTRL_HW_R::new(((self.bits >> 12) & 0x01) != 0) + pub fn pu_ctrl_hw(&self) -> PU_CTRL_HW_R { + PU_CTRL_HW_R::new((self.bits & 1) != 0) } - #[doc = "Bit 11"] + #[doc = "Bit 1"] #[inline(always)] - pub fn rbb_pkdet_out_rstn_ctrl_hw(&self) -> RBB_PKDET_OUT_RSTN_CTRL_HW_R { - RBB_PKDET_OUT_RSTN_CTRL_HW_R::new(((self.bits >> 11) & 0x01) != 0) + pub fn rx_gain_ctrl_hw(&self) -> RX_GAIN_CTRL_HW_R { + RX_GAIN_CTRL_HW_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 10"] + #[doc = "Bit 2"] #[inline(always)] - pub fn rbb_pkdet_en_ctrl_hw(&self) -> RBB_PKDET_EN_CTRL_HW_R { - RBB_PKDET_EN_CTRL_HW_R::new(((self.bits >> 10) & 0x01) != 0) + pub fn tx_gain_ctrl_hw(&self) -> TX_GAIN_CTRL_HW_R { + TX_GAIN_CTRL_HW_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 9"] + #[doc = "Bit 3"] #[inline(always)] - pub fn sdm_ctrl_hw(&self) -> SDM_CTRL_HW_R { - SDM_CTRL_HW_R::new(((self.bits >> 9) & 0x01) != 0) + pub fn lna_ctrl_hw(&self) -> LNA_CTRL_HW_R { + LNA_CTRL_HW_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bit 8"] + #[doc = "Bit 4"] #[inline(always)] - pub fn inc_fcal_ctrl_en_hw(&self) -> INC_FCAL_CTRL_EN_HW_R { - INC_FCAL_CTRL_EN_HW_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn rbb_bw_ctrl_hw(&self) -> RBB_BW_CTRL_HW_R { + RBB_BW_CTRL_HW_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 7"] + #[doc = "Bit 5"] #[inline(always)] - pub fn inc_acal_ctrl_en_hw(&self) -> INC_ACAL_CTRL_EN_HW_R { - INC_ACAL_CTRL_EN_HW_R::new(((self.bits >> 7) & 0x01) != 0) + pub fn trxcal_ctrl_hw(&self) -> TRXCAL_CTRL_HW_R { + TRXCAL_CTRL_HW_R::new(((self.bits >> 5) & 1) != 0) } #[doc = "Bit 6"] #[inline(always)] pub fn lo_ctrl_hw(&self) -> LO_CTRL_HW_R { - LO_CTRL_HW_R::new(((self.bits >> 6) & 0x01) != 0) + LO_CTRL_HW_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = "Bit 5"] + #[doc = "Bit 7"] #[inline(always)] - pub fn trxcal_ctrl_hw(&self) -> TRXCAL_CTRL_HW_R { - TRXCAL_CTRL_HW_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn inc_acal_ctrl_en_hw(&self) -> INC_ACAL_CTRL_EN_HW_R { + INC_ACAL_CTRL_EN_HW_R::new(((self.bits >> 7) & 1) != 0) } - #[doc = "Bit 4"] + #[doc = "Bit 8"] #[inline(always)] - pub fn rbb_bw_ctrl_hw(&self) -> RBB_BW_CTRL_HW_R { - RBB_BW_CTRL_HW_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn inc_fcal_ctrl_en_hw(&self) -> INC_FCAL_CTRL_EN_HW_R { + INC_FCAL_CTRL_EN_HW_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bit 3"] + #[doc = "Bit 9"] #[inline(always)] - pub fn lna_ctrl_hw(&self) -> LNA_CTRL_HW_R { - LNA_CTRL_HW_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn sdm_ctrl_hw(&self) -> SDM_CTRL_HW_R { + SDM_CTRL_HW_R::new(((self.bits >> 9) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bit 10"] #[inline(always)] - pub fn tx_gain_ctrl_hw(&self) -> TX_GAIN_CTRL_HW_R { - TX_GAIN_CTRL_HW_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn rbb_pkdet_en_ctrl_hw(&self) -> RBB_PKDET_EN_CTRL_HW_R { + RBB_PKDET_EN_CTRL_HW_R::new(((self.bits >> 10) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 11"] #[inline(always)] - pub fn rx_gain_ctrl_hw(&self) -> RX_GAIN_CTRL_HW_R { - RX_GAIN_CTRL_HW_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn rbb_pkdet_out_rstn_ctrl_hw(&self) -> RBB_PKDET_OUT_RSTN_CTRL_HW_R { + RBB_PKDET_OUT_RSTN_CTRL_HW_R::new(((self.bits >> 11) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 12"] #[inline(always)] - pub fn pu_ctrl_hw(&self) -> PU_CTRL_HW_R { - PU_CTRL_HW_R::new((self.bits & 0x01) != 0) + pub fn adda_ctrl_hw(&self) -> ADDA_CTRL_HW_R { + ADDA_CTRL_HW_R::new(((self.bits >> 12) & 1) != 0) } } impl W { - #[doc = "Bit 12"] + #[doc = "Bit 0"] #[inline(always)] - pub fn adda_ctrl_hw(&mut self) -> ADDA_CTRL_HW_W { - ADDA_CTRL_HW_W { w: self } + #[must_use] + pub fn pu_ctrl_hw(&mut self) -> PU_CTRL_HW_W<0> { + PU_CTRL_HW_W::new(self) } - #[doc = "Bit 11"] + #[doc = "Bit 1"] #[inline(always)] - pub fn rbb_pkdet_out_rstn_ctrl_hw(&mut self) -> RBB_PKDET_OUT_RSTN_CTRL_HW_W { - RBB_PKDET_OUT_RSTN_CTRL_HW_W { w: self } + #[must_use] + pub fn rx_gain_ctrl_hw(&mut self) -> RX_GAIN_CTRL_HW_W<1> { + RX_GAIN_CTRL_HW_W::new(self) } - #[doc = "Bit 10"] + #[doc = "Bit 2"] #[inline(always)] - pub fn rbb_pkdet_en_ctrl_hw(&mut self) -> RBB_PKDET_EN_CTRL_HW_W { - RBB_PKDET_EN_CTRL_HW_W { w: self } + #[must_use] + pub fn tx_gain_ctrl_hw(&mut self) -> TX_GAIN_CTRL_HW_W<2> { + TX_GAIN_CTRL_HW_W::new(self) } - #[doc = "Bit 9"] + #[doc = "Bit 3"] #[inline(always)] - pub fn sdm_ctrl_hw(&mut self) -> SDM_CTRL_HW_W { - SDM_CTRL_HW_W { w: self } + #[must_use] + pub fn lna_ctrl_hw(&mut self) -> LNA_CTRL_HW_W<3> { + LNA_CTRL_HW_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bit 4"] #[inline(always)] - pub fn inc_fcal_ctrl_en_hw(&mut self) -> INC_FCAL_CTRL_EN_HW_W { - INC_FCAL_CTRL_EN_HW_W { w: self } + #[must_use] + pub fn rbb_bw_ctrl_hw(&mut self) -> RBB_BW_CTRL_HW_W<4> { + RBB_BW_CTRL_HW_W::new(self) } - #[doc = "Bit 7"] + #[doc = "Bit 5"] #[inline(always)] - pub fn inc_acal_ctrl_en_hw(&mut self) -> INC_ACAL_CTRL_EN_HW_W { - INC_ACAL_CTRL_EN_HW_W { w: self } + #[must_use] + pub fn trxcal_ctrl_hw(&mut self) -> TRXCAL_CTRL_HW_W<5> { + TRXCAL_CTRL_HW_W::new(self) } #[doc = "Bit 6"] #[inline(always)] - pub fn lo_ctrl_hw(&mut self) -> LO_CTRL_HW_W { - LO_CTRL_HW_W { w: self } + #[must_use] + pub fn lo_ctrl_hw(&mut self) -> LO_CTRL_HW_W<6> { + LO_CTRL_HW_W::new(self) } - #[doc = "Bit 5"] + #[doc = "Bit 7"] #[inline(always)] - pub fn trxcal_ctrl_hw(&mut self) -> TRXCAL_CTRL_HW_W { - TRXCAL_CTRL_HW_W { w: self } + #[must_use] + pub fn inc_acal_ctrl_en_hw(&mut self) -> INC_ACAL_CTRL_EN_HW_W<7> { + INC_ACAL_CTRL_EN_HW_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 8"] #[inline(always)] - pub fn rbb_bw_ctrl_hw(&mut self) -> RBB_BW_CTRL_HW_W { - RBB_BW_CTRL_HW_W { w: self } + #[must_use] + pub fn inc_fcal_ctrl_en_hw(&mut self) -> INC_FCAL_CTRL_EN_HW_W<8> { + INC_FCAL_CTRL_EN_HW_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bit 9"] #[inline(always)] - pub fn lna_ctrl_hw(&mut self) -> LNA_CTRL_HW_W { - LNA_CTRL_HW_W { w: self } + #[must_use] + pub fn sdm_ctrl_hw(&mut self) -> SDM_CTRL_HW_W<9> { + SDM_CTRL_HW_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bit 10"] #[inline(always)] - pub fn tx_gain_ctrl_hw(&mut self) -> TX_GAIN_CTRL_HW_W { - TX_GAIN_CTRL_HW_W { w: self } + #[must_use] + pub fn rbb_pkdet_en_ctrl_hw(&mut self) -> RBB_PKDET_EN_CTRL_HW_W<10> { + RBB_PKDET_EN_CTRL_HW_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 11"] #[inline(always)] - pub fn rx_gain_ctrl_hw(&mut self) -> RX_GAIN_CTRL_HW_W { - RX_GAIN_CTRL_HW_W { w: self } + #[must_use] + pub fn rbb_pkdet_out_rstn_ctrl_hw(&mut self) -> RBB_PKDET_OUT_RSTN_CTRL_HW_W<11> { + RBB_PKDET_OUT_RSTN_CTRL_HW_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 12"] #[inline(always)] - pub fn pu_ctrl_hw(&mut self) -> PU_CTRL_HW_W { - PU_CTRL_HW_W { w: self } + #[must_use] + pub fn adda_ctrl_hw(&mut self) -> ADDA_CTRL_HW_W<12> { + ADDA_CTRL_HW_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -651,11 +255,10 @@ impl crate::Readable for RFCTRL_HW_EN_SPEC { #[doc = "`write(|w| ..)` method takes [rfctrl_hw_en::W](W) writer structure"] impl crate::Writable for RFCTRL_HW_EN_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rfctrl_hw_en to value 0"] impl crate::Resettable for RFCTRL_HW_EN_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rfif_dfe_ctrl0.rs b/src/rf/rfif_dfe_ctrl0.rs index 183a45d..d12e74a 100644 --- a/src/rf/rfif_dfe_ctrl0.rs +++ b/src/rf/rfif_dfe_ctrl0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,885 +28,333 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `test_sel` reader - "] -pub struct TEST_SEL_R(crate::FieldReader); -impl TEST_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - TEST_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TEST_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `test_sel` writer - "] -pub struct TEST_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> TEST_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 28)) | ((value as u32 & 0x0f) << 28); - self.w - } -} -#[doc = "Field `bbmode_4s_en` reader - "] -pub struct BBMODE_4S_EN_R(crate::FieldReader); -impl BBMODE_4S_EN_R { - pub(crate) fn new(bits: bool) -> Self { - BBMODE_4S_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for BBMODE_4S_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `bbmode_4s_en` writer - "] -pub struct BBMODE_4S_EN_W<'a> { - w: &'a mut W, -} -impl<'a> BBMODE_4S_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 27)) | ((value as u32 & 0x01) << 27); - self.w - } -} -#[doc = "Field `bbmode_4s` reader - "] -pub struct BBMODE_4S_R(crate::FieldReader); -impl BBMODE_4S_R { - pub(crate) fn new(bits: bool) -> Self { - BBMODE_4S_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for BBMODE_4S_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `bbmode_4s` writer - "] -pub struct BBMODE_4S_W<'a> { - w: &'a mut W, -} -impl<'a> BBMODE_4S_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 26)) | ((value as u32 & 0x01) << 26); - self.w - } -} -#[doc = "Field `wifimode_4s_en` reader - "] -pub struct WIFIMODE_4S_EN_R(crate::FieldReader); -impl WIFIMODE_4S_EN_R { - pub(crate) fn new(bits: bool) -> Self { - WIFIMODE_4S_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for WIFIMODE_4S_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `wifimode_4s_en` writer - "] -pub struct WIFIMODE_4S_EN_W<'a> { - w: &'a mut W, -} -impl<'a> WIFIMODE_4S_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 25)) | ((value as u32 & 0x01) << 25); - self.w - } -} -#[doc = "Field `wifimode_4s` reader - "] -pub struct WIFIMODE_4S_R(crate::FieldReader); -impl WIFIMODE_4S_R { - pub(crate) fn new(bits: u8) -> Self { - WIFIMODE_4S_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for WIFIMODE_4S_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `wifimode_4s` writer - "] -pub struct WIFIMODE_4S_W<'a> { - w: &'a mut W, -} -impl<'a> WIFIMODE_4S_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 23)) | ((value as u32 & 0x03) << 23); - self.w - } -} -#[doc = "Field `rf_ch_ind_ble_4s_en` reader - "] -pub struct RF_CH_IND_BLE_4S_EN_R(crate::FieldReader); -impl RF_CH_IND_BLE_4S_EN_R { - pub(crate) fn new(bits: bool) -> Self { - RF_CH_IND_BLE_4S_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_CH_IND_BLE_4S_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_ch_ind_ble_4s_en` writer - "] -pub struct RF_CH_IND_BLE_4S_EN_W<'a> { - w: &'a mut W, -} -impl<'a> RF_CH_IND_BLE_4S_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 22)) | ((value as u32 & 0x01) << 22); - self.w - } -} -#[doc = "Field `rf_ch_ind_ble_4s` reader - "] -pub struct RF_CH_IND_BLE_4S_R(crate::FieldReader); -impl RF_CH_IND_BLE_4S_R { - pub(crate) fn new(bits: u8) -> Self { - RF_CH_IND_BLE_4S_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_CH_IND_BLE_4S_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_ch_ind_ble_4s` writer - "] -pub struct RF_CH_IND_BLE_4S_W<'a> { - w: &'a mut W, -} -impl<'a> RF_CH_IND_BLE_4S_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x7f << 15)) | ((value as u32 & 0x7f) << 15); - self.w - } -} -#[doc = "Field `pad_dac_clkout_inv_en` reader - "] -pub struct PAD_DAC_CLKOUT_INV_EN_R(crate::FieldReader); -impl PAD_DAC_CLKOUT_INV_EN_R { - pub(crate) fn new(bits: bool) -> Self { - PAD_DAC_CLKOUT_INV_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PAD_DAC_CLKOUT_INV_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pad_dac_clkout_inv_en` writer - "] -pub struct PAD_DAC_CLKOUT_INV_EN_W<'a> { - w: &'a mut W, -} -impl<'a> PAD_DAC_CLKOUT_INV_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14); - self.w - } -} -#[doc = "Field `pad_adc_clkout_inv_en` reader - "] -pub struct PAD_ADC_CLKOUT_INV_EN_R(crate::FieldReader); -impl PAD_ADC_CLKOUT_INV_EN_R { - pub(crate) fn new(bits: bool) -> Self { - PAD_ADC_CLKOUT_INV_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for PAD_ADC_CLKOUT_INV_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `pad_adc_clkout_inv_en` writer - "] -pub struct PAD_ADC_CLKOUT_INV_EN_W<'a> { - w: &'a mut W, -} -impl<'a> PAD_ADC_CLKOUT_INV_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13); - self.w - } -} -#[doc = "Field `tx_test_sel` reader - "] -pub struct TX_TEST_SEL_R(crate::FieldReader); -impl TX_TEST_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - TX_TEST_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_TEST_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_test_sel` writer - "] -pub struct TX_TEST_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> TX_TEST_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 11)) | ((value as u32 & 0x03) << 11); - self.w - } -} -#[doc = "Field `rx_test_sel` reader - "] -pub struct RX_TEST_SEL_R(crate::FieldReader); -impl RX_TEST_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - RX_TEST_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_TEST_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_test_sel` writer - "] -pub struct RX_TEST_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> RX_TEST_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 9)) | ((value as u32 & 0x03) << 9); - self.w - } -} -#[doc = "Field `tx_dfe_en_4s_en` reader - "] -pub struct TX_DFE_EN_4S_EN_R(crate::FieldReader); -impl TX_DFE_EN_4S_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TX_DFE_EN_4S_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_DFE_EN_4S_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_dfe_en_4s_en` writer - "] -pub struct TX_DFE_EN_4S_EN_W<'a> { - w: &'a mut W, -} -impl<'a> TX_DFE_EN_4S_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `tx_dfe_en_4s` reader - "] -pub struct TX_DFE_EN_4S_R(crate::FieldReader); -impl TX_DFE_EN_4S_R { - pub(crate) fn new(bits: bool) -> Self { - TX_DFE_EN_4S_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_DFE_EN_4S_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_dfe_en_4s` writer - "] -pub struct TX_DFE_EN_4S_W<'a> { - w: &'a mut W, -} -impl<'a> TX_DFE_EN_4S_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7); - self.w - } -} -#[doc = "Field `rx_dfe_en_4s_en` reader - "] -pub struct RX_DFE_EN_4S_EN_R(crate::FieldReader); -impl RX_DFE_EN_4S_EN_R { - pub(crate) fn new(bits: bool) -> Self { - RX_DFE_EN_4S_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_DFE_EN_4S_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_dfe_en_4s_en` writer - "] -pub struct RX_DFE_EN_4S_EN_W<'a> { - w: &'a mut W, -} -impl<'a> RX_DFE_EN_4S_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w - } -} -#[doc = "Field `rx_dfe_en_4s` reader - "] -pub struct RX_DFE_EN_4S_R(crate::FieldReader); -impl RX_DFE_EN_4S_R { - pub(crate) fn new(bits: bool) -> Self { - RX_DFE_EN_4S_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_DFE_EN_4S_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_dfe_en_4s` writer - "] -pub struct RX_DFE_EN_4S_W<'a> { - w: &'a mut W, -} -impl<'a> RX_DFE_EN_4S_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w - } -} -#[doc = "Field `rfckg_dac_afifo_inv` reader - "] -pub struct RFCKG_DAC_AFIFO_INV_R(crate::FieldReader); -impl RFCKG_DAC_AFIFO_INV_R { - pub(crate) fn new(bits: bool) -> Self { - RFCKG_DAC_AFIFO_INV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RFCKG_DAC_AFIFO_INV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rfckg_dac_afifo_inv` writer - "] -pub struct RFCKG_DAC_AFIFO_INV_W<'a> { - w: &'a mut W, -} -impl<'a> RFCKG_DAC_AFIFO_INV_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} -#[doc = "Field `rfckg_adc_clkout_sel` reader - "] -pub struct RFCKG_ADC_CLKOUT_SEL_R(crate::FieldReader); -impl RFCKG_ADC_CLKOUT_SEL_R { - pub(crate) fn new(bits: bool) -> Self { - RFCKG_ADC_CLKOUT_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RFCKG_ADC_CLKOUT_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rfckg_adc_clkout_sel` writer - "] -pub struct RFCKG_ADC_CLKOUT_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> RFCKG_ADC_CLKOUT_SEL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `rfckg_adc_afifo_inv` reader - "] -pub struct RFCKG_ADC_AFIFO_INV_R(crate::FieldReader); -impl RFCKG_ADC_AFIFO_INV_R { - pub(crate) fn new(bits: bool) -> Self { - RFCKG_ADC_AFIFO_INV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RFCKG_ADC_AFIFO_INV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rfckg_adc_afifo_inv` writer - "] -pub struct RFCKG_ADC_AFIFO_INV_W<'a> { - w: &'a mut W, -} -impl<'a> RFCKG_ADC_AFIFO_INV_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} +#[doc = "Field `rfckg_rxclk_4s_on` reader - "] +pub type RFCKG_RXCLK_4S_ON_R = crate::BitReader; +#[doc = "Field `rfckg_rxclk_4s_on` writer - "] +pub type RFCKG_RXCLK_4S_ON_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RFIF_DFE_CTRL0_SPEC, bool, O>; #[doc = "Field `rfckg_txclk_4s_on` reader - "] -pub struct RFCKG_TXCLK_4S_ON_R(crate::FieldReader); -impl RFCKG_TXCLK_4S_ON_R { - pub(crate) fn new(bits: bool) -> Self { - RFCKG_TXCLK_4S_ON_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RFCKG_TXCLK_4S_ON_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RFCKG_TXCLK_4S_ON_R = crate::BitReader; #[doc = "Field `rfckg_txclk_4s_on` writer - "] -pub struct RFCKG_TXCLK_4S_ON_W<'a> { - w: &'a mut W, -} -impl<'a> RFCKG_TXCLK_4S_ON_W<'a> { - #[doc = r"Sets the field bit"] +pub type RFCKG_TXCLK_4S_ON_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RFIF_DFE_CTRL0_SPEC, bool, O>; +#[doc = "Field `rfckg_adc_afifo_inv` reader - "] +pub type RFCKG_ADC_AFIFO_INV_R = crate::BitReader; +#[doc = "Field `rfckg_adc_afifo_inv` writer - "] +pub type RFCKG_ADC_AFIFO_INV_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RFIF_DFE_CTRL0_SPEC, bool, O>; +#[doc = "Field `rfckg_adc_clkout_sel` reader - "] +pub type RFCKG_ADC_CLKOUT_SEL_R = crate::BitReader; +#[doc = "Field `rfckg_adc_clkout_sel` writer - "] +pub type RFCKG_ADC_CLKOUT_SEL_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RFIF_DFE_CTRL0_SPEC, bool, O>; +#[doc = "Field `rfckg_dac_afifo_inv` reader - "] +pub type RFCKG_DAC_AFIFO_INV_R = crate::BitReader; +#[doc = "Field `rfckg_dac_afifo_inv` writer - "] +pub type RFCKG_DAC_AFIFO_INV_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RFIF_DFE_CTRL0_SPEC, bool, O>; +#[doc = "Field `rx_dfe_en_4s` reader - "] +pub type RX_DFE_EN_4S_R = crate::BitReader; +#[doc = "Field `rx_dfe_en_4s` writer - "] +pub type RX_DFE_EN_4S_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFIF_DFE_CTRL0_SPEC, bool, O>; +#[doc = "Field `rx_dfe_en_4s_en` reader - "] +pub type RX_DFE_EN_4S_EN_R = crate::BitReader; +#[doc = "Field `rx_dfe_en_4s_en` writer - "] +pub type RX_DFE_EN_4S_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RFIF_DFE_CTRL0_SPEC, bool, O>; +#[doc = "Field `tx_dfe_en_4s` reader - "] +pub type TX_DFE_EN_4S_R = crate::BitReader; +#[doc = "Field `tx_dfe_en_4s` writer - "] +pub type TX_DFE_EN_4S_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFIF_DFE_CTRL0_SPEC, bool, O>; +#[doc = "Field `tx_dfe_en_4s_en` reader - "] +pub type TX_DFE_EN_4S_EN_R = crate::BitReader; +#[doc = "Field `tx_dfe_en_4s_en` writer - "] +pub type TX_DFE_EN_4S_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RFIF_DFE_CTRL0_SPEC, bool, O>; +#[doc = "Field `rx_test_sel` reader - "] +pub type RX_TEST_SEL_R = crate::FieldReader; +#[doc = "Field `rx_test_sel` writer - "] +pub type RX_TEST_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RFIF_DFE_CTRL0_SPEC, u8, u8, 2, O>; +#[doc = "Field `tx_test_sel` reader - "] +pub type TX_TEST_SEL_R = crate::FieldReader; +#[doc = "Field `tx_test_sel` writer - "] +pub type TX_TEST_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RFIF_DFE_CTRL0_SPEC, u8, u8, 2, O>; +#[doc = "Field `pad_adc_clkout_inv_en` reader - "] +pub type PAD_ADC_CLKOUT_INV_EN_R = crate::BitReader; +#[doc = "Field `pad_adc_clkout_inv_en` writer - "] +pub type PAD_ADC_CLKOUT_INV_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RFIF_DFE_CTRL0_SPEC, bool, O>; +#[doc = "Field `pad_dac_clkout_inv_en` reader - "] +pub type PAD_DAC_CLKOUT_INV_EN_R = crate::BitReader; +#[doc = "Field `pad_dac_clkout_inv_en` writer - "] +pub type PAD_DAC_CLKOUT_INV_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RFIF_DFE_CTRL0_SPEC, bool, O>; +#[doc = "Field `rf_ch_ind_ble_4s` reader - "] +pub type RF_CH_IND_BLE_4S_R = crate::FieldReader; +#[doc = "Field `rf_ch_ind_ble_4s` writer - "] +pub type RF_CH_IND_BLE_4S_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RFIF_DFE_CTRL0_SPEC, u8, u8, 7, O>; +#[doc = "Field `rf_ch_ind_ble_4s_en` reader - "] +pub type RF_CH_IND_BLE_4S_EN_R = crate::BitReader; +#[doc = "Field `rf_ch_ind_ble_4s_en` writer - "] +pub type RF_CH_IND_BLE_4S_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RFIF_DFE_CTRL0_SPEC, bool, O>; +#[doc = "Field `wifimode_4s` reader - "] +pub type WIFIMODE_4S_R = crate::FieldReader; +#[doc = "Field `wifimode_4s` writer - "] +pub type WIFIMODE_4S_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RFIF_DFE_CTRL0_SPEC, u8, u8, 2, O>; +#[doc = "Field `wifimode_4s_en` reader - "] +pub type WIFIMODE_4S_EN_R = crate::BitReader; +#[doc = "Field `wifimode_4s_en` writer - "] +pub type WIFIMODE_4S_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RFIF_DFE_CTRL0_SPEC, bool, O>; +#[doc = "Field `bbmode_4s` reader - "] +pub type BBMODE_4S_R = crate::BitReader; +#[doc = "Field `bbmode_4s` writer - "] +pub type BBMODE_4S_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFIF_DFE_CTRL0_SPEC, bool, O>; +#[doc = "Field `bbmode_4s_en` reader - "] +pub type BBMODE_4S_EN_R = crate::BitReader; +#[doc = "Field `bbmode_4s_en` writer - "] +pub type BBMODE_4S_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RFIF_DFE_CTRL0_SPEC, bool, O>; +#[doc = "Field `test_sel` reader - "] +pub type TEST_SEL_R = crate::FieldReader; +#[doc = "Field `test_sel` writer - "] +pub type TEST_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RFIF_DFE_CTRL0_SPEC, u8, u8, 4, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn rfckg_rxclk_4s_on(&self) -> RFCKG_RXCLK_4S_ON_R { + RFCKG_RXCLK_4S_ON_R::new((self.bits & 1) != 0) } - #[doc = r"Clears the field bit"] + #[doc = "Bit 1"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn rfckg_txclk_4s_on(&self) -> RFCKG_TXCLK_4S_ON_R { + RFCKG_TXCLK_4S_ON_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = r"Writes raw bits to the field"] + #[doc = "Bit 2"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} -#[doc = "Field `rfckg_rxclk_4s_on` reader - "] -pub struct RFCKG_RXCLK_4S_ON_R(crate::FieldReader); -impl RFCKG_RXCLK_4S_ON_R { - pub(crate) fn new(bits: bool) -> Self { - RFCKG_RXCLK_4S_ON_R(crate::FieldReader::new(bits)) + pub fn rfckg_adc_afifo_inv(&self) -> RFCKG_ADC_AFIFO_INV_R { + RFCKG_ADC_AFIFO_INV_R::new(((self.bits >> 2) & 1) != 0) } -} -impl core::ops::Deref for RFCKG_RXCLK_4S_ON_R { - type Target = crate::FieldReader; + #[doc = "Bit 3"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn rfckg_adc_clkout_sel(&self) -> RFCKG_ADC_CLKOUT_SEL_R { + RFCKG_ADC_CLKOUT_SEL_R::new(((self.bits >> 3) & 1) != 0) } -} -#[doc = "Field `rfckg_rxclk_4s_on` writer - "] -pub struct RFCKG_RXCLK_4S_ON_W<'a> { - w: &'a mut W, -} -impl<'a> RFCKG_RXCLK_4S_ON_W<'a> { - #[doc = r"Sets the field bit"] + #[doc = "Bit 4"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn rfckg_dac_afifo_inv(&self) -> RFCKG_DAC_AFIFO_INV_R { + RFCKG_DAC_AFIFO_INV_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = r"Clears the field bit"] + #[doc = "Bit 5"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn rx_dfe_en_4s(&self) -> RX_DFE_EN_4S_R { + RX_DFE_EN_4S_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = r"Writes raw bits to the field"] + #[doc = "Bit 6"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn rx_dfe_en_4s_en(&self) -> RX_DFE_EN_4S_EN_R { + RX_DFE_EN_4S_EN_R::new(((self.bits >> 6) & 1) != 0) } -} -impl R { - #[doc = "Bits 28:31"] + #[doc = "Bit 7"] #[inline(always)] - pub fn test_sel(&self) -> TEST_SEL_R { - TEST_SEL_R::new(((self.bits >> 28) & 0x0f) as u8) + pub fn tx_dfe_en_4s(&self) -> TX_DFE_EN_4S_R { + TX_DFE_EN_4S_R::new(((self.bits >> 7) & 1) != 0) } - #[doc = "Bit 27"] + #[doc = "Bit 8"] #[inline(always)] - pub fn bbmode_4s_en(&self) -> BBMODE_4S_EN_R { - BBMODE_4S_EN_R::new(((self.bits >> 27) & 0x01) != 0) + pub fn tx_dfe_en_4s_en(&self) -> TX_DFE_EN_4S_EN_R { + TX_DFE_EN_4S_EN_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bit 26"] + #[doc = "Bits 9:10"] #[inline(always)] - pub fn bbmode_4s(&self) -> BBMODE_4S_R { - BBMODE_4S_R::new(((self.bits >> 26) & 0x01) != 0) + pub fn rx_test_sel(&self) -> RX_TEST_SEL_R { + RX_TEST_SEL_R::new(((self.bits >> 9) & 3) as u8) } - #[doc = "Bit 25"] + #[doc = "Bits 11:12"] #[inline(always)] - pub fn wifimode_4s_en(&self) -> WIFIMODE_4S_EN_R { - WIFIMODE_4S_EN_R::new(((self.bits >> 25) & 0x01) != 0) + pub fn tx_test_sel(&self) -> TX_TEST_SEL_R { + TX_TEST_SEL_R::new(((self.bits >> 11) & 3) as u8) } - #[doc = "Bits 23:24"] + #[doc = "Bit 13"] #[inline(always)] - pub fn wifimode_4s(&self) -> WIFIMODE_4S_R { - WIFIMODE_4S_R::new(((self.bits >> 23) & 0x03) as u8) + pub fn pad_adc_clkout_inv_en(&self) -> PAD_ADC_CLKOUT_INV_EN_R { + PAD_ADC_CLKOUT_INV_EN_R::new(((self.bits >> 13) & 1) != 0) } - #[doc = "Bit 22"] + #[doc = "Bit 14"] #[inline(always)] - pub fn rf_ch_ind_ble_4s_en(&self) -> RF_CH_IND_BLE_4S_EN_R { - RF_CH_IND_BLE_4S_EN_R::new(((self.bits >> 22) & 0x01) != 0) + pub fn pad_dac_clkout_inv_en(&self) -> PAD_DAC_CLKOUT_INV_EN_R { + PAD_DAC_CLKOUT_INV_EN_R::new(((self.bits >> 14) & 1) != 0) } #[doc = "Bits 15:21"] #[inline(always)] pub fn rf_ch_ind_ble_4s(&self) -> RF_CH_IND_BLE_4S_R { RF_CH_IND_BLE_4S_R::new(((self.bits >> 15) & 0x7f) as u8) } - #[doc = "Bit 14"] - #[inline(always)] - pub fn pad_dac_clkout_inv_en(&self) -> PAD_DAC_CLKOUT_INV_EN_R { - PAD_DAC_CLKOUT_INV_EN_R::new(((self.bits >> 14) & 0x01) != 0) - } - #[doc = "Bit 13"] - #[inline(always)] - pub fn pad_adc_clkout_inv_en(&self) -> PAD_ADC_CLKOUT_INV_EN_R { - PAD_ADC_CLKOUT_INV_EN_R::new(((self.bits >> 13) & 0x01) != 0) - } - #[doc = "Bits 11:12"] - #[inline(always)] - pub fn tx_test_sel(&self) -> TX_TEST_SEL_R { - TX_TEST_SEL_R::new(((self.bits >> 11) & 0x03) as u8) - } - #[doc = "Bits 9:10"] - #[inline(always)] - pub fn rx_test_sel(&self) -> RX_TEST_SEL_R { - RX_TEST_SEL_R::new(((self.bits >> 9) & 0x03) as u8) - } - #[doc = "Bit 8"] - #[inline(always)] - pub fn tx_dfe_en_4s_en(&self) -> TX_DFE_EN_4S_EN_R { - TX_DFE_EN_4S_EN_R::new(((self.bits >> 8) & 0x01) != 0) - } - #[doc = "Bit 7"] - #[inline(always)] - pub fn tx_dfe_en_4s(&self) -> TX_DFE_EN_4S_R { - TX_DFE_EN_4S_R::new(((self.bits >> 7) & 0x01) != 0) - } - #[doc = "Bit 6"] - #[inline(always)] - pub fn rx_dfe_en_4s_en(&self) -> RX_DFE_EN_4S_EN_R { - RX_DFE_EN_4S_EN_R::new(((self.bits >> 6) & 0x01) != 0) - } - #[doc = "Bit 5"] + #[doc = "Bit 22"] #[inline(always)] - pub fn rx_dfe_en_4s(&self) -> RX_DFE_EN_4S_R { - RX_DFE_EN_4S_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn rf_ch_ind_ble_4s_en(&self) -> RF_CH_IND_BLE_4S_EN_R { + RF_CH_IND_BLE_4S_EN_R::new(((self.bits >> 22) & 1) != 0) } - #[doc = "Bit 4"] + #[doc = "Bits 23:24"] #[inline(always)] - pub fn rfckg_dac_afifo_inv(&self) -> RFCKG_DAC_AFIFO_INV_R { - RFCKG_DAC_AFIFO_INV_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn wifimode_4s(&self) -> WIFIMODE_4S_R { + WIFIMODE_4S_R::new(((self.bits >> 23) & 3) as u8) } - #[doc = "Bit 3"] + #[doc = "Bit 25"] #[inline(always)] - pub fn rfckg_adc_clkout_sel(&self) -> RFCKG_ADC_CLKOUT_SEL_R { - RFCKG_ADC_CLKOUT_SEL_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn wifimode_4s_en(&self) -> WIFIMODE_4S_EN_R { + WIFIMODE_4S_EN_R::new(((self.bits >> 25) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bit 26"] #[inline(always)] - pub fn rfckg_adc_afifo_inv(&self) -> RFCKG_ADC_AFIFO_INV_R { - RFCKG_ADC_AFIFO_INV_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn bbmode_4s(&self) -> BBMODE_4S_R { + BBMODE_4S_R::new(((self.bits >> 26) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 27"] #[inline(always)] - pub fn rfckg_txclk_4s_on(&self) -> RFCKG_TXCLK_4S_ON_R { - RFCKG_TXCLK_4S_ON_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn bbmode_4s_en(&self) -> BBMODE_4S_EN_R { + BBMODE_4S_EN_R::new(((self.bits >> 27) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bits 28:31"] #[inline(always)] - pub fn rfckg_rxclk_4s_on(&self) -> RFCKG_RXCLK_4S_ON_R { - RFCKG_RXCLK_4S_ON_R::new((self.bits & 0x01) != 0) + pub fn test_sel(&self) -> TEST_SEL_R { + TEST_SEL_R::new(((self.bits >> 28) & 0x0f) as u8) } } impl W { - #[doc = "Bits 28:31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn test_sel(&mut self) -> TEST_SEL_W { - TEST_SEL_W { w: self } + #[must_use] + pub fn rfckg_rxclk_4s_on(&mut self) -> RFCKG_RXCLK_4S_ON_W<0> { + RFCKG_RXCLK_4S_ON_W::new(self) } - #[doc = "Bit 27"] + #[doc = "Bit 1"] #[inline(always)] - pub fn bbmode_4s_en(&mut self) -> BBMODE_4S_EN_W { - BBMODE_4S_EN_W { w: self } + #[must_use] + pub fn rfckg_txclk_4s_on(&mut self) -> RFCKG_TXCLK_4S_ON_W<1> { + RFCKG_TXCLK_4S_ON_W::new(self) } - #[doc = "Bit 26"] + #[doc = "Bit 2"] #[inline(always)] - pub fn bbmode_4s(&mut self) -> BBMODE_4S_W { - BBMODE_4S_W { w: self } + #[must_use] + pub fn rfckg_adc_afifo_inv(&mut self) -> RFCKG_ADC_AFIFO_INV_W<2> { + RFCKG_ADC_AFIFO_INV_W::new(self) } - #[doc = "Bit 25"] + #[doc = "Bit 3"] #[inline(always)] - pub fn wifimode_4s_en(&mut self) -> WIFIMODE_4S_EN_W { - WIFIMODE_4S_EN_W { w: self } + #[must_use] + pub fn rfckg_adc_clkout_sel(&mut self) -> RFCKG_ADC_CLKOUT_SEL_W<3> { + RFCKG_ADC_CLKOUT_SEL_W::new(self) } - #[doc = "Bits 23:24"] + #[doc = "Bit 4"] #[inline(always)] - pub fn wifimode_4s(&mut self) -> WIFIMODE_4S_W { - WIFIMODE_4S_W { w: self } + #[must_use] + pub fn rfckg_dac_afifo_inv(&mut self) -> RFCKG_DAC_AFIFO_INV_W<4> { + RFCKG_DAC_AFIFO_INV_W::new(self) } - #[doc = "Bit 22"] + #[doc = "Bit 5"] #[inline(always)] - pub fn rf_ch_ind_ble_4s_en(&mut self) -> RF_CH_IND_BLE_4S_EN_W { - RF_CH_IND_BLE_4S_EN_W { w: self } + #[must_use] + pub fn rx_dfe_en_4s(&mut self) -> RX_DFE_EN_4S_W<5> { + RX_DFE_EN_4S_W::new(self) } - #[doc = "Bits 15:21"] + #[doc = "Bit 6"] #[inline(always)] - pub fn rf_ch_ind_ble_4s(&mut self) -> RF_CH_IND_BLE_4S_W { - RF_CH_IND_BLE_4S_W { w: self } + #[must_use] + pub fn rx_dfe_en_4s_en(&mut self) -> RX_DFE_EN_4S_EN_W<6> { + RX_DFE_EN_4S_EN_W::new(self) } - #[doc = "Bit 14"] + #[doc = "Bit 7"] #[inline(always)] - pub fn pad_dac_clkout_inv_en(&mut self) -> PAD_DAC_CLKOUT_INV_EN_W { - PAD_DAC_CLKOUT_INV_EN_W { w: self } + #[must_use] + pub fn tx_dfe_en_4s(&mut self) -> TX_DFE_EN_4S_W<7> { + TX_DFE_EN_4S_W::new(self) } - #[doc = "Bit 13"] + #[doc = "Bit 8"] #[inline(always)] - pub fn pad_adc_clkout_inv_en(&mut self) -> PAD_ADC_CLKOUT_INV_EN_W { - PAD_ADC_CLKOUT_INV_EN_W { w: self } + #[must_use] + pub fn tx_dfe_en_4s_en(&mut self) -> TX_DFE_EN_4S_EN_W<8> { + TX_DFE_EN_4S_EN_W::new(self) } - #[doc = "Bits 11:12"] + #[doc = "Bits 9:10"] #[inline(always)] - pub fn tx_test_sel(&mut self) -> TX_TEST_SEL_W { - TX_TEST_SEL_W { w: self } + #[must_use] + pub fn rx_test_sel(&mut self) -> RX_TEST_SEL_W<9> { + RX_TEST_SEL_W::new(self) } - #[doc = "Bits 9:10"] + #[doc = "Bits 11:12"] #[inline(always)] - pub fn rx_test_sel(&mut self) -> RX_TEST_SEL_W { - RX_TEST_SEL_W { w: self } + #[must_use] + pub fn tx_test_sel(&mut self) -> TX_TEST_SEL_W<11> { + TX_TEST_SEL_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bit 13"] #[inline(always)] - pub fn tx_dfe_en_4s_en(&mut self) -> TX_DFE_EN_4S_EN_W { - TX_DFE_EN_4S_EN_W { w: self } + #[must_use] + pub fn pad_adc_clkout_inv_en(&mut self) -> PAD_ADC_CLKOUT_INV_EN_W<13> { + PAD_ADC_CLKOUT_INV_EN_W::new(self) } - #[doc = "Bit 7"] + #[doc = "Bit 14"] #[inline(always)] - pub fn tx_dfe_en_4s(&mut self) -> TX_DFE_EN_4S_W { - TX_DFE_EN_4S_W { w: self } + #[must_use] + pub fn pad_dac_clkout_inv_en(&mut self) -> PAD_DAC_CLKOUT_INV_EN_W<14> { + PAD_DAC_CLKOUT_INV_EN_W::new(self) } - #[doc = "Bit 6"] + #[doc = "Bits 15:21"] #[inline(always)] - pub fn rx_dfe_en_4s_en(&mut self) -> RX_DFE_EN_4S_EN_W { - RX_DFE_EN_4S_EN_W { w: self } + #[must_use] + pub fn rf_ch_ind_ble_4s(&mut self) -> RF_CH_IND_BLE_4S_W<15> { + RF_CH_IND_BLE_4S_W::new(self) } - #[doc = "Bit 5"] + #[doc = "Bit 22"] #[inline(always)] - pub fn rx_dfe_en_4s(&mut self) -> RX_DFE_EN_4S_W { - RX_DFE_EN_4S_W { w: self } + #[must_use] + pub fn rf_ch_ind_ble_4s_en(&mut self) -> RF_CH_IND_BLE_4S_EN_W<22> { + RF_CH_IND_BLE_4S_EN_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bits 23:24"] #[inline(always)] - pub fn rfckg_dac_afifo_inv(&mut self) -> RFCKG_DAC_AFIFO_INV_W { - RFCKG_DAC_AFIFO_INV_W { w: self } + #[must_use] + pub fn wifimode_4s(&mut self) -> WIFIMODE_4S_W<23> { + WIFIMODE_4S_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bit 25"] #[inline(always)] - pub fn rfckg_adc_clkout_sel(&mut self) -> RFCKG_ADC_CLKOUT_SEL_W { - RFCKG_ADC_CLKOUT_SEL_W { w: self } + #[must_use] + pub fn wifimode_4s_en(&mut self) -> WIFIMODE_4S_EN_W<25> { + WIFIMODE_4S_EN_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bit 26"] #[inline(always)] - pub fn rfckg_adc_afifo_inv(&mut self) -> RFCKG_ADC_AFIFO_INV_W { - RFCKG_ADC_AFIFO_INV_W { w: self } + #[must_use] + pub fn bbmode_4s(&mut self) -> BBMODE_4S_W<26> { + BBMODE_4S_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 27"] #[inline(always)] - pub fn rfckg_txclk_4s_on(&mut self) -> RFCKG_TXCLK_4S_ON_W { - RFCKG_TXCLK_4S_ON_W { w: self } + #[must_use] + pub fn bbmode_4s_en(&mut self) -> BBMODE_4S_EN_W<27> { + BBMODE_4S_EN_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bits 28:31"] #[inline(always)] - pub fn rfckg_rxclk_4s_on(&mut self) -> RFCKG_RXCLK_4S_ON_W { - RFCKG_RXCLK_4S_ON_W { w: self } + #[must_use] + pub fn test_sel(&mut self) -> TEST_SEL_W<28> { + TEST_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -923,11 +372,10 @@ impl crate::Readable for RFIF_DFE_CTRL0_SPEC { #[doc = "`write(|w| ..)` method takes [rfif_dfe_ctrl0::W](W) writer structure"] impl crate::Writable for RFIF_DFE_CTRL0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rfif_dfe_ctrl0 to value 0"] impl crate::Resettable for RFIF_DFE_CTRL0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rfif_dig_ctrl.rs b/src/rf/rfif_dig_ctrl.rs index ee4564e..825f0ac 100644 --- a/src/rf/rfif_dig_ctrl.rs +++ b/src/rf/rfif_dig_ctrl.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,317 +28,129 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rfif_ppud_manaual_en` reader - "] -pub struct RFIF_PPUD_MANAUAL_EN_R(crate::FieldReader); -impl RFIF_PPUD_MANAUAL_EN_R { - pub(crate) fn new(bits: bool) -> Self { - RFIF_PPUD_MANAUAL_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RFIF_PPUD_MANAUAL_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rfif_ppud_manaual_en` writer - "] -pub struct RFIF_PPUD_MANAUAL_EN_W<'a> { - w: &'a mut W, -} -impl<'a> RFIF_PPUD_MANAUAL_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 30)) | ((value as u32 & 0x01) << 30); - self.w - } -} -#[doc = "Field `rfif_ppud_cnt1` reader - "] -pub struct RFIF_PPUD_CNT1_R(crate::FieldReader); -impl RFIF_PPUD_CNT1_R { - pub(crate) fn new(bits: u8) -> Self { - RFIF_PPUD_CNT1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RFIF_PPUD_CNT1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rfif_ppud_cnt1` writer - "] -pub struct RFIF_PPUD_CNT1_W<'a> { - w: &'a mut W, -} -impl<'a> RFIF_PPUD_CNT1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 25)) | ((value as u32 & 0x1f) << 25); - self.w - } -} -#[doc = "Field `rfif_ppud_cnt2` reader - "] -pub struct RFIF_PPUD_CNT2_R(crate::FieldReader); -impl RFIF_PPUD_CNT2_R { - pub(crate) fn new(bits: u16) -> Self { - RFIF_PPUD_CNT2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RFIF_PPUD_CNT2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rfif_ppud_cnt2` writer - "] -pub struct RFIF_PPUD_CNT2_W<'a> { - w: &'a mut W, -} -impl<'a> RFIF_PPUD_CNT2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01ff << 16)) | ((value as u32 & 0x01ff) << 16); - self.w - } -} -#[doc = "Field `rfif_int_lo_unlocked_mask` reader - "] -pub struct RFIF_INT_LO_UNLOCKED_MASK_R(crate::FieldReader); -impl RFIF_INT_LO_UNLOCKED_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - RFIF_INT_LO_UNLOCKED_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RFIF_INT_LO_UNLOCKED_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rfif_int_lo_unlocked_mask` writer - "] -pub struct RFIF_INT_LO_UNLOCKED_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> RFIF_INT_LO_UNLOCKED_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `rfckg_rxclk_div2_mode` reader - "] -pub struct RFCKG_RXCLK_DIV2_MODE_R(crate::FieldReader); -impl RFCKG_RXCLK_DIV2_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - RFCKG_RXCLK_DIV2_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RFCKG_RXCLK_DIV2_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rfckg_rxclk_div2_mode` writer - "] -pub struct RFCKG_RXCLK_DIV2_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> RFCKG_RXCLK_DIV2_MODE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `test_gc_from_pad_en` reader - "] -pub struct TEST_GC_FROM_PAD_EN_R(crate::FieldReader); -impl TEST_GC_FROM_PAD_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TEST_GC_FROM_PAD_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TEST_GC_FROM_PAD_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `test_gc_from_pad_en` writer - "] -pub struct TEST_GC_FROM_PAD_EN_W<'a> { - w: &'a mut W, -} -impl<'a> TEST_GC_FROM_PAD_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `test_from_pad_en` reader - "] -pub struct TEST_FROM_PAD_EN_R(crate::FieldReader); -impl TEST_FROM_PAD_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TEST_FROM_PAD_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TEST_FROM_PAD_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TEST_FROM_PAD_EN_R = crate::BitReader; #[doc = "Field `test_from_pad_en` writer - "] -pub struct TEST_FROM_PAD_EN_W<'a> { - w: &'a mut W, -} -impl<'a> TEST_FROM_PAD_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type TEST_FROM_PAD_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RFIF_DIG_CTRL_SPEC, bool, O>; +#[doc = "Field `test_gc_from_pad_en` reader - "] +pub type TEST_GC_FROM_PAD_EN_R = crate::BitReader; +#[doc = "Field `test_gc_from_pad_en` writer - "] +pub type TEST_GC_FROM_PAD_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RFIF_DIG_CTRL_SPEC, bool, O>; +#[doc = "Field `rfckg_rxclk_div2_mode` reader - "] +pub type RFCKG_RXCLK_DIV2_MODE_R = crate::BitReader; +#[doc = "Field `rfckg_rxclk_div2_mode` writer - "] +pub type RFCKG_RXCLK_DIV2_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RFIF_DIG_CTRL_SPEC, bool, O>; +#[doc = "Field `rfif_int_lo_unlocked_mask` reader - "] +pub type RFIF_INT_LO_UNLOCKED_MASK_R = crate::BitReader; +#[doc = "Field `rfif_int_lo_unlocked_mask` writer - "] +pub type RFIF_INT_LO_UNLOCKED_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RFIF_DIG_CTRL_SPEC, bool, O>; +#[doc = "Field `rfif_ppud_cnt2` reader - "] +pub type RFIF_PPUD_CNT2_R = crate::FieldReader; +#[doc = "Field `rfif_ppud_cnt2` writer - "] +pub type RFIF_PPUD_CNT2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RFIF_DIG_CTRL_SPEC, u16, u16, 9, O>; +#[doc = "Field `rfif_ppud_cnt1` reader - "] +pub type RFIF_PPUD_CNT1_R = crate::FieldReader; +#[doc = "Field `rfif_ppud_cnt1` writer - "] +pub type RFIF_PPUD_CNT1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RFIF_DIG_CTRL_SPEC, u8, u8, 5, O>; +#[doc = "Field `rfif_ppud_manaual_en` reader - "] +pub type RFIF_PPUD_MANAUAL_EN_R = crate::BitReader; +#[doc = "Field `rfif_ppud_manaual_en` writer - "] +pub type RFIF_PPUD_MANAUAL_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, RFIF_DIG_CTRL_SPEC, bool, O>; impl R { - #[doc = "Bit 30"] + #[doc = "Bit 0"] #[inline(always)] - pub fn rfif_ppud_manaual_en(&self) -> RFIF_PPUD_MANAUAL_EN_R { - RFIF_PPUD_MANAUAL_EN_R::new(((self.bits >> 30) & 0x01) != 0) + pub fn test_from_pad_en(&self) -> TEST_FROM_PAD_EN_R { + TEST_FROM_PAD_EN_R::new((self.bits & 1) != 0) } - #[doc = "Bits 25:29"] + #[doc = "Bit 1"] #[inline(always)] - pub fn rfif_ppud_cnt1(&self) -> RFIF_PPUD_CNT1_R { - RFIF_PPUD_CNT1_R::new(((self.bits >> 25) & 0x1f) as u8) + pub fn test_gc_from_pad_en(&self) -> TEST_GC_FROM_PAD_EN_R { + TEST_GC_FROM_PAD_EN_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bits 16:24"] + #[doc = "Bit 2"] #[inline(always)] - pub fn rfif_ppud_cnt2(&self) -> RFIF_PPUD_CNT2_R { - RFIF_PPUD_CNT2_R::new(((self.bits >> 16) & 0x01ff) as u16) + pub fn rfckg_rxclk_div2_mode(&self) -> RFCKG_RXCLK_DIV2_MODE_R { + RFCKG_RXCLK_DIV2_MODE_R::new(((self.bits >> 2) & 1) != 0) } #[doc = "Bit 3"] #[inline(always)] pub fn rfif_int_lo_unlocked_mask(&self) -> RFIF_INT_LO_UNLOCKED_MASK_R { - RFIF_INT_LO_UNLOCKED_MASK_R::new(((self.bits >> 3) & 0x01) != 0) + RFIF_INT_LO_UNLOCKED_MASK_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bits 16:24"] #[inline(always)] - pub fn rfckg_rxclk_div2_mode(&self) -> RFCKG_RXCLK_DIV2_MODE_R { - RFCKG_RXCLK_DIV2_MODE_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn rfif_ppud_cnt2(&self) -> RFIF_PPUD_CNT2_R { + RFIF_PPUD_CNT2_R::new(((self.bits >> 16) & 0x01ff) as u16) } - #[doc = "Bit 1"] + #[doc = "Bits 25:29"] #[inline(always)] - pub fn test_gc_from_pad_en(&self) -> TEST_GC_FROM_PAD_EN_R { - TEST_GC_FROM_PAD_EN_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn rfif_ppud_cnt1(&self) -> RFIF_PPUD_CNT1_R { + RFIF_PPUD_CNT1_R::new(((self.bits >> 25) & 0x1f) as u8) } - #[doc = "Bit 0"] + #[doc = "Bit 30"] #[inline(always)] - pub fn test_from_pad_en(&self) -> TEST_FROM_PAD_EN_R { - TEST_FROM_PAD_EN_R::new((self.bits & 0x01) != 0) + pub fn rfif_ppud_manaual_en(&self) -> RFIF_PPUD_MANAUAL_EN_R { + RFIF_PPUD_MANAUAL_EN_R::new(((self.bits >> 30) & 1) != 0) } } impl W { - #[doc = "Bit 30"] + #[doc = "Bit 0"] #[inline(always)] - pub fn rfif_ppud_manaual_en(&mut self) -> RFIF_PPUD_MANAUAL_EN_W { - RFIF_PPUD_MANAUAL_EN_W { w: self } + #[must_use] + pub fn test_from_pad_en(&mut self) -> TEST_FROM_PAD_EN_W<0> { + TEST_FROM_PAD_EN_W::new(self) } - #[doc = "Bits 25:29"] + #[doc = "Bit 1"] #[inline(always)] - pub fn rfif_ppud_cnt1(&mut self) -> RFIF_PPUD_CNT1_W { - RFIF_PPUD_CNT1_W { w: self } + #[must_use] + pub fn test_gc_from_pad_en(&mut self) -> TEST_GC_FROM_PAD_EN_W<1> { + TEST_GC_FROM_PAD_EN_W::new(self) } - #[doc = "Bits 16:24"] + #[doc = "Bit 2"] #[inline(always)] - pub fn rfif_ppud_cnt2(&mut self) -> RFIF_PPUD_CNT2_W { - RFIF_PPUD_CNT2_W { w: self } + #[must_use] + pub fn rfckg_rxclk_div2_mode(&mut self) -> RFCKG_RXCLK_DIV2_MODE_W<2> { + RFCKG_RXCLK_DIV2_MODE_W::new(self) } #[doc = "Bit 3"] #[inline(always)] - pub fn rfif_int_lo_unlocked_mask(&mut self) -> RFIF_INT_LO_UNLOCKED_MASK_W { - RFIF_INT_LO_UNLOCKED_MASK_W { w: self } + #[must_use] + pub fn rfif_int_lo_unlocked_mask(&mut self) -> RFIF_INT_LO_UNLOCKED_MASK_W<3> { + RFIF_INT_LO_UNLOCKED_MASK_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bits 16:24"] #[inline(always)] - pub fn rfckg_rxclk_div2_mode(&mut self) -> RFCKG_RXCLK_DIV2_MODE_W { - RFCKG_RXCLK_DIV2_MODE_W { w: self } + #[must_use] + pub fn rfif_ppud_cnt2(&mut self) -> RFIF_PPUD_CNT2_W<16> { + RFIF_PPUD_CNT2_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bits 25:29"] #[inline(always)] - pub fn test_gc_from_pad_en(&mut self) -> TEST_GC_FROM_PAD_EN_W { - TEST_GC_FROM_PAD_EN_W { w: self } + #[must_use] + pub fn rfif_ppud_cnt1(&mut self) -> RFIF_PPUD_CNT1_W<25> { + RFIF_PPUD_CNT1_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 30"] #[inline(always)] - pub fn test_from_pad_en(&mut self) -> TEST_FROM_PAD_EN_W { - TEST_FROM_PAD_EN_W { w: self } + #[must_use] + pub fn rfif_ppud_manaual_en(&mut self) -> RFIF_PPUD_MANAUAL_EN_W<30> { + RFIF_PPUD_MANAUAL_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -355,11 +168,10 @@ impl crate::Readable for RFIF_DIG_CTRL_SPEC { #[doc = "`write(|w| ..)` method takes [rfif_dig_ctrl::W](W) writer structure"] impl crate::Writable for RFIF_DIG_CTRL_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rfif_dig_ctrl to value 0"] impl crate::Resettable for RFIF_DIG_CTRL_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rfif_test_read.rs b/src/rf/rfif_test_read.rs index 736675b..eadd492 100644 --- a/src/rf/rfif_test_read.rs +++ b/src/rf/rfif_test_read.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `test_read` reader - "] -pub struct TEST_READ_R(crate::FieldReader); -impl TEST_READ_R { - pub(crate) fn new(bits: u32) -> Self { - TEST_READ_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TEST_READ_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TEST_READ_R = crate::FieldReader; #[doc = "Field `test_read` writer - "] -pub struct TEST_READ_W<'a> { - w: &'a mut W, -} -impl<'a> TEST_READ_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type TEST_READ_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RFIF_TEST_READ_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn test_read(&self) -> TEST_READ_R { - TEST_READ_R::new((self.bits & 0xffff_ffff) as u32) + TEST_READ_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn test_read(&mut self) -> TEST_READ_W { - TEST_READ_W { w: self } + #[must_use] + pub fn test_read(&mut self) -> TEST_READ_W<0> { + TEST_READ_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for RFIF_TEST_READ_SPEC { #[doc = "`write(|w| ..)` method takes [rfif_test_read::W](W) writer structure"] impl crate::Writable for RFIF_TEST_READ_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rfif_test_read to value 0"] impl crate::Resettable for RFIF_TEST_READ_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rmxgm.rs b/src/rf/rmxgm.rs index 0417ca3..3fc9eb7 100644 --- a/src/rf/rmxgm.rs +++ b/src/rf/rmxgm.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,133 +28,62 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rmxgm_10m_mode_en` reader - "] -pub struct RMXGM_10M_MODE_EN_R(crate::FieldReader); -impl RMXGM_10M_MODE_EN_R { - pub(crate) fn new(bits: bool) -> Self { - RMXGM_10M_MODE_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RMXGM_10M_MODE_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rmxgm_10m_mode_en` writer - "] -pub struct RMXGM_10M_MODE_EN_W<'a> { - w: &'a mut W, -} -impl<'a> RMXGM_10M_MODE_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `rmxgm_bm` reader - "] -pub struct RMXGM_BM_R(crate::FieldReader); -impl RMXGM_BM_R { - pub(crate) fn new(bits: u8) -> Self { - RMXGM_BM_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RMXGM_BM_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rmxgm_bm` writer - "] -pub struct RMXGM_BM_W<'a> { - w: &'a mut W, -} -impl<'a> RMXGM_BM_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 4)) | ((value as u32 & 0x07) << 4); - self.w - } -} #[doc = "Field `rmx_bm` reader - "] -pub struct RMX_BM_R(crate::FieldReader); -impl RMX_BM_R { - pub(crate) fn new(bits: u8) -> Self { - RMX_BM_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RMX_BM_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RMX_BM_R = crate::FieldReader; #[doc = "Field `rmx_bm` writer - "] -pub struct RMX_BM_W<'a> { - w: &'a mut W, -} -impl<'a> RMX_BM_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x07) | (value as u32 & 0x07); - self.w - } -} +pub type RMX_BM_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RMXGM_SPEC, u8, u8, 3, O>; +#[doc = "Field `rmxgm_bm` reader - "] +pub type RMXGM_BM_R = crate::FieldReader; +#[doc = "Field `rmxgm_bm` writer - "] +pub type RMXGM_BM_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RMXGM_SPEC, u8, u8, 3, O>; +#[doc = "Field `rmxgm_10m_mode_en` reader - "] +pub type RMXGM_10M_MODE_EN_R = crate::BitReader; +#[doc = "Field `rmxgm_10m_mode_en` writer - "] +pub type RMXGM_10M_MODE_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RMXGM_SPEC, bool, O>; impl R { - #[doc = "Bit 8"] + #[doc = "Bits 0:2"] #[inline(always)] - pub fn rmxgm_10m_mode_en(&self) -> RMXGM_10M_MODE_EN_R { - RMXGM_10M_MODE_EN_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn rmx_bm(&self) -> RMX_BM_R { + RMX_BM_R::new((self.bits & 7) as u8) } #[doc = "Bits 4:6"] #[inline(always)] pub fn rmxgm_bm(&self) -> RMXGM_BM_R { - RMXGM_BM_R::new(((self.bits >> 4) & 0x07) as u8) + RMXGM_BM_R::new(((self.bits >> 4) & 7) as u8) } - #[doc = "Bits 0:2"] + #[doc = "Bit 8"] #[inline(always)] - pub fn rmx_bm(&self) -> RMX_BM_R { - RMX_BM_R::new((self.bits & 0x07) as u8) + pub fn rmxgm_10m_mode_en(&self) -> RMXGM_10M_MODE_EN_R { + RMXGM_10M_MODE_EN_R::new(((self.bits >> 8) & 1) != 0) } } impl W { - #[doc = "Bit 8"] + #[doc = "Bits 0:2"] #[inline(always)] - pub fn rmxgm_10m_mode_en(&mut self) -> RMXGM_10M_MODE_EN_W { - RMXGM_10M_MODE_EN_W { w: self } + #[must_use] + pub fn rmx_bm(&mut self) -> RMX_BM_W<0> { + RMX_BM_W::new(self) } #[doc = "Bits 4:6"] #[inline(always)] - pub fn rmxgm_bm(&mut self) -> RMXGM_BM_W { - RMXGM_BM_W { w: self } + #[must_use] + pub fn rmxgm_bm(&mut self) -> RMXGM_BM_W<4> { + RMXGM_BM_W::new(self) } - #[doc = "Bits 0:2"] + #[doc = "Bit 8"] #[inline(always)] - pub fn rmx_bm(&mut self) -> RMX_BM_W { - RMX_BM_W { w: self } + #[must_use] + pub fn rmxgm_10m_mode_en(&mut self) -> RMXGM_10M_MODE_EN_W<8> { + RMXGM_10M_MODE_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -171,11 +101,10 @@ impl crate::Readable for RMXGM_SPEC { #[doc = "`write(|w| ..)` method takes [rmxgm::W](W) writer structure"] impl crate::Writable for RMXGM_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rmxgm to value 0"] impl crate::Resettable for RMXGM_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rosdac_ctrl_hw1.rs b/src/rf/rosdac_ctrl_hw1.rs index 6f0d408..2a30570 100644 --- a/src/rf/rosdac_ctrl_hw1.rs +++ b/src/rf/rosdac_ctrl_hw1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,159 +28,81 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rosdac_q_gc1` reader - "] -pub struct ROSDAC_Q_GC1_R(crate::FieldReader); -impl ROSDAC_Q_GC1_R { - pub(crate) fn new(bits: u8) -> Self { - ROSDAC_Q_GC1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ROSDAC_Q_GC1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rosdac_q_gc1` writer - "] -pub struct ROSDAC_Q_GC1_W<'a> { - w: &'a mut W, -} -impl<'a> ROSDAC_Q_GC1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 24)) | ((value as u32 & 0x3f) << 24); - self.w - } -} -#[doc = "Field `rosdac_i_gc1` reader - "] -pub struct ROSDAC_I_GC1_R(crate::FieldReader); -impl ROSDAC_I_GC1_R { - pub(crate) fn new(bits: u8) -> Self { - ROSDAC_I_GC1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ROSDAC_I_GC1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rosdac_i_gc1` writer - "] -pub struct ROSDAC_I_GC1_W<'a> { - w: &'a mut W, -} -impl<'a> ROSDAC_I_GC1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 16)) | ((value as u32 & 0x3f) << 16); - self.w - } -} -#[doc = "Field `rosdac_q_gc0` reader - "] -pub struct ROSDAC_Q_GC0_R(crate::FieldReader); -impl ROSDAC_Q_GC0_R { - pub(crate) fn new(bits: u8) -> Self { - ROSDAC_Q_GC0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ROSDAC_Q_GC0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rosdac_q_gc0` writer - "] -pub struct ROSDAC_Q_GC0_W<'a> { - w: &'a mut W, -} -impl<'a> ROSDAC_Q_GC0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 8)) | ((value as u32 & 0x3f) << 8); - self.w - } -} #[doc = "Field `rosdac_i_gc0` reader - "] -pub struct ROSDAC_I_GC0_R(crate::FieldReader); -impl ROSDAC_I_GC0_R { - pub(crate) fn new(bits: u8) -> Self { - ROSDAC_I_GC0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ROSDAC_I_GC0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type ROSDAC_I_GC0_R = crate::FieldReader; #[doc = "Field `rosdac_i_gc0` writer - "] -pub struct ROSDAC_I_GC0_W<'a> { - w: &'a mut W, -} -impl<'a> ROSDAC_I_GC0_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type ROSDAC_I_GC0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, ROSDAC_CTRL_HW1_SPEC, u8, u8, 6, O>; +#[doc = "Field `rosdac_q_gc0` reader - "] +pub type ROSDAC_Q_GC0_R = crate::FieldReader; +#[doc = "Field `rosdac_q_gc0` writer - "] +pub type ROSDAC_Q_GC0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, ROSDAC_CTRL_HW1_SPEC, u8, u8, 6, O>; +#[doc = "Field `rosdac_i_gc1` reader - "] +pub type ROSDAC_I_GC1_R = crate::FieldReader; +#[doc = "Field `rosdac_i_gc1` writer - "] +pub type ROSDAC_I_GC1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, ROSDAC_CTRL_HW1_SPEC, u8, u8, 6, O>; +#[doc = "Field `rosdac_q_gc1` reader - "] +pub type ROSDAC_Q_GC1_R = crate::FieldReader; +#[doc = "Field `rosdac_q_gc1` writer - "] +pub type ROSDAC_Q_GC1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, ROSDAC_CTRL_HW1_SPEC, u8, u8, 6, O>; +impl R { + #[doc = "Bits 0:5"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x3f) | (value as u32 & 0x3f); - self.w + pub fn rosdac_i_gc0(&self) -> ROSDAC_I_GC0_R { + ROSDAC_I_GC0_R::new((self.bits & 0x3f) as u8) } -} -impl R { - #[doc = "Bits 24:29"] + #[doc = "Bits 8:13"] #[inline(always)] - pub fn rosdac_q_gc1(&self) -> ROSDAC_Q_GC1_R { - ROSDAC_Q_GC1_R::new(((self.bits >> 24) & 0x3f) as u8) + pub fn rosdac_q_gc0(&self) -> ROSDAC_Q_GC0_R { + ROSDAC_Q_GC0_R::new(((self.bits >> 8) & 0x3f) as u8) } #[doc = "Bits 16:21"] #[inline(always)] pub fn rosdac_i_gc1(&self) -> ROSDAC_I_GC1_R { ROSDAC_I_GC1_R::new(((self.bits >> 16) & 0x3f) as u8) } - #[doc = "Bits 8:13"] - #[inline(always)] - pub fn rosdac_q_gc0(&self) -> ROSDAC_Q_GC0_R { - ROSDAC_Q_GC0_R::new(((self.bits >> 8) & 0x3f) as u8) - } - #[doc = "Bits 0:5"] + #[doc = "Bits 24:29"] #[inline(always)] - pub fn rosdac_i_gc0(&self) -> ROSDAC_I_GC0_R { - ROSDAC_I_GC0_R::new((self.bits & 0x3f) as u8) + pub fn rosdac_q_gc1(&self) -> ROSDAC_Q_GC1_R { + ROSDAC_Q_GC1_R::new(((self.bits >> 24) & 0x3f) as u8) } } impl W { - #[doc = "Bits 24:29"] + #[doc = "Bits 0:5"] #[inline(always)] - pub fn rosdac_q_gc1(&mut self) -> ROSDAC_Q_GC1_W { - ROSDAC_Q_GC1_W { w: self } + #[must_use] + pub fn rosdac_i_gc0(&mut self) -> ROSDAC_I_GC0_W<0> { + ROSDAC_I_GC0_W::new(self) } - #[doc = "Bits 16:21"] + #[doc = "Bits 8:13"] #[inline(always)] - pub fn rosdac_i_gc1(&mut self) -> ROSDAC_I_GC1_W { - ROSDAC_I_GC1_W { w: self } + #[must_use] + pub fn rosdac_q_gc0(&mut self) -> ROSDAC_Q_GC0_W<8> { + ROSDAC_Q_GC0_W::new(self) } - #[doc = "Bits 8:13"] + #[doc = "Bits 16:21"] #[inline(always)] - pub fn rosdac_q_gc0(&mut self) -> ROSDAC_Q_GC0_W { - ROSDAC_Q_GC0_W { w: self } + #[must_use] + pub fn rosdac_i_gc1(&mut self) -> ROSDAC_I_GC1_W<16> { + ROSDAC_I_GC1_W::new(self) } - #[doc = "Bits 0:5"] + #[doc = "Bits 24:29"] #[inline(always)] - pub fn rosdac_i_gc0(&mut self) -> ROSDAC_I_GC0_W { - ROSDAC_I_GC0_W { w: self } + #[must_use] + pub fn rosdac_q_gc1(&mut self) -> ROSDAC_Q_GC1_W<24> { + ROSDAC_Q_GC1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -197,11 +120,10 @@ impl crate::Readable for ROSDAC_CTRL_HW1_SPEC { #[doc = "`write(|w| ..)` method takes [rosdac_ctrl_hw1::W](W) writer structure"] impl crate::Writable for ROSDAC_CTRL_HW1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rosdac_ctrl_hw1 to value 0"] impl crate::Resettable for ROSDAC_CTRL_HW1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rosdac_ctrl_hw2.rs b/src/rf/rosdac_ctrl_hw2.rs index 5db6226..8bdba06 100644 --- a/src/rf/rosdac_ctrl_hw2.rs +++ b/src/rf/rosdac_ctrl_hw2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,159 +28,81 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rosdac_q_gc3` reader - "] -pub struct ROSDAC_Q_GC3_R(crate::FieldReader); -impl ROSDAC_Q_GC3_R { - pub(crate) fn new(bits: u8) -> Self { - ROSDAC_Q_GC3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ROSDAC_Q_GC3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rosdac_q_gc3` writer - "] -pub struct ROSDAC_Q_GC3_W<'a> { - w: &'a mut W, -} -impl<'a> ROSDAC_Q_GC3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 24)) | ((value as u32 & 0x3f) << 24); - self.w - } -} -#[doc = "Field `rosdac_i_gc3` reader - "] -pub struct ROSDAC_I_GC3_R(crate::FieldReader); -impl ROSDAC_I_GC3_R { - pub(crate) fn new(bits: u8) -> Self { - ROSDAC_I_GC3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ROSDAC_I_GC3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rosdac_i_gc3` writer - "] -pub struct ROSDAC_I_GC3_W<'a> { - w: &'a mut W, -} -impl<'a> ROSDAC_I_GC3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 16)) | ((value as u32 & 0x3f) << 16); - self.w - } -} -#[doc = "Field `rosdac_q_gc2` reader - "] -pub struct ROSDAC_Q_GC2_R(crate::FieldReader); -impl ROSDAC_Q_GC2_R { - pub(crate) fn new(bits: u8) -> Self { - ROSDAC_Q_GC2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ROSDAC_Q_GC2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rosdac_q_gc2` writer - "] -pub struct ROSDAC_Q_GC2_W<'a> { - w: &'a mut W, -} -impl<'a> ROSDAC_Q_GC2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 8)) | ((value as u32 & 0x3f) << 8); - self.w - } -} #[doc = "Field `rosdac_i_gc2` reader - "] -pub struct ROSDAC_I_GC2_R(crate::FieldReader); -impl ROSDAC_I_GC2_R { - pub(crate) fn new(bits: u8) -> Self { - ROSDAC_I_GC2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ROSDAC_I_GC2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type ROSDAC_I_GC2_R = crate::FieldReader; #[doc = "Field `rosdac_i_gc2` writer - "] -pub struct ROSDAC_I_GC2_W<'a> { - w: &'a mut W, -} -impl<'a> ROSDAC_I_GC2_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type ROSDAC_I_GC2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, ROSDAC_CTRL_HW2_SPEC, u8, u8, 6, O>; +#[doc = "Field `rosdac_q_gc2` reader - "] +pub type ROSDAC_Q_GC2_R = crate::FieldReader; +#[doc = "Field `rosdac_q_gc2` writer - "] +pub type ROSDAC_Q_GC2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, ROSDAC_CTRL_HW2_SPEC, u8, u8, 6, O>; +#[doc = "Field `rosdac_i_gc3` reader - "] +pub type ROSDAC_I_GC3_R = crate::FieldReader; +#[doc = "Field `rosdac_i_gc3` writer - "] +pub type ROSDAC_I_GC3_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, ROSDAC_CTRL_HW2_SPEC, u8, u8, 6, O>; +#[doc = "Field `rosdac_q_gc3` reader - "] +pub type ROSDAC_Q_GC3_R = crate::FieldReader; +#[doc = "Field `rosdac_q_gc3` writer - "] +pub type ROSDAC_Q_GC3_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, ROSDAC_CTRL_HW2_SPEC, u8, u8, 6, O>; +impl R { + #[doc = "Bits 0:5"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x3f) | (value as u32 & 0x3f); - self.w + pub fn rosdac_i_gc2(&self) -> ROSDAC_I_GC2_R { + ROSDAC_I_GC2_R::new((self.bits & 0x3f) as u8) } -} -impl R { - #[doc = "Bits 24:29"] + #[doc = "Bits 8:13"] #[inline(always)] - pub fn rosdac_q_gc3(&self) -> ROSDAC_Q_GC3_R { - ROSDAC_Q_GC3_R::new(((self.bits >> 24) & 0x3f) as u8) + pub fn rosdac_q_gc2(&self) -> ROSDAC_Q_GC2_R { + ROSDAC_Q_GC2_R::new(((self.bits >> 8) & 0x3f) as u8) } #[doc = "Bits 16:21"] #[inline(always)] pub fn rosdac_i_gc3(&self) -> ROSDAC_I_GC3_R { ROSDAC_I_GC3_R::new(((self.bits >> 16) & 0x3f) as u8) } - #[doc = "Bits 8:13"] - #[inline(always)] - pub fn rosdac_q_gc2(&self) -> ROSDAC_Q_GC2_R { - ROSDAC_Q_GC2_R::new(((self.bits >> 8) & 0x3f) as u8) - } - #[doc = "Bits 0:5"] + #[doc = "Bits 24:29"] #[inline(always)] - pub fn rosdac_i_gc2(&self) -> ROSDAC_I_GC2_R { - ROSDAC_I_GC2_R::new((self.bits & 0x3f) as u8) + pub fn rosdac_q_gc3(&self) -> ROSDAC_Q_GC3_R { + ROSDAC_Q_GC3_R::new(((self.bits >> 24) & 0x3f) as u8) } } impl W { - #[doc = "Bits 24:29"] + #[doc = "Bits 0:5"] #[inline(always)] - pub fn rosdac_q_gc3(&mut self) -> ROSDAC_Q_GC3_W { - ROSDAC_Q_GC3_W { w: self } + #[must_use] + pub fn rosdac_i_gc2(&mut self) -> ROSDAC_I_GC2_W<0> { + ROSDAC_I_GC2_W::new(self) } - #[doc = "Bits 16:21"] + #[doc = "Bits 8:13"] #[inline(always)] - pub fn rosdac_i_gc3(&mut self) -> ROSDAC_I_GC3_W { - ROSDAC_I_GC3_W { w: self } + #[must_use] + pub fn rosdac_q_gc2(&mut self) -> ROSDAC_Q_GC2_W<8> { + ROSDAC_Q_GC2_W::new(self) } - #[doc = "Bits 8:13"] + #[doc = "Bits 16:21"] #[inline(always)] - pub fn rosdac_q_gc2(&mut self) -> ROSDAC_Q_GC2_W { - ROSDAC_Q_GC2_W { w: self } + #[must_use] + pub fn rosdac_i_gc3(&mut self) -> ROSDAC_I_GC3_W<16> { + ROSDAC_I_GC3_W::new(self) } - #[doc = "Bits 0:5"] + #[doc = "Bits 24:29"] #[inline(always)] - pub fn rosdac_i_gc2(&mut self) -> ROSDAC_I_GC2_W { - ROSDAC_I_GC2_W { w: self } + #[must_use] + pub fn rosdac_q_gc3(&mut self) -> ROSDAC_Q_GC3_W<24> { + ROSDAC_Q_GC3_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -197,11 +120,10 @@ impl crate::Readable for ROSDAC_CTRL_HW2_SPEC { #[doc = "`write(|w| ..)` method takes [rosdac_ctrl_hw2::W](W) writer structure"] impl crate::Writable for ROSDAC_CTRL_HW2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rosdac_ctrl_hw2 to value 0"] impl crate::Resettable for ROSDAC_CTRL_HW2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rrf_gain_index1.rs b/src/rf/rrf_gain_index1.rs index 9a21a5a..25e3a67 100644 --- a/src/rf/rrf_gain_index1.rs +++ b/src/rf/rrf_gain_index1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,447 +28,209 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `gain_ctrl5_gc_lna` reader - "] -pub struct GAIN_CTRL5_GC_LNA_R(crate::FieldReader); -impl GAIN_CTRL5_GC_LNA_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL5_GC_LNA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL5_GC_LNA_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl5_gc_lna` writer - "] -pub struct GAIN_CTRL5_GC_LNA_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL5_GC_LNA_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 27)) | ((value as u32 & 0x07) << 27); - self.w - } -} -#[doc = "Field `gain_ctrl5_gc_rmxgm` reader - "] -pub struct GAIN_CTRL5_GC_RMXGM_R(crate::FieldReader); -impl GAIN_CTRL5_GC_RMXGM_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL5_GC_RMXGM_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL5_GC_RMXGM_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl5_gc_rmxgm` writer - "] -pub struct GAIN_CTRL5_GC_RMXGM_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL5_GC_RMXGM_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 25)) | ((value as u32 & 0x03) << 25); - self.w - } -} -#[doc = "Field `gain_ctrl4_gc_lna` reader - "] -pub struct GAIN_CTRL4_GC_LNA_R(crate::FieldReader); -impl GAIN_CTRL4_GC_LNA_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL4_GC_LNA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL4_GC_LNA_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl4_gc_lna` writer - "] -pub struct GAIN_CTRL4_GC_LNA_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL4_GC_LNA_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 22)) | ((value as u32 & 0x07) << 22); - self.w - } -} -#[doc = "Field `gain_ctrl4_gc_rmxgm` reader - "] -pub struct GAIN_CTRL4_GC_RMXGM_R(crate::FieldReader); -impl GAIN_CTRL4_GC_RMXGM_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL4_GC_RMXGM_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL4_GC_RMXGM_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl4_gc_rmxgm` writer - "] -pub struct GAIN_CTRL4_GC_RMXGM_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL4_GC_RMXGM_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 20)) | ((value as u32 & 0x03) << 20); - self.w - } -} -#[doc = "Field `gain_ctrl3_gc_lna` reader - "] -pub struct GAIN_CTRL3_GC_LNA_R(crate::FieldReader); -impl GAIN_CTRL3_GC_LNA_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL3_GC_LNA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL3_GC_LNA_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl3_gc_lna` writer - "] -pub struct GAIN_CTRL3_GC_LNA_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL3_GC_LNA_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 17)) | ((value as u32 & 0x07) << 17); - self.w - } -} -#[doc = "Field `gain_ctrl3_gc_rmxgm` reader - "] -pub struct GAIN_CTRL3_GC_RMXGM_R(crate::FieldReader); -impl GAIN_CTRL3_GC_RMXGM_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL3_GC_RMXGM_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL3_GC_RMXGM_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl3_gc_rmxgm` writer - "] -pub struct GAIN_CTRL3_GC_RMXGM_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL3_GC_RMXGM_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 15)) | ((value as u32 & 0x03) << 15); - self.w - } -} -#[doc = "Field `gain_ctrl2_gc_lna` reader - "] -pub struct GAIN_CTRL2_GC_LNA_R(crate::FieldReader); -impl GAIN_CTRL2_GC_LNA_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL2_GC_LNA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL2_GC_LNA_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl2_gc_lna` writer - "] -pub struct GAIN_CTRL2_GC_LNA_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL2_GC_LNA_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 12)) | ((value as u32 & 0x07) << 12); - self.w - } -} -#[doc = "Field `gain_ctrl2_gc_rmxgm` reader - "] -pub struct GAIN_CTRL2_GC_RMXGM_R(crate::FieldReader); -impl GAIN_CTRL2_GC_RMXGM_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL2_GC_RMXGM_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL2_GC_RMXGM_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl2_gc_rmxgm` writer - "] -pub struct GAIN_CTRL2_GC_RMXGM_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL2_GC_RMXGM_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 10)) | ((value as u32 & 0x03) << 10); - self.w - } -} -#[doc = "Field `gain_ctrl1_gc_lna` reader - "] -pub struct GAIN_CTRL1_GC_LNA_R(crate::FieldReader); -impl GAIN_CTRL1_GC_LNA_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL1_GC_LNA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL1_GC_LNA_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl1_gc_lna` writer - "] -pub struct GAIN_CTRL1_GC_LNA_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL1_GC_LNA_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 7)) | ((value as u32 & 0x07) << 7); - self.w - } -} -#[doc = "Field `gain_ctrl1_gc_rmxgm` reader - "] -pub struct GAIN_CTRL1_GC_RMXGM_R(crate::FieldReader); -impl GAIN_CTRL1_GC_RMXGM_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL1_GC_RMXGM_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL1_GC_RMXGM_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl1_gc_rmxgm` writer - "] -pub struct GAIN_CTRL1_GC_RMXGM_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL1_GC_RMXGM_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 5)) | ((value as u32 & 0x03) << 5); - self.w - } -} -#[doc = "Field `gain_ctrl0_gc_lna` reader - "] -pub struct GAIN_CTRL0_GC_LNA_R(crate::FieldReader); -impl GAIN_CTRL0_GC_LNA_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL0_GC_LNA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL0_GC_LNA_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl0_gc_lna` writer - "] -pub struct GAIN_CTRL0_GC_LNA_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL0_GC_LNA_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 2)) | ((value as u32 & 0x07) << 2); - self.w - } -} #[doc = "Field `gain_ctrl0_gc_rmxgm` reader - "] -pub struct GAIN_CTRL0_GC_RMXGM_R(crate::FieldReader); -impl GAIN_CTRL0_GC_RMXGM_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL0_GC_RMXGM_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL0_GC_RMXGM_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type GAIN_CTRL0_GC_RMXGM_R = crate::FieldReader; #[doc = "Field `gain_ctrl0_gc_rmxgm` writer - "] -pub struct GAIN_CTRL0_GC_RMXGM_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL0_GC_RMXGM_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type GAIN_CTRL0_GC_RMXGM_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RRF_GAIN_INDEX1_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl0_gc_lna` reader - "] +pub type GAIN_CTRL0_GC_LNA_R = crate::FieldReader; +#[doc = "Field `gain_ctrl0_gc_lna` writer - "] +pub type GAIN_CTRL0_GC_LNA_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RRF_GAIN_INDEX1_SPEC, u8, u8, 3, O>; +#[doc = "Field `gain_ctrl1_gc_rmxgm` reader - "] +pub type GAIN_CTRL1_GC_RMXGM_R = crate::FieldReader; +#[doc = "Field `gain_ctrl1_gc_rmxgm` writer - "] +pub type GAIN_CTRL1_GC_RMXGM_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RRF_GAIN_INDEX1_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl1_gc_lna` reader - "] +pub type GAIN_CTRL1_GC_LNA_R = crate::FieldReader; +#[doc = "Field `gain_ctrl1_gc_lna` writer - "] +pub type GAIN_CTRL1_GC_LNA_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RRF_GAIN_INDEX1_SPEC, u8, u8, 3, O>; +#[doc = "Field `gain_ctrl2_gc_rmxgm` reader - "] +pub type GAIN_CTRL2_GC_RMXGM_R = crate::FieldReader; +#[doc = "Field `gain_ctrl2_gc_rmxgm` writer - "] +pub type GAIN_CTRL2_GC_RMXGM_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RRF_GAIN_INDEX1_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl2_gc_lna` reader - "] +pub type GAIN_CTRL2_GC_LNA_R = crate::FieldReader; +#[doc = "Field `gain_ctrl2_gc_lna` writer - "] +pub type GAIN_CTRL2_GC_LNA_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RRF_GAIN_INDEX1_SPEC, u8, u8, 3, O>; +#[doc = "Field `gain_ctrl3_gc_rmxgm` reader - "] +pub type GAIN_CTRL3_GC_RMXGM_R = crate::FieldReader; +#[doc = "Field `gain_ctrl3_gc_rmxgm` writer - "] +pub type GAIN_CTRL3_GC_RMXGM_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RRF_GAIN_INDEX1_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl3_gc_lna` reader - "] +pub type GAIN_CTRL3_GC_LNA_R = crate::FieldReader; +#[doc = "Field `gain_ctrl3_gc_lna` writer - "] +pub type GAIN_CTRL3_GC_LNA_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RRF_GAIN_INDEX1_SPEC, u8, u8, 3, O>; +#[doc = "Field `gain_ctrl4_gc_rmxgm` reader - "] +pub type GAIN_CTRL4_GC_RMXGM_R = crate::FieldReader; +#[doc = "Field `gain_ctrl4_gc_rmxgm` writer - "] +pub type GAIN_CTRL4_GC_RMXGM_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RRF_GAIN_INDEX1_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl4_gc_lna` reader - "] +pub type GAIN_CTRL4_GC_LNA_R = crate::FieldReader; +#[doc = "Field `gain_ctrl4_gc_lna` writer - "] +pub type GAIN_CTRL4_GC_LNA_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RRF_GAIN_INDEX1_SPEC, u8, u8, 3, O>; +#[doc = "Field `gain_ctrl5_gc_rmxgm` reader - "] +pub type GAIN_CTRL5_GC_RMXGM_R = crate::FieldReader; +#[doc = "Field `gain_ctrl5_gc_rmxgm` writer - "] +pub type GAIN_CTRL5_GC_RMXGM_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RRF_GAIN_INDEX1_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl5_gc_lna` reader - "] +pub type GAIN_CTRL5_GC_LNA_R = crate::FieldReader; +#[doc = "Field `gain_ctrl5_gc_lna` writer - "] +pub type GAIN_CTRL5_GC_LNA_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RRF_GAIN_INDEX1_SPEC, u8, u8, 3, O>; +impl R { + #[doc = "Bits 0:1"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w + pub fn gain_ctrl0_gc_rmxgm(&self) -> GAIN_CTRL0_GC_RMXGM_R { + GAIN_CTRL0_GC_RMXGM_R::new((self.bits & 3) as u8) } -} -impl R { - #[doc = "Bits 27:29"] + #[doc = "Bits 2:4"] #[inline(always)] - pub fn gain_ctrl5_gc_lna(&self) -> GAIN_CTRL5_GC_LNA_R { - GAIN_CTRL5_GC_LNA_R::new(((self.bits >> 27) & 0x07) as u8) + pub fn gain_ctrl0_gc_lna(&self) -> GAIN_CTRL0_GC_LNA_R { + GAIN_CTRL0_GC_LNA_R::new(((self.bits >> 2) & 7) as u8) } - #[doc = "Bits 25:26"] + #[doc = "Bits 5:6"] #[inline(always)] - pub fn gain_ctrl5_gc_rmxgm(&self) -> GAIN_CTRL5_GC_RMXGM_R { - GAIN_CTRL5_GC_RMXGM_R::new(((self.bits >> 25) & 0x03) as u8) + pub fn gain_ctrl1_gc_rmxgm(&self) -> GAIN_CTRL1_GC_RMXGM_R { + GAIN_CTRL1_GC_RMXGM_R::new(((self.bits >> 5) & 3) as u8) } - #[doc = "Bits 22:24"] + #[doc = "Bits 7:9"] #[inline(always)] - pub fn gain_ctrl4_gc_lna(&self) -> GAIN_CTRL4_GC_LNA_R { - GAIN_CTRL4_GC_LNA_R::new(((self.bits >> 22) & 0x07) as u8) + pub fn gain_ctrl1_gc_lna(&self) -> GAIN_CTRL1_GC_LNA_R { + GAIN_CTRL1_GC_LNA_R::new(((self.bits >> 7) & 7) as u8) } - #[doc = "Bits 20:21"] + #[doc = "Bits 10:11"] #[inline(always)] - pub fn gain_ctrl4_gc_rmxgm(&self) -> GAIN_CTRL4_GC_RMXGM_R { - GAIN_CTRL4_GC_RMXGM_R::new(((self.bits >> 20) & 0x03) as u8) + pub fn gain_ctrl2_gc_rmxgm(&self) -> GAIN_CTRL2_GC_RMXGM_R { + GAIN_CTRL2_GC_RMXGM_R::new(((self.bits >> 10) & 3) as u8) } - #[doc = "Bits 17:19"] + #[doc = "Bits 12:14"] #[inline(always)] - pub fn gain_ctrl3_gc_lna(&self) -> GAIN_CTRL3_GC_LNA_R { - GAIN_CTRL3_GC_LNA_R::new(((self.bits >> 17) & 0x07) as u8) + pub fn gain_ctrl2_gc_lna(&self) -> GAIN_CTRL2_GC_LNA_R { + GAIN_CTRL2_GC_LNA_R::new(((self.bits >> 12) & 7) as u8) } #[doc = "Bits 15:16"] #[inline(always)] pub fn gain_ctrl3_gc_rmxgm(&self) -> GAIN_CTRL3_GC_RMXGM_R { - GAIN_CTRL3_GC_RMXGM_R::new(((self.bits >> 15) & 0x03) as u8) - } - #[doc = "Bits 12:14"] - #[inline(always)] - pub fn gain_ctrl2_gc_lna(&self) -> GAIN_CTRL2_GC_LNA_R { - GAIN_CTRL2_GC_LNA_R::new(((self.bits >> 12) & 0x07) as u8) + GAIN_CTRL3_GC_RMXGM_R::new(((self.bits >> 15) & 3) as u8) } - #[doc = "Bits 10:11"] + #[doc = "Bits 17:19"] #[inline(always)] - pub fn gain_ctrl2_gc_rmxgm(&self) -> GAIN_CTRL2_GC_RMXGM_R { - GAIN_CTRL2_GC_RMXGM_R::new(((self.bits >> 10) & 0x03) as u8) + pub fn gain_ctrl3_gc_lna(&self) -> GAIN_CTRL3_GC_LNA_R { + GAIN_CTRL3_GC_LNA_R::new(((self.bits >> 17) & 7) as u8) } - #[doc = "Bits 7:9"] + #[doc = "Bits 20:21"] #[inline(always)] - pub fn gain_ctrl1_gc_lna(&self) -> GAIN_CTRL1_GC_LNA_R { - GAIN_CTRL1_GC_LNA_R::new(((self.bits >> 7) & 0x07) as u8) + pub fn gain_ctrl4_gc_rmxgm(&self) -> GAIN_CTRL4_GC_RMXGM_R { + GAIN_CTRL4_GC_RMXGM_R::new(((self.bits >> 20) & 3) as u8) } - #[doc = "Bits 5:6"] + #[doc = "Bits 22:24"] #[inline(always)] - pub fn gain_ctrl1_gc_rmxgm(&self) -> GAIN_CTRL1_GC_RMXGM_R { - GAIN_CTRL1_GC_RMXGM_R::new(((self.bits >> 5) & 0x03) as u8) + pub fn gain_ctrl4_gc_lna(&self) -> GAIN_CTRL4_GC_LNA_R { + GAIN_CTRL4_GC_LNA_R::new(((self.bits >> 22) & 7) as u8) } - #[doc = "Bits 2:4"] + #[doc = "Bits 25:26"] #[inline(always)] - pub fn gain_ctrl0_gc_lna(&self) -> GAIN_CTRL0_GC_LNA_R { - GAIN_CTRL0_GC_LNA_R::new(((self.bits >> 2) & 0x07) as u8) + pub fn gain_ctrl5_gc_rmxgm(&self) -> GAIN_CTRL5_GC_RMXGM_R { + GAIN_CTRL5_GC_RMXGM_R::new(((self.bits >> 25) & 3) as u8) } - #[doc = "Bits 0:1"] + #[doc = "Bits 27:29"] #[inline(always)] - pub fn gain_ctrl0_gc_rmxgm(&self) -> GAIN_CTRL0_GC_RMXGM_R { - GAIN_CTRL0_GC_RMXGM_R::new((self.bits & 0x03) as u8) + pub fn gain_ctrl5_gc_lna(&self) -> GAIN_CTRL5_GC_LNA_R { + GAIN_CTRL5_GC_LNA_R::new(((self.bits >> 27) & 7) as u8) } } impl W { - #[doc = "Bits 27:29"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn gain_ctrl5_gc_lna(&mut self) -> GAIN_CTRL5_GC_LNA_W { - GAIN_CTRL5_GC_LNA_W { w: self } + #[must_use] + pub fn gain_ctrl0_gc_rmxgm(&mut self) -> GAIN_CTRL0_GC_RMXGM_W<0> { + GAIN_CTRL0_GC_RMXGM_W::new(self) } - #[doc = "Bits 25:26"] + #[doc = "Bits 2:4"] #[inline(always)] - pub fn gain_ctrl5_gc_rmxgm(&mut self) -> GAIN_CTRL5_GC_RMXGM_W { - GAIN_CTRL5_GC_RMXGM_W { w: self } + #[must_use] + pub fn gain_ctrl0_gc_lna(&mut self) -> GAIN_CTRL0_GC_LNA_W<2> { + GAIN_CTRL0_GC_LNA_W::new(self) } - #[doc = "Bits 22:24"] + #[doc = "Bits 5:6"] #[inline(always)] - pub fn gain_ctrl4_gc_lna(&mut self) -> GAIN_CTRL4_GC_LNA_W { - GAIN_CTRL4_GC_LNA_W { w: self } + #[must_use] + pub fn gain_ctrl1_gc_rmxgm(&mut self) -> GAIN_CTRL1_GC_RMXGM_W<5> { + GAIN_CTRL1_GC_RMXGM_W::new(self) } - #[doc = "Bits 20:21"] + #[doc = "Bits 7:9"] #[inline(always)] - pub fn gain_ctrl4_gc_rmxgm(&mut self) -> GAIN_CTRL4_GC_RMXGM_W { - GAIN_CTRL4_GC_RMXGM_W { w: self } + #[must_use] + pub fn gain_ctrl1_gc_lna(&mut self) -> GAIN_CTRL1_GC_LNA_W<7> { + GAIN_CTRL1_GC_LNA_W::new(self) } - #[doc = "Bits 17:19"] + #[doc = "Bits 10:11"] #[inline(always)] - pub fn gain_ctrl3_gc_lna(&mut self) -> GAIN_CTRL3_GC_LNA_W { - GAIN_CTRL3_GC_LNA_W { w: self } + #[must_use] + pub fn gain_ctrl2_gc_rmxgm(&mut self) -> GAIN_CTRL2_GC_RMXGM_W<10> { + GAIN_CTRL2_GC_RMXGM_W::new(self) } - #[doc = "Bits 15:16"] + #[doc = "Bits 12:14"] #[inline(always)] - pub fn gain_ctrl3_gc_rmxgm(&mut self) -> GAIN_CTRL3_GC_RMXGM_W { - GAIN_CTRL3_GC_RMXGM_W { w: self } + #[must_use] + pub fn gain_ctrl2_gc_lna(&mut self) -> GAIN_CTRL2_GC_LNA_W<12> { + GAIN_CTRL2_GC_LNA_W::new(self) } - #[doc = "Bits 12:14"] + #[doc = "Bits 15:16"] #[inline(always)] - pub fn gain_ctrl2_gc_lna(&mut self) -> GAIN_CTRL2_GC_LNA_W { - GAIN_CTRL2_GC_LNA_W { w: self } + #[must_use] + pub fn gain_ctrl3_gc_rmxgm(&mut self) -> GAIN_CTRL3_GC_RMXGM_W<15> { + GAIN_CTRL3_GC_RMXGM_W::new(self) } - #[doc = "Bits 10:11"] + #[doc = "Bits 17:19"] #[inline(always)] - pub fn gain_ctrl2_gc_rmxgm(&mut self) -> GAIN_CTRL2_GC_RMXGM_W { - GAIN_CTRL2_GC_RMXGM_W { w: self } + #[must_use] + pub fn gain_ctrl3_gc_lna(&mut self) -> GAIN_CTRL3_GC_LNA_W<17> { + GAIN_CTRL3_GC_LNA_W::new(self) } - #[doc = "Bits 7:9"] + #[doc = "Bits 20:21"] #[inline(always)] - pub fn gain_ctrl1_gc_lna(&mut self) -> GAIN_CTRL1_GC_LNA_W { - GAIN_CTRL1_GC_LNA_W { w: self } + #[must_use] + pub fn gain_ctrl4_gc_rmxgm(&mut self) -> GAIN_CTRL4_GC_RMXGM_W<20> { + GAIN_CTRL4_GC_RMXGM_W::new(self) } - #[doc = "Bits 5:6"] + #[doc = "Bits 22:24"] #[inline(always)] - pub fn gain_ctrl1_gc_rmxgm(&mut self) -> GAIN_CTRL1_GC_RMXGM_W { - GAIN_CTRL1_GC_RMXGM_W { w: self } + #[must_use] + pub fn gain_ctrl4_gc_lna(&mut self) -> GAIN_CTRL4_GC_LNA_W<22> { + GAIN_CTRL4_GC_LNA_W::new(self) } - #[doc = "Bits 2:4"] + #[doc = "Bits 25:26"] #[inline(always)] - pub fn gain_ctrl0_gc_lna(&mut self) -> GAIN_CTRL0_GC_LNA_W { - GAIN_CTRL0_GC_LNA_W { w: self } + #[must_use] + pub fn gain_ctrl5_gc_rmxgm(&mut self) -> GAIN_CTRL5_GC_RMXGM_W<25> { + GAIN_CTRL5_GC_RMXGM_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bits 27:29"] #[inline(always)] - pub fn gain_ctrl0_gc_rmxgm(&mut self) -> GAIN_CTRL0_GC_RMXGM_W { - GAIN_CTRL0_GC_RMXGM_W { w: self } + #[must_use] + pub fn gain_ctrl5_gc_lna(&mut self) -> GAIN_CTRL5_GC_LNA_W<27> { + GAIN_CTRL5_GC_LNA_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -485,11 +248,10 @@ impl crate::Readable for RRF_GAIN_INDEX1_SPEC { #[doc = "`write(|w| ..)` method takes [rrf_gain_index1::W](W) writer structure"] impl crate::Writable for RRF_GAIN_INDEX1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rrf_gain_index1 to value 0"] impl crate::Resettable for RRF_GAIN_INDEX1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rrf_gain_index2.rs b/src/rf/rrf_gain_index2.rs index 18ef20a..791f7e9 100644 --- a/src/rf/rrf_gain_index2.rs +++ b/src/rf/rrf_gain_index2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,231 +28,113 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `gain_ctrl6_gc_lna` reader - "] -pub struct GAIN_CTRL6_GC_LNA_R(crate::FieldReader); -impl GAIN_CTRL6_GC_LNA_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL6_GC_LNA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL6_GC_LNA_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl6_gc_lna` writer - "] -pub struct GAIN_CTRL6_GC_LNA_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL6_GC_LNA_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 12)) | ((value as u32 & 0x07) << 12); - self.w - } -} -#[doc = "Field `gain_ctrl6_gc_rmxgm` reader - "] -pub struct GAIN_CTRL6_GC_RMXGM_R(crate::FieldReader); -impl GAIN_CTRL6_GC_RMXGM_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL6_GC_RMXGM_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL6_GC_RMXGM_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl6_gc_rmxgm` writer - "] -pub struct GAIN_CTRL6_GC_RMXGM_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL6_GC_RMXGM_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 10)) | ((value as u32 & 0x03) << 10); - self.w - } -} -#[doc = "Field `gain_ctrl7_gc_lna` reader - "] -pub struct GAIN_CTRL7_GC_LNA_R(crate::FieldReader); -impl GAIN_CTRL7_GC_LNA_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL7_GC_LNA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL7_GC_LNA_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl7_gc_lna` writer - "] -pub struct GAIN_CTRL7_GC_LNA_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL7_GC_LNA_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 7)) | ((value as u32 & 0x07) << 7); - self.w - } -} -#[doc = "Field `gain_ctrl7_gc_rmxgm` reader - "] -pub struct GAIN_CTRL7_GC_RMXGM_R(crate::FieldReader); -impl GAIN_CTRL7_GC_RMXGM_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL7_GC_RMXGM_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL7_GC_RMXGM_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl7_gc_rmxgm` writer - "] -pub struct GAIN_CTRL7_GC_RMXGM_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL7_GC_RMXGM_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 5)) | ((value as u32 & 0x03) << 5); - self.w - } -} -#[doc = "Field `gain_ctrl8_gc_lna` reader - "] -pub struct GAIN_CTRL8_GC_LNA_R(crate::FieldReader); -impl GAIN_CTRL8_GC_LNA_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL8_GC_LNA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL8_GC_LNA_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl8_gc_lna` writer - "] -pub struct GAIN_CTRL8_GC_LNA_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL8_GC_LNA_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 2)) | ((value as u32 & 0x07) << 2); - self.w - } -} #[doc = "Field `gain_ctrl8_gc_rmxgm` reader - "] -pub struct GAIN_CTRL8_GC_RMXGM_R(crate::FieldReader); -impl GAIN_CTRL8_GC_RMXGM_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL8_GC_RMXGM_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL8_GC_RMXGM_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type GAIN_CTRL8_GC_RMXGM_R = crate::FieldReader; #[doc = "Field `gain_ctrl8_gc_rmxgm` writer - "] -pub struct GAIN_CTRL8_GC_RMXGM_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL8_GC_RMXGM_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type GAIN_CTRL8_GC_RMXGM_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RRF_GAIN_INDEX2_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl8_gc_lna` reader - "] +pub type GAIN_CTRL8_GC_LNA_R = crate::FieldReader; +#[doc = "Field `gain_ctrl8_gc_lna` writer - "] +pub type GAIN_CTRL8_GC_LNA_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RRF_GAIN_INDEX2_SPEC, u8, u8, 3, O>; +#[doc = "Field `gain_ctrl7_gc_rmxgm` reader - "] +pub type GAIN_CTRL7_GC_RMXGM_R = crate::FieldReader; +#[doc = "Field `gain_ctrl7_gc_rmxgm` writer - "] +pub type GAIN_CTRL7_GC_RMXGM_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RRF_GAIN_INDEX2_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl7_gc_lna` reader - "] +pub type GAIN_CTRL7_GC_LNA_R = crate::FieldReader; +#[doc = "Field `gain_ctrl7_gc_lna` writer - "] +pub type GAIN_CTRL7_GC_LNA_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RRF_GAIN_INDEX2_SPEC, u8, u8, 3, O>; +#[doc = "Field `gain_ctrl6_gc_rmxgm` reader - "] +pub type GAIN_CTRL6_GC_RMXGM_R = crate::FieldReader; +#[doc = "Field `gain_ctrl6_gc_rmxgm` writer - "] +pub type GAIN_CTRL6_GC_RMXGM_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RRF_GAIN_INDEX2_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl6_gc_lna` reader - "] +pub type GAIN_CTRL6_GC_LNA_R = crate::FieldReader; +#[doc = "Field `gain_ctrl6_gc_lna` writer - "] +pub type GAIN_CTRL6_GC_LNA_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RRF_GAIN_INDEX2_SPEC, u8, u8, 3, O>; +impl R { + #[doc = "Bits 0:1"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w + pub fn gain_ctrl8_gc_rmxgm(&self) -> GAIN_CTRL8_GC_RMXGM_R { + GAIN_CTRL8_GC_RMXGM_R::new((self.bits & 3) as u8) } -} -impl R { - #[doc = "Bits 12:14"] + #[doc = "Bits 2:4"] #[inline(always)] - pub fn gain_ctrl6_gc_lna(&self) -> GAIN_CTRL6_GC_LNA_R { - GAIN_CTRL6_GC_LNA_R::new(((self.bits >> 12) & 0x07) as u8) + pub fn gain_ctrl8_gc_lna(&self) -> GAIN_CTRL8_GC_LNA_R { + GAIN_CTRL8_GC_LNA_R::new(((self.bits >> 2) & 7) as u8) } - #[doc = "Bits 10:11"] + #[doc = "Bits 5:6"] #[inline(always)] - pub fn gain_ctrl6_gc_rmxgm(&self) -> GAIN_CTRL6_GC_RMXGM_R { - GAIN_CTRL6_GC_RMXGM_R::new(((self.bits >> 10) & 0x03) as u8) + pub fn gain_ctrl7_gc_rmxgm(&self) -> GAIN_CTRL7_GC_RMXGM_R { + GAIN_CTRL7_GC_RMXGM_R::new(((self.bits >> 5) & 3) as u8) } #[doc = "Bits 7:9"] #[inline(always)] pub fn gain_ctrl7_gc_lna(&self) -> GAIN_CTRL7_GC_LNA_R { - GAIN_CTRL7_GC_LNA_R::new(((self.bits >> 7) & 0x07) as u8) - } - #[doc = "Bits 5:6"] - #[inline(always)] - pub fn gain_ctrl7_gc_rmxgm(&self) -> GAIN_CTRL7_GC_RMXGM_R { - GAIN_CTRL7_GC_RMXGM_R::new(((self.bits >> 5) & 0x03) as u8) + GAIN_CTRL7_GC_LNA_R::new(((self.bits >> 7) & 7) as u8) } - #[doc = "Bits 2:4"] + #[doc = "Bits 10:11"] #[inline(always)] - pub fn gain_ctrl8_gc_lna(&self) -> GAIN_CTRL8_GC_LNA_R { - GAIN_CTRL8_GC_LNA_R::new(((self.bits >> 2) & 0x07) as u8) + pub fn gain_ctrl6_gc_rmxgm(&self) -> GAIN_CTRL6_GC_RMXGM_R { + GAIN_CTRL6_GC_RMXGM_R::new(((self.bits >> 10) & 3) as u8) } - #[doc = "Bits 0:1"] + #[doc = "Bits 12:14"] #[inline(always)] - pub fn gain_ctrl8_gc_rmxgm(&self) -> GAIN_CTRL8_GC_RMXGM_R { - GAIN_CTRL8_GC_RMXGM_R::new((self.bits & 0x03) as u8) + pub fn gain_ctrl6_gc_lna(&self) -> GAIN_CTRL6_GC_LNA_R { + GAIN_CTRL6_GC_LNA_R::new(((self.bits >> 12) & 7) as u8) } } impl W { - #[doc = "Bits 12:14"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn gain_ctrl6_gc_lna(&mut self) -> GAIN_CTRL6_GC_LNA_W { - GAIN_CTRL6_GC_LNA_W { w: self } + #[must_use] + pub fn gain_ctrl8_gc_rmxgm(&mut self) -> GAIN_CTRL8_GC_RMXGM_W<0> { + GAIN_CTRL8_GC_RMXGM_W::new(self) } - #[doc = "Bits 10:11"] + #[doc = "Bits 2:4"] #[inline(always)] - pub fn gain_ctrl6_gc_rmxgm(&mut self) -> GAIN_CTRL6_GC_RMXGM_W { - GAIN_CTRL6_GC_RMXGM_W { w: self } + #[must_use] + pub fn gain_ctrl8_gc_lna(&mut self) -> GAIN_CTRL8_GC_LNA_W<2> { + GAIN_CTRL8_GC_LNA_W::new(self) } - #[doc = "Bits 7:9"] + #[doc = "Bits 5:6"] #[inline(always)] - pub fn gain_ctrl7_gc_lna(&mut self) -> GAIN_CTRL7_GC_LNA_W { - GAIN_CTRL7_GC_LNA_W { w: self } + #[must_use] + pub fn gain_ctrl7_gc_rmxgm(&mut self) -> GAIN_CTRL7_GC_RMXGM_W<5> { + GAIN_CTRL7_GC_RMXGM_W::new(self) } - #[doc = "Bits 5:6"] + #[doc = "Bits 7:9"] #[inline(always)] - pub fn gain_ctrl7_gc_rmxgm(&mut self) -> GAIN_CTRL7_GC_RMXGM_W { - GAIN_CTRL7_GC_RMXGM_W { w: self } + #[must_use] + pub fn gain_ctrl7_gc_lna(&mut self) -> GAIN_CTRL7_GC_LNA_W<7> { + GAIN_CTRL7_GC_LNA_W::new(self) } - #[doc = "Bits 2:4"] + #[doc = "Bits 10:11"] #[inline(always)] - pub fn gain_ctrl8_gc_lna(&mut self) -> GAIN_CTRL8_GC_LNA_W { - GAIN_CTRL8_GC_LNA_W { w: self } + #[must_use] + pub fn gain_ctrl6_gc_rmxgm(&mut self) -> GAIN_CTRL6_GC_RMXGM_W<10> { + GAIN_CTRL6_GC_RMXGM_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bits 12:14"] #[inline(always)] - pub fn gain_ctrl8_gc_rmxgm(&mut self) -> GAIN_CTRL8_GC_RMXGM_W { - GAIN_CTRL8_GC_RMXGM_W { w: self } + #[must_use] + pub fn gain_ctrl6_gc_lna(&mut self) -> GAIN_CTRL6_GC_LNA_W<12> { + GAIN_CTRL6_GC_LNA_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -269,11 +152,10 @@ impl crate::Readable for RRF_GAIN_INDEX2_SPEC { #[doc = "`write(|w| ..)` method takes [rrf_gain_index2::W](W) writer structure"] impl crate::Writable for RRF_GAIN_INDEX2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rrf_gain_index2 to value 0"] impl crate::Resettable for RRF_GAIN_INDEX2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rxiq_ctrl_hw1.rs b/src/rf/rxiq_ctrl_hw1.rs index fdeeb79..5335a2b 100644 --- a/src/rf/rxiq_ctrl_hw1.rs +++ b/src/rf/rxiq_ctrl_hw1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,87 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rx_iq_gain_comp_gc0` reader - "] -pub struct RX_IQ_GAIN_COMP_GC0_R(crate::FieldReader); -impl RX_IQ_GAIN_COMP_GC0_R { - pub(crate) fn new(bits: u16) -> Self { - RX_IQ_GAIN_COMP_GC0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_IQ_GAIN_COMP_GC0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_iq_gain_comp_gc0` writer - "] -pub struct RX_IQ_GAIN_COMP_GC0_W<'a> { - w: &'a mut W, -} -impl<'a> RX_IQ_GAIN_COMP_GC0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07ff << 16)) | ((value as u32 & 0x07ff) << 16); - self.w - } -} #[doc = "Field `rx_iq_phase_comp_gc0` reader - "] -pub struct RX_IQ_PHASE_COMP_GC0_R(crate::FieldReader); -impl RX_IQ_PHASE_COMP_GC0_R { - pub(crate) fn new(bits: u16) -> Self { - RX_IQ_PHASE_COMP_GC0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_IQ_PHASE_COMP_GC0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RX_IQ_PHASE_COMP_GC0_R = crate::FieldReader; #[doc = "Field `rx_iq_phase_comp_gc0` writer - "] -pub struct RX_IQ_PHASE_COMP_GC0_W<'a> { - w: &'a mut W, -} -impl<'a> RX_IQ_PHASE_COMP_GC0_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type RX_IQ_PHASE_COMP_GC0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RXIQ_CTRL_HW1_SPEC, u16, u16, 10, O>; +#[doc = "Field `rx_iq_gain_comp_gc0` reader - "] +pub type RX_IQ_GAIN_COMP_GC0_R = crate::FieldReader; +#[doc = "Field `rx_iq_gain_comp_gc0` writer - "] +pub type RX_IQ_GAIN_COMP_GC0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RXIQ_CTRL_HW1_SPEC, u16, u16, 11, O>; +impl R { + #[doc = "Bits 0:9"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03ff) | (value as u32 & 0x03ff); - self.w + pub fn rx_iq_phase_comp_gc0(&self) -> RX_IQ_PHASE_COMP_GC0_R { + RX_IQ_PHASE_COMP_GC0_R::new((self.bits & 0x03ff) as u16) } -} -impl R { #[doc = "Bits 16:26"] #[inline(always)] pub fn rx_iq_gain_comp_gc0(&self) -> RX_IQ_GAIN_COMP_GC0_R { RX_IQ_GAIN_COMP_GC0_R::new(((self.bits >> 16) & 0x07ff) as u16) } - #[doc = "Bits 0:9"] - #[inline(always)] - pub fn rx_iq_phase_comp_gc0(&self) -> RX_IQ_PHASE_COMP_GC0_R { - RX_IQ_PHASE_COMP_GC0_R::new((self.bits & 0x03ff) as u16) - } } impl W { - #[doc = "Bits 16:26"] + #[doc = "Bits 0:9"] #[inline(always)] - pub fn rx_iq_gain_comp_gc0(&mut self) -> RX_IQ_GAIN_COMP_GC0_W { - RX_IQ_GAIN_COMP_GC0_W { w: self } + #[must_use] + pub fn rx_iq_phase_comp_gc0(&mut self) -> RX_IQ_PHASE_COMP_GC0_W<0> { + RX_IQ_PHASE_COMP_GC0_W::new(self) } - #[doc = "Bits 0:9"] + #[doc = "Bits 16:26"] #[inline(always)] - pub fn rx_iq_phase_comp_gc0(&mut self) -> RX_IQ_PHASE_COMP_GC0_W { - RX_IQ_PHASE_COMP_GC0_W { w: self } + #[must_use] + pub fn rx_iq_gain_comp_gc0(&mut self) -> RX_IQ_GAIN_COMP_GC0_W<16> { + RX_IQ_GAIN_COMP_GC0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -125,11 +88,10 @@ impl crate::Readable for RXIQ_CTRL_HW1_SPEC { #[doc = "`write(|w| ..)` method takes [rxiq_ctrl_hw1::W](W) writer structure"] impl crate::Writable for RXIQ_CTRL_HW1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rxiq_ctrl_hw1 to value 0"] impl crate::Resettable for RXIQ_CTRL_HW1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rxiq_ctrl_hw2.rs b/src/rf/rxiq_ctrl_hw2.rs index 1133229..a3605e4 100644 --- a/src/rf/rxiq_ctrl_hw2.rs +++ b/src/rf/rxiq_ctrl_hw2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,87 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rx_iq_gain_comp_gc1` reader - "] -pub struct RX_IQ_GAIN_COMP_GC1_R(crate::FieldReader); -impl RX_IQ_GAIN_COMP_GC1_R { - pub(crate) fn new(bits: u16) -> Self { - RX_IQ_GAIN_COMP_GC1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_IQ_GAIN_COMP_GC1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_iq_gain_comp_gc1` writer - "] -pub struct RX_IQ_GAIN_COMP_GC1_W<'a> { - w: &'a mut W, -} -impl<'a> RX_IQ_GAIN_COMP_GC1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07ff << 16)) | ((value as u32 & 0x07ff) << 16); - self.w - } -} #[doc = "Field `rx_iq_phase_comp_gc1` reader - "] -pub struct RX_IQ_PHASE_COMP_GC1_R(crate::FieldReader); -impl RX_IQ_PHASE_COMP_GC1_R { - pub(crate) fn new(bits: u16) -> Self { - RX_IQ_PHASE_COMP_GC1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_IQ_PHASE_COMP_GC1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RX_IQ_PHASE_COMP_GC1_R = crate::FieldReader; #[doc = "Field `rx_iq_phase_comp_gc1` writer - "] -pub struct RX_IQ_PHASE_COMP_GC1_W<'a> { - w: &'a mut W, -} -impl<'a> RX_IQ_PHASE_COMP_GC1_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type RX_IQ_PHASE_COMP_GC1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RXIQ_CTRL_HW2_SPEC, u16, u16, 10, O>; +#[doc = "Field `rx_iq_gain_comp_gc1` reader - "] +pub type RX_IQ_GAIN_COMP_GC1_R = crate::FieldReader; +#[doc = "Field `rx_iq_gain_comp_gc1` writer - "] +pub type RX_IQ_GAIN_COMP_GC1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RXIQ_CTRL_HW2_SPEC, u16, u16, 11, O>; +impl R { + #[doc = "Bits 0:9"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03ff) | (value as u32 & 0x03ff); - self.w + pub fn rx_iq_phase_comp_gc1(&self) -> RX_IQ_PHASE_COMP_GC1_R { + RX_IQ_PHASE_COMP_GC1_R::new((self.bits & 0x03ff) as u16) } -} -impl R { #[doc = "Bits 16:26"] #[inline(always)] pub fn rx_iq_gain_comp_gc1(&self) -> RX_IQ_GAIN_COMP_GC1_R { RX_IQ_GAIN_COMP_GC1_R::new(((self.bits >> 16) & 0x07ff) as u16) } - #[doc = "Bits 0:9"] - #[inline(always)] - pub fn rx_iq_phase_comp_gc1(&self) -> RX_IQ_PHASE_COMP_GC1_R { - RX_IQ_PHASE_COMP_GC1_R::new((self.bits & 0x03ff) as u16) - } } impl W { - #[doc = "Bits 16:26"] + #[doc = "Bits 0:9"] #[inline(always)] - pub fn rx_iq_gain_comp_gc1(&mut self) -> RX_IQ_GAIN_COMP_GC1_W { - RX_IQ_GAIN_COMP_GC1_W { w: self } + #[must_use] + pub fn rx_iq_phase_comp_gc1(&mut self) -> RX_IQ_PHASE_COMP_GC1_W<0> { + RX_IQ_PHASE_COMP_GC1_W::new(self) } - #[doc = "Bits 0:9"] + #[doc = "Bits 16:26"] #[inline(always)] - pub fn rx_iq_phase_comp_gc1(&mut self) -> RX_IQ_PHASE_COMP_GC1_W { - RX_IQ_PHASE_COMP_GC1_W { w: self } + #[must_use] + pub fn rx_iq_gain_comp_gc1(&mut self) -> RX_IQ_GAIN_COMP_GC1_W<16> { + RX_IQ_GAIN_COMP_GC1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -125,11 +88,10 @@ impl crate::Readable for RXIQ_CTRL_HW2_SPEC { #[doc = "`write(|w| ..)` method takes [rxiq_ctrl_hw2::W](W) writer structure"] impl crate::Writable for RXIQ_CTRL_HW2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rxiq_ctrl_hw2 to value 0"] impl crate::Resettable for RXIQ_CTRL_HW2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rxiq_ctrl_hw3.rs b/src/rf/rxiq_ctrl_hw3.rs index 419c300..62e856a 100644 --- a/src/rf/rxiq_ctrl_hw3.rs +++ b/src/rf/rxiq_ctrl_hw3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,87 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rx_iq_gain_comp_gc2` reader - "] -pub struct RX_IQ_GAIN_COMP_GC2_R(crate::FieldReader); -impl RX_IQ_GAIN_COMP_GC2_R { - pub(crate) fn new(bits: u16) -> Self { - RX_IQ_GAIN_COMP_GC2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_IQ_GAIN_COMP_GC2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_iq_gain_comp_gc2` writer - "] -pub struct RX_IQ_GAIN_COMP_GC2_W<'a> { - w: &'a mut W, -} -impl<'a> RX_IQ_GAIN_COMP_GC2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07ff << 16)) | ((value as u32 & 0x07ff) << 16); - self.w - } -} #[doc = "Field `rx_iq_phase_comp_gc2` reader - "] -pub struct RX_IQ_PHASE_COMP_GC2_R(crate::FieldReader); -impl RX_IQ_PHASE_COMP_GC2_R { - pub(crate) fn new(bits: u16) -> Self { - RX_IQ_PHASE_COMP_GC2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_IQ_PHASE_COMP_GC2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RX_IQ_PHASE_COMP_GC2_R = crate::FieldReader; #[doc = "Field `rx_iq_phase_comp_gc2` writer - "] -pub struct RX_IQ_PHASE_COMP_GC2_W<'a> { - w: &'a mut W, -} -impl<'a> RX_IQ_PHASE_COMP_GC2_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type RX_IQ_PHASE_COMP_GC2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RXIQ_CTRL_HW3_SPEC, u16, u16, 10, O>; +#[doc = "Field `rx_iq_gain_comp_gc2` reader - "] +pub type RX_IQ_GAIN_COMP_GC2_R = crate::FieldReader; +#[doc = "Field `rx_iq_gain_comp_gc2` writer - "] +pub type RX_IQ_GAIN_COMP_GC2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RXIQ_CTRL_HW3_SPEC, u16, u16, 11, O>; +impl R { + #[doc = "Bits 0:9"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03ff) | (value as u32 & 0x03ff); - self.w + pub fn rx_iq_phase_comp_gc2(&self) -> RX_IQ_PHASE_COMP_GC2_R { + RX_IQ_PHASE_COMP_GC2_R::new((self.bits & 0x03ff) as u16) } -} -impl R { #[doc = "Bits 16:26"] #[inline(always)] pub fn rx_iq_gain_comp_gc2(&self) -> RX_IQ_GAIN_COMP_GC2_R { RX_IQ_GAIN_COMP_GC2_R::new(((self.bits >> 16) & 0x07ff) as u16) } - #[doc = "Bits 0:9"] - #[inline(always)] - pub fn rx_iq_phase_comp_gc2(&self) -> RX_IQ_PHASE_COMP_GC2_R { - RX_IQ_PHASE_COMP_GC2_R::new((self.bits & 0x03ff) as u16) - } } impl W { - #[doc = "Bits 16:26"] + #[doc = "Bits 0:9"] #[inline(always)] - pub fn rx_iq_gain_comp_gc2(&mut self) -> RX_IQ_GAIN_COMP_GC2_W { - RX_IQ_GAIN_COMP_GC2_W { w: self } + #[must_use] + pub fn rx_iq_phase_comp_gc2(&mut self) -> RX_IQ_PHASE_COMP_GC2_W<0> { + RX_IQ_PHASE_COMP_GC2_W::new(self) } - #[doc = "Bits 0:9"] + #[doc = "Bits 16:26"] #[inline(always)] - pub fn rx_iq_phase_comp_gc2(&mut self) -> RX_IQ_PHASE_COMP_GC2_W { - RX_IQ_PHASE_COMP_GC2_W { w: self } + #[must_use] + pub fn rx_iq_gain_comp_gc2(&mut self) -> RX_IQ_GAIN_COMP_GC2_W<16> { + RX_IQ_GAIN_COMP_GC2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -125,11 +88,10 @@ impl crate::Readable for RXIQ_CTRL_HW3_SPEC { #[doc = "`write(|w| ..)` method takes [rxiq_ctrl_hw3::W](W) writer structure"] impl crate::Writable for RXIQ_CTRL_HW3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rxiq_ctrl_hw3 to value 0"] impl crate::Resettable for RXIQ_CTRL_HW3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/rxiq_ctrl_hw4.rs b/src/rf/rxiq_ctrl_hw4.rs index ecaa046..df079cd 100644 --- a/src/rf/rxiq_ctrl_hw4.rs +++ b/src/rf/rxiq_ctrl_hw4.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,87 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rx_iq_gain_comp_gc3` reader - "] -pub struct RX_IQ_GAIN_COMP_GC3_R(crate::FieldReader); -impl RX_IQ_GAIN_COMP_GC3_R { - pub(crate) fn new(bits: u16) -> Self { - RX_IQ_GAIN_COMP_GC3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_IQ_GAIN_COMP_GC3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_iq_gain_comp_gc3` writer - "] -pub struct RX_IQ_GAIN_COMP_GC3_W<'a> { - w: &'a mut W, -} -impl<'a> RX_IQ_GAIN_COMP_GC3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07ff << 16)) | ((value as u32 & 0x07ff) << 16); - self.w - } -} #[doc = "Field `rx_iq_phase_comp_gc3` reader - "] -pub struct RX_IQ_PHASE_COMP_GC3_R(crate::FieldReader); -impl RX_IQ_PHASE_COMP_GC3_R { - pub(crate) fn new(bits: u16) -> Self { - RX_IQ_PHASE_COMP_GC3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_IQ_PHASE_COMP_GC3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type RX_IQ_PHASE_COMP_GC3_R = crate::FieldReader; #[doc = "Field `rx_iq_phase_comp_gc3` writer - "] -pub struct RX_IQ_PHASE_COMP_GC3_W<'a> { - w: &'a mut W, -} -impl<'a> RX_IQ_PHASE_COMP_GC3_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type RX_IQ_PHASE_COMP_GC3_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RXIQ_CTRL_HW4_SPEC, u16, u16, 10, O>; +#[doc = "Field `rx_iq_gain_comp_gc3` reader - "] +pub type RX_IQ_GAIN_COMP_GC3_R = crate::FieldReader; +#[doc = "Field `rx_iq_gain_comp_gc3` writer - "] +pub type RX_IQ_GAIN_COMP_GC3_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, RXIQ_CTRL_HW4_SPEC, u16, u16, 11, O>; +impl R { + #[doc = "Bits 0:9"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03ff) | (value as u32 & 0x03ff); - self.w + pub fn rx_iq_phase_comp_gc3(&self) -> RX_IQ_PHASE_COMP_GC3_R { + RX_IQ_PHASE_COMP_GC3_R::new((self.bits & 0x03ff) as u16) } -} -impl R { #[doc = "Bits 16:26"] #[inline(always)] pub fn rx_iq_gain_comp_gc3(&self) -> RX_IQ_GAIN_COMP_GC3_R { RX_IQ_GAIN_COMP_GC3_R::new(((self.bits >> 16) & 0x07ff) as u16) } - #[doc = "Bits 0:9"] - #[inline(always)] - pub fn rx_iq_phase_comp_gc3(&self) -> RX_IQ_PHASE_COMP_GC3_R { - RX_IQ_PHASE_COMP_GC3_R::new((self.bits & 0x03ff) as u16) - } } impl W { - #[doc = "Bits 16:26"] + #[doc = "Bits 0:9"] #[inline(always)] - pub fn rx_iq_gain_comp_gc3(&mut self) -> RX_IQ_GAIN_COMP_GC3_W { - RX_IQ_GAIN_COMP_GC3_W { w: self } + #[must_use] + pub fn rx_iq_phase_comp_gc3(&mut self) -> RX_IQ_PHASE_COMP_GC3_W<0> { + RX_IQ_PHASE_COMP_GC3_W::new(self) } - #[doc = "Bits 0:9"] + #[doc = "Bits 16:26"] #[inline(always)] - pub fn rx_iq_phase_comp_gc3(&mut self) -> RX_IQ_PHASE_COMP_GC3_W { - RX_IQ_PHASE_COMP_GC3_W { w: self } + #[must_use] + pub fn rx_iq_gain_comp_gc3(&mut self) -> RX_IQ_GAIN_COMP_GC3_W<16> { + RX_IQ_GAIN_COMP_GC3_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -125,11 +88,10 @@ impl crate::Readable for RXIQ_CTRL_HW4_SPEC { #[doc = "`write(|w| ..)` method takes [rxiq_ctrl_hw4::W](W) writer structure"] impl crate::Writable for RXIQ_CTRL_HW4_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets rxiq_ctrl_hw4 to value 0"] impl crate::Resettable for RXIQ_CTRL_HW4_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/saradc_resv.rs b/src/rf/saradc_resv.rs index 4d3fc0e..77d9d13 100644 --- a/src/rf/saradc_resv.rs +++ b/src/rf/saradc_resv.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,13 +28,15 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } impl W { #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -51,11 +54,10 @@ impl crate::Readable for SARADC_RESV_SPEC { #[doc = "`write(|w| ..)` method takes [saradc_resv::W](W) writer structure"] impl crate::Writable for SARADC_RESV_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets saradc_resv to value 0"] impl crate::Resettable for SARADC_RESV_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/sdm1.rs b/src/rf/sdm1.rs index 267f499..4773944 100644 --- a/src/rf/sdm1.rs +++ b/src/rf/sdm1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,317 +28,124 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `lo_sdm_flag` reader - "] -pub struct LO_SDM_FLAG_R(crate::FieldReader); -impl LO_SDM_FLAG_R { - pub(crate) fn new(bits: bool) -> Self { - LO_SDM_FLAG_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_FLAG_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_flag` writer - "] -pub struct LO_SDM_FLAG_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_FLAG_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w - } -} -#[doc = "Field `lo_sdm_rstb_hw` reader - "] -pub struct LO_SDM_RSTB_HW_R(crate::FieldReader); -impl LO_SDM_RSTB_HW_R { - pub(crate) fn new(bits: bool) -> Self { - LO_SDM_RSTB_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_RSTB_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_rstb_hw` writer - "] -pub struct LO_SDM_RSTB_HW_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_RSTB_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w - } -} -#[doc = "Field `lo_sdm_rstb` reader - "] -pub struct LO_SDM_RSTB_R(crate::FieldReader); -impl LO_SDM_RSTB_R { - pub(crate) fn new(bits: bool) -> Self { - LO_SDM_RSTB_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_RSTB_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_rstb` writer - "] -pub struct LO_SDM_RSTB_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_RSTB_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `lo_sdm_bypass` reader - "] -pub struct LO_SDM_BYPASS_R(crate::FieldReader); -impl LO_SDM_BYPASS_R { - pub(crate) fn new(bits: bool) -> Self { - LO_SDM_BYPASS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_BYPASS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_bypass` writer - "] -pub struct LO_SDM_BYPASS_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_BYPASS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} -#[doc = "Field `lo_sdm_dither_sel` reader - "] -pub struct LO_SDM_DITHER_SEL_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_dither_sel` writer - "] -pub struct LO_SDM_DITHER_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} -#[doc = "Field `lo_sdm_bypass_hw` reader - "] -pub struct LO_SDM_BYPASS_HW_R(crate::FieldReader); -impl LO_SDM_BYPASS_HW_R { - pub(crate) fn new(bits: bool) -> Self { - LO_SDM_BYPASS_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_BYPASS_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_sdm_bypass_hw` writer - "] -pub struct LO_SDM_BYPASS_HW_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_BYPASS_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} #[doc = "Field `lo_sdm_dither_sel_hw` reader - "] -pub struct LO_SDM_DITHER_SEL_HW_R(crate::FieldReader); -impl LO_SDM_DITHER_SEL_HW_R { - pub(crate) fn new(bits: u8) -> Self { - LO_SDM_DITHER_SEL_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDM_DITHER_SEL_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type LO_SDM_DITHER_SEL_HW_R = crate::FieldReader; #[doc = "Field `lo_sdm_dither_sel_hw` writer - "] -pub struct LO_SDM_DITHER_SEL_HW_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDM_DITHER_SEL_HW_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w - } -} +pub type LO_SDM_DITHER_SEL_HW_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SDM1_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_bypass_hw` reader - "] +pub type LO_SDM_BYPASS_HW_R = crate::BitReader; +#[doc = "Field `lo_sdm_bypass_hw` writer - "] +pub type LO_SDM_BYPASS_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, SDM1_SPEC, bool, O>; +#[doc = "Field `lo_sdm_dither_sel` reader - "] +pub type LO_SDM_DITHER_SEL_R = crate::FieldReader; +#[doc = "Field `lo_sdm_dither_sel` writer - "] +pub type LO_SDM_DITHER_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SDM1_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_sdm_bypass` reader - "] +pub type LO_SDM_BYPASS_R = crate::BitReader; +#[doc = "Field `lo_sdm_bypass` writer - "] +pub type LO_SDM_BYPASS_W<'a, const O: u8> = crate::BitWriter<'a, u32, SDM1_SPEC, bool, O>; +#[doc = "Field `lo_sdm_rstb` reader - "] +pub type LO_SDM_RSTB_R = crate::BitReader; +#[doc = "Field `lo_sdm_rstb` writer - "] +pub type LO_SDM_RSTB_W<'a, const O: u8> = crate::BitWriter<'a, u32, SDM1_SPEC, bool, O>; +#[doc = "Field `lo_sdm_rstb_hw` reader - "] +pub type LO_SDM_RSTB_HW_R = crate::BitReader; +#[doc = "Field `lo_sdm_rstb_hw` writer - "] +pub type LO_SDM_RSTB_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, SDM1_SPEC, bool, O>; +#[doc = "Field `lo_sdm_flag` reader - "] +pub type LO_SDM_FLAG_R = crate::BitReader; +#[doc = "Field `lo_sdm_flag` writer - "] +pub type LO_SDM_FLAG_W<'a, const O: u8> = crate::BitWriter<'a, u32, SDM1_SPEC, bool, O>; impl R { - #[doc = "Bit 20"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn lo_sdm_flag(&self) -> LO_SDM_FLAG_R { - LO_SDM_FLAG_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn lo_sdm_dither_sel_hw(&self) -> LO_SDM_DITHER_SEL_HW_R { + LO_SDM_DITHER_SEL_HW_R::new((self.bits & 3) as u8) } - #[doc = "Bit 17"] + #[doc = "Bit 4"] #[inline(always)] - pub fn lo_sdm_rstb_hw(&self) -> LO_SDM_RSTB_HW_R { - LO_SDM_RSTB_HW_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn lo_sdm_bypass_hw(&self) -> LO_SDM_BYPASS_HW_R { + LO_SDM_BYPASS_HW_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 16"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn lo_sdm_rstb(&self) -> LO_SDM_RSTB_R { - LO_SDM_RSTB_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn lo_sdm_dither_sel(&self) -> LO_SDM_DITHER_SEL_R { + LO_SDM_DITHER_SEL_R::new(((self.bits >> 8) & 3) as u8) } #[doc = "Bit 12"] #[inline(always)] pub fn lo_sdm_bypass(&self) -> LO_SDM_BYPASS_R { - LO_SDM_BYPASS_R::new(((self.bits >> 12) & 0x01) != 0) + LO_SDM_BYPASS_R::new(((self.bits >> 12) & 1) != 0) } - #[doc = "Bits 8:9"] + #[doc = "Bit 16"] #[inline(always)] - pub fn lo_sdm_dither_sel(&self) -> LO_SDM_DITHER_SEL_R { - LO_SDM_DITHER_SEL_R::new(((self.bits >> 8) & 0x03) as u8) + pub fn lo_sdm_rstb(&self) -> LO_SDM_RSTB_R { + LO_SDM_RSTB_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 4"] + #[doc = "Bit 17"] #[inline(always)] - pub fn lo_sdm_bypass_hw(&self) -> LO_SDM_BYPASS_HW_R { - LO_SDM_BYPASS_HW_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn lo_sdm_rstb_hw(&self) -> LO_SDM_RSTB_HW_R { + LO_SDM_RSTB_HW_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bits 0:1"] + #[doc = "Bit 20"] #[inline(always)] - pub fn lo_sdm_dither_sel_hw(&self) -> LO_SDM_DITHER_SEL_HW_R { - LO_SDM_DITHER_SEL_HW_R::new((self.bits & 0x03) as u8) + pub fn lo_sdm_flag(&self) -> LO_SDM_FLAG_R { + LO_SDM_FLAG_R::new(((self.bits >> 20) & 1) != 0) } } impl W { - #[doc = "Bit 20"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn lo_sdm_flag(&mut self) -> LO_SDM_FLAG_W { - LO_SDM_FLAG_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel_hw(&mut self) -> LO_SDM_DITHER_SEL_HW_W<0> { + LO_SDM_DITHER_SEL_HW_W::new(self) } - #[doc = "Bit 17"] + #[doc = "Bit 4"] #[inline(always)] - pub fn lo_sdm_rstb_hw(&mut self) -> LO_SDM_RSTB_HW_W { - LO_SDM_RSTB_HW_W { w: self } + #[must_use] + pub fn lo_sdm_bypass_hw(&mut self) -> LO_SDM_BYPASS_HW_W<4> { + LO_SDM_BYPASS_HW_W::new(self) } - #[doc = "Bit 16"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn lo_sdm_rstb(&mut self) -> LO_SDM_RSTB_W { - LO_SDM_RSTB_W { w: self } + #[must_use] + pub fn lo_sdm_dither_sel(&mut self) -> LO_SDM_DITHER_SEL_W<8> { + LO_SDM_DITHER_SEL_W::new(self) } #[doc = "Bit 12"] #[inline(always)] - pub fn lo_sdm_bypass(&mut self) -> LO_SDM_BYPASS_W { - LO_SDM_BYPASS_W { w: self } + #[must_use] + pub fn lo_sdm_bypass(&mut self) -> LO_SDM_BYPASS_W<12> { + LO_SDM_BYPASS_W::new(self) } - #[doc = "Bits 8:9"] + #[doc = "Bit 16"] #[inline(always)] - pub fn lo_sdm_dither_sel(&mut self) -> LO_SDM_DITHER_SEL_W { - LO_SDM_DITHER_SEL_W { w: self } + #[must_use] + pub fn lo_sdm_rstb(&mut self) -> LO_SDM_RSTB_W<16> { + LO_SDM_RSTB_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 17"] #[inline(always)] - pub fn lo_sdm_bypass_hw(&mut self) -> LO_SDM_BYPASS_HW_W { - LO_SDM_BYPASS_HW_W { w: self } + #[must_use] + pub fn lo_sdm_rstb_hw(&mut self) -> LO_SDM_RSTB_HW_W<17> { + LO_SDM_RSTB_HW_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bit 20"] #[inline(always)] - pub fn lo_sdm_dither_sel_hw(&mut self) -> LO_SDM_DITHER_SEL_HW_W { - LO_SDM_DITHER_SEL_HW_W { w: self } + #[must_use] + pub fn lo_sdm_flag(&mut self) -> LO_SDM_FLAG_W<20> { + LO_SDM_FLAG_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -355,11 +163,10 @@ impl crate::Readable for SDM1_SPEC { #[doc = "`write(|w| ..)` method takes [sdm1::W](W) writer structure"] impl crate::Writable for SDM1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sdm1 to value 0"] impl crate::Resettable for SDM1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/sdm2.rs b/src/rf/sdm2.rs index f37b1f8..dd19b7c 100644 --- a/src/rf/sdm2.rs +++ b/src/rf/sdm2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,32 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `lo_sdmin` reader - "] -pub struct LO_SDMIN_R(crate::FieldReader); -impl LO_SDMIN_R { - pub(crate) fn new(bits: u32) -> Self { - LO_SDMIN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDMIN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type LO_SDMIN_R = crate::FieldReader; #[doc = "Field `lo_sdmin` writer - "] -pub struct LO_SDMIN_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDMIN_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0x3fff_ffff) | (value as u32 & 0x3fff_ffff); - self.w - } -} +pub type LO_SDMIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SDM2_SPEC, u32, u32, 30, O>; impl R { #[doc = "Bits 0:29"] #[inline(always)] pub fn lo_sdmin(&self) -> LO_SDMIN_R { - LO_SDMIN_R::new((self.bits & 0x3fff_ffff) as u32) + LO_SDMIN_R::new(self.bits & 0x3fff_ffff) } } impl W { #[doc = "Bits 0:29"] #[inline(always)] - pub fn lo_sdmin(&mut self) -> LO_SDMIN_W { - LO_SDMIN_W { w: self } + #[must_use] + pub fn lo_sdmin(&mut self) -> LO_SDMIN_W<0> { + LO_SDMIN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +71,10 @@ impl crate::Readable for SDM2_SPEC { #[doc = "`write(|w| ..)` method takes [sdm2::W](W) writer structure"] impl crate::Writable for SDM2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sdm2 to value 0"] impl crate::Resettable for SDM2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/sdm3.rs b/src/rf/sdm3.rs index 83cf351..f7b5819 100644 --- a/src/rf/sdm3.rs +++ b/src/rf/sdm3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,32 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `lo_sdmin_hw` reader - "] -pub struct LO_SDMIN_HW_R(crate::FieldReader); -impl LO_SDMIN_HW_R { - pub(crate) fn new(bits: u32) -> Self { - LO_SDMIN_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_SDMIN_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type LO_SDMIN_HW_R = crate::FieldReader; #[doc = "Field `lo_sdmin_hw` writer - "] -pub struct LO_SDMIN_HW_W<'a> { - w: &'a mut W, -} -impl<'a> LO_SDMIN_HW_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0x3fff_ffff) | (value as u32 & 0x3fff_ffff); - self.w - } -} +pub type LO_SDMIN_HW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SDM3_SPEC, u32, u32, 30, O>; impl R { #[doc = "Bits 0:29"] #[inline(always)] pub fn lo_sdmin_hw(&self) -> LO_SDMIN_HW_R { - LO_SDMIN_HW_R::new((self.bits & 0x3fff_ffff) as u32) + LO_SDMIN_HW_R::new(self.bits & 0x3fff_ffff) } } impl W { #[doc = "Bits 0:29"] #[inline(always)] - pub fn lo_sdmin_hw(&mut self) -> LO_SDMIN_HW_W { - LO_SDMIN_HW_W { w: self } + #[must_use] + pub fn lo_sdmin_hw(&mut self) -> LO_SDMIN_HW_W<0> { + LO_SDMIN_HW_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +71,10 @@ impl crate::Readable for SDM3_SPEC { #[doc = "`write(|w| ..)` method takes [sdm3::W](W) writer structure"] impl crate::Writable for SDM3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sdm3 to value 0"] impl crate::Resettable for SDM3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/singen_ctrl0.rs b/src/rf/singen_ctrl0.rs index ee49432..7fa6c73 100644 --- a/src/rf/singen_ctrl0.rs +++ b/src/rf/singen_ctrl0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,215 +28,96 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `singen_en` reader - "] -pub struct SINGEN_EN_R(crate::FieldReader); -impl SINGEN_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SINGEN_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SINGEN_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `singen_en` writer - "] -pub struct SINGEN_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SINGEN_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 31)) | ((value as u32 & 0x01) << 31); - self.w - } -} -#[doc = "Field `singen_clkdiv_n` reader - "] -pub struct SINGEN_CLKDIV_N_R(crate::FieldReader); -impl SINGEN_CLKDIV_N_R { - pub(crate) fn new(bits: u8) -> Self { - SINGEN_CLKDIV_N_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SINGEN_CLKDIV_N_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `singen_clkdiv_n` writer - "] -pub struct SINGEN_CLKDIV_N_W<'a> { - w: &'a mut W, -} -impl<'a> SINGEN_CLKDIV_N_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 29)) | ((value as u32 & 0x03) << 29); - self.w - } -} -#[doc = "Field `singen_unsign_en` reader - "] -pub struct SINGEN_UNSIGN_EN_R(crate::FieldReader); -impl SINGEN_UNSIGN_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SINGEN_UNSIGN_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SINGEN_UNSIGN_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `singen_unsign_en` writer - "] -pub struct SINGEN_UNSIGN_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SINGEN_UNSIGN_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 28)) | ((value as u32 & 0x01) << 28); - self.w - } -} -#[doc = "Field `singen_inc_step0` reader - "] -pub struct SINGEN_INC_STEP0_R(crate::FieldReader); -impl SINGEN_INC_STEP0_R { - pub(crate) fn new(bits: u16) -> Self { - SINGEN_INC_STEP0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SINGEN_INC_STEP0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `singen_inc_step0` writer - "] -pub struct SINGEN_INC_STEP0_W<'a> { - w: &'a mut W, -} -impl<'a> SINGEN_INC_STEP0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03ff << 16)) | ((value as u32 & 0x03ff) << 16); - self.w - } -} #[doc = "Field `singen_inc_step1` reader - "] -pub struct SINGEN_INC_STEP1_R(crate::FieldReader); -impl SINGEN_INC_STEP1_R { - pub(crate) fn new(bits: u16) -> Self { - SINGEN_INC_STEP1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SINGEN_INC_STEP1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SINGEN_INC_STEP1_R = crate::FieldReader; #[doc = "Field `singen_inc_step1` writer - "] -pub struct SINGEN_INC_STEP1_W<'a> { - w: &'a mut W, -} -impl<'a> SINGEN_INC_STEP1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03ff) | (value as u32 & 0x03ff); - self.w - } -} +pub type SINGEN_INC_STEP1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SINGEN_CTRL0_SPEC, u16, u16, 10, O>; +#[doc = "Field `singen_inc_step0` reader - "] +pub type SINGEN_INC_STEP0_R = crate::FieldReader; +#[doc = "Field `singen_inc_step0` writer - "] +pub type SINGEN_INC_STEP0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SINGEN_CTRL0_SPEC, u16, u16, 10, O>; +#[doc = "Field `singen_unsign_en` reader - "] +pub type SINGEN_UNSIGN_EN_R = crate::BitReader; +#[doc = "Field `singen_unsign_en` writer - "] +pub type SINGEN_UNSIGN_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SINGEN_CTRL0_SPEC, bool, O>; +#[doc = "Field `singen_clkdiv_n` reader - "] +pub type SINGEN_CLKDIV_N_R = crate::FieldReader; +#[doc = "Field `singen_clkdiv_n` writer - "] +pub type SINGEN_CLKDIV_N_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SINGEN_CTRL0_SPEC, u8, u8, 2, O>; +#[doc = "Field `singen_en` reader - "] +pub type SINGEN_EN_R = crate::BitReader; +#[doc = "Field `singen_en` writer - "] +pub type SINGEN_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SINGEN_CTRL0_SPEC, bool, O>; impl R { - #[doc = "Bit 31"] + #[doc = "Bits 0:9"] #[inline(always)] - pub fn singen_en(&self) -> SINGEN_EN_R { - SINGEN_EN_R::new(((self.bits >> 31) & 0x01) != 0) + pub fn singen_inc_step1(&self) -> SINGEN_INC_STEP1_R { + SINGEN_INC_STEP1_R::new((self.bits & 0x03ff) as u16) } - #[doc = "Bits 29:30"] + #[doc = "Bits 16:25"] #[inline(always)] - pub fn singen_clkdiv_n(&self) -> SINGEN_CLKDIV_N_R { - SINGEN_CLKDIV_N_R::new(((self.bits >> 29) & 0x03) as u8) + pub fn singen_inc_step0(&self) -> SINGEN_INC_STEP0_R { + SINGEN_INC_STEP0_R::new(((self.bits >> 16) & 0x03ff) as u16) } #[doc = "Bit 28"] #[inline(always)] pub fn singen_unsign_en(&self) -> SINGEN_UNSIGN_EN_R { - SINGEN_UNSIGN_EN_R::new(((self.bits >> 28) & 0x01) != 0) + SINGEN_UNSIGN_EN_R::new(((self.bits >> 28) & 1) != 0) } - #[doc = "Bits 16:25"] + #[doc = "Bits 29:30"] #[inline(always)] - pub fn singen_inc_step0(&self) -> SINGEN_INC_STEP0_R { - SINGEN_INC_STEP0_R::new(((self.bits >> 16) & 0x03ff) as u16) + pub fn singen_clkdiv_n(&self) -> SINGEN_CLKDIV_N_R { + SINGEN_CLKDIV_N_R::new(((self.bits >> 29) & 3) as u8) } - #[doc = "Bits 0:9"] + #[doc = "Bit 31"] #[inline(always)] - pub fn singen_inc_step1(&self) -> SINGEN_INC_STEP1_R { - SINGEN_INC_STEP1_R::new((self.bits & 0x03ff) as u16) + pub fn singen_en(&self) -> SINGEN_EN_R { + SINGEN_EN_R::new(((self.bits >> 31) & 1) != 0) } } impl W { - #[doc = "Bit 31"] + #[doc = "Bits 0:9"] #[inline(always)] - pub fn singen_en(&mut self) -> SINGEN_EN_W { - SINGEN_EN_W { w: self } + #[must_use] + pub fn singen_inc_step1(&mut self) -> SINGEN_INC_STEP1_W<0> { + SINGEN_INC_STEP1_W::new(self) } - #[doc = "Bits 29:30"] + #[doc = "Bits 16:25"] #[inline(always)] - pub fn singen_clkdiv_n(&mut self) -> SINGEN_CLKDIV_N_W { - SINGEN_CLKDIV_N_W { w: self } + #[must_use] + pub fn singen_inc_step0(&mut self) -> SINGEN_INC_STEP0_W<16> { + SINGEN_INC_STEP0_W::new(self) } #[doc = "Bit 28"] #[inline(always)] - pub fn singen_unsign_en(&mut self) -> SINGEN_UNSIGN_EN_W { - SINGEN_UNSIGN_EN_W { w: self } + #[must_use] + pub fn singen_unsign_en(&mut self) -> SINGEN_UNSIGN_EN_W<28> { + SINGEN_UNSIGN_EN_W::new(self) } - #[doc = "Bits 16:25"] + #[doc = "Bits 29:30"] #[inline(always)] - pub fn singen_inc_step0(&mut self) -> SINGEN_INC_STEP0_W { - SINGEN_INC_STEP0_W { w: self } + #[must_use] + pub fn singen_clkdiv_n(&mut self) -> SINGEN_CLKDIV_N_W<29> { + SINGEN_CLKDIV_N_W::new(self) } - #[doc = "Bits 0:9"] + #[doc = "Bit 31"] #[inline(always)] - pub fn singen_inc_step1(&mut self) -> SINGEN_INC_STEP1_W { - SINGEN_INC_STEP1_W { w: self } + #[must_use] + pub fn singen_en(&mut self) -> SINGEN_EN_W<31> { + SINGEN_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -253,11 +135,10 @@ impl crate::Readable for SINGEN_CTRL0_SPEC { #[doc = "`write(|w| ..)` method takes [singen_ctrl0::W](W) writer structure"] impl crate::Writable for SINGEN_CTRL0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets singen_ctrl0 to value 0"] impl crate::Resettable for SINGEN_CTRL0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/singen_ctrl1.rs b/src/rf/singen_ctrl1.rs index 5c52cd1..4935947 100644 --- a/src/rf/singen_ctrl1.rs +++ b/src/rf/singen_ctrl1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,159 +28,81 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `singen_mode_i` reader - "] -pub struct SINGEN_MODE_I_R(crate::FieldReader); -impl SINGEN_MODE_I_R { - pub(crate) fn new(bits: u8) -> Self { - SINGEN_MODE_I_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SINGEN_MODE_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `singen_mode_i` writer - "] -pub struct SINGEN_MODE_I_W<'a> { - w: &'a mut W, -} -impl<'a> SINGEN_MODE_I_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 28)) | ((value as u32 & 0x0f) << 28); - self.w - } -} -#[doc = "Field `singen_clkdiv_i` reader - "] -pub struct SINGEN_CLKDIV_I_R(crate::FieldReader); -impl SINGEN_CLKDIV_I_R { - pub(crate) fn new(bits: u16) -> Self { - SINGEN_CLKDIV_I_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SINGEN_CLKDIV_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `singen_clkdiv_i` writer - "] -pub struct SINGEN_CLKDIV_I_W<'a> { - w: &'a mut W, -} -impl<'a> SINGEN_CLKDIV_I_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03ff << 16)) | ((value as u32 & 0x03ff) << 16); - self.w - } -} -#[doc = "Field `singen_mode_q` reader - "] -pub struct SINGEN_MODE_Q_R(crate::FieldReader); -impl SINGEN_MODE_Q_R { - pub(crate) fn new(bits: u8) -> Self { - SINGEN_MODE_Q_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SINGEN_MODE_Q_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `singen_mode_q` writer - "] -pub struct SINGEN_MODE_Q_W<'a> { - w: &'a mut W, -} -impl<'a> SINGEN_MODE_Q_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 12)) | ((value as u32 & 0x0f) << 12); - self.w - } -} #[doc = "Field `singen_clkdiv_q` reader - "] -pub struct SINGEN_CLKDIV_Q_R(crate::FieldReader); -impl SINGEN_CLKDIV_Q_R { - pub(crate) fn new(bits: u16) -> Self { - SINGEN_CLKDIV_Q_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SINGEN_CLKDIV_Q_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SINGEN_CLKDIV_Q_R = crate::FieldReader; #[doc = "Field `singen_clkdiv_q` writer - "] -pub struct SINGEN_CLKDIV_Q_W<'a> { - w: &'a mut W, -} -impl<'a> SINGEN_CLKDIV_Q_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type SINGEN_CLKDIV_Q_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SINGEN_CTRL1_SPEC, u16, u16, 10, O>; +#[doc = "Field `singen_mode_q` reader - "] +pub type SINGEN_MODE_Q_R = crate::FieldReader; +#[doc = "Field `singen_mode_q` writer - "] +pub type SINGEN_MODE_Q_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SINGEN_CTRL1_SPEC, u8, u8, 4, O>; +#[doc = "Field `singen_clkdiv_i` reader - "] +pub type SINGEN_CLKDIV_I_R = crate::FieldReader; +#[doc = "Field `singen_clkdiv_i` writer - "] +pub type SINGEN_CLKDIV_I_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SINGEN_CTRL1_SPEC, u16, u16, 10, O>; +#[doc = "Field `singen_mode_i` reader - "] +pub type SINGEN_MODE_I_R = crate::FieldReader; +#[doc = "Field `singen_mode_i` writer - "] +pub type SINGEN_MODE_I_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SINGEN_CTRL1_SPEC, u8, u8, 4, O>; +impl R { + #[doc = "Bits 0:9"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03ff) | (value as u32 & 0x03ff); - self.w + pub fn singen_clkdiv_q(&self) -> SINGEN_CLKDIV_Q_R { + SINGEN_CLKDIV_Q_R::new((self.bits & 0x03ff) as u16) } -} -impl R { - #[doc = "Bits 28:31"] + #[doc = "Bits 12:15"] #[inline(always)] - pub fn singen_mode_i(&self) -> SINGEN_MODE_I_R { - SINGEN_MODE_I_R::new(((self.bits >> 28) & 0x0f) as u8) + pub fn singen_mode_q(&self) -> SINGEN_MODE_Q_R { + SINGEN_MODE_Q_R::new(((self.bits >> 12) & 0x0f) as u8) } #[doc = "Bits 16:25"] #[inline(always)] pub fn singen_clkdiv_i(&self) -> SINGEN_CLKDIV_I_R { SINGEN_CLKDIV_I_R::new(((self.bits >> 16) & 0x03ff) as u16) } - #[doc = "Bits 12:15"] - #[inline(always)] - pub fn singen_mode_q(&self) -> SINGEN_MODE_Q_R { - SINGEN_MODE_Q_R::new(((self.bits >> 12) & 0x0f) as u8) - } - #[doc = "Bits 0:9"] + #[doc = "Bits 28:31"] #[inline(always)] - pub fn singen_clkdiv_q(&self) -> SINGEN_CLKDIV_Q_R { - SINGEN_CLKDIV_Q_R::new((self.bits & 0x03ff) as u16) + pub fn singen_mode_i(&self) -> SINGEN_MODE_I_R { + SINGEN_MODE_I_R::new(((self.bits >> 28) & 0x0f) as u8) } } impl W { - #[doc = "Bits 28:31"] + #[doc = "Bits 0:9"] #[inline(always)] - pub fn singen_mode_i(&mut self) -> SINGEN_MODE_I_W { - SINGEN_MODE_I_W { w: self } + #[must_use] + pub fn singen_clkdiv_q(&mut self) -> SINGEN_CLKDIV_Q_W<0> { + SINGEN_CLKDIV_Q_W::new(self) } - #[doc = "Bits 16:25"] + #[doc = "Bits 12:15"] #[inline(always)] - pub fn singen_clkdiv_i(&mut self) -> SINGEN_CLKDIV_I_W { - SINGEN_CLKDIV_I_W { w: self } + #[must_use] + pub fn singen_mode_q(&mut self) -> SINGEN_MODE_Q_W<12> { + SINGEN_MODE_Q_W::new(self) } - #[doc = "Bits 12:15"] + #[doc = "Bits 16:25"] #[inline(always)] - pub fn singen_mode_q(&mut self) -> SINGEN_MODE_Q_W { - SINGEN_MODE_Q_W { w: self } + #[must_use] + pub fn singen_clkdiv_i(&mut self) -> SINGEN_CLKDIV_I_W<16> { + SINGEN_CLKDIV_I_W::new(self) } - #[doc = "Bits 0:9"] + #[doc = "Bits 28:31"] #[inline(always)] - pub fn singen_clkdiv_q(&mut self) -> SINGEN_CLKDIV_Q_W { - SINGEN_CLKDIV_Q_W { w: self } + #[must_use] + pub fn singen_mode_i(&mut self) -> SINGEN_MODE_I_W<28> { + SINGEN_MODE_I_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -197,11 +120,10 @@ impl crate::Readable for SINGEN_CTRL1_SPEC { #[doc = "`write(|w| ..)` method takes [singen_ctrl1::W](W) writer structure"] impl crate::Writable for SINGEN_CTRL1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets singen_ctrl1 to value 0"] impl crate::Resettable for SINGEN_CTRL1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/singen_ctrl2.rs b/src/rf/singen_ctrl2.rs index 775c193..6038a3e 100644 --- a/src/rf/singen_ctrl2.rs +++ b/src/rf/singen_ctrl2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,123 +28,65 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `singen_start_addr0_i` reader - "] -pub struct SINGEN_START_ADDR0_I_R(crate::FieldReader); -impl SINGEN_START_ADDR0_I_R { - pub(crate) fn new(bits: u16) -> Self { - SINGEN_START_ADDR0_I_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SINGEN_START_ADDR0_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `singen_start_addr0_i` writer - "] -pub struct SINGEN_START_ADDR0_I_W<'a> { - w: &'a mut W, -} -impl<'a> SINGEN_START_ADDR0_I_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03ff << 22)) | ((value as u32 & 0x03ff) << 22); - self.w - } -} -#[doc = "Field `singen_start_addr1_i` reader - "] -pub struct SINGEN_START_ADDR1_I_R(crate::FieldReader); -impl SINGEN_START_ADDR1_I_R { - pub(crate) fn new(bits: u16) -> Self { - SINGEN_START_ADDR1_I_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SINGEN_START_ADDR1_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `singen_start_addr1_i` writer - "] -pub struct SINGEN_START_ADDR1_I_W<'a> { - w: &'a mut W, -} -impl<'a> SINGEN_START_ADDR1_I_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03ff << 12)) | ((value as u32 & 0x03ff) << 12); - self.w - } -} #[doc = "Field `singen_gain_i` reader - "] -pub struct SINGEN_GAIN_I_R(crate::FieldReader); -impl SINGEN_GAIN_I_R { - pub(crate) fn new(bits: u16) -> Self { - SINGEN_GAIN_I_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SINGEN_GAIN_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SINGEN_GAIN_I_R = crate::FieldReader; #[doc = "Field `singen_gain_i` writer - "] -pub struct SINGEN_GAIN_I_W<'a> { - w: &'a mut W, -} -impl<'a> SINGEN_GAIN_I_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x07ff) | (value as u32 & 0x07ff); - self.w - } -} +pub type SINGEN_GAIN_I_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SINGEN_CTRL2_SPEC, u16, u16, 11, O>; +#[doc = "Field `singen_start_addr1_i` reader - "] +pub type SINGEN_START_ADDR1_I_R = crate::FieldReader; +#[doc = "Field `singen_start_addr1_i` writer - "] +pub type SINGEN_START_ADDR1_I_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SINGEN_CTRL2_SPEC, u16, u16, 10, O>; +#[doc = "Field `singen_start_addr0_i` reader - "] +pub type SINGEN_START_ADDR0_I_R = crate::FieldReader; +#[doc = "Field `singen_start_addr0_i` writer - "] +pub type SINGEN_START_ADDR0_I_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SINGEN_CTRL2_SPEC, u16, u16, 10, O>; impl R { - #[doc = "Bits 22:31"] + #[doc = "Bits 0:10"] #[inline(always)] - pub fn singen_start_addr0_i(&self) -> SINGEN_START_ADDR0_I_R { - SINGEN_START_ADDR0_I_R::new(((self.bits >> 22) & 0x03ff) as u16) + pub fn singen_gain_i(&self) -> SINGEN_GAIN_I_R { + SINGEN_GAIN_I_R::new((self.bits & 0x07ff) as u16) } #[doc = "Bits 12:21"] #[inline(always)] pub fn singen_start_addr1_i(&self) -> SINGEN_START_ADDR1_I_R { SINGEN_START_ADDR1_I_R::new(((self.bits >> 12) & 0x03ff) as u16) } - #[doc = "Bits 0:10"] + #[doc = "Bits 22:31"] #[inline(always)] - pub fn singen_gain_i(&self) -> SINGEN_GAIN_I_R { - SINGEN_GAIN_I_R::new((self.bits & 0x07ff) as u16) + pub fn singen_start_addr0_i(&self) -> SINGEN_START_ADDR0_I_R { + SINGEN_START_ADDR0_I_R::new(((self.bits >> 22) & 0x03ff) as u16) } } impl W { - #[doc = "Bits 22:31"] + #[doc = "Bits 0:10"] #[inline(always)] - pub fn singen_start_addr0_i(&mut self) -> SINGEN_START_ADDR0_I_W { - SINGEN_START_ADDR0_I_W { w: self } + #[must_use] + pub fn singen_gain_i(&mut self) -> SINGEN_GAIN_I_W<0> { + SINGEN_GAIN_I_W::new(self) } #[doc = "Bits 12:21"] #[inline(always)] - pub fn singen_start_addr1_i(&mut self) -> SINGEN_START_ADDR1_I_W { - SINGEN_START_ADDR1_I_W { w: self } + #[must_use] + pub fn singen_start_addr1_i(&mut self) -> SINGEN_START_ADDR1_I_W<12> { + SINGEN_START_ADDR1_I_W::new(self) } - #[doc = "Bits 0:10"] + #[doc = "Bits 22:31"] #[inline(always)] - pub fn singen_gain_i(&mut self) -> SINGEN_GAIN_I_W { - SINGEN_GAIN_I_W { w: self } + #[must_use] + pub fn singen_start_addr0_i(&mut self) -> SINGEN_START_ADDR0_I_W<22> { + SINGEN_START_ADDR0_I_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -161,11 +104,10 @@ impl crate::Readable for SINGEN_CTRL2_SPEC { #[doc = "`write(|w| ..)` method takes [singen_ctrl2::W](W) writer structure"] impl crate::Writable for SINGEN_CTRL2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets singen_ctrl2 to value 0"] impl crate::Resettable for SINGEN_CTRL2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/singen_ctrl3.rs b/src/rf/singen_ctrl3.rs index 498b803..5f49786 100644 --- a/src/rf/singen_ctrl3.rs +++ b/src/rf/singen_ctrl3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,123 +28,65 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `singen_start_addr0_q` reader - "] -pub struct SINGEN_START_ADDR0_Q_R(crate::FieldReader); -impl SINGEN_START_ADDR0_Q_R { - pub(crate) fn new(bits: u16) -> Self { - SINGEN_START_ADDR0_Q_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SINGEN_START_ADDR0_Q_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `singen_start_addr0_q` writer - "] -pub struct SINGEN_START_ADDR0_Q_W<'a> { - w: &'a mut W, -} -impl<'a> SINGEN_START_ADDR0_Q_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03ff << 22)) | ((value as u32 & 0x03ff) << 22); - self.w - } -} -#[doc = "Field `singen_start_addr1_q` reader - "] -pub struct SINGEN_START_ADDR1_Q_R(crate::FieldReader); -impl SINGEN_START_ADDR1_Q_R { - pub(crate) fn new(bits: u16) -> Self { - SINGEN_START_ADDR1_Q_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SINGEN_START_ADDR1_Q_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `singen_start_addr1_q` writer - "] -pub struct SINGEN_START_ADDR1_Q_W<'a> { - w: &'a mut W, -} -impl<'a> SINGEN_START_ADDR1_Q_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03ff << 12)) | ((value as u32 & 0x03ff) << 12); - self.w - } -} #[doc = "Field `singen_gain_q` reader - "] -pub struct SINGEN_GAIN_Q_R(crate::FieldReader); -impl SINGEN_GAIN_Q_R { - pub(crate) fn new(bits: u16) -> Self { - SINGEN_GAIN_Q_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SINGEN_GAIN_Q_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SINGEN_GAIN_Q_R = crate::FieldReader; #[doc = "Field `singen_gain_q` writer - "] -pub struct SINGEN_GAIN_Q_W<'a> { - w: &'a mut W, -} -impl<'a> SINGEN_GAIN_Q_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x07ff) | (value as u32 & 0x07ff); - self.w - } -} +pub type SINGEN_GAIN_Q_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SINGEN_CTRL3_SPEC, u16, u16, 11, O>; +#[doc = "Field `singen_start_addr1_q` reader - "] +pub type SINGEN_START_ADDR1_Q_R = crate::FieldReader; +#[doc = "Field `singen_start_addr1_q` writer - "] +pub type SINGEN_START_ADDR1_Q_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SINGEN_CTRL3_SPEC, u16, u16, 10, O>; +#[doc = "Field `singen_start_addr0_q` reader - "] +pub type SINGEN_START_ADDR0_Q_R = crate::FieldReader; +#[doc = "Field `singen_start_addr0_q` writer - "] +pub type SINGEN_START_ADDR0_Q_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SINGEN_CTRL3_SPEC, u16, u16, 10, O>; impl R { - #[doc = "Bits 22:31"] + #[doc = "Bits 0:10"] #[inline(always)] - pub fn singen_start_addr0_q(&self) -> SINGEN_START_ADDR0_Q_R { - SINGEN_START_ADDR0_Q_R::new(((self.bits >> 22) & 0x03ff) as u16) + pub fn singen_gain_q(&self) -> SINGEN_GAIN_Q_R { + SINGEN_GAIN_Q_R::new((self.bits & 0x07ff) as u16) } #[doc = "Bits 12:21"] #[inline(always)] pub fn singen_start_addr1_q(&self) -> SINGEN_START_ADDR1_Q_R { SINGEN_START_ADDR1_Q_R::new(((self.bits >> 12) & 0x03ff) as u16) } - #[doc = "Bits 0:10"] + #[doc = "Bits 22:31"] #[inline(always)] - pub fn singen_gain_q(&self) -> SINGEN_GAIN_Q_R { - SINGEN_GAIN_Q_R::new((self.bits & 0x07ff) as u16) + pub fn singen_start_addr0_q(&self) -> SINGEN_START_ADDR0_Q_R { + SINGEN_START_ADDR0_Q_R::new(((self.bits >> 22) & 0x03ff) as u16) } } impl W { - #[doc = "Bits 22:31"] + #[doc = "Bits 0:10"] #[inline(always)] - pub fn singen_start_addr0_q(&mut self) -> SINGEN_START_ADDR0_Q_W { - SINGEN_START_ADDR0_Q_W { w: self } + #[must_use] + pub fn singen_gain_q(&mut self) -> SINGEN_GAIN_Q_W<0> { + SINGEN_GAIN_Q_W::new(self) } #[doc = "Bits 12:21"] #[inline(always)] - pub fn singen_start_addr1_q(&mut self) -> SINGEN_START_ADDR1_Q_W { - SINGEN_START_ADDR1_Q_W { w: self } + #[must_use] + pub fn singen_start_addr1_q(&mut self) -> SINGEN_START_ADDR1_Q_W<12> { + SINGEN_START_ADDR1_Q_W::new(self) } - #[doc = "Bits 0:10"] + #[doc = "Bits 22:31"] #[inline(always)] - pub fn singen_gain_q(&mut self) -> SINGEN_GAIN_Q_W { - SINGEN_GAIN_Q_W { w: self } + #[must_use] + pub fn singen_start_addr0_q(&mut self) -> SINGEN_START_ADDR0_Q_W<22> { + SINGEN_START_ADDR0_Q_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -161,11 +104,10 @@ impl crate::Readable for SINGEN_CTRL3_SPEC { #[doc = "`write(|w| ..)` method takes [singen_ctrl3::W](W) writer structure"] impl crate::Writable for SINGEN_CTRL3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets singen_ctrl3 to value 0"] impl crate::Resettable for SINGEN_CTRL3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/singen_ctrl4.rs b/src/rf/singen_ctrl4.rs index 5b90343..f0cea37 100644 --- a/src/rf/singen_ctrl4.rs +++ b/src/rf/singen_ctrl4.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,179 +28,79 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `singen_fix_en_i` reader - "] -pub struct SINGEN_FIX_EN_I_R(crate::FieldReader); -impl SINGEN_FIX_EN_I_R { - pub(crate) fn new(bits: bool) -> Self { - SINGEN_FIX_EN_I_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SINGEN_FIX_EN_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `singen_fix_en_i` writer - "] -pub struct SINGEN_FIX_EN_I_W<'a> { - w: &'a mut W, -} -impl<'a> SINGEN_FIX_EN_I_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 28)) | ((value as u32 & 0x01) << 28); - self.w - } -} -#[doc = "Field `singen_fix_i` reader - "] -pub struct SINGEN_FIX_I_R(crate::FieldReader); -impl SINGEN_FIX_I_R { - pub(crate) fn new(bits: u16) -> Self { - SINGEN_FIX_I_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SINGEN_FIX_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `singen_fix_i` writer - "] -pub struct SINGEN_FIX_I_W<'a> { - w: &'a mut W, -} -impl<'a> SINGEN_FIX_I_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0fff << 16)) | ((value as u32 & 0x0fff) << 16); - self.w - } -} -#[doc = "Field `singen_fix_en_q` reader - "] -pub struct SINGEN_FIX_EN_Q_R(crate::FieldReader); -impl SINGEN_FIX_EN_Q_R { - pub(crate) fn new(bits: bool) -> Self { - SINGEN_FIX_EN_Q_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SINGEN_FIX_EN_Q_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `singen_fix_en_q` writer - "] -pub struct SINGEN_FIX_EN_Q_W<'a> { - w: &'a mut W, -} -impl<'a> SINGEN_FIX_EN_Q_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} #[doc = "Field `singen_fix_q` reader - "] -pub struct SINGEN_FIX_Q_R(crate::FieldReader); -impl SINGEN_FIX_Q_R { - pub(crate) fn new(bits: u16) -> Self { - SINGEN_FIX_Q_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SINGEN_FIX_Q_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SINGEN_FIX_Q_R = crate::FieldReader; #[doc = "Field `singen_fix_q` writer - "] -pub struct SINGEN_FIX_Q_W<'a> { - w: &'a mut W, -} -impl<'a> SINGEN_FIX_Q_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type SINGEN_FIX_Q_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SINGEN_CTRL4_SPEC, u16, u16, 12, O>; +#[doc = "Field `singen_fix_en_q` reader - "] +pub type SINGEN_FIX_EN_Q_R = crate::BitReader; +#[doc = "Field `singen_fix_en_q` writer - "] +pub type SINGEN_FIX_EN_Q_W<'a, const O: u8> = crate::BitWriter<'a, u32, SINGEN_CTRL4_SPEC, bool, O>; +#[doc = "Field `singen_fix_i` reader - "] +pub type SINGEN_FIX_I_R = crate::FieldReader; +#[doc = "Field `singen_fix_i` writer - "] +pub type SINGEN_FIX_I_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SINGEN_CTRL4_SPEC, u16, u16, 12, O>; +#[doc = "Field `singen_fix_en_i` reader - "] +pub type SINGEN_FIX_EN_I_R = crate::BitReader; +#[doc = "Field `singen_fix_en_i` writer - "] +pub type SINGEN_FIX_EN_I_W<'a, const O: u8> = crate::BitWriter<'a, u32, SINGEN_CTRL4_SPEC, bool, O>; +impl R { + #[doc = "Bits 0:11"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x0fff) | (value as u32 & 0x0fff); - self.w + pub fn singen_fix_q(&self) -> SINGEN_FIX_Q_R { + SINGEN_FIX_Q_R::new((self.bits & 0x0fff) as u16) } -} -impl R { - #[doc = "Bit 28"] + #[doc = "Bit 12"] #[inline(always)] - pub fn singen_fix_en_i(&self) -> SINGEN_FIX_EN_I_R { - SINGEN_FIX_EN_I_R::new(((self.bits >> 28) & 0x01) != 0) + pub fn singen_fix_en_q(&self) -> SINGEN_FIX_EN_Q_R { + SINGEN_FIX_EN_Q_R::new(((self.bits >> 12) & 1) != 0) } #[doc = "Bits 16:27"] #[inline(always)] pub fn singen_fix_i(&self) -> SINGEN_FIX_I_R { SINGEN_FIX_I_R::new(((self.bits >> 16) & 0x0fff) as u16) } - #[doc = "Bit 12"] - #[inline(always)] - pub fn singen_fix_en_q(&self) -> SINGEN_FIX_EN_Q_R { - SINGEN_FIX_EN_Q_R::new(((self.bits >> 12) & 0x01) != 0) - } - #[doc = "Bits 0:11"] + #[doc = "Bit 28"] #[inline(always)] - pub fn singen_fix_q(&self) -> SINGEN_FIX_Q_R { - SINGEN_FIX_Q_R::new((self.bits & 0x0fff) as u16) + pub fn singen_fix_en_i(&self) -> SINGEN_FIX_EN_I_R { + SINGEN_FIX_EN_I_R::new(((self.bits >> 28) & 1) != 0) } } impl W { - #[doc = "Bit 28"] + #[doc = "Bits 0:11"] #[inline(always)] - pub fn singen_fix_en_i(&mut self) -> SINGEN_FIX_EN_I_W { - SINGEN_FIX_EN_I_W { w: self } + #[must_use] + pub fn singen_fix_q(&mut self) -> SINGEN_FIX_Q_W<0> { + SINGEN_FIX_Q_W::new(self) } - #[doc = "Bits 16:27"] + #[doc = "Bit 12"] #[inline(always)] - pub fn singen_fix_i(&mut self) -> SINGEN_FIX_I_W { - SINGEN_FIX_I_W { w: self } + #[must_use] + pub fn singen_fix_en_q(&mut self) -> SINGEN_FIX_EN_Q_W<12> { + SINGEN_FIX_EN_Q_W::new(self) } - #[doc = "Bit 12"] + #[doc = "Bits 16:27"] #[inline(always)] - pub fn singen_fix_en_q(&mut self) -> SINGEN_FIX_EN_Q_W { - SINGEN_FIX_EN_Q_W { w: self } + #[must_use] + pub fn singen_fix_i(&mut self) -> SINGEN_FIX_I_W<16> { + SINGEN_FIX_I_W::new(self) } - #[doc = "Bits 0:11"] + #[doc = "Bit 28"] #[inline(always)] - pub fn singen_fix_q(&mut self) -> SINGEN_FIX_Q_W { - SINGEN_FIX_Q_W { w: self } + #[must_use] + pub fn singen_fix_en_i(&mut self) -> SINGEN_FIX_EN_I_W<28> { + SINGEN_FIX_EN_I_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -217,11 +118,10 @@ impl crate::Readable for SINGEN_CTRL4_SPEC { #[doc = "`write(|w| ..)` method takes [singen_ctrl4::W](W) writer structure"] impl crate::Writable for SINGEN_CTRL4_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets singen_ctrl4 to value 0"] impl crate::Resettable for SINGEN_CTRL4_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/tbb.rs b/src/rf/tbb.rs index 211dd38..28f5fe2 100644 --- a/src/rf/tbb.rs +++ b/src/rf/tbb.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,323 +28,137 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `tbb_tosdac_i` reader - "] -pub struct TBB_TOSDAC_I_R(crate::FieldReader); -impl TBB_TOSDAC_I_R { - pub(crate) fn new(bits: u8) -> Self { - TBB_TOSDAC_I_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TBB_TOSDAC_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tbb_tosdac_i` writer - "] -pub struct TBB_TOSDAC_I_W<'a> { - w: &'a mut W, -} -impl<'a> TBB_TOSDAC_I_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 24)) | ((value as u32 & 0x3f) << 24); - self.w - } -} -#[doc = "Field `tbb_tosdac_q` reader - "] -pub struct TBB_TOSDAC_Q_R(crate::FieldReader); -impl TBB_TOSDAC_Q_R { - pub(crate) fn new(bits: u8) -> Self { - TBB_TOSDAC_Q_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TBB_TOSDAC_Q_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tbb_tosdac_q` writer - "] -pub struct TBB_TOSDAC_Q_W<'a> { - w: &'a mut W, -} -impl<'a> TBB_TOSDAC_Q_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 16)) | ((value as u32 & 0x3f) << 16); - self.w - } -} -#[doc = "Field `tbb_atest_out_en` reader - "] -pub struct TBB_ATEST_OUT_EN_R(crate::FieldReader); -impl TBB_ATEST_OUT_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TBB_ATEST_OUT_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TBB_ATEST_OUT_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tbb_atest_out_en` writer - "] -pub struct TBB_ATEST_OUT_EN_W<'a> { - w: &'a mut W, -} -impl<'a> TBB_ATEST_OUT_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15); - self.w - } -} -#[doc = "Field `tbb_iq_bias_short` reader - "] -pub struct TBB_IQ_BIAS_SHORT_R(crate::FieldReader); -impl TBB_IQ_BIAS_SHORT_R { - pub(crate) fn new(bits: bool) -> Self { - TBB_IQ_BIAS_SHORT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TBB_IQ_BIAS_SHORT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tbb_iq_bias_short` writer - "] -pub struct TBB_IQ_BIAS_SHORT_W<'a> { - w: &'a mut W, -} -impl<'a> TBB_IQ_BIAS_SHORT_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14); - self.w - } -} -#[doc = "Field `tbb_cflt` reader - "] -pub struct TBB_CFLT_R(crate::FieldReader); -impl TBB_CFLT_R { - pub(crate) fn new(bits: u8) -> Self { - TBB_CFLT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TBB_CFLT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tbb_cflt` writer - "] -pub struct TBB_CFLT_W<'a> { - w: &'a mut W, -} -impl<'a> TBB_CFLT_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 12)) | ((value as u32 & 0x03) << 12); - self.w - } -} +#[doc = "Field `tbb_bm_sf` reader - "] +pub type TBB_BM_SF_R = crate::FieldReader; +#[doc = "Field `tbb_bm_sf` writer - "] +pub type TBB_BM_SF_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TBB_SPEC, u8, u8, 2, O>; +#[doc = "Field `tbb_bm_cg` reader - "] +pub type TBB_BM_CG_R = crate::FieldReader; +#[doc = "Field `tbb_bm_cg` writer - "] +pub type TBB_BM_CG_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TBB_SPEC, u8, u8, 2, O>; #[doc = "Field `tbb_vcm` reader - "] -pub struct TBB_VCM_R(crate::FieldReader); -impl TBB_VCM_R { - pub(crate) fn new(bits: u8) -> Self { - TBB_VCM_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TBB_VCM_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TBB_VCM_R = crate::FieldReader; #[doc = "Field `tbb_vcm` writer - "] -pub struct TBB_VCM_W<'a> { - w: &'a mut W, -} -impl<'a> TBB_VCM_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type TBB_VCM_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TBB_SPEC, u8, u8, 2, O>; +#[doc = "Field `tbb_cflt` reader - "] +pub type TBB_CFLT_R = crate::FieldReader; +#[doc = "Field `tbb_cflt` writer - "] +pub type TBB_CFLT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TBB_SPEC, u8, u8, 2, O>; +#[doc = "Field `tbb_iq_bias_short` reader - "] +pub type TBB_IQ_BIAS_SHORT_R = crate::BitReader; +#[doc = "Field `tbb_iq_bias_short` writer - "] +pub type TBB_IQ_BIAS_SHORT_W<'a, const O: u8> = crate::BitWriter<'a, u32, TBB_SPEC, bool, O>; +#[doc = "Field `tbb_atest_out_en` reader - "] +pub type TBB_ATEST_OUT_EN_R = crate::BitReader; +#[doc = "Field `tbb_atest_out_en` writer - "] +pub type TBB_ATEST_OUT_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, TBB_SPEC, bool, O>; +#[doc = "Field `tbb_tosdac_q` reader - "] +pub type TBB_TOSDAC_Q_R = crate::FieldReader; +#[doc = "Field `tbb_tosdac_q` writer - "] +pub type TBB_TOSDAC_Q_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TBB_SPEC, u8, u8, 6, O>; +#[doc = "Field `tbb_tosdac_i` reader - "] +pub type TBB_TOSDAC_I_R = crate::FieldReader; +#[doc = "Field `tbb_tosdac_i` writer - "] +pub type TBB_TOSDAC_I_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TBB_SPEC, u8, u8, 6, O>; +impl R { + #[doc = "Bits 0:1"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} -#[doc = "Field `tbb_bm_cg` reader - "] -pub struct TBB_BM_CG_R(crate::FieldReader); -impl TBB_BM_CG_R { - pub(crate) fn new(bits: u8) -> Self { - TBB_BM_CG_R(crate::FieldReader::new(bits)) + pub fn tbb_bm_sf(&self) -> TBB_BM_SF_R { + TBB_BM_SF_R::new((self.bits & 3) as u8) } -} -impl core::ops::Deref for TBB_BM_CG_R { - type Target = crate::FieldReader; + #[doc = "Bits 4:5"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn tbb_bm_cg(&self) -> TBB_BM_CG_R { + TBB_BM_CG_R::new(((self.bits >> 4) & 3) as u8) } -} -#[doc = "Field `tbb_bm_cg` writer - "] -pub struct TBB_BM_CG_W<'a> { - w: &'a mut W, -} -impl<'a> TBB_BM_CG_W<'a> { - #[doc = r"Writes raw bits to the field"] + #[doc = "Bits 8:9"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 4)) | ((value as u32 & 0x03) << 4); - self.w - } -} -#[doc = "Field `tbb_bm_sf` reader - "] -pub struct TBB_BM_SF_R(crate::FieldReader); -impl TBB_BM_SF_R { - pub(crate) fn new(bits: u8) -> Self { - TBB_BM_SF_R(crate::FieldReader::new(bits)) + pub fn tbb_vcm(&self) -> TBB_VCM_R { + TBB_VCM_R::new(((self.bits >> 8) & 3) as u8) } -} -impl core::ops::Deref for TBB_BM_SF_R { - type Target = crate::FieldReader; + #[doc = "Bits 12:13"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn tbb_cflt(&self) -> TBB_CFLT_R { + TBB_CFLT_R::new(((self.bits >> 12) & 3) as u8) } -} -#[doc = "Field `tbb_bm_sf` writer - "] -pub struct TBB_BM_SF_W<'a> { - w: &'a mut W, -} -impl<'a> TBB_BM_SF_W<'a> { - #[doc = r"Writes raw bits to the field"] + #[doc = "Bit 14"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w + pub fn tbb_iq_bias_short(&self) -> TBB_IQ_BIAS_SHORT_R { + TBB_IQ_BIAS_SHORT_R::new(((self.bits >> 14) & 1) != 0) } -} -impl R { - #[doc = "Bits 24:29"] + #[doc = "Bit 15"] #[inline(always)] - pub fn tbb_tosdac_i(&self) -> TBB_TOSDAC_I_R { - TBB_TOSDAC_I_R::new(((self.bits >> 24) & 0x3f) as u8) + pub fn tbb_atest_out_en(&self) -> TBB_ATEST_OUT_EN_R { + TBB_ATEST_OUT_EN_R::new(((self.bits >> 15) & 1) != 0) } #[doc = "Bits 16:21"] #[inline(always)] pub fn tbb_tosdac_q(&self) -> TBB_TOSDAC_Q_R { TBB_TOSDAC_Q_R::new(((self.bits >> 16) & 0x3f) as u8) } - #[doc = "Bit 15"] - #[inline(always)] - pub fn tbb_atest_out_en(&self) -> TBB_ATEST_OUT_EN_R { - TBB_ATEST_OUT_EN_R::new(((self.bits >> 15) & 0x01) != 0) - } - #[doc = "Bit 14"] - #[inline(always)] - pub fn tbb_iq_bias_short(&self) -> TBB_IQ_BIAS_SHORT_R { - TBB_IQ_BIAS_SHORT_R::new(((self.bits >> 14) & 0x01) != 0) - } - #[doc = "Bits 12:13"] - #[inline(always)] - pub fn tbb_cflt(&self) -> TBB_CFLT_R { - TBB_CFLT_R::new(((self.bits >> 12) & 0x03) as u8) - } - #[doc = "Bits 8:9"] - #[inline(always)] - pub fn tbb_vcm(&self) -> TBB_VCM_R { - TBB_VCM_R::new(((self.bits >> 8) & 0x03) as u8) - } - #[doc = "Bits 4:5"] - #[inline(always)] - pub fn tbb_bm_cg(&self) -> TBB_BM_CG_R { - TBB_BM_CG_R::new(((self.bits >> 4) & 0x03) as u8) - } - #[doc = "Bits 0:1"] + #[doc = "Bits 24:29"] #[inline(always)] - pub fn tbb_bm_sf(&self) -> TBB_BM_SF_R { - TBB_BM_SF_R::new((self.bits & 0x03) as u8) + pub fn tbb_tosdac_i(&self) -> TBB_TOSDAC_I_R { + TBB_TOSDAC_I_R::new(((self.bits >> 24) & 0x3f) as u8) } } impl W { - #[doc = "Bits 24:29"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn tbb_tosdac_i(&mut self) -> TBB_TOSDAC_I_W { - TBB_TOSDAC_I_W { w: self } + #[must_use] + pub fn tbb_bm_sf(&mut self) -> TBB_BM_SF_W<0> { + TBB_BM_SF_W::new(self) } - #[doc = "Bits 16:21"] + #[doc = "Bits 4:5"] #[inline(always)] - pub fn tbb_tosdac_q(&mut self) -> TBB_TOSDAC_Q_W { - TBB_TOSDAC_Q_W { w: self } + #[must_use] + pub fn tbb_bm_cg(&mut self) -> TBB_BM_CG_W<4> { + TBB_BM_CG_W::new(self) } - #[doc = "Bit 15"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn tbb_atest_out_en(&mut self) -> TBB_ATEST_OUT_EN_W { - TBB_ATEST_OUT_EN_W { w: self } + #[must_use] + pub fn tbb_vcm(&mut self) -> TBB_VCM_W<8> { + TBB_VCM_W::new(self) } - #[doc = "Bit 14"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn tbb_iq_bias_short(&mut self) -> TBB_IQ_BIAS_SHORT_W { - TBB_IQ_BIAS_SHORT_W { w: self } + #[must_use] + pub fn tbb_cflt(&mut self) -> TBB_CFLT_W<12> { + TBB_CFLT_W::new(self) } - #[doc = "Bits 12:13"] + #[doc = "Bit 14"] #[inline(always)] - pub fn tbb_cflt(&mut self) -> TBB_CFLT_W { - TBB_CFLT_W { w: self } + #[must_use] + pub fn tbb_iq_bias_short(&mut self) -> TBB_IQ_BIAS_SHORT_W<14> { + TBB_IQ_BIAS_SHORT_W::new(self) } - #[doc = "Bits 8:9"] + #[doc = "Bit 15"] #[inline(always)] - pub fn tbb_vcm(&mut self) -> TBB_VCM_W { - TBB_VCM_W { w: self } + #[must_use] + pub fn tbb_atest_out_en(&mut self) -> TBB_ATEST_OUT_EN_W<15> { + TBB_ATEST_OUT_EN_W::new(self) } - #[doc = "Bits 4:5"] + #[doc = "Bits 16:21"] #[inline(always)] - pub fn tbb_bm_cg(&mut self) -> TBB_BM_CG_W { - TBB_BM_CG_W { w: self } + #[must_use] + pub fn tbb_tosdac_q(&mut self) -> TBB_TOSDAC_Q_W<16> { + TBB_TOSDAC_Q_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bits 24:29"] #[inline(always)] - pub fn tbb_bm_sf(&mut self) -> TBB_BM_SF_W { - TBB_BM_SF_W { w: self } + #[must_use] + pub fn tbb_tosdac_i(&mut self) -> TBB_TOSDAC_I_W<24> { + TBB_TOSDAC_I_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -361,11 +176,10 @@ impl crate::Readable for TBB_SPEC { #[doc = "`write(|w| ..)` method takes [tbb::W](W) writer structure"] impl crate::Writable for TBB_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets tbb to value 0"] impl crate::Resettable for TBB_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/tbb_gain_index1.rs b/src/rf/tbb_gain_index1.rs index a75edca..199e405 100644 --- a/src/rf/tbb_gain_index1.rs +++ b/src/rf/tbb_gain_index1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,303 +28,145 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `gain_ctrl1_gc_tbb_boost` reader - "] -pub struct GAIN_CTRL1_GC_TBB_BOOST_R(crate::FieldReader); -impl GAIN_CTRL1_GC_TBB_BOOST_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL1_GC_TBB_BOOST_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL1_GC_TBB_BOOST_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl1_gc_tbb_boost` writer - "] -pub struct GAIN_CTRL1_GC_TBB_BOOST_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL1_GC_TBB_BOOST_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 30)) | ((value as u32 & 0x03) << 30); - self.w - } -} -#[doc = "Field `gain_ctrl1_dac_bias_sel` reader - "] -pub struct GAIN_CTRL1_DAC_BIAS_SEL_R(crate::FieldReader); -impl GAIN_CTRL1_DAC_BIAS_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL1_DAC_BIAS_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL1_DAC_BIAS_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl1_dac_bias_sel` writer - "] -pub struct GAIN_CTRL1_DAC_BIAS_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL1_DAC_BIAS_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 28)) | ((value as u32 & 0x03) << 28); - self.w - } -} -#[doc = "Field `gain_ctrl1_gc_tmx` reader - "] -pub struct GAIN_CTRL1_GC_TMX_R(crate::FieldReader); -impl GAIN_CTRL1_GC_TMX_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL1_GC_TMX_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL1_GC_TMX_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl1_gc_tmx` writer - "] -pub struct GAIN_CTRL1_GC_TMX_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL1_GC_TMX_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 24)) | ((value as u32 & 0x07) << 24); - self.w - } -} -#[doc = "Field `gain_ctrl1_gc_tbb` reader - "] -pub struct GAIN_CTRL1_GC_TBB_R(crate::FieldReader); -impl GAIN_CTRL1_GC_TBB_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL1_GC_TBB_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL1_GC_TBB_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl1_gc_tbb` writer - "] -pub struct GAIN_CTRL1_GC_TBB_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL1_GC_TBB_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 16)) | ((value as u32 & 0x1f) << 16); - self.w - } -} -#[doc = "Field `gain_ctrl0_gc_tbb_boost` reader - "] -pub struct GAIN_CTRL0_GC_TBB_BOOST_R(crate::FieldReader); -impl GAIN_CTRL0_GC_TBB_BOOST_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL0_GC_TBB_BOOST_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL0_GC_TBB_BOOST_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl0_gc_tbb_boost` writer - "] -pub struct GAIN_CTRL0_GC_TBB_BOOST_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL0_GC_TBB_BOOST_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 14)) | ((value as u32 & 0x03) << 14); - self.w - } -} -#[doc = "Field `gain_ctrl0_dac_bias_sel` reader - "] -pub struct GAIN_CTRL0_DAC_BIAS_SEL_R(crate::FieldReader); -impl GAIN_CTRL0_DAC_BIAS_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL0_DAC_BIAS_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL0_DAC_BIAS_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl0_dac_bias_sel` writer - "] -pub struct GAIN_CTRL0_DAC_BIAS_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL0_DAC_BIAS_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 12)) | ((value as u32 & 0x03) << 12); - self.w - } -} -#[doc = "Field `gain_ctrl0_gc_tmx` reader - "] -pub struct GAIN_CTRL0_GC_TMX_R(crate::FieldReader); -impl GAIN_CTRL0_GC_TMX_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL0_GC_TMX_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL0_GC_TMX_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl0_gc_tmx` writer - "] -pub struct GAIN_CTRL0_GC_TMX_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL0_GC_TMX_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 8)) | ((value as u32 & 0x07) << 8); - self.w - } -} #[doc = "Field `gain_ctrl0_gc_tbb` reader - "] -pub struct GAIN_CTRL0_GC_TBB_R(crate::FieldReader); -impl GAIN_CTRL0_GC_TBB_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL0_GC_TBB_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL0_GC_TBB_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type GAIN_CTRL0_GC_TBB_R = crate::FieldReader; #[doc = "Field `gain_ctrl0_gc_tbb` writer - "] -pub struct GAIN_CTRL0_GC_TBB_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL0_GC_TBB_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type GAIN_CTRL0_GC_TBB_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TBB_GAIN_INDEX1_SPEC, u8, u8, 5, O>; +#[doc = "Field `gain_ctrl0_gc_tmx` reader - "] +pub type GAIN_CTRL0_GC_TMX_R = crate::FieldReader; +#[doc = "Field `gain_ctrl0_gc_tmx` writer - "] +pub type GAIN_CTRL0_GC_TMX_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TBB_GAIN_INDEX1_SPEC, u8, u8, 3, O>; +#[doc = "Field `gain_ctrl0_dac_bias_sel` reader - "] +pub type GAIN_CTRL0_DAC_BIAS_SEL_R = crate::FieldReader; +#[doc = "Field `gain_ctrl0_dac_bias_sel` writer - "] +pub type GAIN_CTRL0_DAC_BIAS_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TBB_GAIN_INDEX1_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl0_gc_tbb_boost` reader - "] +pub type GAIN_CTRL0_GC_TBB_BOOST_R = crate::FieldReader; +#[doc = "Field `gain_ctrl0_gc_tbb_boost` writer - "] +pub type GAIN_CTRL0_GC_TBB_BOOST_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TBB_GAIN_INDEX1_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl1_gc_tbb` reader - "] +pub type GAIN_CTRL1_GC_TBB_R = crate::FieldReader; +#[doc = "Field `gain_ctrl1_gc_tbb` writer - "] +pub type GAIN_CTRL1_GC_TBB_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TBB_GAIN_INDEX1_SPEC, u8, u8, 5, O>; +#[doc = "Field `gain_ctrl1_gc_tmx` reader - "] +pub type GAIN_CTRL1_GC_TMX_R = crate::FieldReader; +#[doc = "Field `gain_ctrl1_gc_tmx` writer - "] +pub type GAIN_CTRL1_GC_TMX_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TBB_GAIN_INDEX1_SPEC, u8, u8, 3, O>; +#[doc = "Field `gain_ctrl1_dac_bias_sel` reader - "] +pub type GAIN_CTRL1_DAC_BIAS_SEL_R = crate::FieldReader; +#[doc = "Field `gain_ctrl1_dac_bias_sel` writer - "] +pub type GAIN_CTRL1_DAC_BIAS_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TBB_GAIN_INDEX1_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl1_gc_tbb_boost` reader - "] +pub type GAIN_CTRL1_GC_TBB_BOOST_R = crate::FieldReader; +#[doc = "Field `gain_ctrl1_gc_tbb_boost` writer - "] +pub type GAIN_CTRL1_GC_TBB_BOOST_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TBB_GAIN_INDEX1_SPEC, u8, u8, 2, O>; +impl R { + #[doc = "Bits 0:4"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x1f) | (value as u32 & 0x1f); - self.w + pub fn gain_ctrl0_gc_tbb(&self) -> GAIN_CTRL0_GC_TBB_R { + GAIN_CTRL0_GC_TBB_R::new((self.bits & 0x1f) as u8) } -} -impl R { - #[doc = "Bits 30:31"] + #[doc = "Bits 8:10"] #[inline(always)] - pub fn gain_ctrl1_gc_tbb_boost(&self) -> GAIN_CTRL1_GC_TBB_BOOST_R { - GAIN_CTRL1_GC_TBB_BOOST_R::new(((self.bits >> 30) & 0x03) as u8) + pub fn gain_ctrl0_gc_tmx(&self) -> GAIN_CTRL0_GC_TMX_R { + GAIN_CTRL0_GC_TMX_R::new(((self.bits >> 8) & 7) as u8) } - #[doc = "Bits 28:29"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn gain_ctrl1_dac_bias_sel(&self) -> GAIN_CTRL1_DAC_BIAS_SEL_R { - GAIN_CTRL1_DAC_BIAS_SEL_R::new(((self.bits >> 28) & 0x03) as u8) + pub fn gain_ctrl0_dac_bias_sel(&self) -> GAIN_CTRL0_DAC_BIAS_SEL_R { + GAIN_CTRL0_DAC_BIAS_SEL_R::new(((self.bits >> 12) & 3) as u8) } - #[doc = "Bits 24:26"] + #[doc = "Bits 14:15"] #[inline(always)] - pub fn gain_ctrl1_gc_tmx(&self) -> GAIN_CTRL1_GC_TMX_R { - GAIN_CTRL1_GC_TMX_R::new(((self.bits >> 24) & 0x07) as u8) + pub fn gain_ctrl0_gc_tbb_boost(&self) -> GAIN_CTRL0_GC_TBB_BOOST_R { + GAIN_CTRL0_GC_TBB_BOOST_R::new(((self.bits >> 14) & 3) as u8) } #[doc = "Bits 16:20"] #[inline(always)] pub fn gain_ctrl1_gc_tbb(&self) -> GAIN_CTRL1_GC_TBB_R { GAIN_CTRL1_GC_TBB_R::new(((self.bits >> 16) & 0x1f) as u8) } - #[doc = "Bits 14:15"] - #[inline(always)] - pub fn gain_ctrl0_gc_tbb_boost(&self) -> GAIN_CTRL0_GC_TBB_BOOST_R { - GAIN_CTRL0_GC_TBB_BOOST_R::new(((self.bits >> 14) & 0x03) as u8) - } - #[doc = "Bits 12:13"] + #[doc = "Bits 24:26"] #[inline(always)] - pub fn gain_ctrl0_dac_bias_sel(&self) -> GAIN_CTRL0_DAC_BIAS_SEL_R { - GAIN_CTRL0_DAC_BIAS_SEL_R::new(((self.bits >> 12) & 0x03) as u8) + pub fn gain_ctrl1_gc_tmx(&self) -> GAIN_CTRL1_GC_TMX_R { + GAIN_CTRL1_GC_TMX_R::new(((self.bits >> 24) & 7) as u8) } - #[doc = "Bits 8:10"] + #[doc = "Bits 28:29"] #[inline(always)] - pub fn gain_ctrl0_gc_tmx(&self) -> GAIN_CTRL0_GC_TMX_R { - GAIN_CTRL0_GC_TMX_R::new(((self.bits >> 8) & 0x07) as u8) + pub fn gain_ctrl1_dac_bias_sel(&self) -> GAIN_CTRL1_DAC_BIAS_SEL_R { + GAIN_CTRL1_DAC_BIAS_SEL_R::new(((self.bits >> 28) & 3) as u8) } - #[doc = "Bits 0:4"] + #[doc = "Bits 30:31"] #[inline(always)] - pub fn gain_ctrl0_gc_tbb(&self) -> GAIN_CTRL0_GC_TBB_R { - GAIN_CTRL0_GC_TBB_R::new((self.bits & 0x1f) as u8) + pub fn gain_ctrl1_gc_tbb_boost(&self) -> GAIN_CTRL1_GC_TBB_BOOST_R { + GAIN_CTRL1_GC_TBB_BOOST_R::new(((self.bits >> 30) & 3) as u8) } } impl W { - #[doc = "Bits 30:31"] + #[doc = "Bits 0:4"] #[inline(always)] - pub fn gain_ctrl1_gc_tbb_boost(&mut self) -> GAIN_CTRL1_GC_TBB_BOOST_W { - GAIN_CTRL1_GC_TBB_BOOST_W { w: self } + #[must_use] + pub fn gain_ctrl0_gc_tbb(&mut self) -> GAIN_CTRL0_GC_TBB_W<0> { + GAIN_CTRL0_GC_TBB_W::new(self) } - #[doc = "Bits 28:29"] + #[doc = "Bits 8:10"] #[inline(always)] - pub fn gain_ctrl1_dac_bias_sel(&mut self) -> GAIN_CTRL1_DAC_BIAS_SEL_W { - GAIN_CTRL1_DAC_BIAS_SEL_W { w: self } + #[must_use] + pub fn gain_ctrl0_gc_tmx(&mut self) -> GAIN_CTRL0_GC_TMX_W<8> { + GAIN_CTRL0_GC_TMX_W::new(self) } - #[doc = "Bits 24:26"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn gain_ctrl1_gc_tmx(&mut self) -> GAIN_CTRL1_GC_TMX_W { - GAIN_CTRL1_GC_TMX_W { w: self } + #[must_use] + pub fn gain_ctrl0_dac_bias_sel(&mut self) -> GAIN_CTRL0_DAC_BIAS_SEL_W<12> { + GAIN_CTRL0_DAC_BIAS_SEL_W::new(self) } - #[doc = "Bits 16:20"] + #[doc = "Bits 14:15"] #[inline(always)] - pub fn gain_ctrl1_gc_tbb(&mut self) -> GAIN_CTRL1_GC_TBB_W { - GAIN_CTRL1_GC_TBB_W { w: self } + #[must_use] + pub fn gain_ctrl0_gc_tbb_boost(&mut self) -> GAIN_CTRL0_GC_TBB_BOOST_W<14> { + GAIN_CTRL0_GC_TBB_BOOST_W::new(self) } - #[doc = "Bits 14:15"] + #[doc = "Bits 16:20"] #[inline(always)] - pub fn gain_ctrl0_gc_tbb_boost(&mut self) -> GAIN_CTRL0_GC_TBB_BOOST_W { - GAIN_CTRL0_GC_TBB_BOOST_W { w: self } + #[must_use] + pub fn gain_ctrl1_gc_tbb(&mut self) -> GAIN_CTRL1_GC_TBB_W<16> { + GAIN_CTRL1_GC_TBB_W::new(self) } - #[doc = "Bits 12:13"] + #[doc = "Bits 24:26"] #[inline(always)] - pub fn gain_ctrl0_dac_bias_sel(&mut self) -> GAIN_CTRL0_DAC_BIAS_SEL_W { - GAIN_CTRL0_DAC_BIAS_SEL_W { w: self } + #[must_use] + pub fn gain_ctrl1_gc_tmx(&mut self) -> GAIN_CTRL1_GC_TMX_W<24> { + GAIN_CTRL1_GC_TMX_W::new(self) } - #[doc = "Bits 8:10"] + #[doc = "Bits 28:29"] #[inline(always)] - pub fn gain_ctrl0_gc_tmx(&mut self) -> GAIN_CTRL0_GC_TMX_W { - GAIN_CTRL0_GC_TMX_W { w: self } + #[must_use] + pub fn gain_ctrl1_dac_bias_sel(&mut self) -> GAIN_CTRL1_DAC_BIAS_SEL_W<28> { + GAIN_CTRL1_DAC_BIAS_SEL_W::new(self) } - #[doc = "Bits 0:4"] + #[doc = "Bits 30:31"] #[inline(always)] - pub fn gain_ctrl0_gc_tbb(&mut self) -> GAIN_CTRL0_GC_TBB_W { - GAIN_CTRL0_GC_TBB_W { w: self } + #[must_use] + pub fn gain_ctrl1_gc_tbb_boost(&mut self) -> GAIN_CTRL1_GC_TBB_BOOST_W<30> { + GAIN_CTRL1_GC_TBB_BOOST_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -341,11 +184,10 @@ impl crate::Readable for TBB_GAIN_INDEX1_SPEC { #[doc = "`write(|w| ..)` method takes [tbb_gain_index1::W](W) writer structure"] impl crate::Writable for TBB_GAIN_INDEX1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets tbb_gain_index1 to value 0"] impl crate::Resettable for TBB_GAIN_INDEX1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/tbb_gain_index2.rs b/src/rf/tbb_gain_index2.rs index 979e0c6..8f783bb 100644 --- a/src/rf/tbb_gain_index2.rs +++ b/src/rf/tbb_gain_index2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,303 +28,145 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `gain_ctrl3_gc_tbb_boost` reader - "] -pub struct GAIN_CTRL3_GC_TBB_BOOST_R(crate::FieldReader); -impl GAIN_CTRL3_GC_TBB_BOOST_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL3_GC_TBB_BOOST_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL3_GC_TBB_BOOST_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl3_gc_tbb_boost` writer - "] -pub struct GAIN_CTRL3_GC_TBB_BOOST_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL3_GC_TBB_BOOST_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 30)) | ((value as u32 & 0x03) << 30); - self.w - } -} -#[doc = "Field `gain_ctrl3_dac_bias_sel` reader - "] -pub struct GAIN_CTRL3_DAC_BIAS_SEL_R(crate::FieldReader); -impl GAIN_CTRL3_DAC_BIAS_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL3_DAC_BIAS_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL3_DAC_BIAS_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl3_dac_bias_sel` writer - "] -pub struct GAIN_CTRL3_DAC_BIAS_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL3_DAC_BIAS_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 28)) | ((value as u32 & 0x03) << 28); - self.w - } -} -#[doc = "Field `gain_ctrl3_gc_tmx` reader - "] -pub struct GAIN_CTRL3_GC_TMX_R(crate::FieldReader); -impl GAIN_CTRL3_GC_TMX_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL3_GC_TMX_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL3_GC_TMX_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl3_gc_tmx` writer - "] -pub struct GAIN_CTRL3_GC_TMX_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL3_GC_TMX_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 24)) | ((value as u32 & 0x07) << 24); - self.w - } -} -#[doc = "Field `gain_ctrl3_gc_tbb` reader - "] -pub struct GAIN_CTRL3_GC_TBB_R(crate::FieldReader); -impl GAIN_CTRL3_GC_TBB_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL3_GC_TBB_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL3_GC_TBB_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl3_gc_tbb` writer - "] -pub struct GAIN_CTRL3_GC_TBB_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL3_GC_TBB_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 16)) | ((value as u32 & 0x1f) << 16); - self.w - } -} -#[doc = "Field `gain_ctrl2_gc_tbb_boost` reader - "] -pub struct GAIN_CTRL2_GC_TBB_BOOST_R(crate::FieldReader); -impl GAIN_CTRL2_GC_TBB_BOOST_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL2_GC_TBB_BOOST_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL2_GC_TBB_BOOST_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl2_gc_tbb_boost` writer - "] -pub struct GAIN_CTRL2_GC_TBB_BOOST_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL2_GC_TBB_BOOST_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 14)) | ((value as u32 & 0x03) << 14); - self.w - } -} -#[doc = "Field `gain_ctrl2_dac_bias_sel` reader - "] -pub struct GAIN_CTRL2_DAC_BIAS_SEL_R(crate::FieldReader); -impl GAIN_CTRL2_DAC_BIAS_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL2_DAC_BIAS_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL2_DAC_BIAS_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl2_dac_bias_sel` writer - "] -pub struct GAIN_CTRL2_DAC_BIAS_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL2_DAC_BIAS_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 12)) | ((value as u32 & 0x03) << 12); - self.w - } -} -#[doc = "Field `gain_ctrl2_gc_tmx` reader - "] -pub struct GAIN_CTRL2_GC_TMX_R(crate::FieldReader); -impl GAIN_CTRL2_GC_TMX_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL2_GC_TMX_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL2_GC_TMX_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl2_gc_tmx` writer - "] -pub struct GAIN_CTRL2_GC_TMX_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL2_GC_TMX_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 8)) | ((value as u32 & 0x07) << 8); - self.w - } -} #[doc = "Field `gain_ctrl2_gc_tbb` reader - "] -pub struct GAIN_CTRL2_GC_TBB_R(crate::FieldReader); -impl GAIN_CTRL2_GC_TBB_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL2_GC_TBB_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL2_GC_TBB_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type GAIN_CTRL2_GC_TBB_R = crate::FieldReader; #[doc = "Field `gain_ctrl2_gc_tbb` writer - "] -pub struct GAIN_CTRL2_GC_TBB_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL2_GC_TBB_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type GAIN_CTRL2_GC_TBB_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TBB_GAIN_INDEX2_SPEC, u8, u8, 5, O>; +#[doc = "Field `gain_ctrl2_gc_tmx` reader - "] +pub type GAIN_CTRL2_GC_TMX_R = crate::FieldReader; +#[doc = "Field `gain_ctrl2_gc_tmx` writer - "] +pub type GAIN_CTRL2_GC_TMX_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TBB_GAIN_INDEX2_SPEC, u8, u8, 3, O>; +#[doc = "Field `gain_ctrl2_dac_bias_sel` reader - "] +pub type GAIN_CTRL2_DAC_BIAS_SEL_R = crate::FieldReader; +#[doc = "Field `gain_ctrl2_dac_bias_sel` writer - "] +pub type GAIN_CTRL2_DAC_BIAS_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TBB_GAIN_INDEX2_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl2_gc_tbb_boost` reader - "] +pub type GAIN_CTRL2_GC_TBB_BOOST_R = crate::FieldReader; +#[doc = "Field `gain_ctrl2_gc_tbb_boost` writer - "] +pub type GAIN_CTRL2_GC_TBB_BOOST_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TBB_GAIN_INDEX2_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl3_gc_tbb` reader - "] +pub type GAIN_CTRL3_GC_TBB_R = crate::FieldReader; +#[doc = "Field `gain_ctrl3_gc_tbb` writer - "] +pub type GAIN_CTRL3_GC_TBB_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TBB_GAIN_INDEX2_SPEC, u8, u8, 5, O>; +#[doc = "Field `gain_ctrl3_gc_tmx` reader - "] +pub type GAIN_CTRL3_GC_TMX_R = crate::FieldReader; +#[doc = "Field `gain_ctrl3_gc_tmx` writer - "] +pub type GAIN_CTRL3_GC_TMX_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TBB_GAIN_INDEX2_SPEC, u8, u8, 3, O>; +#[doc = "Field `gain_ctrl3_dac_bias_sel` reader - "] +pub type GAIN_CTRL3_DAC_BIAS_SEL_R = crate::FieldReader; +#[doc = "Field `gain_ctrl3_dac_bias_sel` writer - "] +pub type GAIN_CTRL3_DAC_BIAS_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TBB_GAIN_INDEX2_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl3_gc_tbb_boost` reader - "] +pub type GAIN_CTRL3_GC_TBB_BOOST_R = crate::FieldReader; +#[doc = "Field `gain_ctrl3_gc_tbb_boost` writer - "] +pub type GAIN_CTRL3_GC_TBB_BOOST_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TBB_GAIN_INDEX2_SPEC, u8, u8, 2, O>; +impl R { + #[doc = "Bits 0:4"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x1f) | (value as u32 & 0x1f); - self.w + pub fn gain_ctrl2_gc_tbb(&self) -> GAIN_CTRL2_GC_TBB_R { + GAIN_CTRL2_GC_TBB_R::new((self.bits & 0x1f) as u8) } -} -impl R { - #[doc = "Bits 30:31"] + #[doc = "Bits 8:10"] #[inline(always)] - pub fn gain_ctrl3_gc_tbb_boost(&self) -> GAIN_CTRL3_GC_TBB_BOOST_R { - GAIN_CTRL3_GC_TBB_BOOST_R::new(((self.bits >> 30) & 0x03) as u8) + pub fn gain_ctrl2_gc_tmx(&self) -> GAIN_CTRL2_GC_TMX_R { + GAIN_CTRL2_GC_TMX_R::new(((self.bits >> 8) & 7) as u8) } - #[doc = "Bits 28:29"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn gain_ctrl3_dac_bias_sel(&self) -> GAIN_CTRL3_DAC_BIAS_SEL_R { - GAIN_CTRL3_DAC_BIAS_SEL_R::new(((self.bits >> 28) & 0x03) as u8) + pub fn gain_ctrl2_dac_bias_sel(&self) -> GAIN_CTRL2_DAC_BIAS_SEL_R { + GAIN_CTRL2_DAC_BIAS_SEL_R::new(((self.bits >> 12) & 3) as u8) } - #[doc = "Bits 24:26"] + #[doc = "Bits 14:15"] #[inline(always)] - pub fn gain_ctrl3_gc_tmx(&self) -> GAIN_CTRL3_GC_TMX_R { - GAIN_CTRL3_GC_TMX_R::new(((self.bits >> 24) & 0x07) as u8) + pub fn gain_ctrl2_gc_tbb_boost(&self) -> GAIN_CTRL2_GC_TBB_BOOST_R { + GAIN_CTRL2_GC_TBB_BOOST_R::new(((self.bits >> 14) & 3) as u8) } #[doc = "Bits 16:20"] #[inline(always)] pub fn gain_ctrl3_gc_tbb(&self) -> GAIN_CTRL3_GC_TBB_R { GAIN_CTRL3_GC_TBB_R::new(((self.bits >> 16) & 0x1f) as u8) } - #[doc = "Bits 14:15"] - #[inline(always)] - pub fn gain_ctrl2_gc_tbb_boost(&self) -> GAIN_CTRL2_GC_TBB_BOOST_R { - GAIN_CTRL2_GC_TBB_BOOST_R::new(((self.bits >> 14) & 0x03) as u8) - } - #[doc = "Bits 12:13"] + #[doc = "Bits 24:26"] #[inline(always)] - pub fn gain_ctrl2_dac_bias_sel(&self) -> GAIN_CTRL2_DAC_BIAS_SEL_R { - GAIN_CTRL2_DAC_BIAS_SEL_R::new(((self.bits >> 12) & 0x03) as u8) + pub fn gain_ctrl3_gc_tmx(&self) -> GAIN_CTRL3_GC_TMX_R { + GAIN_CTRL3_GC_TMX_R::new(((self.bits >> 24) & 7) as u8) } - #[doc = "Bits 8:10"] + #[doc = "Bits 28:29"] #[inline(always)] - pub fn gain_ctrl2_gc_tmx(&self) -> GAIN_CTRL2_GC_TMX_R { - GAIN_CTRL2_GC_TMX_R::new(((self.bits >> 8) & 0x07) as u8) + pub fn gain_ctrl3_dac_bias_sel(&self) -> GAIN_CTRL3_DAC_BIAS_SEL_R { + GAIN_CTRL3_DAC_BIAS_SEL_R::new(((self.bits >> 28) & 3) as u8) } - #[doc = "Bits 0:4"] + #[doc = "Bits 30:31"] #[inline(always)] - pub fn gain_ctrl2_gc_tbb(&self) -> GAIN_CTRL2_GC_TBB_R { - GAIN_CTRL2_GC_TBB_R::new((self.bits & 0x1f) as u8) + pub fn gain_ctrl3_gc_tbb_boost(&self) -> GAIN_CTRL3_GC_TBB_BOOST_R { + GAIN_CTRL3_GC_TBB_BOOST_R::new(((self.bits >> 30) & 3) as u8) } } impl W { - #[doc = "Bits 30:31"] + #[doc = "Bits 0:4"] #[inline(always)] - pub fn gain_ctrl3_gc_tbb_boost(&mut self) -> GAIN_CTRL3_GC_TBB_BOOST_W { - GAIN_CTRL3_GC_TBB_BOOST_W { w: self } + #[must_use] + pub fn gain_ctrl2_gc_tbb(&mut self) -> GAIN_CTRL2_GC_TBB_W<0> { + GAIN_CTRL2_GC_TBB_W::new(self) } - #[doc = "Bits 28:29"] + #[doc = "Bits 8:10"] #[inline(always)] - pub fn gain_ctrl3_dac_bias_sel(&mut self) -> GAIN_CTRL3_DAC_BIAS_SEL_W { - GAIN_CTRL3_DAC_BIAS_SEL_W { w: self } + #[must_use] + pub fn gain_ctrl2_gc_tmx(&mut self) -> GAIN_CTRL2_GC_TMX_W<8> { + GAIN_CTRL2_GC_TMX_W::new(self) } - #[doc = "Bits 24:26"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn gain_ctrl3_gc_tmx(&mut self) -> GAIN_CTRL3_GC_TMX_W { - GAIN_CTRL3_GC_TMX_W { w: self } + #[must_use] + pub fn gain_ctrl2_dac_bias_sel(&mut self) -> GAIN_CTRL2_DAC_BIAS_SEL_W<12> { + GAIN_CTRL2_DAC_BIAS_SEL_W::new(self) } - #[doc = "Bits 16:20"] + #[doc = "Bits 14:15"] #[inline(always)] - pub fn gain_ctrl3_gc_tbb(&mut self) -> GAIN_CTRL3_GC_TBB_W { - GAIN_CTRL3_GC_TBB_W { w: self } + #[must_use] + pub fn gain_ctrl2_gc_tbb_boost(&mut self) -> GAIN_CTRL2_GC_TBB_BOOST_W<14> { + GAIN_CTRL2_GC_TBB_BOOST_W::new(self) } - #[doc = "Bits 14:15"] + #[doc = "Bits 16:20"] #[inline(always)] - pub fn gain_ctrl2_gc_tbb_boost(&mut self) -> GAIN_CTRL2_GC_TBB_BOOST_W { - GAIN_CTRL2_GC_TBB_BOOST_W { w: self } + #[must_use] + pub fn gain_ctrl3_gc_tbb(&mut self) -> GAIN_CTRL3_GC_TBB_W<16> { + GAIN_CTRL3_GC_TBB_W::new(self) } - #[doc = "Bits 12:13"] + #[doc = "Bits 24:26"] #[inline(always)] - pub fn gain_ctrl2_dac_bias_sel(&mut self) -> GAIN_CTRL2_DAC_BIAS_SEL_W { - GAIN_CTRL2_DAC_BIAS_SEL_W { w: self } + #[must_use] + pub fn gain_ctrl3_gc_tmx(&mut self) -> GAIN_CTRL3_GC_TMX_W<24> { + GAIN_CTRL3_GC_TMX_W::new(self) } - #[doc = "Bits 8:10"] + #[doc = "Bits 28:29"] #[inline(always)] - pub fn gain_ctrl2_gc_tmx(&mut self) -> GAIN_CTRL2_GC_TMX_W { - GAIN_CTRL2_GC_TMX_W { w: self } + #[must_use] + pub fn gain_ctrl3_dac_bias_sel(&mut self) -> GAIN_CTRL3_DAC_BIAS_SEL_W<28> { + GAIN_CTRL3_DAC_BIAS_SEL_W::new(self) } - #[doc = "Bits 0:4"] + #[doc = "Bits 30:31"] #[inline(always)] - pub fn gain_ctrl2_gc_tbb(&mut self) -> GAIN_CTRL2_GC_TBB_W { - GAIN_CTRL2_GC_TBB_W { w: self } + #[must_use] + pub fn gain_ctrl3_gc_tbb_boost(&mut self) -> GAIN_CTRL3_GC_TBB_BOOST_W<30> { + GAIN_CTRL3_GC_TBB_BOOST_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -341,11 +184,10 @@ impl crate::Readable for TBB_GAIN_INDEX2_SPEC { #[doc = "`write(|w| ..)` method takes [tbb_gain_index2::W](W) writer structure"] impl crate::Writable for TBB_GAIN_INDEX2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets tbb_gain_index2 to value 0"] impl crate::Resettable for TBB_GAIN_INDEX2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/tbb_gain_index3.rs b/src/rf/tbb_gain_index3.rs index 0031aa1..f533f12 100644 --- a/src/rf/tbb_gain_index3.rs +++ b/src/rf/tbb_gain_index3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,303 +28,145 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `gain_ctrl5_gc_tbb_boost` reader - "] -pub struct GAIN_CTRL5_GC_TBB_BOOST_R(crate::FieldReader); -impl GAIN_CTRL5_GC_TBB_BOOST_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL5_GC_TBB_BOOST_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL5_GC_TBB_BOOST_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl5_gc_tbb_boost` writer - "] -pub struct GAIN_CTRL5_GC_TBB_BOOST_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL5_GC_TBB_BOOST_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 30)) | ((value as u32 & 0x03) << 30); - self.w - } -} -#[doc = "Field `gain_ctrl5_dac_bias_sel` reader - "] -pub struct GAIN_CTRL5_DAC_BIAS_SEL_R(crate::FieldReader); -impl GAIN_CTRL5_DAC_BIAS_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL5_DAC_BIAS_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL5_DAC_BIAS_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl5_dac_bias_sel` writer - "] -pub struct GAIN_CTRL5_DAC_BIAS_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL5_DAC_BIAS_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 28)) | ((value as u32 & 0x03) << 28); - self.w - } -} -#[doc = "Field `gain_ctrl5_gc_tmx` reader - "] -pub struct GAIN_CTRL5_GC_TMX_R(crate::FieldReader); -impl GAIN_CTRL5_GC_TMX_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL5_GC_TMX_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL5_GC_TMX_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl5_gc_tmx` writer - "] -pub struct GAIN_CTRL5_GC_TMX_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL5_GC_TMX_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 24)) | ((value as u32 & 0x07) << 24); - self.w - } -} -#[doc = "Field `gain_ctrl5_gc_tbb` reader - "] -pub struct GAIN_CTRL5_GC_TBB_R(crate::FieldReader); -impl GAIN_CTRL5_GC_TBB_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL5_GC_TBB_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL5_GC_TBB_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl5_gc_tbb` writer - "] -pub struct GAIN_CTRL5_GC_TBB_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL5_GC_TBB_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 16)) | ((value as u32 & 0x1f) << 16); - self.w - } -} -#[doc = "Field `gain_ctrl4_gc_tbb_boost` reader - "] -pub struct GAIN_CTRL4_GC_TBB_BOOST_R(crate::FieldReader); -impl GAIN_CTRL4_GC_TBB_BOOST_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL4_GC_TBB_BOOST_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL4_GC_TBB_BOOST_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl4_gc_tbb_boost` writer - "] -pub struct GAIN_CTRL4_GC_TBB_BOOST_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL4_GC_TBB_BOOST_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 14)) | ((value as u32 & 0x03) << 14); - self.w - } -} -#[doc = "Field `gain_ctrl4_dac_bias_sel` reader - "] -pub struct GAIN_CTRL4_DAC_BIAS_SEL_R(crate::FieldReader); -impl GAIN_CTRL4_DAC_BIAS_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL4_DAC_BIAS_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL4_DAC_BIAS_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl4_dac_bias_sel` writer - "] -pub struct GAIN_CTRL4_DAC_BIAS_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL4_DAC_BIAS_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 12)) | ((value as u32 & 0x03) << 12); - self.w - } -} -#[doc = "Field `gain_ctrl4_gc_tmx` reader - "] -pub struct GAIN_CTRL4_GC_TMX_R(crate::FieldReader); -impl GAIN_CTRL4_GC_TMX_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL4_GC_TMX_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL4_GC_TMX_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl4_gc_tmx` writer - "] -pub struct GAIN_CTRL4_GC_TMX_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL4_GC_TMX_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 8)) | ((value as u32 & 0x07) << 8); - self.w - } -} #[doc = "Field `gain_ctrl4_gc_tbb` reader - "] -pub struct GAIN_CTRL4_GC_TBB_R(crate::FieldReader); -impl GAIN_CTRL4_GC_TBB_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL4_GC_TBB_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL4_GC_TBB_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type GAIN_CTRL4_GC_TBB_R = crate::FieldReader; #[doc = "Field `gain_ctrl4_gc_tbb` writer - "] -pub struct GAIN_CTRL4_GC_TBB_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL4_GC_TBB_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type GAIN_CTRL4_GC_TBB_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TBB_GAIN_INDEX3_SPEC, u8, u8, 5, O>; +#[doc = "Field `gain_ctrl4_gc_tmx` reader - "] +pub type GAIN_CTRL4_GC_TMX_R = crate::FieldReader; +#[doc = "Field `gain_ctrl4_gc_tmx` writer - "] +pub type GAIN_CTRL4_GC_TMX_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TBB_GAIN_INDEX3_SPEC, u8, u8, 3, O>; +#[doc = "Field `gain_ctrl4_dac_bias_sel` reader - "] +pub type GAIN_CTRL4_DAC_BIAS_SEL_R = crate::FieldReader; +#[doc = "Field `gain_ctrl4_dac_bias_sel` writer - "] +pub type GAIN_CTRL4_DAC_BIAS_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TBB_GAIN_INDEX3_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl4_gc_tbb_boost` reader - "] +pub type GAIN_CTRL4_GC_TBB_BOOST_R = crate::FieldReader; +#[doc = "Field `gain_ctrl4_gc_tbb_boost` writer - "] +pub type GAIN_CTRL4_GC_TBB_BOOST_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TBB_GAIN_INDEX3_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl5_gc_tbb` reader - "] +pub type GAIN_CTRL5_GC_TBB_R = crate::FieldReader; +#[doc = "Field `gain_ctrl5_gc_tbb` writer - "] +pub type GAIN_CTRL5_GC_TBB_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TBB_GAIN_INDEX3_SPEC, u8, u8, 5, O>; +#[doc = "Field `gain_ctrl5_gc_tmx` reader - "] +pub type GAIN_CTRL5_GC_TMX_R = crate::FieldReader; +#[doc = "Field `gain_ctrl5_gc_tmx` writer - "] +pub type GAIN_CTRL5_GC_TMX_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TBB_GAIN_INDEX3_SPEC, u8, u8, 3, O>; +#[doc = "Field `gain_ctrl5_dac_bias_sel` reader - "] +pub type GAIN_CTRL5_DAC_BIAS_SEL_R = crate::FieldReader; +#[doc = "Field `gain_ctrl5_dac_bias_sel` writer - "] +pub type GAIN_CTRL5_DAC_BIAS_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TBB_GAIN_INDEX3_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl5_gc_tbb_boost` reader - "] +pub type GAIN_CTRL5_GC_TBB_BOOST_R = crate::FieldReader; +#[doc = "Field `gain_ctrl5_gc_tbb_boost` writer - "] +pub type GAIN_CTRL5_GC_TBB_BOOST_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TBB_GAIN_INDEX3_SPEC, u8, u8, 2, O>; +impl R { + #[doc = "Bits 0:4"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x1f) | (value as u32 & 0x1f); - self.w + pub fn gain_ctrl4_gc_tbb(&self) -> GAIN_CTRL4_GC_TBB_R { + GAIN_CTRL4_GC_TBB_R::new((self.bits & 0x1f) as u8) } -} -impl R { - #[doc = "Bits 30:31"] + #[doc = "Bits 8:10"] #[inline(always)] - pub fn gain_ctrl5_gc_tbb_boost(&self) -> GAIN_CTRL5_GC_TBB_BOOST_R { - GAIN_CTRL5_GC_TBB_BOOST_R::new(((self.bits >> 30) & 0x03) as u8) + pub fn gain_ctrl4_gc_tmx(&self) -> GAIN_CTRL4_GC_TMX_R { + GAIN_CTRL4_GC_TMX_R::new(((self.bits >> 8) & 7) as u8) } - #[doc = "Bits 28:29"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn gain_ctrl5_dac_bias_sel(&self) -> GAIN_CTRL5_DAC_BIAS_SEL_R { - GAIN_CTRL5_DAC_BIAS_SEL_R::new(((self.bits >> 28) & 0x03) as u8) + pub fn gain_ctrl4_dac_bias_sel(&self) -> GAIN_CTRL4_DAC_BIAS_SEL_R { + GAIN_CTRL4_DAC_BIAS_SEL_R::new(((self.bits >> 12) & 3) as u8) } - #[doc = "Bits 24:26"] + #[doc = "Bits 14:15"] #[inline(always)] - pub fn gain_ctrl5_gc_tmx(&self) -> GAIN_CTRL5_GC_TMX_R { - GAIN_CTRL5_GC_TMX_R::new(((self.bits >> 24) & 0x07) as u8) + pub fn gain_ctrl4_gc_tbb_boost(&self) -> GAIN_CTRL4_GC_TBB_BOOST_R { + GAIN_CTRL4_GC_TBB_BOOST_R::new(((self.bits >> 14) & 3) as u8) } #[doc = "Bits 16:20"] #[inline(always)] pub fn gain_ctrl5_gc_tbb(&self) -> GAIN_CTRL5_GC_TBB_R { GAIN_CTRL5_GC_TBB_R::new(((self.bits >> 16) & 0x1f) as u8) } - #[doc = "Bits 14:15"] - #[inline(always)] - pub fn gain_ctrl4_gc_tbb_boost(&self) -> GAIN_CTRL4_GC_TBB_BOOST_R { - GAIN_CTRL4_GC_TBB_BOOST_R::new(((self.bits >> 14) & 0x03) as u8) - } - #[doc = "Bits 12:13"] + #[doc = "Bits 24:26"] #[inline(always)] - pub fn gain_ctrl4_dac_bias_sel(&self) -> GAIN_CTRL4_DAC_BIAS_SEL_R { - GAIN_CTRL4_DAC_BIAS_SEL_R::new(((self.bits >> 12) & 0x03) as u8) + pub fn gain_ctrl5_gc_tmx(&self) -> GAIN_CTRL5_GC_TMX_R { + GAIN_CTRL5_GC_TMX_R::new(((self.bits >> 24) & 7) as u8) } - #[doc = "Bits 8:10"] + #[doc = "Bits 28:29"] #[inline(always)] - pub fn gain_ctrl4_gc_tmx(&self) -> GAIN_CTRL4_GC_TMX_R { - GAIN_CTRL4_GC_TMX_R::new(((self.bits >> 8) & 0x07) as u8) + pub fn gain_ctrl5_dac_bias_sel(&self) -> GAIN_CTRL5_DAC_BIAS_SEL_R { + GAIN_CTRL5_DAC_BIAS_SEL_R::new(((self.bits >> 28) & 3) as u8) } - #[doc = "Bits 0:4"] + #[doc = "Bits 30:31"] #[inline(always)] - pub fn gain_ctrl4_gc_tbb(&self) -> GAIN_CTRL4_GC_TBB_R { - GAIN_CTRL4_GC_TBB_R::new((self.bits & 0x1f) as u8) + pub fn gain_ctrl5_gc_tbb_boost(&self) -> GAIN_CTRL5_GC_TBB_BOOST_R { + GAIN_CTRL5_GC_TBB_BOOST_R::new(((self.bits >> 30) & 3) as u8) } } impl W { - #[doc = "Bits 30:31"] + #[doc = "Bits 0:4"] #[inline(always)] - pub fn gain_ctrl5_gc_tbb_boost(&mut self) -> GAIN_CTRL5_GC_TBB_BOOST_W { - GAIN_CTRL5_GC_TBB_BOOST_W { w: self } + #[must_use] + pub fn gain_ctrl4_gc_tbb(&mut self) -> GAIN_CTRL4_GC_TBB_W<0> { + GAIN_CTRL4_GC_TBB_W::new(self) } - #[doc = "Bits 28:29"] + #[doc = "Bits 8:10"] #[inline(always)] - pub fn gain_ctrl5_dac_bias_sel(&mut self) -> GAIN_CTRL5_DAC_BIAS_SEL_W { - GAIN_CTRL5_DAC_BIAS_SEL_W { w: self } + #[must_use] + pub fn gain_ctrl4_gc_tmx(&mut self) -> GAIN_CTRL4_GC_TMX_W<8> { + GAIN_CTRL4_GC_TMX_W::new(self) } - #[doc = "Bits 24:26"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn gain_ctrl5_gc_tmx(&mut self) -> GAIN_CTRL5_GC_TMX_W { - GAIN_CTRL5_GC_TMX_W { w: self } + #[must_use] + pub fn gain_ctrl4_dac_bias_sel(&mut self) -> GAIN_CTRL4_DAC_BIAS_SEL_W<12> { + GAIN_CTRL4_DAC_BIAS_SEL_W::new(self) } - #[doc = "Bits 16:20"] + #[doc = "Bits 14:15"] #[inline(always)] - pub fn gain_ctrl5_gc_tbb(&mut self) -> GAIN_CTRL5_GC_TBB_W { - GAIN_CTRL5_GC_TBB_W { w: self } + #[must_use] + pub fn gain_ctrl4_gc_tbb_boost(&mut self) -> GAIN_CTRL4_GC_TBB_BOOST_W<14> { + GAIN_CTRL4_GC_TBB_BOOST_W::new(self) } - #[doc = "Bits 14:15"] + #[doc = "Bits 16:20"] #[inline(always)] - pub fn gain_ctrl4_gc_tbb_boost(&mut self) -> GAIN_CTRL4_GC_TBB_BOOST_W { - GAIN_CTRL4_GC_TBB_BOOST_W { w: self } + #[must_use] + pub fn gain_ctrl5_gc_tbb(&mut self) -> GAIN_CTRL5_GC_TBB_W<16> { + GAIN_CTRL5_GC_TBB_W::new(self) } - #[doc = "Bits 12:13"] + #[doc = "Bits 24:26"] #[inline(always)] - pub fn gain_ctrl4_dac_bias_sel(&mut self) -> GAIN_CTRL4_DAC_BIAS_SEL_W { - GAIN_CTRL4_DAC_BIAS_SEL_W { w: self } + #[must_use] + pub fn gain_ctrl5_gc_tmx(&mut self) -> GAIN_CTRL5_GC_TMX_W<24> { + GAIN_CTRL5_GC_TMX_W::new(self) } - #[doc = "Bits 8:10"] + #[doc = "Bits 28:29"] #[inline(always)] - pub fn gain_ctrl4_gc_tmx(&mut self) -> GAIN_CTRL4_GC_TMX_W { - GAIN_CTRL4_GC_TMX_W { w: self } + #[must_use] + pub fn gain_ctrl5_dac_bias_sel(&mut self) -> GAIN_CTRL5_DAC_BIAS_SEL_W<28> { + GAIN_CTRL5_DAC_BIAS_SEL_W::new(self) } - #[doc = "Bits 0:4"] + #[doc = "Bits 30:31"] #[inline(always)] - pub fn gain_ctrl4_gc_tbb(&mut self) -> GAIN_CTRL4_GC_TBB_W { - GAIN_CTRL4_GC_TBB_W { w: self } + #[must_use] + pub fn gain_ctrl5_gc_tbb_boost(&mut self) -> GAIN_CTRL5_GC_TBB_BOOST_W<30> { + GAIN_CTRL5_GC_TBB_BOOST_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -341,11 +184,10 @@ impl crate::Readable for TBB_GAIN_INDEX3_SPEC { #[doc = "`write(|w| ..)` method takes [tbb_gain_index3::W](W) writer structure"] impl crate::Writable for TBB_GAIN_INDEX3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets tbb_gain_index3 to value 0"] impl crate::Resettable for TBB_GAIN_INDEX3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/tbb_gain_index4.rs b/src/rf/tbb_gain_index4.rs index 1aa8059..817e82f 100644 --- a/src/rf/tbb_gain_index4.rs +++ b/src/rf/tbb_gain_index4.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,303 +28,145 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `gain_ctrl7_gc_tbb_boost` reader - "] -pub struct GAIN_CTRL7_GC_TBB_BOOST_R(crate::FieldReader); -impl GAIN_CTRL7_GC_TBB_BOOST_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL7_GC_TBB_BOOST_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL7_GC_TBB_BOOST_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl7_gc_tbb_boost` writer - "] -pub struct GAIN_CTRL7_GC_TBB_BOOST_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL7_GC_TBB_BOOST_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 30)) | ((value as u32 & 0x03) << 30); - self.w - } -} -#[doc = "Field `gain_ctrl7_dac_bias_sel` reader - "] -pub struct GAIN_CTRL7_DAC_BIAS_SEL_R(crate::FieldReader); -impl GAIN_CTRL7_DAC_BIAS_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL7_DAC_BIAS_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL7_DAC_BIAS_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl7_dac_bias_sel` writer - "] -pub struct GAIN_CTRL7_DAC_BIAS_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL7_DAC_BIAS_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 28)) | ((value as u32 & 0x03) << 28); - self.w - } -} -#[doc = "Field `gain_ctrl7_gc_tmx` reader - "] -pub struct GAIN_CTRL7_GC_TMX_R(crate::FieldReader); -impl GAIN_CTRL7_GC_TMX_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL7_GC_TMX_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL7_GC_TMX_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl7_gc_tmx` writer - "] -pub struct GAIN_CTRL7_GC_TMX_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL7_GC_TMX_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 24)) | ((value as u32 & 0x07) << 24); - self.w - } -} -#[doc = "Field `gain_ctrl7_gc_tbb` reader - "] -pub struct GAIN_CTRL7_GC_TBB_R(crate::FieldReader); -impl GAIN_CTRL7_GC_TBB_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL7_GC_TBB_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL7_GC_TBB_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl7_gc_tbb` writer - "] -pub struct GAIN_CTRL7_GC_TBB_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL7_GC_TBB_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 16)) | ((value as u32 & 0x1f) << 16); - self.w - } -} -#[doc = "Field `gain_ctrl6_gc_tbb_boost` reader - "] -pub struct GAIN_CTRL6_GC_TBB_BOOST_R(crate::FieldReader); -impl GAIN_CTRL6_GC_TBB_BOOST_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL6_GC_TBB_BOOST_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL6_GC_TBB_BOOST_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl6_gc_tbb_boost` writer - "] -pub struct GAIN_CTRL6_GC_TBB_BOOST_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL6_GC_TBB_BOOST_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 14)) | ((value as u32 & 0x03) << 14); - self.w - } -} -#[doc = "Field `gain_ctrl6_dac_bias_sel` reader - "] -pub struct GAIN_CTRL6_DAC_BIAS_SEL_R(crate::FieldReader); -impl GAIN_CTRL6_DAC_BIAS_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL6_DAC_BIAS_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL6_DAC_BIAS_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl6_dac_bias_sel` writer - "] -pub struct GAIN_CTRL6_DAC_BIAS_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL6_DAC_BIAS_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 12)) | ((value as u32 & 0x03) << 12); - self.w - } -} -#[doc = "Field `gain_ctrl6_gc_tmx` reader - "] -pub struct GAIN_CTRL6_GC_TMX_R(crate::FieldReader); -impl GAIN_CTRL6_GC_TMX_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL6_GC_TMX_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL6_GC_TMX_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gain_ctrl6_gc_tmx` writer - "] -pub struct GAIN_CTRL6_GC_TMX_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL6_GC_TMX_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 8)) | ((value as u32 & 0x07) << 8); - self.w - } -} #[doc = "Field `gain_ctrl6_gc_tbb` reader - "] -pub struct GAIN_CTRL6_GC_TBB_R(crate::FieldReader); -impl GAIN_CTRL6_GC_TBB_R { - pub(crate) fn new(bits: u8) -> Self { - GAIN_CTRL6_GC_TBB_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GAIN_CTRL6_GC_TBB_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type GAIN_CTRL6_GC_TBB_R = crate::FieldReader; #[doc = "Field `gain_ctrl6_gc_tbb` writer - "] -pub struct GAIN_CTRL6_GC_TBB_W<'a> { - w: &'a mut W, -} -impl<'a> GAIN_CTRL6_GC_TBB_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type GAIN_CTRL6_GC_TBB_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TBB_GAIN_INDEX4_SPEC, u8, u8, 5, O>; +#[doc = "Field `gain_ctrl6_gc_tmx` reader - "] +pub type GAIN_CTRL6_GC_TMX_R = crate::FieldReader; +#[doc = "Field `gain_ctrl6_gc_tmx` writer - "] +pub type GAIN_CTRL6_GC_TMX_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TBB_GAIN_INDEX4_SPEC, u8, u8, 3, O>; +#[doc = "Field `gain_ctrl6_dac_bias_sel` reader - "] +pub type GAIN_CTRL6_DAC_BIAS_SEL_R = crate::FieldReader; +#[doc = "Field `gain_ctrl6_dac_bias_sel` writer - "] +pub type GAIN_CTRL6_DAC_BIAS_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TBB_GAIN_INDEX4_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl6_gc_tbb_boost` reader - "] +pub type GAIN_CTRL6_GC_TBB_BOOST_R = crate::FieldReader; +#[doc = "Field `gain_ctrl6_gc_tbb_boost` writer - "] +pub type GAIN_CTRL6_GC_TBB_BOOST_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TBB_GAIN_INDEX4_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl7_gc_tbb` reader - "] +pub type GAIN_CTRL7_GC_TBB_R = crate::FieldReader; +#[doc = "Field `gain_ctrl7_gc_tbb` writer - "] +pub type GAIN_CTRL7_GC_TBB_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TBB_GAIN_INDEX4_SPEC, u8, u8, 5, O>; +#[doc = "Field `gain_ctrl7_gc_tmx` reader - "] +pub type GAIN_CTRL7_GC_TMX_R = crate::FieldReader; +#[doc = "Field `gain_ctrl7_gc_tmx` writer - "] +pub type GAIN_CTRL7_GC_TMX_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TBB_GAIN_INDEX4_SPEC, u8, u8, 3, O>; +#[doc = "Field `gain_ctrl7_dac_bias_sel` reader - "] +pub type GAIN_CTRL7_DAC_BIAS_SEL_R = crate::FieldReader; +#[doc = "Field `gain_ctrl7_dac_bias_sel` writer - "] +pub type GAIN_CTRL7_DAC_BIAS_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TBB_GAIN_INDEX4_SPEC, u8, u8, 2, O>; +#[doc = "Field `gain_ctrl7_gc_tbb_boost` reader - "] +pub type GAIN_CTRL7_GC_TBB_BOOST_R = crate::FieldReader; +#[doc = "Field `gain_ctrl7_gc_tbb_boost` writer - "] +pub type GAIN_CTRL7_GC_TBB_BOOST_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TBB_GAIN_INDEX4_SPEC, u8, u8, 2, O>; +impl R { + #[doc = "Bits 0:4"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x1f) | (value as u32 & 0x1f); - self.w + pub fn gain_ctrl6_gc_tbb(&self) -> GAIN_CTRL6_GC_TBB_R { + GAIN_CTRL6_GC_TBB_R::new((self.bits & 0x1f) as u8) } -} -impl R { - #[doc = "Bits 30:31"] + #[doc = "Bits 8:10"] #[inline(always)] - pub fn gain_ctrl7_gc_tbb_boost(&self) -> GAIN_CTRL7_GC_TBB_BOOST_R { - GAIN_CTRL7_GC_TBB_BOOST_R::new(((self.bits >> 30) & 0x03) as u8) + pub fn gain_ctrl6_gc_tmx(&self) -> GAIN_CTRL6_GC_TMX_R { + GAIN_CTRL6_GC_TMX_R::new(((self.bits >> 8) & 7) as u8) } - #[doc = "Bits 28:29"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn gain_ctrl7_dac_bias_sel(&self) -> GAIN_CTRL7_DAC_BIAS_SEL_R { - GAIN_CTRL7_DAC_BIAS_SEL_R::new(((self.bits >> 28) & 0x03) as u8) + pub fn gain_ctrl6_dac_bias_sel(&self) -> GAIN_CTRL6_DAC_BIAS_SEL_R { + GAIN_CTRL6_DAC_BIAS_SEL_R::new(((self.bits >> 12) & 3) as u8) } - #[doc = "Bits 24:26"] + #[doc = "Bits 14:15"] #[inline(always)] - pub fn gain_ctrl7_gc_tmx(&self) -> GAIN_CTRL7_GC_TMX_R { - GAIN_CTRL7_GC_TMX_R::new(((self.bits >> 24) & 0x07) as u8) + pub fn gain_ctrl6_gc_tbb_boost(&self) -> GAIN_CTRL6_GC_TBB_BOOST_R { + GAIN_CTRL6_GC_TBB_BOOST_R::new(((self.bits >> 14) & 3) as u8) } #[doc = "Bits 16:20"] #[inline(always)] pub fn gain_ctrl7_gc_tbb(&self) -> GAIN_CTRL7_GC_TBB_R { GAIN_CTRL7_GC_TBB_R::new(((self.bits >> 16) & 0x1f) as u8) } - #[doc = "Bits 14:15"] - #[inline(always)] - pub fn gain_ctrl6_gc_tbb_boost(&self) -> GAIN_CTRL6_GC_TBB_BOOST_R { - GAIN_CTRL6_GC_TBB_BOOST_R::new(((self.bits >> 14) & 0x03) as u8) - } - #[doc = "Bits 12:13"] + #[doc = "Bits 24:26"] #[inline(always)] - pub fn gain_ctrl6_dac_bias_sel(&self) -> GAIN_CTRL6_DAC_BIAS_SEL_R { - GAIN_CTRL6_DAC_BIAS_SEL_R::new(((self.bits >> 12) & 0x03) as u8) + pub fn gain_ctrl7_gc_tmx(&self) -> GAIN_CTRL7_GC_TMX_R { + GAIN_CTRL7_GC_TMX_R::new(((self.bits >> 24) & 7) as u8) } - #[doc = "Bits 8:10"] + #[doc = "Bits 28:29"] #[inline(always)] - pub fn gain_ctrl6_gc_tmx(&self) -> GAIN_CTRL6_GC_TMX_R { - GAIN_CTRL6_GC_TMX_R::new(((self.bits >> 8) & 0x07) as u8) + pub fn gain_ctrl7_dac_bias_sel(&self) -> GAIN_CTRL7_DAC_BIAS_SEL_R { + GAIN_CTRL7_DAC_BIAS_SEL_R::new(((self.bits >> 28) & 3) as u8) } - #[doc = "Bits 0:4"] + #[doc = "Bits 30:31"] #[inline(always)] - pub fn gain_ctrl6_gc_tbb(&self) -> GAIN_CTRL6_GC_TBB_R { - GAIN_CTRL6_GC_TBB_R::new((self.bits & 0x1f) as u8) + pub fn gain_ctrl7_gc_tbb_boost(&self) -> GAIN_CTRL7_GC_TBB_BOOST_R { + GAIN_CTRL7_GC_TBB_BOOST_R::new(((self.bits >> 30) & 3) as u8) } } impl W { - #[doc = "Bits 30:31"] + #[doc = "Bits 0:4"] #[inline(always)] - pub fn gain_ctrl7_gc_tbb_boost(&mut self) -> GAIN_CTRL7_GC_TBB_BOOST_W { - GAIN_CTRL7_GC_TBB_BOOST_W { w: self } + #[must_use] + pub fn gain_ctrl6_gc_tbb(&mut self) -> GAIN_CTRL6_GC_TBB_W<0> { + GAIN_CTRL6_GC_TBB_W::new(self) } - #[doc = "Bits 28:29"] + #[doc = "Bits 8:10"] #[inline(always)] - pub fn gain_ctrl7_dac_bias_sel(&mut self) -> GAIN_CTRL7_DAC_BIAS_SEL_W { - GAIN_CTRL7_DAC_BIAS_SEL_W { w: self } + #[must_use] + pub fn gain_ctrl6_gc_tmx(&mut self) -> GAIN_CTRL6_GC_TMX_W<8> { + GAIN_CTRL6_GC_TMX_W::new(self) } - #[doc = "Bits 24:26"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn gain_ctrl7_gc_tmx(&mut self) -> GAIN_CTRL7_GC_TMX_W { - GAIN_CTRL7_GC_TMX_W { w: self } + #[must_use] + pub fn gain_ctrl6_dac_bias_sel(&mut self) -> GAIN_CTRL6_DAC_BIAS_SEL_W<12> { + GAIN_CTRL6_DAC_BIAS_SEL_W::new(self) } - #[doc = "Bits 16:20"] + #[doc = "Bits 14:15"] #[inline(always)] - pub fn gain_ctrl7_gc_tbb(&mut self) -> GAIN_CTRL7_GC_TBB_W { - GAIN_CTRL7_GC_TBB_W { w: self } + #[must_use] + pub fn gain_ctrl6_gc_tbb_boost(&mut self) -> GAIN_CTRL6_GC_TBB_BOOST_W<14> { + GAIN_CTRL6_GC_TBB_BOOST_W::new(self) } - #[doc = "Bits 14:15"] + #[doc = "Bits 16:20"] #[inline(always)] - pub fn gain_ctrl6_gc_tbb_boost(&mut self) -> GAIN_CTRL6_GC_TBB_BOOST_W { - GAIN_CTRL6_GC_TBB_BOOST_W { w: self } + #[must_use] + pub fn gain_ctrl7_gc_tbb(&mut self) -> GAIN_CTRL7_GC_TBB_W<16> { + GAIN_CTRL7_GC_TBB_W::new(self) } - #[doc = "Bits 12:13"] + #[doc = "Bits 24:26"] #[inline(always)] - pub fn gain_ctrl6_dac_bias_sel(&mut self) -> GAIN_CTRL6_DAC_BIAS_SEL_W { - GAIN_CTRL6_DAC_BIAS_SEL_W { w: self } + #[must_use] + pub fn gain_ctrl7_gc_tmx(&mut self) -> GAIN_CTRL7_GC_TMX_W<24> { + GAIN_CTRL7_GC_TMX_W::new(self) } - #[doc = "Bits 8:10"] + #[doc = "Bits 28:29"] #[inline(always)] - pub fn gain_ctrl6_gc_tmx(&mut self) -> GAIN_CTRL6_GC_TMX_W { - GAIN_CTRL6_GC_TMX_W { w: self } + #[must_use] + pub fn gain_ctrl7_dac_bias_sel(&mut self) -> GAIN_CTRL7_DAC_BIAS_SEL_W<28> { + GAIN_CTRL7_DAC_BIAS_SEL_W::new(self) } - #[doc = "Bits 0:4"] + #[doc = "Bits 30:31"] #[inline(always)] - pub fn gain_ctrl6_gc_tbb(&mut self) -> GAIN_CTRL6_GC_TBB_W { - GAIN_CTRL6_GC_TBB_W { w: self } + #[must_use] + pub fn gain_ctrl7_gc_tbb_boost(&mut self) -> GAIN_CTRL7_GC_TBB_BOOST_W<30> { + GAIN_CTRL7_GC_TBB_BOOST_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -341,11 +184,10 @@ impl crate::Readable for TBB_GAIN_INDEX4_SPEC { #[doc = "`write(|w| ..)` method takes [tbb_gain_index4::W](W) writer structure"] impl crate::Writable for TBB_GAIN_INDEX4_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets tbb_gain_index4 to value 0"] impl crate::Resettable for TBB_GAIN_INDEX4_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/temp_comp.rs b/src/rf/temp_comp.rs index 0ae742b..682ffb6 100644 --- a/src/rf/temp_comp.rs +++ b/src/rf/temp_comp.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,133 +28,62 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `temp_comp_en` reader - "] -pub struct TEMP_COMP_EN_R(crate::FieldReader); -impl TEMP_COMP_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TEMP_COMP_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TEMP_COMP_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `temp_comp_en` writer - "] -pub struct TEMP_COMP_EN_W<'a> { - w: &'a mut W, -} -impl<'a> TEMP_COMP_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `const_fcal` reader - "] -pub struct CONST_FCAL_R(crate::FieldReader); -impl CONST_FCAL_R { - pub(crate) fn new(bits: u8) -> Self { - CONST_FCAL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CONST_FCAL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `const_fcal` writer - "] -pub struct CONST_FCAL_W<'a> { - w: &'a mut W, -} -impl<'a> CONST_FCAL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8); - self.w - } -} #[doc = "Field `const_acal` reader - "] -pub struct CONST_ACAL_R(crate::FieldReader); -impl CONST_ACAL_R { - pub(crate) fn new(bits: u8) -> Self { - CONST_ACAL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CONST_ACAL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CONST_ACAL_R = crate::FieldReader; #[doc = "Field `const_acal` writer - "] -pub struct CONST_ACAL_W<'a> { - w: &'a mut W, -} -impl<'a> CONST_ACAL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff); - self.w - } -} +pub type CONST_ACAL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TEMP_COMP_SPEC, u8, u8, 8, O>; +#[doc = "Field `const_fcal` reader - "] +pub type CONST_FCAL_R = crate::FieldReader; +#[doc = "Field `const_fcal` writer - "] +pub type CONST_FCAL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TEMP_COMP_SPEC, u8, u8, 8, O>; +#[doc = "Field `temp_comp_en` reader - "] +pub type TEMP_COMP_EN_R = crate::BitReader; +#[doc = "Field `temp_comp_en` writer - "] +pub type TEMP_COMP_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEMP_COMP_SPEC, bool, O>; impl R { - #[doc = "Bit 16"] + #[doc = "Bits 0:7"] #[inline(always)] - pub fn temp_comp_en(&self) -> TEMP_COMP_EN_R { - TEMP_COMP_EN_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn const_acal(&self) -> CONST_ACAL_R { + CONST_ACAL_R::new((self.bits & 0xff) as u8) } #[doc = "Bits 8:15"] #[inline(always)] pub fn const_fcal(&self) -> CONST_FCAL_R { CONST_FCAL_R::new(((self.bits >> 8) & 0xff) as u8) } - #[doc = "Bits 0:7"] + #[doc = "Bit 16"] #[inline(always)] - pub fn const_acal(&self) -> CONST_ACAL_R { - CONST_ACAL_R::new((self.bits & 0xff) as u8) + pub fn temp_comp_en(&self) -> TEMP_COMP_EN_R { + TEMP_COMP_EN_R::new(((self.bits >> 16) & 1) != 0) } } impl W { - #[doc = "Bit 16"] + #[doc = "Bits 0:7"] #[inline(always)] - pub fn temp_comp_en(&mut self) -> TEMP_COMP_EN_W { - TEMP_COMP_EN_W { w: self } + #[must_use] + pub fn const_acal(&mut self) -> CONST_ACAL_W<0> { + CONST_ACAL_W::new(self) } #[doc = "Bits 8:15"] #[inline(always)] - pub fn const_fcal(&mut self) -> CONST_FCAL_W { - CONST_FCAL_W { w: self } + #[must_use] + pub fn const_fcal(&mut self) -> CONST_FCAL_W<8> { + CONST_FCAL_W::new(self) } - #[doc = "Bits 0:7"] + #[doc = "Bit 16"] #[inline(always)] - pub fn const_acal(&mut self) -> CONST_ACAL_W { - CONST_ACAL_W { w: self } + #[must_use] + pub fn temp_comp_en(&mut self) -> TEMP_COMP_EN_W<16> { + TEMP_COMP_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -171,11 +101,10 @@ impl crate::Readable for TEMP_COMP_SPEC { #[doc = "`write(|w| ..)` method takes [temp_comp::W](W) writer structure"] impl crate::Writable for TEMP_COMP_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets temp_comp to value 0"] impl crate::Resettable for TEMP_COMP_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/ten_ac.rs b/src/rf/ten_ac.rs index 86200a4..f8536fc 100644 --- a/src/rf/ten_ac.rs +++ b/src/rf/ten_ac.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,553 +28,212 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `atest_in_en_i` reader - "] -pub struct ATEST_IN_EN_I_R(crate::FieldReader); -impl ATEST_IN_EN_I_R { - pub(crate) fn new(bits: bool) -> Self { - ATEST_IN_EN_I_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ATEST_IN_EN_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `atest_in_en_i` writer - "] -pub struct ATEST_IN_EN_I_W<'a> { - w: &'a mut W, -} -impl<'a> ATEST_IN_EN_I_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23); - self.w - } -} -#[doc = "Field `atest_in_en_q` reader - "] -pub struct ATEST_IN_EN_Q_R(crate::FieldReader); -impl ATEST_IN_EN_Q_R { - pub(crate) fn new(bits: bool) -> Self { - ATEST_IN_EN_Q_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ATEST_IN_EN_Q_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `atest_in_en_q` writer - "] -pub struct ATEST_IN_EN_Q_W<'a> { - w: &'a mut W, -} -impl<'a> ATEST_IN_EN_Q_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 22)) | ((value as u32 & 0x01) << 22); - self.w - } -} -#[doc = "Field `atest_out_en_i` reader - "] -pub struct ATEST_OUT_EN_I_R(crate::FieldReader); -impl ATEST_OUT_EN_I_R { - pub(crate) fn new(bits: bool) -> Self { - ATEST_OUT_EN_I_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ATEST_OUT_EN_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `atest_out_en_i` writer - "] -pub struct ATEST_OUT_EN_I_W<'a> { - w: &'a mut W, -} -impl<'a> ATEST_OUT_EN_I_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); - self.w - } -} -#[doc = "Field `atest_out_en_q` reader - "] -pub struct ATEST_OUT_EN_Q_R(crate::FieldReader); -impl ATEST_OUT_EN_Q_R { - pub(crate) fn new(bits: bool) -> Self { - ATEST_OUT_EN_Q_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ATEST_OUT_EN_Q_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `atest_out_en_q` writer - "] -pub struct ATEST_OUT_EN_Q_W<'a> { - w: &'a mut W, -} -impl<'a> ATEST_OUT_EN_Q_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w - } -} -#[doc = "Field `atest_gain_r5` reader - "] -pub struct ATEST_GAIN_R5_R(crate::FieldReader); -impl ATEST_GAIN_R5_R { - pub(crate) fn new(bits: u8) -> Self { - ATEST_GAIN_R5_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ATEST_GAIN_R5_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `atest_gain_r5` writer - "] -pub struct ATEST_GAIN_R5_W<'a> { - w: &'a mut W, -} -impl<'a> ATEST_GAIN_R5_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 16)) | ((value as u32 & 0x07) << 16); - self.w - } -} -#[doc = "Field `atest_gain_r6` reader - "] -pub struct ATEST_GAIN_R6_R(crate::FieldReader); -impl ATEST_GAIN_R6_R { - pub(crate) fn new(bits: u8) -> Self { - ATEST_GAIN_R6_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ATEST_GAIN_R6_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `atest_gain_r6` writer - "] -pub struct ATEST_GAIN_R6_W<'a> { - w: &'a mut W, -} -impl<'a> ATEST_GAIN_R6_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 14)) | ((value as u32 & 0x03) << 14); - self.w - } -} -#[doc = "Field `atest_gain_r7` reader - "] -pub struct ATEST_GAIN_R7_R(crate::FieldReader); -impl ATEST_GAIN_R7_R { - pub(crate) fn new(bits: u8) -> Self { - ATEST_GAIN_R7_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ATEST_GAIN_R7_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `atest_gain_r7` writer - "] -pub struct ATEST_GAIN_R7_W<'a> { - w: &'a mut W, -} -impl<'a> ATEST_GAIN_R7_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 12)) | ((value as u32 & 0x03) << 12); - self.w - } -} -#[doc = "Field `atest_gain_r8` reader - "] -pub struct ATEST_GAIN_R8_R(crate::FieldReader); -impl ATEST_GAIN_R8_R { - pub(crate) fn new(bits: u8) -> Self { - ATEST_GAIN_R8_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ATEST_GAIN_R8_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `atest_gain_r8` writer - "] -pub struct ATEST_GAIN_R8_W<'a> { - w: &'a mut W, -} -impl<'a> ATEST_GAIN_R8_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 10)) | ((value as u32 & 0x03) << 10); - self.w - } -} -#[doc = "Field `atest_gain_r9` reader - "] -pub struct ATEST_GAIN_R9_R(crate::FieldReader); -impl ATEST_GAIN_R9_R { - pub(crate) fn new(bits: u8) -> Self { - ATEST_GAIN_R9_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ATEST_GAIN_R9_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `atest_gain_r9` writer - "] -pub struct ATEST_GAIN_R9_W<'a> { - w: &'a mut W, -} -impl<'a> ATEST_GAIN_R9_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} -#[doc = "Field `atest_in_en` reader - "] -pub struct ATEST_IN_EN_R(crate::FieldReader); -impl ATEST_IN_EN_R { - pub(crate) fn new(bits: bool) -> Self { - ATEST_IN_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ATEST_IN_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `atest_in_en` writer - "] -pub struct ATEST_IN_EN_W<'a> { - w: &'a mut W, -} -impl<'a> ATEST_IN_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w - } -} -#[doc = "Field `atest_in_trx_sw` reader - "] -pub struct ATEST_IN_TRX_SW_R(crate::FieldReader); -impl ATEST_IN_TRX_SW_R { - pub(crate) fn new(bits: bool) -> Self { - ATEST_IN_TRX_SW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ATEST_IN_TRX_SW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `atest_in_trx_sw` writer - "] -pub struct ATEST_IN_TRX_SW_W<'a> { - w: &'a mut W, -} -impl<'a> ATEST_IN_TRX_SW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w - } -} -#[doc = "Field `atest_dac_en` reader - "] -pub struct ATEST_DAC_EN_R(crate::FieldReader); -impl ATEST_DAC_EN_R { - pub(crate) fn new(bits: bool) -> Self { - ATEST_DAC_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ATEST_DAC_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `atest_dac_en` writer - "] -pub struct ATEST_DAC_EN_W<'a> { - w: &'a mut W, -} -impl<'a> ATEST_DAC_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} #[doc = "Field `atest_op_cc` reader - "] -pub struct ATEST_OP_CC_R(crate::FieldReader); -impl ATEST_OP_CC_R { - pub(crate) fn new(bits: u8) -> Self { - ATEST_OP_CC_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ATEST_OP_CC_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type ATEST_OP_CC_R = crate::FieldReader; #[doc = "Field `atest_op_cc` writer - "] -pub struct ATEST_OP_CC_W<'a> { - w: &'a mut W, -} -impl<'a> ATEST_OP_CC_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x0f) | (value as u32 & 0x0f); - self.w - } -} +pub type ATEST_OP_CC_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TEN_AC_SPEC, u8, u8, 4, O>; +#[doc = "Field `atest_dac_en` reader - "] +pub type ATEST_DAC_EN_R = crate::BitReader; +#[doc = "Field `atest_dac_en` writer - "] +pub type ATEST_DAC_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_AC_SPEC, bool, O>; +#[doc = "Field `atest_in_trx_sw` reader - "] +pub type ATEST_IN_TRX_SW_R = crate::BitReader; +#[doc = "Field `atest_in_trx_sw` writer - "] +pub type ATEST_IN_TRX_SW_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_AC_SPEC, bool, O>; +#[doc = "Field `atest_in_en` reader - "] +pub type ATEST_IN_EN_R = crate::BitReader; +#[doc = "Field `atest_in_en` writer - "] +pub type ATEST_IN_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_AC_SPEC, bool, O>; +#[doc = "Field `atest_gain_r9` reader - "] +pub type ATEST_GAIN_R9_R = crate::FieldReader; +#[doc = "Field `atest_gain_r9` writer - "] +pub type ATEST_GAIN_R9_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TEN_AC_SPEC, u8, u8, 2, O>; +#[doc = "Field `atest_gain_r8` reader - "] +pub type ATEST_GAIN_R8_R = crate::FieldReader; +#[doc = "Field `atest_gain_r8` writer - "] +pub type ATEST_GAIN_R8_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TEN_AC_SPEC, u8, u8, 2, O>; +#[doc = "Field `atest_gain_r7` reader - "] +pub type ATEST_GAIN_R7_R = crate::FieldReader; +#[doc = "Field `atest_gain_r7` writer - "] +pub type ATEST_GAIN_R7_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TEN_AC_SPEC, u8, u8, 2, O>; +#[doc = "Field `atest_gain_r6` reader - "] +pub type ATEST_GAIN_R6_R = crate::FieldReader; +#[doc = "Field `atest_gain_r6` writer - "] +pub type ATEST_GAIN_R6_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TEN_AC_SPEC, u8, u8, 2, O>; +#[doc = "Field `atest_gain_r5` reader - "] +pub type ATEST_GAIN_R5_R = crate::FieldReader; +#[doc = "Field `atest_gain_r5` writer - "] +pub type ATEST_GAIN_R5_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TEN_AC_SPEC, u8, u8, 3, O>; +#[doc = "Field `atest_out_en_q` reader - "] +pub type ATEST_OUT_EN_Q_R = crate::BitReader; +#[doc = "Field `atest_out_en_q` writer - "] +pub type ATEST_OUT_EN_Q_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_AC_SPEC, bool, O>; +#[doc = "Field `atest_out_en_i` reader - "] +pub type ATEST_OUT_EN_I_R = crate::BitReader; +#[doc = "Field `atest_out_en_i` writer - "] +pub type ATEST_OUT_EN_I_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_AC_SPEC, bool, O>; +#[doc = "Field `atest_in_en_q` reader - "] +pub type ATEST_IN_EN_Q_R = crate::BitReader; +#[doc = "Field `atest_in_en_q` writer - "] +pub type ATEST_IN_EN_Q_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_AC_SPEC, bool, O>; +#[doc = "Field `atest_in_en_i` reader - "] +pub type ATEST_IN_EN_I_R = crate::BitReader; +#[doc = "Field `atest_in_en_i` writer - "] +pub type ATEST_IN_EN_I_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_AC_SPEC, bool, O>; impl R { - #[doc = "Bit 23"] + #[doc = "Bits 0:3"] #[inline(always)] - pub fn atest_in_en_i(&self) -> ATEST_IN_EN_I_R { - ATEST_IN_EN_I_R::new(((self.bits >> 23) & 0x01) != 0) + pub fn atest_op_cc(&self) -> ATEST_OP_CC_R { + ATEST_OP_CC_R::new((self.bits & 0x0f) as u8) } - #[doc = "Bit 22"] + #[doc = "Bit 4"] #[inline(always)] - pub fn atest_in_en_q(&self) -> ATEST_IN_EN_Q_R { - ATEST_IN_EN_Q_R::new(((self.bits >> 22) & 0x01) != 0) + pub fn atest_dac_en(&self) -> ATEST_DAC_EN_R { + ATEST_DAC_EN_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 21"] + #[doc = "Bit 5"] #[inline(always)] - pub fn atest_out_en_i(&self) -> ATEST_OUT_EN_I_R { - ATEST_OUT_EN_I_R::new(((self.bits >> 21) & 0x01) != 0) + pub fn atest_in_trx_sw(&self) -> ATEST_IN_TRX_SW_R { + ATEST_IN_TRX_SW_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 20"] + #[doc = "Bit 6"] #[inline(always)] - pub fn atest_out_en_q(&self) -> ATEST_OUT_EN_Q_R { - ATEST_OUT_EN_Q_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn atest_in_en(&self) -> ATEST_IN_EN_R { + ATEST_IN_EN_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = "Bits 16:18"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn atest_gain_r5(&self) -> ATEST_GAIN_R5_R { - ATEST_GAIN_R5_R::new(((self.bits >> 16) & 0x07) as u8) + pub fn atest_gain_r9(&self) -> ATEST_GAIN_R9_R { + ATEST_GAIN_R9_R::new(((self.bits >> 8) & 3) as u8) } - #[doc = "Bits 14:15"] + #[doc = "Bits 10:11"] #[inline(always)] - pub fn atest_gain_r6(&self) -> ATEST_GAIN_R6_R { - ATEST_GAIN_R6_R::new(((self.bits >> 14) & 0x03) as u8) + pub fn atest_gain_r8(&self) -> ATEST_GAIN_R8_R { + ATEST_GAIN_R8_R::new(((self.bits >> 10) & 3) as u8) } #[doc = "Bits 12:13"] #[inline(always)] pub fn atest_gain_r7(&self) -> ATEST_GAIN_R7_R { - ATEST_GAIN_R7_R::new(((self.bits >> 12) & 0x03) as u8) + ATEST_GAIN_R7_R::new(((self.bits >> 12) & 3) as u8) } - #[doc = "Bits 10:11"] + #[doc = "Bits 14:15"] #[inline(always)] - pub fn atest_gain_r8(&self) -> ATEST_GAIN_R8_R { - ATEST_GAIN_R8_R::new(((self.bits >> 10) & 0x03) as u8) + pub fn atest_gain_r6(&self) -> ATEST_GAIN_R6_R { + ATEST_GAIN_R6_R::new(((self.bits >> 14) & 3) as u8) } - #[doc = "Bits 8:9"] + #[doc = "Bits 16:18"] #[inline(always)] - pub fn atest_gain_r9(&self) -> ATEST_GAIN_R9_R { - ATEST_GAIN_R9_R::new(((self.bits >> 8) & 0x03) as u8) + pub fn atest_gain_r5(&self) -> ATEST_GAIN_R5_R { + ATEST_GAIN_R5_R::new(((self.bits >> 16) & 7) as u8) } - #[doc = "Bit 6"] + #[doc = "Bit 20"] #[inline(always)] - pub fn atest_in_en(&self) -> ATEST_IN_EN_R { - ATEST_IN_EN_R::new(((self.bits >> 6) & 0x01) != 0) + pub fn atest_out_en_q(&self) -> ATEST_OUT_EN_Q_R { + ATEST_OUT_EN_Q_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bit 5"] + #[doc = "Bit 21"] #[inline(always)] - pub fn atest_in_trx_sw(&self) -> ATEST_IN_TRX_SW_R { - ATEST_IN_TRX_SW_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn atest_out_en_i(&self) -> ATEST_OUT_EN_I_R { + ATEST_OUT_EN_I_R::new(((self.bits >> 21) & 1) != 0) } - #[doc = "Bit 4"] + #[doc = "Bit 22"] #[inline(always)] - pub fn atest_dac_en(&self) -> ATEST_DAC_EN_R { - ATEST_DAC_EN_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn atest_in_en_q(&self) -> ATEST_IN_EN_Q_R { + ATEST_IN_EN_Q_R::new(((self.bits >> 22) & 1) != 0) } - #[doc = "Bits 0:3"] + #[doc = "Bit 23"] #[inline(always)] - pub fn atest_op_cc(&self) -> ATEST_OP_CC_R { - ATEST_OP_CC_R::new((self.bits & 0x0f) as u8) + pub fn atest_in_en_i(&self) -> ATEST_IN_EN_I_R { + ATEST_IN_EN_I_R::new(((self.bits >> 23) & 1) != 0) } } impl W { - #[doc = "Bit 23"] + #[doc = "Bits 0:3"] #[inline(always)] - pub fn atest_in_en_i(&mut self) -> ATEST_IN_EN_I_W { - ATEST_IN_EN_I_W { w: self } + #[must_use] + pub fn atest_op_cc(&mut self) -> ATEST_OP_CC_W<0> { + ATEST_OP_CC_W::new(self) } - #[doc = "Bit 22"] + #[doc = "Bit 4"] #[inline(always)] - pub fn atest_in_en_q(&mut self) -> ATEST_IN_EN_Q_W { - ATEST_IN_EN_Q_W { w: self } + #[must_use] + pub fn atest_dac_en(&mut self) -> ATEST_DAC_EN_W<4> { + ATEST_DAC_EN_W::new(self) } - #[doc = "Bit 21"] + #[doc = "Bit 5"] #[inline(always)] - pub fn atest_out_en_i(&mut self) -> ATEST_OUT_EN_I_W { - ATEST_OUT_EN_I_W { w: self } + #[must_use] + pub fn atest_in_trx_sw(&mut self) -> ATEST_IN_TRX_SW_W<5> { + ATEST_IN_TRX_SW_W::new(self) } - #[doc = "Bit 20"] + #[doc = "Bit 6"] #[inline(always)] - pub fn atest_out_en_q(&mut self) -> ATEST_OUT_EN_Q_W { - ATEST_OUT_EN_Q_W { w: self } + #[must_use] + pub fn atest_in_en(&mut self) -> ATEST_IN_EN_W<6> { + ATEST_IN_EN_W::new(self) } - #[doc = "Bits 16:18"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn atest_gain_r5(&mut self) -> ATEST_GAIN_R5_W { - ATEST_GAIN_R5_W { w: self } + #[must_use] + pub fn atest_gain_r9(&mut self) -> ATEST_GAIN_R9_W<8> { + ATEST_GAIN_R9_W::new(self) } - #[doc = "Bits 14:15"] + #[doc = "Bits 10:11"] #[inline(always)] - pub fn atest_gain_r6(&mut self) -> ATEST_GAIN_R6_W { - ATEST_GAIN_R6_W { w: self } + #[must_use] + pub fn atest_gain_r8(&mut self) -> ATEST_GAIN_R8_W<10> { + ATEST_GAIN_R8_W::new(self) } #[doc = "Bits 12:13"] #[inline(always)] - pub fn atest_gain_r7(&mut self) -> ATEST_GAIN_R7_W { - ATEST_GAIN_R7_W { w: self } + #[must_use] + pub fn atest_gain_r7(&mut self) -> ATEST_GAIN_R7_W<12> { + ATEST_GAIN_R7_W::new(self) } - #[doc = "Bits 10:11"] + #[doc = "Bits 14:15"] #[inline(always)] - pub fn atest_gain_r8(&mut self) -> ATEST_GAIN_R8_W { - ATEST_GAIN_R8_W { w: self } + #[must_use] + pub fn atest_gain_r6(&mut self) -> ATEST_GAIN_R6_W<14> { + ATEST_GAIN_R6_W::new(self) } - #[doc = "Bits 8:9"] + #[doc = "Bits 16:18"] #[inline(always)] - pub fn atest_gain_r9(&mut self) -> ATEST_GAIN_R9_W { - ATEST_GAIN_R9_W { w: self } + #[must_use] + pub fn atest_gain_r5(&mut self) -> ATEST_GAIN_R5_W<16> { + ATEST_GAIN_R5_W::new(self) } - #[doc = "Bit 6"] + #[doc = "Bit 20"] #[inline(always)] - pub fn atest_in_en(&mut self) -> ATEST_IN_EN_W { - ATEST_IN_EN_W { w: self } + #[must_use] + pub fn atest_out_en_q(&mut self) -> ATEST_OUT_EN_Q_W<20> { + ATEST_OUT_EN_Q_W::new(self) } - #[doc = "Bit 5"] + #[doc = "Bit 21"] #[inline(always)] - pub fn atest_in_trx_sw(&mut self) -> ATEST_IN_TRX_SW_W { - ATEST_IN_TRX_SW_W { w: self } + #[must_use] + pub fn atest_out_en_i(&mut self) -> ATEST_OUT_EN_I_W<21> { + ATEST_OUT_EN_I_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 22"] #[inline(always)] - pub fn atest_dac_en(&mut self) -> ATEST_DAC_EN_W { - ATEST_DAC_EN_W { w: self } + #[must_use] + pub fn atest_in_en_q(&mut self) -> ATEST_IN_EN_Q_W<22> { + ATEST_IN_EN_Q_W::new(self) } - #[doc = "Bits 0:3"] + #[doc = "Bit 23"] #[inline(always)] - pub fn atest_op_cc(&mut self) -> ATEST_OP_CC_W { - ATEST_OP_CC_W { w: self } + #[must_use] + pub fn atest_in_en_i(&mut self) -> ATEST_IN_EN_I_W<23> { + ATEST_IN_EN_I_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -591,11 +251,10 @@ impl crate::Readable for TEN_AC_SPEC { #[doc = "`write(|w| ..)` method takes [ten_ac::W](W) writer structure"] impl crate::Writable for TEN_AC_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ten_ac to value 0"] impl crate::Resettable for TEN_AC_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/ten_dc.rs b/src/rf/ten_dc.rs index 8adbb95..08cbed8 100644 --- a/src/rf/ten_dc.rs +++ b/src/rf/ten_dc.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,925 +28,317 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `ten_lodist` reader - "] -pub struct TEN_LODIST_R(crate::FieldReader); -impl TEN_LODIST_R { - pub(crate) fn new(bits: bool) -> Self { - TEN_LODIST_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TEN_LODIST_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ten_lodist` writer - "] -pub struct TEN_LODIST_W<'a> { - w: &'a mut W, -} -impl<'a> TEN_LODIST_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 27)) | ((value as u32 & 0x01) << 27); - self.w - } -} -#[doc = "Field `ten_lf` reader - "] -pub struct TEN_LF_R(crate::FieldReader); -impl TEN_LF_R { - pub(crate) fn new(bits: bool) -> Self { - TEN_LF_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TEN_LF_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ten_lf` writer - "] -pub struct TEN_LF_W<'a> { - w: &'a mut W, -} -impl<'a> TEN_LF_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 26)) | ((value as u32 & 0x01) << 26); - self.w - } -} -#[doc = "Field `ten_pfdcp` reader - "] -pub struct TEN_PFDCP_R(crate::FieldReader); -impl TEN_PFDCP_R { - pub(crate) fn new(bits: bool) -> Self { - TEN_PFDCP_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TEN_PFDCP_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ten_pfdcp` writer - "] -pub struct TEN_PFDCP_W<'a> { - w: &'a mut W, -} -impl<'a> TEN_PFDCP_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 25)) | ((value as u32 & 0x01) << 25); - self.w - } -} -#[doc = "Field `ten_vco` reader - "] -pub struct TEN_VCO_R(crate::FieldReader); -impl TEN_VCO_R { - pub(crate) fn new(bits: bool) -> Self { - TEN_VCO_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TEN_VCO_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ten_vco` writer - "] -pub struct TEN_VCO_W<'a> { - w: &'a mut W, -} -impl<'a> TEN_VCO_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24); - self.w - } -} -#[doc = "Field `ten_dac_q` reader - "] -pub struct TEN_DAC_Q_R(crate::FieldReader); -impl TEN_DAC_Q_R { - pub(crate) fn new(bits: bool) -> Self { - TEN_DAC_Q_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TEN_DAC_Q_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ten_dac_q` writer - "] -pub struct TEN_DAC_Q_W<'a> { - w: &'a mut W, -} -impl<'a> TEN_DAC_Q_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 22)) | ((value as u32 & 0x01) << 22); - self.w - } -} -#[doc = "Field `ten_dac_i` reader - "] -pub struct TEN_DAC_I_R(crate::FieldReader); -impl TEN_DAC_I_R { - pub(crate) fn new(bits: bool) -> Self { - TEN_DAC_I_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TEN_DAC_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ten_dac_i` writer - "] -pub struct TEN_DAC_I_W<'a> { - w: &'a mut W, -} -impl<'a> TEN_DAC_I_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); - self.w - } -} -#[doc = "Field `ten_adc` reader - "] -pub struct TEN_ADC_R(crate::FieldReader); -impl TEN_ADC_R { - pub(crate) fn new(bits: bool) -> Self { - TEN_ADC_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TEN_ADC_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ten_adc` writer - "] -pub struct TEN_ADC_W<'a> { - w: &'a mut W, -} -impl<'a> TEN_ADC_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w - } -} -#[doc = "Field `ten_tbb` reader - "] -pub struct TEN_TBB_R(crate::FieldReader); -impl TEN_TBB_R { - pub(crate) fn new(bits: bool) -> Self { - TEN_TBB_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TEN_TBB_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ten_tbb` writer - "] -pub struct TEN_TBB_W<'a> { - w: &'a mut W, -} -impl<'a> TEN_TBB_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 19)) | ((value as u32 & 0x01) << 19); - self.w - } -} -#[doc = "Field `ten_atest` reader - "] -pub struct TEN_ATEST_R(crate::FieldReader); -impl TEN_ATEST_R { - pub(crate) fn new(bits: bool) -> Self { - TEN_ATEST_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TEN_ATEST_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ten_atest` writer - "] -pub struct TEN_ATEST_W<'a> { - w: &'a mut W, -} -impl<'a> TEN_ATEST_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18); - self.w - } -} -#[doc = "Field `ten_bq` reader - "] -pub struct TEN_BQ_R(crate::FieldReader); -impl TEN_BQ_R { - pub(crate) fn new(bits: bool) -> Self { - TEN_BQ_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TEN_BQ_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ten_bq` writer - "] -pub struct TEN_BQ_W<'a> { - w: &'a mut W, -} -impl<'a> TEN_BQ_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w - } -} -#[doc = "Field `ten_tia` reader - "] -pub struct TEN_TIA_R(crate::FieldReader); -impl TEN_TIA_R { - pub(crate) fn new(bits: bool) -> Self { - TEN_TIA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TEN_TIA_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ten_tia` writer - "] -pub struct TEN_TIA_W<'a> { - w: &'a mut W, -} -impl<'a> TEN_TIA_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `ten_tmx` reader - "] -pub struct TEN_TMX_R(crate::FieldReader); -impl TEN_TMX_R { - pub(crate) fn new(bits: bool) -> Self { - TEN_TMX_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TEN_TMX_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ten_tmx` writer - "] -pub struct TEN_TMX_W<'a> { - w: &'a mut W, -} -impl<'a> TEN_TMX_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15); - self.w - } -} -#[doc = "Field `ten_pa` reader - "] -pub struct TEN_PA_R(crate::FieldReader); -impl TEN_PA_R { - pub(crate) fn new(bits: bool) -> Self { - TEN_PA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TEN_PA_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ten_pa` writer - "] -pub struct TEN_PA_W<'a> { - w: &'a mut W, -} -impl<'a> TEN_PA_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14); - self.w - } -} -#[doc = "Field `ten_rrf_1` reader - "] -pub struct TEN_RRF_1_R(crate::FieldReader); -impl TEN_RRF_1_R { - pub(crate) fn new(bits: bool) -> Self { - TEN_RRF_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TEN_RRF_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ten_rrf_1` writer - "] -pub struct TEN_RRF_1_W<'a> { - w: &'a mut W, -} -impl<'a> TEN_RRF_1_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13); - self.w - } -} -#[doc = "Field `ten_rrf_0` reader - "] -pub struct TEN_RRF_0_R(crate::FieldReader); -impl TEN_RRF_0_R { - pub(crate) fn new(bits: bool) -> Self { - TEN_RRF_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TEN_RRF_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ten_rrf_0` writer - "] -pub struct TEN_RRF_0_W<'a> { - w: &'a mut W, -} -impl<'a> TEN_RRF_0_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} -#[doc = "Field `ten_clkpll_sfreg` reader - "] -pub struct TEN_CLKPLL_SFREG_R(crate::FieldReader); -impl TEN_CLKPLL_SFREG_R { - pub(crate) fn new(bits: bool) -> Self { - TEN_CLKPLL_SFREG_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TEN_CLKPLL_SFREG_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ten_clkpll_sfreg` writer - "] -pub struct TEN_CLKPLL_SFREG_W<'a> { - w: &'a mut W, -} -impl<'a> TEN_CLKPLL_SFREG_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w - } -} -#[doc = "Field `ten_clkpll` reader - "] -pub struct TEN_CLKPLL_R(crate::FieldReader); -impl TEN_CLKPLL_R { - pub(crate) fn new(bits: bool) -> Self { - TEN_CLKPLL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TEN_CLKPLL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `ten_clkpll` writer - "] -pub struct TEN_CLKPLL_W<'a> { - w: &'a mut W, -} -impl<'a> TEN_CLKPLL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `dc_tp_clkpll_en` reader - "] -pub struct DC_TP_CLKPLL_EN_R(crate::FieldReader); -impl DC_TP_CLKPLL_EN_R { - pub(crate) fn new(bits: bool) -> Self { - DC_TP_CLKPLL_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DC_TP_CLKPLL_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dc_tp_clkpll_en` writer - "] -pub struct DC_TP_CLKPLL_EN_W<'a> { - w: &'a mut W, -} -impl<'a> DC_TP_CLKPLL_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} -#[doc = "Field `dc_tp_en` reader - "] -pub struct DC_TP_EN_R(crate::FieldReader); -impl DC_TP_EN_R { - pub(crate) fn new(bits: bool) -> Self { - DC_TP_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DC_TP_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dc_tp_en` writer - "] -pub struct DC_TP_EN_W<'a> { - w: &'a mut W, -} -impl<'a> DC_TP_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} #[doc = "Field `tmux` reader - "] -pub struct TMUX_R(crate::FieldReader); -impl TMUX_R { - pub(crate) fn new(bits: u8) -> Self { - TMUX_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TMUX_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TMUX_R = crate::FieldReader; #[doc = "Field `tmux` writer - "] -pub struct TMUX_W<'a> { - w: &'a mut W, -} -impl<'a> TMUX_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type TMUX_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TEN_DC_SPEC, u8, u8, 3, O>; +#[doc = "Field `dc_tp_en` reader - "] +pub type DC_TP_EN_R = crate::BitReader; +#[doc = "Field `dc_tp_en` writer - "] +pub type DC_TP_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>; +#[doc = "Field `dc_tp_clkpll_en` reader - "] +pub type DC_TP_CLKPLL_EN_R = crate::BitReader; +#[doc = "Field `dc_tp_clkpll_en` writer - "] +pub type DC_TP_CLKPLL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>; +#[doc = "Field `ten_clkpll` reader - "] +pub type TEN_CLKPLL_R = crate::BitReader; +#[doc = "Field `ten_clkpll` writer - "] +pub type TEN_CLKPLL_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>; +#[doc = "Field `ten_clkpll_sfreg` reader - "] +pub type TEN_CLKPLL_SFREG_R = crate::BitReader; +#[doc = "Field `ten_clkpll_sfreg` writer - "] +pub type TEN_CLKPLL_SFREG_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>; +#[doc = "Field `ten_rrf_0` reader - "] +pub type TEN_RRF_0_R = crate::BitReader; +#[doc = "Field `ten_rrf_0` writer - "] +pub type TEN_RRF_0_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>; +#[doc = "Field `ten_rrf_1` reader - "] +pub type TEN_RRF_1_R = crate::BitReader; +#[doc = "Field `ten_rrf_1` writer - "] +pub type TEN_RRF_1_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>; +#[doc = "Field `ten_pa` reader - "] +pub type TEN_PA_R = crate::BitReader; +#[doc = "Field `ten_pa` writer - "] +pub type TEN_PA_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>; +#[doc = "Field `ten_tmx` reader - "] +pub type TEN_TMX_R = crate::BitReader; +#[doc = "Field `ten_tmx` writer - "] +pub type TEN_TMX_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>; +#[doc = "Field `ten_tia` reader - "] +pub type TEN_TIA_R = crate::BitReader; +#[doc = "Field `ten_tia` writer - "] +pub type TEN_TIA_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>; +#[doc = "Field `ten_bq` reader - "] +pub type TEN_BQ_R = crate::BitReader; +#[doc = "Field `ten_bq` writer - "] +pub type TEN_BQ_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>; +#[doc = "Field `ten_atest` reader - "] +pub type TEN_ATEST_R = crate::BitReader; +#[doc = "Field `ten_atest` writer - "] +pub type TEN_ATEST_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>; +#[doc = "Field `ten_tbb` reader - "] +pub type TEN_TBB_R = crate::BitReader; +#[doc = "Field `ten_tbb` writer - "] +pub type TEN_TBB_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>; +#[doc = "Field `ten_adc` reader - "] +pub type TEN_ADC_R = crate::BitReader; +#[doc = "Field `ten_adc` writer - "] +pub type TEN_ADC_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>; +#[doc = "Field `ten_dac_i` reader - "] +pub type TEN_DAC_I_R = crate::BitReader; +#[doc = "Field `ten_dac_i` writer - "] +pub type TEN_DAC_I_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>; +#[doc = "Field `ten_dac_q` reader - "] +pub type TEN_DAC_Q_R = crate::BitReader; +#[doc = "Field `ten_dac_q` writer - "] +pub type TEN_DAC_Q_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>; +#[doc = "Field `ten_vco` reader - "] +pub type TEN_VCO_R = crate::BitReader; +#[doc = "Field `ten_vco` writer - "] +pub type TEN_VCO_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>; +#[doc = "Field `ten_pfdcp` reader - "] +pub type TEN_PFDCP_R = crate::BitReader; +#[doc = "Field `ten_pfdcp` writer - "] +pub type TEN_PFDCP_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>; +#[doc = "Field `ten_lf` reader - "] +pub type TEN_LF_R = crate::BitReader; +#[doc = "Field `ten_lf` writer - "] +pub type TEN_LF_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>; +#[doc = "Field `ten_lodist` reader - "] +pub type TEN_LODIST_R = crate::BitReader; +#[doc = "Field `ten_lodist` writer - "] +pub type TEN_LODIST_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DC_SPEC, bool, O>; +impl R { + #[doc = "Bits 0:2"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x07) | (value as u32 & 0x07); - self.w + pub fn tmux(&self) -> TMUX_R { + TMUX_R::new((self.bits & 7) as u8) } -} -impl R { - #[doc = "Bit 27"] + #[doc = "Bit 3"] #[inline(always)] - pub fn ten_lodist(&self) -> TEN_LODIST_R { - TEN_LODIST_R::new(((self.bits >> 27) & 0x01) != 0) + pub fn dc_tp_en(&self) -> DC_TP_EN_R { + DC_TP_EN_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bit 26"] + #[doc = "Bit 4"] #[inline(always)] - pub fn ten_lf(&self) -> TEN_LF_R { - TEN_LF_R::new(((self.bits >> 26) & 0x01) != 0) + pub fn dc_tp_clkpll_en(&self) -> DC_TP_CLKPLL_EN_R { + DC_TP_CLKPLL_EN_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 25"] + #[doc = "Bit 8"] #[inline(always)] - pub fn ten_pfdcp(&self) -> TEN_PFDCP_R { - TEN_PFDCP_R::new(((self.bits >> 25) & 0x01) != 0) + pub fn ten_clkpll(&self) -> TEN_CLKPLL_R { + TEN_CLKPLL_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bit 24"] + #[doc = "Bit 9"] #[inline(always)] - pub fn ten_vco(&self) -> TEN_VCO_R { - TEN_VCO_R::new(((self.bits >> 24) & 0x01) != 0) + pub fn ten_clkpll_sfreg(&self) -> TEN_CLKPLL_SFREG_R { + TEN_CLKPLL_SFREG_R::new(((self.bits >> 9) & 1) != 0) } - #[doc = "Bit 22"] + #[doc = "Bit 12"] #[inline(always)] - pub fn ten_dac_q(&self) -> TEN_DAC_Q_R { - TEN_DAC_Q_R::new(((self.bits >> 22) & 0x01) != 0) + pub fn ten_rrf_0(&self) -> TEN_RRF_0_R { + TEN_RRF_0_R::new(((self.bits >> 12) & 1) != 0) } - #[doc = "Bit 21"] + #[doc = "Bit 13"] #[inline(always)] - pub fn ten_dac_i(&self) -> TEN_DAC_I_R { - TEN_DAC_I_R::new(((self.bits >> 21) & 0x01) != 0) + pub fn ten_rrf_1(&self) -> TEN_RRF_1_R { + TEN_RRF_1_R::new(((self.bits >> 13) & 1) != 0) } - #[doc = "Bit 20"] + #[doc = "Bit 14"] #[inline(always)] - pub fn ten_adc(&self) -> TEN_ADC_R { - TEN_ADC_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn ten_pa(&self) -> TEN_PA_R { + TEN_PA_R::new(((self.bits >> 14) & 1) != 0) } - #[doc = "Bit 19"] + #[doc = "Bit 15"] #[inline(always)] - pub fn ten_tbb(&self) -> TEN_TBB_R { - TEN_TBB_R::new(((self.bits >> 19) & 0x01) != 0) + pub fn ten_tmx(&self) -> TEN_TMX_R { + TEN_TMX_R::new(((self.bits >> 15) & 1) != 0) } - #[doc = "Bit 18"] + #[doc = "Bit 16"] #[inline(always)] - pub fn ten_atest(&self) -> TEN_ATEST_R { - TEN_ATEST_R::new(((self.bits >> 18) & 0x01) != 0) + pub fn ten_tia(&self) -> TEN_TIA_R { + TEN_TIA_R::new(((self.bits >> 16) & 1) != 0) } #[doc = "Bit 17"] #[inline(always)] pub fn ten_bq(&self) -> TEN_BQ_R { - TEN_BQ_R::new(((self.bits >> 17) & 0x01) != 0) - } - #[doc = "Bit 16"] - #[inline(always)] - pub fn ten_tia(&self) -> TEN_TIA_R { - TEN_TIA_R::new(((self.bits >> 16) & 0x01) != 0) + TEN_BQ_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bit 15"] + #[doc = "Bit 18"] #[inline(always)] - pub fn ten_tmx(&self) -> TEN_TMX_R { - TEN_TMX_R::new(((self.bits >> 15) & 0x01) != 0) + pub fn ten_atest(&self) -> TEN_ATEST_R { + TEN_ATEST_R::new(((self.bits >> 18) & 1) != 0) } - #[doc = "Bit 14"] + #[doc = "Bit 19"] #[inline(always)] - pub fn ten_pa(&self) -> TEN_PA_R { - TEN_PA_R::new(((self.bits >> 14) & 0x01) != 0) + pub fn ten_tbb(&self) -> TEN_TBB_R { + TEN_TBB_R::new(((self.bits >> 19) & 1) != 0) } - #[doc = "Bit 13"] + #[doc = "Bit 20"] #[inline(always)] - pub fn ten_rrf_1(&self) -> TEN_RRF_1_R { - TEN_RRF_1_R::new(((self.bits >> 13) & 0x01) != 0) + pub fn ten_adc(&self) -> TEN_ADC_R { + TEN_ADC_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bit 12"] + #[doc = "Bit 21"] #[inline(always)] - pub fn ten_rrf_0(&self) -> TEN_RRF_0_R { - TEN_RRF_0_R::new(((self.bits >> 12) & 0x01) != 0) + pub fn ten_dac_i(&self) -> TEN_DAC_I_R { + TEN_DAC_I_R::new(((self.bits >> 21) & 1) != 0) } - #[doc = "Bit 9"] + #[doc = "Bit 22"] #[inline(always)] - pub fn ten_clkpll_sfreg(&self) -> TEN_CLKPLL_SFREG_R { - TEN_CLKPLL_SFREG_R::new(((self.bits >> 9) & 0x01) != 0) + pub fn ten_dac_q(&self) -> TEN_DAC_Q_R { + TEN_DAC_Q_R::new(((self.bits >> 22) & 1) != 0) } - #[doc = "Bit 8"] + #[doc = "Bit 24"] #[inline(always)] - pub fn ten_clkpll(&self) -> TEN_CLKPLL_R { - TEN_CLKPLL_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn ten_vco(&self) -> TEN_VCO_R { + TEN_VCO_R::new(((self.bits >> 24) & 1) != 0) } - #[doc = "Bit 4"] + #[doc = "Bit 25"] #[inline(always)] - pub fn dc_tp_clkpll_en(&self) -> DC_TP_CLKPLL_EN_R { - DC_TP_CLKPLL_EN_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn ten_pfdcp(&self) -> TEN_PFDCP_R { + TEN_PFDCP_R::new(((self.bits >> 25) & 1) != 0) } - #[doc = "Bit 3"] + #[doc = "Bit 26"] #[inline(always)] - pub fn dc_tp_en(&self) -> DC_TP_EN_R { - DC_TP_EN_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn ten_lf(&self) -> TEN_LF_R { + TEN_LF_R::new(((self.bits >> 26) & 1) != 0) } - #[doc = "Bits 0:2"] + #[doc = "Bit 27"] #[inline(always)] - pub fn tmux(&self) -> TMUX_R { - TMUX_R::new((self.bits & 0x07) as u8) + pub fn ten_lodist(&self) -> TEN_LODIST_R { + TEN_LODIST_R::new(((self.bits >> 27) & 1) != 0) } } impl W { - #[doc = "Bit 27"] + #[doc = "Bits 0:2"] #[inline(always)] - pub fn ten_lodist(&mut self) -> TEN_LODIST_W { - TEN_LODIST_W { w: self } + #[must_use] + pub fn tmux(&mut self) -> TMUX_W<0> { + TMUX_W::new(self) } - #[doc = "Bit 26"] + #[doc = "Bit 3"] #[inline(always)] - pub fn ten_lf(&mut self) -> TEN_LF_W { - TEN_LF_W { w: self } + #[must_use] + pub fn dc_tp_en(&mut self) -> DC_TP_EN_W<3> { + DC_TP_EN_W::new(self) } - #[doc = "Bit 25"] + #[doc = "Bit 4"] #[inline(always)] - pub fn ten_pfdcp(&mut self) -> TEN_PFDCP_W { - TEN_PFDCP_W { w: self } + #[must_use] + pub fn dc_tp_clkpll_en(&mut self) -> DC_TP_CLKPLL_EN_W<4> { + DC_TP_CLKPLL_EN_W::new(self) } - #[doc = "Bit 24"] + #[doc = "Bit 8"] #[inline(always)] - pub fn ten_vco(&mut self) -> TEN_VCO_W { - TEN_VCO_W { w: self } + #[must_use] + pub fn ten_clkpll(&mut self) -> TEN_CLKPLL_W<8> { + TEN_CLKPLL_W::new(self) } - #[doc = "Bit 22"] + #[doc = "Bit 9"] #[inline(always)] - pub fn ten_dac_q(&mut self) -> TEN_DAC_Q_W { - TEN_DAC_Q_W { w: self } + #[must_use] + pub fn ten_clkpll_sfreg(&mut self) -> TEN_CLKPLL_SFREG_W<9> { + TEN_CLKPLL_SFREG_W::new(self) } - #[doc = "Bit 21"] + #[doc = "Bit 12"] #[inline(always)] - pub fn ten_dac_i(&mut self) -> TEN_DAC_I_W { - TEN_DAC_I_W { w: self } + #[must_use] + pub fn ten_rrf_0(&mut self) -> TEN_RRF_0_W<12> { + TEN_RRF_0_W::new(self) } - #[doc = "Bit 20"] + #[doc = "Bit 13"] #[inline(always)] - pub fn ten_adc(&mut self) -> TEN_ADC_W { - TEN_ADC_W { w: self } + #[must_use] + pub fn ten_rrf_1(&mut self) -> TEN_RRF_1_W<13> { + TEN_RRF_1_W::new(self) } - #[doc = "Bit 19"] + #[doc = "Bit 14"] #[inline(always)] - pub fn ten_tbb(&mut self) -> TEN_TBB_W { - TEN_TBB_W { w: self } + #[must_use] + pub fn ten_pa(&mut self) -> TEN_PA_W<14> { + TEN_PA_W::new(self) } - #[doc = "Bit 18"] + #[doc = "Bit 15"] #[inline(always)] - pub fn ten_atest(&mut self) -> TEN_ATEST_W { - TEN_ATEST_W { w: self } + #[must_use] + pub fn ten_tmx(&mut self) -> TEN_TMX_W<15> { + TEN_TMX_W::new(self) } - #[doc = "Bit 17"] + #[doc = "Bit 16"] #[inline(always)] - pub fn ten_bq(&mut self) -> TEN_BQ_W { - TEN_BQ_W { w: self } + #[must_use] + pub fn ten_tia(&mut self) -> TEN_TIA_W<16> { + TEN_TIA_W::new(self) } - #[doc = "Bit 16"] + #[doc = "Bit 17"] #[inline(always)] - pub fn ten_tia(&mut self) -> TEN_TIA_W { - TEN_TIA_W { w: self } + #[must_use] + pub fn ten_bq(&mut self) -> TEN_BQ_W<17> { + TEN_BQ_W::new(self) } - #[doc = "Bit 15"] + #[doc = "Bit 18"] #[inline(always)] - pub fn ten_tmx(&mut self) -> TEN_TMX_W { - TEN_TMX_W { w: self } + #[must_use] + pub fn ten_atest(&mut self) -> TEN_ATEST_W<18> { + TEN_ATEST_W::new(self) } - #[doc = "Bit 14"] + #[doc = "Bit 19"] #[inline(always)] - pub fn ten_pa(&mut self) -> TEN_PA_W { - TEN_PA_W { w: self } + #[must_use] + pub fn ten_tbb(&mut self) -> TEN_TBB_W<19> { + TEN_TBB_W::new(self) } - #[doc = "Bit 13"] + #[doc = "Bit 20"] #[inline(always)] - pub fn ten_rrf_1(&mut self) -> TEN_RRF_1_W { - TEN_RRF_1_W { w: self } + #[must_use] + pub fn ten_adc(&mut self) -> TEN_ADC_W<20> { + TEN_ADC_W::new(self) } - #[doc = "Bit 12"] + #[doc = "Bit 21"] #[inline(always)] - pub fn ten_rrf_0(&mut self) -> TEN_RRF_0_W { - TEN_RRF_0_W { w: self } + #[must_use] + pub fn ten_dac_i(&mut self) -> TEN_DAC_I_W<21> { + TEN_DAC_I_W::new(self) } - #[doc = "Bit 9"] + #[doc = "Bit 22"] #[inline(always)] - pub fn ten_clkpll_sfreg(&mut self) -> TEN_CLKPLL_SFREG_W { - TEN_CLKPLL_SFREG_W { w: self } + #[must_use] + pub fn ten_dac_q(&mut self) -> TEN_DAC_Q_W<22> { + TEN_DAC_Q_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bit 24"] #[inline(always)] - pub fn ten_clkpll(&mut self) -> TEN_CLKPLL_W { - TEN_CLKPLL_W { w: self } + #[must_use] + pub fn ten_vco(&mut self) -> TEN_VCO_W<24> { + TEN_VCO_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 25"] #[inline(always)] - pub fn dc_tp_clkpll_en(&mut self) -> DC_TP_CLKPLL_EN_W { - DC_TP_CLKPLL_EN_W { w: self } + #[must_use] + pub fn ten_pfdcp(&mut self) -> TEN_PFDCP_W<25> { + TEN_PFDCP_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bit 26"] #[inline(always)] - pub fn dc_tp_en(&mut self) -> DC_TP_EN_W { - DC_TP_EN_W { w: self } + #[must_use] + pub fn ten_lf(&mut self) -> TEN_LF_W<26> { + TEN_LF_W::new(self) } - #[doc = "Bits 0:2"] + #[doc = "Bit 27"] #[inline(always)] - pub fn tmux(&mut self) -> TMUX_W { - TMUX_W { w: self } + #[must_use] + pub fn ten_lodist(&mut self) -> TEN_LODIST_W<27> { + TEN_LODIST_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -963,11 +356,10 @@ impl crate::Readable for TEN_DC_SPEC { #[doc = "`write(|w| ..)` method takes [ten_dc::W](W) writer structure"] impl crate::Writable for TEN_DC_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ten_dc to value 0"] impl crate::Resettable for TEN_DC_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/ten_dig.rs b/src/rf/ten_dig.rs index 4af4026..17f5c81 100644 --- a/src/rf/ten_dig.rs +++ b/src/rf/ten_dig.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,475 +28,168 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rf_dtest_en` reader - "] -pub struct RF_DTEST_EN_R(crate::FieldReader); -impl RF_DTEST_EN_R { - pub(crate) fn new(bits: bool) -> Self { - RF_DTEST_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RF_DTEST_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rf_dtest_en` writer - "] -pub struct RF_DTEST_EN_W<'a> { - w: &'a mut W, -} -impl<'a> RF_DTEST_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23); - self.w - } -} -#[doc = "Field `dtest_pull_down` reader - "] -pub struct DTEST_PULL_DOWN_R(crate::FieldReader); -impl DTEST_PULL_DOWN_R { - pub(crate) fn new(bits: bool) -> Self { - DTEST_PULL_DOWN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DTEST_PULL_DOWN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dtest_pull_down` writer - "] -pub struct DTEST_PULL_DOWN_W<'a> { - w: &'a mut W, -} -impl<'a> DTEST_PULL_DOWN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w - } -} -#[doc = "Field `dten_lo_fref` reader - "] -pub struct DTEN_LO_FREF_R(crate::FieldReader); -impl DTEN_LO_FREF_R { - pub(crate) fn new(bits: bool) -> Self { - DTEN_LO_FREF_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DTEN_LO_FREF_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dten_lo_fref` writer - "] -pub struct DTEN_LO_FREF_W<'a> { - w: &'a mut W, -} -impl<'a> DTEN_LO_FREF_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `dten_lo_fsdm` reader - "] -pub struct DTEN_LO_FSDM_R(crate::FieldReader); -impl DTEN_LO_FSDM_R { - pub(crate) fn new(bits: bool) -> Self { - DTEN_LO_FSDM_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DTEN_LO_FSDM_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dten_lo_fsdm` writer - "] -pub struct DTEN_LO_FSDM_W<'a> { - w: &'a mut W, -} -impl<'a> DTEN_LO_FSDM_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w - } -} -#[doc = "Field `dten_clkpll_fin` reader - "] -pub struct DTEN_CLKPLL_FIN_R(crate::FieldReader); -impl DTEN_CLKPLL_FIN_R { - pub(crate) fn new(bits: bool) -> Self { - DTEN_CLKPLL_FIN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DTEN_CLKPLL_FIN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dten_clkpll_fin` writer - "] -pub struct DTEN_CLKPLL_FIN_W<'a> { - w: &'a mut W, -} -impl<'a> DTEN_CLKPLL_FIN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w - } -} -#[doc = "Field `dten_clkpll_fref` reader - "] -pub struct DTEN_CLKPLL_FREF_R(crate::FieldReader); -impl DTEN_CLKPLL_FREF_R { - pub(crate) fn new(bits: bool) -> Self { - DTEN_CLKPLL_FREF_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DTEN_CLKPLL_FREF_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dten_clkpll_fref` writer - "] -pub struct DTEN_CLKPLL_FREF_W<'a> { - w: &'a mut W, -} -impl<'a> DTEN_CLKPLL_FREF_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} -#[doc = "Field `dten_clkpll_fsdm` reader - "] -pub struct DTEN_CLKPLL_FSDM_R(crate::FieldReader); -impl DTEN_CLKPLL_FSDM_R { - pub(crate) fn new(bits: bool) -> Self { - DTEN_CLKPLL_FSDM_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DTEN_CLKPLL_FSDM_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dten_clkpll_fsdm` writer - "] -pub struct DTEN_CLKPLL_FSDM_W<'a> { - w: &'a mut W, -} -impl<'a> DTEN_CLKPLL_FSDM_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `dten_clkpll_clk32m` reader - "] -pub struct DTEN_CLKPLL_CLK32M_R(crate::FieldReader); -impl DTEN_CLKPLL_CLK32M_R { - pub(crate) fn new(bits: bool) -> Self { - DTEN_CLKPLL_CLK32M_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DTEN_CLKPLL_CLK32M_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dten_clkpll_clk32m` writer - "] -pub struct DTEN_CLKPLL_CLK32M_W<'a> { - w: &'a mut W, -} -impl<'a> DTEN_CLKPLL_CLK32M_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `dten_clkpll_clk96m` reader - "] -pub struct DTEN_CLKPLL_CLK96M_R(crate::FieldReader); -impl DTEN_CLKPLL_CLK96M_R { - pub(crate) fn new(bits: bool) -> Self { - DTEN_CLKPLL_CLK96M_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DTEN_CLKPLL_CLK96M_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `dten_clkpll_clk96m` writer - "] -pub struct DTEN_CLKPLL_CLK96M_W<'a> { - w: &'a mut W, -} -impl<'a> DTEN_CLKPLL_CLK96M_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `dten_clkpll_postdiv_clk` reader - "] -pub struct DTEN_CLKPLL_POSTDIV_CLK_R(crate::FieldReader); -impl DTEN_CLKPLL_POSTDIV_CLK_R { - pub(crate) fn new(bits: bool) -> Self { - DTEN_CLKPLL_POSTDIV_CLK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for DTEN_CLKPLL_POSTDIV_CLK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type DTEN_CLKPLL_POSTDIV_CLK_R = crate::BitReader; #[doc = "Field `dten_clkpll_postdiv_clk` writer - "] -pub struct DTEN_CLKPLL_POSTDIV_CLK_W<'a> { - w: &'a mut W, -} -impl<'a> DTEN_CLKPLL_POSTDIV_CLK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type DTEN_CLKPLL_POSTDIV_CLK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TEN_DIG_SPEC, bool, O>; +#[doc = "Field `dten_clkpll_clk96m` reader - "] +pub type DTEN_CLKPLL_CLK96M_R = crate::BitReader; +#[doc = "Field `dten_clkpll_clk96m` writer - "] +pub type DTEN_CLKPLL_CLK96M_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DIG_SPEC, bool, O>; +#[doc = "Field `dten_clkpll_clk32m` reader - "] +pub type DTEN_CLKPLL_CLK32M_R = crate::BitReader; +#[doc = "Field `dten_clkpll_clk32m` writer - "] +pub type DTEN_CLKPLL_CLK32M_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DIG_SPEC, bool, O>; +#[doc = "Field `dten_clkpll_fsdm` reader - "] +pub type DTEN_CLKPLL_FSDM_R = crate::BitReader; +#[doc = "Field `dten_clkpll_fsdm` writer - "] +pub type DTEN_CLKPLL_FSDM_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DIG_SPEC, bool, O>; +#[doc = "Field `dten_clkpll_fref` reader - "] +pub type DTEN_CLKPLL_FREF_R = crate::BitReader; +#[doc = "Field `dten_clkpll_fref` writer - "] +pub type DTEN_CLKPLL_FREF_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DIG_SPEC, bool, O>; +#[doc = "Field `dten_clkpll_fin` reader - "] +pub type DTEN_CLKPLL_FIN_R = crate::BitReader; +#[doc = "Field `dten_clkpll_fin` writer - "] +pub type DTEN_CLKPLL_FIN_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DIG_SPEC, bool, O>; +#[doc = "Field `dten_lo_fsdm` reader - "] +pub type DTEN_LO_FSDM_R = crate::BitReader; +#[doc = "Field `dten_lo_fsdm` writer - "] +pub type DTEN_LO_FSDM_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DIG_SPEC, bool, O>; +#[doc = "Field `dten_lo_fref` reader - "] +pub type DTEN_LO_FREF_R = crate::BitReader; +#[doc = "Field `dten_lo_fref` writer - "] +pub type DTEN_LO_FREF_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DIG_SPEC, bool, O>; +#[doc = "Field `dtest_pull_down` reader - "] +pub type DTEST_PULL_DOWN_R = crate::BitReader; +#[doc = "Field `dtest_pull_down` writer - "] +pub type DTEST_PULL_DOWN_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DIG_SPEC, bool, O>; +#[doc = "Field `rf_dtest_en` reader - "] +pub type RF_DTEST_EN_R = crate::BitReader; +#[doc = "Field `rf_dtest_en` writer - "] +pub type RF_DTEST_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_DIG_SPEC, bool, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn dten_clkpll_postdiv_clk(&self) -> DTEN_CLKPLL_POSTDIV_CLK_R { + DTEN_CLKPLL_POSTDIV_CLK_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bit 23"] + #[doc = "Bit 1"] #[inline(always)] - pub fn rf_dtest_en(&self) -> RF_DTEST_EN_R { - RF_DTEST_EN_R::new(((self.bits >> 23) & 0x01) != 0) + pub fn dten_clkpll_clk96m(&self) -> DTEN_CLKPLL_CLK96M_R { + DTEN_CLKPLL_CLK96M_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 9"] + #[doc = "Bit 2"] #[inline(always)] - pub fn dtest_pull_down(&self) -> DTEST_PULL_DOWN_R { - DTEST_PULL_DOWN_R::new(((self.bits >> 9) & 0x01) != 0) + pub fn dten_clkpll_clk32m(&self) -> DTEN_CLKPLL_CLK32M_R { + DTEN_CLKPLL_CLK32M_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 8"] + #[doc = "Bit 3"] #[inline(always)] - pub fn dten_lo_fref(&self) -> DTEN_LO_FREF_R { - DTEN_LO_FREF_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn dten_clkpll_fsdm(&self) -> DTEN_CLKPLL_FSDM_R { + DTEN_CLKPLL_FSDM_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bit 6"] + #[doc = "Bit 4"] #[inline(always)] - pub fn dten_lo_fsdm(&self) -> DTEN_LO_FSDM_R { - DTEN_LO_FSDM_R::new(((self.bits >> 6) & 0x01) != 0) + pub fn dten_clkpll_fref(&self) -> DTEN_CLKPLL_FREF_R { + DTEN_CLKPLL_FREF_R::new(((self.bits >> 4) & 1) != 0) } #[doc = "Bit 5"] #[inline(always)] pub fn dten_clkpll_fin(&self) -> DTEN_CLKPLL_FIN_R { - DTEN_CLKPLL_FIN_R::new(((self.bits >> 5) & 0x01) != 0) - } - #[doc = "Bit 4"] - #[inline(always)] - pub fn dten_clkpll_fref(&self) -> DTEN_CLKPLL_FREF_R { - DTEN_CLKPLL_FREF_R::new(((self.bits >> 4) & 0x01) != 0) + DTEN_CLKPLL_FIN_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 3"] + #[doc = "Bit 6"] #[inline(always)] - pub fn dten_clkpll_fsdm(&self) -> DTEN_CLKPLL_FSDM_R { - DTEN_CLKPLL_FSDM_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn dten_lo_fsdm(&self) -> DTEN_LO_FSDM_R { + DTEN_LO_FSDM_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bit 8"] #[inline(always)] - pub fn dten_clkpll_clk32m(&self) -> DTEN_CLKPLL_CLK32M_R { - DTEN_CLKPLL_CLK32M_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn dten_lo_fref(&self) -> DTEN_LO_FREF_R { + DTEN_LO_FREF_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 9"] #[inline(always)] - pub fn dten_clkpll_clk96m(&self) -> DTEN_CLKPLL_CLK96M_R { - DTEN_CLKPLL_CLK96M_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn dtest_pull_down(&self) -> DTEST_PULL_DOWN_R { + DTEST_PULL_DOWN_R::new(((self.bits >> 9) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 23"] #[inline(always)] - pub fn dten_clkpll_postdiv_clk(&self) -> DTEN_CLKPLL_POSTDIV_CLK_R { - DTEN_CLKPLL_POSTDIV_CLK_R::new((self.bits & 0x01) != 0) + pub fn rf_dtest_en(&self) -> RF_DTEST_EN_R { + RF_DTEST_EN_R::new(((self.bits >> 23) & 1) != 0) } } impl W { - #[doc = "Bit 23"] + #[doc = "Bit 0"] #[inline(always)] - pub fn rf_dtest_en(&mut self) -> RF_DTEST_EN_W { - RF_DTEST_EN_W { w: self } + #[must_use] + pub fn dten_clkpll_postdiv_clk(&mut self) -> DTEN_CLKPLL_POSTDIV_CLK_W<0> { + DTEN_CLKPLL_POSTDIV_CLK_W::new(self) } - #[doc = "Bit 9"] + #[doc = "Bit 1"] #[inline(always)] - pub fn dtest_pull_down(&mut self) -> DTEST_PULL_DOWN_W { - DTEST_PULL_DOWN_W { w: self } + #[must_use] + pub fn dten_clkpll_clk96m(&mut self) -> DTEN_CLKPLL_CLK96M_W<1> { + DTEN_CLKPLL_CLK96M_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bit 2"] #[inline(always)] - pub fn dten_lo_fref(&mut self) -> DTEN_LO_FREF_W { - DTEN_LO_FREF_W { w: self } + #[must_use] + pub fn dten_clkpll_clk32m(&mut self) -> DTEN_CLKPLL_CLK32M_W<2> { + DTEN_CLKPLL_CLK32M_W::new(self) } - #[doc = "Bit 6"] + #[doc = "Bit 3"] #[inline(always)] - pub fn dten_lo_fsdm(&mut self) -> DTEN_LO_FSDM_W { - DTEN_LO_FSDM_W { w: self } + #[must_use] + pub fn dten_clkpll_fsdm(&mut self) -> DTEN_CLKPLL_FSDM_W<3> { + DTEN_CLKPLL_FSDM_W::new(self) } - #[doc = "Bit 5"] + #[doc = "Bit 4"] #[inline(always)] - pub fn dten_clkpll_fin(&mut self) -> DTEN_CLKPLL_FIN_W { - DTEN_CLKPLL_FIN_W { w: self } + #[must_use] + pub fn dten_clkpll_fref(&mut self) -> DTEN_CLKPLL_FREF_W<4> { + DTEN_CLKPLL_FREF_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 5"] #[inline(always)] - pub fn dten_clkpll_fref(&mut self) -> DTEN_CLKPLL_FREF_W { - DTEN_CLKPLL_FREF_W { w: self } + #[must_use] + pub fn dten_clkpll_fin(&mut self) -> DTEN_CLKPLL_FIN_W<5> { + DTEN_CLKPLL_FIN_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bit 6"] #[inline(always)] - pub fn dten_clkpll_fsdm(&mut self) -> DTEN_CLKPLL_FSDM_W { - DTEN_CLKPLL_FSDM_W { w: self } + #[must_use] + pub fn dten_lo_fsdm(&mut self) -> DTEN_LO_FSDM_W<6> { + DTEN_LO_FSDM_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bit 8"] #[inline(always)] - pub fn dten_clkpll_clk32m(&mut self) -> DTEN_CLKPLL_CLK32M_W { - DTEN_CLKPLL_CLK32M_W { w: self } + #[must_use] + pub fn dten_lo_fref(&mut self) -> DTEN_LO_FREF_W<8> { + DTEN_LO_FREF_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 9"] #[inline(always)] - pub fn dten_clkpll_clk96m(&mut self) -> DTEN_CLKPLL_CLK96M_W { - DTEN_CLKPLL_CLK96M_W { w: self } + #[must_use] + pub fn dtest_pull_down(&mut self) -> DTEST_PULL_DOWN_W<9> { + DTEST_PULL_DOWN_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 23"] #[inline(always)] - pub fn dten_clkpll_postdiv_clk(&mut self) -> DTEN_CLKPLL_POSTDIV_CLK_W { - DTEN_CLKPLL_POSTDIV_CLK_W { w: self } + #[must_use] + pub fn rf_dtest_en(&mut self) -> RF_DTEST_EN_W<23> { + RF_DTEST_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -513,11 +207,10 @@ impl crate::Readable for TEN_DIG_SPEC { #[doc = "`write(|w| ..)` method takes [ten_dig::W](W) writer structure"] impl crate::Writable for TEN_DIG_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets ten_dig to value 0"] impl crate::Resettable for TEN_DIG_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/tmx.rs b/src/rf/tmx.rs index 271414f..9c0d659 100644 --- a/src/rf/tmx.rs +++ b/src/rf/tmx.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,205 +28,92 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `tx_tsense_en` reader - "] -pub struct TX_TSENSE_EN_R(crate::FieldReader); -impl TX_TSENSE_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TX_TSENSE_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_TSENSE_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_tsense_en` writer - "] -pub struct TX_TSENSE_EN_W<'a> { - w: &'a mut W, -} -impl<'a> TX_TSENSE_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `tmx_bm_cas_bulk` reader - "] -pub struct TMX_BM_CAS_BULK_R(crate::FieldReader); -impl TMX_BM_CAS_BULK_R { - pub(crate) fn new(bits: u8) -> Self { - TMX_BM_CAS_BULK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TMX_BM_CAS_BULK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tmx_bm_cas_bulk` writer - "] -pub struct TMX_BM_CAS_BULK_W<'a> { - w: &'a mut W, -} -impl<'a> TMX_BM_CAS_BULK_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 12)) | ((value as u32 & 0x07) << 12); - self.w - } -} -#[doc = "Field `tmx_bm_cas` reader - "] -pub struct TMX_BM_CAS_R(crate::FieldReader); -impl TMX_BM_CAS_R { - pub(crate) fn new(bits: u8) -> Self { - TMX_BM_CAS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TMX_BM_CAS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tmx_bm_cas` writer - "] -pub struct TMX_BM_CAS_W<'a> { - w: &'a mut W, -} -impl<'a> TMX_BM_CAS_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 8)) | ((value as u32 & 0x07) << 8); - self.w - } -} -#[doc = "Field `tmx_bm_sw` reader - "] -pub struct TMX_BM_SW_R(crate::FieldReader); -impl TMX_BM_SW_R { - pub(crate) fn new(bits: u8) -> Self { - TMX_BM_SW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TMX_BM_SW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tmx_bm_sw` writer - "] -pub struct TMX_BM_SW_W<'a> { - w: &'a mut W, -} -impl<'a> TMX_BM_SW_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 4)) | ((value as u32 & 0x07) << 4); - self.w - } -} #[doc = "Field `tmx_cs` reader - "] -pub struct TMX_CS_R(crate::FieldReader); -impl TMX_CS_R { - pub(crate) fn new(bits: u8) -> Self { - TMX_CS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TMX_CS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TMX_CS_R = crate::FieldReader; #[doc = "Field `tmx_cs` writer - "] -pub struct TMX_CS_W<'a> { - w: &'a mut W, -} -impl<'a> TMX_CS_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x07) | (value as u32 & 0x07); - self.w - } -} +pub type TMX_CS_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TMX_SPEC, u8, u8, 3, O>; +#[doc = "Field `tmx_bm_sw` reader - "] +pub type TMX_BM_SW_R = crate::FieldReader; +#[doc = "Field `tmx_bm_sw` writer - "] +pub type TMX_BM_SW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TMX_SPEC, u8, u8, 3, O>; +#[doc = "Field `tmx_bm_cas` reader - "] +pub type TMX_BM_CAS_R = crate::FieldReader; +#[doc = "Field `tmx_bm_cas` writer - "] +pub type TMX_BM_CAS_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TMX_SPEC, u8, u8, 3, O>; +#[doc = "Field `tmx_bm_cas_bulk` reader - "] +pub type TMX_BM_CAS_BULK_R = crate::FieldReader; +#[doc = "Field `tmx_bm_cas_bulk` writer - "] +pub type TMX_BM_CAS_BULK_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TMX_SPEC, u8, u8, 3, O>; +#[doc = "Field `tx_tsense_en` reader - "] +pub type TX_TSENSE_EN_R = crate::BitReader; +#[doc = "Field `tx_tsense_en` writer - "] +pub type TX_TSENSE_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, TMX_SPEC, bool, O>; impl R { - #[doc = "Bit 16"] + #[doc = "Bits 0:2"] #[inline(always)] - pub fn tx_tsense_en(&self) -> TX_TSENSE_EN_R { - TX_TSENSE_EN_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn tmx_cs(&self) -> TMX_CS_R { + TMX_CS_R::new((self.bits & 7) as u8) } - #[doc = "Bits 12:14"] + #[doc = "Bits 4:6"] #[inline(always)] - pub fn tmx_bm_cas_bulk(&self) -> TMX_BM_CAS_BULK_R { - TMX_BM_CAS_BULK_R::new(((self.bits >> 12) & 0x07) as u8) + pub fn tmx_bm_sw(&self) -> TMX_BM_SW_R { + TMX_BM_SW_R::new(((self.bits >> 4) & 7) as u8) } #[doc = "Bits 8:10"] #[inline(always)] pub fn tmx_bm_cas(&self) -> TMX_BM_CAS_R { - TMX_BM_CAS_R::new(((self.bits >> 8) & 0x07) as u8) + TMX_BM_CAS_R::new(((self.bits >> 8) & 7) as u8) } - #[doc = "Bits 4:6"] + #[doc = "Bits 12:14"] #[inline(always)] - pub fn tmx_bm_sw(&self) -> TMX_BM_SW_R { - TMX_BM_SW_R::new(((self.bits >> 4) & 0x07) as u8) + pub fn tmx_bm_cas_bulk(&self) -> TMX_BM_CAS_BULK_R { + TMX_BM_CAS_BULK_R::new(((self.bits >> 12) & 7) as u8) } - #[doc = "Bits 0:2"] + #[doc = "Bit 16"] #[inline(always)] - pub fn tmx_cs(&self) -> TMX_CS_R { - TMX_CS_R::new((self.bits & 0x07) as u8) + pub fn tx_tsense_en(&self) -> TX_TSENSE_EN_R { + TX_TSENSE_EN_R::new(((self.bits >> 16) & 1) != 0) } } impl W { - #[doc = "Bit 16"] + #[doc = "Bits 0:2"] #[inline(always)] - pub fn tx_tsense_en(&mut self) -> TX_TSENSE_EN_W { - TX_TSENSE_EN_W { w: self } + #[must_use] + pub fn tmx_cs(&mut self) -> TMX_CS_W<0> { + TMX_CS_W::new(self) } - #[doc = "Bits 12:14"] + #[doc = "Bits 4:6"] #[inline(always)] - pub fn tmx_bm_cas_bulk(&mut self) -> TMX_BM_CAS_BULK_W { - TMX_BM_CAS_BULK_W { w: self } + #[must_use] + pub fn tmx_bm_sw(&mut self) -> TMX_BM_SW_W<4> { + TMX_BM_SW_W::new(self) } #[doc = "Bits 8:10"] #[inline(always)] - pub fn tmx_bm_cas(&mut self) -> TMX_BM_CAS_W { - TMX_BM_CAS_W { w: self } + #[must_use] + pub fn tmx_bm_cas(&mut self) -> TMX_BM_CAS_W<8> { + TMX_BM_CAS_W::new(self) } - #[doc = "Bits 4:6"] + #[doc = "Bits 12:14"] #[inline(always)] - pub fn tmx_bm_sw(&mut self) -> TMX_BM_SW_W { - TMX_BM_SW_W { w: self } + #[must_use] + pub fn tmx_bm_cas_bulk(&mut self) -> TMX_BM_CAS_BULK_W<12> { + TMX_BM_CAS_BULK_W::new(self) } - #[doc = "Bits 0:2"] + #[doc = "Bit 16"] #[inline(always)] - pub fn tmx_cs(&mut self) -> TMX_CS_W { - TMX_CS_W { w: self } + #[must_use] + pub fn tx_tsense_en(&mut self) -> TX_TSENSE_EN_W<16> { + TX_TSENSE_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -243,11 +131,10 @@ impl crate::Readable for TMX_SPEC { #[doc = "`write(|w| ..)` method takes [tmx::W](W) writer structure"] impl crate::Writable for TMX_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets tmx to value 0"] impl crate::Resettable for TMX_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/tosdac_ctrl_hw1.rs b/src/rf/tosdac_ctrl_hw1.rs index d873fac..33bf59a 100644 --- a/src/rf/tosdac_ctrl_hw1.rs +++ b/src/rf/tosdac_ctrl_hw1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,159 +28,81 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `tbb_tosdac_q_gc1` reader - "] -pub struct TBB_TOSDAC_Q_GC1_R(crate::FieldReader); -impl TBB_TOSDAC_Q_GC1_R { - pub(crate) fn new(bits: u8) -> Self { - TBB_TOSDAC_Q_GC1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TBB_TOSDAC_Q_GC1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tbb_tosdac_q_gc1` writer - "] -pub struct TBB_TOSDAC_Q_GC1_W<'a> { - w: &'a mut W, -} -impl<'a> TBB_TOSDAC_Q_GC1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 24)) | ((value as u32 & 0x3f) << 24); - self.w - } -} -#[doc = "Field `tbb_tosdac_i_gc1` reader - "] -pub struct TBB_TOSDAC_I_GC1_R(crate::FieldReader); -impl TBB_TOSDAC_I_GC1_R { - pub(crate) fn new(bits: u8) -> Self { - TBB_TOSDAC_I_GC1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TBB_TOSDAC_I_GC1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tbb_tosdac_i_gc1` writer - "] -pub struct TBB_TOSDAC_I_GC1_W<'a> { - w: &'a mut W, -} -impl<'a> TBB_TOSDAC_I_GC1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 16)) | ((value as u32 & 0x3f) << 16); - self.w - } -} -#[doc = "Field `tbb_tosdac_q_gc0` reader - "] -pub struct TBB_TOSDAC_Q_GC0_R(crate::FieldReader); -impl TBB_TOSDAC_Q_GC0_R { - pub(crate) fn new(bits: u8) -> Self { - TBB_TOSDAC_Q_GC0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TBB_TOSDAC_Q_GC0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tbb_tosdac_q_gc0` writer - "] -pub struct TBB_TOSDAC_Q_GC0_W<'a> { - w: &'a mut W, -} -impl<'a> TBB_TOSDAC_Q_GC0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 8)) | ((value as u32 & 0x3f) << 8); - self.w - } -} #[doc = "Field `tbb_tosdac_i_gc0` reader - "] -pub struct TBB_TOSDAC_I_GC0_R(crate::FieldReader); -impl TBB_TOSDAC_I_GC0_R { - pub(crate) fn new(bits: u8) -> Self { - TBB_TOSDAC_I_GC0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TBB_TOSDAC_I_GC0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TBB_TOSDAC_I_GC0_R = crate::FieldReader; #[doc = "Field `tbb_tosdac_i_gc0` writer - "] -pub struct TBB_TOSDAC_I_GC0_W<'a> { - w: &'a mut W, -} -impl<'a> TBB_TOSDAC_I_GC0_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type TBB_TOSDAC_I_GC0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TOSDAC_CTRL_HW1_SPEC, u8, u8, 6, O>; +#[doc = "Field `tbb_tosdac_q_gc0` reader - "] +pub type TBB_TOSDAC_Q_GC0_R = crate::FieldReader; +#[doc = "Field `tbb_tosdac_q_gc0` writer - "] +pub type TBB_TOSDAC_Q_GC0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TOSDAC_CTRL_HW1_SPEC, u8, u8, 6, O>; +#[doc = "Field `tbb_tosdac_i_gc1` reader - "] +pub type TBB_TOSDAC_I_GC1_R = crate::FieldReader; +#[doc = "Field `tbb_tosdac_i_gc1` writer - "] +pub type TBB_TOSDAC_I_GC1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TOSDAC_CTRL_HW1_SPEC, u8, u8, 6, O>; +#[doc = "Field `tbb_tosdac_q_gc1` reader - "] +pub type TBB_TOSDAC_Q_GC1_R = crate::FieldReader; +#[doc = "Field `tbb_tosdac_q_gc1` writer - "] +pub type TBB_TOSDAC_Q_GC1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TOSDAC_CTRL_HW1_SPEC, u8, u8, 6, O>; +impl R { + #[doc = "Bits 0:5"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x3f) | (value as u32 & 0x3f); - self.w + pub fn tbb_tosdac_i_gc0(&self) -> TBB_TOSDAC_I_GC0_R { + TBB_TOSDAC_I_GC0_R::new((self.bits & 0x3f) as u8) } -} -impl R { - #[doc = "Bits 24:29"] + #[doc = "Bits 8:13"] #[inline(always)] - pub fn tbb_tosdac_q_gc1(&self) -> TBB_TOSDAC_Q_GC1_R { - TBB_TOSDAC_Q_GC1_R::new(((self.bits >> 24) & 0x3f) as u8) + pub fn tbb_tosdac_q_gc0(&self) -> TBB_TOSDAC_Q_GC0_R { + TBB_TOSDAC_Q_GC0_R::new(((self.bits >> 8) & 0x3f) as u8) } #[doc = "Bits 16:21"] #[inline(always)] pub fn tbb_tosdac_i_gc1(&self) -> TBB_TOSDAC_I_GC1_R { TBB_TOSDAC_I_GC1_R::new(((self.bits >> 16) & 0x3f) as u8) } - #[doc = "Bits 8:13"] - #[inline(always)] - pub fn tbb_tosdac_q_gc0(&self) -> TBB_TOSDAC_Q_GC0_R { - TBB_TOSDAC_Q_GC0_R::new(((self.bits >> 8) & 0x3f) as u8) - } - #[doc = "Bits 0:5"] + #[doc = "Bits 24:29"] #[inline(always)] - pub fn tbb_tosdac_i_gc0(&self) -> TBB_TOSDAC_I_GC0_R { - TBB_TOSDAC_I_GC0_R::new((self.bits & 0x3f) as u8) + pub fn tbb_tosdac_q_gc1(&self) -> TBB_TOSDAC_Q_GC1_R { + TBB_TOSDAC_Q_GC1_R::new(((self.bits >> 24) & 0x3f) as u8) } } impl W { - #[doc = "Bits 24:29"] + #[doc = "Bits 0:5"] #[inline(always)] - pub fn tbb_tosdac_q_gc1(&mut self) -> TBB_TOSDAC_Q_GC1_W { - TBB_TOSDAC_Q_GC1_W { w: self } + #[must_use] + pub fn tbb_tosdac_i_gc0(&mut self) -> TBB_TOSDAC_I_GC0_W<0> { + TBB_TOSDAC_I_GC0_W::new(self) } - #[doc = "Bits 16:21"] + #[doc = "Bits 8:13"] #[inline(always)] - pub fn tbb_tosdac_i_gc1(&mut self) -> TBB_TOSDAC_I_GC1_W { - TBB_TOSDAC_I_GC1_W { w: self } + #[must_use] + pub fn tbb_tosdac_q_gc0(&mut self) -> TBB_TOSDAC_Q_GC0_W<8> { + TBB_TOSDAC_Q_GC0_W::new(self) } - #[doc = "Bits 8:13"] + #[doc = "Bits 16:21"] #[inline(always)] - pub fn tbb_tosdac_q_gc0(&mut self) -> TBB_TOSDAC_Q_GC0_W { - TBB_TOSDAC_Q_GC0_W { w: self } + #[must_use] + pub fn tbb_tosdac_i_gc1(&mut self) -> TBB_TOSDAC_I_GC1_W<16> { + TBB_TOSDAC_I_GC1_W::new(self) } - #[doc = "Bits 0:5"] + #[doc = "Bits 24:29"] #[inline(always)] - pub fn tbb_tosdac_i_gc0(&mut self) -> TBB_TOSDAC_I_GC0_W { - TBB_TOSDAC_I_GC0_W { w: self } + #[must_use] + pub fn tbb_tosdac_q_gc1(&mut self) -> TBB_TOSDAC_Q_GC1_W<24> { + TBB_TOSDAC_Q_GC1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -197,11 +120,10 @@ impl crate::Readable for TOSDAC_CTRL_HW1_SPEC { #[doc = "`write(|w| ..)` method takes [tosdac_ctrl_hw1::W](W) writer structure"] impl crate::Writable for TOSDAC_CTRL_HW1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets tosdac_ctrl_hw1 to value 0"] impl crate::Resettable for TOSDAC_CTRL_HW1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/tosdac_ctrl_hw2.rs b/src/rf/tosdac_ctrl_hw2.rs index de46dcf..7975487 100644 --- a/src/rf/tosdac_ctrl_hw2.rs +++ b/src/rf/tosdac_ctrl_hw2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,159 +28,81 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `tbb_tosdac_q_gc3` reader - "] -pub struct TBB_TOSDAC_Q_GC3_R(crate::FieldReader); -impl TBB_TOSDAC_Q_GC3_R { - pub(crate) fn new(bits: u8) -> Self { - TBB_TOSDAC_Q_GC3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TBB_TOSDAC_Q_GC3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tbb_tosdac_q_gc3` writer - "] -pub struct TBB_TOSDAC_Q_GC3_W<'a> { - w: &'a mut W, -} -impl<'a> TBB_TOSDAC_Q_GC3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 24)) | ((value as u32 & 0x3f) << 24); - self.w - } -} -#[doc = "Field `tbb_tosdac_i_gc3` reader - "] -pub struct TBB_TOSDAC_I_GC3_R(crate::FieldReader); -impl TBB_TOSDAC_I_GC3_R { - pub(crate) fn new(bits: u8) -> Self { - TBB_TOSDAC_I_GC3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TBB_TOSDAC_I_GC3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tbb_tosdac_i_gc3` writer - "] -pub struct TBB_TOSDAC_I_GC3_W<'a> { - w: &'a mut W, -} -impl<'a> TBB_TOSDAC_I_GC3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 16)) | ((value as u32 & 0x3f) << 16); - self.w - } -} -#[doc = "Field `tbb_tosdac_q_gc2` reader - "] -pub struct TBB_TOSDAC_Q_GC2_R(crate::FieldReader); -impl TBB_TOSDAC_Q_GC2_R { - pub(crate) fn new(bits: u8) -> Self { - TBB_TOSDAC_Q_GC2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TBB_TOSDAC_Q_GC2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tbb_tosdac_q_gc2` writer - "] -pub struct TBB_TOSDAC_Q_GC2_W<'a> { - w: &'a mut W, -} -impl<'a> TBB_TOSDAC_Q_GC2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 8)) | ((value as u32 & 0x3f) << 8); - self.w - } -} #[doc = "Field `tbb_tosdac_i_gc2` reader - "] -pub struct TBB_TOSDAC_I_GC2_R(crate::FieldReader); -impl TBB_TOSDAC_I_GC2_R { - pub(crate) fn new(bits: u8) -> Self { - TBB_TOSDAC_I_GC2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TBB_TOSDAC_I_GC2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TBB_TOSDAC_I_GC2_R = crate::FieldReader; #[doc = "Field `tbb_tosdac_i_gc2` writer - "] -pub struct TBB_TOSDAC_I_GC2_W<'a> { - w: &'a mut W, -} -impl<'a> TBB_TOSDAC_I_GC2_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type TBB_TOSDAC_I_GC2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TOSDAC_CTRL_HW2_SPEC, u8, u8, 6, O>; +#[doc = "Field `tbb_tosdac_q_gc2` reader - "] +pub type TBB_TOSDAC_Q_GC2_R = crate::FieldReader; +#[doc = "Field `tbb_tosdac_q_gc2` writer - "] +pub type TBB_TOSDAC_Q_GC2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TOSDAC_CTRL_HW2_SPEC, u8, u8, 6, O>; +#[doc = "Field `tbb_tosdac_i_gc3` reader - "] +pub type TBB_TOSDAC_I_GC3_R = crate::FieldReader; +#[doc = "Field `tbb_tosdac_i_gc3` writer - "] +pub type TBB_TOSDAC_I_GC3_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TOSDAC_CTRL_HW2_SPEC, u8, u8, 6, O>; +#[doc = "Field `tbb_tosdac_q_gc3` reader - "] +pub type TBB_TOSDAC_Q_GC3_R = crate::FieldReader; +#[doc = "Field `tbb_tosdac_q_gc3` writer - "] +pub type TBB_TOSDAC_Q_GC3_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TOSDAC_CTRL_HW2_SPEC, u8, u8, 6, O>; +impl R { + #[doc = "Bits 0:5"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x3f) | (value as u32 & 0x3f); - self.w + pub fn tbb_tosdac_i_gc2(&self) -> TBB_TOSDAC_I_GC2_R { + TBB_TOSDAC_I_GC2_R::new((self.bits & 0x3f) as u8) } -} -impl R { - #[doc = "Bits 24:29"] + #[doc = "Bits 8:13"] #[inline(always)] - pub fn tbb_tosdac_q_gc3(&self) -> TBB_TOSDAC_Q_GC3_R { - TBB_TOSDAC_Q_GC3_R::new(((self.bits >> 24) & 0x3f) as u8) + pub fn tbb_tosdac_q_gc2(&self) -> TBB_TOSDAC_Q_GC2_R { + TBB_TOSDAC_Q_GC2_R::new(((self.bits >> 8) & 0x3f) as u8) } #[doc = "Bits 16:21"] #[inline(always)] pub fn tbb_tosdac_i_gc3(&self) -> TBB_TOSDAC_I_GC3_R { TBB_TOSDAC_I_GC3_R::new(((self.bits >> 16) & 0x3f) as u8) } - #[doc = "Bits 8:13"] - #[inline(always)] - pub fn tbb_tosdac_q_gc2(&self) -> TBB_TOSDAC_Q_GC2_R { - TBB_TOSDAC_Q_GC2_R::new(((self.bits >> 8) & 0x3f) as u8) - } - #[doc = "Bits 0:5"] + #[doc = "Bits 24:29"] #[inline(always)] - pub fn tbb_tosdac_i_gc2(&self) -> TBB_TOSDAC_I_GC2_R { - TBB_TOSDAC_I_GC2_R::new((self.bits & 0x3f) as u8) + pub fn tbb_tosdac_q_gc3(&self) -> TBB_TOSDAC_Q_GC3_R { + TBB_TOSDAC_Q_GC3_R::new(((self.bits >> 24) & 0x3f) as u8) } } impl W { - #[doc = "Bits 24:29"] + #[doc = "Bits 0:5"] #[inline(always)] - pub fn tbb_tosdac_q_gc3(&mut self) -> TBB_TOSDAC_Q_GC3_W { - TBB_TOSDAC_Q_GC3_W { w: self } + #[must_use] + pub fn tbb_tosdac_i_gc2(&mut self) -> TBB_TOSDAC_I_GC2_W<0> { + TBB_TOSDAC_I_GC2_W::new(self) } - #[doc = "Bits 16:21"] + #[doc = "Bits 8:13"] #[inline(always)] - pub fn tbb_tosdac_i_gc3(&mut self) -> TBB_TOSDAC_I_GC3_W { - TBB_TOSDAC_I_GC3_W { w: self } + #[must_use] + pub fn tbb_tosdac_q_gc2(&mut self) -> TBB_TOSDAC_Q_GC2_W<8> { + TBB_TOSDAC_Q_GC2_W::new(self) } - #[doc = "Bits 8:13"] + #[doc = "Bits 16:21"] #[inline(always)] - pub fn tbb_tosdac_q_gc2(&mut self) -> TBB_TOSDAC_Q_GC2_W { - TBB_TOSDAC_Q_GC2_W { w: self } + #[must_use] + pub fn tbb_tosdac_i_gc3(&mut self) -> TBB_TOSDAC_I_GC3_W<16> { + TBB_TOSDAC_I_GC3_W::new(self) } - #[doc = "Bits 0:5"] + #[doc = "Bits 24:29"] #[inline(always)] - pub fn tbb_tosdac_i_gc2(&mut self) -> TBB_TOSDAC_I_GC2_W { - TBB_TOSDAC_I_GC2_W { w: self } + #[must_use] + pub fn tbb_tosdac_q_gc3(&mut self) -> TBB_TOSDAC_Q_GC3_W<24> { + TBB_TOSDAC_Q_GC3_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -197,11 +120,10 @@ impl crate::Readable for TOSDAC_CTRL_HW2_SPEC { #[doc = "`write(|w| ..)` method takes [tosdac_ctrl_hw2::W](W) writer structure"] impl crate::Writable for TOSDAC_CTRL_HW2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets tosdac_ctrl_hw2 to value 0"] impl crate::Resettable for TOSDAC_CTRL_HW2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/tosdac_ctrl_hw3.rs b/src/rf/tosdac_ctrl_hw3.rs index 2b8dc9e..3adebca 100644 --- a/src/rf/tosdac_ctrl_hw3.rs +++ b/src/rf/tosdac_ctrl_hw3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,159 +28,81 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `tbb_tosdac_q_gc5` reader - "] -pub struct TBB_TOSDAC_Q_GC5_R(crate::FieldReader); -impl TBB_TOSDAC_Q_GC5_R { - pub(crate) fn new(bits: u8) -> Self { - TBB_TOSDAC_Q_GC5_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TBB_TOSDAC_Q_GC5_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tbb_tosdac_q_gc5` writer - "] -pub struct TBB_TOSDAC_Q_GC5_W<'a> { - w: &'a mut W, -} -impl<'a> TBB_TOSDAC_Q_GC5_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 24)) | ((value as u32 & 0x3f) << 24); - self.w - } -} -#[doc = "Field `tbb_tosdac_i_gc5` reader - "] -pub struct TBB_TOSDAC_I_GC5_R(crate::FieldReader); -impl TBB_TOSDAC_I_GC5_R { - pub(crate) fn new(bits: u8) -> Self { - TBB_TOSDAC_I_GC5_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TBB_TOSDAC_I_GC5_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tbb_tosdac_i_gc5` writer - "] -pub struct TBB_TOSDAC_I_GC5_W<'a> { - w: &'a mut W, -} -impl<'a> TBB_TOSDAC_I_GC5_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 16)) | ((value as u32 & 0x3f) << 16); - self.w - } -} -#[doc = "Field `tbb_tosdac_q_gc4` reader - "] -pub struct TBB_TOSDAC_Q_GC4_R(crate::FieldReader); -impl TBB_TOSDAC_Q_GC4_R { - pub(crate) fn new(bits: u8) -> Self { - TBB_TOSDAC_Q_GC4_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TBB_TOSDAC_Q_GC4_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tbb_tosdac_q_gc4` writer - "] -pub struct TBB_TOSDAC_Q_GC4_W<'a> { - w: &'a mut W, -} -impl<'a> TBB_TOSDAC_Q_GC4_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 8)) | ((value as u32 & 0x3f) << 8); - self.w - } -} #[doc = "Field `tbb_tosdac_i_gc4` reader - "] -pub struct TBB_TOSDAC_I_GC4_R(crate::FieldReader); -impl TBB_TOSDAC_I_GC4_R { - pub(crate) fn new(bits: u8) -> Self { - TBB_TOSDAC_I_GC4_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TBB_TOSDAC_I_GC4_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TBB_TOSDAC_I_GC4_R = crate::FieldReader; #[doc = "Field `tbb_tosdac_i_gc4` writer - "] -pub struct TBB_TOSDAC_I_GC4_W<'a> { - w: &'a mut W, -} -impl<'a> TBB_TOSDAC_I_GC4_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type TBB_TOSDAC_I_GC4_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TOSDAC_CTRL_HW3_SPEC, u8, u8, 6, O>; +#[doc = "Field `tbb_tosdac_q_gc4` reader - "] +pub type TBB_TOSDAC_Q_GC4_R = crate::FieldReader; +#[doc = "Field `tbb_tosdac_q_gc4` writer - "] +pub type TBB_TOSDAC_Q_GC4_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TOSDAC_CTRL_HW3_SPEC, u8, u8, 6, O>; +#[doc = "Field `tbb_tosdac_i_gc5` reader - "] +pub type TBB_TOSDAC_I_GC5_R = crate::FieldReader; +#[doc = "Field `tbb_tosdac_i_gc5` writer - "] +pub type TBB_TOSDAC_I_GC5_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TOSDAC_CTRL_HW3_SPEC, u8, u8, 6, O>; +#[doc = "Field `tbb_tosdac_q_gc5` reader - "] +pub type TBB_TOSDAC_Q_GC5_R = crate::FieldReader; +#[doc = "Field `tbb_tosdac_q_gc5` writer - "] +pub type TBB_TOSDAC_Q_GC5_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TOSDAC_CTRL_HW3_SPEC, u8, u8, 6, O>; +impl R { + #[doc = "Bits 0:5"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x3f) | (value as u32 & 0x3f); - self.w + pub fn tbb_tosdac_i_gc4(&self) -> TBB_TOSDAC_I_GC4_R { + TBB_TOSDAC_I_GC4_R::new((self.bits & 0x3f) as u8) } -} -impl R { - #[doc = "Bits 24:29"] + #[doc = "Bits 8:13"] #[inline(always)] - pub fn tbb_tosdac_q_gc5(&self) -> TBB_TOSDAC_Q_GC5_R { - TBB_TOSDAC_Q_GC5_R::new(((self.bits >> 24) & 0x3f) as u8) + pub fn tbb_tosdac_q_gc4(&self) -> TBB_TOSDAC_Q_GC4_R { + TBB_TOSDAC_Q_GC4_R::new(((self.bits >> 8) & 0x3f) as u8) } #[doc = "Bits 16:21"] #[inline(always)] pub fn tbb_tosdac_i_gc5(&self) -> TBB_TOSDAC_I_GC5_R { TBB_TOSDAC_I_GC5_R::new(((self.bits >> 16) & 0x3f) as u8) } - #[doc = "Bits 8:13"] - #[inline(always)] - pub fn tbb_tosdac_q_gc4(&self) -> TBB_TOSDAC_Q_GC4_R { - TBB_TOSDAC_Q_GC4_R::new(((self.bits >> 8) & 0x3f) as u8) - } - #[doc = "Bits 0:5"] + #[doc = "Bits 24:29"] #[inline(always)] - pub fn tbb_tosdac_i_gc4(&self) -> TBB_TOSDAC_I_GC4_R { - TBB_TOSDAC_I_GC4_R::new((self.bits & 0x3f) as u8) + pub fn tbb_tosdac_q_gc5(&self) -> TBB_TOSDAC_Q_GC5_R { + TBB_TOSDAC_Q_GC5_R::new(((self.bits >> 24) & 0x3f) as u8) } } impl W { - #[doc = "Bits 24:29"] + #[doc = "Bits 0:5"] #[inline(always)] - pub fn tbb_tosdac_q_gc5(&mut self) -> TBB_TOSDAC_Q_GC5_W { - TBB_TOSDAC_Q_GC5_W { w: self } + #[must_use] + pub fn tbb_tosdac_i_gc4(&mut self) -> TBB_TOSDAC_I_GC4_W<0> { + TBB_TOSDAC_I_GC4_W::new(self) } - #[doc = "Bits 16:21"] + #[doc = "Bits 8:13"] #[inline(always)] - pub fn tbb_tosdac_i_gc5(&mut self) -> TBB_TOSDAC_I_GC5_W { - TBB_TOSDAC_I_GC5_W { w: self } + #[must_use] + pub fn tbb_tosdac_q_gc4(&mut self) -> TBB_TOSDAC_Q_GC4_W<8> { + TBB_TOSDAC_Q_GC4_W::new(self) } - #[doc = "Bits 8:13"] + #[doc = "Bits 16:21"] #[inline(always)] - pub fn tbb_tosdac_q_gc4(&mut self) -> TBB_TOSDAC_Q_GC4_W { - TBB_TOSDAC_Q_GC4_W { w: self } + #[must_use] + pub fn tbb_tosdac_i_gc5(&mut self) -> TBB_TOSDAC_I_GC5_W<16> { + TBB_TOSDAC_I_GC5_W::new(self) } - #[doc = "Bits 0:5"] + #[doc = "Bits 24:29"] #[inline(always)] - pub fn tbb_tosdac_i_gc4(&mut self) -> TBB_TOSDAC_I_GC4_W { - TBB_TOSDAC_I_GC4_W { w: self } + #[must_use] + pub fn tbb_tosdac_q_gc5(&mut self) -> TBB_TOSDAC_Q_GC5_W<24> { + TBB_TOSDAC_Q_GC5_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -197,11 +120,10 @@ impl crate::Readable for TOSDAC_CTRL_HW3_SPEC { #[doc = "`write(|w| ..)` method takes [tosdac_ctrl_hw3::W](W) writer structure"] impl crate::Writable for TOSDAC_CTRL_HW3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets tosdac_ctrl_hw3 to value 0"] impl crate::Resettable for TOSDAC_CTRL_HW3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/tosdac_ctrl_hw4.rs b/src/rf/tosdac_ctrl_hw4.rs index 77f65bb..2b67d57 100644 --- a/src/rf/tosdac_ctrl_hw4.rs +++ b/src/rf/tosdac_ctrl_hw4.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,159 +28,81 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `tbb_tosdac_q_gc7` reader - "] -pub struct TBB_TOSDAC_Q_GC7_R(crate::FieldReader); -impl TBB_TOSDAC_Q_GC7_R { - pub(crate) fn new(bits: u8) -> Self { - TBB_TOSDAC_Q_GC7_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TBB_TOSDAC_Q_GC7_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tbb_tosdac_q_gc7` writer - "] -pub struct TBB_TOSDAC_Q_GC7_W<'a> { - w: &'a mut W, -} -impl<'a> TBB_TOSDAC_Q_GC7_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 24)) | ((value as u32 & 0x3f) << 24); - self.w - } -} -#[doc = "Field `tbb_tosdac_i_gc7` reader - "] -pub struct TBB_TOSDAC_I_GC7_R(crate::FieldReader); -impl TBB_TOSDAC_I_GC7_R { - pub(crate) fn new(bits: u8) -> Self { - TBB_TOSDAC_I_GC7_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TBB_TOSDAC_I_GC7_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tbb_tosdac_i_gc7` writer - "] -pub struct TBB_TOSDAC_I_GC7_W<'a> { - w: &'a mut W, -} -impl<'a> TBB_TOSDAC_I_GC7_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 16)) | ((value as u32 & 0x3f) << 16); - self.w - } -} -#[doc = "Field `tbb_tosdac_q_gc6` reader - "] -pub struct TBB_TOSDAC_Q_GC6_R(crate::FieldReader); -impl TBB_TOSDAC_Q_GC6_R { - pub(crate) fn new(bits: u8) -> Self { - TBB_TOSDAC_Q_GC6_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TBB_TOSDAC_Q_GC6_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tbb_tosdac_q_gc6` writer - "] -pub struct TBB_TOSDAC_Q_GC6_W<'a> { - w: &'a mut W, -} -impl<'a> TBB_TOSDAC_Q_GC6_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3f << 8)) | ((value as u32 & 0x3f) << 8); - self.w - } -} #[doc = "Field `tbb_tosdac_i_gc6` reader - "] -pub struct TBB_TOSDAC_I_GC6_R(crate::FieldReader); -impl TBB_TOSDAC_I_GC6_R { - pub(crate) fn new(bits: u8) -> Self { - TBB_TOSDAC_I_GC6_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TBB_TOSDAC_I_GC6_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TBB_TOSDAC_I_GC6_R = crate::FieldReader; #[doc = "Field `tbb_tosdac_i_gc6` writer - "] -pub struct TBB_TOSDAC_I_GC6_W<'a> { - w: &'a mut W, -} -impl<'a> TBB_TOSDAC_I_GC6_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type TBB_TOSDAC_I_GC6_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TOSDAC_CTRL_HW4_SPEC, u8, u8, 6, O>; +#[doc = "Field `tbb_tosdac_q_gc6` reader - "] +pub type TBB_TOSDAC_Q_GC6_R = crate::FieldReader; +#[doc = "Field `tbb_tosdac_q_gc6` writer - "] +pub type TBB_TOSDAC_Q_GC6_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TOSDAC_CTRL_HW4_SPEC, u8, u8, 6, O>; +#[doc = "Field `tbb_tosdac_i_gc7` reader - "] +pub type TBB_TOSDAC_I_GC7_R = crate::FieldReader; +#[doc = "Field `tbb_tosdac_i_gc7` writer - "] +pub type TBB_TOSDAC_I_GC7_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TOSDAC_CTRL_HW4_SPEC, u8, u8, 6, O>; +#[doc = "Field `tbb_tosdac_q_gc7` reader - "] +pub type TBB_TOSDAC_Q_GC7_R = crate::FieldReader; +#[doc = "Field `tbb_tosdac_q_gc7` writer - "] +pub type TBB_TOSDAC_Q_GC7_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TOSDAC_CTRL_HW4_SPEC, u8, u8, 6, O>; +impl R { + #[doc = "Bits 0:5"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x3f) | (value as u32 & 0x3f); - self.w + pub fn tbb_tosdac_i_gc6(&self) -> TBB_TOSDAC_I_GC6_R { + TBB_TOSDAC_I_GC6_R::new((self.bits & 0x3f) as u8) } -} -impl R { - #[doc = "Bits 24:29"] + #[doc = "Bits 8:13"] #[inline(always)] - pub fn tbb_tosdac_q_gc7(&self) -> TBB_TOSDAC_Q_GC7_R { - TBB_TOSDAC_Q_GC7_R::new(((self.bits >> 24) & 0x3f) as u8) + pub fn tbb_tosdac_q_gc6(&self) -> TBB_TOSDAC_Q_GC6_R { + TBB_TOSDAC_Q_GC6_R::new(((self.bits >> 8) & 0x3f) as u8) } #[doc = "Bits 16:21"] #[inline(always)] pub fn tbb_tosdac_i_gc7(&self) -> TBB_TOSDAC_I_GC7_R { TBB_TOSDAC_I_GC7_R::new(((self.bits >> 16) & 0x3f) as u8) } - #[doc = "Bits 8:13"] - #[inline(always)] - pub fn tbb_tosdac_q_gc6(&self) -> TBB_TOSDAC_Q_GC6_R { - TBB_TOSDAC_Q_GC6_R::new(((self.bits >> 8) & 0x3f) as u8) - } - #[doc = "Bits 0:5"] + #[doc = "Bits 24:29"] #[inline(always)] - pub fn tbb_tosdac_i_gc6(&self) -> TBB_TOSDAC_I_GC6_R { - TBB_TOSDAC_I_GC6_R::new((self.bits & 0x3f) as u8) + pub fn tbb_tosdac_q_gc7(&self) -> TBB_TOSDAC_Q_GC7_R { + TBB_TOSDAC_Q_GC7_R::new(((self.bits >> 24) & 0x3f) as u8) } } impl W { - #[doc = "Bits 24:29"] + #[doc = "Bits 0:5"] #[inline(always)] - pub fn tbb_tosdac_q_gc7(&mut self) -> TBB_TOSDAC_Q_GC7_W { - TBB_TOSDAC_Q_GC7_W { w: self } + #[must_use] + pub fn tbb_tosdac_i_gc6(&mut self) -> TBB_TOSDAC_I_GC6_W<0> { + TBB_TOSDAC_I_GC6_W::new(self) } - #[doc = "Bits 16:21"] + #[doc = "Bits 8:13"] #[inline(always)] - pub fn tbb_tosdac_i_gc7(&mut self) -> TBB_TOSDAC_I_GC7_W { - TBB_TOSDAC_I_GC7_W { w: self } + #[must_use] + pub fn tbb_tosdac_q_gc6(&mut self) -> TBB_TOSDAC_Q_GC6_W<8> { + TBB_TOSDAC_Q_GC6_W::new(self) } - #[doc = "Bits 8:13"] + #[doc = "Bits 16:21"] #[inline(always)] - pub fn tbb_tosdac_q_gc6(&mut self) -> TBB_TOSDAC_Q_GC6_W { - TBB_TOSDAC_Q_GC6_W { w: self } + #[must_use] + pub fn tbb_tosdac_i_gc7(&mut self) -> TBB_TOSDAC_I_GC7_W<16> { + TBB_TOSDAC_I_GC7_W::new(self) } - #[doc = "Bits 0:5"] + #[doc = "Bits 24:29"] #[inline(always)] - pub fn tbb_tosdac_i_gc6(&mut self) -> TBB_TOSDAC_I_GC6_W { - TBB_TOSDAC_I_GC6_W { w: self } + #[must_use] + pub fn tbb_tosdac_q_gc7(&mut self) -> TBB_TOSDAC_Q_GC7_W<24> { + TBB_TOSDAC_Q_GC7_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -197,11 +120,10 @@ impl crate::Readable for TOSDAC_CTRL_HW4_SPEC { #[doc = "`write(|w| ..)` method takes [tosdac_ctrl_hw4::W](W) writer structure"] impl crate::Writable for TOSDAC_CTRL_HW4_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets tosdac_ctrl_hw4 to value 0"] impl crate::Resettable for TOSDAC_CTRL_HW4_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/trx_gain1.rs b/src/rf/trx_gain1.rs index 9d1a2fd..db597ff 100644 --- a/src/rf/trx_gain1.rs +++ b/src/rf/trx_gain1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,267 +28,123 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `gc_tbb_boost` reader - "] -pub struct GC_TBB_BOOST_R(crate::FieldReader); -impl GC_TBB_BOOST_R { - pub(crate) fn new(bits: u8) -> Self { - GC_TBB_BOOST_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GC_TBB_BOOST_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gc_tbb_boost` writer - "] -pub struct GC_TBB_BOOST_W<'a> { - w: &'a mut W, -} -impl<'a> GC_TBB_BOOST_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 28)) | ((value as u32 & 0x03) << 28); - self.w - } -} -#[doc = "Field `gc_tbb` reader - "] -pub struct GC_TBB_R(crate::FieldReader); -impl GC_TBB_R { - pub(crate) fn new(bits: u8) -> Self { - GC_TBB_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GC_TBB_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gc_tbb` writer - "] -pub struct GC_TBB_W<'a> { - w: &'a mut W, -} -impl<'a> GC_TBB_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 20)) | ((value as u32 & 0x1f) << 20); - self.w - } -} -#[doc = "Field `gc_tmx` reader - "] -pub struct GC_TMX_R(crate::FieldReader); -impl GC_TMX_R { - pub(crate) fn new(bits: u8) -> Self { - GC_TMX_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GC_TMX_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gc_tmx` writer - "] -pub struct GC_TMX_W<'a> { - w: &'a mut W, -} -impl<'a> GC_TMX_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 16)) | ((value as u32 & 0x07) << 16); - self.w - } -} -#[doc = "Field `gc_rbb2` reader - "] -pub struct GC_RBB2_R(crate::FieldReader); -impl GC_RBB2_R { - pub(crate) fn new(bits: u8) -> Self { - GC_RBB2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GC_RBB2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gc_rbb2` writer - "] -pub struct GC_RBB2_W<'a> { - w: &'a mut W, -} -impl<'a> GC_RBB2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 12)) | ((value as u32 & 0x07) << 12); - self.w - } -} -#[doc = "Field `gc_rbb1` reader - "] -pub struct GC_RBB1_R(crate::FieldReader); -impl GC_RBB1_R { - pub(crate) fn new(bits: u8) -> Self { - GC_RBB1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GC_RBB1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gc_rbb1` writer - "] -pub struct GC_RBB1_W<'a> { - w: &'a mut W, -} -impl<'a> GC_RBB1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} -#[doc = "Field `gc_rmxgm` reader - "] -pub struct GC_RMXGM_R(crate::FieldReader); -impl GC_RMXGM_R { - pub(crate) fn new(bits: u8) -> Self { - GC_RMXGM_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GC_RMXGM_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gc_rmxgm` writer - "] -pub struct GC_RMXGM_W<'a> { - w: &'a mut W, -} -impl<'a> GC_RMXGM_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 4)) | ((value as u32 & 0x03) << 4); - self.w - } -} #[doc = "Field `gc_lna` reader - "] -pub struct GC_LNA_R(crate::FieldReader); -impl GC_LNA_R { - pub(crate) fn new(bits: u8) -> Self { - GC_LNA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GC_LNA_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type GC_LNA_R = crate::FieldReader; #[doc = "Field `gc_lna` writer - "] -pub struct GC_LNA_W<'a> { - w: &'a mut W, -} -impl<'a> GC_LNA_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x07) | (value as u32 & 0x07); - self.w - } -} +pub type GC_LNA_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TRX_GAIN1_SPEC, u8, u8, 3, O>; +#[doc = "Field `gc_rmxgm` reader - "] +pub type GC_RMXGM_R = crate::FieldReader; +#[doc = "Field `gc_rmxgm` writer - "] +pub type GC_RMXGM_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TRX_GAIN1_SPEC, u8, u8, 2, O>; +#[doc = "Field `gc_rbb1` reader - "] +pub type GC_RBB1_R = crate::FieldReader; +#[doc = "Field `gc_rbb1` writer - "] +pub type GC_RBB1_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TRX_GAIN1_SPEC, u8, u8, 2, O>; +#[doc = "Field `gc_rbb2` reader - "] +pub type GC_RBB2_R = crate::FieldReader; +#[doc = "Field `gc_rbb2` writer - "] +pub type GC_RBB2_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TRX_GAIN1_SPEC, u8, u8, 3, O>; +#[doc = "Field `gc_tmx` reader - "] +pub type GC_TMX_R = crate::FieldReader; +#[doc = "Field `gc_tmx` writer - "] +pub type GC_TMX_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TRX_GAIN1_SPEC, u8, u8, 3, O>; +#[doc = "Field `gc_tbb` reader - "] +pub type GC_TBB_R = crate::FieldReader; +#[doc = "Field `gc_tbb` writer - "] +pub type GC_TBB_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TRX_GAIN1_SPEC, u8, u8, 5, O>; +#[doc = "Field `gc_tbb_boost` reader - "] +pub type GC_TBB_BOOST_R = crate::FieldReader; +#[doc = "Field `gc_tbb_boost` writer - "] +pub type GC_TBB_BOOST_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TRX_GAIN1_SPEC, u8, u8, 2, O>; impl R { - #[doc = "Bits 28:29"] + #[doc = "Bits 0:2"] #[inline(always)] - pub fn gc_tbb_boost(&self) -> GC_TBB_BOOST_R { - GC_TBB_BOOST_R::new(((self.bits >> 28) & 0x03) as u8) + pub fn gc_lna(&self) -> GC_LNA_R { + GC_LNA_R::new((self.bits & 7) as u8) } - #[doc = "Bits 20:24"] + #[doc = "Bits 4:5"] #[inline(always)] - pub fn gc_tbb(&self) -> GC_TBB_R { - GC_TBB_R::new(((self.bits >> 20) & 0x1f) as u8) + pub fn gc_rmxgm(&self) -> GC_RMXGM_R { + GC_RMXGM_R::new(((self.bits >> 4) & 3) as u8) } - #[doc = "Bits 16:18"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn gc_tmx(&self) -> GC_TMX_R { - GC_TMX_R::new(((self.bits >> 16) & 0x07) as u8) + pub fn gc_rbb1(&self) -> GC_RBB1_R { + GC_RBB1_R::new(((self.bits >> 8) & 3) as u8) } #[doc = "Bits 12:14"] #[inline(always)] pub fn gc_rbb2(&self) -> GC_RBB2_R { - GC_RBB2_R::new(((self.bits >> 12) & 0x07) as u8) + GC_RBB2_R::new(((self.bits >> 12) & 7) as u8) } - #[doc = "Bits 8:9"] + #[doc = "Bits 16:18"] #[inline(always)] - pub fn gc_rbb1(&self) -> GC_RBB1_R { - GC_RBB1_R::new(((self.bits >> 8) & 0x03) as u8) + pub fn gc_tmx(&self) -> GC_TMX_R { + GC_TMX_R::new(((self.bits >> 16) & 7) as u8) } - #[doc = "Bits 4:5"] + #[doc = "Bits 20:24"] #[inline(always)] - pub fn gc_rmxgm(&self) -> GC_RMXGM_R { - GC_RMXGM_R::new(((self.bits >> 4) & 0x03) as u8) + pub fn gc_tbb(&self) -> GC_TBB_R { + GC_TBB_R::new(((self.bits >> 20) & 0x1f) as u8) } - #[doc = "Bits 0:2"] + #[doc = "Bits 28:29"] #[inline(always)] - pub fn gc_lna(&self) -> GC_LNA_R { - GC_LNA_R::new((self.bits & 0x07) as u8) + pub fn gc_tbb_boost(&self) -> GC_TBB_BOOST_R { + GC_TBB_BOOST_R::new(((self.bits >> 28) & 3) as u8) } } impl W { - #[doc = "Bits 28:29"] + #[doc = "Bits 0:2"] #[inline(always)] - pub fn gc_tbb_boost(&mut self) -> GC_TBB_BOOST_W { - GC_TBB_BOOST_W { w: self } + #[must_use] + pub fn gc_lna(&mut self) -> GC_LNA_W<0> { + GC_LNA_W::new(self) } - #[doc = "Bits 20:24"] + #[doc = "Bits 4:5"] #[inline(always)] - pub fn gc_tbb(&mut self) -> GC_TBB_W { - GC_TBB_W { w: self } + #[must_use] + pub fn gc_rmxgm(&mut self) -> GC_RMXGM_W<4> { + GC_RMXGM_W::new(self) } - #[doc = "Bits 16:18"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn gc_tmx(&mut self) -> GC_TMX_W { - GC_TMX_W { w: self } + #[must_use] + pub fn gc_rbb1(&mut self) -> GC_RBB1_W<8> { + GC_RBB1_W::new(self) } #[doc = "Bits 12:14"] #[inline(always)] - pub fn gc_rbb2(&mut self) -> GC_RBB2_W { - GC_RBB2_W { w: self } + #[must_use] + pub fn gc_rbb2(&mut self) -> GC_RBB2_W<12> { + GC_RBB2_W::new(self) } - #[doc = "Bits 8:9"] + #[doc = "Bits 16:18"] #[inline(always)] - pub fn gc_rbb1(&mut self) -> GC_RBB1_W { - GC_RBB1_W { w: self } + #[must_use] + pub fn gc_tmx(&mut self) -> GC_TMX_W<16> { + GC_TMX_W::new(self) } - #[doc = "Bits 4:5"] + #[doc = "Bits 20:24"] #[inline(always)] - pub fn gc_rmxgm(&mut self) -> GC_RMXGM_W { - GC_RMXGM_W { w: self } + #[must_use] + pub fn gc_tbb(&mut self) -> GC_TBB_W<20> { + GC_TBB_W::new(self) } - #[doc = "Bits 0:2"] + #[doc = "Bits 28:29"] #[inline(always)] - pub fn gc_lna(&mut self) -> GC_LNA_W { - GC_LNA_W { w: self } + #[must_use] + pub fn gc_tbb_boost(&mut self) -> GC_TBB_BOOST_W<28> { + GC_TBB_BOOST_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -305,11 +162,10 @@ impl crate::Readable for TRX_GAIN1_SPEC { #[doc = "`write(|w| ..)` method takes [trx_gain1::W](W) writer structure"] impl crate::Writable for TRX_GAIN1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets trx_gain1 to value 0"] impl crate::Resettable for TRX_GAIN1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/trx_gain_hw.rs b/src/rf/trx_gain_hw.rs index bfb2d6f..3417b49 100644 --- a/src/rf/trx_gain_hw.rs +++ b/src/rf/trx_gain_hw.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,267 +28,126 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `gc_tbb_boost_hw` reader - "] -pub struct GC_TBB_BOOST_HW_R(crate::FieldReader); -impl GC_TBB_BOOST_HW_R { - pub(crate) fn new(bits: u8) -> Self { - GC_TBB_BOOST_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GC_TBB_BOOST_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gc_tbb_boost_hw` writer - "] -pub struct GC_TBB_BOOST_HW_W<'a> { - w: &'a mut W, -} -impl<'a> GC_TBB_BOOST_HW_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 28)) | ((value as u32 & 0x03) << 28); - self.w - } -} -#[doc = "Field `gc_tbb_hw` reader - "] -pub struct GC_TBB_HW_R(crate::FieldReader); -impl GC_TBB_HW_R { - pub(crate) fn new(bits: u8) -> Self { - GC_TBB_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GC_TBB_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gc_tbb_hw` writer - "] -pub struct GC_TBB_HW_W<'a> { - w: &'a mut W, -} -impl<'a> GC_TBB_HW_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 20)) | ((value as u32 & 0x1f) << 20); - self.w - } -} -#[doc = "Field `gc_tmx_hw` reader - "] -pub struct GC_TMX_HW_R(crate::FieldReader); -impl GC_TMX_HW_R { - pub(crate) fn new(bits: u8) -> Self { - GC_TMX_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GC_TMX_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gc_tmx_hw` writer - "] -pub struct GC_TMX_HW_W<'a> { - w: &'a mut W, -} -impl<'a> GC_TMX_HW_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 16)) | ((value as u32 & 0x07) << 16); - self.w - } -} -#[doc = "Field `gc_rbb2_hw` reader - "] -pub struct GC_RBB2_HW_R(crate::FieldReader); -impl GC_RBB2_HW_R { - pub(crate) fn new(bits: u8) -> Self { - GC_RBB2_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GC_RBB2_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gc_rbb2_hw` writer - "] -pub struct GC_RBB2_HW_W<'a> { - w: &'a mut W, -} -impl<'a> GC_RBB2_HW_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 12)) | ((value as u32 & 0x07) << 12); - self.w - } -} -#[doc = "Field `gc_rbb1_hw` reader - "] -pub struct GC_RBB1_HW_R(crate::FieldReader); -impl GC_RBB1_HW_R { - pub(crate) fn new(bits: u8) -> Self { - GC_RBB1_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GC_RBB1_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gc_rbb1_hw` writer - "] -pub struct GC_RBB1_HW_W<'a> { - w: &'a mut W, -} -impl<'a> GC_RBB1_HW_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} -#[doc = "Field `gc_rmxgm_hw` reader - "] -pub struct GC_RMXGM_HW_R(crate::FieldReader); -impl GC_RMXGM_HW_R { - pub(crate) fn new(bits: u8) -> Self { - GC_RMXGM_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GC_RMXGM_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `gc_rmxgm_hw` writer - "] -pub struct GC_RMXGM_HW_W<'a> { - w: &'a mut W, -} -impl<'a> GC_RMXGM_HW_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 4)) | ((value as u32 & 0x03) << 4); - self.w - } -} #[doc = "Field `gc_lna_hw` reader - "] -pub struct GC_LNA_HW_R(crate::FieldReader); -impl GC_LNA_HW_R { - pub(crate) fn new(bits: u8) -> Self { - GC_LNA_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for GC_LNA_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type GC_LNA_HW_R = crate::FieldReader; #[doc = "Field `gc_lna_hw` writer - "] -pub struct GC_LNA_HW_W<'a> { - w: &'a mut W, -} -impl<'a> GC_LNA_HW_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x07) | (value as u32 & 0x07); - self.w - } -} +pub type GC_LNA_HW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TRX_GAIN_HW_SPEC, u8, u8, 3, O>; +#[doc = "Field `gc_rmxgm_hw` reader - "] +pub type GC_RMXGM_HW_R = crate::FieldReader; +#[doc = "Field `gc_rmxgm_hw` writer - "] +pub type GC_RMXGM_HW_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TRX_GAIN_HW_SPEC, u8, u8, 2, O>; +#[doc = "Field `gc_rbb1_hw` reader - "] +pub type GC_RBB1_HW_R = crate::FieldReader; +#[doc = "Field `gc_rbb1_hw` writer - "] +pub type GC_RBB1_HW_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TRX_GAIN_HW_SPEC, u8, u8, 2, O>; +#[doc = "Field `gc_rbb2_hw` reader - "] +pub type GC_RBB2_HW_R = crate::FieldReader; +#[doc = "Field `gc_rbb2_hw` writer - "] +pub type GC_RBB2_HW_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TRX_GAIN_HW_SPEC, u8, u8, 3, O>; +#[doc = "Field `gc_tmx_hw` reader - "] +pub type GC_TMX_HW_R = crate::FieldReader; +#[doc = "Field `gc_tmx_hw` writer - "] +pub type GC_TMX_HW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TRX_GAIN_HW_SPEC, u8, u8, 3, O>; +#[doc = "Field `gc_tbb_hw` reader - "] +pub type GC_TBB_HW_R = crate::FieldReader; +#[doc = "Field `gc_tbb_hw` writer - "] +pub type GC_TBB_HW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TRX_GAIN_HW_SPEC, u8, u8, 5, O>; +#[doc = "Field `gc_tbb_boost_hw` reader - "] +pub type GC_TBB_BOOST_HW_R = crate::FieldReader; +#[doc = "Field `gc_tbb_boost_hw` writer - "] +pub type GC_TBB_BOOST_HW_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TRX_GAIN_HW_SPEC, u8, u8, 2, O>; impl R { - #[doc = "Bits 28:29"] + #[doc = "Bits 0:2"] #[inline(always)] - pub fn gc_tbb_boost_hw(&self) -> GC_TBB_BOOST_HW_R { - GC_TBB_BOOST_HW_R::new(((self.bits >> 28) & 0x03) as u8) + pub fn gc_lna_hw(&self) -> GC_LNA_HW_R { + GC_LNA_HW_R::new((self.bits & 7) as u8) } - #[doc = "Bits 20:24"] + #[doc = "Bits 4:5"] #[inline(always)] - pub fn gc_tbb_hw(&self) -> GC_TBB_HW_R { - GC_TBB_HW_R::new(((self.bits >> 20) & 0x1f) as u8) + pub fn gc_rmxgm_hw(&self) -> GC_RMXGM_HW_R { + GC_RMXGM_HW_R::new(((self.bits >> 4) & 3) as u8) } - #[doc = "Bits 16:18"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn gc_tmx_hw(&self) -> GC_TMX_HW_R { - GC_TMX_HW_R::new(((self.bits >> 16) & 0x07) as u8) + pub fn gc_rbb1_hw(&self) -> GC_RBB1_HW_R { + GC_RBB1_HW_R::new(((self.bits >> 8) & 3) as u8) } #[doc = "Bits 12:14"] #[inline(always)] pub fn gc_rbb2_hw(&self) -> GC_RBB2_HW_R { - GC_RBB2_HW_R::new(((self.bits >> 12) & 0x07) as u8) + GC_RBB2_HW_R::new(((self.bits >> 12) & 7) as u8) } - #[doc = "Bits 8:9"] + #[doc = "Bits 16:18"] #[inline(always)] - pub fn gc_rbb1_hw(&self) -> GC_RBB1_HW_R { - GC_RBB1_HW_R::new(((self.bits >> 8) & 0x03) as u8) + pub fn gc_tmx_hw(&self) -> GC_TMX_HW_R { + GC_TMX_HW_R::new(((self.bits >> 16) & 7) as u8) } - #[doc = "Bits 4:5"] + #[doc = "Bits 20:24"] #[inline(always)] - pub fn gc_rmxgm_hw(&self) -> GC_RMXGM_HW_R { - GC_RMXGM_HW_R::new(((self.bits >> 4) & 0x03) as u8) + pub fn gc_tbb_hw(&self) -> GC_TBB_HW_R { + GC_TBB_HW_R::new(((self.bits >> 20) & 0x1f) as u8) } - #[doc = "Bits 0:2"] + #[doc = "Bits 28:29"] #[inline(always)] - pub fn gc_lna_hw(&self) -> GC_LNA_HW_R { - GC_LNA_HW_R::new((self.bits & 0x07) as u8) + pub fn gc_tbb_boost_hw(&self) -> GC_TBB_BOOST_HW_R { + GC_TBB_BOOST_HW_R::new(((self.bits >> 28) & 3) as u8) } } impl W { - #[doc = "Bits 28:29"] + #[doc = "Bits 0:2"] #[inline(always)] - pub fn gc_tbb_boost_hw(&mut self) -> GC_TBB_BOOST_HW_W { - GC_TBB_BOOST_HW_W { w: self } + #[must_use] + pub fn gc_lna_hw(&mut self) -> GC_LNA_HW_W<0> { + GC_LNA_HW_W::new(self) } - #[doc = "Bits 20:24"] + #[doc = "Bits 4:5"] #[inline(always)] - pub fn gc_tbb_hw(&mut self) -> GC_TBB_HW_W { - GC_TBB_HW_W { w: self } + #[must_use] + pub fn gc_rmxgm_hw(&mut self) -> GC_RMXGM_HW_W<4> { + GC_RMXGM_HW_W::new(self) } - #[doc = "Bits 16:18"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn gc_tmx_hw(&mut self) -> GC_TMX_HW_W { - GC_TMX_HW_W { w: self } + #[must_use] + pub fn gc_rbb1_hw(&mut self) -> GC_RBB1_HW_W<8> { + GC_RBB1_HW_W::new(self) } #[doc = "Bits 12:14"] #[inline(always)] - pub fn gc_rbb2_hw(&mut self) -> GC_RBB2_HW_W { - GC_RBB2_HW_W { w: self } + #[must_use] + pub fn gc_rbb2_hw(&mut self) -> GC_RBB2_HW_W<12> { + GC_RBB2_HW_W::new(self) } - #[doc = "Bits 8:9"] + #[doc = "Bits 16:18"] #[inline(always)] - pub fn gc_rbb1_hw(&mut self) -> GC_RBB1_HW_W { - GC_RBB1_HW_W { w: self } + #[must_use] + pub fn gc_tmx_hw(&mut self) -> GC_TMX_HW_W<16> { + GC_TMX_HW_W::new(self) } - #[doc = "Bits 4:5"] + #[doc = "Bits 20:24"] #[inline(always)] - pub fn gc_rmxgm_hw(&mut self) -> GC_RMXGM_HW_W { - GC_RMXGM_HW_W { w: self } + #[must_use] + pub fn gc_tbb_hw(&mut self) -> GC_TBB_HW_W<20> { + GC_TBB_HW_W::new(self) } - #[doc = "Bits 0:2"] + #[doc = "Bits 28:29"] #[inline(always)] - pub fn gc_lna_hw(&mut self) -> GC_LNA_HW_W { - GC_LNA_HW_W { w: self } + #[must_use] + pub fn gc_tbb_boost_hw(&mut self) -> GC_TBB_BOOST_HW_W<28> { + GC_TBB_BOOST_HW_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -305,11 +165,10 @@ impl crate::Readable for TRX_GAIN_HW_SPEC { #[doc = "`write(|w| ..)` method takes [trx_gain_hw::W](W) writer structure"] impl crate::Writable for TRX_GAIN_HW_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets trx_gain_hw to value 0"] impl crate::Resettable for TRX_GAIN_HW_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/tx_iq_gain_hw0.rs b/src/rf/tx_iq_gain_hw0.rs index 9608bf7..c151d27 100644 --- a/src/rf/tx_iq_gain_hw0.rs +++ b/src/rf/tx_iq_gain_hw0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,87 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `tx_iq_gain_comp_gc0` reader - "] -pub struct TX_IQ_GAIN_COMP_GC0_R(crate::FieldReader); -impl TX_IQ_GAIN_COMP_GC0_R { - pub(crate) fn new(bits: u16) -> Self { - TX_IQ_GAIN_COMP_GC0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_IQ_GAIN_COMP_GC0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_iq_gain_comp_gc0` writer - "] -pub struct TX_IQ_GAIN_COMP_GC0_W<'a> { - w: &'a mut W, -} -impl<'a> TX_IQ_GAIN_COMP_GC0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07ff << 16)) | ((value as u32 & 0x07ff) << 16); - self.w - } -} #[doc = "Field `tx_iq_phase_comp_gc0` reader - "] -pub struct TX_IQ_PHASE_COMP_GC0_R(crate::FieldReader); -impl TX_IQ_PHASE_COMP_GC0_R { - pub(crate) fn new(bits: u16) -> Self { - TX_IQ_PHASE_COMP_GC0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_IQ_PHASE_COMP_GC0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TX_IQ_PHASE_COMP_GC0_R = crate::FieldReader; #[doc = "Field `tx_iq_phase_comp_gc0` writer - "] -pub struct TX_IQ_PHASE_COMP_GC0_W<'a> { - w: &'a mut W, -} -impl<'a> TX_IQ_PHASE_COMP_GC0_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type TX_IQ_PHASE_COMP_GC0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TX_IQ_GAIN_HW0_SPEC, u16, u16, 10, O>; +#[doc = "Field `tx_iq_gain_comp_gc0` reader - "] +pub type TX_IQ_GAIN_COMP_GC0_R = crate::FieldReader; +#[doc = "Field `tx_iq_gain_comp_gc0` writer - "] +pub type TX_IQ_GAIN_COMP_GC0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TX_IQ_GAIN_HW0_SPEC, u16, u16, 11, O>; +impl R { + #[doc = "Bits 0:9"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03ff) | (value as u32 & 0x03ff); - self.w + pub fn tx_iq_phase_comp_gc0(&self) -> TX_IQ_PHASE_COMP_GC0_R { + TX_IQ_PHASE_COMP_GC0_R::new((self.bits & 0x03ff) as u16) } -} -impl R { #[doc = "Bits 16:26"] #[inline(always)] pub fn tx_iq_gain_comp_gc0(&self) -> TX_IQ_GAIN_COMP_GC0_R { TX_IQ_GAIN_COMP_GC0_R::new(((self.bits >> 16) & 0x07ff) as u16) } - #[doc = "Bits 0:9"] - #[inline(always)] - pub fn tx_iq_phase_comp_gc0(&self) -> TX_IQ_PHASE_COMP_GC0_R { - TX_IQ_PHASE_COMP_GC0_R::new((self.bits & 0x03ff) as u16) - } } impl W { - #[doc = "Bits 16:26"] + #[doc = "Bits 0:9"] #[inline(always)] - pub fn tx_iq_gain_comp_gc0(&mut self) -> TX_IQ_GAIN_COMP_GC0_W { - TX_IQ_GAIN_COMP_GC0_W { w: self } + #[must_use] + pub fn tx_iq_phase_comp_gc0(&mut self) -> TX_IQ_PHASE_COMP_GC0_W<0> { + TX_IQ_PHASE_COMP_GC0_W::new(self) } - #[doc = "Bits 0:9"] + #[doc = "Bits 16:26"] #[inline(always)] - pub fn tx_iq_phase_comp_gc0(&mut self) -> TX_IQ_PHASE_COMP_GC0_W { - TX_IQ_PHASE_COMP_GC0_W { w: self } + #[must_use] + pub fn tx_iq_gain_comp_gc0(&mut self) -> TX_IQ_GAIN_COMP_GC0_W<16> { + TX_IQ_GAIN_COMP_GC0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -125,11 +88,10 @@ impl crate::Readable for TX_IQ_GAIN_HW0_SPEC { #[doc = "`write(|w| ..)` method takes [tx_iq_gain_hw0::W](W) writer structure"] impl crate::Writable for TX_IQ_GAIN_HW0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets tx_iq_gain_hw0 to value 0"] impl crate::Resettable for TX_IQ_GAIN_HW0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/tx_iq_gain_hw1.rs b/src/rf/tx_iq_gain_hw1.rs index 5c1214c..e14e5cf 100644 --- a/src/rf/tx_iq_gain_hw1.rs +++ b/src/rf/tx_iq_gain_hw1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,87 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `tx_iq_gain_comp_gc1` reader - "] -pub struct TX_IQ_GAIN_COMP_GC1_R(crate::FieldReader); -impl TX_IQ_GAIN_COMP_GC1_R { - pub(crate) fn new(bits: u16) -> Self { - TX_IQ_GAIN_COMP_GC1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_IQ_GAIN_COMP_GC1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_iq_gain_comp_gc1` writer - "] -pub struct TX_IQ_GAIN_COMP_GC1_W<'a> { - w: &'a mut W, -} -impl<'a> TX_IQ_GAIN_COMP_GC1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07ff << 16)) | ((value as u32 & 0x07ff) << 16); - self.w - } -} #[doc = "Field `tx_iq_phase_comp_gc1` reader - "] -pub struct TX_IQ_PHASE_COMP_GC1_R(crate::FieldReader); -impl TX_IQ_PHASE_COMP_GC1_R { - pub(crate) fn new(bits: u16) -> Self { - TX_IQ_PHASE_COMP_GC1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_IQ_PHASE_COMP_GC1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TX_IQ_PHASE_COMP_GC1_R = crate::FieldReader; #[doc = "Field `tx_iq_phase_comp_gc1` writer - "] -pub struct TX_IQ_PHASE_COMP_GC1_W<'a> { - w: &'a mut W, -} -impl<'a> TX_IQ_PHASE_COMP_GC1_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type TX_IQ_PHASE_COMP_GC1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TX_IQ_GAIN_HW1_SPEC, u16, u16, 10, O>; +#[doc = "Field `tx_iq_gain_comp_gc1` reader - "] +pub type TX_IQ_GAIN_COMP_GC1_R = crate::FieldReader; +#[doc = "Field `tx_iq_gain_comp_gc1` writer - "] +pub type TX_IQ_GAIN_COMP_GC1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TX_IQ_GAIN_HW1_SPEC, u16, u16, 11, O>; +impl R { + #[doc = "Bits 0:9"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03ff) | (value as u32 & 0x03ff); - self.w + pub fn tx_iq_phase_comp_gc1(&self) -> TX_IQ_PHASE_COMP_GC1_R { + TX_IQ_PHASE_COMP_GC1_R::new((self.bits & 0x03ff) as u16) } -} -impl R { #[doc = "Bits 16:26"] #[inline(always)] pub fn tx_iq_gain_comp_gc1(&self) -> TX_IQ_GAIN_COMP_GC1_R { TX_IQ_GAIN_COMP_GC1_R::new(((self.bits >> 16) & 0x07ff) as u16) } - #[doc = "Bits 0:9"] - #[inline(always)] - pub fn tx_iq_phase_comp_gc1(&self) -> TX_IQ_PHASE_COMP_GC1_R { - TX_IQ_PHASE_COMP_GC1_R::new((self.bits & 0x03ff) as u16) - } } impl W { - #[doc = "Bits 16:26"] + #[doc = "Bits 0:9"] #[inline(always)] - pub fn tx_iq_gain_comp_gc1(&mut self) -> TX_IQ_GAIN_COMP_GC1_W { - TX_IQ_GAIN_COMP_GC1_W { w: self } + #[must_use] + pub fn tx_iq_phase_comp_gc1(&mut self) -> TX_IQ_PHASE_COMP_GC1_W<0> { + TX_IQ_PHASE_COMP_GC1_W::new(self) } - #[doc = "Bits 0:9"] + #[doc = "Bits 16:26"] #[inline(always)] - pub fn tx_iq_phase_comp_gc1(&mut self) -> TX_IQ_PHASE_COMP_GC1_W { - TX_IQ_PHASE_COMP_GC1_W { w: self } + #[must_use] + pub fn tx_iq_gain_comp_gc1(&mut self) -> TX_IQ_GAIN_COMP_GC1_W<16> { + TX_IQ_GAIN_COMP_GC1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -125,11 +88,10 @@ impl crate::Readable for TX_IQ_GAIN_HW1_SPEC { #[doc = "`write(|w| ..)` method takes [tx_iq_gain_hw1::W](W) writer structure"] impl crate::Writable for TX_IQ_GAIN_HW1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets tx_iq_gain_hw1 to value 0"] impl crate::Resettable for TX_IQ_GAIN_HW1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/tx_iq_gain_hw2.rs b/src/rf/tx_iq_gain_hw2.rs index 8d6aeb3..f01a63c 100644 --- a/src/rf/tx_iq_gain_hw2.rs +++ b/src/rf/tx_iq_gain_hw2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,87 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `tx_iq_gain_comp_gc2` reader - "] -pub struct TX_IQ_GAIN_COMP_GC2_R(crate::FieldReader); -impl TX_IQ_GAIN_COMP_GC2_R { - pub(crate) fn new(bits: u16) -> Self { - TX_IQ_GAIN_COMP_GC2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_IQ_GAIN_COMP_GC2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_iq_gain_comp_gc2` writer - "] -pub struct TX_IQ_GAIN_COMP_GC2_W<'a> { - w: &'a mut W, -} -impl<'a> TX_IQ_GAIN_COMP_GC2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07ff << 16)) | ((value as u32 & 0x07ff) << 16); - self.w - } -} #[doc = "Field `tx_iq_phase_comp_gc2` reader - "] -pub struct TX_IQ_PHASE_COMP_GC2_R(crate::FieldReader); -impl TX_IQ_PHASE_COMP_GC2_R { - pub(crate) fn new(bits: u16) -> Self { - TX_IQ_PHASE_COMP_GC2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_IQ_PHASE_COMP_GC2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TX_IQ_PHASE_COMP_GC2_R = crate::FieldReader; #[doc = "Field `tx_iq_phase_comp_gc2` writer - "] -pub struct TX_IQ_PHASE_COMP_GC2_W<'a> { - w: &'a mut W, -} -impl<'a> TX_IQ_PHASE_COMP_GC2_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type TX_IQ_PHASE_COMP_GC2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TX_IQ_GAIN_HW2_SPEC, u16, u16, 10, O>; +#[doc = "Field `tx_iq_gain_comp_gc2` reader - "] +pub type TX_IQ_GAIN_COMP_GC2_R = crate::FieldReader; +#[doc = "Field `tx_iq_gain_comp_gc2` writer - "] +pub type TX_IQ_GAIN_COMP_GC2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TX_IQ_GAIN_HW2_SPEC, u16, u16, 11, O>; +impl R { + #[doc = "Bits 0:9"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03ff) | (value as u32 & 0x03ff); - self.w + pub fn tx_iq_phase_comp_gc2(&self) -> TX_IQ_PHASE_COMP_GC2_R { + TX_IQ_PHASE_COMP_GC2_R::new((self.bits & 0x03ff) as u16) } -} -impl R { #[doc = "Bits 16:26"] #[inline(always)] pub fn tx_iq_gain_comp_gc2(&self) -> TX_IQ_GAIN_COMP_GC2_R { TX_IQ_GAIN_COMP_GC2_R::new(((self.bits >> 16) & 0x07ff) as u16) } - #[doc = "Bits 0:9"] - #[inline(always)] - pub fn tx_iq_phase_comp_gc2(&self) -> TX_IQ_PHASE_COMP_GC2_R { - TX_IQ_PHASE_COMP_GC2_R::new((self.bits & 0x03ff) as u16) - } } impl W { - #[doc = "Bits 16:26"] + #[doc = "Bits 0:9"] #[inline(always)] - pub fn tx_iq_gain_comp_gc2(&mut self) -> TX_IQ_GAIN_COMP_GC2_W { - TX_IQ_GAIN_COMP_GC2_W { w: self } + #[must_use] + pub fn tx_iq_phase_comp_gc2(&mut self) -> TX_IQ_PHASE_COMP_GC2_W<0> { + TX_IQ_PHASE_COMP_GC2_W::new(self) } - #[doc = "Bits 0:9"] + #[doc = "Bits 16:26"] #[inline(always)] - pub fn tx_iq_phase_comp_gc2(&mut self) -> TX_IQ_PHASE_COMP_GC2_W { - TX_IQ_PHASE_COMP_GC2_W { w: self } + #[must_use] + pub fn tx_iq_gain_comp_gc2(&mut self) -> TX_IQ_GAIN_COMP_GC2_W<16> { + TX_IQ_GAIN_COMP_GC2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -125,11 +88,10 @@ impl crate::Readable for TX_IQ_GAIN_HW2_SPEC { #[doc = "`write(|w| ..)` method takes [tx_iq_gain_hw2::W](W) writer structure"] impl crate::Writable for TX_IQ_GAIN_HW2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets tx_iq_gain_hw2 to value 0"] impl crate::Resettable for TX_IQ_GAIN_HW2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/tx_iq_gain_hw3.rs b/src/rf/tx_iq_gain_hw3.rs index 76d4ca4..6b48253 100644 --- a/src/rf/tx_iq_gain_hw3.rs +++ b/src/rf/tx_iq_gain_hw3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,87 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `tx_iq_gain_comp_gc3` reader - "] -pub struct TX_IQ_GAIN_COMP_GC3_R(crate::FieldReader); -impl TX_IQ_GAIN_COMP_GC3_R { - pub(crate) fn new(bits: u16) -> Self { - TX_IQ_GAIN_COMP_GC3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_IQ_GAIN_COMP_GC3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_iq_gain_comp_gc3` writer - "] -pub struct TX_IQ_GAIN_COMP_GC3_W<'a> { - w: &'a mut W, -} -impl<'a> TX_IQ_GAIN_COMP_GC3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07ff << 16)) | ((value as u32 & 0x07ff) << 16); - self.w - } -} #[doc = "Field `tx_iq_phase_comp_gc3` reader - "] -pub struct TX_IQ_PHASE_COMP_GC3_R(crate::FieldReader); -impl TX_IQ_PHASE_COMP_GC3_R { - pub(crate) fn new(bits: u16) -> Self { - TX_IQ_PHASE_COMP_GC3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_IQ_PHASE_COMP_GC3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TX_IQ_PHASE_COMP_GC3_R = crate::FieldReader; #[doc = "Field `tx_iq_phase_comp_gc3` writer - "] -pub struct TX_IQ_PHASE_COMP_GC3_W<'a> { - w: &'a mut W, -} -impl<'a> TX_IQ_PHASE_COMP_GC3_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type TX_IQ_PHASE_COMP_GC3_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TX_IQ_GAIN_HW3_SPEC, u16, u16, 10, O>; +#[doc = "Field `tx_iq_gain_comp_gc3` reader - "] +pub type TX_IQ_GAIN_COMP_GC3_R = crate::FieldReader; +#[doc = "Field `tx_iq_gain_comp_gc3` writer - "] +pub type TX_IQ_GAIN_COMP_GC3_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TX_IQ_GAIN_HW3_SPEC, u16, u16, 11, O>; +impl R { + #[doc = "Bits 0:9"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03ff) | (value as u32 & 0x03ff); - self.w + pub fn tx_iq_phase_comp_gc3(&self) -> TX_IQ_PHASE_COMP_GC3_R { + TX_IQ_PHASE_COMP_GC3_R::new((self.bits & 0x03ff) as u16) } -} -impl R { #[doc = "Bits 16:26"] #[inline(always)] pub fn tx_iq_gain_comp_gc3(&self) -> TX_IQ_GAIN_COMP_GC3_R { TX_IQ_GAIN_COMP_GC3_R::new(((self.bits >> 16) & 0x07ff) as u16) } - #[doc = "Bits 0:9"] - #[inline(always)] - pub fn tx_iq_phase_comp_gc3(&self) -> TX_IQ_PHASE_COMP_GC3_R { - TX_IQ_PHASE_COMP_GC3_R::new((self.bits & 0x03ff) as u16) - } } impl W { - #[doc = "Bits 16:26"] + #[doc = "Bits 0:9"] #[inline(always)] - pub fn tx_iq_gain_comp_gc3(&mut self) -> TX_IQ_GAIN_COMP_GC3_W { - TX_IQ_GAIN_COMP_GC3_W { w: self } + #[must_use] + pub fn tx_iq_phase_comp_gc3(&mut self) -> TX_IQ_PHASE_COMP_GC3_W<0> { + TX_IQ_PHASE_COMP_GC3_W::new(self) } - #[doc = "Bits 0:9"] + #[doc = "Bits 16:26"] #[inline(always)] - pub fn tx_iq_phase_comp_gc3(&mut self) -> TX_IQ_PHASE_COMP_GC3_W { - TX_IQ_PHASE_COMP_GC3_W { w: self } + #[must_use] + pub fn tx_iq_gain_comp_gc3(&mut self) -> TX_IQ_GAIN_COMP_GC3_W<16> { + TX_IQ_GAIN_COMP_GC3_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -125,11 +88,10 @@ impl crate::Readable for TX_IQ_GAIN_HW3_SPEC { #[doc = "`write(|w| ..)` method takes [tx_iq_gain_hw3::W](W) writer structure"] impl crate::Writable for TX_IQ_GAIN_HW3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets tx_iq_gain_hw3 to value 0"] impl crate::Resettable for TX_IQ_GAIN_HW3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/tx_iq_gain_hw4.rs b/src/rf/tx_iq_gain_hw4.rs index 928bd24..40b3b8e 100644 --- a/src/rf/tx_iq_gain_hw4.rs +++ b/src/rf/tx_iq_gain_hw4.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,87 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `tx_iq_gain_comp_gc4` reader - "] -pub struct TX_IQ_GAIN_COMP_GC4_R(crate::FieldReader); -impl TX_IQ_GAIN_COMP_GC4_R { - pub(crate) fn new(bits: u16) -> Self { - TX_IQ_GAIN_COMP_GC4_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_IQ_GAIN_COMP_GC4_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_iq_gain_comp_gc4` writer - "] -pub struct TX_IQ_GAIN_COMP_GC4_W<'a> { - w: &'a mut W, -} -impl<'a> TX_IQ_GAIN_COMP_GC4_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07ff << 16)) | ((value as u32 & 0x07ff) << 16); - self.w - } -} #[doc = "Field `tx_iq_phase_comp_gc4` reader - "] -pub struct TX_IQ_PHASE_COMP_GC4_R(crate::FieldReader); -impl TX_IQ_PHASE_COMP_GC4_R { - pub(crate) fn new(bits: u16) -> Self { - TX_IQ_PHASE_COMP_GC4_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_IQ_PHASE_COMP_GC4_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TX_IQ_PHASE_COMP_GC4_R = crate::FieldReader; #[doc = "Field `tx_iq_phase_comp_gc4` writer - "] -pub struct TX_IQ_PHASE_COMP_GC4_W<'a> { - w: &'a mut W, -} -impl<'a> TX_IQ_PHASE_COMP_GC4_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type TX_IQ_PHASE_COMP_GC4_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TX_IQ_GAIN_HW4_SPEC, u16, u16, 10, O>; +#[doc = "Field `tx_iq_gain_comp_gc4` reader - "] +pub type TX_IQ_GAIN_COMP_GC4_R = crate::FieldReader; +#[doc = "Field `tx_iq_gain_comp_gc4` writer - "] +pub type TX_IQ_GAIN_COMP_GC4_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TX_IQ_GAIN_HW4_SPEC, u16, u16, 11, O>; +impl R { + #[doc = "Bits 0:9"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03ff) | (value as u32 & 0x03ff); - self.w + pub fn tx_iq_phase_comp_gc4(&self) -> TX_IQ_PHASE_COMP_GC4_R { + TX_IQ_PHASE_COMP_GC4_R::new((self.bits & 0x03ff) as u16) } -} -impl R { #[doc = "Bits 16:26"] #[inline(always)] pub fn tx_iq_gain_comp_gc4(&self) -> TX_IQ_GAIN_COMP_GC4_R { TX_IQ_GAIN_COMP_GC4_R::new(((self.bits >> 16) & 0x07ff) as u16) } - #[doc = "Bits 0:9"] - #[inline(always)] - pub fn tx_iq_phase_comp_gc4(&self) -> TX_IQ_PHASE_COMP_GC4_R { - TX_IQ_PHASE_COMP_GC4_R::new((self.bits & 0x03ff) as u16) - } } impl W { - #[doc = "Bits 16:26"] + #[doc = "Bits 0:9"] #[inline(always)] - pub fn tx_iq_gain_comp_gc4(&mut self) -> TX_IQ_GAIN_COMP_GC4_W { - TX_IQ_GAIN_COMP_GC4_W { w: self } + #[must_use] + pub fn tx_iq_phase_comp_gc4(&mut self) -> TX_IQ_PHASE_COMP_GC4_W<0> { + TX_IQ_PHASE_COMP_GC4_W::new(self) } - #[doc = "Bits 0:9"] + #[doc = "Bits 16:26"] #[inline(always)] - pub fn tx_iq_phase_comp_gc4(&mut self) -> TX_IQ_PHASE_COMP_GC4_W { - TX_IQ_PHASE_COMP_GC4_W { w: self } + #[must_use] + pub fn tx_iq_gain_comp_gc4(&mut self) -> TX_IQ_GAIN_COMP_GC4_W<16> { + TX_IQ_GAIN_COMP_GC4_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -125,11 +88,10 @@ impl crate::Readable for TX_IQ_GAIN_HW4_SPEC { #[doc = "`write(|w| ..)` method takes [tx_iq_gain_hw4::W](W) writer structure"] impl crate::Writable for TX_IQ_GAIN_HW4_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets tx_iq_gain_hw4 to value 0"] impl crate::Resettable for TX_IQ_GAIN_HW4_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/tx_iq_gain_hw5.rs b/src/rf/tx_iq_gain_hw5.rs index 30c52bc..21cb65c 100644 --- a/src/rf/tx_iq_gain_hw5.rs +++ b/src/rf/tx_iq_gain_hw5.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,87 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `tx_iq_gain_comp_gc5` reader - "] -pub struct TX_IQ_GAIN_COMP_GC5_R(crate::FieldReader); -impl TX_IQ_GAIN_COMP_GC5_R { - pub(crate) fn new(bits: u16) -> Self { - TX_IQ_GAIN_COMP_GC5_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_IQ_GAIN_COMP_GC5_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_iq_gain_comp_gc5` writer - "] -pub struct TX_IQ_GAIN_COMP_GC5_W<'a> { - w: &'a mut W, -} -impl<'a> TX_IQ_GAIN_COMP_GC5_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07ff << 16)) | ((value as u32 & 0x07ff) << 16); - self.w - } -} #[doc = "Field `tx_iq_phase_comp_gc5` reader - "] -pub struct TX_IQ_PHASE_COMP_GC5_R(crate::FieldReader); -impl TX_IQ_PHASE_COMP_GC5_R { - pub(crate) fn new(bits: u16) -> Self { - TX_IQ_PHASE_COMP_GC5_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_IQ_PHASE_COMP_GC5_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TX_IQ_PHASE_COMP_GC5_R = crate::FieldReader; #[doc = "Field `tx_iq_phase_comp_gc5` writer - "] -pub struct TX_IQ_PHASE_COMP_GC5_W<'a> { - w: &'a mut W, -} -impl<'a> TX_IQ_PHASE_COMP_GC5_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type TX_IQ_PHASE_COMP_GC5_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TX_IQ_GAIN_HW5_SPEC, u16, u16, 10, O>; +#[doc = "Field `tx_iq_gain_comp_gc5` reader - "] +pub type TX_IQ_GAIN_COMP_GC5_R = crate::FieldReader; +#[doc = "Field `tx_iq_gain_comp_gc5` writer - "] +pub type TX_IQ_GAIN_COMP_GC5_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TX_IQ_GAIN_HW5_SPEC, u16, u16, 11, O>; +impl R { + #[doc = "Bits 0:9"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03ff) | (value as u32 & 0x03ff); - self.w + pub fn tx_iq_phase_comp_gc5(&self) -> TX_IQ_PHASE_COMP_GC5_R { + TX_IQ_PHASE_COMP_GC5_R::new((self.bits & 0x03ff) as u16) } -} -impl R { #[doc = "Bits 16:26"] #[inline(always)] pub fn tx_iq_gain_comp_gc5(&self) -> TX_IQ_GAIN_COMP_GC5_R { TX_IQ_GAIN_COMP_GC5_R::new(((self.bits >> 16) & 0x07ff) as u16) } - #[doc = "Bits 0:9"] - #[inline(always)] - pub fn tx_iq_phase_comp_gc5(&self) -> TX_IQ_PHASE_COMP_GC5_R { - TX_IQ_PHASE_COMP_GC5_R::new((self.bits & 0x03ff) as u16) - } } impl W { - #[doc = "Bits 16:26"] + #[doc = "Bits 0:9"] #[inline(always)] - pub fn tx_iq_gain_comp_gc5(&mut self) -> TX_IQ_GAIN_COMP_GC5_W { - TX_IQ_GAIN_COMP_GC5_W { w: self } + #[must_use] + pub fn tx_iq_phase_comp_gc5(&mut self) -> TX_IQ_PHASE_COMP_GC5_W<0> { + TX_IQ_PHASE_COMP_GC5_W::new(self) } - #[doc = "Bits 0:9"] + #[doc = "Bits 16:26"] #[inline(always)] - pub fn tx_iq_phase_comp_gc5(&mut self) -> TX_IQ_PHASE_COMP_GC5_W { - TX_IQ_PHASE_COMP_GC5_W { w: self } + #[must_use] + pub fn tx_iq_gain_comp_gc5(&mut self) -> TX_IQ_GAIN_COMP_GC5_W<16> { + TX_IQ_GAIN_COMP_GC5_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -125,11 +88,10 @@ impl crate::Readable for TX_IQ_GAIN_HW5_SPEC { #[doc = "`write(|w| ..)` method takes [tx_iq_gain_hw5::W](W) writer structure"] impl crate::Writable for TX_IQ_GAIN_HW5_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets tx_iq_gain_hw5 to value 0"] impl crate::Resettable for TX_IQ_GAIN_HW5_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/tx_iq_gain_hw6.rs b/src/rf/tx_iq_gain_hw6.rs index 1075c1e..e5609c7 100644 --- a/src/rf/tx_iq_gain_hw6.rs +++ b/src/rf/tx_iq_gain_hw6.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,87 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `tx_iq_gain_comp_gc6` reader - "] -pub struct TX_IQ_GAIN_COMP_GC6_R(crate::FieldReader); -impl TX_IQ_GAIN_COMP_GC6_R { - pub(crate) fn new(bits: u16) -> Self { - TX_IQ_GAIN_COMP_GC6_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_IQ_GAIN_COMP_GC6_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_iq_gain_comp_gc6` writer - "] -pub struct TX_IQ_GAIN_COMP_GC6_W<'a> { - w: &'a mut W, -} -impl<'a> TX_IQ_GAIN_COMP_GC6_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07ff << 16)) | ((value as u32 & 0x07ff) << 16); - self.w - } -} #[doc = "Field `tx_iq_phase_comp_gc6` reader - "] -pub struct TX_IQ_PHASE_COMP_GC6_R(crate::FieldReader); -impl TX_IQ_PHASE_COMP_GC6_R { - pub(crate) fn new(bits: u16) -> Self { - TX_IQ_PHASE_COMP_GC6_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_IQ_PHASE_COMP_GC6_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TX_IQ_PHASE_COMP_GC6_R = crate::FieldReader; #[doc = "Field `tx_iq_phase_comp_gc6` writer - "] -pub struct TX_IQ_PHASE_COMP_GC6_W<'a> { - w: &'a mut W, -} -impl<'a> TX_IQ_PHASE_COMP_GC6_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type TX_IQ_PHASE_COMP_GC6_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TX_IQ_GAIN_HW6_SPEC, u16, u16, 10, O>; +#[doc = "Field `tx_iq_gain_comp_gc6` reader - "] +pub type TX_IQ_GAIN_COMP_GC6_R = crate::FieldReader; +#[doc = "Field `tx_iq_gain_comp_gc6` writer - "] +pub type TX_IQ_GAIN_COMP_GC6_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TX_IQ_GAIN_HW6_SPEC, u16, u16, 11, O>; +impl R { + #[doc = "Bits 0:9"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03ff) | (value as u32 & 0x03ff); - self.w + pub fn tx_iq_phase_comp_gc6(&self) -> TX_IQ_PHASE_COMP_GC6_R { + TX_IQ_PHASE_COMP_GC6_R::new((self.bits & 0x03ff) as u16) } -} -impl R { #[doc = "Bits 16:26"] #[inline(always)] pub fn tx_iq_gain_comp_gc6(&self) -> TX_IQ_GAIN_COMP_GC6_R { TX_IQ_GAIN_COMP_GC6_R::new(((self.bits >> 16) & 0x07ff) as u16) } - #[doc = "Bits 0:9"] - #[inline(always)] - pub fn tx_iq_phase_comp_gc6(&self) -> TX_IQ_PHASE_COMP_GC6_R { - TX_IQ_PHASE_COMP_GC6_R::new((self.bits & 0x03ff) as u16) - } } impl W { - #[doc = "Bits 16:26"] + #[doc = "Bits 0:9"] #[inline(always)] - pub fn tx_iq_gain_comp_gc6(&mut self) -> TX_IQ_GAIN_COMP_GC6_W { - TX_IQ_GAIN_COMP_GC6_W { w: self } + #[must_use] + pub fn tx_iq_phase_comp_gc6(&mut self) -> TX_IQ_PHASE_COMP_GC6_W<0> { + TX_IQ_PHASE_COMP_GC6_W::new(self) } - #[doc = "Bits 0:9"] + #[doc = "Bits 16:26"] #[inline(always)] - pub fn tx_iq_phase_comp_gc6(&mut self) -> TX_IQ_PHASE_COMP_GC6_W { - TX_IQ_PHASE_COMP_GC6_W { w: self } + #[must_use] + pub fn tx_iq_gain_comp_gc6(&mut self) -> TX_IQ_GAIN_COMP_GC6_W<16> { + TX_IQ_GAIN_COMP_GC6_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -125,11 +88,10 @@ impl crate::Readable for TX_IQ_GAIN_HW6_SPEC { #[doc = "`write(|w| ..)` method takes [tx_iq_gain_hw6::W](W) writer structure"] impl crate::Writable for TX_IQ_GAIN_HW6_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets tx_iq_gain_hw6 to value 0"] impl crate::Resettable for TX_IQ_GAIN_HW6_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/tx_iq_gain_hw7.rs b/src/rf/tx_iq_gain_hw7.rs index f7d92bc..a174f7e 100644 --- a/src/rf/tx_iq_gain_hw7.rs +++ b/src/rf/tx_iq_gain_hw7.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,87 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `tx_iq_gain_comp_gc7` reader - "] -pub struct TX_IQ_GAIN_COMP_GC7_R(crate::FieldReader); -impl TX_IQ_GAIN_COMP_GC7_R { - pub(crate) fn new(bits: u16) -> Self { - TX_IQ_GAIN_COMP_GC7_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_IQ_GAIN_COMP_GC7_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_iq_gain_comp_gc7` writer - "] -pub struct TX_IQ_GAIN_COMP_GC7_W<'a> { - w: &'a mut W, -} -impl<'a> TX_IQ_GAIN_COMP_GC7_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07ff << 16)) | ((value as u32 & 0x07ff) << 16); - self.w - } -} #[doc = "Field `tx_iq_phase_comp_gc7` reader - "] -pub struct TX_IQ_PHASE_COMP_GC7_R(crate::FieldReader); -impl TX_IQ_PHASE_COMP_GC7_R { - pub(crate) fn new(bits: u16) -> Self { - TX_IQ_PHASE_COMP_GC7_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_IQ_PHASE_COMP_GC7_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TX_IQ_PHASE_COMP_GC7_R = crate::FieldReader; #[doc = "Field `tx_iq_phase_comp_gc7` writer - "] -pub struct TX_IQ_PHASE_COMP_GC7_W<'a> { - w: &'a mut W, -} -impl<'a> TX_IQ_PHASE_COMP_GC7_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type TX_IQ_PHASE_COMP_GC7_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TX_IQ_GAIN_HW7_SPEC, u16, u16, 10, O>; +#[doc = "Field `tx_iq_gain_comp_gc7` reader - "] +pub type TX_IQ_GAIN_COMP_GC7_R = crate::FieldReader; +#[doc = "Field `tx_iq_gain_comp_gc7` writer - "] +pub type TX_IQ_GAIN_COMP_GC7_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TX_IQ_GAIN_HW7_SPEC, u16, u16, 11, O>; +impl R { + #[doc = "Bits 0:9"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03ff) | (value as u32 & 0x03ff); - self.w + pub fn tx_iq_phase_comp_gc7(&self) -> TX_IQ_PHASE_COMP_GC7_R { + TX_IQ_PHASE_COMP_GC7_R::new((self.bits & 0x03ff) as u16) } -} -impl R { #[doc = "Bits 16:26"] #[inline(always)] pub fn tx_iq_gain_comp_gc7(&self) -> TX_IQ_GAIN_COMP_GC7_R { TX_IQ_GAIN_COMP_GC7_R::new(((self.bits >> 16) & 0x07ff) as u16) } - #[doc = "Bits 0:9"] - #[inline(always)] - pub fn tx_iq_phase_comp_gc7(&self) -> TX_IQ_PHASE_COMP_GC7_R { - TX_IQ_PHASE_COMP_GC7_R::new((self.bits & 0x03ff) as u16) - } } impl W { - #[doc = "Bits 16:26"] + #[doc = "Bits 0:9"] #[inline(always)] - pub fn tx_iq_gain_comp_gc7(&mut self) -> TX_IQ_GAIN_COMP_GC7_W { - TX_IQ_GAIN_COMP_GC7_W { w: self } + #[must_use] + pub fn tx_iq_phase_comp_gc7(&mut self) -> TX_IQ_PHASE_COMP_GC7_W<0> { + TX_IQ_PHASE_COMP_GC7_W::new(self) } - #[doc = "Bits 0:9"] + #[doc = "Bits 16:26"] #[inline(always)] - pub fn tx_iq_phase_comp_gc7(&mut self) -> TX_IQ_PHASE_COMP_GC7_W { - TX_IQ_PHASE_COMP_GC7_W { w: self } + #[must_use] + pub fn tx_iq_gain_comp_gc7(&mut self) -> TX_IQ_GAIN_COMP_GC7_W<16> { + TX_IQ_GAIN_COMP_GC7_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -125,11 +88,10 @@ impl crate::Readable for TX_IQ_GAIN_HW7_SPEC { #[doc = "`write(|w| ..)` method takes [tx_iq_gain_hw7::W](W) writer structure"] impl crate::Writable for TX_IQ_GAIN_HW7_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets tx_iq_gain_hw7 to value 0"] impl crate::Resettable for TX_IQ_GAIN_HW7_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/vco1.rs b/src/rf/vco1.rs index 32bddba..c7d01b0 100644 --- a/src/rf/vco1.rs +++ b/src/rf/vco1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,159 +28,79 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `lo_vco_idac_cw_hw` reader - "] -pub struct LO_VCO_IDAC_CW_HW_R(crate::FieldReader); -impl LO_VCO_IDAC_CW_HW_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_IDAC_CW_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_IDAC_CW_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_idac_cw_hw` writer - "] -pub struct LO_VCO_IDAC_CW_HW_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_IDAC_CW_HW_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 24)) | ((value as u32 & 0x1f) << 24); - self.w - } -} -#[doc = "Field `lo_vco_idac_cw` reader - "] -pub struct LO_VCO_IDAC_CW_R(crate::FieldReader); -impl LO_VCO_IDAC_CW_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_IDAC_CW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_IDAC_CW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_idac_cw` writer - "] -pub struct LO_VCO_IDAC_CW_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_IDAC_CW_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 16)) | ((value as u32 & 0x1f) << 16); - self.w - } -} -#[doc = "Field `lo_vco_freq_cw_hw` reader - "] -pub struct LO_VCO_FREQ_CW_HW_R(crate::FieldReader); -impl LO_VCO_FREQ_CW_HW_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_FREQ_CW_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_FREQ_CW_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_freq_cw_hw` writer - "] -pub struct LO_VCO_FREQ_CW_HW_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_FREQ_CW_HW_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8); - self.w - } -} #[doc = "Field `lo_vco_freq_cw` reader - "] -pub struct LO_VCO_FREQ_CW_R(crate::FieldReader); -impl LO_VCO_FREQ_CW_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_FREQ_CW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_FREQ_CW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type LO_VCO_FREQ_CW_R = crate::FieldReader; #[doc = "Field `lo_vco_freq_cw` writer - "] -pub struct LO_VCO_FREQ_CW_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_FREQ_CW_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type LO_VCO_FREQ_CW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, VCO1_SPEC, u8, u8, 8, O>; +#[doc = "Field `lo_vco_freq_cw_hw` reader - "] +pub type LO_VCO_FREQ_CW_HW_R = crate::FieldReader; +#[doc = "Field `lo_vco_freq_cw_hw` writer - "] +pub type LO_VCO_FREQ_CW_HW_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, VCO1_SPEC, u8, u8, 8, O>; +#[doc = "Field `lo_vco_idac_cw` reader - "] +pub type LO_VCO_IDAC_CW_R = crate::FieldReader; +#[doc = "Field `lo_vco_idac_cw` writer - "] +pub type LO_VCO_IDAC_CW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, VCO1_SPEC, u8, u8, 5, O>; +#[doc = "Field `lo_vco_idac_cw_hw` reader - "] +pub type LO_VCO_IDAC_CW_HW_R = crate::FieldReader; +#[doc = "Field `lo_vco_idac_cw_hw` writer - "] +pub type LO_VCO_IDAC_CW_HW_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, VCO1_SPEC, u8, u8, 5, O>; +impl R { + #[doc = "Bits 0:7"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff); - self.w + pub fn lo_vco_freq_cw(&self) -> LO_VCO_FREQ_CW_R { + LO_VCO_FREQ_CW_R::new((self.bits & 0xff) as u8) } -} -impl R { - #[doc = "Bits 24:28"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn lo_vco_idac_cw_hw(&self) -> LO_VCO_IDAC_CW_HW_R { - LO_VCO_IDAC_CW_HW_R::new(((self.bits >> 24) & 0x1f) as u8) + pub fn lo_vco_freq_cw_hw(&self) -> LO_VCO_FREQ_CW_HW_R { + LO_VCO_FREQ_CW_HW_R::new(((self.bits >> 8) & 0xff) as u8) } #[doc = "Bits 16:20"] #[inline(always)] pub fn lo_vco_idac_cw(&self) -> LO_VCO_IDAC_CW_R { LO_VCO_IDAC_CW_R::new(((self.bits >> 16) & 0x1f) as u8) } - #[doc = "Bits 8:15"] - #[inline(always)] - pub fn lo_vco_freq_cw_hw(&self) -> LO_VCO_FREQ_CW_HW_R { - LO_VCO_FREQ_CW_HW_R::new(((self.bits >> 8) & 0xff) as u8) - } - #[doc = "Bits 0:7"] + #[doc = "Bits 24:28"] #[inline(always)] - pub fn lo_vco_freq_cw(&self) -> LO_VCO_FREQ_CW_R { - LO_VCO_FREQ_CW_R::new((self.bits & 0xff) as u8) + pub fn lo_vco_idac_cw_hw(&self) -> LO_VCO_IDAC_CW_HW_R { + LO_VCO_IDAC_CW_HW_R::new(((self.bits >> 24) & 0x1f) as u8) } } impl W { - #[doc = "Bits 24:28"] + #[doc = "Bits 0:7"] #[inline(always)] - pub fn lo_vco_idac_cw_hw(&mut self) -> LO_VCO_IDAC_CW_HW_W { - LO_VCO_IDAC_CW_HW_W { w: self } + #[must_use] + pub fn lo_vco_freq_cw(&mut self) -> LO_VCO_FREQ_CW_W<0> { + LO_VCO_FREQ_CW_W::new(self) } - #[doc = "Bits 16:20"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn lo_vco_idac_cw(&mut self) -> LO_VCO_IDAC_CW_W { - LO_VCO_IDAC_CW_W { w: self } + #[must_use] + pub fn lo_vco_freq_cw_hw(&mut self) -> LO_VCO_FREQ_CW_HW_W<8> { + LO_VCO_FREQ_CW_HW_W::new(self) } - #[doc = "Bits 8:15"] + #[doc = "Bits 16:20"] #[inline(always)] - pub fn lo_vco_freq_cw_hw(&mut self) -> LO_VCO_FREQ_CW_HW_W { - LO_VCO_FREQ_CW_HW_W { w: self } + #[must_use] + pub fn lo_vco_idac_cw(&mut self) -> LO_VCO_IDAC_CW_W<16> { + LO_VCO_IDAC_CW_W::new(self) } - #[doc = "Bits 0:7"] + #[doc = "Bits 24:28"] #[inline(always)] - pub fn lo_vco_freq_cw(&mut self) -> LO_VCO_FREQ_CW_W { - LO_VCO_FREQ_CW_W { w: self } + #[must_use] + pub fn lo_vco_idac_cw_hw(&mut self) -> LO_VCO_IDAC_CW_HW_W<24> { + LO_VCO_IDAC_CW_HW_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -197,11 +118,10 @@ impl crate::Readable for VCO1_SPEC { #[doc = "`write(|w| ..)` method takes [vco1::W](W) writer structure"] impl crate::Writable for VCO1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets vco1 to value 0"] impl crate::Resettable for VCO1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/vco2.rs b/src/rf/vco2.rs index e87ec3e..180aed0 100644 --- a/src/rf/vco2.rs +++ b/src/rf/vco2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,317 +28,124 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `acal_inc_en_hw` reader - "] -pub struct ACAL_INC_EN_HW_R(crate::FieldReader); -impl ACAL_INC_EN_HW_R { - pub(crate) fn new(bits: bool) -> Self { - ACAL_INC_EN_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ACAL_INC_EN_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `acal_inc_en_hw` writer - "] -pub struct ACAL_INC_EN_HW_W<'a> { - w: &'a mut W, -} -impl<'a> ACAL_INC_EN_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `acal_vco_ud` reader - "] -pub struct ACAL_VCO_UD_R(crate::FieldReader); -impl ACAL_VCO_UD_R { - pub(crate) fn new(bits: bool) -> Self { - ACAL_VCO_UD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ACAL_VCO_UD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `acal_vco_ud` writer - "] -pub struct ACAL_VCO_UD_W<'a> { - w: &'a mut W, -} -impl<'a> ACAL_VCO_UD_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} -#[doc = "Field `acal_vref_cw` reader - "] -pub struct ACAL_VREF_CW_R(crate::FieldReader); -impl ACAL_VREF_CW_R { - pub(crate) fn new(bits: u8) -> Self { - ACAL_VREF_CW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for ACAL_VREF_CW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `acal_vref_cw` writer - "] -pub struct ACAL_VREF_CW_W<'a> { - w: &'a mut W, -} -impl<'a> ACAL_VREF_CW_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 8)) | ((value as u32 & 0x07) << 8); - self.w - } -} -#[doc = "Field `lo_vco_short_idac_filter` reader - "] -pub struct LO_VCO_SHORT_IDAC_FILTER_R(crate::FieldReader); -impl LO_VCO_SHORT_IDAC_FILTER_R { - pub(crate) fn new(bits: bool) -> Self { - LO_VCO_SHORT_IDAC_FILTER_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_SHORT_IDAC_FILTER_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_short_idac_filter` writer - "] -pub struct LO_VCO_SHORT_IDAC_FILTER_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_SHORT_IDAC_FILTER_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w - } -} -#[doc = "Field `lo_vco_short_vbias_filter` reader - "] -pub struct LO_VCO_SHORT_VBIAS_FILTER_R(crate::FieldReader); -impl LO_VCO_SHORT_VBIAS_FILTER_R { - pub(crate) fn new(bits: bool) -> Self { - LO_VCO_SHORT_VBIAS_FILTER_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_SHORT_VBIAS_FILTER_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_short_vbias_filter` writer - "] -pub struct LO_VCO_SHORT_VBIAS_FILTER_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_SHORT_VBIAS_FILTER_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w - } -} -#[doc = "Field `lo_vco_idac_boot` reader - "] -pub struct LO_VCO_IDAC_BOOT_R(crate::FieldReader); -impl LO_VCO_IDAC_BOOT_R { - pub(crate) fn new(bits: bool) -> Self { - LO_VCO_IDAC_BOOT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_IDAC_BOOT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `lo_vco_idac_boot` writer - "] -pub struct LO_VCO_IDAC_BOOT_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_IDAC_BOOT_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} #[doc = "Field `lo_vco_vbias_cw` reader - "] -pub struct LO_VCO_VBIAS_CW_R(crate::FieldReader); -impl LO_VCO_VBIAS_CW_R { - pub(crate) fn new(bits: u8) -> Self { - LO_VCO_VBIAS_CW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for LO_VCO_VBIAS_CW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type LO_VCO_VBIAS_CW_R = crate::FieldReader; #[doc = "Field `lo_vco_vbias_cw` writer - "] -pub struct LO_VCO_VBIAS_CW_W<'a> { - w: &'a mut W, -} -impl<'a> LO_VCO_VBIAS_CW_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w - } -} +pub type LO_VCO_VBIAS_CW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, VCO2_SPEC, u8, u8, 2, O>; +#[doc = "Field `lo_vco_idac_boot` reader - "] +pub type LO_VCO_IDAC_BOOT_R = crate::BitReader; +#[doc = "Field `lo_vco_idac_boot` writer - "] +pub type LO_VCO_IDAC_BOOT_W<'a, const O: u8> = crate::BitWriter<'a, u32, VCO2_SPEC, bool, O>; +#[doc = "Field `lo_vco_short_vbias_filter` reader - "] +pub type LO_VCO_SHORT_VBIAS_FILTER_R = crate::BitReader; +#[doc = "Field `lo_vco_short_vbias_filter` writer - "] +pub type LO_VCO_SHORT_VBIAS_FILTER_W<'a, const O: u8> = + crate::BitWriter<'a, u32, VCO2_SPEC, bool, O>; +#[doc = "Field `lo_vco_short_idac_filter` reader - "] +pub type LO_VCO_SHORT_IDAC_FILTER_R = crate::BitReader; +#[doc = "Field `lo_vco_short_idac_filter` writer - "] +pub type LO_VCO_SHORT_IDAC_FILTER_W<'a, const O: u8> = + crate::BitWriter<'a, u32, VCO2_SPEC, bool, O>; +#[doc = "Field `acal_vref_cw` reader - "] +pub type ACAL_VREF_CW_R = crate::FieldReader; +#[doc = "Field `acal_vref_cw` writer - "] +pub type ACAL_VREF_CW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, VCO2_SPEC, u8, u8, 3, O>; +#[doc = "Field `acal_vco_ud` reader - "] +pub type ACAL_VCO_UD_R = crate::BitReader; +#[doc = "Field `acal_vco_ud` writer - "] +pub type ACAL_VCO_UD_W<'a, const O: u8> = crate::BitWriter<'a, u32, VCO2_SPEC, bool, O>; +#[doc = "Field `acal_inc_en_hw` reader - "] +pub type ACAL_INC_EN_HW_R = crate::BitReader; +#[doc = "Field `acal_inc_en_hw` writer - "] +pub type ACAL_INC_EN_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, VCO2_SPEC, bool, O>; impl R { - #[doc = "Bit 16"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn acal_inc_en_hw(&self) -> ACAL_INC_EN_HW_R { - ACAL_INC_EN_HW_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn lo_vco_vbias_cw(&self) -> LO_VCO_VBIAS_CW_R { + LO_VCO_VBIAS_CW_R::new((self.bits & 3) as u8) } - #[doc = "Bit 12"] + #[doc = "Bit 4"] #[inline(always)] - pub fn acal_vco_ud(&self) -> ACAL_VCO_UD_R { - ACAL_VCO_UD_R::new(((self.bits >> 12) & 0x01) != 0) + pub fn lo_vco_idac_boot(&self) -> LO_VCO_IDAC_BOOT_R { + LO_VCO_IDAC_BOOT_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bits 8:10"] + #[doc = "Bit 5"] #[inline(always)] - pub fn acal_vref_cw(&self) -> ACAL_VREF_CW_R { - ACAL_VREF_CW_R::new(((self.bits >> 8) & 0x07) as u8) + pub fn lo_vco_short_vbias_filter(&self) -> LO_VCO_SHORT_VBIAS_FILTER_R { + LO_VCO_SHORT_VBIAS_FILTER_R::new(((self.bits >> 5) & 1) != 0) } #[doc = "Bit 6"] #[inline(always)] pub fn lo_vco_short_idac_filter(&self) -> LO_VCO_SHORT_IDAC_FILTER_R { - LO_VCO_SHORT_IDAC_FILTER_R::new(((self.bits >> 6) & 0x01) != 0) + LO_VCO_SHORT_IDAC_FILTER_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = "Bit 5"] + #[doc = "Bits 8:10"] #[inline(always)] - pub fn lo_vco_short_vbias_filter(&self) -> LO_VCO_SHORT_VBIAS_FILTER_R { - LO_VCO_SHORT_VBIAS_FILTER_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn acal_vref_cw(&self) -> ACAL_VREF_CW_R { + ACAL_VREF_CW_R::new(((self.bits >> 8) & 7) as u8) } - #[doc = "Bit 4"] + #[doc = "Bit 12"] #[inline(always)] - pub fn lo_vco_idac_boot(&self) -> LO_VCO_IDAC_BOOT_R { - LO_VCO_IDAC_BOOT_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn acal_vco_ud(&self) -> ACAL_VCO_UD_R { + ACAL_VCO_UD_R::new(((self.bits >> 12) & 1) != 0) } - #[doc = "Bits 0:1"] + #[doc = "Bit 16"] #[inline(always)] - pub fn lo_vco_vbias_cw(&self) -> LO_VCO_VBIAS_CW_R { - LO_VCO_VBIAS_CW_R::new((self.bits & 0x03) as u8) + pub fn acal_inc_en_hw(&self) -> ACAL_INC_EN_HW_R { + ACAL_INC_EN_HW_R::new(((self.bits >> 16) & 1) != 0) } } impl W { - #[doc = "Bit 16"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn acal_inc_en_hw(&mut self) -> ACAL_INC_EN_HW_W { - ACAL_INC_EN_HW_W { w: self } + #[must_use] + pub fn lo_vco_vbias_cw(&mut self) -> LO_VCO_VBIAS_CW_W<0> { + LO_VCO_VBIAS_CW_W::new(self) } - #[doc = "Bit 12"] + #[doc = "Bit 4"] #[inline(always)] - pub fn acal_vco_ud(&mut self) -> ACAL_VCO_UD_W { - ACAL_VCO_UD_W { w: self } + #[must_use] + pub fn lo_vco_idac_boot(&mut self) -> LO_VCO_IDAC_BOOT_W<4> { + LO_VCO_IDAC_BOOT_W::new(self) } - #[doc = "Bits 8:10"] + #[doc = "Bit 5"] #[inline(always)] - pub fn acal_vref_cw(&mut self) -> ACAL_VREF_CW_W { - ACAL_VREF_CW_W { w: self } + #[must_use] + pub fn lo_vco_short_vbias_filter(&mut self) -> LO_VCO_SHORT_VBIAS_FILTER_W<5> { + LO_VCO_SHORT_VBIAS_FILTER_W::new(self) } #[doc = "Bit 6"] #[inline(always)] - pub fn lo_vco_short_idac_filter(&mut self) -> LO_VCO_SHORT_IDAC_FILTER_W { - LO_VCO_SHORT_IDAC_FILTER_W { w: self } + #[must_use] + pub fn lo_vco_short_idac_filter(&mut self) -> LO_VCO_SHORT_IDAC_FILTER_W<6> { + LO_VCO_SHORT_IDAC_FILTER_W::new(self) } - #[doc = "Bit 5"] + #[doc = "Bits 8:10"] #[inline(always)] - pub fn lo_vco_short_vbias_filter(&mut self) -> LO_VCO_SHORT_VBIAS_FILTER_W { - LO_VCO_SHORT_VBIAS_FILTER_W { w: self } + #[must_use] + pub fn acal_vref_cw(&mut self) -> ACAL_VREF_CW_W<8> { + ACAL_VREF_CW_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 12"] #[inline(always)] - pub fn lo_vco_idac_boot(&mut self) -> LO_VCO_IDAC_BOOT_W { - LO_VCO_IDAC_BOOT_W { w: self } + #[must_use] + pub fn acal_vco_ud(&mut self) -> ACAL_VCO_UD_W<12> { + ACAL_VCO_UD_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bit 16"] #[inline(always)] - pub fn lo_vco_vbias_cw(&mut self) -> LO_VCO_VBIAS_CW_W { - LO_VCO_VBIAS_CW_W { w: self } + #[must_use] + pub fn acal_inc_en_hw(&mut self) -> ACAL_INC_EN_HW_W<16> { + ACAL_INC_EN_HW_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -355,11 +163,10 @@ impl crate::Readable for VCO2_SPEC { #[doc = "`write(|w| ..)` method takes [vco2::W](W) writer structure"] impl crate::Writable for VCO2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets vco2 to value 0"] impl crate::Resettable for VCO2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/vco3.rs b/src/rf/vco3.rs index 0323cc6..253e704 100644 --- a/src/rf/vco3.rs +++ b/src/rf/vco3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,87 +28,47 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `fcal_cnt_op` reader - "] -pub struct FCAL_CNT_OP_R(crate::FieldReader); -impl FCAL_CNT_OP_R { - pub(crate) fn new(bits: u16) -> Self { - FCAL_CNT_OP_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for FCAL_CNT_OP_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `fcal_cnt_op` writer - "] -pub struct FCAL_CNT_OP_W<'a> { - w: &'a mut W, -} -impl<'a> FCAL_CNT_OP_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xffff << 16)) | ((value as u32 & 0xffff) << 16); - self.w - } -} #[doc = "Field `fcal_div` reader - "] -pub struct FCAL_DIV_R(crate::FieldReader); -impl FCAL_DIV_R { - pub(crate) fn new(bits: u16) -> Self { - FCAL_DIV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for FCAL_DIV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type FCAL_DIV_R = crate::FieldReader; #[doc = "Field `fcal_div` writer - "] -pub struct FCAL_DIV_W<'a> { - w: &'a mut W, -} -impl<'a> FCAL_DIV_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type FCAL_DIV_W<'a, const O: u8> = crate::FieldWriter<'a, u32, VCO3_SPEC, u16, u16, 16, O>; +#[doc = "Field `fcal_cnt_op` reader - "] +pub type FCAL_CNT_OP_R = crate::FieldReader; +#[doc = "Field `fcal_cnt_op` writer - "] +pub type FCAL_CNT_OP_W<'a, const O: u8> = crate::FieldWriter<'a, u32, VCO3_SPEC, u16, u16, 16, O>; +impl R { + #[doc = "Bits 0:15"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w + pub fn fcal_div(&self) -> FCAL_DIV_R { + FCAL_DIV_R::new((self.bits & 0xffff) as u16) } -} -impl R { #[doc = "Bits 16:31"] #[inline(always)] pub fn fcal_cnt_op(&self) -> FCAL_CNT_OP_R { FCAL_CNT_OP_R::new(((self.bits >> 16) & 0xffff) as u16) } - #[doc = "Bits 0:15"] - #[inline(always)] - pub fn fcal_div(&self) -> FCAL_DIV_R { - FCAL_DIV_R::new((self.bits & 0xffff) as u16) - } } impl W { - #[doc = "Bits 16:31"] + #[doc = "Bits 0:15"] #[inline(always)] - pub fn fcal_cnt_op(&mut self) -> FCAL_CNT_OP_W { - FCAL_CNT_OP_W { w: self } + #[must_use] + pub fn fcal_div(&mut self) -> FCAL_DIV_W<0> { + FCAL_DIV_W::new(self) } - #[doc = "Bits 0:15"] + #[doc = "Bits 16:31"] #[inline(always)] - pub fn fcal_div(&mut self) -> FCAL_DIV_W { - FCAL_DIV_W { w: self } + #[must_use] + pub fn fcal_cnt_op(&mut self) -> FCAL_CNT_OP_W<16> { + FCAL_CNT_OP_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -125,11 +86,10 @@ impl crate::Readable for VCO3_SPEC { #[doc = "`write(|w| ..)` method takes [vco3::W](W) writer structure"] impl crate::Writable for VCO3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets vco3 to value 0"] impl crate::Resettable for VCO3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/rf/vco4.rs b/src/rf/vco4.rs index e8c9bd7..ea97ead 100644 --- a/src/rf/vco4.rs +++ b/src/rf/vco4.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,235 +28,93 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `fcal_inc_vctrl_ud` reader - "] -pub struct FCAL_INC_VCTRL_UD_R(crate::FieldReader); -impl FCAL_INC_VCTRL_UD_R { - pub(crate) fn new(bits: u8) -> Self { - FCAL_INC_VCTRL_UD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for FCAL_INC_VCTRL_UD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `fcal_inc_vctrl_ud` writer - "] -pub struct FCAL_INC_VCTRL_UD_W<'a> { - w: &'a mut W, -} -impl<'a> FCAL_INC_VCTRL_UD_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 24)) | ((value as u32 & 0x03) << 24); - self.w - } -} -#[doc = "Field `fcal_cnt_rdy` reader - "] -pub struct FCAL_CNT_RDY_R(crate::FieldReader); -impl FCAL_CNT_RDY_R { - pub(crate) fn new(bits: bool) -> Self { - FCAL_CNT_RDY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for FCAL_CNT_RDY_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `fcal_cnt_rdy` writer - "] -pub struct FCAL_CNT_RDY_W<'a> { - w: &'a mut W, -} -impl<'a> FCAL_CNT_RDY_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w - } -} -#[doc = "Field `fcal_inc_large_range` reader - "] -pub struct FCAL_INC_LARGE_RANGE_R(crate::FieldReader); -impl FCAL_INC_LARGE_RANGE_R { - pub(crate) fn new(bits: bool) -> Self { - FCAL_INC_LARGE_RANGE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for FCAL_INC_LARGE_RANGE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `fcal_inc_large_range` writer - "] -pub struct FCAL_INC_LARGE_RANGE_W<'a> { - w: &'a mut W, -} -impl<'a> FCAL_INC_LARGE_RANGE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `fcal_inc_en_hw` reader - "] -pub struct FCAL_INC_EN_HW_R(crate::FieldReader); -impl FCAL_INC_EN_HW_R { - pub(crate) fn new(bits: bool) -> Self { - FCAL_INC_EN_HW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for FCAL_INC_EN_HW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `fcal_inc_en_hw` writer - "] -pub struct FCAL_INC_EN_HW_W<'a> { - w: &'a mut W, -} -impl<'a> FCAL_INC_EN_HW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} #[doc = "Field `fcal_cnt_start` reader - "] -pub struct FCAL_CNT_START_R(crate::FieldReader); -impl FCAL_CNT_START_R { - pub(crate) fn new(bits: bool) -> Self { - FCAL_CNT_START_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for FCAL_CNT_START_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type FCAL_CNT_START_R = crate::BitReader; #[doc = "Field `fcal_cnt_start` writer - "] -pub struct FCAL_CNT_START_W<'a> { - w: &'a mut W, -} -impl<'a> FCAL_CNT_START_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} +pub type FCAL_CNT_START_W<'a, const O: u8> = crate::BitWriter<'a, u32, VCO4_SPEC, bool, O>; +#[doc = "Field `fcal_inc_en_hw` reader - "] +pub type FCAL_INC_EN_HW_R = crate::BitReader; +#[doc = "Field `fcal_inc_en_hw` writer - "] +pub type FCAL_INC_EN_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, VCO4_SPEC, bool, O>; +#[doc = "Field `fcal_inc_large_range` reader - "] +pub type FCAL_INC_LARGE_RANGE_R = crate::BitReader; +#[doc = "Field `fcal_inc_large_range` writer - "] +pub type FCAL_INC_LARGE_RANGE_W<'a, const O: u8> = crate::BitWriter<'a, u32, VCO4_SPEC, bool, O>; +#[doc = "Field `fcal_cnt_rdy` reader - "] +pub type FCAL_CNT_RDY_R = crate::BitReader; +#[doc = "Field `fcal_cnt_rdy` writer - "] +pub type FCAL_CNT_RDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, VCO4_SPEC, bool, O>; +#[doc = "Field `fcal_inc_vctrl_ud` reader - "] +pub type FCAL_INC_VCTRL_UD_R = crate::FieldReader; +#[doc = "Field `fcal_inc_vctrl_ud` writer - "] +pub type FCAL_INC_VCTRL_UD_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, VCO4_SPEC, u8, u8, 2, O>; impl R { - #[doc = "Bits 24:25"] + #[doc = "Bit 4"] #[inline(always)] - pub fn fcal_inc_vctrl_ud(&self) -> FCAL_INC_VCTRL_UD_R { - FCAL_INC_VCTRL_UD_R::new(((self.bits >> 24) & 0x03) as u8) + pub fn fcal_cnt_start(&self) -> FCAL_CNT_START_R { + FCAL_CNT_START_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 20"] + #[doc = "Bit 8"] #[inline(always)] - pub fn fcal_cnt_rdy(&self) -> FCAL_CNT_RDY_R { - FCAL_CNT_RDY_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn fcal_inc_en_hw(&self) -> FCAL_INC_EN_HW_R { + FCAL_INC_EN_HW_R::new(((self.bits >> 8) & 1) != 0) } #[doc = "Bit 16"] #[inline(always)] pub fn fcal_inc_large_range(&self) -> FCAL_INC_LARGE_RANGE_R { - FCAL_INC_LARGE_RANGE_R::new(((self.bits >> 16) & 0x01) != 0) + FCAL_INC_LARGE_RANGE_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 8"] + #[doc = "Bit 20"] #[inline(always)] - pub fn fcal_inc_en_hw(&self) -> FCAL_INC_EN_HW_R { - FCAL_INC_EN_HW_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn fcal_cnt_rdy(&self) -> FCAL_CNT_RDY_R { + FCAL_CNT_RDY_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bit 4"] + #[doc = "Bits 24:25"] #[inline(always)] - pub fn fcal_cnt_start(&self) -> FCAL_CNT_START_R { - FCAL_CNT_START_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn fcal_inc_vctrl_ud(&self) -> FCAL_INC_VCTRL_UD_R { + FCAL_INC_VCTRL_UD_R::new(((self.bits >> 24) & 3) as u8) } } impl W { - #[doc = "Bits 24:25"] + #[doc = "Bit 4"] #[inline(always)] - pub fn fcal_inc_vctrl_ud(&mut self) -> FCAL_INC_VCTRL_UD_W { - FCAL_INC_VCTRL_UD_W { w: self } + #[must_use] + pub fn fcal_cnt_start(&mut self) -> FCAL_CNT_START_W<4> { + FCAL_CNT_START_W::new(self) } - #[doc = "Bit 20"] + #[doc = "Bit 8"] #[inline(always)] - pub fn fcal_cnt_rdy(&mut self) -> FCAL_CNT_RDY_W { - FCAL_CNT_RDY_W { w: self } + #[must_use] + pub fn fcal_inc_en_hw(&mut self) -> FCAL_INC_EN_HW_W<8> { + FCAL_INC_EN_HW_W::new(self) } #[doc = "Bit 16"] #[inline(always)] - pub fn fcal_inc_large_range(&mut self) -> FCAL_INC_LARGE_RANGE_W { - FCAL_INC_LARGE_RANGE_W { w: self } + #[must_use] + pub fn fcal_inc_large_range(&mut self) -> FCAL_INC_LARGE_RANGE_W<16> { + FCAL_INC_LARGE_RANGE_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bit 20"] #[inline(always)] - pub fn fcal_inc_en_hw(&mut self) -> FCAL_INC_EN_HW_W { - FCAL_INC_EN_HW_W { w: self } + #[must_use] + pub fn fcal_cnt_rdy(&mut self) -> FCAL_CNT_RDY_W<20> { + FCAL_CNT_RDY_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bits 24:25"] #[inline(always)] - pub fn fcal_cnt_start(&mut self) -> FCAL_CNT_START_W { - FCAL_CNT_START_W { w: self } + #[must_use] + pub fn fcal_inc_vctrl_ud(&mut self) -> FCAL_INC_VCTRL_UD_W<24> { + FCAL_INC_VCTRL_UD_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -273,11 +132,10 @@ impl crate::Readable for VCO4_SPEC { #[doc = "`write(|w| ..)` method takes [vco4::W](W) writer structure"] impl crate::Writable for VCO4_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets vco4 to value 0"] impl crate::Resettable for VCO4_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_dbg.rs b/src/sec_dbg.rs index ca4d46b..b5ec8f2 100644 --- a/src/sec_dbg.rs +++ b/src/sec_dbg.rs @@ -2,51 +2,51 @@ #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - sd_chip_id_low."] - pub sd_chip_id_low: crate::Reg, + pub sd_chip_id_low: SD_CHIP_ID_LOW, #[doc = "0x04 - sd_chip_id_high."] - pub sd_chip_id_high: crate::Reg, + pub sd_chip_id_high: SD_CHIP_ID_HIGH, #[doc = "0x08 - sd_wifi_mac_low."] - pub sd_wifi_mac_low: crate::Reg, + pub sd_wifi_mac_low: SD_WIFI_MAC_LOW, #[doc = "0x0c - sd_wifi_mac_high."] - pub sd_wifi_mac_high: crate::Reg, + pub sd_wifi_mac_high: SD_WIFI_MAC_HIGH, #[doc = "0x10 - sd_dbg_pwd_low."] - pub sd_dbg_pwd_low: crate::Reg, + pub sd_dbg_pwd_low: SD_DBG_PWD_LOW, #[doc = "0x14 - sd_dbg_pwd_high."] - pub sd_dbg_pwd_high: crate::Reg, + pub sd_dbg_pwd_high: SD_DBG_PWD_HIGH, #[doc = "0x18 - sd_status."] - pub sd_status: crate::Reg, + pub sd_status: SD_STATUS, #[doc = "0x1c - sd_dbg_reserved."] - pub sd_dbg_reserved: crate::Reg, + pub sd_dbg_reserved: SD_DBG_RESERVED, } -#[doc = "sd_chip_id_low register accessor: an alias for `Reg`"] +#[doc = "sd_chip_id_low (r) register accessor: an alias for `Reg`"] pub type SD_CHIP_ID_LOW = crate::Reg; #[doc = "sd_chip_id_low."] pub mod sd_chip_id_low; -#[doc = "sd_chip_id_high register accessor: an alias for `Reg`"] +#[doc = "sd_chip_id_high (r) register accessor: an alias for `Reg`"] pub type SD_CHIP_ID_HIGH = crate::Reg; #[doc = "sd_chip_id_high."] pub mod sd_chip_id_high; -#[doc = "sd_wifi_mac_low register accessor: an alias for `Reg`"] +#[doc = "sd_wifi_mac_low (r) register accessor: an alias for `Reg`"] pub type SD_WIFI_MAC_LOW = crate::Reg; #[doc = "sd_wifi_mac_low."] pub mod sd_wifi_mac_low; -#[doc = "sd_wifi_mac_high register accessor: an alias for `Reg`"] +#[doc = "sd_wifi_mac_high (r) register accessor: an alias for `Reg`"] pub type SD_WIFI_MAC_HIGH = crate::Reg; #[doc = "sd_wifi_mac_high."] pub mod sd_wifi_mac_high; -#[doc = "sd_dbg_pwd_low register accessor: an alias for `Reg`"] +#[doc = "sd_dbg_pwd_low (rw) register accessor: an alias for `Reg`"] pub type SD_DBG_PWD_LOW = crate::Reg; #[doc = "sd_dbg_pwd_low."] pub mod sd_dbg_pwd_low; -#[doc = "sd_dbg_pwd_high register accessor: an alias for `Reg`"] +#[doc = "sd_dbg_pwd_high (rw) register accessor: an alias for `Reg`"] pub type SD_DBG_PWD_HIGH = crate::Reg; #[doc = "sd_dbg_pwd_high."] pub mod sd_dbg_pwd_high; -#[doc = "sd_status register accessor: an alias for `Reg`"] +#[doc = "sd_status (rw) register accessor: an alias for `Reg`"] pub type SD_STATUS = crate::Reg; #[doc = "sd_status."] pub mod sd_status; -#[doc = "sd_dbg_reserved register accessor: an alias for `Reg`"] +#[doc = "sd_dbg_reserved (rw) register accessor: an alias for `Reg`"] pub type SD_DBG_RESERVED = crate::Reg; #[doc = "sd_dbg_reserved."] pub mod sd_dbg_reserved; diff --git a/src/sec_dbg/sd_chip_id_high.rs b/src/sec_dbg/sd_chip_id_high.rs index 155a174..937a260 100644 --- a/src/sec_dbg/sd_chip_id_high.rs +++ b/src/sec_dbg/sd_chip_id_high.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `sd_chip_id_high` reader - "] -pub struct SD_CHIP_ID_HIGH_R(crate::FieldReader); -impl SD_CHIP_ID_HIGH_R { - pub(crate) fn new(bits: u32) -> Self { - SD_CHIP_ID_HIGH_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SD_CHIP_ID_HIGH_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SD_CHIP_ID_HIGH_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sd_chip_id_high(&self) -> SD_CHIP_ID_HIGH_R { - SD_CHIP_ID_HIGH_R::new((self.bits & 0xffff_ffff) as u32) + SD_CHIP_ID_HIGH_R::new(self.bits) } } #[doc = "sd_chip_id_high.\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 [sd_chip_id_high](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SD_CHIP_ID_HIGH_SPEC { } #[doc = "`reset()` method sets sd_chip_id_high to value 0"] impl crate::Resettable for SD_CHIP_ID_HIGH_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_dbg/sd_chip_id_low.rs b/src/sec_dbg/sd_chip_id_low.rs index 4165f19..42919c6 100644 --- a/src/sec_dbg/sd_chip_id_low.rs +++ b/src/sec_dbg/sd_chip_id_low.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `sd_chip_id_low` reader - "] -pub struct SD_CHIP_ID_LOW_R(crate::FieldReader); -impl SD_CHIP_ID_LOW_R { - pub(crate) fn new(bits: u32) -> Self { - SD_CHIP_ID_LOW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SD_CHIP_ID_LOW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SD_CHIP_ID_LOW_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sd_chip_id_low(&self) -> SD_CHIP_ID_LOW_R { - SD_CHIP_ID_LOW_R::new((self.bits & 0xffff_ffff) as u32) + SD_CHIP_ID_LOW_R::new(self.bits) } } #[doc = "sd_chip_id_low.\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 [sd_chip_id_low](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SD_CHIP_ID_LOW_SPEC { } #[doc = "`reset()` method sets sd_chip_id_low to value 0"] impl crate::Resettable for SD_CHIP_ID_LOW_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_dbg/sd_dbg_pwd_high.rs b/src/sec_dbg/sd_dbg_pwd_high.rs index e92cde8..7dbe1be 100644 --- a/src/sec_dbg/sd_dbg_pwd_high.rs +++ b/src/sec_dbg/sd_dbg_pwd_high.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sd_dbg_pwd_high` reader - "] -pub struct SD_DBG_PWD_HIGH_R(crate::FieldReader); -impl SD_DBG_PWD_HIGH_R { - pub(crate) fn new(bits: u32) -> Self { - SD_DBG_PWD_HIGH_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SD_DBG_PWD_HIGH_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SD_DBG_PWD_HIGH_R = crate::FieldReader; #[doc = "Field `sd_dbg_pwd_high` writer - "] -pub struct SD_DBG_PWD_HIGH_W<'a> { - w: &'a mut W, -} -impl<'a> SD_DBG_PWD_HIGH_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SD_DBG_PWD_HIGH_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SD_DBG_PWD_HIGH_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sd_dbg_pwd_high(&self) -> SD_DBG_PWD_HIGH_R { - SD_DBG_PWD_HIGH_R::new((self.bits & 0xffff_ffff) as u32) + SD_DBG_PWD_HIGH_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sd_dbg_pwd_high(&mut self) -> SD_DBG_PWD_HIGH_W { - SD_DBG_PWD_HIGH_W { w: self } + #[must_use] + pub fn sd_dbg_pwd_high(&mut self) -> SD_DBG_PWD_HIGH_W<0> { + SD_DBG_PWD_HIGH_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SD_DBG_PWD_HIGH_SPEC { #[doc = "`write(|w| ..)` method takes [sd_dbg_pwd_high::W](W) writer structure"] impl crate::Writable for SD_DBG_PWD_HIGH_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sd_dbg_pwd_high to value 0"] impl crate::Resettable for SD_DBG_PWD_HIGH_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_dbg/sd_dbg_pwd_low.rs b/src/sec_dbg/sd_dbg_pwd_low.rs index b033a6e..e3705fb 100644 --- a/src/sec_dbg/sd_dbg_pwd_low.rs +++ b/src/sec_dbg/sd_dbg_pwd_low.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sd_dbg_pwd_low` reader - "] -pub struct SD_DBG_PWD_LOW_R(crate::FieldReader); -impl SD_DBG_PWD_LOW_R { - pub(crate) fn new(bits: u32) -> Self { - SD_DBG_PWD_LOW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SD_DBG_PWD_LOW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SD_DBG_PWD_LOW_R = crate::FieldReader; #[doc = "Field `sd_dbg_pwd_low` writer - "] -pub struct SD_DBG_PWD_LOW_W<'a> { - w: &'a mut W, -} -impl<'a> SD_DBG_PWD_LOW_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SD_DBG_PWD_LOW_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SD_DBG_PWD_LOW_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sd_dbg_pwd_low(&self) -> SD_DBG_PWD_LOW_R { - SD_DBG_PWD_LOW_R::new((self.bits & 0xffff_ffff) as u32) + SD_DBG_PWD_LOW_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sd_dbg_pwd_low(&mut self) -> SD_DBG_PWD_LOW_W { - SD_DBG_PWD_LOW_W { w: self } + #[must_use] + pub fn sd_dbg_pwd_low(&mut self) -> SD_DBG_PWD_LOW_W<0> { + SD_DBG_PWD_LOW_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SD_DBG_PWD_LOW_SPEC { #[doc = "`write(|w| ..)` method takes [sd_dbg_pwd_low::W](W) writer structure"] impl crate::Writable for SD_DBG_PWD_LOW_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sd_dbg_pwd_low to value 0"] impl crate::Resettable for SD_DBG_PWD_LOW_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_dbg/sd_dbg_reserved.rs b/src/sec_dbg/sd_dbg_reserved.rs index ba21f8c..59f1fcd 100644 --- a/src/sec_dbg/sd_dbg_reserved.rs +++ b/src/sec_dbg/sd_dbg_reserved.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sd_dbg_reserved` reader - "] -pub struct SD_DBG_RESERVED_R(crate::FieldReader); -impl SD_DBG_RESERVED_R { - pub(crate) fn new(bits: u32) -> Self { - SD_DBG_RESERVED_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SD_DBG_RESERVED_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SD_DBG_RESERVED_R = crate::FieldReader; #[doc = "Field `sd_dbg_reserved` writer - "] -pub struct SD_DBG_RESERVED_W<'a> { - w: &'a mut W, -} -impl<'a> SD_DBG_RESERVED_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SD_DBG_RESERVED_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SD_DBG_RESERVED_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sd_dbg_reserved(&self) -> SD_DBG_RESERVED_R { - SD_DBG_RESERVED_R::new((self.bits & 0xffff_ffff) as u32) + SD_DBG_RESERVED_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sd_dbg_reserved(&mut self) -> SD_DBG_RESERVED_W { - SD_DBG_RESERVED_W { w: self } + #[must_use] + pub fn sd_dbg_reserved(&mut self) -> SD_DBG_RESERVED_W<0> { + SD_DBG_RESERVED_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SD_DBG_RESERVED_SPEC { #[doc = "`write(|w| ..)` method takes [sd_dbg_reserved::W](W) writer structure"] impl crate::Writable for SD_DBG_RESERVED_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sd_dbg_reserved to value 0"] impl crate::Resettable for SD_DBG_RESERVED_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_dbg/sd_status.rs b/src/sec_dbg/sd_status.rs index 3ddddaa..e6c52db 100644 --- a/src/sec_dbg/sd_status.rs +++ b/src/sec_dbg/sd_status.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,229 +28,90 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `sd_dbg_ena` reader - "] -pub struct SD_DBG_ENA_R(crate::FieldReader); -impl SD_DBG_ENA_R { - pub(crate) fn new(bits: u8) -> Self { - SD_DBG_ENA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SD_DBG_ENA_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sd_dbg_mode` reader - "] -pub struct SD_DBG_MODE_R(crate::FieldReader); -impl SD_DBG_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - SD_DBG_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SD_DBG_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sd_dbg_pwd_cnt` reader - "] -pub struct SD_DBG_PWD_CNT_R(crate::FieldReader); -impl SD_DBG_PWD_CNT_R { - pub(crate) fn new(bits: u32) -> Self { - SD_DBG_PWD_CNT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SD_DBG_PWD_CNT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sd_dbg_cci_clk_sel` reader - "] -pub struct SD_DBG_CCI_CLK_SEL_R(crate::FieldReader); -impl SD_DBG_CCI_CLK_SEL_R { - pub(crate) fn new(bits: bool) -> Self { - SD_DBG_CCI_CLK_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SD_DBG_CCI_CLK_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sd_dbg_cci_clk_sel` writer - "] -pub struct SD_DBG_CCI_CLK_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SD_DBG_CCI_CLK_SEL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `sd_dbg_cci_read_en` reader - "] -pub struct SD_DBG_CCI_READ_EN_R(crate::FieldReader); -impl SD_DBG_CCI_READ_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SD_DBG_CCI_READ_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SD_DBG_CCI_READ_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sd_dbg_cci_read_en` writer - "] -pub struct SD_DBG_CCI_READ_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SD_DBG_CCI_READ_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} +#[doc = "Field `sd_dbg_pwd_busy` reader - "] +pub type SD_DBG_PWD_BUSY_R = crate::BitReader; #[doc = "Field `sd_dbg_pwd_trig` reader - "] -pub struct SD_DBG_PWD_TRIG_R(crate::FieldReader); -impl SD_DBG_PWD_TRIG_R { - pub(crate) fn new(bits: bool) -> Self { - SD_DBG_PWD_TRIG_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SD_DBG_PWD_TRIG_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SD_DBG_PWD_TRIG_R = crate::BitReader; #[doc = "Field `sd_dbg_pwd_trig` writer - "] -pub struct SD_DBG_PWD_TRIG_W<'a> { - w: &'a mut W, -} -impl<'a> SD_DBG_PWD_TRIG_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} -#[doc = "Field `sd_dbg_pwd_busy` reader - "] -pub struct SD_DBG_PWD_BUSY_R(crate::FieldReader); -impl SD_DBG_PWD_BUSY_R { - pub(crate) fn new(bits: bool) -> Self { - SD_DBG_PWD_BUSY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SD_DBG_PWD_BUSY_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SD_DBG_PWD_TRIG_W<'a, const O: u8> = crate::BitWriter<'a, u32, SD_STATUS_SPEC, bool, O>; +#[doc = "Field `sd_dbg_cci_read_en` reader - "] +pub type SD_DBG_CCI_READ_EN_R = crate::BitReader; +#[doc = "Field `sd_dbg_cci_read_en` writer - "] +pub type SD_DBG_CCI_READ_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SD_STATUS_SPEC, bool, O>; +#[doc = "Field `sd_dbg_cci_clk_sel` reader - "] +pub type SD_DBG_CCI_CLK_SEL_R = crate::BitReader; +#[doc = "Field `sd_dbg_cci_clk_sel` writer - "] +pub type SD_DBG_CCI_CLK_SEL_W<'a, const O: u8> = crate::BitWriter<'a, u32, SD_STATUS_SPEC, bool, O>; +#[doc = "Field `sd_dbg_pwd_cnt` reader - "] +pub type SD_DBG_PWD_CNT_R = crate::FieldReader; +#[doc = "Field `sd_dbg_mode` reader - "] +pub type SD_DBG_MODE_R = crate::FieldReader; +#[doc = "Field `sd_dbg_ena` reader - "] +pub type SD_DBG_ENA_R = crate::FieldReader; impl R { - #[doc = "Bits 28:31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn sd_dbg_ena(&self) -> SD_DBG_ENA_R { - SD_DBG_ENA_R::new(((self.bits >> 28) & 0x0f) as u8) + pub fn sd_dbg_pwd_busy(&self) -> SD_DBG_PWD_BUSY_R { + SD_DBG_PWD_BUSY_R::new((self.bits & 1) != 0) } - #[doc = "Bits 24:27"] + #[doc = "Bit 1"] #[inline(always)] - pub fn sd_dbg_mode(&self) -> SD_DBG_MODE_R { - SD_DBG_MODE_R::new(((self.bits >> 24) & 0x0f) as u8) + pub fn sd_dbg_pwd_trig(&self) -> SD_DBG_PWD_TRIG_R { + SD_DBG_PWD_TRIG_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bits 4:23"] + #[doc = "Bit 2"] #[inline(always)] - pub fn sd_dbg_pwd_cnt(&self) -> SD_DBG_PWD_CNT_R { - SD_DBG_PWD_CNT_R::new(((self.bits >> 4) & 0x000f_ffff) as u32) + pub fn sd_dbg_cci_read_en(&self) -> SD_DBG_CCI_READ_EN_R { + SD_DBG_CCI_READ_EN_R::new(((self.bits >> 2) & 1) != 0) } #[doc = "Bit 3"] #[inline(always)] pub fn sd_dbg_cci_clk_sel(&self) -> SD_DBG_CCI_CLK_SEL_R { - SD_DBG_CCI_CLK_SEL_R::new(((self.bits >> 3) & 0x01) != 0) + SD_DBG_CCI_CLK_SEL_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bits 4:23"] #[inline(always)] - pub fn sd_dbg_cci_read_en(&self) -> SD_DBG_CCI_READ_EN_R { - SD_DBG_CCI_READ_EN_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn sd_dbg_pwd_cnt(&self) -> SD_DBG_PWD_CNT_R { + SD_DBG_PWD_CNT_R::new((self.bits >> 4) & 0x000f_ffff) } - #[doc = "Bit 1"] + #[doc = "Bits 24:27"] #[inline(always)] - pub fn sd_dbg_pwd_trig(&self) -> SD_DBG_PWD_TRIG_R { - SD_DBG_PWD_TRIG_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn sd_dbg_mode(&self) -> SD_DBG_MODE_R { + SD_DBG_MODE_R::new(((self.bits >> 24) & 0x0f) as u8) } - #[doc = "Bit 0"] + #[doc = "Bits 28:31"] #[inline(always)] - pub fn sd_dbg_pwd_busy(&self) -> SD_DBG_PWD_BUSY_R { - SD_DBG_PWD_BUSY_R::new((self.bits & 0x01) != 0) + pub fn sd_dbg_ena(&self) -> SD_DBG_ENA_R { + SD_DBG_ENA_R::new(((self.bits >> 28) & 0x0f) as u8) } } impl W { - #[doc = "Bit 3"] + #[doc = "Bit 1"] #[inline(always)] - pub fn sd_dbg_cci_clk_sel(&mut self) -> SD_DBG_CCI_CLK_SEL_W { - SD_DBG_CCI_CLK_SEL_W { w: self } + #[must_use] + pub fn sd_dbg_pwd_trig(&mut self) -> SD_DBG_PWD_TRIG_W<1> { + SD_DBG_PWD_TRIG_W::new(self) } #[doc = "Bit 2"] #[inline(always)] - pub fn sd_dbg_cci_read_en(&mut self) -> SD_DBG_CCI_READ_EN_W { - SD_DBG_CCI_READ_EN_W { w: self } + #[must_use] + pub fn sd_dbg_cci_read_en(&mut self) -> SD_DBG_CCI_READ_EN_W<2> { + SD_DBG_CCI_READ_EN_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 3"] #[inline(always)] - pub fn sd_dbg_pwd_trig(&mut self) -> SD_DBG_PWD_TRIG_W { - SD_DBG_PWD_TRIG_W { w: self } + #[must_use] + pub fn sd_dbg_cci_clk_sel(&mut self) -> SD_DBG_CCI_CLK_SEL_W<3> { + SD_DBG_CCI_CLK_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -267,11 +129,10 @@ impl crate::Readable for SD_STATUS_SPEC { #[doc = "`write(|w| ..)` method takes [sd_status::W](W) writer structure"] impl crate::Writable for SD_STATUS_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sd_status to value 0"] impl crate::Resettable for SD_STATUS_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_dbg/sd_wifi_mac_high.rs b/src/sec_dbg/sd_wifi_mac_high.rs index 3a94e87..193edaf 100644 --- a/src/sec_dbg/sd_wifi_mac_high.rs +++ b/src/sec_dbg/sd_wifi_mac_high.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `sd_wifi_mac_high` reader - "] -pub struct SD_WIFI_MAC_HIGH_R(crate::FieldReader); -impl SD_WIFI_MAC_HIGH_R { - pub(crate) fn new(bits: u32) -> Self { - SD_WIFI_MAC_HIGH_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SD_WIFI_MAC_HIGH_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SD_WIFI_MAC_HIGH_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sd_wifi_mac_high(&self) -> SD_WIFI_MAC_HIGH_R { - SD_WIFI_MAC_HIGH_R::new((self.bits & 0xffff_ffff) as u32) + SD_WIFI_MAC_HIGH_R::new(self.bits) } } #[doc = "sd_wifi_mac_high.\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 [sd_wifi_mac_high](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SD_WIFI_MAC_HIGH_SPEC { } #[doc = "`reset()` method sets sd_wifi_mac_high to value 0"] impl crate::Resettable for SD_WIFI_MAC_HIGH_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_dbg/sd_wifi_mac_low.rs b/src/sec_dbg/sd_wifi_mac_low.rs index c5e42d5..aa56a6a 100644 --- a/src/sec_dbg/sd_wifi_mac_low.rs +++ b/src/sec_dbg/sd_wifi_mac_low.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `sd_wifi_mac_low` reader - "] -pub struct SD_WIFI_MAC_LOW_R(crate::FieldReader); -impl SD_WIFI_MAC_LOW_R { - pub(crate) fn new(bits: u32) -> Self { - SD_WIFI_MAC_LOW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SD_WIFI_MAC_LOW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SD_WIFI_MAC_LOW_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sd_wifi_mac_low(&self) -> SD_WIFI_MAC_LOW_R { - SD_WIFI_MAC_LOW_R::new((self.bits & 0xffff_ffff) as u32) + SD_WIFI_MAC_LOW_R::new(self.bits) } } #[doc = "sd_wifi_mac_low.\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 [sd_wifi_mac_low](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SD_WIFI_MAC_LOW_SPEC { } #[doc = "`reset()` method sets sd_wifi_mac_low to value 0"] impl crate::Resettable for SD_WIFI_MAC_LOW_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng.rs b/src/sec_eng.rs index 651f419..2828f27 100644 --- a/src/sec_eng.rs +++ b/src/sec_eng.rs @@ -2,494 +2,494 @@ #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - se_sha_0_ctrl."] - pub se_sha_0_ctrl: crate::Reg, + pub se_sha_0_ctrl: SE_SHA_0_CTRL, #[doc = "0x04 - se_sha_0_msa."] - pub se_sha_0_msa: crate::Reg, + pub se_sha_0_msa: SE_SHA_0_MSA, #[doc = "0x08 - se_sha_0_status."] - pub se_sha_0_status: crate::Reg, + pub se_sha_0_status: SE_SHA_0_STATUS, #[doc = "0x0c - se_sha_0_endian."] - pub se_sha_0_endian: crate::Reg, + pub se_sha_0_endian: SE_SHA_0_ENDIAN, #[doc = "0x10 - se_sha_0_hash_l_0."] - pub se_sha_0_hash_l_0: crate::Reg, + pub se_sha_0_hash_l_0: SE_SHA_0_HASH_L_0, #[doc = "0x14 - se_sha_0_hash_l_1."] - pub se_sha_0_hash_l_1: crate::Reg, + pub se_sha_0_hash_l_1: SE_SHA_0_HASH_L_1, #[doc = "0x18 - se_sha_0_hash_l_2."] - pub se_sha_0_hash_l_2: crate::Reg, + pub se_sha_0_hash_l_2: SE_SHA_0_HASH_L_2, #[doc = "0x1c - se_sha_0_hash_l_3."] - pub se_sha_0_hash_l_3: crate::Reg, + pub se_sha_0_hash_l_3: SE_SHA_0_HASH_L_3, #[doc = "0x20 - se_sha_0_hash_l_4."] - pub se_sha_0_hash_l_4: crate::Reg, + pub se_sha_0_hash_l_4: SE_SHA_0_HASH_L_4, #[doc = "0x24 - se_sha_0_hash_l_5."] - pub se_sha_0_hash_l_5: crate::Reg, + pub se_sha_0_hash_l_5: SE_SHA_0_HASH_L_5, #[doc = "0x28 - se_sha_0_hash_l_6."] - pub se_sha_0_hash_l_6: crate::Reg, + pub se_sha_0_hash_l_6: SE_SHA_0_HASH_L_6, #[doc = "0x2c - se_sha_0_hash_l_7."] - pub se_sha_0_hash_l_7: crate::Reg, + pub se_sha_0_hash_l_7: SE_SHA_0_HASH_L_7, #[doc = "0x30 - se_sha_0_hash_h_0."] - pub se_sha_0_hash_h_0: crate::Reg, + pub se_sha_0_hash_h_0: SE_SHA_0_HASH_H_0, #[doc = "0x34 - se_sha_0_hash_h_1."] - pub se_sha_0_hash_h_1: crate::Reg, + pub se_sha_0_hash_h_1: SE_SHA_0_HASH_H_1, #[doc = "0x38 - se_sha_0_hash_h_2."] - pub se_sha_0_hash_h_2: crate::Reg, + pub se_sha_0_hash_h_2: SE_SHA_0_HASH_H_2, #[doc = "0x3c - se_sha_0_hash_h_3."] - pub se_sha_0_hash_h_3: crate::Reg, + pub se_sha_0_hash_h_3: SE_SHA_0_HASH_H_3, #[doc = "0x40 - se_sha_0_hash_h_4."] - pub se_sha_0_hash_h_4: crate::Reg, + pub se_sha_0_hash_h_4: SE_SHA_0_HASH_H_4, #[doc = "0x44 - se_sha_0_hash_h_5."] - pub se_sha_0_hash_h_5: crate::Reg, + pub se_sha_0_hash_h_5: SE_SHA_0_HASH_H_5, #[doc = "0x48 - se_sha_0_hash_h_6."] - pub se_sha_0_hash_h_6: crate::Reg, + pub se_sha_0_hash_h_6: SE_SHA_0_HASH_H_6, #[doc = "0x4c - se_sha_0_hash_h_7."] - pub se_sha_0_hash_h_7: crate::Reg, + pub se_sha_0_hash_h_7: SE_SHA_0_HASH_H_7, #[doc = "0x50 - se_sha_0_link."] - pub se_sha_0_link: crate::Reg, - _reserved21: [u8; 168usize], + pub se_sha_0_link: SE_SHA_0_LINK, + _reserved21: [u8; 0xa8], #[doc = "0xfc - se_sha_0_ctrl_prot."] - pub se_sha_0_ctrl_prot: crate::Reg, + pub se_sha_0_ctrl_prot: SE_SHA_0_CTRL_PROT, #[doc = "0x100 - se_aes_0_ctrl."] - pub se_aes_0_ctrl: crate::Reg, + pub se_aes_0_ctrl: SE_AES_0_CTRL, #[doc = "0x104 - se_aes_0_msa."] - pub se_aes_0_msa: crate::Reg, + pub se_aes_0_msa: SE_AES_0_MSA, #[doc = "0x108 - se_aes_0_mda."] - pub se_aes_0_mda: crate::Reg, + pub se_aes_0_mda: SE_AES_0_MDA, #[doc = "0x10c - se_aes_0_status."] - pub se_aes_0_status: crate::Reg, + pub se_aes_0_status: SE_AES_0_STATUS, #[doc = "0x110 - se_aes_0_iv_0."] - pub se_aes_0_iv_0: crate::Reg, + pub se_aes_0_iv_0: SE_AES_0_IV_0, #[doc = "0x114 - se_aes_0_iv_1."] - pub se_aes_0_iv_1: crate::Reg, + pub se_aes_0_iv_1: SE_AES_0_IV_1, #[doc = "0x118 - se_aes_0_iv_2."] - pub se_aes_0_iv_2: crate::Reg, + pub se_aes_0_iv_2: SE_AES_0_IV_2, #[doc = "0x11c - se_aes_0_iv_3."] - pub se_aes_0_iv_3: crate::Reg, + pub se_aes_0_iv_3: SE_AES_0_IV_3, #[doc = "0x120 - se_aes_0_key_0."] - pub se_aes_0_key_0: crate::Reg, + pub se_aes_0_key_0: SE_AES_0_KEY_0, #[doc = "0x124 - se_aes_0_key_1."] - pub se_aes_0_key_1: crate::Reg, + pub se_aes_0_key_1: SE_AES_0_KEY_1, #[doc = "0x128 - se_aes_0_key_2."] - pub se_aes_0_key_2: crate::Reg, + pub se_aes_0_key_2: SE_AES_0_KEY_2, #[doc = "0x12c - se_aes_0_key_3."] - pub se_aes_0_key_3: crate::Reg, + pub se_aes_0_key_3: SE_AES_0_KEY_3, #[doc = "0x130 - se_aes_0_key_4."] - pub se_aes_0_key_4: crate::Reg, + pub se_aes_0_key_4: SE_AES_0_KEY_4, #[doc = "0x134 - se_aes_0_key_5."] - pub se_aes_0_key_5: crate::Reg, + pub se_aes_0_key_5: SE_AES_0_KEY_5, #[doc = "0x138 - se_aes_0_key_6."] - pub se_aes_0_key_6: crate::Reg, + pub se_aes_0_key_6: SE_AES_0_KEY_6, #[doc = "0x13c - se_aes_0_key_7."] - pub se_aes_0_key_7: crate::Reg, + pub se_aes_0_key_7: SE_AES_0_KEY_7, #[doc = "0x140 - se_aes_0_key_sel_0."] - pub se_aes_0_key_sel_0: crate::Reg, + pub se_aes_0_key_sel_0: SE_AES_0_KEY_SEL_0, #[doc = "0x144 - se_aes_0_key_sel_1."] - pub se_aes_0_key_sel_1: crate::Reg, + pub se_aes_0_key_sel_1: SE_AES_0_KEY_SEL_1, #[doc = "0x148 - se_aes_0_endian."] - pub se_aes_0_endian: crate::Reg, + pub se_aes_0_endian: SE_AES_0_ENDIAN, #[doc = "0x14c - se_aes_0_sboot."] - pub se_aes_0_sboot: crate::Reg, + pub se_aes_0_sboot: SE_AES_0_SBOOT, #[doc = "0x150 - se_aes_0_link."] - pub se_aes_0_link: crate::Reg, - _reserved43: [u8; 168usize], + pub se_aes_0_link: SE_AES_0_LINK, + _reserved43: [u8; 0xa8], #[doc = "0x1fc - se_aes_0_ctrl_prot."] - pub se_aes_0_ctrl_prot: crate::Reg, + pub se_aes_0_ctrl_prot: SE_AES_0_CTRL_PROT, #[doc = "0x200 - se_trng_0_ctrl_0."] - pub se_trng_0_ctrl_0: crate::Reg, + pub se_trng_0_ctrl_0: SE_TRNG_0_CTRL_0, #[doc = "0x204 - se_trng_0_status."] - pub se_trng_0_status: crate::Reg, + pub se_trng_0_status: SE_TRNG_0_STATUS, #[doc = "0x208 - se_trng_0_dout_0."] - pub se_trng_0_dout_0: crate::Reg, + pub se_trng_0_dout_0: SE_TRNG_0_DOUT_0, #[doc = "0x20c - se_trng_0_dout_1."] - pub se_trng_0_dout_1: crate::Reg, + pub se_trng_0_dout_1: SE_TRNG_0_DOUT_1, #[doc = "0x210 - se_trng_0_dout_2."] - pub se_trng_0_dout_2: crate::Reg, + pub se_trng_0_dout_2: SE_TRNG_0_DOUT_2, #[doc = "0x214 - se_trng_0_dout_3."] - pub se_trng_0_dout_3: crate::Reg, + pub se_trng_0_dout_3: SE_TRNG_0_DOUT_3, #[doc = "0x218 - se_trng_0_dout_4."] - pub se_trng_0_dout_4: crate::Reg, + pub se_trng_0_dout_4: SE_TRNG_0_DOUT_4, #[doc = "0x21c - se_trng_0_dout_5."] - pub se_trng_0_dout_5: crate::Reg, + pub se_trng_0_dout_5: SE_TRNG_0_DOUT_5, #[doc = "0x220 - se_trng_0_dout_6."] - pub se_trng_0_dout_6: crate::Reg, + pub se_trng_0_dout_6: SE_TRNG_0_DOUT_6, #[doc = "0x224 - se_trng_0_dout_7."] - pub se_trng_0_dout_7: crate::Reg, + pub se_trng_0_dout_7: SE_TRNG_0_DOUT_7, #[doc = "0x228 - se_trng_0_test."] - pub se_trng_0_test: crate::Reg, + pub se_trng_0_test: SE_TRNG_0_TEST, #[doc = "0x22c - se_trng_0_ctrl_1."] - pub se_trng_0_ctrl_1: crate::Reg, + pub se_trng_0_ctrl_1: SE_TRNG_0_CTRL_1, #[doc = "0x230 - se_trng_0_ctrl_2."] - pub se_trng_0_ctrl_2: crate::Reg, + pub se_trng_0_ctrl_2: SE_TRNG_0_CTRL_2, #[doc = "0x234 - se_trng_0_ctrl_3."] - pub se_trng_0_ctrl_3: crate::Reg, - _reserved58: [u8; 8usize], + pub se_trng_0_ctrl_3: SE_TRNG_0_CTRL_3, + _reserved58: [u8; 0x08], #[doc = "0x240 - se_trng_0_test_out_0."] - pub se_trng_0_test_out_0: crate::Reg, + pub se_trng_0_test_out_0: SE_TRNG_0_TEST_OUT_0, #[doc = "0x244 - se_trng_0_test_out_1."] - pub se_trng_0_test_out_1: crate::Reg, + pub se_trng_0_test_out_1: SE_TRNG_0_TEST_OUT_1, #[doc = "0x248 - se_trng_0_test_out_2."] - pub se_trng_0_test_out_2: crate::Reg, + pub se_trng_0_test_out_2: SE_TRNG_0_TEST_OUT_2, #[doc = "0x24c - se_trng_0_test_out_3."] - pub se_trng_0_test_out_3: crate::Reg, - _reserved62: [u8; 172usize], + pub se_trng_0_test_out_3: SE_TRNG_0_TEST_OUT_3, + _reserved62: [u8; 0xac], #[doc = "0x2fc - se_trng_0_ctrl_prot."] - pub se_trng_0_ctrl_prot: crate::Reg, + pub se_trng_0_ctrl_prot: SE_TRNG_0_CTRL_PROT, #[doc = "0x300 - se_pka_0_ctrl_0."] - pub se_pka_0_ctrl_0: crate::Reg, - _reserved64: [u8; 8usize], + pub se_pka_0_ctrl_0: SE_PKA_0_CTRL_0, + _reserved64: [u8; 0x08], #[doc = "0x30c - se_pka_0_seed."] - pub se_pka_0_seed: crate::Reg, + pub se_pka_0_seed: SE_PKA_0_SEED, #[doc = "0x310 - se_pka_0_ctrl_1."] - pub se_pka_0_ctrl_1: crate::Reg, - _reserved66: [u8; 44usize], + pub se_pka_0_ctrl_1: SE_PKA_0_CTRL_1, + _reserved66: [u8; 0x2c], #[doc = "0x340 - se_pka_0_rw."] - pub se_pka_0_rw: crate::Reg, - _reserved67: [u8; 28usize], + pub se_pka_0_rw: SE_PKA_0_RW, + _reserved67: [u8; 0x1c], #[doc = "0x360 - se_pka_0_rw_burst."] - pub se_pka_0_rw_burst: crate::Reg, - _reserved68: [u8; 152usize], + pub se_pka_0_rw_burst: SE_PKA_0_RW_BURST, + _reserved68: [u8; 0x98], #[doc = "0x3fc - se_pka_0_ctrl_prot."] - pub se_pka_0_ctrl_prot: crate::Reg, + pub se_pka_0_ctrl_prot: SE_PKA_0_CTRL_PROT, #[doc = "0x400 - se_cdet_0_ctrl_0."] - pub se_cdet_0_ctrl_0: crate::Reg, + pub se_cdet_0_ctrl_0: SE_CDET_0_CTRL_0, #[doc = "0x404 - se_cdet_0_ctrl_1."] - pub se_cdet_0_ctrl_1: crate::Reg, - _reserved71: [u8; 244usize], + pub se_cdet_0_ctrl_1: SE_CDET_0_CTRL_1, + _reserved71: [u8; 0xf4], #[doc = "0x4fc - se_cdet_0_ctrl_prot."] - pub se_cdet_0_ctrl_prot: crate::Reg, + pub se_cdet_0_ctrl_prot: SE_CDET_0_CTRL_PROT, #[doc = "0x500 - se_gmac_0_ctrl_0."] - pub se_gmac_0_ctrl_0: crate::Reg, + pub se_gmac_0_ctrl_0: SE_GMAC_0_CTRL_0, #[doc = "0x504 - se_gmac_0_lca."] - pub se_gmac_0_lca: crate::Reg, + pub se_gmac_0_lca: SE_GMAC_0_LCA, #[doc = "0x508 - se_gmac_0_status."] - pub se_gmac_0_status: crate::Reg, - _reserved75: [u8; 240usize], + pub se_gmac_0_status: SE_GMAC_0_STATUS, + _reserved75: [u8; 0xf0], #[doc = "0x5fc - se_gmac_0_ctrl_prot."] - pub se_gmac_0_ctrl_prot: crate::Reg, - _reserved76: [u8; 2304usize], + pub se_gmac_0_ctrl_prot: SE_GMAC_0_CTRL_PROT, + _reserved76: [u8; 0x0900], #[doc = "0xf00 - se_ctrl_prot_rd."] - pub se_ctrl_prot_rd: crate::Reg, + pub se_ctrl_prot_rd: SE_CTRL_PROT_RD, #[doc = "0xf04 - se_ctrl_reserved_0."] - pub se_ctrl_reserved_0: crate::Reg, + pub se_ctrl_reserved_0: SE_CTRL_RESERVED_0, #[doc = "0xf08 - se_ctrl_reserved_1."] - pub se_ctrl_reserved_1: crate::Reg, + pub se_ctrl_reserved_1: SE_CTRL_RESERVED_1, #[doc = "0xf0c - se_ctrl_reserved_2."] - pub se_ctrl_reserved_2: crate::Reg, + pub se_ctrl_reserved_2: SE_CTRL_RESERVED_2, } -#[doc = "se_sha_0_ctrl register accessor: an alias for `Reg`"] +#[doc = "se_sha_0_ctrl (rw) register accessor: an alias for `Reg`"] pub type SE_SHA_0_CTRL = crate::Reg; #[doc = "se_sha_0_ctrl."] pub mod se_sha_0_ctrl; -#[doc = "se_sha_0_msa register accessor: an alias for `Reg`"] +#[doc = "se_sha_0_msa (rw) register accessor: an alias for `Reg`"] pub type SE_SHA_0_MSA = crate::Reg; #[doc = "se_sha_0_msa."] pub mod se_sha_0_msa; -#[doc = "se_sha_0_status register accessor: an alias for `Reg`"] +#[doc = "se_sha_0_status (r) register accessor: an alias for `Reg`"] pub type SE_SHA_0_STATUS = crate::Reg; #[doc = "se_sha_0_status."] pub mod se_sha_0_status; -#[doc = "se_sha_0_endian register accessor: an alias for `Reg`"] +#[doc = "se_sha_0_endian (rw) register accessor: an alias for `Reg`"] pub type SE_SHA_0_ENDIAN = crate::Reg; #[doc = "se_sha_0_endian."] pub mod se_sha_0_endian; -#[doc = "se_sha_0_hash_l_0 register accessor: an alias for `Reg`"] +#[doc = "se_sha_0_hash_l_0 (r) register accessor: an alias for `Reg`"] pub type SE_SHA_0_HASH_L_0 = crate::Reg; #[doc = "se_sha_0_hash_l_0."] pub mod se_sha_0_hash_l_0; -#[doc = "se_sha_0_hash_l_1 register accessor: an alias for `Reg`"] +#[doc = "se_sha_0_hash_l_1 (r) register accessor: an alias for `Reg`"] pub type SE_SHA_0_HASH_L_1 = crate::Reg; #[doc = "se_sha_0_hash_l_1."] pub mod se_sha_0_hash_l_1; -#[doc = "se_sha_0_hash_l_2 register accessor: an alias for `Reg`"] +#[doc = "se_sha_0_hash_l_2 (r) register accessor: an alias for `Reg`"] pub type SE_SHA_0_HASH_L_2 = crate::Reg; #[doc = "se_sha_0_hash_l_2."] pub mod se_sha_0_hash_l_2; -#[doc = "se_sha_0_hash_l_3 register accessor: an alias for `Reg`"] +#[doc = "se_sha_0_hash_l_3 (r) register accessor: an alias for `Reg`"] pub type SE_SHA_0_HASH_L_3 = crate::Reg; #[doc = "se_sha_0_hash_l_3."] pub mod se_sha_0_hash_l_3; -#[doc = "se_sha_0_hash_l_4 register accessor: an alias for `Reg`"] +#[doc = "se_sha_0_hash_l_4 (r) register accessor: an alias for `Reg`"] pub type SE_SHA_0_HASH_L_4 = crate::Reg; #[doc = "se_sha_0_hash_l_4."] pub mod se_sha_0_hash_l_4; -#[doc = "se_sha_0_hash_l_5 register accessor: an alias for `Reg`"] +#[doc = "se_sha_0_hash_l_5 (r) register accessor: an alias for `Reg`"] pub type SE_SHA_0_HASH_L_5 = crate::Reg; #[doc = "se_sha_0_hash_l_5."] pub mod se_sha_0_hash_l_5; -#[doc = "se_sha_0_hash_l_6 register accessor: an alias for `Reg`"] +#[doc = "se_sha_0_hash_l_6 (r) register accessor: an alias for `Reg`"] pub type SE_SHA_0_HASH_L_6 = crate::Reg; #[doc = "se_sha_0_hash_l_6."] pub mod se_sha_0_hash_l_6; -#[doc = "se_sha_0_hash_l_7 register accessor: an alias for `Reg`"] +#[doc = "se_sha_0_hash_l_7 (r) register accessor: an alias for `Reg`"] pub type SE_SHA_0_HASH_L_7 = crate::Reg; #[doc = "se_sha_0_hash_l_7."] pub mod se_sha_0_hash_l_7; -#[doc = "se_sha_0_hash_h_0 register accessor: an alias for `Reg`"] +#[doc = "se_sha_0_hash_h_0 (r) register accessor: an alias for `Reg`"] pub type SE_SHA_0_HASH_H_0 = crate::Reg; #[doc = "se_sha_0_hash_h_0."] pub mod se_sha_0_hash_h_0; -#[doc = "se_sha_0_hash_h_1 register accessor: an alias for `Reg`"] +#[doc = "se_sha_0_hash_h_1 (r) register accessor: an alias for `Reg`"] pub type SE_SHA_0_HASH_H_1 = crate::Reg; #[doc = "se_sha_0_hash_h_1."] pub mod se_sha_0_hash_h_1; -#[doc = "se_sha_0_hash_h_2 register accessor: an alias for `Reg`"] +#[doc = "se_sha_0_hash_h_2 (r) register accessor: an alias for `Reg`"] pub type SE_SHA_0_HASH_H_2 = crate::Reg; #[doc = "se_sha_0_hash_h_2."] pub mod se_sha_0_hash_h_2; -#[doc = "se_sha_0_hash_h_3 register accessor: an alias for `Reg`"] +#[doc = "se_sha_0_hash_h_3 (r) register accessor: an alias for `Reg`"] pub type SE_SHA_0_HASH_H_3 = crate::Reg; #[doc = "se_sha_0_hash_h_3."] pub mod se_sha_0_hash_h_3; -#[doc = "se_sha_0_hash_h_4 register accessor: an alias for `Reg`"] +#[doc = "se_sha_0_hash_h_4 (r) register accessor: an alias for `Reg`"] pub type SE_SHA_0_HASH_H_4 = crate::Reg; #[doc = "se_sha_0_hash_h_4."] pub mod se_sha_0_hash_h_4; -#[doc = "se_sha_0_hash_h_5 register accessor: an alias for `Reg`"] +#[doc = "se_sha_0_hash_h_5 (r) register accessor: an alias for `Reg`"] pub type SE_SHA_0_HASH_H_5 = crate::Reg; #[doc = "se_sha_0_hash_h_5."] pub mod se_sha_0_hash_h_5; -#[doc = "se_sha_0_hash_h_6 register accessor: an alias for `Reg`"] +#[doc = "se_sha_0_hash_h_6 (r) register accessor: an alias for `Reg`"] pub type SE_SHA_0_HASH_H_6 = crate::Reg; #[doc = "se_sha_0_hash_h_6."] pub mod se_sha_0_hash_h_6; -#[doc = "se_sha_0_hash_h_7 register accessor: an alias for `Reg`"] +#[doc = "se_sha_0_hash_h_7 (r) register accessor: an alias for `Reg`"] pub type SE_SHA_0_HASH_H_7 = crate::Reg; #[doc = "se_sha_0_hash_h_7."] pub mod se_sha_0_hash_h_7; -#[doc = "se_sha_0_link register accessor: an alias for `Reg`"] +#[doc = "se_sha_0_link (rw) register accessor: an alias for `Reg`"] pub type SE_SHA_0_LINK = crate::Reg; #[doc = "se_sha_0_link."] pub mod se_sha_0_link; -#[doc = "se_sha_0_ctrl_prot register accessor: an alias for `Reg`"] +#[doc = "se_sha_0_ctrl_prot (rw) register accessor: an alias for `Reg`"] pub type SE_SHA_0_CTRL_PROT = crate::Reg; #[doc = "se_sha_0_ctrl_prot."] pub mod se_sha_0_ctrl_prot; -#[doc = "se_aes_0_ctrl register accessor: an alias for `Reg`"] +#[doc = "se_aes_0_ctrl (rw) register accessor: an alias for `Reg`"] pub type SE_AES_0_CTRL = crate::Reg; #[doc = "se_aes_0_ctrl."] pub mod se_aes_0_ctrl; -#[doc = "se_aes_0_msa register accessor: an alias for `Reg`"] +#[doc = "se_aes_0_msa (rw) register accessor: an alias for `Reg`"] pub type SE_AES_0_MSA = crate::Reg; #[doc = "se_aes_0_msa."] pub mod se_aes_0_msa; -#[doc = "se_aes_0_mda register accessor: an alias for `Reg`"] +#[doc = "se_aes_0_mda (rw) register accessor: an alias for `Reg`"] pub type SE_AES_0_MDA = crate::Reg; #[doc = "se_aes_0_mda."] pub mod se_aes_0_mda; -#[doc = "se_aes_0_status register accessor: an alias for `Reg`"] +#[doc = "se_aes_0_status (r) register accessor: an alias for `Reg`"] pub type SE_AES_0_STATUS = crate::Reg; #[doc = "se_aes_0_status."] pub mod se_aes_0_status; -#[doc = "se_aes_0_iv_0 register accessor: an alias for `Reg`"] +#[doc = "se_aes_0_iv_0 (rw) register accessor: an alias for `Reg`"] pub type SE_AES_0_IV_0 = crate::Reg; #[doc = "se_aes_0_iv_0."] pub mod se_aes_0_iv_0; -#[doc = "se_aes_0_iv_1 register accessor: an alias for `Reg`"] +#[doc = "se_aes_0_iv_1 (rw) register accessor: an alias for `Reg`"] pub type SE_AES_0_IV_1 = crate::Reg; #[doc = "se_aes_0_iv_1."] pub mod se_aes_0_iv_1; -#[doc = "se_aes_0_iv_2 register accessor: an alias for `Reg`"] +#[doc = "se_aes_0_iv_2 (rw) register accessor: an alias for `Reg`"] pub type SE_AES_0_IV_2 = crate::Reg; #[doc = "se_aes_0_iv_2."] pub mod se_aes_0_iv_2; -#[doc = "se_aes_0_iv_3 register accessor: an alias for `Reg`"] +#[doc = "se_aes_0_iv_3 (rw) register accessor: an alias for `Reg`"] pub type SE_AES_0_IV_3 = crate::Reg; #[doc = "se_aes_0_iv_3."] pub mod se_aes_0_iv_3; -#[doc = "se_aes_0_key_0 register accessor: an alias for `Reg`"] +#[doc = "se_aes_0_key_0 (rw) register accessor: an alias for `Reg`"] pub type SE_AES_0_KEY_0 = crate::Reg; #[doc = "se_aes_0_key_0."] pub mod se_aes_0_key_0; -#[doc = "se_aes_0_key_1 register accessor: an alias for `Reg`"] +#[doc = "se_aes_0_key_1 (rw) register accessor: an alias for `Reg`"] pub type SE_AES_0_KEY_1 = crate::Reg; #[doc = "se_aes_0_key_1."] pub mod se_aes_0_key_1; -#[doc = "se_aes_0_key_2 register accessor: an alias for `Reg`"] +#[doc = "se_aes_0_key_2 (rw) register accessor: an alias for `Reg`"] pub type SE_AES_0_KEY_2 = crate::Reg; #[doc = "se_aes_0_key_2."] pub mod se_aes_0_key_2; -#[doc = "se_aes_0_key_3 register accessor: an alias for `Reg`"] +#[doc = "se_aes_0_key_3 (rw) register accessor: an alias for `Reg`"] pub type SE_AES_0_KEY_3 = crate::Reg; #[doc = "se_aes_0_key_3."] pub mod se_aes_0_key_3; -#[doc = "se_aes_0_key_4 register accessor: an alias for `Reg`"] +#[doc = "se_aes_0_key_4 (rw) register accessor: an alias for `Reg`"] pub type SE_AES_0_KEY_4 = crate::Reg; #[doc = "se_aes_0_key_4."] pub mod se_aes_0_key_4; -#[doc = "se_aes_0_key_5 register accessor: an alias for `Reg`"] +#[doc = "se_aes_0_key_5 (rw) register accessor: an alias for `Reg`"] pub type SE_AES_0_KEY_5 = crate::Reg; #[doc = "se_aes_0_key_5."] pub mod se_aes_0_key_5; -#[doc = "se_aes_0_key_6 register accessor: an alias for `Reg`"] +#[doc = "se_aes_0_key_6 (rw) register accessor: an alias for `Reg`"] pub type SE_AES_0_KEY_6 = crate::Reg; #[doc = "se_aes_0_key_6."] pub mod se_aes_0_key_6; -#[doc = "se_aes_0_key_7 register accessor: an alias for `Reg`"] +#[doc = "se_aes_0_key_7 (rw) register accessor: an alias for `Reg`"] pub type SE_AES_0_KEY_7 = crate::Reg; #[doc = "se_aes_0_key_7."] pub mod se_aes_0_key_7; -#[doc = "se_aes_0_key_sel_0 register accessor: an alias for `Reg`"] +#[doc = "se_aes_0_key_sel_0 (rw) register accessor: an alias for `Reg`"] pub type SE_AES_0_KEY_SEL_0 = crate::Reg; #[doc = "se_aes_0_key_sel_0."] pub mod se_aes_0_key_sel_0; -#[doc = "se_aes_0_key_sel_1 register accessor: an alias for `Reg`"] +#[doc = "se_aes_0_key_sel_1 (rw) register accessor: an alias for `Reg`"] pub type SE_AES_0_KEY_SEL_1 = crate::Reg; #[doc = "se_aes_0_key_sel_1."] pub mod se_aes_0_key_sel_1; -#[doc = "se_aes_0_endian register accessor: an alias for `Reg`"] +#[doc = "se_aes_0_endian (rw) register accessor: an alias for `Reg`"] pub type SE_AES_0_ENDIAN = crate::Reg; #[doc = "se_aes_0_endian."] pub mod se_aes_0_endian; -#[doc = "se_aes_0_sboot register accessor: an alias for `Reg`"] +#[doc = "se_aes_0_sboot (rw) register accessor: an alias for `Reg`"] pub type SE_AES_0_SBOOT = crate::Reg; #[doc = "se_aes_0_sboot."] pub mod se_aes_0_sboot; -#[doc = "se_aes_0_link register accessor: an alias for `Reg`"] +#[doc = "se_aes_0_link (rw) register accessor: an alias for `Reg`"] pub type SE_AES_0_LINK = crate::Reg; #[doc = "se_aes_0_link."] pub mod se_aes_0_link; -#[doc = "se_aes_0_ctrl_prot register accessor: an alias for `Reg`"] +#[doc = "se_aes_0_ctrl_prot (rw) register accessor: an alias for `Reg`"] pub type SE_AES_0_CTRL_PROT = crate::Reg; #[doc = "se_aes_0_ctrl_prot."] pub mod se_aes_0_ctrl_prot; -#[doc = "se_trng_0_ctrl_0 register accessor: an alias for `Reg`"] +#[doc = "se_trng_0_ctrl_0 (rw) register accessor: an alias for `Reg`"] pub type SE_TRNG_0_CTRL_0 = crate::Reg; #[doc = "se_trng_0_ctrl_0."] pub mod se_trng_0_ctrl_0; -#[doc = "se_trng_0_status register accessor: an alias for `Reg`"] +#[doc = "se_trng_0_status (r) register accessor: an alias for `Reg`"] pub type SE_TRNG_0_STATUS = crate::Reg; #[doc = "se_trng_0_status."] pub mod se_trng_0_status; -#[doc = "se_trng_0_dout_0 register accessor: an alias for `Reg`"] +#[doc = "se_trng_0_dout_0 (r) register accessor: an alias for `Reg`"] pub type SE_TRNG_0_DOUT_0 = crate::Reg; #[doc = "se_trng_0_dout_0."] pub mod se_trng_0_dout_0; -#[doc = "se_trng_0_dout_1 register accessor: an alias for `Reg`"] +#[doc = "se_trng_0_dout_1 (r) register accessor: an alias for `Reg`"] pub type SE_TRNG_0_DOUT_1 = crate::Reg; #[doc = "se_trng_0_dout_1."] pub mod se_trng_0_dout_1; -#[doc = "se_trng_0_dout_2 register accessor: an alias for `Reg`"] +#[doc = "se_trng_0_dout_2 (r) register accessor: an alias for `Reg`"] pub type SE_TRNG_0_DOUT_2 = crate::Reg; #[doc = "se_trng_0_dout_2."] pub mod se_trng_0_dout_2; -#[doc = "se_trng_0_dout_3 register accessor: an alias for `Reg`"] +#[doc = "se_trng_0_dout_3 (r) register accessor: an alias for `Reg`"] pub type SE_TRNG_0_DOUT_3 = crate::Reg; #[doc = "se_trng_0_dout_3."] pub mod se_trng_0_dout_3; -#[doc = "se_trng_0_dout_4 register accessor: an alias for `Reg`"] +#[doc = "se_trng_0_dout_4 (r) register accessor: an alias for `Reg`"] pub type SE_TRNG_0_DOUT_4 = crate::Reg; #[doc = "se_trng_0_dout_4."] pub mod se_trng_0_dout_4; -#[doc = "se_trng_0_dout_5 register accessor: an alias for `Reg`"] +#[doc = "se_trng_0_dout_5 (r) register accessor: an alias for `Reg`"] pub type SE_TRNG_0_DOUT_5 = crate::Reg; #[doc = "se_trng_0_dout_5."] pub mod se_trng_0_dout_5; -#[doc = "se_trng_0_dout_6 register accessor: an alias for `Reg`"] +#[doc = "se_trng_0_dout_6 (r) register accessor: an alias for `Reg`"] pub type SE_TRNG_0_DOUT_6 = crate::Reg; #[doc = "se_trng_0_dout_6."] pub mod se_trng_0_dout_6; -#[doc = "se_trng_0_dout_7 register accessor: an alias for `Reg`"] +#[doc = "se_trng_0_dout_7 (r) register accessor: an alias for `Reg`"] pub type SE_TRNG_0_DOUT_7 = crate::Reg; #[doc = "se_trng_0_dout_7."] pub mod se_trng_0_dout_7; -#[doc = "se_trng_0_test register accessor: an alias for `Reg`"] +#[doc = "se_trng_0_test (rw) register accessor: an alias for `Reg`"] pub type SE_TRNG_0_TEST = crate::Reg; #[doc = "se_trng_0_test."] pub mod se_trng_0_test; -#[doc = "se_trng_0_ctrl_1 register accessor: an alias for `Reg`"] +#[doc = "se_trng_0_ctrl_1 (rw) register accessor: an alias for `Reg`"] pub type SE_TRNG_0_CTRL_1 = crate::Reg; #[doc = "se_trng_0_ctrl_1."] pub mod se_trng_0_ctrl_1; -#[doc = "se_trng_0_ctrl_2 register accessor: an alias for `Reg`"] +#[doc = "se_trng_0_ctrl_2 (rw) register accessor: an alias for `Reg`"] pub type SE_TRNG_0_CTRL_2 = crate::Reg; #[doc = "se_trng_0_ctrl_2."] pub mod se_trng_0_ctrl_2; -#[doc = "se_trng_0_ctrl_3 register accessor: an alias for `Reg`"] +#[doc = "se_trng_0_ctrl_3 (rw) register accessor: an alias for `Reg`"] pub type SE_TRNG_0_CTRL_3 = crate::Reg; #[doc = "se_trng_0_ctrl_3."] pub mod se_trng_0_ctrl_3; -#[doc = "se_trng_0_test_out_0 register accessor: an alias for `Reg`"] +#[doc = "se_trng_0_test_out_0 (r) register accessor: an alias for `Reg`"] pub type SE_TRNG_0_TEST_OUT_0 = crate::Reg; #[doc = "se_trng_0_test_out_0."] pub mod se_trng_0_test_out_0; -#[doc = "se_trng_0_test_out_1 register accessor: an alias for `Reg`"] +#[doc = "se_trng_0_test_out_1 (r) register accessor: an alias for `Reg`"] pub type SE_TRNG_0_TEST_OUT_1 = crate::Reg; #[doc = "se_trng_0_test_out_1."] pub mod se_trng_0_test_out_1; -#[doc = "se_trng_0_test_out_2 register accessor: an alias for `Reg`"] +#[doc = "se_trng_0_test_out_2 (r) register accessor: an alias for `Reg`"] pub type SE_TRNG_0_TEST_OUT_2 = crate::Reg; #[doc = "se_trng_0_test_out_2."] pub mod se_trng_0_test_out_2; -#[doc = "se_trng_0_test_out_3 register accessor: an alias for `Reg`"] +#[doc = "se_trng_0_test_out_3 (r) register accessor: an alias for `Reg`"] pub type SE_TRNG_0_TEST_OUT_3 = crate::Reg; #[doc = "se_trng_0_test_out_3."] pub mod se_trng_0_test_out_3; -#[doc = "se_trng_0_ctrl_prot register accessor: an alias for `Reg`"] +#[doc = "se_trng_0_ctrl_prot (rw) register accessor: an alias for `Reg`"] pub type SE_TRNG_0_CTRL_PROT = crate::Reg; #[doc = "se_trng_0_ctrl_prot."] pub mod se_trng_0_ctrl_prot; -#[doc = "se_pka_0_ctrl_0 register accessor: an alias for `Reg`"] +#[doc = "se_pka_0_ctrl_0 (rw) register accessor: an alias for `Reg`"] pub type SE_PKA_0_CTRL_0 = crate::Reg; #[doc = "se_pka_0_ctrl_0."] pub mod se_pka_0_ctrl_0; -#[doc = "se_pka_0_seed register accessor: an alias for `Reg`"] +#[doc = "se_pka_0_seed (rw) register accessor: an alias for `Reg`"] pub type SE_PKA_0_SEED = crate::Reg; #[doc = "se_pka_0_seed."] pub mod se_pka_0_seed; -#[doc = "se_pka_0_ctrl_1 register accessor: an alias for `Reg`"] +#[doc = "se_pka_0_ctrl_1 (rw) register accessor: an alias for `Reg`"] pub type SE_PKA_0_CTRL_1 = crate::Reg; #[doc = "se_pka_0_ctrl_1."] pub mod se_pka_0_ctrl_1; -#[doc = "se_pka_0_rw register accessor: an alias for `Reg`"] +#[doc = "se_pka_0_rw (rw) register accessor: an alias for `Reg`"] pub type SE_PKA_0_RW = crate::Reg; #[doc = "se_pka_0_rw."] pub mod se_pka_0_rw; -#[doc = "se_pka_0_rw_burst register accessor: an alias for `Reg`"] +#[doc = "se_pka_0_rw_burst (rw) register accessor: an alias for `Reg`"] pub type SE_PKA_0_RW_BURST = crate::Reg; #[doc = "se_pka_0_rw_burst."] pub mod se_pka_0_rw_burst; -#[doc = "se_pka_0_ctrl_prot register accessor: an alias for `Reg`"] +#[doc = "se_pka_0_ctrl_prot (rw) register accessor: an alias for `Reg`"] pub type SE_PKA_0_CTRL_PROT = crate::Reg; #[doc = "se_pka_0_ctrl_prot."] pub mod se_pka_0_ctrl_prot; -#[doc = "se_cdet_0_ctrl_0 register accessor: an alias for `Reg`"] +#[doc = "se_cdet_0_ctrl_0 (rw) register accessor: an alias for `Reg`"] pub type SE_CDET_0_CTRL_0 = crate::Reg; #[doc = "se_cdet_0_ctrl_0."] pub mod se_cdet_0_ctrl_0; -#[doc = "se_cdet_0_ctrl_1 register accessor: an alias for `Reg`"] +#[doc = "se_cdet_0_ctrl_1 (rw) register accessor: an alias for `Reg`"] pub type SE_CDET_0_CTRL_1 = crate::Reg; #[doc = "se_cdet_0_ctrl_1."] pub mod se_cdet_0_ctrl_1; -#[doc = "se_cdet_0_ctrl_prot register accessor: an alias for `Reg`"] +#[doc = "se_cdet_0_ctrl_prot (rw) register accessor: an alias for `Reg`"] pub type SE_CDET_0_CTRL_PROT = crate::Reg; #[doc = "se_cdet_0_ctrl_prot."] pub mod se_cdet_0_ctrl_prot; -#[doc = "se_gmac_0_ctrl_0 register accessor: an alias for `Reg`"] +#[doc = "se_gmac_0_ctrl_0 (rw) register accessor: an alias for `Reg`"] pub type SE_GMAC_0_CTRL_0 = crate::Reg; #[doc = "se_gmac_0_ctrl_0."] pub mod se_gmac_0_ctrl_0; -#[doc = "se_gmac_0_lca register accessor: an alias for `Reg`"] +#[doc = "se_gmac_0_lca (rw) register accessor: an alias for `Reg`"] pub type SE_GMAC_0_LCA = crate::Reg; #[doc = "se_gmac_0_lca."] pub mod se_gmac_0_lca; -#[doc = "se_gmac_0_status register accessor: an alias for `Reg`"] +#[doc = "se_gmac_0_status (r) register accessor: an alias for `Reg`"] pub type SE_GMAC_0_STATUS = crate::Reg; #[doc = "se_gmac_0_status."] pub mod se_gmac_0_status; -#[doc = "se_gmac_0_ctrl_prot register accessor: an alias for `Reg`"] +#[doc = "se_gmac_0_ctrl_prot (rw) register accessor: an alias for `Reg`"] pub type SE_GMAC_0_CTRL_PROT = crate::Reg; #[doc = "se_gmac_0_ctrl_prot."] pub mod se_gmac_0_ctrl_prot; -#[doc = "se_ctrl_prot_rd register accessor: an alias for `Reg`"] +#[doc = "se_ctrl_prot_rd (r) register accessor: an alias for `Reg`"] pub type SE_CTRL_PROT_RD = crate::Reg; #[doc = "se_ctrl_prot_rd."] pub mod se_ctrl_prot_rd; -#[doc = "se_ctrl_reserved_0 register accessor: an alias for `Reg`"] +#[doc = "se_ctrl_reserved_0 (rw) register accessor: an alias for `Reg`"] pub type SE_CTRL_RESERVED_0 = crate::Reg; #[doc = "se_ctrl_reserved_0."] pub mod se_ctrl_reserved_0; -#[doc = "se_ctrl_reserved_1 register accessor: an alias for `Reg`"] +#[doc = "se_ctrl_reserved_1 (rw) register accessor: an alias for `Reg`"] pub type SE_CTRL_RESERVED_1 = crate::Reg; #[doc = "se_ctrl_reserved_1."] pub mod se_ctrl_reserved_1; -#[doc = "se_ctrl_reserved_2 register accessor: an alias for `Reg`"] +#[doc = "se_ctrl_reserved_2 (rw) register accessor: an alias for `Reg`"] pub type SE_CTRL_RESERVED_2 = crate::Reg; #[doc = "se_ctrl_reserved_2."] pub mod se_ctrl_reserved_2; diff --git a/src/sec_eng/se_aes_0_ctrl.rs b/src/sec_eng/se_aes_0_ctrl.rs index 6895eec..e20650d 100644 --- a/src/sec_eng/se_aes_0_ctrl.rs +++ b/src/sec_eng/se_aes_0_ctrl.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,621 +28,238 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `se_aes_0_msg_len` reader - "] -pub struct SE_AES_0_MSG_LEN_R(crate::FieldReader); -impl SE_AES_0_MSG_LEN_R { - pub(crate) fn new(bits: u16) -> Self { - SE_AES_0_MSG_LEN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_MSG_LEN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_aes_0_msg_len` writer - "] -pub struct SE_AES_0_MSG_LEN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_0_MSG_LEN_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xffff << 16)) | ((value as u32 & 0xffff) << 16); - self.w - } -} -#[doc = "Field `se_aes_0_link_mode` reader - "] -pub struct SE_AES_0_LINK_MODE_R(crate::FieldReader); -impl SE_AES_0_LINK_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - SE_AES_0_LINK_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_LINK_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_aes_0_link_mode` writer - "] -pub struct SE_AES_0_LINK_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_0_LINK_MODE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15); - self.w - } -} -#[doc = "Field `se_aes_0_iv_sel` reader - "] -pub struct SE_AES_0_IV_SEL_R(crate::FieldReader); -impl SE_AES_0_IV_SEL_R { - pub(crate) fn new(bits: bool) -> Self { - SE_AES_0_IV_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_IV_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_aes_0_iv_sel` writer - "] -pub struct SE_AES_0_IV_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_0_IV_SEL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14); - self.w - } -} -#[doc = "Field `se_aes_0_block_mode` reader - "] -pub struct SE_AES_0_BLOCK_MODE_R(crate::FieldReader); -impl SE_AES_0_BLOCK_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - SE_AES_0_BLOCK_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_BLOCK_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_aes_0_block_mode` writer - "] -pub struct SE_AES_0_BLOCK_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_0_BLOCK_MODE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 12)) | ((value as u32 & 0x03) << 12); - self.w - } -} -#[doc = "Field `se_aes_0_int_mask` reader - "] -pub struct SE_AES_0_INT_MASK_R(crate::FieldReader); -impl SE_AES_0_INT_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - SE_AES_0_INT_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_INT_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_aes_0_int_mask` writer - "] -pub struct SE_AES_0_INT_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_0_INT_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w - } -} -#[doc = "Field `se_aes_0_int_set_1t` reader - "] -pub struct SE_AES_0_INT_SET_1T_R(crate::FieldReader); -impl SE_AES_0_INT_SET_1T_R { - pub(crate) fn new(bits: bool) -> Self { - SE_AES_0_INT_SET_1T_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_INT_SET_1T_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_aes_0_int_set_1t` writer - "] -pub struct SE_AES_0_INT_SET_1T_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_0_INT_SET_1T_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); - self.w - } -} -#[doc = "Field `se_aes_0_int_clr_1t` reader - "] -pub struct SE_AES_0_INT_CLR_1T_R(crate::FieldReader); -impl SE_AES_0_INT_CLR_1T_R { - pub(crate) fn new(bits: bool) -> Self { - SE_AES_0_INT_CLR_1T_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_INT_CLR_1T_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_aes_0_int_clr_1t` writer - "] -pub struct SE_AES_0_INT_CLR_1T_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_0_INT_CLR_1T_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w - } -} -#[doc = "Field `se_aes_0_int` reader - "] -pub struct SE_AES_0_INT_R(crate::FieldReader); -impl SE_AES_0_INT_R { - pub(crate) fn new(bits: bool) -> Self { - SE_AES_0_INT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_INT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_aes_0_hw_key_en` reader - "] -pub struct SE_AES_0_HW_KEY_EN_R(crate::FieldReader); -impl SE_AES_0_HW_KEY_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_AES_0_HW_KEY_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_HW_KEY_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_aes_0_hw_key_en` writer - "] -pub struct SE_AES_0_HW_KEY_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_0_HW_KEY_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7); - self.w - } -} -#[doc = "Field `se_aes_0_dec_key_sel` reader - "] -pub struct SE_AES_0_DEC_KEY_SEL_R(crate::FieldReader); -impl SE_AES_0_DEC_KEY_SEL_R { - pub(crate) fn new(bits: bool) -> Self { - SE_AES_0_DEC_KEY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_DEC_KEY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_aes_0_dec_key_sel` writer - "] -pub struct SE_AES_0_DEC_KEY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_0_DEC_KEY_SEL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w - } -} -#[doc = "Field `se_aes_0_dec_en` reader - "] -pub struct SE_AES_0_DEC_EN_R(crate::FieldReader); -impl SE_AES_0_DEC_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_AES_0_DEC_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_DEC_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_aes_0_dec_en` writer - "] -pub struct SE_AES_0_DEC_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_0_DEC_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w - } -} -#[doc = "Field `se_aes_0_mode` reader - "] -pub struct SE_AES_0_MODE_R(crate::FieldReader); -impl SE_AES_0_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - SE_AES_0_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_aes_0_mode` writer - "] -pub struct SE_AES_0_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_0_MODE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 3)) | ((value as u32 & 0x03) << 3); - self.w - } -} -#[doc = "Field `se_aes_0_en` reader - "] -pub struct SE_AES_0_EN_R(crate::FieldReader); -impl SE_AES_0_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_AES_0_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_aes_0_en` writer - "] -pub struct SE_AES_0_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_0_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} +#[doc = "Field `se_aes_0_busy` reader - "] +pub type SE_AES_0_BUSY_R = crate::BitReader; #[doc = "Field `se_aes_0_trig_1t` reader - "] -pub struct SE_AES_0_TRIG_1T_R(crate::FieldReader); -impl SE_AES_0_TRIG_1T_R { - pub(crate) fn new(bits: bool) -> Self { - SE_AES_0_TRIG_1T_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_TRIG_1T_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_AES_0_TRIG_1T_R = crate::BitReader; #[doc = "Field `se_aes_0_trig_1t` writer - "] -pub struct SE_AES_0_TRIG_1T_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_0_TRIG_1T_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} -#[doc = "Field `se_aes_0_busy` reader - "] -pub struct SE_AES_0_BUSY_R(crate::FieldReader); -impl SE_AES_0_BUSY_R { - pub(crate) fn new(bits: bool) -> Self { - SE_AES_0_BUSY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_BUSY_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_AES_0_TRIG_1T_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_AES_0_CTRL_SPEC, bool, O>; +#[doc = "Field `se_aes_0_en` reader - "] +pub type SE_AES_0_EN_R = crate::BitReader; +#[doc = "Field `se_aes_0_en` writer - "] +pub type SE_AES_0_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SE_AES_0_CTRL_SPEC, bool, O>; +#[doc = "Field `se_aes_0_mode` reader - "] +pub type SE_AES_0_MODE_R = crate::FieldReader; +#[doc = "Field `se_aes_0_mode` writer - "] +pub type SE_AES_0_MODE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_AES_0_CTRL_SPEC, u8, u8, 2, O>; +#[doc = "Field `se_aes_0_dec_en` reader - "] +pub type SE_AES_0_DEC_EN_R = crate::BitReader; +#[doc = "Field `se_aes_0_dec_en` writer - "] +pub type SE_AES_0_DEC_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_AES_0_CTRL_SPEC, bool, O>; +#[doc = "Field `se_aes_0_dec_key_sel` reader - "] +pub type SE_AES_0_DEC_KEY_SEL_R = crate::BitReader; +#[doc = "Field `se_aes_0_dec_key_sel` writer - "] +pub type SE_AES_0_DEC_KEY_SEL_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_AES_0_CTRL_SPEC, bool, O>; +#[doc = "Field `se_aes_0_hw_key_en` reader - "] +pub type SE_AES_0_HW_KEY_EN_R = crate::BitReader; +#[doc = "Field `se_aes_0_hw_key_en` writer - "] +pub type SE_AES_0_HW_KEY_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_AES_0_CTRL_SPEC, bool, O>; +#[doc = "Field `se_aes_0_int` reader - "] +pub type SE_AES_0_INT_R = crate::BitReader; +#[doc = "Field `se_aes_0_int_clr_1t` reader - "] +pub type SE_AES_0_INT_CLR_1T_R = crate::BitReader; +#[doc = "Field `se_aes_0_int_clr_1t` writer - "] +pub type SE_AES_0_INT_CLR_1T_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_AES_0_CTRL_SPEC, bool, O>; +#[doc = "Field `se_aes_0_int_set_1t` reader - "] +pub type SE_AES_0_INT_SET_1T_R = crate::BitReader; +#[doc = "Field `se_aes_0_int_set_1t` writer - "] +pub type SE_AES_0_INT_SET_1T_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_AES_0_CTRL_SPEC, bool, O>; +#[doc = "Field `se_aes_0_int_mask` reader - "] +pub type SE_AES_0_INT_MASK_R = crate::BitReader; +#[doc = "Field `se_aes_0_int_mask` writer - "] +pub type SE_AES_0_INT_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_AES_0_CTRL_SPEC, bool, O>; +#[doc = "Field `se_aes_0_block_mode` reader - "] +pub type SE_AES_0_BLOCK_MODE_R = crate::FieldReader; +#[doc = "Field `se_aes_0_block_mode` writer - "] +pub type SE_AES_0_BLOCK_MODE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_AES_0_CTRL_SPEC, u8, u8, 2, O>; +#[doc = "Field `se_aes_0_iv_sel` reader - "] +pub type SE_AES_0_IV_SEL_R = crate::BitReader; +#[doc = "Field `se_aes_0_iv_sel` writer - "] +pub type SE_AES_0_IV_SEL_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_AES_0_CTRL_SPEC, bool, O>; +#[doc = "Field `se_aes_0_link_mode` reader - "] +pub type SE_AES_0_LINK_MODE_R = crate::BitReader; +#[doc = "Field `se_aes_0_link_mode` writer - "] +pub type SE_AES_0_LINK_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_AES_0_CTRL_SPEC, bool, O>; +#[doc = "Field `se_aes_0_msg_len` reader - "] +pub type SE_AES_0_MSG_LEN_R = crate::FieldReader; +#[doc = "Field `se_aes_0_msg_len` writer - "] +pub type SE_AES_0_MSG_LEN_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_AES_0_CTRL_SPEC, u16, u16, 16, O>; impl R { - #[doc = "Bits 16:31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn se_aes_0_msg_len(&self) -> SE_AES_0_MSG_LEN_R { - SE_AES_0_MSG_LEN_R::new(((self.bits >> 16) & 0xffff) as u16) + pub fn se_aes_0_busy(&self) -> SE_AES_0_BUSY_R { + SE_AES_0_BUSY_R::new((self.bits & 1) != 0) } - #[doc = "Bit 15"] + #[doc = "Bit 1"] #[inline(always)] - pub fn se_aes_0_link_mode(&self) -> SE_AES_0_LINK_MODE_R { - SE_AES_0_LINK_MODE_R::new(((self.bits >> 15) & 0x01) != 0) + pub fn se_aes_0_trig_1t(&self) -> SE_AES_0_TRIG_1T_R { + SE_AES_0_TRIG_1T_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 14"] + #[doc = "Bit 2"] #[inline(always)] - pub fn se_aes_0_iv_sel(&self) -> SE_AES_0_IV_SEL_R { - SE_AES_0_IV_SEL_R::new(((self.bits >> 14) & 0x01) != 0) + pub fn se_aes_0_en(&self) -> SE_AES_0_EN_R { + SE_AES_0_EN_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bits 12:13"] + #[doc = "Bits 3:4"] #[inline(always)] - pub fn se_aes_0_block_mode(&self) -> SE_AES_0_BLOCK_MODE_R { - SE_AES_0_BLOCK_MODE_R::new(((self.bits >> 12) & 0x03) as u8) + pub fn se_aes_0_mode(&self) -> SE_AES_0_MODE_R { + SE_AES_0_MODE_R::new(((self.bits >> 3) & 3) as u8) } - #[doc = "Bit 11"] + #[doc = "Bit 5"] #[inline(always)] - pub fn se_aes_0_int_mask(&self) -> SE_AES_0_INT_MASK_R { - SE_AES_0_INT_MASK_R::new(((self.bits >> 11) & 0x01) != 0) + pub fn se_aes_0_dec_en(&self) -> SE_AES_0_DEC_EN_R { + SE_AES_0_DEC_EN_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 10"] + #[doc = "Bit 6"] #[inline(always)] - pub fn se_aes_0_int_set_1t(&self) -> SE_AES_0_INT_SET_1T_R { - SE_AES_0_INT_SET_1T_R::new(((self.bits >> 10) & 0x01) != 0) + pub fn se_aes_0_dec_key_sel(&self) -> SE_AES_0_DEC_KEY_SEL_R { + SE_AES_0_DEC_KEY_SEL_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = "Bit 9"] + #[doc = "Bit 7"] #[inline(always)] - pub fn se_aes_0_int_clr_1t(&self) -> SE_AES_0_INT_CLR_1T_R { - SE_AES_0_INT_CLR_1T_R::new(((self.bits >> 9) & 0x01) != 0) + pub fn se_aes_0_hw_key_en(&self) -> SE_AES_0_HW_KEY_EN_R { + SE_AES_0_HW_KEY_EN_R::new(((self.bits >> 7) & 1) != 0) } #[doc = "Bit 8"] #[inline(always)] pub fn se_aes_0_int(&self) -> SE_AES_0_INT_R { - SE_AES_0_INT_R::new(((self.bits >> 8) & 0x01) != 0) + SE_AES_0_INT_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bit 7"] + #[doc = "Bit 9"] #[inline(always)] - pub fn se_aes_0_hw_key_en(&self) -> SE_AES_0_HW_KEY_EN_R { - SE_AES_0_HW_KEY_EN_R::new(((self.bits >> 7) & 0x01) != 0) + pub fn se_aes_0_int_clr_1t(&self) -> SE_AES_0_INT_CLR_1T_R { + SE_AES_0_INT_CLR_1T_R::new(((self.bits >> 9) & 1) != 0) } - #[doc = "Bit 6"] + #[doc = "Bit 10"] #[inline(always)] - pub fn se_aes_0_dec_key_sel(&self) -> SE_AES_0_DEC_KEY_SEL_R { - SE_AES_0_DEC_KEY_SEL_R::new(((self.bits >> 6) & 0x01) != 0) + pub fn se_aes_0_int_set_1t(&self) -> SE_AES_0_INT_SET_1T_R { + SE_AES_0_INT_SET_1T_R::new(((self.bits >> 10) & 1) != 0) } - #[doc = "Bit 5"] + #[doc = "Bit 11"] #[inline(always)] - pub fn se_aes_0_dec_en(&self) -> SE_AES_0_DEC_EN_R { - SE_AES_0_DEC_EN_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn se_aes_0_int_mask(&self) -> SE_AES_0_INT_MASK_R { + SE_AES_0_INT_MASK_R::new(((self.bits >> 11) & 1) != 0) } - #[doc = "Bits 3:4"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn se_aes_0_mode(&self) -> SE_AES_0_MODE_R { - SE_AES_0_MODE_R::new(((self.bits >> 3) & 0x03) as u8) + pub fn se_aes_0_block_mode(&self) -> SE_AES_0_BLOCK_MODE_R { + SE_AES_0_BLOCK_MODE_R::new(((self.bits >> 12) & 3) as u8) } - #[doc = "Bit 2"] + #[doc = "Bit 14"] #[inline(always)] - pub fn se_aes_0_en(&self) -> SE_AES_0_EN_R { - SE_AES_0_EN_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn se_aes_0_iv_sel(&self) -> SE_AES_0_IV_SEL_R { + SE_AES_0_IV_SEL_R::new(((self.bits >> 14) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 15"] #[inline(always)] - pub fn se_aes_0_trig_1t(&self) -> SE_AES_0_TRIG_1T_R { - SE_AES_0_TRIG_1T_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn se_aes_0_link_mode(&self) -> SE_AES_0_LINK_MODE_R { + SE_AES_0_LINK_MODE_R::new(((self.bits >> 15) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bits 16:31"] #[inline(always)] - pub fn se_aes_0_busy(&self) -> SE_AES_0_BUSY_R { - SE_AES_0_BUSY_R::new((self.bits & 0x01) != 0) + pub fn se_aes_0_msg_len(&self) -> SE_AES_0_MSG_LEN_R { + SE_AES_0_MSG_LEN_R::new(((self.bits >> 16) & 0xffff) as u16) } } impl W { - #[doc = "Bits 16:31"] + #[doc = "Bit 1"] #[inline(always)] - pub fn se_aes_0_msg_len(&mut self) -> SE_AES_0_MSG_LEN_W { - SE_AES_0_MSG_LEN_W { w: self } + #[must_use] + pub fn se_aes_0_trig_1t(&mut self) -> SE_AES_0_TRIG_1T_W<1> { + SE_AES_0_TRIG_1T_W::new(self) } - #[doc = "Bit 15"] + #[doc = "Bit 2"] #[inline(always)] - pub fn se_aes_0_link_mode(&mut self) -> SE_AES_0_LINK_MODE_W { - SE_AES_0_LINK_MODE_W { w: self } + #[must_use] + pub fn se_aes_0_en(&mut self) -> SE_AES_0_EN_W<2> { + SE_AES_0_EN_W::new(self) } - #[doc = "Bit 14"] + #[doc = "Bits 3:4"] #[inline(always)] - pub fn se_aes_0_iv_sel(&mut self) -> SE_AES_0_IV_SEL_W { - SE_AES_0_IV_SEL_W { w: self } + #[must_use] + pub fn se_aes_0_mode(&mut self) -> SE_AES_0_MODE_W<3> { + SE_AES_0_MODE_W::new(self) } - #[doc = "Bits 12:13"] + #[doc = "Bit 5"] #[inline(always)] - pub fn se_aes_0_block_mode(&mut self) -> SE_AES_0_BLOCK_MODE_W { - SE_AES_0_BLOCK_MODE_W { w: self } + #[must_use] + pub fn se_aes_0_dec_en(&mut self) -> SE_AES_0_DEC_EN_W<5> { + SE_AES_0_DEC_EN_W::new(self) } - #[doc = "Bit 11"] + #[doc = "Bit 6"] #[inline(always)] - pub fn se_aes_0_int_mask(&mut self) -> SE_AES_0_INT_MASK_W { - SE_AES_0_INT_MASK_W { w: self } + #[must_use] + pub fn se_aes_0_dec_key_sel(&mut self) -> SE_AES_0_DEC_KEY_SEL_W<6> { + SE_AES_0_DEC_KEY_SEL_W::new(self) } - #[doc = "Bit 10"] + #[doc = "Bit 7"] #[inline(always)] - pub fn se_aes_0_int_set_1t(&mut self) -> SE_AES_0_INT_SET_1T_W { - SE_AES_0_INT_SET_1T_W { w: self } + #[must_use] + pub fn se_aes_0_hw_key_en(&mut self) -> SE_AES_0_HW_KEY_EN_W<7> { + SE_AES_0_HW_KEY_EN_W::new(self) } #[doc = "Bit 9"] #[inline(always)] - pub fn se_aes_0_int_clr_1t(&mut self) -> SE_AES_0_INT_CLR_1T_W { - SE_AES_0_INT_CLR_1T_W { w: self } + #[must_use] + pub fn se_aes_0_int_clr_1t(&mut self) -> SE_AES_0_INT_CLR_1T_W<9> { + SE_AES_0_INT_CLR_1T_W::new(self) } - #[doc = "Bit 7"] + #[doc = "Bit 10"] #[inline(always)] - pub fn se_aes_0_hw_key_en(&mut self) -> SE_AES_0_HW_KEY_EN_W { - SE_AES_0_HW_KEY_EN_W { w: self } + #[must_use] + pub fn se_aes_0_int_set_1t(&mut self) -> SE_AES_0_INT_SET_1T_W<10> { + SE_AES_0_INT_SET_1T_W::new(self) } - #[doc = "Bit 6"] + #[doc = "Bit 11"] #[inline(always)] - pub fn se_aes_0_dec_key_sel(&mut self) -> SE_AES_0_DEC_KEY_SEL_W { - SE_AES_0_DEC_KEY_SEL_W { w: self } + #[must_use] + pub fn se_aes_0_int_mask(&mut self) -> SE_AES_0_INT_MASK_W<11> { + SE_AES_0_INT_MASK_W::new(self) } - #[doc = "Bit 5"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn se_aes_0_dec_en(&mut self) -> SE_AES_0_DEC_EN_W { - SE_AES_0_DEC_EN_W { w: self } + #[must_use] + pub fn se_aes_0_block_mode(&mut self) -> SE_AES_0_BLOCK_MODE_W<12> { + SE_AES_0_BLOCK_MODE_W::new(self) } - #[doc = "Bits 3:4"] + #[doc = "Bit 14"] #[inline(always)] - pub fn se_aes_0_mode(&mut self) -> SE_AES_0_MODE_W { - SE_AES_0_MODE_W { w: self } + #[must_use] + pub fn se_aes_0_iv_sel(&mut self) -> SE_AES_0_IV_SEL_W<14> { + SE_AES_0_IV_SEL_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bit 15"] #[inline(always)] - pub fn se_aes_0_en(&mut self) -> SE_AES_0_EN_W { - SE_AES_0_EN_W { w: self } + #[must_use] + pub fn se_aes_0_link_mode(&mut self) -> SE_AES_0_LINK_MODE_W<15> { + SE_AES_0_LINK_MODE_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bits 16:31"] #[inline(always)] - pub fn se_aes_0_trig_1t(&mut self) -> SE_AES_0_TRIG_1T_W { - SE_AES_0_TRIG_1T_W { w: self } + #[must_use] + pub fn se_aes_0_msg_len(&mut self) -> SE_AES_0_MSG_LEN_W<16> { + SE_AES_0_MSG_LEN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -659,11 +277,10 @@ impl crate::Readable for SE_AES_0_CTRL_SPEC { #[doc = "`write(|w| ..)` method takes [se_aes_0_ctrl::W](W) writer structure"] impl crate::Writable for SE_AES_0_CTRL_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_aes_0_ctrl to value 0"] impl crate::Resettable for SE_AES_0_CTRL_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_aes_0_ctrl_prot.rs b/src/sec_eng/se_aes_0_ctrl_prot.rs index ed09ff3..fd1845d 100644 --- a/src/sec_eng/se_aes_0_ctrl_prot.rs +++ b/src/sec_eng/se_aes_0_ctrl_prot.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,153 +28,65 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `se_aes_id1_en` reader - "] -pub struct SE_AES_ID1_EN_R(crate::FieldReader); -impl SE_AES_ID1_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_AES_ID1_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_ID1_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_aes_id1_en` writer - "] -pub struct SE_AES_ID1_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_ID1_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `se_aes_id0_en` reader - "] -pub struct SE_AES_ID0_EN_R(crate::FieldReader); -impl SE_AES_ID0_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_AES_ID0_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_ID0_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_aes_id0_en` writer - "] -pub struct SE_AES_ID0_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_ID0_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `se_aes_prot_en` reader - "] -pub struct SE_AES_PROT_EN_R(crate::FieldReader); -impl SE_AES_PROT_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_AES_PROT_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_PROT_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_AES_PROT_EN_R = crate::BitReader; #[doc = "Field `se_aes_prot_en` writer - "] -pub struct SE_AES_PROT_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_PROT_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type SE_AES_PROT_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_AES_0_CTRL_PROT_SPEC, bool, O>; +#[doc = "Field `se_aes_id0_en` reader - "] +pub type SE_AES_ID0_EN_R = crate::BitReader; +#[doc = "Field `se_aes_id0_en` writer - "] +pub type SE_AES_ID0_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_AES_0_CTRL_PROT_SPEC, bool, O>; +#[doc = "Field `se_aes_id1_en` reader - "] +pub type SE_AES_ID1_EN_R = crate::BitReader; +#[doc = "Field `se_aes_id1_en` writer - "] +pub type SE_AES_ID1_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_AES_0_CTRL_PROT_SPEC, bool, O>; impl R { - #[doc = "Bit 2"] + #[doc = "Bit 0"] #[inline(always)] - pub fn se_aes_id1_en(&self) -> SE_AES_ID1_EN_R { - SE_AES_ID1_EN_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn se_aes_prot_en(&self) -> SE_AES_PROT_EN_R { + SE_AES_PROT_EN_R::new((self.bits & 1) != 0) } #[doc = "Bit 1"] #[inline(always)] pub fn se_aes_id0_en(&self) -> SE_AES_ID0_EN_R { - SE_AES_ID0_EN_R::new(((self.bits >> 1) & 0x01) != 0) + SE_AES_ID0_EN_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 2"] #[inline(always)] - pub fn se_aes_prot_en(&self) -> SE_AES_PROT_EN_R { - SE_AES_PROT_EN_R::new((self.bits & 0x01) != 0) + pub fn se_aes_id1_en(&self) -> SE_AES_ID1_EN_R { + SE_AES_ID1_EN_R::new(((self.bits >> 2) & 1) != 0) } } impl W { - #[doc = "Bit 2"] + #[doc = "Bit 0"] #[inline(always)] - pub fn se_aes_id1_en(&mut self) -> SE_AES_ID1_EN_W { - SE_AES_ID1_EN_W { w: self } + #[must_use] + pub fn se_aes_prot_en(&mut self) -> SE_AES_PROT_EN_W<0> { + SE_AES_PROT_EN_W::new(self) } #[doc = "Bit 1"] #[inline(always)] - pub fn se_aes_id0_en(&mut self) -> SE_AES_ID0_EN_W { - SE_AES_ID0_EN_W { w: self } + #[must_use] + pub fn se_aes_id0_en(&mut self) -> SE_AES_ID0_EN_W<1> { + SE_AES_ID0_EN_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 2"] #[inline(always)] - pub fn se_aes_prot_en(&mut self) -> SE_AES_PROT_EN_W { - SE_AES_PROT_EN_W { w: self } + #[must_use] + pub fn se_aes_id1_en(&mut self) -> SE_AES_ID1_EN_W<2> { + SE_AES_ID1_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -191,11 +104,10 @@ impl crate::Readable for SE_AES_0_CTRL_PROT_SPEC { #[doc = "`write(|w| ..)` method takes [se_aes_0_ctrl_prot::W](W) writer structure"] impl crate::Writable for SE_AES_0_CTRL_PROT_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_aes_0_ctrl_prot to value 0x07"] impl crate::Resettable for SE_AES_0_CTRL_PROT_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x07 - } + const RESET_VALUE: Self::Ux = 0x07; } diff --git a/src/sec_eng/se_aes_0_endian.rs b/src/sec_eng/se_aes_0_endian.rs index 9743f6f..c11fd55 100644 --- a/src/sec_eng/se_aes_0_endian.rs +++ b/src/sec_eng/se_aes_0_endian.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,235 +28,97 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `se_aes_0_ctr_len` reader - "] -pub struct SE_AES_0_CTR_LEN_R(crate::FieldReader); -impl SE_AES_0_CTR_LEN_R { - pub(crate) fn new(bits: u8) -> Self { - SE_AES_0_CTR_LEN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_CTR_LEN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_aes_0_ctr_len` writer - "] -pub struct SE_AES_0_CTR_LEN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_0_CTR_LEN_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 30)) | ((value as u32 & 0x03) << 30); - self.w - } -} -#[doc = "Field `se_aes_0_iv_endian` reader - "] -pub struct SE_AES_0_IV_ENDIAN_R(crate::FieldReader); -impl SE_AES_0_IV_ENDIAN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_AES_0_IV_ENDIAN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_IV_ENDIAN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_aes_0_iv_endian` writer - "] -pub struct SE_AES_0_IV_ENDIAN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_0_IV_ENDIAN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `se_aes_0_key_endian` reader - "] -pub struct SE_AES_0_KEY_ENDIAN_R(crate::FieldReader); -impl SE_AES_0_KEY_ENDIAN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_AES_0_KEY_ENDIAN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_KEY_ENDIAN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_aes_0_key_endian` writer - "] -pub struct SE_AES_0_KEY_ENDIAN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_0_KEY_ENDIAN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `se_aes_0_din_endian` reader - "] -pub struct SE_AES_0_DIN_ENDIAN_R(crate::FieldReader); -impl SE_AES_0_DIN_ENDIAN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_AES_0_DIN_ENDIAN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_DIN_ENDIAN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_aes_0_din_endian` writer - "] -pub struct SE_AES_0_DIN_ENDIAN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_0_DIN_ENDIAN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `se_aes_0_dout_endian` reader - "] -pub struct SE_AES_0_DOUT_ENDIAN_R(crate::FieldReader); -impl SE_AES_0_DOUT_ENDIAN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_AES_0_DOUT_ENDIAN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_DOUT_ENDIAN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_AES_0_DOUT_ENDIAN_R = crate::BitReader; #[doc = "Field `se_aes_0_dout_endian` writer - "] -pub struct SE_AES_0_DOUT_ENDIAN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_0_DOUT_ENDIAN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type SE_AES_0_DOUT_ENDIAN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_AES_0_ENDIAN_SPEC, bool, O>; +#[doc = "Field `se_aes_0_din_endian` reader - "] +pub type SE_AES_0_DIN_ENDIAN_R = crate::BitReader; +#[doc = "Field `se_aes_0_din_endian` writer - "] +pub type SE_AES_0_DIN_ENDIAN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_AES_0_ENDIAN_SPEC, bool, O>; +#[doc = "Field `se_aes_0_key_endian` reader - "] +pub type SE_AES_0_KEY_ENDIAN_R = crate::BitReader; +#[doc = "Field `se_aes_0_key_endian` writer - "] +pub type SE_AES_0_KEY_ENDIAN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_AES_0_ENDIAN_SPEC, bool, O>; +#[doc = "Field `se_aes_0_iv_endian` reader - "] +pub type SE_AES_0_IV_ENDIAN_R = crate::BitReader; +#[doc = "Field `se_aes_0_iv_endian` writer - "] +pub type SE_AES_0_IV_ENDIAN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_AES_0_ENDIAN_SPEC, bool, O>; +#[doc = "Field `se_aes_0_ctr_len` reader - "] +pub type SE_AES_0_CTR_LEN_R = crate::FieldReader; +#[doc = "Field `se_aes_0_ctr_len` writer - "] +pub type SE_AES_0_CTR_LEN_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_AES_0_ENDIAN_SPEC, u8, u8, 2, O>; impl R { - #[doc = "Bits 30:31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn se_aes_0_ctr_len(&self) -> SE_AES_0_CTR_LEN_R { - SE_AES_0_CTR_LEN_R::new(((self.bits >> 30) & 0x03) as u8) + pub fn se_aes_0_dout_endian(&self) -> SE_AES_0_DOUT_ENDIAN_R { + SE_AES_0_DOUT_ENDIAN_R::new((self.bits & 1) != 0) } - #[doc = "Bit 3"] + #[doc = "Bit 1"] #[inline(always)] - pub fn se_aes_0_iv_endian(&self) -> SE_AES_0_IV_ENDIAN_R { - SE_AES_0_IV_ENDIAN_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn se_aes_0_din_endian(&self) -> SE_AES_0_DIN_ENDIAN_R { + SE_AES_0_DIN_ENDIAN_R::new(((self.bits >> 1) & 1) != 0) } #[doc = "Bit 2"] #[inline(always)] pub fn se_aes_0_key_endian(&self) -> SE_AES_0_KEY_ENDIAN_R { - SE_AES_0_KEY_ENDIAN_R::new(((self.bits >> 2) & 0x01) != 0) + SE_AES_0_KEY_ENDIAN_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 3"] #[inline(always)] - pub fn se_aes_0_din_endian(&self) -> SE_AES_0_DIN_ENDIAN_R { - SE_AES_0_DIN_ENDIAN_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn se_aes_0_iv_endian(&self) -> SE_AES_0_IV_ENDIAN_R { + SE_AES_0_IV_ENDIAN_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bits 30:31"] #[inline(always)] - pub fn se_aes_0_dout_endian(&self) -> SE_AES_0_DOUT_ENDIAN_R { - SE_AES_0_DOUT_ENDIAN_R::new((self.bits & 0x01) != 0) + pub fn se_aes_0_ctr_len(&self) -> SE_AES_0_CTR_LEN_R { + SE_AES_0_CTR_LEN_R::new(((self.bits >> 30) & 3) as u8) } } impl W { - #[doc = "Bits 30:31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn se_aes_0_ctr_len(&mut self) -> SE_AES_0_CTR_LEN_W { - SE_AES_0_CTR_LEN_W { w: self } + #[must_use] + pub fn se_aes_0_dout_endian(&mut self) -> SE_AES_0_DOUT_ENDIAN_W<0> { + SE_AES_0_DOUT_ENDIAN_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bit 1"] #[inline(always)] - pub fn se_aes_0_iv_endian(&mut self) -> SE_AES_0_IV_ENDIAN_W { - SE_AES_0_IV_ENDIAN_W { w: self } + #[must_use] + pub fn se_aes_0_din_endian(&mut self) -> SE_AES_0_DIN_ENDIAN_W<1> { + SE_AES_0_DIN_ENDIAN_W::new(self) } #[doc = "Bit 2"] #[inline(always)] - pub fn se_aes_0_key_endian(&mut self) -> SE_AES_0_KEY_ENDIAN_W { - SE_AES_0_KEY_ENDIAN_W { w: self } + #[must_use] + pub fn se_aes_0_key_endian(&mut self) -> SE_AES_0_KEY_ENDIAN_W<2> { + SE_AES_0_KEY_ENDIAN_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 3"] #[inline(always)] - pub fn se_aes_0_din_endian(&mut self) -> SE_AES_0_DIN_ENDIAN_W { - SE_AES_0_DIN_ENDIAN_W { w: self } + #[must_use] + pub fn se_aes_0_iv_endian(&mut self) -> SE_AES_0_IV_ENDIAN_W<3> { + SE_AES_0_IV_ENDIAN_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bits 30:31"] #[inline(always)] - pub fn se_aes_0_dout_endian(&mut self) -> SE_AES_0_DOUT_ENDIAN_W { - SE_AES_0_DOUT_ENDIAN_W { w: self } + #[must_use] + pub fn se_aes_0_ctr_len(&mut self) -> SE_AES_0_CTR_LEN_W<30> { + SE_AES_0_CTR_LEN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -273,11 +136,10 @@ impl crate::Readable for SE_AES_0_ENDIAN_SPEC { #[doc = "`write(|w| ..)` method takes [se_aes_0_endian::W](W) writer structure"] impl crate::Writable for SE_AES_0_ENDIAN_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_aes_0_endian to value 0x0f"] impl crate::Resettable for SE_AES_0_ENDIAN_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0f - } + const RESET_VALUE: Self::Ux = 0x0f; } diff --git a/src/sec_eng/se_aes_0_iv_0.rs b/src/sec_eng/se_aes_0_iv_0.rs index fc3d36e..1097e32 100644 --- a/src/sec_eng/se_aes_0_iv_0.rs +++ b/src/sec_eng/se_aes_0_iv_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `se_aes_0_iv_0` reader - "] -pub struct SE_AES_0_IV_0_R(crate::FieldReader); -impl SE_AES_0_IV_0_R { - pub(crate) fn new(bits: u32) -> Self { - SE_AES_0_IV_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_IV_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_AES_0_IV_0_R = crate::FieldReader; #[doc = "Field `se_aes_0_iv_0` writer - "] -pub struct SE_AES_0_IV_0_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_0_IV_0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SE_AES_0_IV_0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_AES_0_IV_0_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_aes_0_iv_0(&self) -> SE_AES_0_IV_0_R { - SE_AES_0_IV_0_R::new((self.bits & 0xffff_ffff) as u32) + SE_AES_0_IV_0_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn se_aes_0_iv_0(&mut self) -> SE_AES_0_IV_0_W { - SE_AES_0_IV_0_W { w: self } + #[must_use] + pub fn se_aes_0_iv_0(&mut self) -> SE_AES_0_IV_0_W<0> { + SE_AES_0_IV_0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SE_AES_0_IV_0_SPEC { #[doc = "`write(|w| ..)` method takes [se_aes_0_iv_0::W](W) writer structure"] impl crate::Writable for SE_AES_0_IV_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_aes_0_iv_0 to value 0"] impl crate::Resettable for SE_AES_0_IV_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_aes_0_iv_1.rs b/src/sec_eng/se_aes_0_iv_1.rs index ca90538..4d03e8d 100644 --- a/src/sec_eng/se_aes_0_iv_1.rs +++ b/src/sec_eng/se_aes_0_iv_1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `se_aes_0_iv_1` reader - "] -pub struct SE_AES_0_IV_1_R(crate::FieldReader); -impl SE_AES_0_IV_1_R { - pub(crate) fn new(bits: u32) -> Self { - SE_AES_0_IV_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_IV_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_AES_0_IV_1_R = crate::FieldReader; #[doc = "Field `se_aes_0_iv_1` writer - "] -pub struct SE_AES_0_IV_1_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_0_IV_1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SE_AES_0_IV_1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_AES_0_IV_1_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_aes_0_iv_1(&self) -> SE_AES_0_IV_1_R { - SE_AES_0_IV_1_R::new((self.bits & 0xffff_ffff) as u32) + SE_AES_0_IV_1_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn se_aes_0_iv_1(&mut self) -> SE_AES_0_IV_1_W { - SE_AES_0_IV_1_W { w: self } + #[must_use] + pub fn se_aes_0_iv_1(&mut self) -> SE_AES_0_IV_1_W<0> { + SE_AES_0_IV_1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SE_AES_0_IV_1_SPEC { #[doc = "`write(|w| ..)` method takes [se_aes_0_iv_1::W](W) writer structure"] impl crate::Writable for SE_AES_0_IV_1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_aes_0_iv_1 to value 0"] impl crate::Resettable for SE_AES_0_IV_1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_aes_0_iv_2.rs b/src/sec_eng/se_aes_0_iv_2.rs index 8b7a7ad..a05376b 100644 --- a/src/sec_eng/se_aes_0_iv_2.rs +++ b/src/sec_eng/se_aes_0_iv_2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `se_aes_0_iv_2` reader - "] -pub struct SE_AES_0_IV_2_R(crate::FieldReader); -impl SE_AES_0_IV_2_R { - pub(crate) fn new(bits: u32) -> Self { - SE_AES_0_IV_2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_IV_2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_AES_0_IV_2_R = crate::FieldReader; #[doc = "Field `se_aes_0_iv_2` writer - "] -pub struct SE_AES_0_IV_2_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_0_IV_2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SE_AES_0_IV_2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_AES_0_IV_2_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_aes_0_iv_2(&self) -> SE_AES_0_IV_2_R { - SE_AES_0_IV_2_R::new((self.bits & 0xffff_ffff) as u32) + SE_AES_0_IV_2_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn se_aes_0_iv_2(&mut self) -> SE_AES_0_IV_2_W { - SE_AES_0_IV_2_W { w: self } + #[must_use] + pub fn se_aes_0_iv_2(&mut self) -> SE_AES_0_IV_2_W<0> { + SE_AES_0_IV_2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SE_AES_0_IV_2_SPEC { #[doc = "`write(|w| ..)` method takes [se_aes_0_iv_2::W](W) writer structure"] impl crate::Writable for SE_AES_0_IV_2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_aes_0_iv_2 to value 0"] impl crate::Resettable for SE_AES_0_IV_2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_aes_0_iv_3.rs b/src/sec_eng/se_aes_0_iv_3.rs index 5b32335..ae33410 100644 --- a/src/sec_eng/se_aes_0_iv_3.rs +++ b/src/sec_eng/se_aes_0_iv_3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `se_aes_0_iv_3` reader - "] -pub struct SE_AES_0_IV_3_R(crate::FieldReader); -impl SE_AES_0_IV_3_R { - pub(crate) fn new(bits: u32) -> Self { - SE_AES_0_IV_3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_IV_3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_AES_0_IV_3_R = crate::FieldReader; #[doc = "Field `se_aes_0_iv_3` writer - "] -pub struct SE_AES_0_IV_3_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_0_IV_3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SE_AES_0_IV_3_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_AES_0_IV_3_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_aes_0_iv_3(&self) -> SE_AES_0_IV_3_R { - SE_AES_0_IV_3_R::new((self.bits & 0xffff_ffff) as u32) + SE_AES_0_IV_3_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn se_aes_0_iv_3(&mut self) -> SE_AES_0_IV_3_W { - SE_AES_0_IV_3_W { w: self } + #[must_use] + pub fn se_aes_0_iv_3(&mut self) -> SE_AES_0_IV_3_W<0> { + SE_AES_0_IV_3_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SE_AES_0_IV_3_SPEC { #[doc = "`write(|w| ..)` method takes [se_aes_0_iv_3::W](W) writer structure"] impl crate::Writable for SE_AES_0_IV_3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_aes_0_iv_3 to value 0"] impl crate::Resettable for SE_AES_0_IV_3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_aes_0_key_0.rs b/src/sec_eng/se_aes_0_key_0.rs index 74886b8..1a3c736 100644 --- a/src/sec_eng/se_aes_0_key_0.rs +++ b/src/sec_eng/se_aes_0_key_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `se_aes_0_key_0` reader - "] -pub struct SE_AES_0_KEY_0_R(crate::FieldReader); -impl SE_AES_0_KEY_0_R { - pub(crate) fn new(bits: u32) -> Self { - SE_AES_0_KEY_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_KEY_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_AES_0_KEY_0_R = crate::FieldReader; #[doc = "Field `se_aes_0_key_0` writer - "] -pub struct SE_AES_0_KEY_0_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_0_KEY_0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SE_AES_0_KEY_0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_AES_0_KEY_0_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_aes_0_key_0(&self) -> SE_AES_0_KEY_0_R { - SE_AES_0_KEY_0_R::new((self.bits & 0xffff_ffff) as u32) + SE_AES_0_KEY_0_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn se_aes_0_key_0(&mut self) -> SE_AES_0_KEY_0_W { - SE_AES_0_KEY_0_W { w: self } + #[must_use] + pub fn se_aes_0_key_0(&mut self) -> SE_AES_0_KEY_0_W<0> { + SE_AES_0_KEY_0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SE_AES_0_KEY_0_SPEC { #[doc = "`write(|w| ..)` method takes [se_aes_0_key_0::W](W) writer structure"] impl crate::Writable for SE_AES_0_KEY_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_aes_0_key_0 to value 0"] impl crate::Resettable for SE_AES_0_KEY_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_aes_0_key_1.rs b/src/sec_eng/se_aes_0_key_1.rs index 6a4465c..48244b2 100644 --- a/src/sec_eng/se_aes_0_key_1.rs +++ b/src/sec_eng/se_aes_0_key_1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `se_aes_0_key_1` reader - "] -pub struct SE_AES_0_KEY_1_R(crate::FieldReader); -impl SE_AES_0_KEY_1_R { - pub(crate) fn new(bits: u32) -> Self { - SE_AES_0_KEY_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_KEY_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_AES_0_KEY_1_R = crate::FieldReader; #[doc = "Field `se_aes_0_key_1` writer - "] -pub struct SE_AES_0_KEY_1_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_0_KEY_1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SE_AES_0_KEY_1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_AES_0_KEY_1_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_aes_0_key_1(&self) -> SE_AES_0_KEY_1_R { - SE_AES_0_KEY_1_R::new((self.bits & 0xffff_ffff) as u32) + SE_AES_0_KEY_1_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn se_aes_0_key_1(&mut self) -> SE_AES_0_KEY_1_W { - SE_AES_0_KEY_1_W { w: self } + #[must_use] + pub fn se_aes_0_key_1(&mut self) -> SE_AES_0_KEY_1_W<0> { + SE_AES_0_KEY_1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SE_AES_0_KEY_1_SPEC { #[doc = "`write(|w| ..)` method takes [se_aes_0_key_1::W](W) writer structure"] impl crate::Writable for SE_AES_0_KEY_1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_aes_0_key_1 to value 0"] impl crate::Resettable for SE_AES_0_KEY_1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_aes_0_key_2.rs b/src/sec_eng/se_aes_0_key_2.rs index 5b04a81..d39d4d2 100644 --- a/src/sec_eng/se_aes_0_key_2.rs +++ b/src/sec_eng/se_aes_0_key_2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `se_aes_0_key_2` reader - "] -pub struct SE_AES_0_KEY_2_R(crate::FieldReader); -impl SE_AES_0_KEY_2_R { - pub(crate) fn new(bits: u32) -> Self { - SE_AES_0_KEY_2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_KEY_2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_AES_0_KEY_2_R = crate::FieldReader; #[doc = "Field `se_aes_0_key_2` writer - "] -pub struct SE_AES_0_KEY_2_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_0_KEY_2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SE_AES_0_KEY_2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_AES_0_KEY_2_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_aes_0_key_2(&self) -> SE_AES_0_KEY_2_R { - SE_AES_0_KEY_2_R::new((self.bits & 0xffff_ffff) as u32) + SE_AES_0_KEY_2_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn se_aes_0_key_2(&mut self) -> SE_AES_0_KEY_2_W { - SE_AES_0_KEY_2_W { w: self } + #[must_use] + pub fn se_aes_0_key_2(&mut self) -> SE_AES_0_KEY_2_W<0> { + SE_AES_0_KEY_2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SE_AES_0_KEY_2_SPEC { #[doc = "`write(|w| ..)` method takes [se_aes_0_key_2::W](W) writer structure"] impl crate::Writable for SE_AES_0_KEY_2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_aes_0_key_2 to value 0"] impl crate::Resettable for SE_AES_0_KEY_2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_aes_0_key_3.rs b/src/sec_eng/se_aes_0_key_3.rs index 0700fd3..a814680 100644 --- a/src/sec_eng/se_aes_0_key_3.rs +++ b/src/sec_eng/se_aes_0_key_3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `se_aes_0_key_3` reader - "] -pub struct SE_AES_0_KEY_3_R(crate::FieldReader); -impl SE_AES_0_KEY_3_R { - pub(crate) fn new(bits: u32) -> Self { - SE_AES_0_KEY_3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_KEY_3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_AES_0_KEY_3_R = crate::FieldReader; #[doc = "Field `se_aes_0_key_3` writer - "] -pub struct SE_AES_0_KEY_3_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_0_KEY_3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SE_AES_0_KEY_3_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_AES_0_KEY_3_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_aes_0_key_3(&self) -> SE_AES_0_KEY_3_R { - SE_AES_0_KEY_3_R::new((self.bits & 0xffff_ffff) as u32) + SE_AES_0_KEY_3_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn se_aes_0_key_3(&mut self) -> SE_AES_0_KEY_3_W { - SE_AES_0_KEY_3_W { w: self } + #[must_use] + pub fn se_aes_0_key_3(&mut self) -> SE_AES_0_KEY_3_W<0> { + SE_AES_0_KEY_3_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SE_AES_0_KEY_3_SPEC { #[doc = "`write(|w| ..)` method takes [se_aes_0_key_3::W](W) writer structure"] impl crate::Writable for SE_AES_0_KEY_3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_aes_0_key_3 to value 0"] impl crate::Resettable for SE_AES_0_KEY_3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_aes_0_key_4.rs b/src/sec_eng/se_aes_0_key_4.rs index bf55af9..9b5cdee 100644 --- a/src/sec_eng/se_aes_0_key_4.rs +++ b/src/sec_eng/se_aes_0_key_4.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `se_aes_0_key_4` reader - "] -pub struct SE_AES_0_KEY_4_R(crate::FieldReader); -impl SE_AES_0_KEY_4_R { - pub(crate) fn new(bits: u32) -> Self { - SE_AES_0_KEY_4_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_KEY_4_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_AES_0_KEY_4_R = crate::FieldReader; #[doc = "Field `se_aes_0_key_4` writer - "] -pub struct SE_AES_0_KEY_4_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_0_KEY_4_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SE_AES_0_KEY_4_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_AES_0_KEY_4_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_aes_0_key_4(&self) -> SE_AES_0_KEY_4_R { - SE_AES_0_KEY_4_R::new((self.bits & 0xffff_ffff) as u32) + SE_AES_0_KEY_4_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn se_aes_0_key_4(&mut self) -> SE_AES_0_KEY_4_W { - SE_AES_0_KEY_4_W { w: self } + #[must_use] + pub fn se_aes_0_key_4(&mut self) -> SE_AES_0_KEY_4_W<0> { + SE_AES_0_KEY_4_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SE_AES_0_KEY_4_SPEC { #[doc = "`write(|w| ..)` method takes [se_aes_0_key_4::W](W) writer structure"] impl crate::Writable for SE_AES_0_KEY_4_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_aes_0_key_4 to value 0"] impl crate::Resettable for SE_AES_0_KEY_4_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_aes_0_key_5.rs b/src/sec_eng/se_aes_0_key_5.rs index 8e9afbe..6b185e4 100644 --- a/src/sec_eng/se_aes_0_key_5.rs +++ b/src/sec_eng/se_aes_0_key_5.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `se_aes_0_key_5` reader - "] -pub struct SE_AES_0_KEY_5_R(crate::FieldReader); -impl SE_AES_0_KEY_5_R { - pub(crate) fn new(bits: u32) -> Self { - SE_AES_0_KEY_5_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_KEY_5_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_AES_0_KEY_5_R = crate::FieldReader; #[doc = "Field `se_aes_0_key_5` writer - "] -pub struct SE_AES_0_KEY_5_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_0_KEY_5_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SE_AES_0_KEY_5_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_AES_0_KEY_5_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_aes_0_key_5(&self) -> SE_AES_0_KEY_5_R { - SE_AES_0_KEY_5_R::new((self.bits & 0xffff_ffff) as u32) + SE_AES_0_KEY_5_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn se_aes_0_key_5(&mut self) -> SE_AES_0_KEY_5_W { - SE_AES_0_KEY_5_W { w: self } + #[must_use] + pub fn se_aes_0_key_5(&mut self) -> SE_AES_0_KEY_5_W<0> { + SE_AES_0_KEY_5_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SE_AES_0_KEY_5_SPEC { #[doc = "`write(|w| ..)` method takes [se_aes_0_key_5::W](W) writer structure"] impl crate::Writable for SE_AES_0_KEY_5_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_aes_0_key_5 to value 0"] impl crate::Resettable for SE_AES_0_KEY_5_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_aes_0_key_6.rs b/src/sec_eng/se_aes_0_key_6.rs index 0401854..6e6840d 100644 --- a/src/sec_eng/se_aes_0_key_6.rs +++ b/src/sec_eng/se_aes_0_key_6.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `se_aes_0_key_6` reader - "] -pub struct SE_AES_0_KEY_6_R(crate::FieldReader); -impl SE_AES_0_KEY_6_R { - pub(crate) fn new(bits: u32) -> Self { - SE_AES_0_KEY_6_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_KEY_6_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_AES_0_KEY_6_R = crate::FieldReader; #[doc = "Field `se_aes_0_key_6` writer - "] -pub struct SE_AES_0_KEY_6_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_0_KEY_6_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SE_AES_0_KEY_6_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_AES_0_KEY_6_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_aes_0_key_6(&self) -> SE_AES_0_KEY_6_R { - SE_AES_0_KEY_6_R::new((self.bits & 0xffff_ffff) as u32) + SE_AES_0_KEY_6_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn se_aes_0_key_6(&mut self) -> SE_AES_0_KEY_6_W { - SE_AES_0_KEY_6_W { w: self } + #[must_use] + pub fn se_aes_0_key_6(&mut self) -> SE_AES_0_KEY_6_W<0> { + SE_AES_0_KEY_6_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SE_AES_0_KEY_6_SPEC { #[doc = "`write(|w| ..)` method takes [se_aes_0_key_6::W](W) writer structure"] impl crate::Writable for SE_AES_0_KEY_6_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_aes_0_key_6 to value 0"] impl crate::Resettable for SE_AES_0_KEY_6_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_aes_0_key_7.rs b/src/sec_eng/se_aes_0_key_7.rs index f279dcf..b6db33f 100644 --- a/src/sec_eng/se_aes_0_key_7.rs +++ b/src/sec_eng/se_aes_0_key_7.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `se_aes_0_key_7` reader - "] -pub struct SE_AES_0_KEY_7_R(crate::FieldReader); -impl SE_AES_0_KEY_7_R { - pub(crate) fn new(bits: u32) -> Self { - SE_AES_0_KEY_7_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_KEY_7_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_AES_0_KEY_7_R = crate::FieldReader; #[doc = "Field `se_aes_0_key_7` writer - "] -pub struct SE_AES_0_KEY_7_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_0_KEY_7_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SE_AES_0_KEY_7_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_AES_0_KEY_7_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_aes_0_key_7(&self) -> SE_AES_0_KEY_7_R { - SE_AES_0_KEY_7_R::new((self.bits & 0xffff_ffff) as u32) + SE_AES_0_KEY_7_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn se_aes_0_key_7(&mut self) -> SE_AES_0_KEY_7_W { - SE_AES_0_KEY_7_W { w: self } + #[must_use] + pub fn se_aes_0_key_7(&mut self) -> SE_AES_0_KEY_7_W<0> { + SE_AES_0_KEY_7_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SE_AES_0_KEY_7_SPEC { #[doc = "`write(|w| ..)` method takes [se_aes_0_key_7::W](W) writer structure"] impl crate::Writable for SE_AES_0_KEY_7_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_aes_0_key_7 to value 0"] impl crate::Resettable for SE_AES_0_KEY_7_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_aes_0_key_sel_0.rs b/src/sec_eng/se_aes_0_key_sel_0.rs index d4518da..c460ad8 100644 --- a/src/sec_eng/se_aes_0_key_sel_0.rs +++ b/src/sec_eng/se_aes_0_key_sel_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `se_aes_0_key_sel_0` reader - "] -pub struct SE_AES_0_KEY_SEL_0_R(crate::FieldReader); -impl SE_AES_0_KEY_SEL_0_R { - pub(crate) fn new(bits: u8) -> Self { - SE_AES_0_KEY_SEL_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_KEY_SEL_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_AES_0_KEY_SEL_0_R = crate::FieldReader; #[doc = "Field `se_aes_0_key_sel_0` writer - "] -pub struct SE_AES_0_KEY_SEL_0_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_0_KEY_SEL_0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w - } -} +pub type SE_AES_0_KEY_SEL_0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_AES_0_KEY_SEL_0_SPEC, u8, u8, 2, O>; impl R { #[doc = "Bits 0:1"] #[inline(always)] pub fn se_aes_0_key_sel_0(&self) -> SE_AES_0_KEY_SEL_0_R { - SE_AES_0_KEY_SEL_0_R::new((self.bits & 0x03) as u8) + SE_AES_0_KEY_SEL_0_R::new((self.bits & 3) as u8) } } impl W { #[doc = "Bits 0:1"] #[inline(always)] - pub fn se_aes_0_key_sel_0(&mut self) -> SE_AES_0_KEY_SEL_0_W { - SE_AES_0_KEY_SEL_0_W { w: self } + #[must_use] + pub fn se_aes_0_key_sel_0(&mut self) -> SE_AES_0_KEY_SEL_0_W<0> { + SE_AES_0_KEY_SEL_0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SE_AES_0_KEY_SEL_0_SPEC { #[doc = "`write(|w| ..)` method takes [se_aes_0_key_sel_0::W](W) writer structure"] impl crate::Writable for SE_AES_0_KEY_SEL_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_aes_0_key_sel_0 to value 0"] impl crate::Resettable for SE_AES_0_KEY_SEL_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_aes_0_key_sel_1.rs b/src/sec_eng/se_aes_0_key_sel_1.rs index 80a39d6..c204fb8 100644 --- a/src/sec_eng/se_aes_0_key_sel_1.rs +++ b/src/sec_eng/se_aes_0_key_sel_1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `se_aes_0_key_sel_1` reader - "] -pub struct SE_AES_0_KEY_SEL_1_R(crate::FieldReader); -impl SE_AES_0_KEY_SEL_1_R { - pub(crate) fn new(bits: u8) -> Self { - SE_AES_0_KEY_SEL_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_KEY_SEL_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_AES_0_KEY_SEL_1_R = crate::FieldReader; #[doc = "Field `se_aes_0_key_sel_1` writer - "] -pub struct SE_AES_0_KEY_SEL_1_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_0_KEY_SEL_1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w - } -} +pub type SE_AES_0_KEY_SEL_1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_AES_0_KEY_SEL_1_SPEC, u8, u8, 2, O>; impl R { #[doc = "Bits 0:1"] #[inline(always)] pub fn se_aes_0_key_sel_1(&self) -> SE_AES_0_KEY_SEL_1_R { - SE_AES_0_KEY_SEL_1_R::new((self.bits & 0x03) as u8) + SE_AES_0_KEY_SEL_1_R::new((self.bits & 3) as u8) } } impl W { #[doc = "Bits 0:1"] #[inline(always)] - pub fn se_aes_0_key_sel_1(&mut self) -> SE_AES_0_KEY_SEL_1_W { - SE_AES_0_KEY_SEL_1_W { w: self } + #[must_use] + pub fn se_aes_0_key_sel_1(&mut self) -> SE_AES_0_KEY_SEL_1_W<0> { + SE_AES_0_KEY_SEL_1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SE_AES_0_KEY_SEL_1_SPEC { #[doc = "`write(|w| ..)` method takes [se_aes_0_key_sel_1::W](W) writer structure"] impl crate::Writable for SE_AES_0_KEY_SEL_1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_aes_0_key_sel_1 to value 0"] impl crate::Resettable for SE_AES_0_KEY_SEL_1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_aes_0_link.rs b/src/sec_eng/se_aes_0_link.rs index 7d18654..1396ec5 100644 --- a/src/sec_eng/se_aes_0_link.rs +++ b/src/sec_eng/se_aes_0_link.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `se_aes_0_lca` reader - "] -pub struct SE_AES_0_LCA_R(crate::FieldReader); -impl SE_AES_0_LCA_R { - pub(crate) fn new(bits: u32) -> Self { - SE_AES_0_LCA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_LCA_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_AES_0_LCA_R = crate::FieldReader; #[doc = "Field `se_aes_0_lca` writer - "] -pub struct SE_AES_0_LCA_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_0_LCA_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SE_AES_0_LCA_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_AES_0_LINK_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_aes_0_lca(&self) -> SE_AES_0_LCA_R { - SE_AES_0_LCA_R::new((self.bits & 0xffff_ffff) as u32) + SE_AES_0_LCA_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn se_aes_0_lca(&mut self) -> SE_AES_0_LCA_W { - SE_AES_0_LCA_W { w: self } + #[must_use] + pub fn se_aes_0_lca(&mut self) -> SE_AES_0_LCA_W<0> { + SE_AES_0_LCA_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SE_AES_0_LINK_SPEC { #[doc = "`write(|w| ..)` method takes [se_aes_0_link::W](W) writer structure"] impl crate::Writable for SE_AES_0_LINK_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_aes_0_link to value 0"] impl crate::Resettable for SE_AES_0_LINK_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_aes_0_mda.rs b/src/sec_eng/se_aes_0_mda.rs index 9f773df..28cb849 100644 --- a/src/sec_eng/se_aes_0_mda.rs +++ b/src/sec_eng/se_aes_0_mda.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `se_aes_0_mda` reader - "] -pub struct SE_AES_0_MDA_R(crate::FieldReader); -impl SE_AES_0_MDA_R { - pub(crate) fn new(bits: u32) -> Self { - SE_AES_0_MDA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_MDA_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_AES_0_MDA_R = crate::FieldReader; #[doc = "Field `se_aes_0_mda` writer - "] -pub struct SE_AES_0_MDA_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_0_MDA_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SE_AES_0_MDA_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_AES_0_MDA_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_aes_0_mda(&self) -> SE_AES_0_MDA_R { - SE_AES_0_MDA_R::new((self.bits & 0xffff_ffff) as u32) + SE_AES_0_MDA_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn se_aes_0_mda(&mut self) -> SE_AES_0_MDA_W { - SE_AES_0_MDA_W { w: self } + #[must_use] + pub fn se_aes_0_mda(&mut self) -> SE_AES_0_MDA_W<0> { + SE_AES_0_MDA_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SE_AES_0_MDA_SPEC { #[doc = "`write(|w| ..)` method takes [se_aes_0_mda::W](W) writer structure"] impl crate::Writable for SE_AES_0_MDA_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_aes_0_mda to value 0"] impl crate::Resettable for SE_AES_0_MDA_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_aes_0_msa.rs b/src/sec_eng/se_aes_0_msa.rs index e11da97..43f8179 100644 --- a/src/sec_eng/se_aes_0_msa.rs +++ b/src/sec_eng/se_aes_0_msa.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `se_aes_0_msa` reader - "] -pub struct SE_AES_0_MSA_R(crate::FieldReader); -impl SE_AES_0_MSA_R { - pub(crate) fn new(bits: u32) -> Self { - SE_AES_0_MSA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_MSA_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_AES_0_MSA_R = crate::FieldReader; #[doc = "Field `se_aes_0_msa` writer - "] -pub struct SE_AES_0_MSA_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_0_MSA_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SE_AES_0_MSA_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_AES_0_MSA_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_aes_0_msa(&self) -> SE_AES_0_MSA_R { - SE_AES_0_MSA_R::new((self.bits & 0xffff_ffff) as u32) + SE_AES_0_MSA_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn se_aes_0_msa(&mut self) -> SE_AES_0_MSA_W { - SE_AES_0_MSA_W { w: self } + #[must_use] + pub fn se_aes_0_msa(&mut self) -> SE_AES_0_MSA_W<0> { + SE_AES_0_MSA_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SE_AES_0_MSA_SPEC { #[doc = "`write(|w| ..)` method takes [se_aes_0_msa::W](W) writer structure"] impl crate::Writable for SE_AES_0_MSA_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_aes_0_msa to value 0"] impl crate::Resettable for SE_AES_0_MSA_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_aes_0_sboot.rs b/src/sec_eng/se_aes_0_sboot.rs index 3c35ed6..a38282e 100644 --- a/src/sec_eng/se_aes_0_sboot.rs +++ b/src/sec_eng/se_aes_0_sboot.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,61 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `se_aes_0_sboot_key_sel` reader - "] -pub struct SE_AES_0_SBOOT_KEY_SEL_R(crate::FieldReader); -impl SE_AES_0_SBOOT_KEY_SEL_R { - pub(crate) fn new(bits: bool) -> Self { - SE_AES_0_SBOOT_KEY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_SBOOT_KEY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_AES_0_SBOOT_KEY_SEL_R = crate::BitReader; #[doc = "Field `se_aes_0_sboot_key_sel` writer - "] -pub struct SE_AES_0_SBOOT_KEY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SE_AES_0_SBOOT_KEY_SEL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type SE_AES_0_SBOOT_KEY_SEL_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_AES_0_SBOOT_SPEC, bool, O>; impl R { #[doc = "Bit 0"] #[inline(always)] pub fn se_aes_0_sboot_key_sel(&self) -> SE_AES_0_SBOOT_KEY_SEL_R { - SE_AES_0_SBOOT_KEY_SEL_R::new((self.bits & 0x01) != 0) + SE_AES_0_SBOOT_KEY_SEL_R::new((self.bits & 1) != 0) } } impl W { #[doc = "Bit 0"] #[inline(always)] - pub fn se_aes_0_sboot_key_sel(&mut self) -> SE_AES_0_SBOOT_KEY_SEL_W { - SE_AES_0_SBOOT_KEY_SEL_W { w: self } + #[must_use] + pub fn se_aes_0_sboot_key_sel(&mut self) -> SE_AES_0_SBOOT_KEY_SEL_W<0> { + SE_AES_0_SBOOT_KEY_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -99,11 +72,10 @@ impl crate::Readable for SE_AES_0_SBOOT_SPEC { #[doc = "`write(|w| ..)` method takes [se_aes_0_sboot::W](W) writer structure"] impl crate::Writable for SE_AES_0_SBOOT_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_aes_0_sboot to value 0"] impl crate::Resettable for SE_AES_0_SBOOT_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_aes_0_status.rs b/src/sec_eng/se_aes_0_status.rs index a5d1874..c2d80db 100644 --- a/src/sec_eng/se_aes_0_status.rs +++ b/src/sec_eng/se_aes_0_status.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `se_aes_0_status` reader - "] -pub struct SE_AES_0_STATUS_R(crate::FieldReader); -impl SE_AES_0_STATUS_R { - pub(crate) fn new(bits: u32) -> Self { - SE_AES_0_STATUS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_0_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_AES_0_STATUS_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_aes_0_status(&self) -> SE_AES_0_STATUS_R { - SE_AES_0_STATUS_R::new((self.bits & 0xffff_ffff) as u32) + SE_AES_0_STATUS_R::new(self.bits) } } #[doc = "se_aes_0_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 [se_aes_0_status](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SE_AES_0_STATUS_SPEC { } #[doc = "`reset()` method sets se_aes_0_status to value 0x0100"] impl crate::Resettable for SE_AES_0_STATUS_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0100 - } + const RESET_VALUE: Self::Ux = 0x0100; } diff --git a/src/sec_eng/se_cdet_0_ctrl_0.rs b/src/sec_eng/se_cdet_0_ctrl_0.rs index 935b714..a5b3b34 100644 --- a/src/sec_eng/se_cdet_0_ctrl_0.rs +++ b/src/sec_eng/se_cdet_0_ctrl_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,171 +28,79 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `se_cdet_0_g_loop_min` reader - "] -pub struct SE_CDET_0_G_LOOP_MIN_R(crate::FieldReader); -impl SE_CDET_0_G_LOOP_MIN_R { - pub(crate) fn new(bits: u8) -> Self { - SE_CDET_0_G_LOOP_MIN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_CDET_0_G_LOOP_MIN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_cdet_0_g_loop_min` writer - "] -pub struct SE_CDET_0_G_LOOP_MIN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_CDET_0_G_LOOP_MIN_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 24)) | ((value as u32 & 0xff) << 24); - self.w - } -} -#[doc = "Field `se_cdet_0_g_loop_max` reader - "] -pub struct SE_CDET_0_G_LOOP_MAX_R(crate::FieldReader); -impl SE_CDET_0_G_LOOP_MAX_R { - pub(crate) fn new(bits: u8) -> Self { - SE_CDET_0_G_LOOP_MAX_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_CDET_0_G_LOOP_MAX_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_cdet_0_g_loop_max` writer - "] -pub struct SE_CDET_0_G_LOOP_MAX_W<'a> { - w: &'a mut W, -} -impl<'a> SE_CDET_0_G_LOOP_MAX_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 16)) | ((value as u32 & 0xff) << 16); - self.w - } -} -#[doc = "Field `se_cdet_0_status` reader - "] -pub struct SE_CDET_0_STATUS_R(crate::FieldReader); -impl SE_CDET_0_STATUS_R { - pub(crate) fn new(bits: u16) -> Self { - SE_CDET_0_STATUS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_CDET_0_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_cdet_0_error` reader - "] -pub struct SE_CDET_0_ERROR_R(crate::FieldReader); -impl SE_CDET_0_ERROR_R { - pub(crate) fn new(bits: bool) -> Self { - SE_CDET_0_ERROR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_CDET_0_ERROR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} #[doc = "Field `se_cdet_0_en` reader - "] -pub struct SE_CDET_0_EN_R(crate::FieldReader); -impl SE_CDET_0_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_CDET_0_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_CDET_0_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_CDET_0_EN_R = crate::BitReader; #[doc = "Field `se_cdet_0_en` writer - "] -pub struct SE_CDET_0_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_CDET_0_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type SE_CDET_0_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_CDET_0_CTRL_0_SPEC, bool, O>; +#[doc = "Field `se_cdet_0_error` reader - "] +pub type SE_CDET_0_ERROR_R = crate::BitReader; +#[doc = "Field `se_cdet_0_status` reader - "] +pub type SE_CDET_0_STATUS_R = crate::FieldReader; +#[doc = "Field `se_cdet_0_g_loop_max` reader - "] +pub type SE_CDET_0_G_LOOP_MAX_R = crate::FieldReader; +#[doc = "Field `se_cdet_0_g_loop_max` writer - "] +pub type SE_CDET_0_G_LOOP_MAX_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_CDET_0_CTRL_0_SPEC, u8, u8, 8, O>; +#[doc = "Field `se_cdet_0_g_loop_min` reader - "] +pub type SE_CDET_0_G_LOOP_MIN_R = crate::FieldReader; +#[doc = "Field `se_cdet_0_g_loop_min` writer - "] +pub type SE_CDET_0_G_LOOP_MIN_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_CDET_0_CTRL_0_SPEC, u8, u8, 8, O>; impl R { - #[doc = "Bits 24:31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn se_cdet_0_g_loop_min(&self) -> SE_CDET_0_G_LOOP_MIN_R { - SE_CDET_0_G_LOOP_MIN_R::new(((self.bits >> 24) & 0xff) as u8) + pub fn se_cdet_0_en(&self) -> SE_CDET_0_EN_R { + SE_CDET_0_EN_R::new((self.bits & 1) != 0) } - #[doc = "Bits 16:23"] + #[doc = "Bit 1"] #[inline(always)] - pub fn se_cdet_0_g_loop_max(&self) -> SE_CDET_0_G_LOOP_MAX_R { - SE_CDET_0_G_LOOP_MAX_R::new(((self.bits >> 16) & 0xff) as u8) + pub fn se_cdet_0_error(&self) -> SE_CDET_0_ERROR_R { + SE_CDET_0_ERROR_R::new(((self.bits >> 1) & 1) != 0) } #[doc = "Bits 2:15"] #[inline(always)] pub fn se_cdet_0_status(&self) -> SE_CDET_0_STATUS_R { SE_CDET_0_STATUS_R::new(((self.bits >> 2) & 0x3fff) as u16) } - #[doc = "Bit 1"] + #[doc = "Bits 16:23"] #[inline(always)] - pub fn se_cdet_0_error(&self) -> SE_CDET_0_ERROR_R { - SE_CDET_0_ERROR_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn se_cdet_0_g_loop_max(&self) -> SE_CDET_0_G_LOOP_MAX_R { + SE_CDET_0_G_LOOP_MAX_R::new(((self.bits >> 16) & 0xff) as u8) } - #[doc = "Bit 0"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn se_cdet_0_en(&self) -> SE_CDET_0_EN_R { - SE_CDET_0_EN_R::new((self.bits & 0x01) != 0) + pub fn se_cdet_0_g_loop_min(&self) -> SE_CDET_0_G_LOOP_MIN_R { + SE_CDET_0_G_LOOP_MIN_R::new(((self.bits >> 24) & 0xff) as u8) } } impl W { - #[doc = "Bits 24:31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn se_cdet_0_g_loop_min(&mut self) -> SE_CDET_0_G_LOOP_MIN_W { - SE_CDET_0_G_LOOP_MIN_W { w: self } + #[must_use] + pub fn se_cdet_0_en(&mut self) -> SE_CDET_0_EN_W<0> { + SE_CDET_0_EN_W::new(self) } #[doc = "Bits 16:23"] #[inline(always)] - pub fn se_cdet_0_g_loop_max(&mut self) -> SE_CDET_0_G_LOOP_MAX_W { - SE_CDET_0_G_LOOP_MAX_W { w: self } + #[must_use] + pub fn se_cdet_0_g_loop_max(&mut self) -> SE_CDET_0_G_LOOP_MAX_W<16> { + SE_CDET_0_G_LOOP_MAX_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn se_cdet_0_en(&mut self) -> SE_CDET_0_EN_W { - SE_CDET_0_EN_W { w: self } + #[must_use] + pub fn se_cdet_0_g_loop_min(&mut self) -> SE_CDET_0_G_LOOP_MIN_W<24> { + SE_CDET_0_G_LOOP_MIN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -209,11 +118,10 @@ impl crate::Readable for SE_CDET_0_CTRL_0_SPEC { #[doc = "`write(|w| ..)` method takes [se_cdet_0_ctrl_0::W](W) writer structure"] impl crate::Writable for SE_CDET_0_CTRL_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_cdet_0_ctrl_0 to value 0x2164_0004"] impl crate::Resettable for SE_CDET_0_CTRL_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x2164_0004 - } + const RESET_VALUE: Self::Ux = 0x2164_0004; } diff --git a/src/sec_eng/se_cdet_0_ctrl_1.rs b/src/sec_eng/se_cdet_0_ctrl_1.rs index e542542..5643fb4 100644 --- a/src/sec_eng/se_cdet_0_ctrl_1.rs +++ b/src/sec_eng/se_cdet_0_ctrl_1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,123 +28,65 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `se_cdet_0_g_slp_n` reader - "] -pub struct SE_CDET_0_G_SLP_N_R(crate::FieldReader); -impl SE_CDET_0_G_SLP_N_R { - pub(crate) fn new(bits: u8) -> Self { - SE_CDET_0_G_SLP_N_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_CDET_0_G_SLP_N_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_cdet_0_g_slp_n` writer - "] -pub struct SE_CDET_0_G_SLP_N_W<'a> { - w: &'a mut W, -} -impl<'a> SE_CDET_0_G_SLP_N_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 16)) | ((value as u32 & 0xff) << 16); - self.w - } -} -#[doc = "Field `se_cdet_0_t_dly_n` reader - "] -pub struct SE_CDET_0_T_DLY_N_R(crate::FieldReader); -impl SE_CDET_0_T_DLY_N_R { - pub(crate) fn new(bits: u8) -> Self { - SE_CDET_0_T_DLY_N_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_CDET_0_T_DLY_N_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_cdet_0_t_dly_n` writer - "] -pub struct SE_CDET_0_T_DLY_N_W<'a> { - w: &'a mut W, -} -impl<'a> SE_CDET_0_T_DLY_N_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8); - self.w - } -} #[doc = "Field `se_cdet_0_t_loop_n` reader - "] -pub struct SE_CDET_0_T_LOOP_N_R(crate::FieldReader); -impl SE_CDET_0_T_LOOP_N_R { - pub(crate) fn new(bits: u8) -> Self { - SE_CDET_0_T_LOOP_N_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_CDET_0_T_LOOP_N_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_CDET_0_T_LOOP_N_R = crate::FieldReader; #[doc = "Field `se_cdet_0_t_loop_n` writer - "] -pub struct SE_CDET_0_T_LOOP_N_W<'a> { - w: &'a mut W, -} -impl<'a> SE_CDET_0_T_LOOP_N_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff); - self.w - } -} +pub type SE_CDET_0_T_LOOP_N_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_CDET_0_CTRL_1_SPEC, u8, u8, 8, O>; +#[doc = "Field `se_cdet_0_t_dly_n` reader - "] +pub type SE_CDET_0_T_DLY_N_R = crate::FieldReader; +#[doc = "Field `se_cdet_0_t_dly_n` writer - "] +pub type SE_CDET_0_T_DLY_N_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_CDET_0_CTRL_1_SPEC, u8, u8, 8, O>; +#[doc = "Field `se_cdet_0_g_slp_n` reader - "] +pub type SE_CDET_0_G_SLP_N_R = crate::FieldReader; +#[doc = "Field `se_cdet_0_g_slp_n` writer - "] +pub type SE_CDET_0_G_SLP_N_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_CDET_0_CTRL_1_SPEC, u8, u8, 8, O>; impl R { - #[doc = "Bits 16:23"] + #[doc = "Bits 0:7"] #[inline(always)] - pub fn se_cdet_0_g_slp_n(&self) -> SE_CDET_0_G_SLP_N_R { - SE_CDET_0_G_SLP_N_R::new(((self.bits >> 16) & 0xff) as u8) + pub fn se_cdet_0_t_loop_n(&self) -> SE_CDET_0_T_LOOP_N_R { + SE_CDET_0_T_LOOP_N_R::new((self.bits & 0xff) as u8) } #[doc = "Bits 8:15"] #[inline(always)] pub fn se_cdet_0_t_dly_n(&self) -> SE_CDET_0_T_DLY_N_R { SE_CDET_0_T_DLY_N_R::new(((self.bits >> 8) & 0xff) as u8) } - #[doc = "Bits 0:7"] + #[doc = "Bits 16:23"] #[inline(always)] - pub fn se_cdet_0_t_loop_n(&self) -> SE_CDET_0_T_LOOP_N_R { - SE_CDET_0_T_LOOP_N_R::new((self.bits & 0xff) as u8) + pub fn se_cdet_0_g_slp_n(&self) -> SE_CDET_0_G_SLP_N_R { + SE_CDET_0_G_SLP_N_R::new(((self.bits >> 16) & 0xff) as u8) } } impl W { - #[doc = "Bits 16:23"] + #[doc = "Bits 0:7"] #[inline(always)] - pub fn se_cdet_0_g_slp_n(&mut self) -> SE_CDET_0_G_SLP_N_W { - SE_CDET_0_G_SLP_N_W { w: self } + #[must_use] + pub fn se_cdet_0_t_loop_n(&mut self) -> SE_CDET_0_T_LOOP_N_W<0> { + SE_CDET_0_T_LOOP_N_W::new(self) } #[doc = "Bits 8:15"] #[inline(always)] - pub fn se_cdet_0_t_dly_n(&mut self) -> SE_CDET_0_T_DLY_N_W { - SE_CDET_0_T_DLY_N_W { w: self } + #[must_use] + pub fn se_cdet_0_t_dly_n(&mut self) -> SE_CDET_0_T_DLY_N_W<8> { + SE_CDET_0_T_DLY_N_W::new(self) } - #[doc = "Bits 0:7"] + #[doc = "Bits 16:23"] #[inline(always)] - pub fn se_cdet_0_t_loop_n(&mut self) -> SE_CDET_0_T_LOOP_N_W { - SE_CDET_0_T_LOOP_N_W { w: self } + #[must_use] + pub fn se_cdet_0_g_slp_n(&mut self) -> SE_CDET_0_G_SLP_N_W<16> { + SE_CDET_0_G_SLP_N_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -161,11 +104,10 @@ impl crate::Readable for SE_CDET_0_CTRL_1_SPEC { #[doc = "`write(|w| ..)` method takes [se_cdet_0_ctrl_1::W](W) writer structure"] impl crate::Writable for SE_CDET_0_CTRL_1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_cdet_0_ctrl_1 to value 0x00ff_0332"] impl crate::Resettable for SE_CDET_0_CTRL_1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x00ff_0332 - } + const RESET_VALUE: Self::Ux = 0x00ff_0332; } diff --git a/src/sec_eng/se_cdet_0_ctrl_prot.rs b/src/sec_eng/se_cdet_0_ctrl_prot.rs index 222467b..253553e 100644 --- a/src/sec_eng/se_cdet_0_ctrl_prot.rs +++ b/src/sec_eng/se_cdet_0_ctrl_prot.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,153 +28,65 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `se_cdet_id1_en` reader - "] -pub struct SE_CDET_ID1_EN_R(crate::FieldReader); -impl SE_CDET_ID1_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_CDET_ID1_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_CDET_ID1_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_cdet_id1_en` writer - "] -pub struct SE_CDET_ID1_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_CDET_ID1_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `se_cdet_id0_en` reader - "] -pub struct SE_CDET_ID0_EN_R(crate::FieldReader); -impl SE_CDET_ID0_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_CDET_ID0_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_CDET_ID0_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_cdet_id0_en` writer - "] -pub struct SE_CDET_ID0_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_CDET_ID0_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `se_cdet_prot_en` reader - "] -pub struct SE_CDET_PROT_EN_R(crate::FieldReader); -impl SE_CDET_PROT_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_CDET_PROT_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_CDET_PROT_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_CDET_PROT_EN_R = crate::BitReader; #[doc = "Field `se_cdet_prot_en` writer - "] -pub struct SE_CDET_PROT_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_CDET_PROT_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type SE_CDET_PROT_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_CDET_0_CTRL_PROT_SPEC, bool, O>; +#[doc = "Field `se_cdet_id0_en` reader - "] +pub type SE_CDET_ID0_EN_R = crate::BitReader; +#[doc = "Field `se_cdet_id0_en` writer - "] +pub type SE_CDET_ID0_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_CDET_0_CTRL_PROT_SPEC, bool, O>; +#[doc = "Field `se_cdet_id1_en` reader - "] +pub type SE_CDET_ID1_EN_R = crate::BitReader; +#[doc = "Field `se_cdet_id1_en` writer - "] +pub type SE_CDET_ID1_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_CDET_0_CTRL_PROT_SPEC, bool, O>; impl R { - #[doc = "Bit 2"] + #[doc = "Bit 0"] #[inline(always)] - pub fn se_cdet_id1_en(&self) -> SE_CDET_ID1_EN_R { - SE_CDET_ID1_EN_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn se_cdet_prot_en(&self) -> SE_CDET_PROT_EN_R { + SE_CDET_PROT_EN_R::new((self.bits & 1) != 0) } #[doc = "Bit 1"] #[inline(always)] pub fn se_cdet_id0_en(&self) -> SE_CDET_ID0_EN_R { - SE_CDET_ID0_EN_R::new(((self.bits >> 1) & 0x01) != 0) + SE_CDET_ID0_EN_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 2"] #[inline(always)] - pub fn se_cdet_prot_en(&self) -> SE_CDET_PROT_EN_R { - SE_CDET_PROT_EN_R::new((self.bits & 0x01) != 0) + pub fn se_cdet_id1_en(&self) -> SE_CDET_ID1_EN_R { + SE_CDET_ID1_EN_R::new(((self.bits >> 2) & 1) != 0) } } impl W { - #[doc = "Bit 2"] + #[doc = "Bit 0"] #[inline(always)] - pub fn se_cdet_id1_en(&mut self) -> SE_CDET_ID1_EN_W { - SE_CDET_ID1_EN_W { w: self } + #[must_use] + pub fn se_cdet_prot_en(&mut self) -> SE_CDET_PROT_EN_W<0> { + SE_CDET_PROT_EN_W::new(self) } #[doc = "Bit 1"] #[inline(always)] - pub fn se_cdet_id0_en(&mut self) -> SE_CDET_ID0_EN_W { - SE_CDET_ID0_EN_W { w: self } + #[must_use] + pub fn se_cdet_id0_en(&mut self) -> SE_CDET_ID0_EN_W<1> { + SE_CDET_ID0_EN_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 2"] #[inline(always)] - pub fn se_cdet_prot_en(&mut self) -> SE_CDET_PROT_EN_W { - SE_CDET_PROT_EN_W { w: self } + #[must_use] + pub fn se_cdet_id1_en(&mut self) -> SE_CDET_ID1_EN_W<2> { + SE_CDET_ID1_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -191,11 +104,10 @@ impl crate::Readable for SE_CDET_0_CTRL_PROT_SPEC { #[doc = "`write(|w| ..)` method takes [se_cdet_0_ctrl_prot::W](W) writer structure"] impl crate::Writable for SE_CDET_0_CTRL_PROT_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_cdet_0_ctrl_prot to value 0x07"] impl crate::Resettable for SE_CDET_0_CTRL_PROT_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x07 - } + const RESET_VALUE: Self::Ux = 0x07; } diff --git a/src/sec_eng/se_ctrl_prot_rd.rs b/src/sec_eng/se_ctrl_prot_rd.rs index 86e905f..36e66ce 100644 --- a/src/sec_eng/se_ctrl_prot_rd.rs +++ b/src/sec_eng/se_ctrl_prot_rd.rs @@ -7,372 +7,145 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `se_dbg_dis` reader - "] -pub struct SE_DBG_DIS_R(crate::FieldReader); -impl SE_DBG_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - SE_DBG_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_DBG_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_gmac_id1_en_rd` reader - "] -pub struct SE_GMAC_ID1_EN_RD_R(crate::FieldReader); -impl SE_GMAC_ID1_EN_RD_R { - pub(crate) fn new(bits: bool) -> Self { - SE_GMAC_ID1_EN_RD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_GMAC_ID1_EN_RD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_gmac_id0_en_rd` reader - "] -pub struct SE_GMAC_ID0_EN_RD_R(crate::FieldReader); -impl SE_GMAC_ID0_EN_RD_R { - pub(crate) fn new(bits: bool) -> Self { - SE_GMAC_ID0_EN_RD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_GMAC_ID0_EN_RD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_gmac_prot_en_rd` reader - "] -pub struct SE_GMAC_PROT_EN_RD_R(crate::FieldReader); -impl SE_GMAC_PROT_EN_RD_R { - pub(crate) fn new(bits: bool) -> Self { - SE_GMAC_PROT_EN_RD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_GMAC_PROT_EN_RD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_cdet_id1_en_rd` reader - "] -pub struct SE_CDET_ID1_EN_RD_R(crate::FieldReader); -impl SE_CDET_ID1_EN_RD_R { - pub(crate) fn new(bits: bool) -> Self { - SE_CDET_ID1_EN_RD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_CDET_ID1_EN_RD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_cdet_id0_en_rd` reader - "] -pub struct SE_CDET_ID0_EN_RD_R(crate::FieldReader); -impl SE_CDET_ID0_EN_RD_R { - pub(crate) fn new(bits: bool) -> Self { - SE_CDET_ID0_EN_RD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_CDET_ID0_EN_RD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_cdet_prot_en_rd` reader - "] -pub struct SE_CDET_PROT_EN_RD_R(crate::FieldReader); -impl SE_CDET_PROT_EN_RD_R { - pub(crate) fn new(bits: bool) -> Self { - SE_CDET_PROT_EN_RD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_CDET_PROT_EN_RD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_pka_id1_en_rd` reader - "] -pub struct SE_PKA_ID1_EN_RD_R(crate::FieldReader); -impl SE_PKA_ID1_EN_RD_R { - pub(crate) fn new(bits: bool) -> Self { - SE_PKA_ID1_EN_RD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_PKA_ID1_EN_RD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_pka_id0_en_rd` reader - "] -pub struct SE_PKA_ID0_EN_RD_R(crate::FieldReader); -impl SE_PKA_ID0_EN_RD_R { - pub(crate) fn new(bits: bool) -> Self { - SE_PKA_ID0_EN_RD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_PKA_ID0_EN_RD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_pka_prot_en_rd` reader - "] -pub struct SE_PKA_PROT_EN_RD_R(crate::FieldReader); -impl SE_PKA_PROT_EN_RD_R { - pub(crate) fn new(bits: bool) -> Self { - SE_PKA_PROT_EN_RD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_PKA_PROT_EN_RD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_trng_id1_en_rd` reader - "] -pub struct SE_TRNG_ID1_EN_RD_R(crate::FieldReader); -impl SE_TRNG_ID1_EN_RD_R { - pub(crate) fn new(bits: bool) -> Self { - SE_TRNG_ID1_EN_RD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_ID1_EN_RD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_trng_id0_en_rd` reader - "] -pub struct SE_TRNG_ID0_EN_RD_R(crate::FieldReader); -impl SE_TRNG_ID0_EN_RD_R { - pub(crate) fn new(bits: bool) -> Self { - SE_TRNG_ID0_EN_RD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_ID0_EN_RD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_trng_prot_en_rd` reader - "] -pub struct SE_TRNG_PROT_EN_RD_R(crate::FieldReader); -impl SE_TRNG_PROT_EN_RD_R { - pub(crate) fn new(bits: bool) -> Self { - SE_TRNG_PROT_EN_RD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_PROT_EN_RD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_aes_id1_en_rd` reader - "] -pub struct SE_AES_ID1_EN_RD_R(crate::FieldReader); -impl SE_AES_ID1_EN_RD_R { - pub(crate) fn new(bits: bool) -> Self { - SE_AES_ID1_EN_RD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_ID1_EN_RD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_aes_id0_en_rd` reader - "] -pub struct SE_AES_ID0_EN_RD_R(crate::FieldReader); -impl SE_AES_ID0_EN_RD_R { - pub(crate) fn new(bits: bool) -> Self { - SE_AES_ID0_EN_RD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_ID0_EN_RD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_aes_prot_en_rd` reader - "] -pub struct SE_AES_PROT_EN_RD_R(crate::FieldReader); -impl SE_AES_PROT_EN_RD_R { - pub(crate) fn new(bits: bool) -> Self { - SE_AES_PROT_EN_RD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_AES_PROT_EN_RD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_sha_id1_en_rd` reader - "] -pub struct SE_SHA_ID1_EN_RD_R(crate::FieldReader); -impl SE_SHA_ID1_EN_RD_R { - pub(crate) fn new(bits: bool) -> Self { - SE_SHA_ID1_EN_RD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_ID1_EN_RD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_sha_id0_en_rd` reader - "] -pub struct SE_SHA_ID0_EN_RD_R(crate::FieldReader); -impl SE_SHA_ID0_EN_RD_R { - pub(crate) fn new(bits: bool) -> Self { - SE_SHA_ID0_EN_RD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_ID0_EN_RD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} #[doc = "Field `se_sha_prot_en_rd` reader - "] -pub struct SE_SHA_PROT_EN_RD_R(crate::FieldReader); -impl SE_SHA_PROT_EN_RD_R { - pub(crate) fn new(bits: bool) -> Self { - SE_SHA_PROT_EN_RD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_PROT_EN_RD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_SHA_PROT_EN_RD_R = crate::BitReader; +#[doc = "Field `se_sha_id0_en_rd` reader - "] +pub type SE_SHA_ID0_EN_RD_R = crate::BitReader; +#[doc = "Field `se_sha_id1_en_rd` reader - "] +pub type SE_SHA_ID1_EN_RD_R = crate::BitReader; +#[doc = "Field `se_aes_prot_en_rd` reader - "] +pub type SE_AES_PROT_EN_RD_R = crate::BitReader; +#[doc = "Field `se_aes_id0_en_rd` reader - "] +pub type SE_AES_ID0_EN_RD_R = crate::BitReader; +#[doc = "Field `se_aes_id1_en_rd` reader - "] +pub type SE_AES_ID1_EN_RD_R = crate::BitReader; +#[doc = "Field `se_trng_prot_en_rd` reader - "] +pub type SE_TRNG_PROT_EN_RD_R = crate::BitReader; +#[doc = "Field `se_trng_id0_en_rd` reader - "] +pub type SE_TRNG_ID0_EN_RD_R = crate::BitReader; +#[doc = "Field `se_trng_id1_en_rd` reader - "] +pub type SE_TRNG_ID1_EN_RD_R = crate::BitReader; +#[doc = "Field `se_pka_prot_en_rd` reader - "] +pub type SE_PKA_PROT_EN_RD_R = crate::BitReader; +#[doc = "Field `se_pka_id0_en_rd` reader - "] +pub type SE_PKA_ID0_EN_RD_R = crate::BitReader; +#[doc = "Field `se_pka_id1_en_rd` reader - "] +pub type SE_PKA_ID1_EN_RD_R = crate::BitReader; +#[doc = "Field `se_cdet_prot_en_rd` reader - "] +pub type SE_CDET_PROT_EN_RD_R = crate::BitReader; +#[doc = "Field `se_cdet_id0_en_rd` reader - "] +pub type SE_CDET_ID0_EN_RD_R = crate::BitReader; +#[doc = "Field `se_cdet_id1_en_rd` reader - "] +pub type SE_CDET_ID1_EN_RD_R = crate::BitReader; +#[doc = "Field `se_gmac_prot_en_rd` reader - "] +pub type SE_GMAC_PROT_EN_RD_R = crate::BitReader; +#[doc = "Field `se_gmac_id0_en_rd` reader - "] +pub type SE_GMAC_ID0_EN_RD_R = crate::BitReader; +#[doc = "Field `se_gmac_id1_en_rd` reader - "] +pub type SE_GMAC_ID1_EN_RD_R = crate::BitReader; +#[doc = "Field `se_dbg_dis` reader - "] +pub type SE_DBG_DIS_R = crate::BitReader; impl R { - #[doc = "Bit 31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn se_dbg_dis(&self) -> SE_DBG_DIS_R { - SE_DBG_DIS_R::new(((self.bits >> 31) & 0x01) != 0) + pub fn se_sha_prot_en_rd(&self) -> SE_SHA_PROT_EN_RD_R { + SE_SHA_PROT_EN_RD_R::new((self.bits & 1) != 0) } - #[doc = "Bit 22"] + #[doc = "Bit 1"] #[inline(always)] - pub fn se_gmac_id1_en_rd(&self) -> SE_GMAC_ID1_EN_RD_R { - SE_GMAC_ID1_EN_RD_R::new(((self.bits >> 22) & 0x01) != 0) + pub fn se_sha_id0_en_rd(&self) -> SE_SHA_ID0_EN_RD_R { + SE_SHA_ID0_EN_RD_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 21"] + #[doc = "Bit 2"] #[inline(always)] - pub fn se_gmac_id0_en_rd(&self) -> SE_GMAC_ID0_EN_RD_R { - SE_GMAC_ID0_EN_RD_R::new(((self.bits >> 21) & 0x01) != 0) + pub fn se_sha_id1_en_rd(&self) -> SE_SHA_ID1_EN_RD_R { + SE_SHA_ID1_EN_RD_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 20"] + #[doc = "Bit 4"] #[inline(always)] - pub fn se_gmac_prot_en_rd(&self) -> SE_GMAC_PROT_EN_RD_R { - SE_GMAC_PROT_EN_RD_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn se_aes_prot_en_rd(&self) -> SE_AES_PROT_EN_RD_R { + SE_AES_PROT_EN_RD_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 18"] + #[doc = "Bit 5"] #[inline(always)] - pub fn se_cdet_id1_en_rd(&self) -> SE_CDET_ID1_EN_RD_R { - SE_CDET_ID1_EN_RD_R::new(((self.bits >> 18) & 0x01) != 0) + pub fn se_aes_id0_en_rd(&self) -> SE_AES_ID0_EN_RD_R { + SE_AES_ID0_EN_RD_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 17"] + #[doc = "Bit 6"] #[inline(always)] - pub fn se_cdet_id0_en_rd(&self) -> SE_CDET_ID0_EN_RD_R { - SE_CDET_ID0_EN_RD_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn se_aes_id1_en_rd(&self) -> SE_AES_ID1_EN_RD_R { + SE_AES_ID1_EN_RD_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = "Bit 16"] + #[doc = "Bit 8"] #[inline(always)] - pub fn se_cdet_prot_en_rd(&self) -> SE_CDET_PROT_EN_RD_R { - SE_CDET_PROT_EN_RD_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn se_trng_prot_en_rd(&self) -> SE_TRNG_PROT_EN_RD_R { + SE_TRNG_PROT_EN_RD_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bit 14"] + #[doc = "Bit 9"] #[inline(always)] - pub fn se_pka_id1_en_rd(&self) -> SE_PKA_ID1_EN_RD_R { - SE_PKA_ID1_EN_RD_R::new(((self.bits >> 14) & 0x01) != 0) + pub fn se_trng_id0_en_rd(&self) -> SE_TRNG_ID0_EN_RD_R { + SE_TRNG_ID0_EN_RD_R::new(((self.bits >> 9) & 1) != 0) } - #[doc = "Bit 13"] + #[doc = "Bit 10"] #[inline(always)] - pub fn se_pka_id0_en_rd(&self) -> SE_PKA_ID0_EN_RD_R { - SE_PKA_ID0_EN_RD_R::new(((self.bits >> 13) & 0x01) != 0) + pub fn se_trng_id1_en_rd(&self) -> SE_TRNG_ID1_EN_RD_R { + SE_TRNG_ID1_EN_RD_R::new(((self.bits >> 10) & 1) != 0) } #[doc = "Bit 12"] #[inline(always)] pub fn se_pka_prot_en_rd(&self) -> SE_PKA_PROT_EN_RD_R { - SE_PKA_PROT_EN_RD_R::new(((self.bits >> 12) & 0x01) != 0) + SE_PKA_PROT_EN_RD_R::new(((self.bits >> 12) & 1) != 0) } - #[doc = "Bit 10"] + #[doc = "Bit 13"] #[inline(always)] - pub fn se_trng_id1_en_rd(&self) -> SE_TRNG_ID1_EN_RD_R { - SE_TRNG_ID1_EN_RD_R::new(((self.bits >> 10) & 0x01) != 0) + pub fn se_pka_id0_en_rd(&self) -> SE_PKA_ID0_EN_RD_R { + SE_PKA_ID0_EN_RD_R::new(((self.bits >> 13) & 1) != 0) } - #[doc = "Bit 9"] + #[doc = "Bit 14"] #[inline(always)] - pub fn se_trng_id0_en_rd(&self) -> SE_TRNG_ID0_EN_RD_R { - SE_TRNG_ID0_EN_RD_R::new(((self.bits >> 9) & 0x01) != 0) + pub fn se_pka_id1_en_rd(&self) -> SE_PKA_ID1_EN_RD_R { + SE_PKA_ID1_EN_RD_R::new(((self.bits >> 14) & 1) != 0) } - #[doc = "Bit 8"] + #[doc = "Bit 16"] #[inline(always)] - pub fn se_trng_prot_en_rd(&self) -> SE_TRNG_PROT_EN_RD_R { - SE_TRNG_PROT_EN_RD_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn se_cdet_prot_en_rd(&self) -> SE_CDET_PROT_EN_RD_R { + SE_CDET_PROT_EN_RD_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 6"] + #[doc = "Bit 17"] #[inline(always)] - pub fn se_aes_id1_en_rd(&self) -> SE_AES_ID1_EN_RD_R { - SE_AES_ID1_EN_RD_R::new(((self.bits >> 6) & 0x01) != 0) + pub fn se_cdet_id0_en_rd(&self) -> SE_CDET_ID0_EN_RD_R { + SE_CDET_ID0_EN_RD_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bit 5"] + #[doc = "Bit 18"] #[inline(always)] - pub fn se_aes_id0_en_rd(&self) -> SE_AES_ID0_EN_RD_R { - SE_AES_ID0_EN_RD_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn se_cdet_id1_en_rd(&self) -> SE_CDET_ID1_EN_RD_R { + SE_CDET_ID1_EN_RD_R::new(((self.bits >> 18) & 1) != 0) } - #[doc = "Bit 4"] + #[doc = "Bit 20"] #[inline(always)] - pub fn se_aes_prot_en_rd(&self) -> SE_AES_PROT_EN_RD_R { - SE_AES_PROT_EN_RD_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn se_gmac_prot_en_rd(&self) -> SE_GMAC_PROT_EN_RD_R { + SE_GMAC_PROT_EN_RD_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bit 21"] #[inline(always)] - pub fn se_sha_id1_en_rd(&self) -> SE_SHA_ID1_EN_RD_R { - SE_SHA_ID1_EN_RD_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn se_gmac_id0_en_rd(&self) -> SE_GMAC_ID0_EN_RD_R { + SE_GMAC_ID0_EN_RD_R::new(((self.bits >> 21) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 22"] #[inline(always)] - pub fn se_sha_id0_en_rd(&self) -> SE_SHA_ID0_EN_RD_R { - SE_SHA_ID0_EN_RD_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn se_gmac_id1_en_rd(&self) -> SE_GMAC_ID1_EN_RD_R { + SE_GMAC_ID1_EN_RD_R::new(((self.bits >> 22) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 31"] #[inline(always)] - pub fn se_sha_prot_en_rd(&self) -> SE_SHA_PROT_EN_RD_R { - SE_SHA_PROT_EN_RD_R::new((self.bits & 0x01) != 0) + pub fn se_dbg_dis(&self) -> SE_DBG_DIS_R { + SE_DBG_DIS_R::new(((self.bits >> 31) & 1) != 0) } } #[doc = "se_ctrl_prot_rd.\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 [se_ctrl_prot_rd](index.html) module"] @@ -386,8 +159,5 @@ impl crate::Readable for SE_CTRL_PROT_RD_SPEC { } #[doc = "`reset()` method sets se_ctrl_prot_rd to value 0x0077_7777"] impl crate::Resettable for SE_CTRL_PROT_RD_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0077_7777 - } + const RESET_VALUE: Self::Ux = 0x0077_7777; } diff --git a/src/sec_eng/se_ctrl_reserved_0.rs b/src/sec_eng/se_ctrl_reserved_0.rs index 759fac7..91345fe 100644 --- a/src/sec_eng/se_ctrl_reserved_0.rs +++ b/src/sec_eng/se_ctrl_reserved_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `se_ctrl_reserved_0` reader - "] -pub struct SE_CTRL_RESERVED_0_R(crate::FieldReader); -impl SE_CTRL_RESERVED_0_R { - pub(crate) fn new(bits: u32) -> Self { - SE_CTRL_RESERVED_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_CTRL_RESERVED_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_CTRL_RESERVED_0_R = crate::FieldReader; #[doc = "Field `se_ctrl_reserved_0` writer - "] -pub struct SE_CTRL_RESERVED_0_W<'a> { - w: &'a mut W, -} -impl<'a> SE_CTRL_RESERVED_0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SE_CTRL_RESERVED_0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_CTRL_RESERVED_0_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_ctrl_reserved_0(&self) -> SE_CTRL_RESERVED_0_R { - SE_CTRL_RESERVED_0_R::new((self.bits & 0xffff_ffff) as u32) + SE_CTRL_RESERVED_0_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn se_ctrl_reserved_0(&mut self) -> SE_CTRL_RESERVED_0_W { - SE_CTRL_RESERVED_0_W { w: self } + #[must_use] + pub fn se_ctrl_reserved_0(&mut self) -> SE_CTRL_RESERVED_0_W<0> { + SE_CTRL_RESERVED_0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SE_CTRL_RESERVED_0_SPEC { #[doc = "`write(|w| ..)` method takes [se_ctrl_reserved_0::W](W) writer structure"] impl crate::Writable for SE_CTRL_RESERVED_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_ctrl_reserved_0 to value 0"] impl crate::Resettable for SE_CTRL_RESERVED_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_ctrl_reserved_1.rs b/src/sec_eng/se_ctrl_reserved_1.rs index f04bcb1..6716d16 100644 --- a/src/sec_eng/se_ctrl_reserved_1.rs +++ b/src/sec_eng/se_ctrl_reserved_1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `se_ctrl_reserved_1` reader - "] -pub struct SE_CTRL_RESERVED_1_R(crate::FieldReader); -impl SE_CTRL_RESERVED_1_R { - pub(crate) fn new(bits: u32) -> Self { - SE_CTRL_RESERVED_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_CTRL_RESERVED_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_CTRL_RESERVED_1_R = crate::FieldReader; #[doc = "Field `se_ctrl_reserved_1` writer - "] -pub struct SE_CTRL_RESERVED_1_W<'a> { - w: &'a mut W, -} -impl<'a> SE_CTRL_RESERVED_1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SE_CTRL_RESERVED_1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_CTRL_RESERVED_1_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_ctrl_reserved_1(&self) -> SE_CTRL_RESERVED_1_R { - SE_CTRL_RESERVED_1_R::new((self.bits & 0xffff_ffff) as u32) + SE_CTRL_RESERVED_1_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn se_ctrl_reserved_1(&mut self) -> SE_CTRL_RESERVED_1_W { - SE_CTRL_RESERVED_1_W { w: self } + #[must_use] + pub fn se_ctrl_reserved_1(&mut self) -> SE_CTRL_RESERVED_1_W<0> { + SE_CTRL_RESERVED_1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SE_CTRL_RESERVED_1_SPEC { #[doc = "`write(|w| ..)` method takes [se_ctrl_reserved_1::W](W) writer structure"] impl crate::Writable for SE_CTRL_RESERVED_1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_ctrl_reserved_1 to value 0"] impl crate::Resettable for SE_CTRL_RESERVED_1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_ctrl_reserved_2.rs b/src/sec_eng/se_ctrl_reserved_2.rs index d18e0d7..20f3972 100644 --- a/src/sec_eng/se_ctrl_reserved_2.rs +++ b/src/sec_eng/se_ctrl_reserved_2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `se_ctrl_reserved_2` reader - "] -pub struct SE_CTRL_RESERVED_2_R(crate::FieldReader); -impl SE_CTRL_RESERVED_2_R { - pub(crate) fn new(bits: u32) -> Self { - SE_CTRL_RESERVED_2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_CTRL_RESERVED_2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_CTRL_RESERVED_2_R = crate::FieldReader; #[doc = "Field `se_ctrl_reserved_2` writer - "] -pub struct SE_CTRL_RESERVED_2_W<'a> { - w: &'a mut W, -} -impl<'a> SE_CTRL_RESERVED_2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SE_CTRL_RESERVED_2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_CTRL_RESERVED_2_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_ctrl_reserved_2(&self) -> SE_CTRL_RESERVED_2_R { - SE_CTRL_RESERVED_2_R::new((self.bits & 0xffff_ffff) as u32) + SE_CTRL_RESERVED_2_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn se_ctrl_reserved_2(&mut self) -> SE_CTRL_RESERVED_2_W { - SE_CTRL_RESERVED_2_W { w: self } + #[must_use] + pub fn se_ctrl_reserved_2(&mut self) -> SE_CTRL_RESERVED_2_W<0> { + SE_CTRL_RESERVED_2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SE_CTRL_RESERVED_2_SPEC { #[doc = "`write(|w| ..)` method takes [se_ctrl_reserved_2::W](W) writer structure"] impl crate::Writable for SE_CTRL_RESERVED_2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_ctrl_reserved_2 to value 0"] impl crate::Resettable for SE_CTRL_RESERVED_2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_gmac_0_ctrl_0.rs b/src/sec_eng/se_gmac_0_ctrl_0.rs index 9326265..8b28472 100644 --- a/src/sec_eng/se_gmac_0_ctrl_0.rs +++ b/src/sec_eng/se_gmac_0_ctrl_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,421 +28,159 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `se_gmac_0_x_endian` reader - "] -pub struct SE_GMAC_0_X_ENDIAN_R(crate::FieldReader); -impl SE_GMAC_0_X_ENDIAN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_GMAC_0_X_ENDIAN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_GMAC_0_X_ENDIAN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_gmac_0_x_endian` writer - "] -pub struct SE_GMAC_0_X_ENDIAN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_GMAC_0_X_ENDIAN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14); - self.w - } -} -#[doc = "Field `se_gmac_0_h_endian` reader - "] -pub struct SE_GMAC_0_H_ENDIAN_R(crate::FieldReader); -impl SE_GMAC_0_H_ENDIAN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_GMAC_0_H_ENDIAN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_GMAC_0_H_ENDIAN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_gmac_0_h_endian` writer - "] -pub struct SE_GMAC_0_H_ENDIAN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_GMAC_0_H_ENDIAN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13); - self.w - } -} -#[doc = "Field `se_gmac_0_t_endian` reader - "] -pub struct SE_GMAC_0_T_ENDIAN_R(crate::FieldReader); -impl SE_GMAC_0_T_ENDIAN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_GMAC_0_T_ENDIAN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_GMAC_0_T_ENDIAN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_gmac_0_t_endian` writer - "] -pub struct SE_GMAC_0_T_ENDIAN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_GMAC_0_T_ENDIAN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} -#[doc = "Field `se_gmac_0_int_mask` reader - "] -pub struct SE_GMAC_0_INT_MASK_R(crate::FieldReader); -impl SE_GMAC_0_INT_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - SE_GMAC_0_INT_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_GMAC_0_INT_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_gmac_0_int_mask` writer - "] -pub struct SE_GMAC_0_INT_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> SE_GMAC_0_INT_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w - } -} -#[doc = "Field `se_gmac_0_int_set_1t` reader - "] -pub struct SE_GMAC_0_INT_SET_1T_R(crate::FieldReader); -impl SE_GMAC_0_INT_SET_1T_R { - pub(crate) fn new(bits: bool) -> Self { - SE_GMAC_0_INT_SET_1T_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_GMAC_0_INT_SET_1T_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_gmac_0_int_set_1t` writer - "] -pub struct SE_GMAC_0_INT_SET_1T_W<'a> { - w: &'a mut W, -} -impl<'a> SE_GMAC_0_INT_SET_1T_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); - self.w - } -} -#[doc = "Field `se_gmac_0_int_clr_1t` reader - "] -pub struct SE_GMAC_0_INT_CLR_1T_R(crate::FieldReader); -impl SE_GMAC_0_INT_CLR_1T_R { - pub(crate) fn new(bits: bool) -> Self { - SE_GMAC_0_INT_CLR_1T_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_GMAC_0_INT_CLR_1T_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_gmac_0_int_clr_1t` writer - "] -pub struct SE_GMAC_0_INT_CLR_1T_W<'a> { - w: &'a mut W, -} -impl<'a> SE_GMAC_0_INT_CLR_1T_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w - } -} -#[doc = "Field `se_gmac_0_int` reader - "] -pub struct SE_GMAC_0_INT_R(crate::FieldReader); -impl SE_GMAC_0_INT_R { - pub(crate) fn new(bits: bool) -> Self { - SE_GMAC_0_INT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_GMAC_0_INT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_gmac_0_en` reader - "] -pub struct SE_GMAC_0_EN_R(crate::FieldReader); -impl SE_GMAC_0_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_GMAC_0_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_GMAC_0_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_gmac_0_en` writer - "] -pub struct SE_GMAC_0_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_GMAC_0_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} +#[doc = "Field `se_gmac_0_busy` reader - "] +pub type SE_GMAC_0_BUSY_R = crate::BitReader; #[doc = "Field `se_gmac_0_trig_1t` reader - "] -pub struct SE_GMAC_0_TRIG_1T_R(crate::FieldReader); -impl SE_GMAC_0_TRIG_1T_R { - pub(crate) fn new(bits: bool) -> Self { - SE_GMAC_0_TRIG_1T_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_GMAC_0_TRIG_1T_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_GMAC_0_TRIG_1T_R = crate::BitReader; #[doc = "Field `se_gmac_0_trig_1t` writer - "] -pub struct SE_GMAC_0_TRIG_1T_W<'a> { - w: &'a mut W, -} -impl<'a> SE_GMAC_0_TRIG_1T_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} -#[doc = "Field `se_gmac_0_busy` reader - "] -pub struct SE_GMAC_0_BUSY_R(crate::FieldReader); -impl SE_GMAC_0_BUSY_R { - pub(crate) fn new(bits: bool) -> Self { - SE_GMAC_0_BUSY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_GMAC_0_BUSY_R { - type Target = crate::FieldReader; +pub type SE_GMAC_0_TRIG_1T_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_GMAC_0_CTRL_0_SPEC, bool, O>; +#[doc = "Field `se_gmac_0_en` reader - "] +pub type SE_GMAC_0_EN_R = crate::BitReader; +#[doc = "Field `se_gmac_0_en` writer - "] +pub type SE_GMAC_0_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_GMAC_0_CTRL_0_SPEC, bool, O>; +#[doc = "Field `se_gmac_0_int` reader - "] +pub type SE_GMAC_0_INT_R = crate::BitReader; +#[doc = "Field `se_gmac_0_int_clr_1t` reader - "] +pub type SE_GMAC_0_INT_CLR_1T_R = crate::BitReader; +#[doc = "Field `se_gmac_0_int_clr_1t` writer - "] +pub type SE_GMAC_0_INT_CLR_1T_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_GMAC_0_CTRL_0_SPEC, bool, O>; +#[doc = "Field `se_gmac_0_int_set_1t` reader - "] +pub type SE_GMAC_0_INT_SET_1T_R = crate::BitReader; +#[doc = "Field `se_gmac_0_int_set_1t` writer - "] +pub type SE_GMAC_0_INT_SET_1T_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_GMAC_0_CTRL_0_SPEC, bool, O>; +#[doc = "Field `se_gmac_0_int_mask` reader - "] +pub type SE_GMAC_0_INT_MASK_R = crate::BitReader; +#[doc = "Field `se_gmac_0_int_mask` writer - "] +pub type SE_GMAC_0_INT_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_GMAC_0_CTRL_0_SPEC, bool, O>; +#[doc = "Field `se_gmac_0_t_endian` reader - "] +pub type SE_GMAC_0_T_ENDIAN_R = crate::BitReader; +#[doc = "Field `se_gmac_0_t_endian` writer - "] +pub type SE_GMAC_0_T_ENDIAN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_GMAC_0_CTRL_0_SPEC, bool, O>; +#[doc = "Field `se_gmac_0_h_endian` reader - "] +pub type SE_GMAC_0_H_ENDIAN_R = crate::BitReader; +#[doc = "Field `se_gmac_0_h_endian` writer - "] +pub type SE_GMAC_0_H_ENDIAN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_GMAC_0_CTRL_0_SPEC, bool, O>; +#[doc = "Field `se_gmac_0_x_endian` reader - "] +pub type SE_GMAC_0_X_ENDIAN_R = crate::BitReader; +#[doc = "Field `se_gmac_0_x_endian` writer - "] +pub type SE_GMAC_0_X_ENDIAN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_GMAC_0_CTRL_0_SPEC, bool, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn se_gmac_0_busy(&self) -> SE_GMAC_0_BUSY_R { + SE_GMAC_0_BUSY_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bit 14"] + #[doc = "Bit 1"] #[inline(always)] - pub fn se_gmac_0_x_endian(&self) -> SE_GMAC_0_X_ENDIAN_R { - SE_GMAC_0_X_ENDIAN_R::new(((self.bits >> 14) & 0x01) != 0) + pub fn se_gmac_0_trig_1t(&self) -> SE_GMAC_0_TRIG_1T_R { + SE_GMAC_0_TRIG_1T_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 13"] + #[doc = "Bit 2"] #[inline(always)] - pub fn se_gmac_0_h_endian(&self) -> SE_GMAC_0_H_ENDIAN_R { - SE_GMAC_0_H_ENDIAN_R::new(((self.bits >> 13) & 0x01) != 0) + pub fn se_gmac_0_en(&self) -> SE_GMAC_0_EN_R { + SE_GMAC_0_EN_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 12"] + #[doc = "Bit 8"] #[inline(always)] - pub fn se_gmac_0_t_endian(&self) -> SE_GMAC_0_T_ENDIAN_R { - SE_GMAC_0_T_ENDIAN_R::new(((self.bits >> 12) & 0x01) != 0) + pub fn se_gmac_0_int(&self) -> SE_GMAC_0_INT_R { + SE_GMAC_0_INT_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bit 11"] + #[doc = "Bit 9"] #[inline(always)] - pub fn se_gmac_0_int_mask(&self) -> SE_GMAC_0_INT_MASK_R { - SE_GMAC_0_INT_MASK_R::new(((self.bits >> 11) & 0x01) != 0) + pub fn se_gmac_0_int_clr_1t(&self) -> SE_GMAC_0_INT_CLR_1T_R { + SE_GMAC_0_INT_CLR_1T_R::new(((self.bits >> 9) & 1) != 0) } #[doc = "Bit 10"] #[inline(always)] pub fn se_gmac_0_int_set_1t(&self) -> SE_GMAC_0_INT_SET_1T_R { - SE_GMAC_0_INT_SET_1T_R::new(((self.bits >> 10) & 0x01) != 0) - } - #[doc = "Bit 9"] - #[inline(always)] - pub fn se_gmac_0_int_clr_1t(&self) -> SE_GMAC_0_INT_CLR_1T_R { - SE_GMAC_0_INT_CLR_1T_R::new(((self.bits >> 9) & 0x01) != 0) + SE_GMAC_0_INT_SET_1T_R::new(((self.bits >> 10) & 1) != 0) } - #[doc = "Bit 8"] + #[doc = "Bit 11"] #[inline(always)] - pub fn se_gmac_0_int(&self) -> SE_GMAC_0_INT_R { - SE_GMAC_0_INT_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn se_gmac_0_int_mask(&self) -> SE_GMAC_0_INT_MASK_R { + SE_GMAC_0_INT_MASK_R::new(((self.bits >> 11) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bit 12"] #[inline(always)] - pub fn se_gmac_0_en(&self) -> SE_GMAC_0_EN_R { - SE_GMAC_0_EN_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn se_gmac_0_t_endian(&self) -> SE_GMAC_0_T_ENDIAN_R { + SE_GMAC_0_T_ENDIAN_R::new(((self.bits >> 12) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 13"] #[inline(always)] - pub fn se_gmac_0_trig_1t(&self) -> SE_GMAC_0_TRIG_1T_R { - SE_GMAC_0_TRIG_1T_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn se_gmac_0_h_endian(&self) -> SE_GMAC_0_H_ENDIAN_R { + SE_GMAC_0_H_ENDIAN_R::new(((self.bits >> 13) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 14"] #[inline(always)] - pub fn se_gmac_0_busy(&self) -> SE_GMAC_0_BUSY_R { - SE_GMAC_0_BUSY_R::new((self.bits & 0x01) != 0) + pub fn se_gmac_0_x_endian(&self) -> SE_GMAC_0_X_ENDIAN_R { + SE_GMAC_0_X_ENDIAN_R::new(((self.bits >> 14) & 1) != 0) } } impl W { - #[doc = "Bit 14"] + #[doc = "Bit 1"] #[inline(always)] - pub fn se_gmac_0_x_endian(&mut self) -> SE_GMAC_0_X_ENDIAN_W { - SE_GMAC_0_X_ENDIAN_W { w: self } + #[must_use] + pub fn se_gmac_0_trig_1t(&mut self) -> SE_GMAC_0_TRIG_1T_W<1> { + SE_GMAC_0_TRIG_1T_W::new(self) } - #[doc = "Bit 13"] + #[doc = "Bit 2"] #[inline(always)] - pub fn se_gmac_0_h_endian(&mut self) -> SE_GMAC_0_H_ENDIAN_W { - SE_GMAC_0_H_ENDIAN_W { w: self } + #[must_use] + pub fn se_gmac_0_en(&mut self) -> SE_GMAC_0_EN_W<2> { + SE_GMAC_0_EN_W::new(self) } - #[doc = "Bit 12"] + #[doc = "Bit 9"] #[inline(always)] - pub fn se_gmac_0_t_endian(&mut self) -> SE_GMAC_0_T_ENDIAN_W { - SE_GMAC_0_T_ENDIAN_W { w: self } + #[must_use] + pub fn se_gmac_0_int_clr_1t(&mut self) -> SE_GMAC_0_INT_CLR_1T_W<9> { + SE_GMAC_0_INT_CLR_1T_W::new(self) } - #[doc = "Bit 11"] + #[doc = "Bit 10"] #[inline(always)] - pub fn se_gmac_0_int_mask(&mut self) -> SE_GMAC_0_INT_MASK_W { - SE_GMAC_0_INT_MASK_W { w: self } + #[must_use] + pub fn se_gmac_0_int_set_1t(&mut self) -> SE_GMAC_0_INT_SET_1T_W<10> { + SE_GMAC_0_INT_SET_1T_W::new(self) } - #[doc = "Bit 10"] + #[doc = "Bit 11"] #[inline(always)] - pub fn se_gmac_0_int_set_1t(&mut self) -> SE_GMAC_0_INT_SET_1T_W { - SE_GMAC_0_INT_SET_1T_W { w: self } + #[must_use] + pub fn se_gmac_0_int_mask(&mut self) -> SE_GMAC_0_INT_MASK_W<11> { + SE_GMAC_0_INT_MASK_W::new(self) } - #[doc = "Bit 9"] + #[doc = "Bit 12"] #[inline(always)] - pub fn se_gmac_0_int_clr_1t(&mut self) -> SE_GMAC_0_INT_CLR_1T_W { - SE_GMAC_0_INT_CLR_1T_W { w: self } + #[must_use] + pub fn se_gmac_0_t_endian(&mut self) -> SE_GMAC_0_T_ENDIAN_W<12> { + SE_GMAC_0_T_ENDIAN_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bit 13"] #[inline(always)] - pub fn se_gmac_0_en(&mut self) -> SE_GMAC_0_EN_W { - SE_GMAC_0_EN_W { w: self } + #[must_use] + pub fn se_gmac_0_h_endian(&mut self) -> SE_GMAC_0_H_ENDIAN_W<13> { + SE_GMAC_0_H_ENDIAN_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 14"] #[inline(always)] - pub fn se_gmac_0_trig_1t(&mut self) -> SE_GMAC_0_TRIG_1T_W { - SE_GMAC_0_TRIG_1T_W { w: self } + #[must_use] + pub fn se_gmac_0_x_endian(&mut self) -> SE_GMAC_0_X_ENDIAN_W<14> { + SE_GMAC_0_X_ENDIAN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -459,11 +198,10 @@ impl crate::Readable for SE_GMAC_0_CTRL_0_SPEC { #[doc = "`write(|w| ..)` method takes [se_gmac_0_ctrl_0::W](W) writer structure"] impl crate::Writable for SE_GMAC_0_CTRL_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_gmac_0_ctrl_0 to value 0x7000"] impl crate::Resettable for SE_GMAC_0_CTRL_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x7000 - } + const RESET_VALUE: Self::Ux = 0x7000; } diff --git a/src/sec_eng/se_gmac_0_ctrl_prot.rs b/src/sec_eng/se_gmac_0_ctrl_prot.rs index 8595cd0..c673a23 100644 --- a/src/sec_eng/se_gmac_0_ctrl_prot.rs +++ b/src/sec_eng/se_gmac_0_ctrl_prot.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,153 +28,65 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `se_gmac_id1_en` reader - "] -pub struct SE_GMAC_ID1_EN_R(crate::FieldReader); -impl SE_GMAC_ID1_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_GMAC_ID1_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_GMAC_ID1_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_gmac_id1_en` writer - "] -pub struct SE_GMAC_ID1_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_GMAC_ID1_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `se_gmac_id0_en` reader - "] -pub struct SE_GMAC_ID0_EN_R(crate::FieldReader); -impl SE_GMAC_ID0_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_GMAC_ID0_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_GMAC_ID0_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_gmac_id0_en` writer - "] -pub struct SE_GMAC_ID0_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_GMAC_ID0_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `se_gmac_prot_en` reader - "] -pub struct SE_GMAC_PROT_EN_R(crate::FieldReader); -impl SE_GMAC_PROT_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_GMAC_PROT_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_GMAC_PROT_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_GMAC_PROT_EN_R = crate::BitReader; #[doc = "Field `se_gmac_prot_en` writer - "] -pub struct SE_GMAC_PROT_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_GMAC_PROT_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type SE_GMAC_PROT_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_GMAC_0_CTRL_PROT_SPEC, bool, O>; +#[doc = "Field `se_gmac_id0_en` reader - "] +pub type SE_GMAC_ID0_EN_R = crate::BitReader; +#[doc = "Field `se_gmac_id0_en` writer - "] +pub type SE_GMAC_ID0_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_GMAC_0_CTRL_PROT_SPEC, bool, O>; +#[doc = "Field `se_gmac_id1_en` reader - "] +pub type SE_GMAC_ID1_EN_R = crate::BitReader; +#[doc = "Field `se_gmac_id1_en` writer - "] +pub type SE_GMAC_ID1_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_GMAC_0_CTRL_PROT_SPEC, bool, O>; impl R { - #[doc = "Bit 2"] + #[doc = "Bit 0"] #[inline(always)] - pub fn se_gmac_id1_en(&self) -> SE_GMAC_ID1_EN_R { - SE_GMAC_ID1_EN_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn se_gmac_prot_en(&self) -> SE_GMAC_PROT_EN_R { + SE_GMAC_PROT_EN_R::new((self.bits & 1) != 0) } #[doc = "Bit 1"] #[inline(always)] pub fn se_gmac_id0_en(&self) -> SE_GMAC_ID0_EN_R { - SE_GMAC_ID0_EN_R::new(((self.bits >> 1) & 0x01) != 0) + SE_GMAC_ID0_EN_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 2"] #[inline(always)] - pub fn se_gmac_prot_en(&self) -> SE_GMAC_PROT_EN_R { - SE_GMAC_PROT_EN_R::new((self.bits & 0x01) != 0) + pub fn se_gmac_id1_en(&self) -> SE_GMAC_ID1_EN_R { + SE_GMAC_ID1_EN_R::new(((self.bits >> 2) & 1) != 0) } } impl W { - #[doc = "Bit 2"] + #[doc = "Bit 0"] #[inline(always)] - pub fn se_gmac_id1_en(&mut self) -> SE_GMAC_ID1_EN_W { - SE_GMAC_ID1_EN_W { w: self } + #[must_use] + pub fn se_gmac_prot_en(&mut self) -> SE_GMAC_PROT_EN_W<0> { + SE_GMAC_PROT_EN_W::new(self) } #[doc = "Bit 1"] #[inline(always)] - pub fn se_gmac_id0_en(&mut self) -> SE_GMAC_ID0_EN_W { - SE_GMAC_ID0_EN_W { w: self } + #[must_use] + pub fn se_gmac_id0_en(&mut self) -> SE_GMAC_ID0_EN_W<1> { + SE_GMAC_ID0_EN_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 2"] #[inline(always)] - pub fn se_gmac_prot_en(&mut self) -> SE_GMAC_PROT_EN_W { - SE_GMAC_PROT_EN_W { w: self } + #[must_use] + pub fn se_gmac_id1_en(&mut self) -> SE_GMAC_ID1_EN_W<2> { + SE_GMAC_ID1_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -191,11 +104,10 @@ impl crate::Readable for SE_GMAC_0_CTRL_PROT_SPEC { #[doc = "`write(|w| ..)` method takes [se_gmac_0_ctrl_prot::W](W) writer structure"] impl crate::Writable for SE_GMAC_0_CTRL_PROT_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_gmac_0_ctrl_prot to value 0x07"] impl crate::Resettable for SE_GMAC_0_CTRL_PROT_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x07 - } + const RESET_VALUE: Self::Ux = 0x07; } diff --git a/src/sec_eng/se_gmac_0_lca.rs b/src/sec_eng/se_gmac_0_lca.rs index 8c23864..378c144 100644 --- a/src/sec_eng/se_gmac_0_lca.rs +++ b/src/sec_eng/se_gmac_0_lca.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `se_gmac_0_lca` reader - "] -pub struct SE_GMAC_0_LCA_R(crate::FieldReader); -impl SE_GMAC_0_LCA_R { - pub(crate) fn new(bits: u32) -> Self { - SE_GMAC_0_LCA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_GMAC_0_LCA_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_GMAC_0_LCA_R = crate::FieldReader; #[doc = "Field `se_gmac_0_lca` writer - "] -pub struct SE_GMAC_0_LCA_W<'a> { - w: &'a mut W, -} -impl<'a> SE_GMAC_0_LCA_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SE_GMAC_0_LCA_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_GMAC_0_LCA_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_gmac_0_lca(&self) -> SE_GMAC_0_LCA_R { - SE_GMAC_0_LCA_R::new((self.bits & 0xffff_ffff) as u32) + SE_GMAC_0_LCA_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn se_gmac_0_lca(&mut self) -> SE_GMAC_0_LCA_W { - SE_GMAC_0_LCA_W { w: self } + #[must_use] + pub fn se_gmac_0_lca(&mut self) -> SE_GMAC_0_LCA_W<0> { + SE_GMAC_0_LCA_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SE_GMAC_0_LCA_SPEC { #[doc = "`write(|w| ..)` method takes [se_gmac_0_lca::W](W) writer structure"] impl crate::Writable for SE_GMAC_0_LCA_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_gmac_0_lca to value 0"] impl crate::Resettable for SE_GMAC_0_LCA_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_gmac_0_status.rs b/src/sec_eng/se_gmac_0_status.rs index e639ce1..b959904 100644 --- a/src/sec_eng/se_gmac_0_status.rs +++ b/src/sec_eng/se_gmac_0_status.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `se_gmac_0_status` reader - "] -pub struct SE_GMAC_0_STATUS_R(crate::FieldReader); -impl SE_GMAC_0_STATUS_R { - pub(crate) fn new(bits: u32) -> Self { - SE_GMAC_0_STATUS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_GMAC_0_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_GMAC_0_STATUS_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_gmac_0_status(&self) -> SE_GMAC_0_STATUS_R { - SE_GMAC_0_STATUS_R::new((self.bits & 0xffff_ffff) as u32) + SE_GMAC_0_STATUS_R::new(self.bits) } } #[doc = "se_gmac_0_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 [se_gmac_0_status](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SE_GMAC_0_STATUS_SPEC { } #[doc = "`reset()` method sets se_gmac_0_status to value 0xf100_0000"] impl crate::Resettable for SE_GMAC_0_STATUS_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xf100_0000 - } + const RESET_VALUE: Self::Ux = 0xf100_0000; } diff --git a/src/sec_eng/se_pka_0_ctrl_0.rs b/src/sec_eng/se_pka_0_ctrl_0.rs index 5c0ba3e..1f21a98 100644 --- a/src/sec_eng/se_pka_0_ctrl_0.rs +++ b/src/sec_eng/se_pka_0_ctrl_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,495 +28,188 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `se_pka_0_status` reader - "] -pub struct SE_PKA_0_STATUS_R(crate::FieldReader); -impl SE_PKA_0_STATUS_R { - pub(crate) fn new(bits: u16) -> Self { - SE_PKA_0_STATUS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_PKA_0_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_pka_0_status_clr_1t` reader - "] -pub struct SE_PKA_0_STATUS_CLR_1T_R(crate::FieldReader); -impl SE_PKA_0_STATUS_CLR_1T_R { - pub(crate) fn new(bits: bool) -> Self { - SE_PKA_0_STATUS_CLR_1T_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_PKA_0_STATUS_CLR_1T_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_pka_0_status_clr_1t` writer - "] -pub struct SE_PKA_0_STATUS_CLR_1T_W<'a> { - w: &'a mut W, -} -impl<'a> SE_PKA_0_STATUS_CLR_1T_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `se_pka_0_ram_clr_md` reader - "] -pub struct SE_PKA_0_RAM_CLR_MD_R(crate::FieldReader); -impl SE_PKA_0_RAM_CLR_MD_R { - pub(crate) fn new(bits: bool) -> Self { - SE_PKA_0_RAM_CLR_MD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_PKA_0_RAM_CLR_MD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_pka_0_ram_clr_md` writer - "] -pub struct SE_PKA_0_RAM_CLR_MD_W<'a> { - w: &'a mut W, -} -impl<'a> SE_PKA_0_RAM_CLR_MD_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13); - self.w - } -} -#[doc = "Field `se_pka_0_endian` reader - "] -pub struct SE_PKA_0_ENDIAN_R(crate::FieldReader); -impl SE_PKA_0_ENDIAN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_PKA_0_ENDIAN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_PKA_0_ENDIAN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_pka_0_endian` writer - "] -pub struct SE_PKA_0_ENDIAN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_PKA_0_ENDIAN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} -#[doc = "Field `se_pka_0_int_mask` reader - "] -pub struct SE_PKA_0_INT_MASK_R(crate::FieldReader); -impl SE_PKA_0_INT_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - SE_PKA_0_INT_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_PKA_0_INT_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_pka_0_int_mask` writer - "] -pub struct SE_PKA_0_INT_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> SE_PKA_0_INT_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w - } -} -#[doc = "Field `se_pka_0_int_set` reader - "] -pub struct SE_PKA_0_INT_SET_R(crate::FieldReader); -impl SE_PKA_0_INT_SET_R { - pub(crate) fn new(bits: bool) -> Self { - SE_PKA_0_INT_SET_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_PKA_0_INT_SET_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_pka_0_int_set` writer - "] -pub struct SE_PKA_0_INT_SET_W<'a> { - w: &'a mut W, -} -impl<'a> SE_PKA_0_INT_SET_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); - self.w - } -} -#[doc = "Field `se_pka_0_int_clr_1t` reader - "] -pub struct SE_PKA_0_INT_CLR_1T_R(crate::FieldReader); -impl SE_PKA_0_INT_CLR_1T_R { - pub(crate) fn new(bits: bool) -> Self { - SE_PKA_0_INT_CLR_1T_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_PKA_0_INT_CLR_1T_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_pka_0_int_clr_1t` writer - "] -pub struct SE_PKA_0_INT_CLR_1T_W<'a> { - w: &'a mut W, -} -impl<'a> SE_PKA_0_INT_CLR_1T_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w - } -} -#[doc = "Field `se_pka_0_int` reader - "] -pub struct SE_PKA_0_INT_R(crate::FieldReader); -impl SE_PKA_0_INT_R { - pub(crate) fn new(bits: bool) -> Self { - SE_PKA_0_INT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_PKA_0_INT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_pka_0_prot_md` reader - "] -pub struct SE_PKA_0_PROT_MD_R(crate::FieldReader); -impl SE_PKA_0_PROT_MD_R { - pub(crate) fn new(bits: u8) -> Self { - SE_PKA_0_PROT_MD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_PKA_0_PROT_MD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_pka_0_prot_md` writer - "] -pub struct SE_PKA_0_PROT_MD_W<'a> { - w: &'a mut W, -} -impl<'a> SE_PKA_0_PROT_MD_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 4)) | ((value as u32 & 0x0f) << 4); - self.w - } -} -#[doc = "Field `se_pka_0_en` reader - "] -pub struct SE_PKA_0_EN_R(crate::FieldReader); -impl SE_PKA_0_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_PKA_0_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_PKA_0_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_pka_0_en` writer - "] -pub struct SE_PKA_0_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_PKA_0_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `se_pka_0_busy` reader - "] -pub struct SE_PKA_0_BUSY_R(crate::FieldReader); -impl SE_PKA_0_BUSY_R { - pub(crate) fn new(bits: bool) -> Self { - SE_PKA_0_BUSY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_PKA_0_BUSY_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +#[doc = "Field `se_pka_0_done` reader - "] +pub type SE_PKA_0_DONE_R = crate::BitReader; #[doc = "Field `se_pka_0_done_clr_1t` reader - "] -pub struct SE_PKA_0_DONE_CLR_1T_R(crate::FieldReader); -impl SE_PKA_0_DONE_CLR_1T_R { - pub(crate) fn new(bits: bool) -> Self { - SE_PKA_0_DONE_CLR_1T_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_PKA_0_DONE_CLR_1T_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_PKA_0_DONE_CLR_1T_R = crate::BitReader; #[doc = "Field `se_pka_0_done_clr_1t` writer - "] -pub struct SE_PKA_0_DONE_CLR_1T_W<'a> { - w: &'a mut W, -} -impl<'a> SE_PKA_0_DONE_CLR_1T_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} -#[doc = "Field `se_pka_0_done` reader - "] -pub struct SE_PKA_0_DONE_R(crate::FieldReader); -impl SE_PKA_0_DONE_R { - pub(crate) fn new(bits: bool) -> Self { - SE_PKA_0_DONE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_PKA_0_DONE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_PKA_0_DONE_CLR_1T_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_PKA_0_CTRL_0_SPEC, bool, O>; +#[doc = "Field `se_pka_0_busy` reader - "] +pub type SE_PKA_0_BUSY_R = crate::BitReader; +#[doc = "Field `se_pka_0_en` reader - "] +pub type SE_PKA_0_EN_R = crate::BitReader; +#[doc = "Field `se_pka_0_en` writer - "] +pub type SE_PKA_0_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SE_PKA_0_CTRL_0_SPEC, bool, O>; +#[doc = "Field `se_pka_0_prot_md` reader - "] +pub type SE_PKA_0_PROT_MD_R = crate::FieldReader; +#[doc = "Field `se_pka_0_prot_md` writer - "] +pub type SE_PKA_0_PROT_MD_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_PKA_0_CTRL_0_SPEC, u8, u8, 4, O>; +#[doc = "Field `se_pka_0_int` reader - "] +pub type SE_PKA_0_INT_R = crate::BitReader; +#[doc = "Field `se_pka_0_int_clr_1t` reader - "] +pub type SE_PKA_0_INT_CLR_1T_R = crate::BitReader; +#[doc = "Field `se_pka_0_int_clr_1t` writer - "] +pub type SE_PKA_0_INT_CLR_1T_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_PKA_0_CTRL_0_SPEC, bool, O>; +#[doc = "Field `se_pka_0_int_set` reader - "] +pub type SE_PKA_0_INT_SET_R = crate::BitReader; +#[doc = "Field `se_pka_0_int_set` writer - "] +pub type SE_PKA_0_INT_SET_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_PKA_0_CTRL_0_SPEC, bool, O>; +#[doc = "Field `se_pka_0_int_mask` reader - "] +pub type SE_PKA_0_INT_MASK_R = crate::BitReader; +#[doc = "Field `se_pka_0_int_mask` writer - "] +pub type SE_PKA_0_INT_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_PKA_0_CTRL_0_SPEC, bool, O>; +#[doc = "Field `se_pka_0_endian` reader - "] +pub type SE_PKA_0_ENDIAN_R = crate::BitReader; +#[doc = "Field `se_pka_0_endian` writer - "] +pub type SE_PKA_0_ENDIAN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_PKA_0_CTRL_0_SPEC, bool, O>; +#[doc = "Field `se_pka_0_ram_clr_md` reader - "] +pub type SE_PKA_0_RAM_CLR_MD_R = crate::BitReader; +#[doc = "Field `se_pka_0_ram_clr_md` writer - "] +pub type SE_PKA_0_RAM_CLR_MD_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_PKA_0_CTRL_0_SPEC, bool, O>; +#[doc = "Field `se_pka_0_status_clr_1t` reader - "] +pub type SE_PKA_0_STATUS_CLR_1T_R = crate::BitReader; +#[doc = "Field `se_pka_0_status_clr_1t` writer - "] +pub type SE_PKA_0_STATUS_CLR_1T_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_PKA_0_CTRL_0_SPEC, bool, O>; +#[doc = "Field `se_pka_0_status` reader - "] +pub type SE_PKA_0_STATUS_R = crate::FieldReader; impl R { - #[doc = "Bits 17:31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn se_pka_0_status(&self) -> SE_PKA_0_STATUS_R { - SE_PKA_0_STATUS_R::new(((self.bits >> 17) & 0x7fff) as u16) + pub fn se_pka_0_done(&self) -> SE_PKA_0_DONE_R { + SE_PKA_0_DONE_R::new((self.bits & 1) != 0) } - #[doc = "Bit 16"] + #[doc = "Bit 1"] #[inline(always)] - pub fn se_pka_0_status_clr_1t(&self) -> SE_PKA_0_STATUS_CLR_1T_R { - SE_PKA_0_STATUS_CLR_1T_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn se_pka_0_done_clr_1t(&self) -> SE_PKA_0_DONE_CLR_1T_R { + SE_PKA_0_DONE_CLR_1T_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 13"] + #[doc = "Bit 2"] #[inline(always)] - pub fn se_pka_0_ram_clr_md(&self) -> SE_PKA_0_RAM_CLR_MD_R { - SE_PKA_0_RAM_CLR_MD_R::new(((self.bits >> 13) & 0x01) != 0) + pub fn se_pka_0_busy(&self) -> SE_PKA_0_BUSY_R { + SE_PKA_0_BUSY_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 12"] + #[doc = "Bit 3"] #[inline(always)] - pub fn se_pka_0_endian(&self) -> SE_PKA_0_ENDIAN_R { - SE_PKA_0_ENDIAN_R::new(((self.bits >> 12) & 0x01) != 0) + pub fn se_pka_0_en(&self) -> SE_PKA_0_EN_R { + SE_PKA_0_EN_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bit 11"] + #[doc = "Bits 4:7"] #[inline(always)] - pub fn se_pka_0_int_mask(&self) -> SE_PKA_0_INT_MASK_R { - SE_PKA_0_INT_MASK_R::new(((self.bits >> 11) & 0x01) != 0) + pub fn se_pka_0_prot_md(&self) -> SE_PKA_0_PROT_MD_R { + SE_PKA_0_PROT_MD_R::new(((self.bits >> 4) & 0x0f) as u8) } - #[doc = "Bit 10"] + #[doc = "Bit 8"] #[inline(always)] - pub fn se_pka_0_int_set(&self) -> SE_PKA_0_INT_SET_R { - SE_PKA_0_INT_SET_R::new(((self.bits >> 10) & 0x01) != 0) + pub fn se_pka_0_int(&self) -> SE_PKA_0_INT_R { + SE_PKA_0_INT_R::new(((self.bits >> 8) & 1) != 0) } #[doc = "Bit 9"] #[inline(always)] pub fn se_pka_0_int_clr_1t(&self) -> SE_PKA_0_INT_CLR_1T_R { - SE_PKA_0_INT_CLR_1T_R::new(((self.bits >> 9) & 0x01) != 0) + SE_PKA_0_INT_CLR_1T_R::new(((self.bits >> 9) & 1) != 0) } - #[doc = "Bit 8"] + #[doc = "Bit 10"] #[inline(always)] - pub fn se_pka_0_int(&self) -> SE_PKA_0_INT_R { - SE_PKA_0_INT_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn se_pka_0_int_set(&self) -> SE_PKA_0_INT_SET_R { + SE_PKA_0_INT_SET_R::new(((self.bits >> 10) & 1) != 0) } - #[doc = "Bits 4:7"] + #[doc = "Bit 11"] #[inline(always)] - pub fn se_pka_0_prot_md(&self) -> SE_PKA_0_PROT_MD_R { - SE_PKA_0_PROT_MD_R::new(((self.bits >> 4) & 0x0f) as u8) + pub fn se_pka_0_int_mask(&self) -> SE_PKA_0_INT_MASK_R { + SE_PKA_0_INT_MASK_R::new(((self.bits >> 11) & 1) != 0) } - #[doc = "Bit 3"] + #[doc = "Bit 12"] #[inline(always)] - pub fn se_pka_0_en(&self) -> SE_PKA_0_EN_R { - SE_PKA_0_EN_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn se_pka_0_endian(&self) -> SE_PKA_0_ENDIAN_R { + SE_PKA_0_ENDIAN_R::new(((self.bits >> 12) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bit 13"] #[inline(always)] - pub fn se_pka_0_busy(&self) -> SE_PKA_0_BUSY_R { - SE_PKA_0_BUSY_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn se_pka_0_ram_clr_md(&self) -> SE_PKA_0_RAM_CLR_MD_R { + SE_PKA_0_RAM_CLR_MD_R::new(((self.bits >> 13) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 16"] #[inline(always)] - pub fn se_pka_0_done_clr_1t(&self) -> SE_PKA_0_DONE_CLR_1T_R { - SE_PKA_0_DONE_CLR_1T_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn se_pka_0_status_clr_1t(&self) -> SE_PKA_0_STATUS_CLR_1T_R { + SE_PKA_0_STATUS_CLR_1T_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bits 17:31"] #[inline(always)] - pub fn se_pka_0_done(&self) -> SE_PKA_0_DONE_R { - SE_PKA_0_DONE_R::new((self.bits & 0x01) != 0) + pub fn se_pka_0_status(&self) -> SE_PKA_0_STATUS_R { + SE_PKA_0_STATUS_R::new(((self.bits >> 17) & 0x7fff) as u16) } } impl W { - #[doc = "Bit 16"] + #[doc = "Bit 1"] #[inline(always)] - pub fn se_pka_0_status_clr_1t(&mut self) -> SE_PKA_0_STATUS_CLR_1T_W { - SE_PKA_0_STATUS_CLR_1T_W { w: self } + #[must_use] + pub fn se_pka_0_done_clr_1t(&mut self) -> SE_PKA_0_DONE_CLR_1T_W<1> { + SE_PKA_0_DONE_CLR_1T_W::new(self) } - #[doc = "Bit 13"] + #[doc = "Bit 3"] #[inline(always)] - pub fn se_pka_0_ram_clr_md(&mut self) -> SE_PKA_0_RAM_CLR_MD_W { - SE_PKA_0_RAM_CLR_MD_W { w: self } + #[must_use] + pub fn se_pka_0_en(&mut self) -> SE_PKA_0_EN_W<3> { + SE_PKA_0_EN_W::new(self) } - #[doc = "Bit 12"] + #[doc = "Bits 4:7"] #[inline(always)] - pub fn se_pka_0_endian(&mut self) -> SE_PKA_0_ENDIAN_W { - SE_PKA_0_ENDIAN_W { w: self } + #[must_use] + pub fn se_pka_0_prot_md(&mut self) -> SE_PKA_0_PROT_MD_W<4> { + SE_PKA_0_PROT_MD_W::new(self) } - #[doc = "Bit 11"] + #[doc = "Bit 9"] #[inline(always)] - pub fn se_pka_0_int_mask(&mut self) -> SE_PKA_0_INT_MASK_W { - SE_PKA_0_INT_MASK_W { w: self } + #[must_use] + pub fn se_pka_0_int_clr_1t(&mut self) -> SE_PKA_0_INT_CLR_1T_W<9> { + SE_PKA_0_INT_CLR_1T_W::new(self) } #[doc = "Bit 10"] #[inline(always)] - pub fn se_pka_0_int_set(&mut self) -> SE_PKA_0_INT_SET_W { - SE_PKA_0_INT_SET_W { w: self } + #[must_use] + pub fn se_pka_0_int_set(&mut self) -> SE_PKA_0_INT_SET_W<10> { + SE_PKA_0_INT_SET_W::new(self) } - #[doc = "Bit 9"] + #[doc = "Bit 11"] #[inline(always)] - pub fn se_pka_0_int_clr_1t(&mut self) -> SE_PKA_0_INT_CLR_1T_W { - SE_PKA_0_INT_CLR_1T_W { w: self } + #[must_use] + pub fn se_pka_0_int_mask(&mut self) -> SE_PKA_0_INT_MASK_W<11> { + SE_PKA_0_INT_MASK_W::new(self) } - #[doc = "Bits 4:7"] + #[doc = "Bit 12"] #[inline(always)] - pub fn se_pka_0_prot_md(&mut self) -> SE_PKA_0_PROT_MD_W { - SE_PKA_0_PROT_MD_W { w: self } + #[must_use] + pub fn se_pka_0_endian(&mut self) -> SE_PKA_0_ENDIAN_W<12> { + SE_PKA_0_ENDIAN_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bit 13"] #[inline(always)] - pub fn se_pka_0_en(&mut self) -> SE_PKA_0_EN_W { - SE_PKA_0_EN_W { w: self } + #[must_use] + pub fn se_pka_0_ram_clr_md(&mut self) -> SE_PKA_0_RAM_CLR_MD_W<13> { + SE_PKA_0_RAM_CLR_MD_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 16"] #[inline(always)] - pub fn se_pka_0_done_clr_1t(&mut self) -> SE_PKA_0_DONE_CLR_1T_W { - SE_PKA_0_DONE_CLR_1T_W { w: self } + #[must_use] + pub fn se_pka_0_status_clr_1t(&mut self) -> SE_PKA_0_STATUS_CLR_1T_W<16> { + SE_PKA_0_STATUS_CLR_1T_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -533,11 +227,10 @@ impl crate::Readable for SE_PKA_0_CTRL_0_SPEC { #[doc = "`write(|w| ..)` method takes [se_pka_0_ctrl_0::W](W) writer structure"] impl crate::Writable for SE_PKA_0_CTRL_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_pka_0_ctrl_0 to value 0"] impl crate::Resettable for SE_PKA_0_CTRL_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_pka_0_ctrl_1.rs b/src/sec_eng/se_pka_0_ctrl_1.rs index 54e9bc1..1dd01ae 100644 --- a/src/sec_eng/se_pka_0_ctrl_1.rs +++ b/src/sec_eng/se_pka_0_ctrl_1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,97 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `se_pka_0_hbypass` reader - "] -pub struct SE_PKA_0_HBYPASS_R(crate::FieldReader); -impl SE_PKA_0_HBYPASS_R { - pub(crate) fn new(bits: bool) -> Self { - SE_PKA_0_HBYPASS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_PKA_0_HBYPASS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_pka_0_hbypass` writer - "] -pub struct SE_PKA_0_HBYPASS_W<'a> { - w: &'a mut W, -} -impl<'a> SE_PKA_0_HBYPASS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} #[doc = "Field `se_pka_0_hburst` reader - "] -pub struct SE_PKA_0_HBURST_R(crate::FieldReader); -impl SE_PKA_0_HBURST_R { - pub(crate) fn new(bits: u8) -> Self { - SE_PKA_0_HBURST_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_PKA_0_HBURST_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_PKA_0_HBURST_R = crate::FieldReader; #[doc = "Field `se_pka_0_hburst` writer - "] -pub struct SE_PKA_0_HBURST_W<'a> { - w: &'a mut W, -} -impl<'a> SE_PKA_0_HBURST_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type SE_PKA_0_HBURST_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_PKA_0_CTRL_1_SPEC, u8, u8, 3, O>; +#[doc = "Field `se_pka_0_hbypass` reader - "] +pub type SE_PKA_0_HBYPASS_R = crate::BitReader; +#[doc = "Field `se_pka_0_hbypass` writer - "] +pub type SE_PKA_0_HBYPASS_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_PKA_0_CTRL_1_SPEC, bool, O>; +impl R { + #[doc = "Bits 0:2"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x07) | (value as u32 & 0x07); - self.w + pub fn se_pka_0_hburst(&self) -> SE_PKA_0_HBURST_R { + SE_PKA_0_HBURST_R::new((self.bits & 7) as u8) } -} -impl R { #[doc = "Bit 3"] #[inline(always)] pub fn se_pka_0_hbypass(&self) -> SE_PKA_0_HBYPASS_R { - SE_PKA_0_HBYPASS_R::new(((self.bits >> 3) & 0x01) != 0) - } - #[doc = "Bits 0:2"] - #[inline(always)] - pub fn se_pka_0_hburst(&self) -> SE_PKA_0_HBURST_R { - SE_PKA_0_HBURST_R::new((self.bits & 0x07) as u8) + SE_PKA_0_HBYPASS_R::new(((self.bits >> 3) & 1) != 0) } } impl W { - #[doc = "Bit 3"] + #[doc = "Bits 0:2"] #[inline(always)] - pub fn se_pka_0_hbypass(&mut self) -> SE_PKA_0_HBYPASS_W { - SE_PKA_0_HBYPASS_W { w: self } + #[must_use] + pub fn se_pka_0_hburst(&mut self) -> SE_PKA_0_HBURST_W<0> { + SE_PKA_0_HBURST_W::new(self) } - #[doc = "Bits 0:2"] + #[doc = "Bit 3"] #[inline(always)] - pub fn se_pka_0_hburst(&mut self) -> SE_PKA_0_HBURST_W { - SE_PKA_0_HBURST_W { w: self } + #[must_use] + pub fn se_pka_0_hbypass(&mut self) -> SE_PKA_0_HBYPASS_W<3> { + SE_PKA_0_HBYPASS_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -135,11 +88,10 @@ impl crate::Readable for SE_PKA_0_CTRL_1_SPEC { #[doc = "`write(|w| ..)` method takes [se_pka_0_ctrl_1::W](W) writer structure"] impl crate::Writable for SE_PKA_0_CTRL_1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_pka_0_ctrl_1 to value 0x05"] impl crate::Resettable for SE_PKA_0_CTRL_1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x05 - } + const RESET_VALUE: Self::Ux = 0x05; } diff --git a/src/sec_eng/se_pka_0_ctrl_prot.rs b/src/sec_eng/se_pka_0_ctrl_prot.rs index 0c6b50b..12c0ffe 100644 --- a/src/sec_eng/se_pka_0_ctrl_prot.rs +++ b/src/sec_eng/se_pka_0_ctrl_prot.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,153 +28,65 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `se_pka_id1_en` reader - "] -pub struct SE_PKA_ID1_EN_R(crate::FieldReader); -impl SE_PKA_ID1_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_PKA_ID1_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_PKA_ID1_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_pka_id1_en` writer - "] -pub struct SE_PKA_ID1_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_PKA_ID1_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `se_pka_id0_en` reader - "] -pub struct SE_PKA_ID0_EN_R(crate::FieldReader); -impl SE_PKA_ID0_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_PKA_ID0_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_PKA_ID0_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_pka_id0_en` writer - "] -pub struct SE_PKA_ID0_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_PKA_ID0_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `se_pka_prot_en` reader - "] -pub struct SE_PKA_PROT_EN_R(crate::FieldReader); -impl SE_PKA_PROT_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_PKA_PROT_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_PKA_PROT_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_PKA_PROT_EN_R = crate::BitReader; #[doc = "Field `se_pka_prot_en` writer - "] -pub struct SE_PKA_PROT_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_PKA_PROT_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type SE_PKA_PROT_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_PKA_0_CTRL_PROT_SPEC, bool, O>; +#[doc = "Field `se_pka_id0_en` reader - "] +pub type SE_PKA_ID0_EN_R = crate::BitReader; +#[doc = "Field `se_pka_id0_en` writer - "] +pub type SE_PKA_ID0_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_PKA_0_CTRL_PROT_SPEC, bool, O>; +#[doc = "Field `se_pka_id1_en` reader - "] +pub type SE_PKA_ID1_EN_R = crate::BitReader; +#[doc = "Field `se_pka_id1_en` writer - "] +pub type SE_PKA_ID1_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_PKA_0_CTRL_PROT_SPEC, bool, O>; impl R { - #[doc = "Bit 2"] + #[doc = "Bit 0"] #[inline(always)] - pub fn se_pka_id1_en(&self) -> SE_PKA_ID1_EN_R { - SE_PKA_ID1_EN_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn se_pka_prot_en(&self) -> SE_PKA_PROT_EN_R { + SE_PKA_PROT_EN_R::new((self.bits & 1) != 0) } #[doc = "Bit 1"] #[inline(always)] pub fn se_pka_id0_en(&self) -> SE_PKA_ID0_EN_R { - SE_PKA_ID0_EN_R::new(((self.bits >> 1) & 0x01) != 0) + SE_PKA_ID0_EN_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 2"] #[inline(always)] - pub fn se_pka_prot_en(&self) -> SE_PKA_PROT_EN_R { - SE_PKA_PROT_EN_R::new((self.bits & 0x01) != 0) + pub fn se_pka_id1_en(&self) -> SE_PKA_ID1_EN_R { + SE_PKA_ID1_EN_R::new(((self.bits >> 2) & 1) != 0) } } impl W { - #[doc = "Bit 2"] + #[doc = "Bit 0"] #[inline(always)] - pub fn se_pka_id1_en(&mut self) -> SE_PKA_ID1_EN_W { - SE_PKA_ID1_EN_W { w: self } + #[must_use] + pub fn se_pka_prot_en(&mut self) -> SE_PKA_PROT_EN_W<0> { + SE_PKA_PROT_EN_W::new(self) } #[doc = "Bit 1"] #[inline(always)] - pub fn se_pka_id0_en(&mut self) -> SE_PKA_ID0_EN_W { - SE_PKA_ID0_EN_W { w: self } + #[must_use] + pub fn se_pka_id0_en(&mut self) -> SE_PKA_ID0_EN_W<1> { + SE_PKA_ID0_EN_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 2"] #[inline(always)] - pub fn se_pka_prot_en(&mut self) -> SE_PKA_PROT_EN_W { - SE_PKA_PROT_EN_W { w: self } + #[must_use] + pub fn se_pka_id1_en(&mut self) -> SE_PKA_ID1_EN_W<2> { + SE_PKA_ID1_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -191,11 +104,10 @@ impl crate::Readable for SE_PKA_0_CTRL_PROT_SPEC { #[doc = "`write(|w| ..)` method takes [se_pka_0_ctrl_prot::W](W) writer structure"] impl crate::Writable for SE_PKA_0_CTRL_PROT_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_pka_0_ctrl_prot to value 0x07"] impl crate::Resettable for SE_PKA_0_CTRL_PROT_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x07 - } + const RESET_VALUE: Self::Ux = 0x07; } diff --git a/src/sec_eng/se_pka_0_rw.rs b/src/sec_eng/se_pka_0_rw.rs index 648f43e..227cc35 100644 --- a/src/sec_eng/se_pka_0_rw.rs +++ b/src/sec_eng/se_pka_0_rw.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,13 +28,15 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } impl W { #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -51,11 +54,10 @@ impl crate::Readable for SE_PKA_0_RW_SPEC { #[doc = "`write(|w| ..)` method takes [se_pka_0_rw::W](W) writer structure"] impl crate::Writable for SE_PKA_0_RW_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_pka_0_rw to value 0"] impl crate::Resettable for SE_PKA_0_RW_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_pka_0_rw_burst.rs b/src/sec_eng/se_pka_0_rw_burst.rs index 5f104b7..5dd51c4 100644 --- a/src/sec_eng/se_pka_0_rw_burst.rs +++ b/src/sec_eng/se_pka_0_rw_burst.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,13 +28,15 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } impl W { #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -51,11 +54,10 @@ impl crate::Readable for SE_PKA_0_RW_BURST_SPEC { #[doc = "`write(|w| ..)` method takes [se_pka_0_rw_burst::W](W) writer structure"] impl crate::Writable for SE_PKA_0_RW_BURST_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_pka_0_rw_burst to value 0"] impl crate::Resettable for SE_PKA_0_RW_BURST_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_pka_0_seed.rs b/src/sec_eng/se_pka_0_seed.rs index ef979ef..fcd6580 100644 --- a/src/sec_eng/se_pka_0_seed.rs +++ b/src/sec_eng/se_pka_0_seed.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `se_pka_0_seed` reader - "] -pub struct SE_PKA_0_SEED_R(crate::FieldReader); -impl SE_PKA_0_SEED_R { - pub(crate) fn new(bits: u32) -> Self { - SE_PKA_0_SEED_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_PKA_0_SEED_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_PKA_0_SEED_R = crate::FieldReader; #[doc = "Field `se_pka_0_seed` writer - "] -pub struct SE_PKA_0_SEED_W<'a> { - w: &'a mut W, -} -impl<'a> SE_PKA_0_SEED_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SE_PKA_0_SEED_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_PKA_0_SEED_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_pka_0_seed(&self) -> SE_PKA_0_SEED_R { - SE_PKA_0_SEED_R::new((self.bits & 0xffff_ffff) as u32) + SE_PKA_0_SEED_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn se_pka_0_seed(&mut self) -> SE_PKA_0_SEED_W { - SE_PKA_0_SEED_W { w: self } + #[must_use] + pub fn se_pka_0_seed(&mut self) -> SE_PKA_0_SEED_W<0> { + SE_PKA_0_SEED_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SE_PKA_0_SEED_SPEC { #[doc = "`write(|w| ..)` method takes [se_pka_0_seed::W](W) writer structure"] impl crate::Writable for SE_PKA_0_SEED_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_pka_0_seed to value 0"] impl crate::Resettable for SE_PKA_0_SEED_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_sha_0_ctrl.rs b/src/sec_eng/se_sha_0_ctrl.rs index 2f6cea6..0969300 100644 --- a/src/sec_eng/se_sha_0_ctrl.rs +++ b/src/sec_eng/se_sha_0_ctrl.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,447 +28,174 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `se_sha_0_msg_len` reader - "] -pub struct SE_SHA_0_MSG_LEN_R(crate::FieldReader); -impl SE_SHA_0_MSG_LEN_R { - pub(crate) fn new(bits: u16) -> Self { - SE_SHA_0_MSG_LEN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_0_MSG_LEN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_sha_0_msg_len` writer - "] -pub struct SE_SHA_0_MSG_LEN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_SHA_0_MSG_LEN_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xffff << 16)) | ((value as u32 & 0xffff) << 16); - self.w - } -} -#[doc = "Field `se_sha_0_link_mode` reader - "] -pub struct SE_SHA_0_LINK_MODE_R(crate::FieldReader); -impl SE_SHA_0_LINK_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - SE_SHA_0_LINK_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_0_LINK_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_sha_0_link_mode` writer - "] -pub struct SE_SHA_0_LINK_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> SE_SHA_0_LINK_MODE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15); - self.w - } -} -#[doc = "Field `se_sha_0_int_mask` reader - "] -pub struct SE_SHA_0_INT_MASK_R(crate::FieldReader); -impl SE_SHA_0_INT_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - SE_SHA_0_INT_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_0_INT_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_sha_0_int_mask` writer - "] -pub struct SE_SHA_0_INT_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> SE_SHA_0_INT_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w - } -} -#[doc = "Field `se_sha_0_int_set_1t` reader - "] -pub struct SE_SHA_0_INT_SET_1T_R(crate::FieldReader); -impl SE_SHA_0_INT_SET_1T_R { - pub(crate) fn new(bits: bool) -> Self { - SE_SHA_0_INT_SET_1T_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_0_INT_SET_1T_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_sha_0_int_set_1t` writer - "] -pub struct SE_SHA_0_INT_SET_1T_W<'a> { - w: &'a mut W, -} -impl<'a> SE_SHA_0_INT_SET_1T_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); - self.w - } -} -#[doc = "Field `se_sha_0_int_clr_1t` reader - "] -pub struct SE_SHA_0_INT_CLR_1T_R(crate::FieldReader); -impl SE_SHA_0_INT_CLR_1T_R { - pub(crate) fn new(bits: bool) -> Self { - SE_SHA_0_INT_CLR_1T_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_0_INT_CLR_1T_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_sha_0_int_clr_1t` writer - "] -pub struct SE_SHA_0_INT_CLR_1T_W<'a> { - w: &'a mut W, -} -impl<'a> SE_SHA_0_INT_CLR_1T_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w - } -} -#[doc = "Field `se_sha_0_int` reader - "] -pub struct SE_SHA_0_INT_R(crate::FieldReader); -impl SE_SHA_0_INT_R { - pub(crate) fn new(bits: bool) -> Self { - SE_SHA_0_INT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_0_INT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_sha_0_hash_sel` reader - "] -pub struct SE_SHA_0_HASH_SEL_R(crate::FieldReader); -impl SE_SHA_0_HASH_SEL_R { - pub(crate) fn new(bits: bool) -> Self { - SE_SHA_0_HASH_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_0_HASH_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_sha_0_hash_sel` writer - "] -pub struct SE_SHA_0_HASH_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SE_SHA_0_HASH_SEL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w - } -} -#[doc = "Field `se_sha_0_en` reader - "] -pub struct SE_SHA_0_EN_R(crate::FieldReader); -impl SE_SHA_0_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_SHA_0_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_0_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_sha_0_en` writer - "] -pub struct SE_SHA_0_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_SHA_0_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w - } -} -#[doc = "Field `se_sha_0_mode` reader - "] -pub struct SE_SHA_0_MODE_R(crate::FieldReader); -impl SE_SHA_0_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - SE_SHA_0_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_0_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_sha_0_mode` writer - "] -pub struct SE_SHA_0_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> SE_SHA_0_MODE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 2)) | ((value as u32 & 0x07) << 2); - self.w - } -} +#[doc = "Field `se_sha_0_busy` reader - "] +pub type SE_SHA_0_BUSY_R = crate::BitReader; #[doc = "Field `se_sha_0_trig_1t` reader - "] -pub struct SE_SHA_0_TRIG_1T_R(crate::FieldReader); -impl SE_SHA_0_TRIG_1T_R { - pub(crate) fn new(bits: bool) -> Self { - SE_SHA_0_TRIG_1T_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_0_TRIG_1T_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_SHA_0_TRIG_1T_R = crate::BitReader; #[doc = "Field `se_sha_0_trig_1t` writer - "] -pub struct SE_SHA_0_TRIG_1T_W<'a> { - w: &'a mut W, -} -impl<'a> SE_SHA_0_TRIG_1T_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} -#[doc = "Field `se_sha_0_busy` reader - "] -pub struct SE_SHA_0_BUSY_R(crate::FieldReader); -impl SE_SHA_0_BUSY_R { - pub(crate) fn new(bits: bool) -> Self { - SE_SHA_0_BUSY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_0_BUSY_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_SHA_0_TRIG_1T_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_SHA_0_CTRL_SPEC, bool, O>; +#[doc = "Field `se_sha_0_mode` reader - "] +pub type SE_SHA_0_MODE_R = crate::FieldReader; +#[doc = "Field `se_sha_0_mode` writer - "] +pub type SE_SHA_0_MODE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_SHA_0_CTRL_SPEC, u8, u8, 3, O>; +#[doc = "Field `se_sha_0_en` reader - "] +pub type SE_SHA_0_EN_R = crate::BitReader; +#[doc = "Field `se_sha_0_en` writer - "] +pub type SE_SHA_0_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SE_SHA_0_CTRL_SPEC, bool, O>; +#[doc = "Field `se_sha_0_hash_sel` reader - "] +pub type SE_SHA_0_HASH_SEL_R = crate::BitReader; +#[doc = "Field `se_sha_0_hash_sel` writer - "] +pub type SE_SHA_0_HASH_SEL_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_SHA_0_CTRL_SPEC, bool, O>; +#[doc = "Field `se_sha_0_int` reader - "] +pub type SE_SHA_0_INT_R = crate::BitReader; +#[doc = "Field `se_sha_0_int_clr_1t` reader - "] +pub type SE_SHA_0_INT_CLR_1T_R = crate::BitReader; +#[doc = "Field `se_sha_0_int_clr_1t` writer - "] +pub type SE_SHA_0_INT_CLR_1T_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_SHA_0_CTRL_SPEC, bool, O>; +#[doc = "Field `se_sha_0_int_set_1t` reader - "] +pub type SE_SHA_0_INT_SET_1T_R = crate::BitReader; +#[doc = "Field `se_sha_0_int_set_1t` writer - "] +pub type SE_SHA_0_INT_SET_1T_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_SHA_0_CTRL_SPEC, bool, O>; +#[doc = "Field `se_sha_0_int_mask` reader - "] +pub type SE_SHA_0_INT_MASK_R = crate::BitReader; +#[doc = "Field `se_sha_0_int_mask` writer - "] +pub type SE_SHA_0_INT_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_SHA_0_CTRL_SPEC, bool, O>; +#[doc = "Field `se_sha_0_link_mode` reader - "] +pub type SE_SHA_0_LINK_MODE_R = crate::BitReader; +#[doc = "Field `se_sha_0_link_mode` writer - "] +pub type SE_SHA_0_LINK_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_SHA_0_CTRL_SPEC, bool, O>; +#[doc = "Field `se_sha_0_msg_len` reader - "] +pub type SE_SHA_0_MSG_LEN_R = crate::FieldReader; +#[doc = "Field `se_sha_0_msg_len` writer - "] +pub type SE_SHA_0_MSG_LEN_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_SHA_0_CTRL_SPEC, u16, u16, 16, O>; impl R { - #[doc = "Bits 16:31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn se_sha_0_msg_len(&self) -> SE_SHA_0_MSG_LEN_R { - SE_SHA_0_MSG_LEN_R::new(((self.bits >> 16) & 0xffff) as u16) + pub fn se_sha_0_busy(&self) -> SE_SHA_0_BUSY_R { + SE_SHA_0_BUSY_R::new((self.bits & 1) != 0) } - #[doc = "Bit 15"] + #[doc = "Bit 1"] #[inline(always)] - pub fn se_sha_0_link_mode(&self) -> SE_SHA_0_LINK_MODE_R { - SE_SHA_0_LINK_MODE_R::new(((self.bits >> 15) & 0x01) != 0) + pub fn se_sha_0_trig_1t(&self) -> SE_SHA_0_TRIG_1T_R { + SE_SHA_0_TRIG_1T_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 11"] + #[doc = "Bits 2:4"] #[inline(always)] - pub fn se_sha_0_int_mask(&self) -> SE_SHA_0_INT_MASK_R { - SE_SHA_0_INT_MASK_R::new(((self.bits >> 11) & 0x01) != 0) + pub fn se_sha_0_mode(&self) -> SE_SHA_0_MODE_R { + SE_SHA_0_MODE_R::new(((self.bits >> 2) & 7) as u8) } - #[doc = "Bit 10"] + #[doc = "Bit 5"] #[inline(always)] - pub fn se_sha_0_int_set_1t(&self) -> SE_SHA_0_INT_SET_1T_R { - SE_SHA_0_INT_SET_1T_R::new(((self.bits >> 10) & 0x01) != 0) + pub fn se_sha_0_en(&self) -> SE_SHA_0_EN_R { + SE_SHA_0_EN_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 9"] + #[doc = "Bit 6"] #[inline(always)] - pub fn se_sha_0_int_clr_1t(&self) -> SE_SHA_0_INT_CLR_1T_R { - SE_SHA_0_INT_CLR_1T_R::new(((self.bits >> 9) & 0x01) != 0) + pub fn se_sha_0_hash_sel(&self) -> SE_SHA_0_HASH_SEL_R { + SE_SHA_0_HASH_SEL_R::new(((self.bits >> 6) & 1) != 0) } #[doc = "Bit 8"] #[inline(always)] pub fn se_sha_0_int(&self) -> SE_SHA_0_INT_R { - SE_SHA_0_INT_R::new(((self.bits >> 8) & 0x01) != 0) + SE_SHA_0_INT_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bit 6"] + #[doc = "Bit 9"] #[inline(always)] - pub fn se_sha_0_hash_sel(&self) -> SE_SHA_0_HASH_SEL_R { - SE_SHA_0_HASH_SEL_R::new(((self.bits >> 6) & 0x01) != 0) + pub fn se_sha_0_int_clr_1t(&self) -> SE_SHA_0_INT_CLR_1T_R { + SE_SHA_0_INT_CLR_1T_R::new(((self.bits >> 9) & 1) != 0) } - #[doc = "Bit 5"] + #[doc = "Bit 10"] #[inline(always)] - pub fn se_sha_0_en(&self) -> SE_SHA_0_EN_R { - SE_SHA_0_EN_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn se_sha_0_int_set_1t(&self) -> SE_SHA_0_INT_SET_1T_R { + SE_SHA_0_INT_SET_1T_R::new(((self.bits >> 10) & 1) != 0) } - #[doc = "Bits 2:4"] + #[doc = "Bit 11"] #[inline(always)] - pub fn se_sha_0_mode(&self) -> SE_SHA_0_MODE_R { - SE_SHA_0_MODE_R::new(((self.bits >> 2) & 0x07) as u8) + pub fn se_sha_0_int_mask(&self) -> SE_SHA_0_INT_MASK_R { + SE_SHA_0_INT_MASK_R::new(((self.bits >> 11) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 15"] #[inline(always)] - pub fn se_sha_0_trig_1t(&self) -> SE_SHA_0_TRIG_1T_R { - SE_SHA_0_TRIG_1T_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn se_sha_0_link_mode(&self) -> SE_SHA_0_LINK_MODE_R { + SE_SHA_0_LINK_MODE_R::new(((self.bits >> 15) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bits 16:31"] #[inline(always)] - pub fn se_sha_0_busy(&self) -> SE_SHA_0_BUSY_R { - SE_SHA_0_BUSY_R::new((self.bits & 0x01) != 0) + pub fn se_sha_0_msg_len(&self) -> SE_SHA_0_MSG_LEN_R { + SE_SHA_0_MSG_LEN_R::new(((self.bits >> 16) & 0xffff) as u16) } } impl W { - #[doc = "Bits 16:31"] + #[doc = "Bit 1"] #[inline(always)] - pub fn se_sha_0_msg_len(&mut self) -> SE_SHA_0_MSG_LEN_W { - SE_SHA_0_MSG_LEN_W { w: self } + #[must_use] + pub fn se_sha_0_trig_1t(&mut self) -> SE_SHA_0_TRIG_1T_W<1> { + SE_SHA_0_TRIG_1T_W::new(self) } - #[doc = "Bit 15"] + #[doc = "Bits 2:4"] #[inline(always)] - pub fn se_sha_0_link_mode(&mut self) -> SE_SHA_0_LINK_MODE_W { - SE_SHA_0_LINK_MODE_W { w: self } + #[must_use] + pub fn se_sha_0_mode(&mut self) -> SE_SHA_0_MODE_W<2> { + SE_SHA_0_MODE_W::new(self) } - #[doc = "Bit 11"] + #[doc = "Bit 5"] #[inline(always)] - pub fn se_sha_0_int_mask(&mut self) -> SE_SHA_0_INT_MASK_W { - SE_SHA_0_INT_MASK_W { w: self } + #[must_use] + pub fn se_sha_0_en(&mut self) -> SE_SHA_0_EN_W<5> { + SE_SHA_0_EN_W::new(self) } - #[doc = "Bit 10"] + #[doc = "Bit 6"] #[inline(always)] - pub fn se_sha_0_int_set_1t(&mut self) -> SE_SHA_0_INT_SET_1T_W { - SE_SHA_0_INT_SET_1T_W { w: self } + #[must_use] + pub fn se_sha_0_hash_sel(&mut self) -> SE_SHA_0_HASH_SEL_W<6> { + SE_SHA_0_HASH_SEL_W::new(self) } #[doc = "Bit 9"] #[inline(always)] - pub fn se_sha_0_int_clr_1t(&mut self) -> SE_SHA_0_INT_CLR_1T_W { - SE_SHA_0_INT_CLR_1T_W { w: self } + #[must_use] + pub fn se_sha_0_int_clr_1t(&mut self) -> SE_SHA_0_INT_CLR_1T_W<9> { + SE_SHA_0_INT_CLR_1T_W::new(self) } - #[doc = "Bit 6"] + #[doc = "Bit 10"] #[inline(always)] - pub fn se_sha_0_hash_sel(&mut self) -> SE_SHA_0_HASH_SEL_W { - SE_SHA_0_HASH_SEL_W { w: self } + #[must_use] + pub fn se_sha_0_int_set_1t(&mut self) -> SE_SHA_0_INT_SET_1T_W<10> { + SE_SHA_0_INT_SET_1T_W::new(self) } - #[doc = "Bit 5"] + #[doc = "Bit 11"] #[inline(always)] - pub fn se_sha_0_en(&mut self) -> SE_SHA_0_EN_W { - SE_SHA_0_EN_W { w: self } + #[must_use] + pub fn se_sha_0_int_mask(&mut self) -> SE_SHA_0_INT_MASK_W<11> { + SE_SHA_0_INT_MASK_W::new(self) } - #[doc = "Bits 2:4"] + #[doc = "Bit 15"] #[inline(always)] - pub fn se_sha_0_mode(&mut self) -> SE_SHA_0_MODE_W { - SE_SHA_0_MODE_W { w: self } + #[must_use] + pub fn se_sha_0_link_mode(&mut self) -> SE_SHA_0_LINK_MODE_W<15> { + SE_SHA_0_LINK_MODE_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bits 16:31"] #[inline(always)] - pub fn se_sha_0_trig_1t(&mut self) -> SE_SHA_0_TRIG_1T_W { - SE_SHA_0_TRIG_1T_W { w: self } + #[must_use] + pub fn se_sha_0_msg_len(&mut self) -> SE_SHA_0_MSG_LEN_W<16> { + SE_SHA_0_MSG_LEN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -485,11 +213,10 @@ impl crate::Readable for SE_SHA_0_CTRL_SPEC { #[doc = "`write(|w| ..)` method takes [se_sha_0_ctrl::W](W) writer structure"] impl crate::Writable for SE_SHA_0_CTRL_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_sha_0_ctrl to value 0"] impl crate::Resettable for SE_SHA_0_CTRL_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_sha_0_ctrl_prot.rs b/src/sec_eng/se_sha_0_ctrl_prot.rs index 3b5da6c..4f6d7dc 100644 --- a/src/sec_eng/se_sha_0_ctrl_prot.rs +++ b/src/sec_eng/se_sha_0_ctrl_prot.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,153 +28,65 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `se_sha_id1_en` reader - "] -pub struct SE_SHA_ID1_EN_R(crate::FieldReader); -impl SE_SHA_ID1_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_SHA_ID1_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_ID1_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_sha_id1_en` writer - "] -pub struct SE_SHA_ID1_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_SHA_ID1_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `se_sha_id0_en` reader - "] -pub struct SE_SHA_ID0_EN_R(crate::FieldReader); -impl SE_SHA_ID0_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_SHA_ID0_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_ID0_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_sha_id0_en` writer - "] -pub struct SE_SHA_ID0_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_SHA_ID0_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `se_sha_prot_en` reader - "] -pub struct SE_SHA_PROT_EN_R(crate::FieldReader); -impl SE_SHA_PROT_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_SHA_PROT_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_PROT_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_SHA_PROT_EN_R = crate::BitReader; #[doc = "Field `se_sha_prot_en` writer - "] -pub struct SE_SHA_PROT_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_SHA_PROT_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type SE_SHA_PROT_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_SHA_0_CTRL_PROT_SPEC, bool, O>; +#[doc = "Field `se_sha_id0_en` reader - "] +pub type SE_SHA_ID0_EN_R = crate::BitReader; +#[doc = "Field `se_sha_id0_en` writer - "] +pub type SE_SHA_ID0_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_SHA_0_CTRL_PROT_SPEC, bool, O>; +#[doc = "Field `se_sha_id1_en` reader - "] +pub type SE_SHA_ID1_EN_R = crate::BitReader; +#[doc = "Field `se_sha_id1_en` writer - "] +pub type SE_SHA_ID1_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_SHA_0_CTRL_PROT_SPEC, bool, O>; impl R { - #[doc = "Bit 2"] + #[doc = "Bit 0"] #[inline(always)] - pub fn se_sha_id1_en(&self) -> SE_SHA_ID1_EN_R { - SE_SHA_ID1_EN_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn se_sha_prot_en(&self) -> SE_SHA_PROT_EN_R { + SE_SHA_PROT_EN_R::new((self.bits & 1) != 0) } #[doc = "Bit 1"] #[inline(always)] pub fn se_sha_id0_en(&self) -> SE_SHA_ID0_EN_R { - SE_SHA_ID0_EN_R::new(((self.bits >> 1) & 0x01) != 0) + SE_SHA_ID0_EN_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 2"] #[inline(always)] - pub fn se_sha_prot_en(&self) -> SE_SHA_PROT_EN_R { - SE_SHA_PROT_EN_R::new((self.bits & 0x01) != 0) + pub fn se_sha_id1_en(&self) -> SE_SHA_ID1_EN_R { + SE_SHA_ID1_EN_R::new(((self.bits >> 2) & 1) != 0) } } impl W { - #[doc = "Bit 2"] + #[doc = "Bit 0"] #[inline(always)] - pub fn se_sha_id1_en(&mut self) -> SE_SHA_ID1_EN_W { - SE_SHA_ID1_EN_W { w: self } + #[must_use] + pub fn se_sha_prot_en(&mut self) -> SE_SHA_PROT_EN_W<0> { + SE_SHA_PROT_EN_W::new(self) } #[doc = "Bit 1"] #[inline(always)] - pub fn se_sha_id0_en(&mut self) -> SE_SHA_ID0_EN_W { - SE_SHA_ID0_EN_W { w: self } + #[must_use] + pub fn se_sha_id0_en(&mut self) -> SE_SHA_ID0_EN_W<1> { + SE_SHA_ID0_EN_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 2"] #[inline(always)] - pub fn se_sha_prot_en(&mut self) -> SE_SHA_PROT_EN_W { - SE_SHA_PROT_EN_W { w: self } + #[must_use] + pub fn se_sha_id1_en(&mut self) -> SE_SHA_ID1_EN_W<2> { + SE_SHA_ID1_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -191,11 +104,10 @@ impl crate::Readable for SE_SHA_0_CTRL_PROT_SPEC { #[doc = "`write(|w| ..)` method takes [se_sha_0_ctrl_prot::W](W) writer structure"] impl crate::Writable for SE_SHA_0_CTRL_PROT_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_sha_0_ctrl_prot to value 0x07"] impl crate::Resettable for SE_SHA_0_CTRL_PROT_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x07 - } + const RESET_VALUE: Self::Ux = 0x07; } diff --git a/src/sec_eng/se_sha_0_endian.rs b/src/sec_eng/se_sha_0_endian.rs index 1c68f27..0f599f9 100644 --- a/src/sec_eng/se_sha_0_endian.rs +++ b/src/sec_eng/se_sha_0_endian.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,61 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `se_sha_0_dout_endian` reader - "] -pub struct SE_SHA_0_DOUT_ENDIAN_R(crate::FieldReader); -impl SE_SHA_0_DOUT_ENDIAN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_SHA_0_DOUT_ENDIAN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_0_DOUT_ENDIAN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_SHA_0_DOUT_ENDIAN_R = crate::BitReader; #[doc = "Field `se_sha_0_dout_endian` writer - "] -pub struct SE_SHA_0_DOUT_ENDIAN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_SHA_0_DOUT_ENDIAN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type SE_SHA_0_DOUT_ENDIAN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_SHA_0_ENDIAN_SPEC, bool, O>; impl R { #[doc = "Bit 0"] #[inline(always)] pub fn se_sha_0_dout_endian(&self) -> SE_SHA_0_DOUT_ENDIAN_R { - SE_SHA_0_DOUT_ENDIAN_R::new((self.bits & 0x01) != 0) + SE_SHA_0_DOUT_ENDIAN_R::new((self.bits & 1) != 0) } } impl W { #[doc = "Bit 0"] #[inline(always)] - pub fn se_sha_0_dout_endian(&mut self) -> SE_SHA_0_DOUT_ENDIAN_W { - SE_SHA_0_DOUT_ENDIAN_W { w: self } + #[must_use] + pub fn se_sha_0_dout_endian(&mut self) -> SE_SHA_0_DOUT_ENDIAN_W<0> { + SE_SHA_0_DOUT_ENDIAN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -99,11 +72,10 @@ impl crate::Readable for SE_SHA_0_ENDIAN_SPEC { #[doc = "`write(|w| ..)` method takes [se_sha_0_endian::W](W) writer structure"] impl crate::Writable for SE_SHA_0_ENDIAN_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_sha_0_endian to value 0x01"] impl crate::Resettable for SE_SHA_0_ENDIAN_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x01 - } + const RESET_VALUE: Self::Ux = 0x01; } diff --git a/src/sec_eng/se_sha_0_hash_h_0.rs b/src/sec_eng/se_sha_0_hash_h_0.rs index 8fc999e..d4d5c99 100644 --- a/src/sec_eng/se_sha_0_hash_h_0.rs +++ b/src/sec_eng/se_sha_0_hash_h_0.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `se_sha_0_hash_h_0` reader - "] -pub struct SE_SHA_0_HASH_H_0_R(crate::FieldReader); -impl SE_SHA_0_HASH_H_0_R { - pub(crate) fn new(bits: u32) -> Self { - SE_SHA_0_HASH_H_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_0_HASH_H_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_SHA_0_HASH_H_0_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_sha_0_hash_h_0(&self) -> SE_SHA_0_HASH_H_0_R { - SE_SHA_0_HASH_H_0_R::new((self.bits & 0xffff_ffff) as u32) + SE_SHA_0_HASH_H_0_R::new(self.bits) } } #[doc = "se_sha_0_hash_h_0.\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 [se_sha_0_hash_h_0](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SE_SHA_0_HASH_H_0_SPEC { } #[doc = "`reset()` method sets se_sha_0_hash_h_0 to value 0"] impl crate::Resettable for SE_SHA_0_HASH_H_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_sha_0_hash_h_1.rs b/src/sec_eng/se_sha_0_hash_h_1.rs index 393db8d..b2d6002 100644 --- a/src/sec_eng/se_sha_0_hash_h_1.rs +++ b/src/sec_eng/se_sha_0_hash_h_1.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `se_sha_0_hash_h_1` reader - "] -pub struct SE_SHA_0_HASH_H_1_R(crate::FieldReader); -impl SE_SHA_0_HASH_H_1_R { - pub(crate) fn new(bits: u32) -> Self { - SE_SHA_0_HASH_H_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_0_HASH_H_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_SHA_0_HASH_H_1_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_sha_0_hash_h_1(&self) -> SE_SHA_0_HASH_H_1_R { - SE_SHA_0_HASH_H_1_R::new((self.bits & 0xffff_ffff) as u32) + SE_SHA_0_HASH_H_1_R::new(self.bits) } } #[doc = "se_sha_0_hash_h_1.\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 [se_sha_0_hash_h_1](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SE_SHA_0_HASH_H_1_SPEC { } #[doc = "`reset()` method sets se_sha_0_hash_h_1 to value 0"] impl crate::Resettable for SE_SHA_0_HASH_H_1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_sha_0_hash_h_2.rs b/src/sec_eng/se_sha_0_hash_h_2.rs index db7f3e3..562a959 100644 --- a/src/sec_eng/se_sha_0_hash_h_2.rs +++ b/src/sec_eng/se_sha_0_hash_h_2.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `se_sha_0_hash_h_2` reader - "] -pub struct SE_SHA_0_HASH_H_2_R(crate::FieldReader); -impl SE_SHA_0_HASH_H_2_R { - pub(crate) fn new(bits: u32) -> Self { - SE_SHA_0_HASH_H_2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_0_HASH_H_2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_SHA_0_HASH_H_2_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_sha_0_hash_h_2(&self) -> SE_SHA_0_HASH_H_2_R { - SE_SHA_0_HASH_H_2_R::new((self.bits & 0xffff_ffff) as u32) + SE_SHA_0_HASH_H_2_R::new(self.bits) } } #[doc = "se_sha_0_hash_h_2.\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 [se_sha_0_hash_h_2](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SE_SHA_0_HASH_H_2_SPEC { } #[doc = "`reset()` method sets se_sha_0_hash_h_2 to value 0"] impl crate::Resettable for SE_SHA_0_HASH_H_2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_sha_0_hash_h_3.rs b/src/sec_eng/se_sha_0_hash_h_3.rs index d8fe200..29ec053 100644 --- a/src/sec_eng/se_sha_0_hash_h_3.rs +++ b/src/sec_eng/se_sha_0_hash_h_3.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `se_sha_0_hash_h_3` reader - "] -pub struct SE_SHA_0_HASH_H_3_R(crate::FieldReader); -impl SE_SHA_0_HASH_H_3_R { - pub(crate) fn new(bits: u32) -> Self { - SE_SHA_0_HASH_H_3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_0_HASH_H_3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_SHA_0_HASH_H_3_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_sha_0_hash_h_3(&self) -> SE_SHA_0_HASH_H_3_R { - SE_SHA_0_HASH_H_3_R::new((self.bits & 0xffff_ffff) as u32) + SE_SHA_0_HASH_H_3_R::new(self.bits) } } #[doc = "se_sha_0_hash_h_3.\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 [se_sha_0_hash_h_3](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SE_SHA_0_HASH_H_3_SPEC { } #[doc = "`reset()` method sets se_sha_0_hash_h_3 to value 0"] impl crate::Resettable for SE_SHA_0_HASH_H_3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_sha_0_hash_h_4.rs b/src/sec_eng/se_sha_0_hash_h_4.rs index 50fa1f7..3e33f69 100644 --- a/src/sec_eng/se_sha_0_hash_h_4.rs +++ b/src/sec_eng/se_sha_0_hash_h_4.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `se_sha_0_hash_h_4` reader - "] -pub struct SE_SHA_0_HASH_H_4_R(crate::FieldReader); -impl SE_SHA_0_HASH_H_4_R { - pub(crate) fn new(bits: u32) -> Self { - SE_SHA_0_HASH_H_4_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_0_HASH_H_4_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_SHA_0_HASH_H_4_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_sha_0_hash_h_4(&self) -> SE_SHA_0_HASH_H_4_R { - SE_SHA_0_HASH_H_4_R::new((self.bits & 0xffff_ffff) as u32) + SE_SHA_0_HASH_H_4_R::new(self.bits) } } #[doc = "se_sha_0_hash_h_4.\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 [se_sha_0_hash_h_4](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SE_SHA_0_HASH_H_4_SPEC { } #[doc = "`reset()` method sets se_sha_0_hash_h_4 to value 0"] impl crate::Resettable for SE_SHA_0_HASH_H_4_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_sha_0_hash_h_5.rs b/src/sec_eng/se_sha_0_hash_h_5.rs index fbd4d19..a3603a4 100644 --- a/src/sec_eng/se_sha_0_hash_h_5.rs +++ b/src/sec_eng/se_sha_0_hash_h_5.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `se_sha_0_hash_h_5` reader - "] -pub struct SE_SHA_0_HASH_H_5_R(crate::FieldReader); -impl SE_SHA_0_HASH_H_5_R { - pub(crate) fn new(bits: u32) -> Self { - SE_SHA_0_HASH_H_5_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_0_HASH_H_5_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_SHA_0_HASH_H_5_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_sha_0_hash_h_5(&self) -> SE_SHA_0_HASH_H_5_R { - SE_SHA_0_HASH_H_5_R::new((self.bits & 0xffff_ffff) as u32) + SE_SHA_0_HASH_H_5_R::new(self.bits) } } #[doc = "se_sha_0_hash_h_5.\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 [se_sha_0_hash_h_5](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SE_SHA_0_HASH_H_5_SPEC { } #[doc = "`reset()` method sets se_sha_0_hash_h_5 to value 0"] impl crate::Resettable for SE_SHA_0_HASH_H_5_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_sha_0_hash_h_6.rs b/src/sec_eng/se_sha_0_hash_h_6.rs index c17ee99..798ae15 100644 --- a/src/sec_eng/se_sha_0_hash_h_6.rs +++ b/src/sec_eng/se_sha_0_hash_h_6.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `se_sha_0_hash_h_6` reader - "] -pub struct SE_SHA_0_HASH_H_6_R(crate::FieldReader); -impl SE_SHA_0_HASH_H_6_R { - pub(crate) fn new(bits: u32) -> Self { - SE_SHA_0_HASH_H_6_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_0_HASH_H_6_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_SHA_0_HASH_H_6_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_sha_0_hash_h_6(&self) -> SE_SHA_0_HASH_H_6_R { - SE_SHA_0_HASH_H_6_R::new((self.bits & 0xffff_ffff) as u32) + SE_SHA_0_HASH_H_6_R::new(self.bits) } } #[doc = "se_sha_0_hash_h_6.\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 [se_sha_0_hash_h_6](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SE_SHA_0_HASH_H_6_SPEC { } #[doc = "`reset()` method sets se_sha_0_hash_h_6 to value 0"] impl crate::Resettable for SE_SHA_0_HASH_H_6_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_sha_0_hash_h_7.rs b/src/sec_eng/se_sha_0_hash_h_7.rs index 7b4b18d..a1962d2 100644 --- a/src/sec_eng/se_sha_0_hash_h_7.rs +++ b/src/sec_eng/se_sha_0_hash_h_7.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `se_sha_0_hash_h_7` reader - "] -pub struct SE_SHA_0_HASH_H_7_R(crate::FieldReader); -impl SE_SHA_0_HASH_H_7_R { - pub(crate) fn new(bits: u32) -> Self { - SE_SHA_0_HASH_H_7_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_0_HASH_H_7_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_SHA_0_HASH_H_7_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_sha_0_hash_h_7(&self) -> SE_SHA_0_HASH_H_7_R { - SE_SHA_0_HASH_H_7_R::new((self.bits & 0xffff_ffff) as u32) + SE_SHA_0_HASH_H_7_R::new(self.bits) } } #[doc = "se_sha_0_hash_h_7.\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 [se_sha_0_hash_h_7](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SE_SHA_0_HASH_H_7_SPEC { } #[doc = "`reset()` method sets se_sha_0_hash_h_7 to value 0"] impl crate::Resettable for SE_SHA_0_HASH_H_7_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_sha_0_hash_l_0.rs b/src/sec_eng/se_sha_0_hash_l_0.rs index 29bed11..130c056 100644 --- a/src/sec_eng/se_sha_0_hash_l_0.rs +++ b/src/sec_eng/se_sha_0_hash_l_0.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `se_sha_0_hash_l_0` reader - "] -pub struct SE_SHA_0_HASH_L_0_R(crate::FieldReader); -impl SE_SHA_0_HASH_L_0_R { - pub(crate) fn new(bits: u32) -> Self { - SE_SHA_0_HASH_L_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_0_HASH_L_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_SHA_0_HASH_L_0_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_sha_0_hash_l_0(&self) -> SE_SHA_0_HASH_L_0_R { - SE_SHA_0_HASH_L_0_R::new((self.bits & 0xffff_ffff) as u32) + SE_SHA_0_HASH_L_0_R::new(self.bits) } } #[doc = "se_sha_0_hash_l_0.\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 [se_sha_0_hash_l_0](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SE_SHA_0_HASH_L_0_SPEC { } #[doc = "`reset()` method sets se_sha_0_hash_l_0 to value 0"] impl crate::Resettable for SE_SHA_0_HASH_L_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_sha_0_hash_l_1.rs b/src/sec_eng/se_sha_0_hash_l_1.rs index 496ae4f..1508e36 100644 --- a/src/sec_eng/se_sha_0_hash_l_1.rs +++ b/src/sec_eng/se_sha_0_hash_l_1.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `se_sha_0_hash_l_1` reader - "] -pub struct SE_SHA_0_HASH_L_1_R(crate::FieldReader); -impl SE_SHA_0_HASH_L_1_R { - pub(crate) fn new(bits: u32) -> Self { - SE_SHA_0_HASH_L_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_0_HASH_L_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_SHA_0_HASH_L_1_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_sha_0_hash_l_1(&self) -> SE_SHA_0_HASH_L_1_R { - SE_SHA_0_HASH_L_1_R::new((self.bits & 0xffff_ffff) as u32) + SE_SHA_0_HASH_L_1_R::new(self.bits) } } #[doc = "se_sha_0_hash_l_1.\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 [se_sha_0_hash_l_1](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SE_SHA_0_HASH_L_1_SPEC { } #[doc = "`reset()` method sets se_sha_0_hash_l_1 to value 0"] impl crate::Resettable for SE_SHA_0_HASH_L_1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_sha_0_hash_l_2.rs b/src/sec_eng/se_sha_0_hash_l_2.rs index 753be7a..e7b7634 100644 --- a/src/sec_eng/se_sha_0_hash_l_2.rs +++ b/src/sec_eng/se_sha_0_hash_l_2.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `se_sha_0_hash_l_2` reader - "] -pub struct SE_SHA_0_HASH_L_2_R(crate::FieldReader); -impl SE_SHA_0_HASH_L_2_R { - pub(crate) fn new(bits: u32) -> Self { - SE_SHA_0_HASH_L_2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_0_HASH_L_2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_SHA_0_HASH_L_2_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_sha_0_hash_l_2(&self) -> SE_SHA_0_HASH_L_2_R { - SE_SHA_0_HASH_L_2_R::new((self.bits & 0xffff_ffff) as u32) + SE_SHA_0_HASH_L_2_R::new(self.bits) } } #[doc = "se_sha_0_hash_l_2.\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 [se_sha_0_hash_l_2](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SE_SHA_0_HASH_L_2_SPEC { } #[doc = "`reset()` method sets se_sha_0_hash_l_2 to value 0"] impl crate::Resettable for SE_SHA_0_HASH_L_2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_sha_0_hash_l_3.rs b/src/sec_eng/se_sha_0_hash_l_3.rs index 34278fa..f0877ba 100644 --- a/src/sec_eng/se_sha_0_hash_l_3.rs +++ b/src/sec_eng/se_sha_0_hash_l_3.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `se_sha_0_hash_l_3` reader - "] -pub struct SE_SHA_0_HASH_L_3_R(crate::FieldReader); -impl SE_SHA_0_HASH_L_3_R { - pub(crate) fn new(bits: u32) -> Self { - SE_SHA_0_HASH_L_3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_0_HASH_L_3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_SHA_0_HASH_L_3_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_sha_0_hash_l_3(&self) -> SE_SHA_0_HASH_L_3_R { - SE_SHA_0_HASH_L_3_R::new((self.bits & 0xffff_ffff) as u32) + SE_SHA_0_HASH_L_3_R::new(self.bits) } } #[doc = "se_sha_0_hash_l_3.\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 [se_sha_0_hash_l_3](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SE_SHA_0_HASH_L_3_SPEC { } #[doc = "`reset()` method sets se_sha_0_hash_l_3 to value 0"] impl crate::Resettable for SE_SHA_0_HASH_L_3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_sha_0_hash_l_4.rs b/src/sec_eng/se_sha_0_hash_l_4.rs index 0e9dc46..f399dc6 100644 --- a/src/sec_eng/se_sha_0_hash_l_4.rs +++ b/src/sec_eng/se_sha_0_hash_l_4.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `se_sha_0_hash_l_4` reader - "] -pub struct SE_SHA_0_HASH_L_4_R(crate::FieldReader); -impl SE_SHA_0_HASH_L_4_R { - pub(crate) fn new(bits: u32) -> Self { - SE_SHA_0_HASH_L_4_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_0_HASH_L_4_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_SHA_0_HASH_L_4_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_sha_0_hash_l_4(&self) -> SE_SHA_0_HASH_L_4_R { - SE_SHA_0_HASH_L_4_R::new((self.bits & 0xffff_ffff) as u32) + SE_SHA_0_HASH_L_4_R::new(self.bits) } } #[doc = "se_sha_0_hash_l_4.\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 [se_sha_0_hash_l_4](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SE_SHA_0_HASH_L_4_SPEC { } #[doc = "`reset()` method sets se_sha_0_hash_l_4 to value 0"] impl crate::Resettable for SE_SHA_0_HASH_L_4_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_sha_0_hash_l_5.rs b/src/sec_eng/se_sha_0_hash_l_5.rs index 63e2dd3..6e11a97 100644 --- a/src/sec_eng/se_sha_0_hash_l_5.rs +++ b/src/sec_eng/se_sha_0_hash_l_5.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `se_sha_0_hash_l_5` reader - "] -pub struct SE_SHA_0_HASH_L_5_R(crate::FieldReader); -impl SE_SHA_0_HASH_L_5_R { - pub(crate) fn new(bits: u32) -> Self { - SE_SHA_0_HASH_L_5_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_0_HASH_L_5_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_SHA_0_HASH_L_5_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_sha_0_hash_l_5(&self) -> SE_SHA_0_HASH_L_5_R { - SE_SHA_0_HASH_L_5_R::new((self.bits & 0xffff_ffff) as u32) + SE_SHA_0_HASH_L_5_R::new(self.bits) } } #[doc = "se_sha_0_hash_l_5.\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 [se_sha_0_hash_l_5](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SE_SHA_0_HASH_L_5_SPEC { } #[doc = "`reset()` method sets se_sha_0_hash_l_5 to value 0"] impl crate::Resettable for SE_SHA_0_HASH_L_5_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_sha_0_hash_l_6.rs b/src/sec_eng/se_sha_0_hash_l_6.rs index 09a8c77..fa0dfca 100644 --- a/src/sec_eng/se_sha_0_hash_l_6.rs +++ b/src/sec_eng/se_sha_0_hash_l_6.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `se_sha_0_hash_l_6` reader - "] -pub struct SE_SHA_0_HASH_L_6_R(crate::FieldReader); -impl SE_SHA_0_HASH_L_6_R { - pub(crate) fn new(bits: u32) -> Self { - SE_SHA_0_HASH_L_6_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_0_HASH_L_6_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_SHA_0_HASH_L_6_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_sha_0_hash_l_6(&self) -> SE_SHA_0_HASH_L_6_R { - SE_SHA_0_HASH_L_6_R::new((self.bits & 0xffff_ffff) as u32) + SE_SHA_0_HASH_L_6_R::new(self.bits) } } #[doc = "se_sha_0_hash_l_6.\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 [se_sha_0_hash_l_6](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SE_SHA_0_HASH_L_6_SPEC { } #[doc = "`reset()` method sets se_sha_0_hash_l_6 to value 0"] impl crate::Resettable for SE_SHA_0_HASH_L_6_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_sha_0_hash_l_7.rs b/src/sec_eng/se_sha_0_hash_l_7.rs index 6fc9744..7280f00 100644 --- a/src/sec_eng/se_sha_0_hash_l_7.rs +++ b/src/sec_eng/se_sha_0_hash_l_7.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `se_sha_0_hash_l_7` reader - "] -pub struct SE_SHA_0_HASH_L_7_R(crate::FieldReader); -impl SE_SHA_0_HASH_L_7_R { - pub(crate) fn new(bits: u32) -> Self { - SE_SHA_0_HASH_L_7_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_0_HASH_L_7_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_SHA_0_HASH_L_7_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_sha_0_hash_l_7(&self) -> SE_SHA_0_HASH_L_7_R { - SE_SHA_0_HASH_L_7_R::new((self.bits & 0xffff_ffff) as u32) + SE_SHA_0_HASH_L_7_R::new(self.bits) } } #[doc = "se_sha_0_hash_l_7.\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 [se_sha_0_hash_l_7](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SE_SHA_0_HASH_L_7_SPEC { } #[doc = "`reset()` method sets se_sha_0_hash_l_7 to value 0"] impl crate::Resettable for SE_SHA_0_HASH_L_7_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_sha_0_link.rs b/src/sec_eng/se_sha_0_link.rs index ff14460..3eeb2da 100644 --- a/src/sec_eng/se_sha_0_link.rs +++ b/src/sec_eng/se_sha_0_link.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `se_sha_0_lca` reader - "] -pub struct SE_SHA_0_LCA_R(crate::FieldReader); -impl SE_SHA_0_LCA_R { - pub(crate) fn new(bits: u32) -> Self { - SE_SHA_0_LCA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_0_LCA_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_SHA_0_LCA_R = crate::FieldReader; #[doc = "Field `se_sha_0_lca` writer - "] -pub struct SE_SHA_0_LCA_W<'a> { - w: &'a mut W, -} -impl<'a> SE_SHA_0_LCA_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SE_SHA_0_LCA_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_SHA_0_LINK_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_sha_0_lca(&self) -> SE_SHA_0_LCA_R { - SE_SHA_0_LCA_R::new((self.bits & 0xffff_ffff) as u32) + SE_SHA_0_LCA_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn se_sha_0_lca(&mut self) -> SE_SHA_0_LCA_W { - SE_SHA_0_LCA_W { w: self } + #[must_use] + pub fn se_sha_0_lca(&mut self) -> SE_SHA_0_LCA_W<0> { + SE_SHA_0_LCA_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SE_SHA_0_LINK_SPEC { #[doc = "`write(|w| ..)` method takes [se_sha_0_link::W](W) writer structure"] impl crate::Writable for SE_SHA_0_LINK_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_sha_0_link to value 0"] impl crate::Resettable for SE_SHA_0_LINK_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_sha_0_msa.rs b/src/sec_eng/se_sha_0_msa.rs index 6f28b40..6e7b454 100644 --- a/src/sec_eng/se_sha_0_msa.rs +++ b/src/sec_eng/se_sha_0_msa.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `se_sha_0_msa` reader - "] -pub struct SE_SHA_0_MSA_R(crate::FieldReader); -impl SE_SHA_0_MSA_R { - pub(crate) fn new(bits: u32) -> Self { - SE_SHA_0_MSA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_0_MSA_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_SHA_0_MSA_R = crate::FieldReader; #[doc = "Field `se_sha_0_msa` writer - "] -pub struct SE_SHA_0_MSA_W<'a> { - w: &'a mut W, -} -impl<'a> SE_SHA_0_MSA_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SE_SHA_0_MSA_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_SHA_0_MSA_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_sha_0_msa(&self) -> SE_SHA_0_MSA_R { - SE_SHA_0_MSA_R::new((self.bits & 0xffff_ffff) as u32) + SE_SHA_0_MSA_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn se_sha_0_msa(&mut self) -> SE_SHA_0_MSA_W { - SE_SHA_0_MSA_W { w: self } + #[must_use] + pub fn se_sha_0_msa(&mut self) -> SE_SHA_0_MSA_W<0> { + SE_SHA_0_MSA_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SE_SHA_0_MSA_SPEC { #[doc = "`write(|w| ..)` method takes [se_sha_0_msa::W](W) writer structure"] impl crate::Writable for SE_SHA_0_MSA_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_sha_0_msa to value 0"] impl crate::Resettable for SE_SHA_0_MSA_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_sha_0_status.rs b/src/sec_eng/se_sha_0_status.rs index ed44935..28fb5a0 100644 --- a/src/sec_eng/se_sha_0_status.rs +++ b/src/sec_eng/se_sha_0_status.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `se_sha_0_status` reader - "] -pub struct SE_SHA_0_STATUS_R(crate::FieldReader); -impl SE_SHA_0_STATUS_R { - pub(crate) fn new(bits: u32) -> Self { - SE_SHA_0_STATUS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_SHA_0_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_SHA_0_STATUS_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_sha_0_status(&self) -> SE_SHA_0_STATUS_R { - SE_SHA_0_STATUS_R::new((self.bits & 0xffff_ffff) as u32) + SE_SHA_0_STATUS_R::new(self.bits) } } #[doc = "se_sha_0_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 [se_sha_0_status](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SE_SHA_0_STATUS_SPEC { } #[doc = "`reset()` method sets se_sha_0_status to value 0x41"] impl crate::Resettable for SE_SHA_0_STATUS_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x41 - } + const RESET_VALUE: Self::Ux = 0x41; } diff --git a/src/sec_eng/se_trng_0_ctrl_0.rs b/src/sec_eng/se_trng_0_ctrl_0.rs index 4df5876..bd039c9 100644 --- a/src/sec_eng/se_trng_0_ctrl_0.rs +++ b/src/sec_eng/se_trng_0_ctrl_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,486 +28,182 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `se_trng_0_manual_en` reader - "] -pub struct SE_TRNG_0_MANUAL_EN_R(crate::FieldReader); -impl SE_TRNG_0_MANUAL_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_TRNG_0_MANUAL_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_MANUAL_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_trng_0_manual_en` writer - "] -pub struct SE_TRNG_0_MANUAL_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_TRNG_0_MANUAL_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15); - self.w - } -} -#[doc = "Field `se_trng_0_manual_reseed` reader - "] -pub struct SE_TRNG_0_MANUAL_RESEED_R(crate::FieldReader); -impl SE_TRNG_0_MANUAL_RESEED_R { - pub(crate) fn new(bits: bool) -> Self { - SE_TRNG_0_MANUAL_RESEED_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_MANUAL_RESEED_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_trng_0_manual_reseed` writer - "] -pub struct SE_TRNG_0_MANUAL_RESEED_W<'a> { - w: &'a mut W, -} -impl<'a> SE_TRNG_0_MANUAL_RESEED_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14); - self.w - } -} -#[doc = "Field `se_trng_0_manual_fun_sel` reader - "] -pub struct SE_TRNG_0_MANUAL_FUN_SEL_R(crate::FieldReader); -impl SE_TRNG_0_MANUAL_FUN_SEL_R { - pub(crate) fn new(bits: bool) -> Self { - SE_TRNG_0_MANUAL_FUN_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_MANUAL_FUN_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_trng_0_manual_fun_sel` writer - "] -pub struct SE_TRNG_0_MANUAL_FUN_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SE_TRNG_0_MANUAL_FUN_SEL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13); - self.w - } -} -#[doc = "Field `se_trng_0_int_mask` reader - "] -pub struct SE_TRNG_0_INT_MASK_R(crate::FieldReader); -impl SE_TRNG_0_INT_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - SE_TRNG_0_INT_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_INT_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_trng_0_int_mask` writer - "] -pub struct SE_TRNG_0_INT_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> SE_TRNG_0_INT_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w - } -} -#[doc = "Field `se_trng_0_int_set_1t` reader - "] -pub struct SE_TRNG_0_INT_SET_1T_R(crate::FieldReader); -impl SE_TRNG_0_INT_SET_1T_R { - pub(crate) fn new(bits: bool) -> Self { - SE_TRNG_0_INT_SET_1T_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_INT_SET_1T_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_trng_0_int_set_1t` writer - "] -pub struct SE_TRNG_0_INT_SET_1T_W<'a> { - w: &'a mut W, -} -impl<'a> SE_TRNG_0_INT_SET_1T_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); - self.w - } -} -#[doc = "Field `se_trng_0_int_clr_1t` reader - "] -pub struct SE_TRNG_0_INT_CLR_1T_R(crate::FieldReader); -impl SE_TRNG_0_INT_CLR_1T_R { - pub(crate) fn new(bits: bool) -> Self { - SE_TRNG_0_INT_CLR_1T_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_INT_CLR_1T_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_trng_0_int_clr_1t` writer - "] -pub struct SE_TRNG_0_INT_CLR_1T_W<'a> { - w: &'a mut W, -} -impl<'a> SE_TRNG_0_INT_CLR_1T_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w - } -} -#[doc = "Field `se_trng_0_int` reader - "] -pub struct SE_TRNG_0_INT_R(crate::FieldReader); -impl SE_TRNG_0_INT_R { - pub(crate) fn new(bits: bool) -> Self { - SE_TRNG_0_INT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_INT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_trng_0_ht_error` reader - "] -pub struct SE_TRNG_0_HT_ERROR_R(crate::FieldReader); -impl SE_TRNG_0_HT_ERROR_R { - pub(crate) fn new(bits: bool) -> Self { - SE_TRNG_0_HT_ERROR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_HT_ERROR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_trng_0_dout_clr_1t` reader - "] -pub struct SE_TRNG_0_DOUT_CLR_1T_R(crate::FieldReader); -impl SE_TRNG_0_DOUT_CLR_1T_R { - pub(crate) fn new(bits: bool) -> Self { - SE_TRNG_0_DOUT_CLR_1T_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_DOUT_CLR_1T_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_trng_0_dout_clr_1t` writer - "] -pub struct SE_TRNG_0_DOUT_CLR_1T_W<'a> { - w: &'a mut W, -} -impl<'a> SE_TRNG_0_DOUT_CLR_1T_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `se_trng_0_en` reader - "] -pub struct SE_TRNG_0_EN_R(crate::FieldReader); -impl SE_TRNG_0_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_TRNG_0_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_trng_0_en` writer - "] -pub struct SE_TRNG_0_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_TRNG_0_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} +#[doc = "Field `se_trng_0_busy` reader - "] +pub type SE_TRNG_0_BUSY_R = crate::BitReader; #[doc = "Field `se_trng_0_trig_1t` reader - "] -pub struct SE_TRNG_0_TRIG_1T_R(crate::FieldReader); -impl SE_TRNG_0_TRIG_1T_R { - pub(crate) fn new(bits: bool) -> Self { - SE_TRNG_0_TRIG_1T_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_TRIG_1T_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_TRNG_0_TRIG_1T_R = crate::BitReader; #[doc = "Field `se_trng_0_trig_1t` writer - "] -pub struct SE_TRNG_0_TRIG_1T_W<'a> { - w: &'a mut W, -} -impl<'a> SE_TRNG_0_TRIG_1T_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} -#[doc = "Field `se_trng_0_busy` reader - "] -pub struct SE_TRNG_0_BUSY_R(crate::FieldReader); -impl SE_TRNG_0_BUSY_R { - pub(crate) fn new(bits: bool) -> Self { - SE_TRNG_0_BUSY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_BUSY_R { - type Target = crate::FieldReader; +pub type SE_TRNG_0_TRIG_1T_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_TRNG_0_CTRL_0_SPEC, bool, O>; +#[doc = "Field `se_trng_0_en` reader - "] +pub type SE_TRNG_0_EN_R = crate::BitReader; +#[doc = "Field `se_trng_0_en` writer - "] +pub type SE_TRNG_0_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_TRNG_0_CTRL_0_SPEC, bool, O>; +#[doc = "Field `se_trng_0_dout_clr_1t` reader - "] +pub type SE_TRNG_0_DOUT_CLR_1T_R = crate::BitReader; +#[doc = "Field `se_trng_0_dout_clr_1t` writer - "] +pub type SE_TRNG_0_DOUT_CLR_1T_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_TRNG_0_CTRL_0_SPEC, bool, O>; +#[doc = "Field `se_trng_0_ht_error` reader - "] +pub type SE_TRNG_0_HT_ERROR_R = crate::BitReader; +#[doc = "Field `se_trng_0_int` reader - "] +pub type SE_TRNG_0_INT_R = crate::BitReader; +#[doc = "Field `se_trng_0_int_clr_1t` reader - "] +pub type SE_TRNG_0_INT_CLR_1T_R = crate::BitReader; +#[doc = "Field `se_trng_0_int_clr_1t` writer - "] +pub type SE_TRNG_0_INT_CLR_1T_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_TRNG_0_CTRL_0_SPEC, bool, O>; +#[doc = "Field `se_trng_0_int_set_1t` reader - "] +pub type SE_TRNG_0_INT_SET_1T_R = crate::BitReader; +#[doc = "Field `se_trng_0_int_set_1t` writer - "] +pub type SE_TRNG_0_INT_SET_1T_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_TRNG_0_CTRL_0_SPEC, bool, O>; +#[doc = "Field `se_trng_0_int_mask` reader - "] +pub type SE_TRNG_0_INT_MASK_R = crate::BitReader; +#[doc = "Field `se_trng_0_int_mask` writer - "] +pub type SE_TRNG_0_INT_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_TRNG_0_CTRL_0_SPEC, bool, O>; +#[doc = "Field `se_trng_0_manual_fun_sel` reader - "] +pub type SE_TRNG_0_MANUAL_FUN_SEL_R = crate::BitReader; +#[doc = "Field `se_trng_0_manual_fun_sel` writer - "] +pub type SE_TRNG_0_MANUAL_FUN_SEL_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_TRNG_0_CTRL_0_SPEC, bool, O>; +#[doc = "Field `se_trng_0_manual_reseed` reader - "] +pub type SE_TRNG_0_MANUAL_RESEED_R = crate::BitReader; +#[doc = "Field `se_trng_0_manual_reseed` writer - "] +pub type SE_TRNG_0_MANUAL_RESEED_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_TRNG_0_CTRL_0_SPEC, bool, O>; +#[doc = "Field `se_trng_0_manual_en` reader - "] +pub type SE_TRNG_0_MANUAL_EN_R = crate::BitReader; +#[doc = "Field `se_trng_0_manual_en` writer - "] +pub type SE_TRNG_0_MANUAL_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_TRNG_0_CTRL_0_SPEC, bool, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn se_trng_0_busy(&self) -> SE_TRNG_0_BUSY_R { + SE_TRNG_0_BUSY_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bit 15"] + #[doc = "Bit 1"] #[inline(always)] - pub fn se_trng_0_manual_en(&self) -> SE_TRNG_0_MANUAL_EN_R { - SE_TRNG_0_MANUAL_EN_R::new(((self.bits >> 15) & 0x01) != 0) + pub fn se_trng_0_trig_1t(&self) -> SE_TRNG_0_TRIG_1T_R { + SE_TRNG_0_TRIG_1T_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 14"] + #[doc = "Bit 2"] #[inline(always)] - pub fn se_trng_0_manual_reseed(&self) -> SE_TRNG_0_MANUAL_RESEED_R { - SE_TRNG_0_MANUAL_RESEED_R::new(((self.bits >> 14) & 0x01) != 0) + pub fn se_trng_0_en(&self) -> SE_TRNG_0_EN_R { + SE_TRNG_0_EN_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 13"] + #[doc = "Bit 3"] #[inline(always)] - pub fn se_trng_0_manual_fun_sel(&self) -> SE_TRNG_0_MANUAL_FUN_SEL_R { - SE_TRNG_0_MANUAL_FUN_SEL_R::new(((self.bits >> 13) & 0x01) != 0) + pub fn se_trng_0_dout_clr_1t(&self) -> SE_TRNG_0_DOUT_CLR_1T_R { + SE_TRNG_0_DOUT_CLR_1T_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bit 11"] + #[doc = "Bit 4"] #[inline(always)] - pub fn se_trng_0_int_mask(&self) -> SE_TRNG_0_INT_MASK_R { - SE_TRNG_0_INT_MASK_R::new(((self.bits >> 11) & 0x01) != 0) + pub fn se_trng_0_ht_error(&self) -> SE_TRNG_0_HT_ERROR_R { + SE_TRNG_0_HT_ERROR_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 10"] + #[doc = "Bit 8"] #[inline(always)] - pub fn se_trng_0_int_set_1t(&self) -> SE_TRNG_0_INT_SET_1T_R { - SE_TRNG_0_INT_SET_1T_R::new(((self.bits >> 10) & 0x01) != 0) + pub fn se_trng_0_int(&self) -> SE_TRNG_0_INT_R { + SE_TRNG_0_INT_R::new(((self.bits >> 8) & 1) != 0) } #[doc = "Bit 9"] #[inline(always)] pub fn se_trng_0_int_clr_1t(&self) -> SE_TRNG_0_INT_CLR_1T_R { - SE_TRNG_0_INT_CLR_1T_R::new(((self.bits >> 9) & 0x01) != 0) - } - #[doc = "Bit 8"] - #[inline(always)] - pub fn se_trng_0_int(&self) -> SE_TRNG_0_INT_R { - SE_TRNG_0_INT_R::new(((self.bits >> 8) & 0x01) != 0) + SE_TRNG_0_INT_CLR_1T_R::new(((self.bits >> 9) & 1) != 0) } - #[doc = "Bit 4"] + #[doc = "Bit 10"] #[inline(always)] - pub fn se_trng_0_ht_error(&self) -> SE_TRNG_0_HT_ERROR_R { - SE_TRNG_0_HT_ERROR_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn se_trng_0_int_set_1t(&self) -> SE_TRNG_0_INT_SET_1T_R { + SE_TRNG_0_INT_SET_1T_R::new(((self.bits >> 10) & 1) != 0) } - #[doc = "Bit 3"] + #[doc = "Bit 11"] #[inline(always)] - pub fn se_trng_0_dout_clr_1t(&self) -> SE_TRNG_0_DOUT_CLR_1T_R { - SE_TRNG_0_DOUT_CLR_1T_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn se_trng_0_int_mask(&self) -> SE_TRNG_0_INT_MASK_R { + SE_TRNG_0_INT_MASK_R::new(((self.bits >> 11) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bit 13"] #[inline(always)] - pub fn se_trng_0_en(&self) -> SE_TRNG_0_EN_R { - SE_TRNG_0_EN_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn se_trng_0_manual_fun_sel(&self) -> SE_TRNG_0_MANUAL_FUN_SEL_R { + SE_TRNG_0_MANUAL_FUN_SEL_R::new(((self.bits >> 13) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 14"] #[inline(always)] - pub fn se_trng_0_trig_1t(&self) -> SE_TRNG_0_TRIG_1T_R { - SE_TRNG_0_TRIG_1T_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn se_trng_0_manual_reseed(&self) -> SE_TRNG_0_MANUAL_RESEED_R { + SE_TRNG_0_MANUAL_RESEED_R::new(((self.bits >> 14) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 15"] #[inline(always)] - pub fn se_trng_0_busy(&self) -> SE_TRNG_0_BUSY_R { - SE_TRNG_0_BUSY_R::new((self.bits & 0x01) != 0) + pub fn se_trng_0_manual_en(&self) -> SE_TRNG_0_MANUAL_EN_R { + SE_TRNG_0_MANUAL_EN_R::new(((self.bits >> 15) & 1) != 0) } } impl W { - #[doc = "Bit 15"] + #[doc = "Bit 1"] #[inline(always)] - pub fn se_trng_0_manual_en(&mut self) -> SE_TRNG_0_MANUAL_EN_W { - SE_TRNG_0_MANUAL_EN_W { w: self } + #[must_use] + pub fn se_trng_0_trig_1t(&mut self) -> SE_TRNG_0_TRIG_1T_W<1> { + SE_TRNG_0_TRIG_1T_W::new(self) } - #[doc = "Bit 14"] + #[doc = "Bit 2"] #[inline(always)] - pub fn se_trng_0_manual_reseed(&mut self) -> SE_TRNG_0_MANUAL_RESEED_W { - SE_TRNG_0_MANUAL_RESEED_W { w: self } + #[must_use] + pub fn se_trng_0_en(&mut self) -> SE_TRNG_0_EN_W<2> { + SE_TRNG_0_EN_W::new(self) } - #[doc = "Bit 13"] + #[doc = "Bit 3"] #[inline(always)] - pub fn se_trng_0_manual_fun_sel(&mut self) -> SE_TRNG_0_MANUAL_FUN_SEL_W { - SE_TRNG_0_MANUAL_FUN_SEL_W { w: self } + #[must_use] + pub fn se_trng_0_dout_clr_1t(&mut self) -> SE_TRNG_0_DOUT_CLR_1T_W<3> { + SE_TRNG_0_DOUT_CLR_1T_W::new(self) } - #[doc = "Bit 11"] + #[doc = "Bit 9"] #[inline(always)] - pub fn se_trng_0_int_mask(&mut self) -> SE_TRNG_0_INT_MASK_W { - SE_TRNG_0_INT_MASK_W { w: self } + #[must_use] + pub fn se_trng_0_int_clr_1t(&mut self) -> SE_TRNG_0_INT_CLR_1T_W<9> { + SE_TRNG_0_INT_CLR_1T_W::new(self) } #[doc = "Bit 10"] #[inline(always)] - pub fn se_trng_0_int_set_1t(&mut self) -> SE_TRNG_0_INT_SET_1T_W { - SE_TRNG_0_INT_SET_1T_W { w: self } + #[must_use] + pub fn se_trng_0_int_set_1t(&mut self) -> SE_TRNG_0_INT_SET_1T_W<10> { + SE_TRNG_0_INT_SET_1T_W::new(self) } - #[doc = "Bit 9"] + #[doc = "Bit 11"] #[inline(always)] - pub fn se_trng_0_int_clr_1t(&mut self) -> SE_TRNG_0_INT_CLR_1T_W { - SE_TRNG_0_INT_CLR_1T_W { w: self } + #[must_use] + pub fn se_trng_0_int_mask(&mut self) -> SE_TRNG_0_INT_MASK_W<11> { + SE_TRNG_0_INT_MASK_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bit 13"] #[inline(always)] - pub fn se_trng_0_dout_clr_1t(&mut self) -> SE_TRNG_0_DOUT_CLR_1T_W { - SE_TRNG_0_DOUT_CLR_1T_W { w: self } + #[must_use] + pub fn se_trng_0_manual_fun_sel(&mut self) -> SE_TRNG_0_MANUAL_FUN_SEL_W<13> { + SE_TRNG_0_MANUAL_FUN_SEL_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bit 14"] #[inline(always)] - pub fn se_trng_0_en(&mut self) -> SE_TRNG_0_EN_W { - SE_TRNG_0_EN_W { w: self } + #[must_use] + pub fn se_trng_0_manual_reseed(&mut self) -> SE_TRNG_0_MANUAL_RESEED_W<14> { + SE_TRNG_0_MANUAL_RESEED_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 15"] #[inline(always)] - pub fn se_trng_0_trig_1t(&mut self) -> SE_TRNG_0_TRIG_1T_W { - SE_TRNG_0_TRIG_1T_W { w: self } + #[must_use] + pub fn se_trng_0_manual_en(&mut self) -> SE_TRNG_0_MANUAL_EN_W<15> { + SE_TRNG_0_MANUAL_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -524,11 +221,10 @@ impl crate::Readable for SE_TRNG_0_CTRL_0_SPEC { #[doc = "`write(|w| ..)` method takes [se_trng_0_ctrl_0::W](W) writer structure"] impl crate::Writable for SE_TRNG_0_CTRL_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_trng_0_ctrl_0 to value 0"] impl crate::Resettable for SE_TRNG_0_CTRL_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_trng_0_ctrl_1.rs b/src/sec_eng/se_trng_0_ctrl_1.rs index 5c9e57c..41ab90f 100644 --- a/src/sec_eng/se_trng_0_ctrl_1.rs +++ b/src/sec_eng/se_trng_0_ctrl_1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `se_trng_0_reseed_n_lsb` reader - "] -pub struct SE_TRNG_0_RESEED_N_LSB_R(crate::FieldReader); -impl SE_TRNG_0_RESEED_N_LSB_R { - pub(crate) fn new(bits: u32) -> Self { - SE_TRNG_0_RESEED_N_LSB_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_RESEED_N_LSB_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_TRNG_0_RESEED_N_LSB_R = crate::FieldReader; #[doc = "Field `se_trng_0_reseed_n_lsb` writer - "] -pub struct SE_TRNG_0_RESEED_N_LSB_W<'a> { - w: &'a mut W, -} -impl<'a> SE_TRNG_0_RESEED_N_LSB_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SE_TRNG_0_RESEED_N_LSB_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_TRNG_0_CTRL_1_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_trng_0_reseed_n_lsb(&self) -> SE_TRNG_0_RESEED_N_LSB_R { - SE_TRNG_0_RESEED_N_LSB_R::new((self.bits & 0xffff_ffff) as u32) + SE_TRNG_0_RESEED_N_LSB_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn se_trng_0_reseed_n_lsb(&mut self) -> SE_TRNG_0_RESEED_N_LSB_W { - SE_TRNG_0_RESEED_N_LSB_W { w: self } + #[must_use] + pub fn se_trng_0_reseed_n_lsb(&mut self) -> SE_TRNG_0_RESEED_N_LSB_W<0> { + SE_TRNG_0_RESEED_N_LSB_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SE_TRNG_0_CTRL_1_SPEC { #[doc = "`write(|w| ..)` method takes [se_trng_0_ctrl_1::W](W) writer structure"] impl crate::Writable for SE_TRNG_0_CTRL_1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_trng_0_ctrl_1 to value 0xffff"] impl crate::Resettable for SE_TRNG_0_CTRL_1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xffff - } + const RESET_VALUE: Self::Ux = 0xffff; } diff --git a/src/sec_eng/se_trng_0_ctrl_2.rs b/src/sec_eng/se_trng_0_ctrl_2.rs index 2d845e7..8b9b663 100644 --- a/src/sec_eng/se_trng_0_ctrl_2.rs +++ b/src/sec_eng/se_trng_0_ctrl_2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,37 +28,17 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `se_trng_0_reseed_n_msb` reader - "] -pub struct SE_TRNG_0_RESEED_N_MSB_R(crate::FieldReader); -impl SE_TRNG_0_RESEED_N_MSB_R { - pub(crate) fn new(bits: u16) -> Self { - SE_TRNG_0_RESEED_N_MSB_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_RESEED_N_MSB_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_TRNG_0_RESEED_N_MSB_R = crate::FieldReader; #[doc = "Field `se_trng_0_reseed_n_msb` writer - "] -pub struct SE_TRNG_0_RESEED_N_MSB_W<'a> { - w: &'a mut W, -} -impl<'a> SE_TRNG_0_RESEED_N_MSB_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w - } -} +pub type SE_TRNG_0_RESEED_N_MSB_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_TRNG_0_CTRL_2_SPEC, u16, u16, 16, O>; impl R { #[doc = "Bits 0:15"] #[inline(always)] @@ -68,10 +49,12 @@ impl R { impl W { #[doc = "Bits 0:15"] #[inline(always)] - pub fn se_trng_0_reseed_n_msb(&mut self) -> SE_TRNG_0_RESEED_N_MSB_W { - SE_TRNG_0_RESEED_N_MSB_W { w: self } + #[must_use] + pub fn se_trng_0_reseed_n_msb(&mut self) -> SE_TRNG_0_RESEED_N_MSB_W<0> { + SE_TRNG_0_RESEED_N_MSB_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SE_TRNG_0_CTRL_2_SPEC { #[doc = "`write(|w| ..)` method takes [se_trng_0_ctrl_2::W](W) writer structure"] impl crate::Writable for SE_TRNG_0_CTRL_2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_trng_0_ctrl_2 to value 0xff"] impl crate::Resettable for SE_TRNG_0_CTRL_2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xff - } + const RESET_VALUE: Self::Ux = 0xff; } diff --git a/src/sec_eng/se_trng_0_ctrl_3.rs b/src/sec_eng/se_trng_0_ctrl_3.rs index 49495c1..c4042cc 100644 --- a/src/sec_eng/se_trng_0_ctrl_3.rs +++ b/src/sec_eng/se_trng_0_ctrl_3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,215 +28,97 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `se_trng_0_rosc_dis` reader - Used to be called 'se_trng_0_rosc_en', but the SDK calls it 'se_trng_0_rosc_dis'."] -pub struct SE_TRNG_0_ROSC_DIS_R(crate::FieldReader); -impl SE_TRNG_0_ROSC_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - SE_TRNG_0_ROSC_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_ROSC_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_trng_0_rosc_dis` writer - Used to be called 'se_trng_0_rosc_en', but the SDK calls it 'se_trng_0_rosc_dis'."] -pub struct SE_TRNG_0_ROSC_DIS_W<'a> { - w: &'a mut W, -} -impl<'a> SE_TRNG_0_ROSC_DIS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 31)) | ((value as u32 & 0x01) << 31); - self.w - } -} -#[doc = "Field `se_trng_0_ht_od_en` reader - "] -pub struct SE_TRNG_0_HT_OD_EN_R(crate::FieldReader); -impl SE_TRNG_0_HT_OD_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_TRNG_0_HT_OD_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_HT_OD_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_trng_0_ht_od_en` writer - "] -pub struct SE_TRNG_0_HT_OD_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_TRNG_0_HT_OD_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 26)) | ((value as u32 & 0x01) << 26); - self.w - } -} -#[doc = "Field `se_trng_0_ht_apt_c` reader - "] -pub struct SE_TRNG_0_HT_APT_C_R(crate::FieldReader); -impl SE_TRNG_0_HT_APT_C_R { - pub(crate) fn new(bits: u16) -> Self { - SE_TRNG_0_HT_APT_C_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_HT_APT_C_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_trng_0_ht_apt_c` writer - "] -pub struct SE_TRNG_0_HT_APT_C_W<'a> { - w: &'a mut W, -} -impl<'a> SE_TRNG_0_HT_APT_C_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03ff << 16)) | ((value as u32 & 0x03ff) << 16); - self.w - } -} -#[doc = "Field `se_trng_0_ht_rct_c` reader - "] -pub struct SE_TRNG_0_HT_RCT_C_R(crate::FieldReader); -impl SE_TRNG_0_HT_RCT_C_R { - pub(crate) fn new(bits: u8) -> Self { - SE_TRNG_0_HT_RCT_C_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_HT_RCT_C_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_trng_0_ht_rct_c` writer - "] -pub struct SE_TRNG_0_HT_RCT_C_W<'a> { - w: &'a mut W, -} -impl<'a> SE_TRNG_0_HT_RCT_C_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8); - self.w - } -} #[doc = "Field `se_trng_0_cp_ratio` reader - "] -pub struct SE_TRNG_0_CP_RATIO_R(crate::FieldReader); -impl SE_TRNG_0_CP_RATIO_R { - pub(crate) fn new(bits: u8) -> Self { - SE_TRNG_0_CP_RATIO_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_CP_RATIO_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_TRNG_0_CP_RATIO_R = crate::FieldReader; #[doc = "Field `se_trng_0_cp_ratio` writer - "] -pub struct SE_TRNG_0_CP_RATIO_W<'a> { - w: &'a mut W, -} -impl<'a> SE_TRNG_0_CP_RATIO_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff); - self.w - } -} +pub type SE_TRNG_0_CP_RATIO_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_TRNG_0_CTRL_3_SPEC, u8, u8, 8, O>; +#[doc = "Field `se_trng_0_ht_rct_c` reader - "] +pub type SE_TRNG_0_HT_RCT_C_R = crate::FieldReader; +#[doc = "Field `se_trng_0_ht_rct_c` writer - "] +pub type SE_TRNG_0_HT_RCT_C_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_TRNG_0_CTRL_3_SPEC, u8, u8, 8, O>; +#[doc = "Field `se_trng_0_ht_apt_c` reader - "] +pub type SE_TRNG_0_HT_APT_C_R = crate::FieldReader; +#[doc = "Field `se_trng_0_ht_apt_c` writer - "] +pub type SE_TRNG_0_HT_APT_C_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_TRNG_0_CTRL_3_SPEC, u16, u16, 10, O>; +#[doc = "Field `se_trng_0_ht_od_en` reader - "] +pub type SE_TRNG_0_HT_OD_EN_R = crate::BitReader; +#[doc = "Field `se_trng_0_ht_od_en` writer - "] +pub type SE_TRNG_0_HT_OD_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_TRNG_0_CTRL_3_SPEC, bool, O>; +#[doc = "Field `se_trng_0_rosc_dis` reader - Used to be called 'se_trng_0_rosc_en', but the SDK calls it 'se_trng_0_rosc_dis'."] +pub type SE_TRNG_0_ROSC_DIS_R = crate::BitReader; +#[doc = "Field `se_trng_0_rosc_dis` writer - Used to be called 'se_trng_0_rosc_en', but the SDK calls it 'se_trng_0_rosc_dis'."] +pub type SE_TRNG_0_ROSC_DIS_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_TRNG_0_CTRL_3_SPEC, bool, O>; impl R { - #[doc = "Bit 31 - Used to be called 'se_trng_0_rosc_en', but the SDK calls it 'se_trng_0_rosc_dis'."] + #[doc = "Bits 0:7"] #[inline(always)] - pub fn se_trng_0_rosc_dis(&self) -> SE_TRNG_0_ROSC_DIS_R { - SE_TRNG_0_ROSC_DIS_R::new(((self.bits >> 31) & 0x01) != 0) + pub fn se_trng_0_cp_ratio(&self) -> SE_TRNG_0_CP_RATIO_R { + SE_TRNG_0_CP_RATIO_R::new((self.bits & 0xff) as u8) } - #[doc = "Bit 26"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn se_trng_0_ht_od_en(&self) -> SE_TRNG_0_HT_OD_EN_R { - SE_TRNG_0_HT_OD_EN_R::new(((self.bits >> 26) & 0x01) != 0) + pub fn se_trng_0_ht_rct_c(&self) -> SE_TRNG_0_HT_RCT_C_R { + SE_TRNG_0_HT_RCT_C_R::new(((self.bits >> 8) & 0xff) as u8) } #[doc = "Bits 16:25"] #[inline(always)] pub fn se_trng_0_ht_apt_c(&self) -> SE_TRNG_0_HT_APT_C_R { SE_TRNG_0_HT_APT_C_R::new(((self.bits >> 16) & 0x03ff) as u16) } - #[doc = "Bits 8:15"] + #[doc = "Bit 26"] #[inline(always)] - pub fn se_trng_0_ht_rct_c(&self) -> SE_TRNG_0_HT_RCT_C_R { - SE_TRNG_0_HT_RCT_C_R::new(((self.bits >> 8) & 0xff) as u8) + pub fn se_trng_0_ht_od_en(&self) -> SE_TRNG_0_HT_OD_EN_R { + SE_TRNG_0_HT_OD_EN_R::new(((self.bits >> 26) & 1) != 0) } - #[doc = "Bits 0:7"] + #[doc = "Bit 31 - Used to be called 'se_trng_0_rosc_en', but the SDK calls it 'se_trng_0_rosc_dis'."] #[inline(always)] - pub fn se_trng_0_cp_ratio(&self) -> SE_TRNG_0_CP_RATIO_R { - SE_TRNG_0_CP_RATIO_R::new((self.bits & 0xff) as u8) + pub fn se_trng_0_rosc_dis(&self) -> SE_TRNG_0_ROSC_DIS_R { + SE_TRNG_0_ROSC_DIS_R::new(((self.bits >> 31) & 1) != 0) } } impl W { - #[doc = "Bit 31 - Used to be called 'se_trng_0_rosc_en', but the SDK calls it 'se_trng_0_rosc_dis'."] + #[doc = "Bits 0:7"] #[inline(always)] - pub fn se_trng_0_rosc_dis(&mut self) -> SE_TRNG_0_ROSC_DIS_W { - SE_TRNG_0_ROSC_DIS_W { w: self } + #[must_use] + pub fn se_trng_0_cp_ratio(&mut self) -> SE_TRNG_0_CP_RATIO_W<0> { + SE_TRNG_0_CP_RATIO_W::new(self) } - #[doc = "Bit 26"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn se_trng_0_ht_od_en(&mut self) -> SE_TRNG_0_HT_OD_EN_W { - SE_TRNG_0_HT_OD_EN_W { w: self } + #[must_use] + pub fn se_trng_0_ht_rct_c(&mut self) -> SE_TRNG_0_HT_RCT_C_W<8> { + SE_TRNG_0_HT_RCT_C_W::new(self) } #[doc = "Bits 16:25"] #[inline(always)] - pub fn se_trng_0_ht_apt_c(&mut self) -> SE_TRNG_0_HT_APT_C_W { - SE_TRNG_0_HT_APT_C_W { w: self } + #[must_use] + pub fn se_trng_0_ht_apt_c(&mut self) -> SE_TRNG_0_HT_APT_C_W<16> { + SE_TRNG_0_HT_APT_C_W::new(self) } - #[doc = "Bits 8:15"] + #[doc = "Bit 26"] #[inline(always)] - pub fn se_trng_0_ht_rct_c(&mut self) -> SE_TRNG_0_HT_RCT_C_W { - SE_TRNG_0_HT_RCT_C_W { w: self } + #[must_use] + pub fn se_trng_0_ht_od_en(&mut self) -> SE_TRNG_0_HT_OD_EN_W<26> { + SE_TRNG_0_HT_OD_EN_W::new(self) } - #[doc = "Bits 0:7"] + #[doc = "Bit 31 - Used to be called 'se_trng_0_rosc_en', but the SDK calls it 'se_trng_0_rosc_dis'."] #[inline(always)] - pub fn se_trng_0_cp_ratio(&mut self) -> SE_TRNG_0_CP_RATIO_W { - SE_TRNG_0_CP_RATIO_W { w: self } + #[must_use] + pub fn se_trng_0_rosc_dis(&mut self) -> SE_TRNG_0_ROSC_DIS_W<31> { + SE_TRNG_0_ROSC_DIS_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -253,11 +136,10 @@ impl crate::Readable for SE_TRNG_0_CTRL_3_SPEC { #[doc = "`write(|w| ..)` method takes [se_trng_0_ctrl_3::W](W) writer structure"] impl crate::Writable for SE_TRNG_0_CTRL_3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_trng_0_ctrl_3 to value 0x837a_4203"] impl crate::Resettable for SE_TRNG_0_CTRL_3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x837a_4203 - } + const RESET_VALUE: Self::Ux = 0x837a_4203; } diff --git a/src/sec_eng/se_trng_0_ctrl_prot.rs b/src/sec_eng/se_trng_0_ctrl_prot.rs index 4f6d07b..df40200 100644 --- a/src/sec_eng/se_trng_0_ctrl_prot.rs +++ b/src/sec_eng/se_trng_0_ctrl_prot.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,153 +28,65 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `se_trng_id1_en` reader - "] -pub struct SE_TRNG_ID1_EN_R(crate::FieldReader); -impl SE_TRNG_ID1_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_TRNG_ID1_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_ID1_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_trng_id1_en` writer - "] -pub struct SE_TRNG_ID1_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_TRNG_ID1_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `se_trng_id0_en` reader - "] -pub struct SE_TRNG_ID0_EN_R(crate::FieldReader); -impl SE_TRNG_ID0_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_TRNG_ID0_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_ID0_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_trng_id0_en` writer - "] -pub struct SE_TRNG_ID0_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_TRNG_ID0_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `se_trng_prot_en` reader - "] -pub struct SE_TRNG_PROT_EN_R(crate::FieldReader); -impl SE_TRNG_PROT_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_TRNG_PROT_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_PROT_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_TRNG_PROT_EN_R = crate::BitReader; #[doc = "Field `se_trng_prot_en` writer - "] -pub struct SE_TRNG_PROT_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_TRNG_PROT_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type SE_TRNG_PROT_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_TRNG_0_CTRL_PROT_SPEC, bool, O>; +#[doc = "Field `se_trng_id0_en` reader - "] +pub type SE_TRNG_ID0_EN_R = crate::BitReader; +#[doc = "Field `se_trng_id0_en` writer - "] +pub type SE_TRNG_ID0_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_TRNG_0_CTRL_PROT_SPEC, bool, O>; +#[doc = "Field `se_trng_id1_en` reader - "] +pub type SE_TRNG_ID1_EN_R = crate::BitReader; +#[doc = "Field `se_trng_id1_en` writer - "] +pub type SE_TRNG_ID1_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_TRNG_0_CTRL_PROT_SPEC, bool, O>; impl R { - #[doc = "Bit 2"] + #[doc = "Bit 0"] #[inline(always)] - pub fn se_trng_id1_en(&self) -> SE_TRNG_ID1_EN_R { - SE_TRNG_ID1_EN_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn se_trng_prot_en(&self) -> SE_TRNG_PROT_EN_R { + SE_TRNG_PROT_EN_R::new((self.bits & 1) != 0) } #[doc = "Bit 1"] #[inline(always)] pub fn se_trng_id0_en(&self) -> SE_TRNG_ID0_EN_R { - SE_TRNG_ID0_EN_R::new(((self.bits >> 1) & 0x01) != 0) + SE_TRNG_ID0_EN_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 2"] #[inline(always)] - pub fn se_trng_prot_en(&self) -> SE_TRNG_PROT_EN_R { - SE_TRNG_PROT_EN_R::new((self.bits & 0x01) != 0) + pub fn se_trng_id1_en(&self) -> SE_TRNG_ID1_EN_R { + SE_TRNG_ID1_EN_R::new(((self.bits >> 2) & 1) != 0) } } impl W { - #[doc = "Bit 2"] + #[doc = "Bit 0"] #[inline(always)] - pub fn se_trng_id1_en(&mut self) -> SE_TRNG_ID1_EN_W { - SE_TRNG_ID1_EN_W { w: self } + #[must_use] + pub fn se_trng_prot_en(&mut self) -> SE_TRNG_PROT_EN_W<0> { + SE_TRNG_PROT_EN_W::new(self) } #[doc = "Bit 1"] #[inline(always)] - pub fn se_trng_id0_en(&mut self) -> SE_TRNG_ID0_EN_W { - SE_TRNG_ID0_EN_W { w: self } + #[must_use] + pub fn se_trng_id0_en(&mut self) -> SE_TRNG_ID0_EN_W<1> { + SE_TRNG_ID0_EN_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 2"] #[inline(always)] - pub fn se_trng_prot_en(&mut self) -> SE_TRNG_PROT_EN_W { - SE_TRNG_PROT_EN_W { w: self } + #[must_use] + pub fn se_trng_id1_en(&mut self) -> SE_TRNG_ID1_EN_W<2> { + SE_TRNG_ID1_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -191,11 +104,10 @@ impl crate::Readable for SE_TRNG_0_CTRL_PROT_SPEC { #[doc = "`write(|w| ..)` method takes [se_trng_0_ctrl_prot::W](W) writer structure"] impl crate::Writable for SE_TRNG_0_CTRL_PROT_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_trng_0_ctrl_prot to value 0x07"] impl crate::Resettable for SE_TRNG_0_CTRL_PROT_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x07 - } + const RESET_VALUE: Self::Ux = 0x07; } diff --git a/src/sec_eng/se_trng_0_dout_0.rs b/src/sec_eng/se_trng_0_dout_0.rs index ac1172b..768806f 100644 --- a/src/sec_eng/se_trng_0_dout_0.rs +++ b/src/sec_eng/se_trng_0_dout_0.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `se_trng_0_dout_0` reader - "] -pub struct SE_TRNG_0_DOUT_0_R(crate::FieldReader); -impl SE_TRNG_0_DOUT_0_R { - pub(crate) fn new(bits: u32) -> Self { - SE_TRNG_0_DOUT_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_DOUT_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_TRNG_0_DOUT_0_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_trng_0_dout_0(&self) -> SE_TRNG_0_DOUT_0_R { - SE_TRNG_0_DOUT_0_R::new((self.bits & 0xffff_ffff) as u32) + SE_TRNG_0_DOUT_0_R::new(self.bits) } } #[doc = "se_trng_0_dout_0.\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 [se_trng_0_dout_0](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SE_TRNG_0_DOUT_0_SPEC { } #[doc = "`reset()` method sets se_trng_0_dout_0 to value 0"] impl crate::Resettable for SE_TRNG_0_DOUT_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_trng_0_dout_1.rs b/src/sec_eng/se_trng_0_dout_1.rs index ec0f08c..b46797f 100644 --- a/src/sec_eng/se_trng_0_dout_1.rs +++ b/src/sec_eng/se_trng_0_dout_1.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `se_trng_0_dout_1` reader - "] -pub struct SE_TRNG_0_DOUT_1_R(crate::FieldReader); -impl SE_TRNG_0_DOUT_1_R { - pub(crate) fn new(bits: u32) -> Self { - SE_TRNG_0_DOUT_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_DOUT_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_TRNG_0_DOUT_1_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_trng_0_dout_1(&self) -> SE_TRNG_0_DOUT_1_R { - SE_TRNG_0_DOUT_1_R::new((self.bits & 0xffff_ffff) as u32) + SE_TRNG_0_DOUT_1_R::new(self.bits) } } #[doc = "se_trng_0_dout_1.\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 [se_trng_0_dout_1](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SE_TRNG_0_DOUT_1_SPEC { } #[doc = "`reset()` method sets se_trng_0_dout_1 to value 0"] impl crate::Resettable for SE_TRNG_0_DOUT_1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_trng_0_dout_2.rs b/src/sec_eng/se_trng_0_dout_2.rs index 25fe190..e7d78a3 100644 --- a/src/sec_eng/se_trng_0_dout_2.rs +++ b/src/sec_eng/se_trng_0_dout_2.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `se_trng_0_dout_2` reader - "] -pub struct SE_TRNG_0_DOUT_2_R(crate::FieldReader); -impl SE_TRNG_0_DOUT_2_R { - pub(crate) fn new(bits: u32) -> Self { - SE_TRNG_0_DOUT_2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_DOUT_2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_TRNG_0_DOUT_2_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_trng_0_dout_2(&self) -> SE_TRNG_0_DOUT_2_R { - SE_TRNG_0_DOUT_2_R::new((self.bits & 0xffff_ffff) as u32) + SE_TRNG_0_DOUT_2_R::new(self.bits) } } #[doc = "se_trng_0_dout_2.\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 [se_trng_0_dout_2](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SE_TRNG_0_DOUT_2_SPEC { } #[doc = "`reset()` method sets se_trng_0_dout_2 to value 0"] impl crate::Resettable for SE_TRNG_0_DOUT_2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_trng_0_dout_3.rs b/src/sec_eng/se_trng_0_dout_3.rs index e80ba32..1206d6a 100644 --- a/src/sec_eng/se_trng_0_dout_3.rs +++ b/src/sec_eng/se_trng_0_dout_3.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `se_trng_0_dout_3` reader - "] -pub struct SE_TRNG_0_DOUT_3_R(crate::FieldReader); -impl SE_TRNG_0_DOUT_3_R { - pub(crate) fn new(bits: u32) -> Self { - SE_TRNG_0_DOUT_3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_DOUT_3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_TRNG_0_DOUT_3_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_trng_0_dout_3(&self) -> SE_TRNG_0_DOUT_3_R { - SE_TRNG_0_DOUT_3_R::new((self.bits & 0xffff_ffff) as u32) + SE_TRNG_0_DOUT_3_R::new(self.bits) } } #[doc = "se_trng_0_dout_3.\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 [se_trng_0_dout_3](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SE_TRNG_0_DOUT_3_SPEC { } #[doc = "`reset()` method sets se_trng_0_dout_3 to value 0"] impl crate::Resettable for SE_TRNG_0_DOUT_3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_trng_0_dout_4.rs b/src/sec_eng/se_trng_0_dout_4.rs index 7f2dfe8..92d99e6 100644 --- a/src/sec_eng/se_trng_0_dout_4.rs +++ b/src/sec_eng/se_trng_0_dout_4.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `se_trng_0_dout_4` reader - "] -pub struct SE_TRNG_0_DOUT_4_R(crate::FieldReader); -impl SE_TRNG_0_DOUT_4_R { - pub(crate) fn new(bits: u32) -> Self { - SE_TRNG_0_DOUT_4_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_DOUT_4_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_TRNG_0_DOUT_4_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_trng_0_dout_4(&self) -> SE_TRNG_0_DOUT_4_R { - SE_TRNG_0_DOUT_4_R::new((self.bits & 0xffff_ffff) as u32) + SE_TRNG_0_DOUT_4_R::new(self.bits) } } #[doc = "se_trng_0_dout_4.\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 [se_trng_0_dout_4](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SE_TRNG_0_DOUT_4_SPEC { } #[doc = "`reset()` method sets se_trng_0_dout_4 to value 0"] impl crate::Resettable for SE_TRNG_0_DOUT_4_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_trng_0_dout_5.rs b/src/sec_eng/se_trng_0_dout_5.rs index 5252298..3b29e47 100644 --- a/src/sec_eng/se_trng_0_dout_5.rs +++ b/src/sec_eng/se_trng_0_dout_5.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `se_trng_0_dout_5` reader - "] -pub struct SE_TRNG_0_DOUT_5_R(crate::FieldReader); -impl SE_TRNG_0_DOUT_5_R { - pub(crate) fn new(bits: u32) -> Self { - SE_TRNG_0_DOUT_5_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_DOUT_5_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_TRNG_0_DOUT_5_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_trng_0_dout_5(&self) -> SE_TRNG_0_DOUT_5_R { - SE_TRNG_0_DOUT_5_R::new((self.bits & 0xffff_ffff) as u32) + SE_TRNG_0_DOUT_5_R::new(self.bits) } } #[doc = "se_trng_0_dout_5.\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 [se_trng_0_dout_5](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SE_TRNG_0_DOUT_5_SPEC { } #[doc = "`reset()` method sets se_trng_0_dout_5 to value 0"] impl crate::Resettable for SE_TRNG_0_DOUT_5_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_trng_0_dout_6.rs b/src/sec_eng/se_trng_0_dout_6.rs index cfef3e5..db9297e 100644 --- a/src/sec_eng/se_trng_0_dout_6.rs +++ b/src/sec_eng/se_trng_0_dout_6.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `se_trng_0_dout_6` reader - "] -pub struct SE_TRNG_0_DOUT_6_R(crate::FieldReader); -impl SE_TRNG_0_DOUT_6_R { - pub(crate) fn new(bits: u32) -> Self { - SE_TRNG_0_DOUT_6_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_DOUT_6_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_TRNG_0_DOUT_6_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_trng_0_dout_6(&self) -> SE_TRNG_0_DOUT_6_R { - SE_TRNG_0_DOUT_6_R::new((self.bits & 0xffff_ffff) as u32) + SE_TRNG_0_DOUT_6_R::new(self.bits) } } #[doc = "se_trng_0_dout_6.\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 [se_trng_0_dout_6](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SE_TRNG_0_DOUT_6_SPEC { } #[doc = "`reset()` method sets se_trng_0_dout_6 to value 0"] impl crate::Resettable for SE_TRNG_0_DOUT_6_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_trng_0_dout_7.rs b/src/sec_eng/se_trng_0_dout_7.rs index f9b648a..f1f6def 100644 --- a/src/sec_eng/se_trng_0_dout_7.rs +++ b/src/sec_eng/se_trng_0_dout_7.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `se_trng_0_dout_7` reader - "] -pub struct SE_TRNG_0_DOUT_7_R(crate::FieldReader); -impl SE_TRNG_0_DOUT_7_R { - pub(crate) fn new(bits: u32) -> Self { - SE_TRNG_0_DOUT_7_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_DOUT_7_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_TRNG_0_DOUT_7_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_trng_0_dout_7(&self) -> SE_TRNG_0_DOUT_7_R { - SE_TRNG_0_DOUT_7_R::new((self.bits & 0xffff_ffff) as u32) + SE_TRNG_0_DOUT_7_R::new(self.bits) } } #[doc = "se_trng_0_dout_7.\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 [se_trng_0_dout_7](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SE_TRNG_0_DOUT_7_SPEC { } #[doc = "`reset()` method sets se_trng_0_dout_7 to value 0"] impl crate::Resettable for SE_TRNG_0_DOUT_7_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_trng_0_status.rs b/src/sec_eng/se_trng_0_status.rs index 06f68ad..3ca39cf 100644 --- a/src/sec_eng/se_trng_0_status.rs +++ b/src/sec_eng/se_trng_0_status.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `se_trng_0_status` reader - "] -pub struct SE_TRNG_0_STATUS_R(crate::FieldReader); -impl SE_TRNG_0_STATUS_R { - pub(crate) fn new(bits: u32) -> Self { - SE_TRNG_0_STATUS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_TRNG_0_STATUS_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_trng_0_status(&self) -> SE_TRNG_0_STATUS_R { - SE_TRNG_0_STATUS_R::new((self.bits & 0xffff_ffff) as u32) + SE_TRNG_0_STATUS_R::new(self.bits) } } #[doc = "se_trng_0_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 [se_trng_0_status](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SE_TRNG_0_STATUS_SPEC { } #[doc = "`reset()` method sets se_trng_0_status to value 0x0010_0020"] impl crate::Resettable for SE_TRNG_0_STATUS_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0010_0020 - } + const RESET_VALUE: Self::Ux = 0x0010_0020; } diff --git a/src/sec_eng/se_trng_0_test.rs b/src/sec_eng/se_trng_0_test.rs index d3231b6..297f89e 100644 --- a/src/sec_eng/se_trng_0_test.rs +++ b/src/sec_eng/se_trng_0_test.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,235 +28,97 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `se_trng_0_ht_alarm_n` reader - "] -pub struct SE_TRNG_0_HT_ALARM_N_R(crate::FieldReader); -impl SE_TRNG_0_HT_ALARM_N_R { - pub(crate) fn new(bits: u8) -> Self { - SE_TRNG_0_HT_ALARM_N_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_HT_ALARM_N_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_trng_0_ht_alarm_n` writer - "] -pub struct SE_TRNG_0_HT_ALARM_N_W<'a> { - w: &'a mut W, -} -impl<'a> SE_TRNG_0_HT_ALARM_N_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 4)) | ((value as u32 & 0xff) << 4); - self.w - } -} -#[doc = "Field `se_trng_0_ht_dis` reader - "] -pub struct SE_TRNG_0_HT_DIS_R(crate::FieldReader); -impl SE_TRNG_0_HT_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - SE_TRNG_0_HT_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_HT_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_trng_0_ht_dis` writer - "] -pub struct SE_TRNG_0_HT_DIS_W<'a> { - w: &'a mut W, -} -impl<'a> SE_TRNG_0_HT_DIS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `se_trng_0_cp_bypass` reader - "] -pub struct SE_TRNG_0_CP_BYPASS_R(crate::FieldReader); -impl SE_TRNG_0_CP_BYPASS_R { - pub(crate) fn new(bits: bool) -> Self { - SE_TRNG_0_CP_BYPASS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_CP_BYPASS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_trng_0_cp_bypass` writer - "] -pub struct SE_TRNG_0_CP_BYPASS_W<'a> { - w: &'a mut W, -} -impl<'a> SE_TRNG_0_CP_BYPASS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `se_trng_0_cp_test_en` reader - "] -pub struct SE_TRNG_0_CP_TEST_EN_R(crate::FieldReader); -impl SE_TRNG_0_CP_TEST_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_TRNG_0_CP_TEST_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_CP_TEST_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `se_trng_0_cp_test_en` writer - "] -pub struct SE_TRNG_0_CP_TEST_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_TRNG_0_CP_TEST_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `se_trng_0_test_en` reader - "] -pub struct SE_TRNG_0_TEST_EN_R(crate::FieldReader); -impl SE_TRNG_0_TEST_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SE_TRNG_0_TEST_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_TEST_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_TRNG_0_TEST_EN_R = crate::BitReader; #[doc = "Field `se_trng_0_test_en` writer - "] -pub struct SE_TRNG_0_TEST_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SE_TRNG_0_TEST_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type SE_TRNG_0_TEST_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_TRNG_0_TEST_SPEC, bool, O>; +#[doc = "Field `se_trng_0_cp_test_en` reader - "] +pub type SE_TRNG_0_CP_TEST_EN_R = crate::BitReader; +#[doc = "Field `se_trng_0_cp_test_en` writer - "] +pub type SE_TRNG_0_CP_TEST_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_TRNG_0_TEST_SPEC, bool, O>; +#[doc = "Field `se_trng_0_cp_bypass` reader - "] +pub type SE_TRNG_0_CP_BYPASS_R = crate::BitReader; +#[doc = "Field `se_trng_0_cp_bypass` writer - "] +pub type SE_TRNG_0_CP_BYPASS_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_TRNG_0_TEST_SPEC, bool, O>; +#[doc = "Field `se_trng_0_ht_dis` reader - "] +pub type SE_TRNG_0_HT_DIS_R = crate::BitReader; +#[doc = "Field `se_trng_0_ht_dis` writer - "] +pub type SE_TRNG_0_HT_DIS_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SE_TRNG_0_TEST_SPEC, bool, O>; +#[doc = "Field `se_trng_0_ht_alarm_n` reader - "] +pub type SE_TRNG_0_HT_ALARM_N_R = crate::FieldReader; +#[doc = "Field `se_trng_0_ht_alarm_n` writer - "] +pub type SE_TRNG_0_HT_ALARM_N_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SE_TRNG_0_TEST_SPEC, u8, u8, 8, O>; impl R { - #[doc = "Bits 4:11"] + #[doc = "Bit 0"] #[inline(always)] - pub fn se_trng_0_ht_alarm_n(&self) -> SE_TRNG_0_HT_ALARM_N_R { - SE_TRNG_0_HT_ALARM_N_R::new(((self.bits >> 4) & 0xff) as u8) + pub fn se_trng_0_test_en(&self) -> SE_TRNG_0_TEST_EN_R { + SE_TRNG_0_TEST_EN_R::new((self.bits & 1) != 0) } - #[doc = "Bit 3"] + #[doc = "Bit 1"] #[inline(always)] - pub fn se_trng_0_ht_dis(&self) -> SE_TRNG_0_HT_DIS_R { - SE_TRNG_0_HT_DIS_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn se_trng_0_cp_test_en(&self) -> SE_TRNG_0_CP_TEST_EN_R { + SE_TRNG_0_CP_TEST_EN_R::new(((self.bits >> 1) & 1) != 0) } #[doc = "Bit 2"] #[inline(always)] pub fn se_trng_0_cp_bypass(&self) -> SE_TRNG_0_CP_BYPASS_R { - SE_TRNG_0_CP_BYPASS_R::new(((self.bits >> 2) & 0x01) != 0) + SE_TRNG_0_CP_BYPASS_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 3"] #[inline(always)] - pub fn se_trng_0_cp_test_en(&self) -> SE_TRNG_0_CP_TEST_EN_R { - SE_TRNG_0_CP_TEST_EN_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn se_trng_0_ht_dis(&self) -> SE_TRNG_0_HT_DIS_R { + SE_TRNG_0_HT_DIS_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bits 4:11"] #[inline(always)] - pub fn se_trng_0_test_en(&self) -> SE_TRNG_0_TEST_EN_R { - SE_TRNG_0_TEST_EN_R::new((self.bits & 0x01) != 0) + pub fn se_trng_0_ht_alarm_n(&self) -> SE_TRNG_0_HT_ALARM_N_R { + SE_TRNG_0_HT_ALARM_N_R::new(((self.bits >> 4) & 0xff) as u8) } } impl W { - #[doc = "Bits 4:11"] + #[doc = "Bit 0"] #[inline(always)] - pub fn se_trng_0_ht_alarm_n(&mut self) -> SE_TRNG_0_HT_ALARM_N_W { - SE_TRNG_0_HT_ALARM_N_W { w: self } + #[must_use] + pub fn se_trng_0_test_en(&mut self) -> SE_TRNG_0_TEST_EN_W<0> { + SE_TRNG_0_TEST_EN_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bit 1"] #[inline(always)] - pub fn se_trng_0_ht_dis(&mut self) -> SE_TRNG_0_HT_DIS_W { - SE_TRNG_0_HT_DIS_W { w: self } + #[must_use] + pub fn se_trng_0_cp_test_en(&mut self) -> SE_TRNG_0_CP_TEST_EN_W<1> { + SE_TRNG_0_CP_TEST_EN_W::new(self) } #[doc = "Bit 2"] #[inline(always)] - pub fn se_trng_0_cp_bypass(&mut self) -> SE_TRNG_0_CP_BYPASS_W { - SE_TRNG_0_CP_BYPASS_W { w: self } + #[must_use] + pub fn se_trng_0_cp_bypass(&mut self) -> SE_TRNG_0_CP_BYPASS_W<2> { + SE_TRNG_0_CP_BYPASS_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 3"] #[inline(always)] - pub fn se_trng_0_cp_test_en(&mut self) -> SE_TRNG_0_CP_TEST_EN_W { - SE_TRNG_0_CP_TEST_EN_W { w: self } + #[must_use] + pub fn se_trng_0_ht_dis(&mut self) -> SE_TRNG_0_HT_DIS_W<3> { + SE_TRNG_0_HT_DIS_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bits 4:11"] #[inline(always)] - pub fn se_trng_0_test_en(&mut self) -> SE_TRNG_0_TEST_EN_W { - SE_TRNG_0_TEST_EN_W { w: self } + #[must_use] + pub fn se_trng_0_ht_alarm_n(&mut self) -> SE_TRNG_0_HT_ALARM_N_W<4> { + SE_TRNG_0_HT_ALARM_N_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -273,11 +136,10 @@ impl crate::Readable for SE_TRNG_0_TEST_SPEC { #[doc = "`write(|w| ..)` method takes [se_trng_0_test::W](W) writer structure"] impl crate::Writable for SE_TRNG_0_TEST_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets se_trng_0_test to value 0"] impl crate::Resettable for SE_TRNG_0_TEST_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_trng_0_test_out_0.rs b/src/sec_eng/se_trng_0_test_out_0.rs index a208a99..46b8e8f 100644 --- a/src/sec_eng/se_trng_0_test_out_0.rs +++ b/src/sec_eng/se_trng_0_test_out_0.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `se_trng_0_test_out_0` reader - "] -pub struct SE_TRNG_0_TEST_OUT_0_R(crate::FieldReader); -impl SE_TRNG_0_TEST_OUT_0_R { - pub(crate) fn new(bits: u32) -> Self { - SE_TRNG_0_TEST_OUT_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_TEST_OUT_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_TRNG_0_TEST_OUT_0_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_trng_0_test_out_0(&self) -> SE_TRNG_0_TEST_OUT_0_R { - SE_TRNG_0_TEST_OUT_0_R::new((self.bits & 0xffff_ffff) as u32) + SE_TRNG_0_TEST_OUT_0_R::new(self.bits) } } #[doc = "se_trng_0_test_out_0.\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 [se_trng_0_test_out_0](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SE_TRNG_0_TEST_OUT_0_SPEC { } #[doc = "`reset()` method sets se_trng_0_test_out_0 to value 0"] impl crate::Resettable for SE_TRNG_0_TEST_OUT_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_trng_0_test_out_1.rs b/src/sec_eng/se_trng_0_test_out_1.rs index 8ffd746..968d17d 100644 --- a/src/sec_eng/se_trng_0_test_out_1.rs +++ b/src/sec_eng/se_trng_0_test_out_1.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `se_trng_0_test_out_1` reader - "] -pub struct SE_TRNG_0_TEST_OUT_1_R(crate::FieldReader); -impl SE_TRNG_0_TEST_OUT_1_R { - pub(crate) fn new(bits: u32) -> Self { - SE_TRNG_0_TEST_OUT_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_TEST_OUT_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_TRNG_0_TEST_OUT_1_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_trng_0_test_out_1(&self) -> SE_TRNG_0_TEST_OUT_1_R { - SE_TRNG_0_TEST_OUT_1_R::new((self.bits & 0xffff_ffff) as u32) + SE_TRNG_0_TEST_OUT_1_R::new(self.bits) } } #[doc = "se_trng_0_test_out_1.\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 [se_trng_0_test_out_1](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SE_TRNG_0_TEST_OUT_1_SPEC { } #[doc = "`reset()` method sets se_trng_0_test_out_1 to value 0"] impl crate::Resettable for SE_TRNG_0_TEST_OUT_1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_trng_0_test_out_2.rs b/src/sec_eng/se_trng_0_test_out_2.rs index bca47de..48a2ac3 100644 --- a/src/sec_eng/se_trng_0_test_out_2.rs +++ b/src/sec_eng/se_trng_0_test_out_2.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `se_trng_0_test_out_2` reader - "] -pub struct SE_TRNG_0_TEST_OUT_2_R(crate::FieldReader); -impl SE_TRNG_0_TEST_OUT_2_R { - pub(crate) fn new(bits: u32) -> Self { - SE_TRNG_0_TEST_OUT_2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_TEST_OUT_2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_TRNG_0_TEST_OUT_2_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_trng_0_test_out_2(&self) -> SE_TRNG_0_TEST_OUT_2_R { - SE_TRNG_0_TEST_OUT_2_R::new((self.bits & 0xffff_ffff) as u32) + SE_TRNG_0_TEST_OUT_2_R::new(self.bits) } } #[doc = "se_trng_0_test_out_2.\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 [se_trng_0_test_out_2](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SE_TRNG_0_TEST_OUT_2_SPEC { } #[doc = "`reset()` method sets se_trng_0_test_out_2 to value 0"] impl crate::Resettable for SE_TRNG_0_TEST_OUT_2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sec_eng/se_trng_0_test_out_3.rs b/src/sec_eng/se_trng_0_test_out_3.rs index 1cce24d..b3ae04a 100644 --- a/src/sec_eng/se_trng_0_test_out_3.rs +++ b/src/sec_eng/se_trng_0_test_out_3.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `se_trng_0_test_out_3` reader - "] -pub struct SE_TRNG_0_TEST_OUT_3_R(crate::FieldReader); -impl SE_TRNG_0_TEST_OUT_3_R { - pub(crate) fn new(bits: u32) -> Self { - SE_TRNG_0_TEST_OUT_3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SE_TRNG_0_TEST_OUT_3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SE_TRNG_0_TEST_OUT_3_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn se_trng_0_test_out_3(&self) -> SE_TRNG_0_TEST_OUT_3_R { - SE_TRNG_0_TEST_OUT_3_R::new((self.bits & 0xffff_ffff) as u32) + SE_TRNG_0_TEST_OUT_3_R::new(self.bits) } } #[doc = "se_trng_0_test_out_3.\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 [se_trng_0_test_out_3](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SE_TRNG_0_TEST_OUT_3_SPEC { } #[doc = "`reset()` method sets se_trng_0_test_out_3 to value 0"] impl crate::Resettable for SE_TRNG_0_TEST_OUT_3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl.rs b/src/sf_ctrl.rs index 953f284..7a3d744 100644 --- a/src/sf_ctrl.rs +++ b/src/sf_ctrl.rs @@ -2,475 +2,475 @@ #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - sf_ctrl_0."] - pub sf_ctrl_0: crate::Reg, + pub sf_ctrl_0: SF_CTRL_0, #[doc = "0x04 - sf_ctrl_1."] - pub sf_ctrl_1: crate::Reg, + pub sf_ctrl_1: SF_CTRL_1, #[doc = "0x08 - sf_if_sahb_0."] - pub sf_if_sahb_0: crate::Reg, + pub sf_if_sahb_0: SF_IF_SAHB_0, #[doc = "0x0c - sf_if_sahb_1."] - pub sf_if_sahb_1: crate::Reg, + pub sf_if_sahb_1: SF_IF_SAHB_1, #[doc = "0x10 - sf_if_sahb_2."] - pub sf_if_sahb_2: crate::Reg, + pub sf_if_sahb_2: SF_IF_SAHB_2, #[doc = "0x14 - sf_if_iahb_0."] - pub sf_if_iahb_0: crate::Reg, + pub sf_if_iahb_0: SF_IF_IAHB_0, #[doc = "0x18 - sf_if_iahb_1."] - pub sf_if_iahb_1: crate::Reg, + pub sf_if_iahb_1: SF_IF_IAHB_1, #[doc = "0x1c - sf_if_iahb_2."] - pub sf_if_iahb_2: crate::Reg, + pub sf_if_iahb_2: SF_IF_IAHB_2, #[doc = "0x20 - sf_if_status_0."] - pub sf_if_status_0: crate::Reg, + pub sf_if_status_0: SF_IF_STATUS_0, #[doc = "0x24 - sf_if_status_1."] - pub sf_if_status_1: crate::Reg, + pub sf_if_status_1: SF_IF_STATUS_1, #[doc = "0x28 - sf_aes."] - pub sf_aes: crate::Reg, + pub sf_aes: SF_AES, #[doc = "0x2c - sf_ahb2sif_status."] - pub sf_ahb2sif_status: crate::Reg, + pub sf_ahb2sif_status: SF_AHB2SIF_STATUS, #[doc = "0x30 - sf_if_io_dly_0."] - pub sf_if_io_dly_0: crate::Reg, + pub sf_if_io_dly_0: SF_IF_IO_DLY_0, #[doc = "0x34 - sf_if_io_dly_1."] - pub sf_if_io_dly_1: crate::Reg, + pub sf_if_io_dly_1: SF_IF_IO_DLY_1, #[doc = "0x38 - sf_if_io_dly_2."] - pub sf_if_io_dly_2: crate::Reg, + pub sf_if_io_dly_2: SF_IF_IO_DLY_2, #[doc = "0x3c - sf_if_io_dly_3."] - pub sf_if_io_dly_3: crate::Reg, + pub sf_if_io_dly_3: SF_IF_IO_DLY_3, #[doc = "0x40 - sf_if_io_dly_4."] - pub sf_if_io_dly_4: crate::Reg, + pub sf_if_io_dly_4: SF_IF_IO_DLY_4, #[doc = "0x44 - sf_reserved."] - pub sf_reserved: crate::Reg, + pub sf_reserved: SF_RESERVED, #[doc = "0x48 - sf2_if_io_dly_0."] - pub sf2_if_io_dly_0: crate::Reg, + pub sf2_if_io_dly_0: SF2_IF_IO_DLY_0, #[doc = "0x4c - sf2_if_io_dly_1."] - pub sf2_if_io_dly_1: crate::Reg, + pub sf2_if_io_dly_1: SF2_IF_IO_DLY_1, #[doc = "0x50 - sf2_if_io_dly_2."] - pub sf2_if_io_dly_2: crate::Reg, + pub sf2_if_io_dly_2: SF2_IF_IO_DLY_2, #[doc = "0x54 - sf2_if_io_dly_3."] - pub sf2_if_io_dly_3: crate::Reg, + pub sf2_if_io_dly_3: SF2_IF_IO_DLY_3, #[doc = "0x58 - sf2_if_io_dly_4."] - pub sf2_if_io_dly_4: crate::Reg, + pub sf2_if_io_dly_4: SF2_IF_IO_DLY_4, #[doc = "0x5c - sf3_if_io_dly_0."] - pub sf3_if_io_dly_0: crate::Reg, + pub sf3_if_io_dly_0: SF3_IF_IO_DLY_0, #[doc = "0x60 - sf3_if_io_dly_1."] - pub sf3_if_io_dly_1: crate::Reg, + pub sf3_if_io_dly_1: SF3_IF_IO_DLY_1, #[doc = "0x64 - sf3_if_io_dly_2."] - pub sf3_if_io_dly_2: crate::Reg, + pub sf3_if_io_dly_2: SF3_IF_IO_DLY_2, #[doc = "0x68 - sf3_if_io_dly_3."] - pub sf3_if_io_dly_3: crate::Reg, + pub sf3_if_io_dly_3: SF3_IF_IO_DLY_3, #[doc = "0x6c - sf3_if_io_dly_4."] - pub sf3_if_io_dly_4: crate::Reg, + pub sf3_if_io_dly_4: SF3_IF_IO_DLY_4, #[doc = "0x70 - sf_ctrl_2."] - pub sf_ctrl_2: crate::Reg, + pub sf_ctrl_2: SF_CTRL_2, #[doc = "0x74 - sf_ctrl_3."] - pub sf_ctrl_3: crate::Reg, + pub sf_ctrl_3: SF_CTRL_3, #[doc = "0x78 - sf_if_iahb_3."] - pub sf_if_iahb_3: crate::Reg, + pub sf_if_iahb_3: SF_IF_IAHB_3, #[doc = "0x7c - sf_if_iahb_4."] - pub sf_if_iahb_4: crate::Reg, + pub sf_if_iahb_4: SF_IF_IAHB_4, #[doc = "0x80 - sf_if_iahb_5."] - pub sf_if_iahb_5: crate::Reg, + pub sf_if_iahb_5: SF_IF_IAHB_5, #[doc = "0x84 - sf_if_iahb_6."] - pub sf_if_iahb_6: crate::Reg, + pub sf_if_iahb_6: SF_IF_IAHB_6, #[doc = "0x88 - sf_if_iahb_7."] - pub sf_if_iahb_7: crate::Reg, - _reserved35: [u8; 116usize], + pub sf_if_iahb_7: SF_IF_IAHB_7, + _reserved35: [u8; 0x74], #[doc = "0x100 - sf_ctrl_prot_en_rd."] - pub sf_ctrl_prot_en_rd: crate::Reg, + pub sf_ctrl_prot_en_rd: SF_CTRL_PROT_EN_RD, #[doc = "0x104 - sf_ctrl_prot_en."] - pub sf_ctrl_prot_en: crate::Reg, - _reserved37: [u8; 248usize], + pub sf_ctrl_prot_en: SF_CTRL_PROT_EN, + _reserved37: [u8; 0xf8], #[doc = "0x200 - sf_aes_key_r0_0."] - pub sf_aes_key_r0_0: crate::Reg, + pub sf_aes_key_r0_0: SF_AES_KEY_R0_0, #[doc = "0x204 - sf_aes_key_r0_1."] - pub sf_aes_key_r0_1: crate::Reg, + pub sf_aes_key_r0_1: SF_AES_KEY_R0_1, #[doc = "0x208 - sf_aes_key_r0_2."] - pub sf_aes_key_r0_2: crate::Reg, + pub sf_aes_key_r0_2: SF_AES_KEY_R0_2, #[doc = "0x20c - sf_aes_key_r0_3."] - pub sf_aes_key_r0_3: crate::Reg, + pub sf_aes_key_r0_3: SF_AES_KEY_R0_3, #[doc = "0x210 - sf_aes_key_r0_4."] - pub sf_aes_key_r0_4: crate::Reg, + pub sf_aes_key_r0_4: SF_AES_KEY_R0_4, #[doc = "0x214 - sf_aes_key_r0_5."] - pub sf_aes_key_r0_5: crate::Reg, + pub sf_aes_key_r0_5: SF_AES_KEY_R0_5, #[doc = "0x218 - sf_aes_key_r0_6."] - pub sf_aes_key_r0_6: crate::Reg, + pub sf_aes_key_r0_6: SF_AES_KEY_R0_6, #[doc = "0x21c - sf_aes_key_r0_7."] - pub sf_aes_key_r0_7: crate::Reg, + pub sf_aes_key_r0_7: SF_AES_KEY_R0_7, #[doc = "0x220 - sf_aes_iv_r0_w0."] - pub sf_aes_iv_r0_w0: crate::Reg, + pub sf_aes_iv_r0_w0: SF_AES_IV_R0_W0, #[doc = "0x224 - sf_aes_iv_r0_w1."] - pub sf_aes_iv_r0_w1: crate::Reg, + pub sf_aes_iv_r0_w1: SF_AES_IV_R0_W1, #[doc = "0x228 - sf_aes_iv_r0_w2."] - pub sf_aes_iv_r0_w2: crate::Reg, + pub sf_aes_iv_r0_w2: SF_AES_IV_R0_W2, #[doc = "0x22c - sf_aes_iv_r0_w3."] - pub sf_aes_iv_r0_w3: crate::Reg, + pub sf_aes_iv_r0_w3: SF_AES_IV_R0_W3, #[doc = "0x230 - sf_aes_cfg_r0."] - pub sf_aes_cfg_r0: crate::Reg, - _reserved50: [u8; 204usize], + pub sf_aes_cfg_r0: SF_AES_CFG_R0, + _reserved50: [u8; 0xcc], #[doc = "0x300 - sf_aes_key_r1_0."] - pub sf_aes_key_r1_0: crate::Reg, + pub sf_aes_key_r1_0: SF_AES_KEY_R1_0, #[doc = "0x304 - sf_aes_key_r1_1."] - pub sf_aes_key_r1_1: crate::Reg, + pub sf_aes_key_r1_1: SF_AES_KEY_R1_1, #[doc = "0x308 - sf_aes_key_r1_2."] - pub sf_aes_key_r1_2: crate::Reg, + pub sf_aes_key_r1_2: SF_AES_KEY_R1_2, #[doc = "0x30c - sf_aes_key_r1_3."] - pub sf_aes_key_r1_3: crate::Reg, + pub sf_aes_key_r1_3: SF_AES_KEY_R1_3, #[doc = "0x310 - sf_aes_key_r1_4."] - pub sf_aes_key_r1_4: crate::Reg, + pub sf_aes_key_r1_4: SF_AES_KEY_R1_4, #[doc = "0x314 - sf_aes_key_r1_5."] - pub sf_aes_key_r1_5: crate::Reg, + pub sf_aes_key_r1_5: SF_AES_KEY_R1_5, #[doc = "0x318 - sf_aes_key_r1_6."] - pub sf_aes_key_r1_6: crate::Reg, + pub sf_aes_key_r1_6: SF_AES_KEY_R1_6, #[doc = "0x31c - sf_aes_key_r1_7."] - pub sf_aes_key_r1_7: crate::Reg, + pub sf_aes_key_r1_7: SF_AES_KEY_R1_7, #[doc = "0x320 - sf_aes_iv_r1_w0."] - pub sf_aes_iv_r1_w0: crate::Reg, + pub sf_aes_iv_r1_w0: SF_AES_IV_R1_W0, #[doc = "0x324 - sf_aes_iv_r1_w1."] - pub sf_aes_iv_r1_w1: crate::Reg, + pub sf_aes_iv_r1_w1: SF_AES_IV_R1_W1, #[doc = "0x328 - sf_aes_iv_r1_w2."] - pub sf_aes_iv_r1_w2: crate::Reg, + pub sf_aes_iv_r1_w2: SF_AES_IV_R1_W2, #[doc = "0x32c - sf_aes_iv_r1_w3."] - pub sf_aes_iv_r1_w3: crate::Reg, + pub sf_aes_iv_r1_w3: SF_AES_IV_R1_W3, #[doc = "0x330 - sf_aes_r1."] - pub sf_aes_r1: crate::Reg, - _reserved63: [u8; 204usize], + pub sf_aes_r1: SF_AES_R1, + _reserved63: [u8; 0xcc], #[doc = "0x400 - sf_aes_key_r2_0."] - pub sf_aes_key_r2_0: crate::Reg, + pub sf_aes_key_r2_0: SF_AES_KEY_R2_0, #[doc = "0x404 - sf_aes_key_r2_1."] - pub sf_aes_key_r2_1: crate::Reg, + pub sf_aes_key_r2_1: SF_AES_KEY_R2_1, #[doc = "0x408 - sf_aes_key_r2_2."] - pub sf_aes_key_r2_2: crate::Reg, + pub sf_aes_key_r2_2: SF_AES_KEY_R2_2, #[doc = "0x40c - sf_aes_key_r2_3."] - pub sf_aes_key_r2_3: crate::Reg, + pub sf_aes_key_r2_3: SF_AES_KEY_R2_3, #[doc = "0x410 - sf_aes_key_r2_4."] - pub sf_aes_key_r2_4: crate::Reg, + pub sf_aes_key_r2_4: SF_AES_KEY_R2_4, #[doc = "0x414 - sf_aes_key_r2_5."] - pub sf_aes_key_r2_5: crate::Reg, + pub sf_aes_key_r2_5: SF_AES_KEY_R2_5, #[doc = "0x418 - sf_aes_key_r2_6."] - pub sf_aes_key_r2_6: crate::Reg, + pub sf_aes_key_r2_6: SF_AES_KEY_R2_6, #[doc = "0x41c - sf_aes_key_r2_7."] - pub sf_aes_key_r2_7: crate::Reg, + pub sf_aes_key_r2_7: SF_AES_KEY_R2_7, #[doc = "0x420 - sf_aes_iv_r2_w0."] - pub sf_aes_iv_r2_w0: crate::Reg, + pub sf_aes_iv_r2_w0: SF_AES_IV_R2_W0, #[doc = "0x424 - sf_aes_iv_r2_w1."] - pub sf_aes_iv_r2_w1: crate::Reg, + pub sf_aes_iv_r2_w1: SF_AES_IV_R2_W1, #[doc = "0x428 - sf_aes_iv_r2_w2."] - pub sf_aes_iv_r2_w2: crate::Reg, + pub sf_aes_iv_r2_w2: SF_AES_IV_R2_W2, #[doc = "0x42c - sf_aes_iv_r2_w3."] - pub sf_aes_iv_r2_w3: crate::Reg, + pub sf_aes_iv_r2_w3: SF_AES_IV_R2_W3, #[doc = "0x430 - sf_aes_r2."] - pub sf_aes_r2: crate::Reg, + pub sf_aes_r2: SF_AES_R2, #[doc = "0x434 - sf_id0_offset."] - pub sf_id0_offset: crate::Reg, + pub sf_id0_offset: SF_ID0_OFFSET, #[doc = "0x438 - sf_id1_offset."] - pub sf_id1_offset: crate::Reg, + pub sf_id1_offset: SF_ID1_OFFSET, } -#[doc = "sf_ctrl_0 register accessor: an alias for `Reg`"] +#[doc = "sf_ctrl_0 (rw) register accessor: an alias for `Reg`"] pub type SF_CTRL_0 = crate::Reg; #[doc = "sf_ctrl_0."] pub mod sf_ctrl_0; -#[doc = "sf_ctrl_1 register accessor: an alias for `Reg`"] +#[doc = "sf_ctrl_1 (rw) register accessor: an alias for `Reg`"] pub type SF_CTRL_1 = crate::Reg; #[doc = "sf_ctrl_1."] pub mod sf_ctrl_1; -#[doc = "sf_if_sahb_0 register accessor: an alias for `Reg`"] +#[doc = "sf_if_sahb_0 (rw) register accessor: an alias for `Reg`"] pub type SF_IF_SAHB_0 = crate::Reg; #[doc = "sf_if_sahb_0."] pub mod sf_if_sahb_0; -#[doc = "sf_if_sahb_1 register accessor: an alias for `Reg`"] +#[doc = "sf_if_sahb_1 (rw) register accessor: an alias for `Reg`"] pub type SF_IF_SAHB_1 = crate::Reg; #[doc = "sf_if_sahb_1."] pub mod sf_if_sahb_1; -#[doc = "sf_if_sahb_2 register accessor: an alias for `Reg`"] +#[doc = "sf_if_sahb_2 (rw) register accessor: an alias for `Reg`"] pub type SF_IF_SAHB_2 = crate::Reg; #[doc = "sf_if_sahb_2."] pub mod sf_if_sahb_2; -#[doc = "sf_if_iahb_0 register accessor: an alias for `Reg`"] +#[doc = "sf_if_iahb_0 (rw) register accessor: an alias for `Reg`"] pub type SF_IF_IAHB_0 = crate::Reg; #[doc = "sf_if_iahb_0."] pub mod sf_if_iahb_0; -#[doc = "sf_if_iahb_1 register accessor: an alias for `Reg`"] +#[doc = "sf_if_iahb_1 (rw) register accessor: an alias for `Reg`"] pub type SF_IF_IAHB_1 = crate::Reg; #[doc = "sf_if_iahb_1."] pub mod sf_if_iahb_1; -#[doc = "sf_if_iahb_2 register accessor: an alias for `Reg`"] +#[doc = "sf_if_iahb_2 (rw) register accessor: an alias for `Reg`"] pub type SF_IF_IAHB_2 = crate::Reg; #[doc = "sf_if_iahb_2."] pub mod sf_if_iahb_2; -#[doc = "sf_if_status_0 register accessor: an alias for `Reg`"] +#[doc = "sf_if_status_0 (r) register accessor: an alias for `Reg`"] pub type SF_IF_STATUS_0 = crate::Reg; #[doc = "sf_if_status_0."] pub mod sf_if_status_0; -#[doc = "sf_if_status_1 register accessor: an alias for `Reg`"] +#[doc = "sf_if_status_1 (r) register accessor: an alias for `Reg`"] pub type SF_IF_STATUS_1 = crate::Reg; #[doc = "sf_if_status_1."] pub mod sf_if_status_1; -#[doc = "sf_aes register accessor: an alias for `Reg`"] +#[doc = "sf_aes (rw) register accessor: an alias for `Reg`"] pub type SF_AES = crate::Reg; #[doc = "sf_aes."] pub mod sf_aes; -#[doc = "sf_ahb2sif_status register accessor: an alias for `Reg`"] +#[doc = "sf_ahb2sif_status (r) register accessor: an alias for `Reg`"] pub type SF_AHB2SIF_STATUS = crate::Reg; #[doc = "sf_ahb2sif_status."] pub mod sf_ahb2sif_status; -#[doc = "sf_if_io_dly_0 register accessor: an alias for `Reg`"] +#[doc = "sf_if_io_dly_0 (rw) register accessor: an alias for `Reg`"] pub type SF_IF_IO_DLY_0 = crate::Reg; #[doc = "sf_if_io_dly_0."] pub mod sf_if_io_dly_0; -#[doc = "sf_if_io_dly_1 register accessor: an alias for `Reg`"] +#[doc = "sf_if_io_dly_1 (rw) register accessor: an alias for `Reg`"] pub type SF_IF_IO_DLY_1 = crate::Reg; #[doc = "sf_if_io_dly_1."] pub mod sf_if_io_dly_1; -#[doc = "sf_if_io_dly_2 register accessor: an alias for `Reg`"] +#[doc = "sf_if_io_dly_2 (rw) register accessor: an alias for `Reg`"] pub type SF_IF_IO_DLY_2 = crate::Reg; #[doc = "sf_if_io_dly_2."] pub mod sf_if_io_dly_2; -#[doc = "sf_if_io_dly_3 register accessor: an alias for `Reg`"] +#[doc = "sf_if_io_dly_3 (rw) register accessor: an alias for `Reg`"] pub type SF_IF_IO_DLY_3 = crate::Reg; #[doc = "sf_if_io_dly_3."] pub mod sf_if_io_dly_3; -#[doc = "sf_if_io_dly_4 register accessor: an alias for `Reg`"] +#[doc = "sf_if_io_dly_4 (rw) register accessor: an alias for `Reg`"] pub type SF_IF_IO_DLY_4 = crate::Reg; #[doc = "sf_if_io_dly_4."] pub mod sf_if_io_dly_4; -#[doc = "sf_reserved register accessor: an alias for `Reg`"] +#[doc = "sf_reserved (rw) register accessor: an alias for `Reg`"] pub type SF_RESERVED = crate::Reg; #[doc = "sf_reserved."] pub mod sf_reserved; -#[doc = "sf2_if_io_dly_0 register accessor: an alias for `Reg`"] +#[doc = "sf2_if_io_dly_0 (rw) register accessor: an alias for `Reg`"] pub type SF2_IF_IO_DLY_0 = crate::Reg; #[doc = "sf2_if_io_dly_0."] pub mod sf2_if_io_dly_0; -#[doc = "sf2_if_io_dly_1 register accessor: an alias for `Reg`"] +#[doc = "sf2_if_io_dly_1 (rw) register accessor: an alias for `Reg`"] pub type SF2_IF_IO_DLY_1 = crate::Reg; #[doc = "sf2_if_io_dly_1."] pub mod sf2_if_io_dly_1; -#[doc = "sf2_if_io_dly_2 register accessor: an alias for `Reg`"] +#[doc = "sf2_if_io_dly_2 (rw) register accessor: an alias for `Reg`"] pub type SF2_IF_IO_DLY_2 = crate::Reg; #[doc = "sf2_if_io_dly_2."] pub mod sf2_if_io_dly_2; -#[doc = "sf2_if_io_dly_3 register accessor: an alias for `Reg`"] +#[doc = "sf2_if_io_dly_3 (rw) register accessor: an alias for `Reg`"] pub type SF2_IF_IO_DLY_3 = crate::Reg; #[doc = "sf2_if_io_dly_3."] pub mod sf2_if_io_dly_3; -#[doc = "sf2_if_io_dly_4 register accessor: an alias for `Reg`"] +#[doc = "sf2_if_io_dly_4 (rw) register accessor: an alias for `Reg`"] pub type SF2_IF_IO_DLY_4 = crate::Reg; #[doc = "sf2_if_io_dly_4."] pub mod sf2_if_io_dly_4; -#[doc = "sf3_if_io_dly_0 register accessor: an alias for `Reg`"] +#[doc = "sf3_if_io_dly_0 (rw) register accessor: an alias for `Reg`"] pub type SF3_IF_IO_DLY_0 = crate::Reg; #[doc = "sf3_if_io_dly_0."] pub mod sf3_if_io_dly_0; -#[doc = "sf3_if_io_dly_1 register accessor: an alias for `Reg`"] +#[doc = "sf3_if_io_dly_1 (rw) register accessor: an alias for `Reg`"] pub type SF3_IF_IO_DLY_1 = crate::Reg; #[doc = "sf3_if_io_dly_1."] pub mod sf3_if_io_dly_1; -#[doc = "sf3_if_io_dly_2 register accessor: an alias for `Reg`"] +#[doc = "sf3_if_io_dly_2 (rw) register accessor: an alias for `Reg`"] pub type SF3_IF_IO_DLY_2 = crate::Reg; #[doc = "sf3_if_io_dly_2."] pub mod sf3_if_io_dly_2; -#[doc = "sf3_if_io_dly_3 register accessor: an alias for `Reg`"] +#[doc = "sf3_if_io_dly_3 (rw) register accessor: an alias for `Reg`"] pub type SF3_IF_IO_DLY_3 = crate::Reg; #[doc = "sf3_if_io_dly_3."] pub mod sf3_if_io_dly_3; -#[doc = "sf3_if_io_dly_4 register accessor: an alias for `Reg`"] +#[doc = "sf3_if_io_dly_4 (rw) register accessor: an alias for `Reg`"] pub type SF3_IF_IO_DLY_4 = crate::Reg; #[doc = "sf3_if_io_dly_4."] pub mod sf3_if_io_dly_4; -#[doc = "sf_ctrl_2 register accessor: an alias for `Reg`"] +#[doc = "sf_ctrl_2 (rw) register accessor: an alias for `Reg`"] pub type SF_CTRL_2 = crate::Reg; #[doc = "sf_ctrl_2."] pub mod sf_ctrl_2; -#[doc = "sf_ctrl_3 register accessor: an alias for `Reg`"] +#[doc = "sf_ctrl_3 (rw) register accessor: an alias for `Reg`"] pub type SF_CTRL_3 = crate::Reg; #[doc = "sf_ctrl_3."] pub mod sf_ctrl_3; -#[doc = "sf_if_iahb_3 register accessor: an alias for `Reg`"] +#[doc = "sf_if_iahb_3 (rw) register accessor: an alias for `Reg`"] pub type SF_IF_IAHB_3 = crate::Reg; #[doc = "sf_if_iahb_3."] pub mod sf_if_iahb_3; -#[doc = "sf_if_iahb_4 register accessor: an alias for `Reg`"] +#[doc = "sf_if_iahb_4 (rw) register accessor: an alias for `Reg`"] pub type SF_IF_IAHB_4 = crate::Reg; #[doc = "sf_if_iahb_4."] pub mod sf_if_iahb_4; -#[doc = "sf_if_iahb_5 register accessor: an alias for `Reg`"] +#[doc = "sf_if_iahb_5 (rw) register accessor: an alias for `Reg`"] pub type SF_IF_IAHB_5 = crate::Reg; #[doc = "sf_if_iahb_5."] pub mod sf_if_iahb_5; -#[doc = "sf_if_iahb_6 register accessor: an alias for `Reg`"] +#[doc = "sf_if_iahb_6 (rw) register accessor: an alias for `Reg`"] pub type SF_IF_IAHB_6 = crate::Reg; #[doc = "sf_if_iahb_6."] pub mod sf_if_iahb_6; -#[doc = "sf_if_iahb_7 register accessor: an alias for `Reg`"] +#[doc = "sf_if_iahb_7 (rw) register accessor: an alias for `Reg`"] pub type SF_IF_IAHB_7 = crate::Reg; #[doc = "sf_if_iahb_7."] pub mod sf_if_iahb_7; -#[doc = "sf_ctrl_prot_en_rd register accessor: an alias for `Reg`"] +#[doc = "sf_ctrl_prot_en_rd (r) register accessor: an alias for `Reg`"] pub type SF_CTRL_PROT_EN_RD = crate::Reg; #[doc = "sf_ctrl_prot_en_rd."] pub mod sf_ctrl_prot_en_rd; -#[doc = "sf_ctrl_prot_en register accessor: an alias for `Reg`"] +#[doc = "sf_ctrl_prot_en (rw) register accessor: an alias for `Reg`"] pub type SF_CTRL_PROT_EN = crate::Reg; #[doc = "sf_ctrl_prot_en."] pub mod sf_ctrl_prot_en; -#[doc = "sf_aes_key_r0_0 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_key_r0_0 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_KEY_R0_0 = crate::Reg; #[doc = "sf_aes_key_r0_0."] pub mod sf_aes_key_r0_0; -#[doc = "sf_aes_key_r0_1 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_key_r0_1 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_KEY_R0_1 = crate::Reg; #[doc = "sf_aes_key_r0_1."] pub mod sf_aes_key_r0_1; -#[doc = "sf_aes_key_r0_2 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_key_r0_2 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_KEY_R0_2 = crate::Reg; #[doc = "sf_aes_key_r0_2."] pub mod sf_aes_key_r0_2; -#[doc = "sf_aes_key_r0_3 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_key_r0_3 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_KEY_R0_3 = crate::Reg; #[doc = "sf_aes_key_r0_3."] pub mod sf_aes_key_r0_3; -#[doc = "sf_aes_key_r0_4 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_key_r0_4 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_KEY_R0_4 = crate::Reg; #[doc = "sf_aes_key_r0_4."] pub mod sf_aes_key_r0_4; -#[doc = "sf_aes_key_r0_5 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_key_r0_5 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_KEY_R0_5 = crate::Reg; #[doc = "sf_aes_key_r0_5."] pub mod sf_aes_key_r0_5; -#[doc = "sf_aes_key_r0_6 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_key_r0_6 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_KEY_R0_6 = crate::Reg; #[doc = "sf_aes_key_r0_6."] pub mod sf_aes_key_r0_6; -#[doc = "sf_aes_key_r0_7 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_key_r0_7 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_KEY_R0_7 = crate::Reg; #[doc = "sf_aes_key_r0_7."] pub mod sf_aes_key_r0_7; -#[doc = "sf_aes_iv_r0_w0 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_iv_r0_w0 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_IV_R0_W0 = crate::Reg; #[doc = "sf_aes_iv_r0_w0."] pub mod sf_aes_iv_r0_w0; -#[doc = "sf_aes_iv_r0_w1 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_iv_r0_w1 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_IV_R0_W1 = crate::Reg; #[doc = "sf_aes_iv_r0_w1."] pub mod sf_aes_iv_r0_w1; -#[doc = "sf_aes_iv_r0_w2 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_iv_r0_w2 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_IV_R0_W2 = crate::Reg; #[doc = "sf_aes_iv_r0_w2."] pub mod sf_aes_iv_r0_w2; -#[doc = "sf_aes_iv_r0_w3 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_iv_r0_w3 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_IV_R0_W3 = crate::Reg; #[doc = "sf_aes_iv_r0_w3."] pub mod sf_aes_iv_r0_w3; -#[doc = "sf_aes_cfg_r0 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_cfg_r0 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_CFG_R0 = crate::Reg; #[doc = "sf_aes_cfg_r0."] pub mod sf_aes_cfg_r0; -#[doc = "sf_aes_key_r1_0 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_key_r1_0 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_KEY_R1_0 = crate::Reg; #[doc = "sf_aes_key_r1_0."] pub mod sf_aes_key_r1_0; -#[doc = "sf_aes_key_r1_1 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_key_r1_1 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_KEY_R1_1 = crate::Reg; #[doc = "sf_aes_key_r1_1."] pub mod sf_aes_key_r1_1; -#[doc = "sf_aes_key_r1_2 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_key_r1_2 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_KEY_R1_2 = crate::Reg; #[doc = "sf_aes_key_r1_2."] pub mod sf_aes_key_r1_2; -#[doc = "sf_aes_key_r1_3 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_key_r1_3 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_KEY_R1_3 = crate::Reg; #[doc = "sf_aes_key_r1_3."] pub mod sf_aes_key_r1_3; -#[doc = "sf_aes_key_r1_4 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_key_r1_4 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_KEY_R1_4 = crate::Reg; #[doc = "sf_aes_key_r1_4."] pub mod sf_aes_key_r1_4; -#[doc = "sf_aes_key_r1_5 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_key_r1_5 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_KEY_R1_5 = crate::Reg; #[doc = "sf_aes_key_r1_5."] pub mod sf_aes_key_r1_5; -#[doc = "sf_aes_key_r1_6 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_key_r1_6 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_KEY_R1_6 = crate::Reg; #[doc = "sf_aes_key_r1_6."] pub mod sf_aes_key_r1_6; -#[doc = "sf_aes_key_r1_7 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_key_r1_7 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_KEY_R1_7 = crate::Reg; #[doc = "sf_aes_key_r1_7."] pub mod sf_aes_key_r1_7; -#[doc = "sf_aes_iv_r1_w0 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_iv_r1_w0 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_IV_R1_W0 = crate::Reg; #[doc = "sf_aes_iv_r1_w0."] pub mod sf_aes_iv_r1_w0; -#[doc = "sf_aes_iv_r1_w1 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_iv_r1_w1 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_IV_R1_W1 = crate::Reg; #[doc = "sf_aes_iv_r1_w1."] pub mod sf_aes_iv_r1_w1; -#[doc = "sf_aes_iv_r1_w2 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_iv_r1_w2 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_IV_R1_W2 = crate::Reg; #[doc = "sf_aes_iv_r1_w2."] pub mod sf_aes_iv_r1_w2; -#[doc = "sf_aes_iv_r1_w3 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_iv_r1_w3 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_IV_R1_W3 = crate::Reg; #[doc = "sf_aes_iv_r1_w3."] pub mod sf_aes_iv_r1_w3; -#[doc = "sf_aes_r1 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_r1 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_R1 = crate::Reg; #[doc = "sf_aes_r1."] pub mod sf_aes_r1; -#[doc = "sf_aes_key_r2_0 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_key_r2_0 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_KEY_R2_0 = crate::Reg; #[doc = "sf_aes_key_r2_0."] pub mod sf_aes_key_r2_0; -#[doc = "sf_aes_key_r2_1 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_key_r2_1 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_KEY_R2_1 = crate::Reg; #[doc = "sf_aes_key_r2_1."] pub mod sf_aes_key_r2_1; -#[doc = "sf_aes_key_r2_2 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_key_r2_2 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_KEY_R2_2 = crate::Reg; #[doc = "sf_aes_key_r2_2."] pub mod sf_aes_key_r2_2; -#[doc = "sf_aes_key_r2_3 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_key_r2_3 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_KEY_R2_3 = crate::Reg; #[doc = "sf_aes_key_r2_3."] pub mod sf_aes_key_r2_3; -#[doc = "sf_aes_key_r2_4 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_key_r2_4 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_KEY_R2_4 = crate::Reg; #[doc = "sf_aes_key_r2_4."] pub mod sf_aes_key_r2_4; -#[doc = "sf_aes_key_r2_5 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_key_r2_5 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_KEY_R2_5 = crate::Reg; #[doc = "sf_aes_key_r2_5."] pub mod sf_aes_key_r2_5; -#[doc = "sf_aes_key_r2_6 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_key_r2_6 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_KEY_R2_6 = crate::Reg; #[doc = "sf_aes_key_r2_6."] pub mod sf_aes_key_r2_6; -#[doc = "sf_aes_key_r2_7 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_key_r2_7 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_KEY_R2_7 = crate::Reg; #[doc = "sf_aes_key_r2_7."] pub mod sf_aes_key_r2_7; -#[doc = "sf_aes_iv_r2_w0 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_iv_r2_w0 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_IV_R2_W0 = crate::Reg; #[doc = "sf_aes_iv_r2_w0."] pub mod sf_aes_iv_r2_w0; -#[doc = "sf_aes_iv_r2_w1 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_iv_r2_w1 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_IV_R2_W1 = crate::Reg; #[doc = "sf_aes_iv_r2_w1."] pub mod sf_aes_iv_r2_w1; -#[doc = "sf_aes_iv_r2_w2 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_iv_r2_w2 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_IV_R2_W2 = crate::Reg; #[doc = "sf_aes_iv_r2_w2."] pub mod sf_aes_iv_r2_w2; -#[doc = "sf_aes_iv_r2_w3 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_iv_r2_w3 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_IV_R2_W3 = crate::Reg; #[doc = "sf_aes_iv_r2_w3."] pub mod sf_aes_iv_r2_w3; -#[doc = "sf_aes_r2 register accessor: an alias for `Reg`"] +#[doc = "sf_aes_r2 (rw) register accessor: an alias for `Reg`"] pub type SF_AES_R2 = crate::Reg; #[doc = "sf_aes_r2."] pub mod sf_aes_r2; -#[doc = "sf_id0_offset register accessor: an alias for `Reg`"] +#[doc = "sf_id0_offset (rw) register accessor: an alias for `Reg`"] pub type SF_ID0_OFFSET = crate::Reg; #[doc = "sf_id0_offset."] pub mod sf_id0_offset; -#[doc = "sf_id1_offset register accessor: an alias for `Reg`"] +#[doc = "sf_id1_offset (rw) register accessor: an alias for `Reg`"] pub type SF_ID1_OFFSET = crate::Reg; #[doc = "sf_id1_offset."] pub mod sf_id1_offset; diff --git a/src/sf_ctrl/sf2_if_io_dly_0.rs b/src/sf_ctrl/sf2_if_io_dly_0.rs index 1e1a7e4..1f91f0b 100644 --- a/src/sf_ctrl/sf2_if_io_dly_0.rs +++ b/src/sf_ctrl/sf2_if_io_dly_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,195 +28,97 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `sf2_dqs_do_dly_sel` reader - "] -pub struct SF2_DQS_DO_DLY_SEL_R(crate::FieldReader); -impl SF2_DQS_DO_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF2_DQS_DO_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF2_DQS_DO_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf2_dqs_do_dly_sel` writer - "] -pub struct SF2_DQS_DO_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF2_DQS_DO_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 30)) | ((value as u32 & 0x03) << 30); - self.w - } -} -#[doc = "Field `sf2_dqs_di_dly_sel` reader - "] -pub struct SF2_DQS_DI_DLY_SEL_R(crate::FieldReader); -impl SF2_DQS_DI_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF2_DQS_DI_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF2_DQS_DI_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf2_dqs_di_dly_sel` writer - "] -pub struct SF2_DQS_DI_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF2_DQS_DI_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 28)) | ((value as u32 & 0x03) << 28); - self.w - } -} -#[doc = "Field `sf2_dqs_oe_dly_sel` reader - "] -pub struct SF2_DQS_OE_DLY_SEL_R(crate::FieldReader); -impl SF2_DQS_OE_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF2_DQS_OE_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF2_DQS_OE_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf2_dqs_oe_dly_sel` writer - "] -pub struct SF2_DQS_OE_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF2_DQS_OE_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 26)) | ((value as u32 & 0x03) << 26); - self.w - } -} -#[doc = "Field `sf2_clk_out_dly_sel` reader - "] -pub struct SF2_CLK_OUT_DLY_SEL_R(crate::FieldReader); -impl SF2_CLK_OUT_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF2_CLK_OUT_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF2_CLK_OUT_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf2_clk_out_dly_sel` writer - "] -pub struct SF2_CLK_OUT_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF2_CLK_OUT_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} #[doc = "Field `sf2_cs_dly_sel` reader - "] -pub struct SF2_CS_DLY_SEL_R(crate::FieldReader); -impl SF2_CS_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF2_CS_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF2_CS_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF2_CS_DLY_SEL_R = crate::FieldReader; #[doc = "Field `sf2_cs_dly_sel` writer - "] -pub struct SF2_CS_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF2_CS_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w - } -} +pub type SF2_CS_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF2_IF_IO_DLY_0_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf2_clk_out_dly_sel` reader - "] +pub type SF2_CLK_OUT_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `sf2_clk_out_dly_sel` writer - "] +pub type SF2_CLK_OUT_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF2_IF_IO_DLY_0_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf2_dqs_oe_dly_sel` reader - "] +pub type SF2_DQS_OE_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `sf2_dqs_oe_dly_sel` writer - "] +pub type SF2_DQS_OE_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF2_IF_IO_DLY_0_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf2_dqs_di_dly_sel` reader - "] +pub type SF2_DQS_DI_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `sf2_dqs_di_dly_sel` writer - "] +pub type SF2_DQS_DI_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF2_IF_IO_DLY_0_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf2_dqs_do_dly_sel` reader - "] +pub type SF2_DQS_DO_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `sf2_dqs_do_dly_sel` writer - "] +pub type SF2_DQS_DO_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF2_IF_IO_DLY_0_SPEC, u8, u8, 2, O>; impl R { - #[doc = "Bits 30:31"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn sf2_dqs_do_dly_sel(&self) -> SF2_DQS_DO_DLY_SEL_R { - SF2_DQS_DO_DLY_SEL_R::new(((self.bits >> 30) & 0x03) as u8) + pub fn sf2_cs_dly_sel(&self) -> SF2_CS_DLY_SEL_R { + SF2_CS_DLY_SEL_R::new((self.bits & 3) as u8) } - #[doc = "Bits 28:29"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn sf2_dqs_di_dly_sel(&self) -> SF2_DQS_DI_DLY_SEL_R { - SF2_DQS_DI_DLY_SEL_R::new(((self.bits >> 28) & 0x03) as u8) + pub fn sf2_clk_out_dly_sel(&self) -> SF2_CLK_OUT_DLY_SEL_R { + SF2_CLK_OUT_DLY_SEL_R::new(((self.bits >> 8) & 3) as u8) } #[doc = "Bits 26:27"] #[inline(always)] pub fn sf2_dqs_oe_dly_sel(&self) -> SF2_DQS_OE_DLY_SEL_R { - SF2_DQS_OE_DLY_SEL_R::new(((self.bits >> 26) & 0x03) as u8) + SF2_DQS_OE_DLY_SEL_R::new(((self.bits >> 26) & 3) as u8) } - #[doc = "Bits 8:9"] + #[doc = "Bits 28:29"] #[inline(always)] - pub fn sf2_clk_out_dly_sel(&self) -> SF2_CLK_OUT_DLY_SEL_R { - SF2_CLK_OUT_DLY_SEL_R::new(((self.bits >> 8) & 0x03) as u8) + pub fn sf2_dqs_di_dly_sel(&self) -> SF2_DQS_DI_DLY_SEL_R { + SF2_DQS_DI_DLY_SEL_R::new(((self.bits >> 28) & 3) as u8) } - #[doc = "Bits 0:1"] + #[doc = "Bits 30:31"] #[inline(always)] - pub fn sf2_cs_dly_sel(&self) -> SF2_CS_DLY_SEL_R { - SF2_CS_DLY_SEL_R::new((self.bits & 0x03) as u8) + pub fn sf2_dqs_do_dly_sel(&self) -> SF2_DQS_DO_DLY_SEL_R { + SF2_DQS_DO_DLY_SEL_R::new(((self.bits >> 30) & 3) as u8) } } impl W { - #[doc = "Bits 30:31"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn sf2_dqs_do_dly_sel(&mut self) -> SF2_DQS_DO_DLY_SEL_W { - SF2_DQS_DO_DLY_SEL_W { w: self } + #[must_use] + pub fn sf2_cs_dly_sel(&mut self) -> SF2_CS_DLY_SEL_W<0> { + SF2_CS_DLY_SEL_W::new(self) } - #[doc = "Bits 28:29"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn sf2_dqs_di_dly_sel(&mut self) -> SF2_DQS_DI_DLY_SEL_W { - SF2_DQS_DI_DLY_SEL_W { w: self } + #[must_use] + pub fn sf2_clk_out_dly_sel(&mut self) -> SF2_CLK_OUT_DLY_SEL_W<8> { + SF2_CLK_OUT_DLY_SEL_W::new(self) } #[doc = "Bits 26:27"] #[inline(always)] - pub fn sf2_dqs_oe_dly_sel(&mut self) -> SF2_DQS_OE_DLY_SEL_W { - SF2_DQS_OE_DLY_SEL_W { w: self } + #[must_use] + pub fn sf2_dqs_oe_dly_sel(&mut self) -> SF2_DQS_OE_DLY_SEL_W<26> { + SF2_DQS_OE_DLY_SEL_W::new(self) } - #[doc = "Bits 8:9"] + #[doc = "Bits 28:29"] #[inline(always)] - pub fn sf2_clk_out_dly_sel(&mut self) -> SF2_CLK_OUT_DLY_SEL_W { - SF2_CLK_OUT_DLY_SEL_W { w: self } + #[must_use] + pub fn sf2_dqs_di_dly_sel(&mut self) -> SF2_DQS_DI_DLY_SEL_W<28> { + SF2_DQS_DI_DLY_SEL_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bits 30:31"] #[inline(always)] - pub fn sf2_cs_dly_sel(&mut self) -> SF2_CS_DLY_SEL_W { - SF2_CS_DLY_SEL_W { w: self } + #[must_use] + pub fn sf2_dqs_do_dly_sel(&mut self) -> SF2_DQS_DO_DLY_SEL_W<30> { + SF2_DQS_DO_DLY_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -233,11 +136,10 @@ impl crate::Readable for SF2_IF_IO_DLY_0_SPEC { #[doc = "`write(|w| ..)` method takes [sf2_if_io_dly_0::W](W) writer structure"] impl crate::Writable for SF2_IF_IO_DLY_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf2_if_io_dly_0 to value 0"] impl crate::Resettable for SF2_IF_IO_DLY_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf2_if_io_dly_1.rs b/src/sf_ctrl/sf2_if_io_dly_1.rs index 2a20af2..aa23b68 100644 --- a/src/sf_ctrl/sf2_if_io_dly_1.rs +++ b/src/sf_ctrl/sf2_if_io_dly_1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,123 +28,65 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `sf2_io_0_do_dly_sel` reader - "] -pub struct SF2_IO_0_DO_DLY_SEL_R(crate::FieldReader); -impl SF2_IO_0_DO_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF2_IO_0_DO_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF2_IO_0_DO_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf2_io_0_do_dly_sel` writer - "] -pub struct SF2_IO_0_DO_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF2_IO_0_DO_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 16)) | ((value as u32 & 0x03) << 16); - self.w - } -} -#[doc = "Field `sf2_io_0_di_dly_sel` reader - "] -pub struct SF2_IO_0_DI_DLY_SEL_R(crate::FieldReader); -impl SF2_IO_0_DI_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF2_IO_0_DI_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF2_IO_0_DI_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf2_io_0_di_dly_sel` writer - "] -pub struct SF2_IO_0_DI_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF2_IO_0_DI_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} #[doc = "Field `sf2_io_0_oe_dly_sel` reader - "] -pub struct SF2_IO_0_OE_DLY_SEL_R(crate::FieldReader); -impl SF2_IO_0_OE_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF2_IO_0_OE_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF2_IO_0_OE_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF2_IO_0_OE_DLY_SEL_R = crate::FieldReader; #[doc = "Field `sf2_io_0_oe_dly_sel` writer - "] -pub struct SF2_IO_0_OE_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF2_IO_0_OE_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w - } -} +pub type SF2_IO_0_OE_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF2_IF_IO_DLY_1_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf2_io_0_di_dly_sel` reader - "] +pub type SF2_IO_0_DI_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `sf2_io_0_di_dly_sel` writer - "] +pub type SF2_IO_0_DI_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF2_IF_IO_DLY_1_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf2_io_0_do_dly_sel` reader - "] +pub type SF2_IO_0_DO_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `sf2_io_0_do_dly_sel` writer - "] +pub type SF2_IO_0_DO_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF2_IF_IO_DLY_1_SPEC, u8, u8, 2, O>; impl R { - #[doc = "Bits 16:17"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn sf2_io_0_do_dly_sel(&self) -> SF2_IO_0_DO_DLY_SEL_R { - SF2_IO_0_DO_DLY_SEL_R::new(((self.bits >> 16) & 0x03) as u8) + pub fn sf2_io_0_oe_dly_sel(&self) -> SF2_IO_0_OE_DLY_SEL_R { + SF2_IO_0_OE_DLY_SEL_R::new((self.bits & 3) as u8) } #[doc = "Bits 8:9"] #[inline(always)] pub fn sf2_io_0_di_dly_sel(&self) -> SF2_IO_0_DI_DLY_SEL_R { - SF2_IO_0_DI_DLY_SEL_R::new(((self.bits >> 8) & 0x03) as u8) + SF2_IO_0_DI_DLY_SEL_R::new(((self.bits >> 8) & 3) as u8) } - #[doc = "Bits 0:1"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn sf2_io_0_oe_dly_sel(&self) -> SF2_IO_0_OE_DLY_SEL_R { - SF2_IO_0_OE_DLY_SEL_R::new((self.bits & 0x03) as u8) + pub fn sf2_io_0_do_dly_sel(&self) -> SF2_IO_0_DO_DLY_SEL_R { + SF2_IO_0_DO_DLY_SEL_R::new(((self.bits >> 16) & 3) as u8) } } impl W { - #[doc = "Bits 16:17"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn sf2_io_0_do_dly_sel(&mut self) -> SF2_IO_0_DO_DLY_SEL_W { - SF2_IO_0_DO_DLY_SEL_W { w: self } + #[must_use] + pub fn sf2_io_0_oe_dly_sel(&mut self) -> SF2_IO_0_OE_DLY_SEL_W<0> { + SF2_IO_0_OE_DLY_SEL_W::new(self) } #[doc = "Bits 8:9"] #[inline(always)] - pub fn sf2_io_0_di_dly_sel(&mut self) -> SF2_IO_0_DI_DLY_SEL_W { - SF2_IO_0_DI_DLY_SEL_W { w: self } + #[must_use] + pub fn sf2_io_0_di_dly_sel(&mut self) -> SF2_IO_0_DI_DLY_SEL_W<8> { + SF2_IO_0_DI_DLY_SEL_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn sf2_io_0_oe_dly_sel(&mut self) -> SF2_IO_0_OE_DLY_SEL_W { - SF2_IO_0_OE_DLY_SEL_W { w: self } + #[must_use] + pub fn sf2_io_0_do_dly_sel(&mut self) -> SF2_IO_0_DO_DLY_SEL_W<16> { + SF2_IO_0_DO_DLY_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -161,11 +104,10 @@ impl crate::Readable for SF2_IF_IO_DLY_1_SPEC { #[doc = "`write(|w| ..)` method takes [sf2_if_io_dly_1::W](W) writer structure"] impl crate::Writable for SF2_IF_IO_DLY_1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf2_if_io_dly_1 to value 0"] impl crate::Resettable for SF2_IF_IO_DLY_1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf2_if_io_dly_2.rs b/src/sf_ctrl/sf2_if_io_dly_2.rs index ccf4251..c4e0ff1 100644 --- a/src/sf_ctrl/sf2_if_io_dly_2.rs +++ b/src/sf_ctrl/sf2_if_io_dly_2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,123 +28,65 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `sf2_io_1_do_dly_sel` reader - "] -pub struct SF2_IO_1_DO_DLY_SEL_R(crate::FieldReader); -impl SF2_IO_1_DO_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF2_IO_1_DO_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF2_IO_1_DO_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf2_io_1_do_dly_sel` writer - "] -pub struct SF2_IO_1_DO_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF2_IO_1_DO_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 16)) | ((value as u32 & 0x03) << 16); - self.w - } -} -#[doc = "Field `sf2_io_1_di_dly_sel` reader - "] -pub struct SF2_IO_1_DI_DLY_SEL_R(crate::FieldReader); -impl SF2_IO_1_DI_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF2_IO_1_DI_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF2_IO_1_DI_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf2_io_1_di_dly_sel` writer - "] -pub struct SF2_IO_1_DI_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF2_IO_1_DI_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} #[doc = "Field `sf2_io_1_oe_dly_sel` reader - "] -pub struct SF2_IO_1_OE_DLY_SEL_R(crate::FieldReader); -impl SF2_IO_1_OE_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF2_IO_1_OE_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF2_IO_1_OE_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF2_IO_1_OE_DLY_SEL_R = crate::FieldReader; #[doc = "Field `sf2_io_1_oe_dly_sel` writer - "] -pub struct SF2_IO_1_OE_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF2_IO_1_OE_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w - } -} +pub type SF2_IO_1_OE_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF2_IF_IO_DLY_2_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf2_io_1_di_dly_sel` reader - "] +pub type SF2_IO_1_DI_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `sf2_io_1_di_dly_sel` writer - "] +pub type SF2_IO_1_DI_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF2_IF_IO_DLY_2_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf2_io_1_do_dly_sel` reader - "] +pub type SF2_IO_1_DO_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `sf2_io_1_do_dly_sel` writer - "] +pub type SF2_IO_1_DO_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF2_IF_IO_DLY_2_SPEC, u8, u8, 2, O>; impl R { - #[doc = "Bits 16:17"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn sf2_io_1_do_dly_sel(&self) -> SF2_IO_1_DO_DLY_SEL_R { - SF2_IO_1_DO_DLY_SEL_R::new(((self.bits >> 16) & 0x03) as u8) + pub fn sf2_io_1_oe_dly_sel(&self) -> SF2_IO_1_OE_DLY_SEL_R { + SF2_IO_1_OE_DLY_SEL_R::new((self.bits & 3) as u8) } #[doc = "Bits 8:9"] #[inline(always)] pub fn sf2_io_1_di_dly_sel(&self) -> SF2_IO_1_DI_DLY_SEL_R { - SF2_IO_1_DI_DLY_SEL_R::new(((self.bits >> 8) & 0x03) as u8) + SF2_IO_1_DI_DLY_SEL_R::new(((self.bits >> 8) & 3) as u8) } - #[doc = "Bits 0:1"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn sf2_io_1_oe_dly_sel(&self) -> SF2_IO_1_OE_DLY_SEL_R { - SF2_IO_1_OE_DLY_SEL_R::new((self.bits & 0x03) as u8) + pub fn sf2_io_1_do_dly_sel(&self) -> SF2_IO_1_DO_DLY_SEL_R { + SF2_IO_1_DO_DLY_SEL_R::new(((self.bits >> 16) & 3) as u8) } } impl W { - #[doc = "Bits 16:17"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn sf2_io_1_do_dly_sel(&mut self) -> SF2_IO_1_DO_DLY_SEL_W { - SF2_IO_1_DO_DLY_SEL_W { w: self } + #[must_use] + pub fn sf2_io_1_oe_dly_sel(&mut self) -> SF2_IO_1_OE_DLY_SEL_W<0> { + SF2_IO_1_OE_DLY_SEL_W::new(self) } #[doc = "Bits 8:9"] #[inline(always)] - pub fn sf2_io_1_di_dly_sel(&mut self) -> SF2_IO_1_DI_DLY_SEL_W { - SF2_IO_1_DI_DLY_SEL_W { w: self } + #[must_use] + pub fn sf2_io_1_di_dly_sel(&mut self) -> SF2_IO_1_DI_DLY_SEL_W<8> { + SF2_IO_1_DI_DLY_SEL_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn sf2_io_1_oe_dly_sel(&mut self) -> SF2_IO_1_OE_DLY_SEL_W { - SF2_IO_1_OE_DLY_SEL_W { w: self } + #[must_use] + pub fn sf2_io_1_do_dly_sel(&mut self) -> SF2_IO_1_DO_DLY_SEL_W<16> { + SF2_IO_1_DO_DLY_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -161,11 +104,10 @@ impl crate::Readable for SF2_IF_IO_DLY_2_SPEC { #[doc = "`write(|w| ..)` method takes [sf2_if_io_dly_2::W](W) writer structure"] impl crate::Writable for SF2_IF_IO_DLY_2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf2_if_io_dly_2 to value 0"] impl crate::Resettable for SF2_IF_IO_DLY_2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf2_if_io_dly_3.rs b/src/sf_ctrl/sf2_if_io_dly_3.rs index b9d2fdc..ea83b44 100644 --- a/src/sf_ctrl/sf2_if_io_dly_3.rs +++ b/src/sf_ctrl/sf2_if_io_dly_3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,123 +28,65 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `sf2_io_2_do_dly_sel` reader - "] -pub struct SF2_IO_2_DO_DLY_SEL_R(crate::FieldReader); -impl SF2_IO_2_DO_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF2_IO_2_DO_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF2_IO_2_DO_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf2_io_2_do_dly_sel` writer - "] -pub struct SF2_IO_2_DO_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF2_IO_2_DO_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 16)) | ((value as u32 & 0x03) << 16); - self.w - } -} -#[doc = "Field `sf2_io_2_di_dly_sel` reader - "] -pub struct SF2_IO_2_DI_DLY_SEL_R(crate::FieldReader); -impl SF2_IO_2_DI_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF2_IO_2_DI_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF2_IO_2_DI_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf2_io_2_di_dly_sel` writer - "] -pub struct SF2_IO_2_DI_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF2_IO_2_DI_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} #[doc = "Field `sf2_io_2_oe_dly_sel` reader - "] -pub struct SF2_IO_2_OE_DLY_SEL_R(crate::FieldReader); -impl SF2_IO_2_OE_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF2_IO_2_OE_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF2_IO_2_OE_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF2_IO_2_OE_DLY_SEL_R = crate::FieldReader; #[doc = "Field `sf2_io_2_oe_dly_sel` writer - "] -pub struct SF2_IO_2_OE_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF2_IO_2_OE_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w - } -} +pub type SF2_IO_2_OE_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF2_IF_IO_DLY_3_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf2_io_2_di_dly_sel` reader - "] +pub type SF2_IO_2_DI_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `sf2_io_2_di_dly_sel` writer - "] +pub type SF2_IO_2_DI_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF2_IF_IO_DLY_3_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf2_io_2_do_dly_sel` reader - "] +pub type SF2_IO_2_DO_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `sf2_io_2_do_dly_sel` writer - "] +pub type SF2_IO_2_DO_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF2_IF_IO_DLY_3_SPEC, u8, u8, 2, O>; impl R { - #[doc = "Bits 16:17"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn sf2_io_2_do_dly_sel(&self) -> SF2_IO_2_DO_DLY_SEL_R { - SF2_IO_2_DO_DLY_SEL_R::new(((self.bits >> 16) & 0x03) as u8) + pub fn sf2_io_2_oe_dly_sel(&self) -> SF2_IO_2_OE_DLY_SEL_R { + SF2_IO_2_OE_DLY_SEL_R::new((self.bits & 3) as u8) } #[doc = "Bits 8:9"] #[inline(always)] pub fn sf2_io_2_di_dly_sel(&self) -> SF2_IO_2_DI_DLY_SEL_R { - SF2_IO_2_DI_DLY_SEL_R::new(((self.bits >> 8) & 0x03) as u8) + SF2_IO_2_DI_DLY_SEL_R::new(((self.bits >> 8) & 3) as u8) } - #[doc = "Bits 0:1"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn sf2_io_2_oe_dly_sel(&self) -> SF2_IO_2_OE_DLY_SEL_R { - SF2_IO_2_OE_DLY_SEL_R::new((self.bits & 0x03) as u8) + pub fn sf2_io_2_do_dly_sel(&self) -> SF2_IO_2_DO_DLY_SEL_R { + SF2_IO_2_DO_DLY_SEL_R::new(((self.bits >> 16) & 3) as u8) } } impl W { - #[doc = "Bits 16:17"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn sf2_io_2_do_dly_sel(&mut self) -> SF2_IO_2_DO_DLY_SEL_W { - SF2_IO_2_DO_DLY_SEL_W { w: self } + #[must_use] + pub fn sf2_io_2_oe_dly_sel(&mut self) -> SF2_IO_2_OE_DLY_SEL_W<0> { + SF2_IO_2_OE_DLY_SEL_W::new(self) } #[doc = "Bits 8:9"] #[inline(always)] - pub fn sf2_io_2_di_dly_sel(&mut self) -> SF2_IO_2_DI_DLY_SEL_W { - SF2_IO_2_DI_DLY_SEL_W { w: self } + #[must_use] + pub fn sf2_io_2_di_dly_sel(&mut self) -> SF2_IO_2_DI_DLY_SEL_W<8> { + SF2_IO_2_DI_DLY_SEL_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn sf2_io_2_oe_dly_sel(&mut self) -> SF2_IO_2_OE_DLY_SEL_W { - SF2_IO_2_OE_DLY_SEL_W { w: self } + #[must_use] + pub fn sf2_io_2_do_dly_sel(&mut self) -> SF2_IO_2_DO_DLY_SEL_W<16> { + SF2_IO_2_DO_DLY_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -161,11 +104,10 @@ impl crate::Readable for SF2_IF_IO_DLY_3_SPEC { #[doc = "`write(|w| ..)` method takes [sf2_if_io_dly_3::W](W) writer structure"] impl crate::Writable for SF2_IF_IO_DLY_3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf2_if_io_dly_3 to value 0"] impl crate::Resettable for SF2_IF_IO_DLY_3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf2_if_io_dly_4.rs b/src/sf_ctrl/sf2_if_io_dly_4.rs index 15c65ac..a87e3f3 100644 --- a/src/sf_ctrl/sf2_if_io_dly_4.rs +++ b/src/sf_ctrl/sf2_if_io_dly_4.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,123 +28,65 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `sf2_io_3_do_dly_sel` reader - "] -pub struct SF2_IO_3_DO_DLY_SEL_R(crate::FieldReader); -impl SF2_IO_3_DO_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF2_IO_3_DO_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF2_IO_3_DO_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf2_io_3_do_dly_sel` writer - "] -pub struct SF2_IO_3_DO_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF2_IO_3_DO_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 16)) | ((value as u32 & 0x03) << 16); - self.w - } -} -#[doc = "Field `sf2_io_3_di_dly_sel` reader - "] -pub struct SF2_IO_3_DI_DLY_SEL_R(crate::FieldReader); -impl SF2_IO_3_DI_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF2_IO_3_DI_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF2_IO_3_DI_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf2_io_3_di_dly_sel` writer - "] -pub struct SF2_IO_3_DI_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF2_IO_3_DI_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} #[doc = "Field `sf2_io_3_oe_dly_sel` reader - "] -pub struct SF2_IO_3_OE_DLY_SEL_R(crate::FieldReader); -impl SF2_IO_3_OE_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF2_IO_3_OE_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF2_IO_3_OE_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF2_IO_3_OE_DLY_SEL_R = crate::FieldReader; #[doc = "Field `sf2_io_3_oe_dly_sel` writer - "] -pub struct SF2_IO_3_OE_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF2_IO_3_OE_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w - } -} +pub type SF2_IO_3_OE_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF2_IF_IO_DLY_4_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf2_io_3_di_dly_sel` reader - "] +pub type SF2_IO_3_DI_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `sf2_io_3_di_dly_sel` writer - "] +pub type SF2_IO_3_DI_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF2_IF_IO_DLY_4_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf2_io_3_do_dly_sel` reader - "] +pub type SF2_IO_3_DO_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `sf2_io_3_do_dly_sel` writer - "] +pub type SF2_IO_3_DO_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF2_IF_IO_DLY_4_SPEC, u8, u8, 2, O>; impl R { - #[doc = "Bits 16:17"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn sf2_io_3_do_dly_sel(&self) -> SF2_IO_3_DO_DLY_SEL_R { - SF2_IO_3_DO_DLY_SEL_R::new(((self.bits >> 16) & 0x03) as u8) + pub fn sf2_io_3_oe_dly_sel(&self) -> SF2_IO_3_OE_DLY_SEL_R { + SF2_IO_3_OE_DLY_SEL_R::new((self.bits & 3) as u8) } #[doc = "Bits 8:9"] #[inline(always)] pub fn sf2_io_3_di_dly_sel(&self) -> SF2_IO_3_DI_DLY_SEL_R { - SF2_IO_3_DI_DLY_SEL_R::new(((self.bits >> 8) & 0x03) as u8) + SF2_IO_3_DI_DLY_SEL_R::new(((self.bits >> 8) & 3) as u8) } - #[doc = "Bits 0:1"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn sf2_io_3_oe_dly_sel(&self) -> SF2_IO_3_OE_DLY_SEL_R { - SF2_IO_3_OE_DLY_SEL_R::new((self.bits & 0x03) as u8) + pub fn sf2_io_3_do_dly_sel(&self) -> SF2_IO_3_DO_DLY_SEL_R { + SF2_IO_3_DO_DLY_SEL_R::new(((self.bits >> 16) & 3) as u8) } } impl W { - #[doc = "Bits 16:17"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn sf2_io_3_do_dly_sel(&mut self) -> SF2_IO_3_DO_DLY_SEL_W { - SF2_IO_3_DO_DLY_SEL_W { w: self } + #[must_use] + pub fn sf2_io_3_oe_dly_sel(&mut self) -> SF2_IO_3_OE_DLY_SEL_W<0> { + SF2_IO_3_OE_DLY_SEL_W::new(self) } #[doc = "Bits 8:9"] #[inline(always)] - pub fn sf2_io_3_di_dly_sel(&mut self) -> SF2_IO_3_DI_DLY_SEL_W { - SF2_IO_3_DI_DLY_SEL_W { w: self } + #[must_use] + pub fn sf2_io_3_di_dly_sel(&mut self) -> SF2_IO_3_DI_DLY_SEL_W<8> { + SF2_IO_3_DI_DLY_SEL_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn sf2_io_3_oe_dly_sel(&mut self) -> SF2_IO_3_OE_DLY_SEL_W { - SF2_IO_3_OE_DLY_SEL_W { w: self } + #[must_use] + pub fn sf2_io_3_do_dly_sel(&mut self) -> SF2_IO_3_DO_DLY_SEL_W<16> { + SF2_IO_3_DO_DLY_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -161,11 +104,10 @@ impl crate::Readable for SF2_IF_IO_DLY_4_SPEC { #[doc = "`write(|w| ..)` method takes [sf2_if_io_dly_4::W](W) writer structure"] impl crate::Writable for SF2_IF_IO_DLY_4_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf2_if_io_dly_4 to value 0"] impl crate::Resettable for SF2_IF_IO_DLY_4_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf3_if_io_dly_0.rs b/src/sf_ctrl/sf3_if_io_dly_0.rs index 45f6f7f..c9df226 100644 --- a/src/sf_ctrl/sf3_if_io_dly_0.rs +++ b/src/sf_ctrl/sf3_if_io_dly_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,195 +28,97 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `sf3_dqs_do_dly_sel` reader - "] -pub struct SF3_DQS_DO_DLY_SEL_R(crate::FieldReader); -impl SF3_DQS_DO_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF3_DQS_DO_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF3_DQS_DO_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf3_dqs_do_dly_sel` writer - "] -pub struct SF3_DQS_DO_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF3_DQS_DO_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 30)) | ((value as u32 & 0x03) << 30); - self.w - } -} -#[doc = "Field `sf3_dqs_di_dly_sel` reader - "] -pub struct SF3_DQS_DI_DLY_SEL_R(crate::FieldReader); -impl SF3_DQS_DI_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF3_DQS_DI_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF3_DQS_DI_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf3_dqs_di_dly_sel` writer - "] -pub struct SF3_DQS_DI_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF3_DQS_DI_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 28)) | ((value as u32 & 0x03) << 28); - self.w - } -} -#[doc = "Field `sf3_dqs_oe_dly_sel` reader - "] -pub struct SF3_DQS_OE_DLY_SEL_R(crate::FieldReader); -impl SF3_DQS_OE_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF3_DQS_OE_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF3_DQS_OE_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf3_dqs_oe_dly_sel` writer - "] -pub struct SF3_DQS_OE_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF3_DQS_OE_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 26)) | ((value as u32 & 0x03) << 26); - self.w - } -} -#[doc = "Field `sf3_clk_out_dly_sel` reader - "] -pub struct SF3_CLK_OUT_DLY_SEL_R(crate::FieldReader); -impl SF3_CLK_OUT_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF3_CLK_OUT_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF3_CLK_OUT_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf3_clk_out_dly_sel` writer - "] -pub struct SF3_CLK_OUT_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF3_CLK_OUT_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} #[doc = "Field `sf3_cs_dly_sel` reader - "] -pub struct SF3_CS_DLY_SEL_R(crate::FieldReader); -impl SF3_CS_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF3_CS_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF3_CS_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF3_CS_DLY_SEL_R = crate::FieldReader; #[doc = "Field `sf3_cs_dly_sel` writer - "] -pub struct SF3_CS_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF3_CS_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w - } -} +pub type SF3_CS_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF3_IF_IO_DLY_0_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf3_clk_out_dly_sel` reader - "] +pub type SF3_CLK_OUT_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `sf3_clk_out_dly_sel` writer - "] +pub type SF3_CLK_OUT_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF3_IF_IO_DLY_0_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf3_dqs_oe_dly_sel` reader - "] +pub type SF3_DQS_OE_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `sf3_dqs_oe_dly_sel` writer - "] +pub type SF3_DQS_OE_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF3_IF_IO_DLY_0_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf3_dqs_di_dly_sel` reader - "] +pub type SF3_DQS_DI_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `sf3_dqs_di_dly_sel` writer - "] +pub type SF3_DQS_DI_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF3_IF_IO_DLY_0_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf3_dqs_do_dly_sel` reader - "] +pub type SF3_DQS_DO_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `sf3_dqs_do_dly_sel` writer - "] +pub type SF3_DQS_DO_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF3_IF_IO_DLY_0_SPEC, u8, u8, 2, O>; impl R { - #[doc = "Bits 30:31"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn sf3_dqs_do_dly_sel(&self) -> SF3_DQS_DO_DLY_SEL_R { - SF3_DQS_DO_DLY_SEL_R::new(((self.bits >> 30) & 0x03) as u8) + pub fn sf3_cs_dly_sel(&self) -> SF3_CS_DLY_SEL_R { + SF3_CS_DLY_SEL_R::new((self.bits & 3) as u8) } - #[doc = "Bits 28:29"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn sf3_dqs_di_dly_sel(&self) -> SF3_DQS_DI_DLY_SEL_R { - SF3_DQS_DI_DLY_SEL_R::new(((self.bits >> 28) & 0x03) as u8) + pub fn sf3_clk_out_dly_sel(&self) -> SF3_CLK_OUT_DLY_SEL_R { + SF3_CLK_OUT_DLY_SEL_R::new(((self.bits >> 8) & 3) as u8) } #[doc = "Bits 26:27"] #[inline(always)] pub fn sf3_dqs_oe_dly_sel(&self) -> SF3_DQS_OE_DLY_SEL_R { - SF3_DQS_OE_DLY_SEL_R::new(((self.bits >> 26) & 0x03) as u8) + SF3_DQS_OE_DLY_SEL_R::new(((self.bits >> 26) & 3) as u8) } - #[doc = "Bits 8:9"] + #[doc = "Bits 28:29"] #[inline(always)] - pub fn sf3_clk_out_dly_sel(&self) -> SF3_CLK_OUT_DLY_SEL_R { - SF3_CLK_OUT_DLY_SEL_R::new(((self.bits >> 8) & 0x03) as u8) + pub fn sf3_dqs_di_dly_sel(&self) -> SF3_DQS_DI_DLY_SEL_R { + SF3_DQS_DI_DLY_SEL_R::new(((self.bits >> 28) & 3) as u8) } - #[doc = "Bits 0:1"] + #[doc = "Bits 30:31"] #[inline(always)] - pub fn sf3_cs_dly_sel(&self) -> SF3_CS_DLY_SEL_R { - SF3_CS_DLY_SEL_R::new((self.bits & 0x03) as u8) + pub fn sf3_dqs_do_dly_sel(&self) -> SF3_DQS_DO_DLY_SEL_R { + SF3_DQS_DO_DLY_SEL_R::new(((self.bits >> 30) & 3) as u8) } } impl W { - #[doc = "Bits 30:31"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn sf3_dqs_do_dly_sel(&mut self) -> SF3_DQS_DO_DLY_SEL_W { - SF3_DQS_DO_DLY_SEL_W { w: self } + #[must_use] + pub fn sf3_cs_dly_sel(&mut self) -> SF3_CS_DLY_SEL_W<0> { + SF3_CS_DLY_SEL_W::new(self) } - #[doc = "Bits 28:29"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn sf3_dqs_di_dly_sel(&mut self) -> SF3_DQS_DI_DLY_SEL_W { - SF3_DQS_DI_DLY_SEL_W { w: self } + #[must_use] + pub fn sf3_clk_out_dly_sel(&mut self) -> SF3_CLK_OUT_DLY_SEL_W<8> { + SF3_CLK_OUT_DLY_SEL_W::new(self) } #[doc = "Bits 26:27"] #[inline(always)] - pub fn sf3_dqs_oe_dly_sel(&mut self) -> SF3_DQS_OE_DLY_SEL_W { - SF3_DQS_OE_DLY_SEL_W { w: self } + #[must_use] + pub fn sf3_dqs_oe_dly_sel(&mut self) -> SF3_DQS_OE_DLY_SEL_W<26> { + SF3_DQS_OE_DLY_SEL_W::new(self) } - #[doc = "Bits 8:9"] + #[doc = "Bits 28:29"] #[inline(always)] - pub fn sf3_clk_out_dly_sel(&mut self) -> SF3_CLK_OUT_DLY_SEL_W { - SF3_CLK_OUT_DLY_SEL_W { w: self } + #[must_use] + pub fn sf3_dqs_di_dly_sel(&mut self) -> SF3_DQS_DI_DLY_SEL_W<28> { + SF3_DQS_DI_DLY_SEL_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bits 30:31"] #[inline(always)] - pub fn sf3_cs_dly_sel(&mut self) -> SF3_CS_DLY_SEL_W { - SF3_CS_DLY_SEL_W { w: self } + #[must_use] + pub fn sf3_dqs_do_dly_sel(&mut self) -> SF3_DQS_DO_DLY_SEL_W<30> { + SF3_DQS_DO_DLY_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -233,11 +136,10 @@ impl crate::Readable for SF3_IF_IO_DLY_0_SPEC { #[doc = "`write(|w| ..)` method takes [sf3_if_io_dly_0::W](W) writer structure"] impl crate::Writable for SF3_IF_IO_DLY_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf3_if_io_dly_0 to value 0"] impl crate::Resettable for SF3_IF_IO_DLY_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf3_if_io_dly_1.rs b/src/sf_ctrl/sf3_if_io_dly_1.rs index 5f00b3f..bf77c39 100644 --- a/src/sf_ctrl/sf3_if_io_dly_1.rs +++ b/src/sf_ctrl/sf3_if_io_dly_1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,123 +28,65 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `sf3_io_0_do_dly_sel` reader - "] -pub struct SF3_IO_0_DO_DLY_SEL_R(crate::FieldReader); -impl SF3_IO_0_DO_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF3_IO_0_DO_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF3_IO_0_DO_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf3_io_0_do_dly_sel` writer - "] -pub struct SF3_IO_0_DO_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF3_IO_0_DO_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 16)) | ((value as u32 & 0x03) << 16); - self.w - } -} -#[doc = "Field `sf3_io_0_di_dly_sel` reader - "] -pub struct SF3_IO_0_DI_DLY_SEL_R(crate::FieldReader); -impl SF3_IO_0_DI_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF3_IO_0_DI_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF3_IO_0_DI_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf3_io_0_di_dly_sel` writer - "] -pub struct SF3_IO_0_DI_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF3_IO_0_DI_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} #[doc = "Field `sf3_io_0_oe_dly_sel` reader - "] -pub struct SF3_IO_0_OE_DLY_SEL_R(crate::FieldReader); -impl SF3_IO_0_OE_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF3_IO_0_OE_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF3_IO_0_OE_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF3_IO_0_OE_DLY_SEL_R = crate::FieldReader; #[doc = "Field `sf3_io_0_oe_dly_sel` writer - "] -pub struct SF3_IO_0_OE_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF3_IO_0_OE_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w - } -} +pub type SF3_IO_0_OE_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF3_IF_IO_DLY_1_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf3_io_0_di_dly_sel` reader - "] +pub type SF3_IO_0_DI_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `sf3_io_0_di_dly_sel` writer - "] +pub type SF3_IO_0_DI_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF3_IF_IO_DLY_1_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf3_io_0_do_dly_sel` reader - "] +pub type SF3_IO_0_DO_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `sf3_io_0_do_dly_sel` writer - "] +pub type SF3_IO_0_DO_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF3_IF_IO_DLY_1_SPEC, u8, u8, 2, O>; impl R { - #[doc = "Bits 16:17"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn sf3_io_0_do_dly_sel(&self) -> SF3_IO_0_DO_DLY_SEL_R { - SF3_IO_0_DO_DLY_SEL_R::new(((self.bits >> 16) & 0x03) as u8) + pub fn sf3_io_0_oe_dly_sel(&self) -> SF3_IO_0_OE_DLY_SEL_R { + SF3_IO_0_OE_DLY_SEL_R::new((self.bits & 3) as u8) } #[doc = "Bits 8:9"] #[inline(always)] pub fn sf3_io_0_di_dly_sel(&self) -> SF3_IO_0_DI_DLY_SEL_R { - SF3_IO_0_DI_DLY_SEL_R::new(((self.bits >> 8) & 0x03) as u8) + SF3_IO_0_DI_DLY_SEL_R::new(((self.bits >> 8) & 3) as u8) } - #[doc = "Bits 0:1"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn sf3_io_0_oe_dly_sel(&self) -> SF3_IO_0_OE_DLY_SEL_R { - SF3_IO_0_OE_DLY_SEL_R::new((self.bits & 0x03) as u8) + pub fn sf3_io_0_do_dly_sel(&self) -> SF3_IO_0_DO_DLY_SEL_R { + SF3_IO_0_DO_DLY_SEL_R::new(((self.bits >> 16) & 3) as u8) } } impl W { - #[doc = "Bits 16:17"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn sf3_io_0_do_dly_sel(&mut self) -> SF3_IO_0_DO_DLY_SEL_W { - SF3_IO_0_DO_DLY_SEL_W { w: self } + #[must_use] + pub fn sf3_io_0_oe_dly_sel(&mut self) -> SF3_IO_0_OE_DLY_SEL_W<0> { + SF3_IO_0_OE_DLY_SEL_W::new(self) } #[doc = "Bits 8:9"] #[inline(always)] - pub fn sf3_io_0_di_dly_sel(&mut self) -> SF3_IO_0_DI_DLY_SEL_W { - SF3_IO_0_DI_DLY_SEL_W { w: self } + #[must_use] + pub fn sf3_io_0_di_dly_sel(&mut self) -> SF3_IO_0_DI_DLY_SEL_W<8> { + SF3_IO_0_DI_DLY_SEL_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn sf3_io_0_oe_dly_sel(&mut self) -> SF3_IO_0_OE_DLY_SEL_W { - SF3_IO_0_OE_DLY_SEL_W { w: self } + #[must_use] + pub fn sf3_io_0_do_dly_sel(&mut self) -> SF3_IO_0_DO_DLY_SEL_W<16> { + SF3_IO_0_DO_DLY_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -161,11 +104,10 @@ impl crate::Readable for SF3_IF_IO_DLY_1_SPEC { #[doc = "`write(|w| ..)` method takes [sf3_if_io_dly_1::W](W) writer structure"] impl crate::Writable for SF3_IF_IO_DLY_1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf3_if_io_dly_1 to value 0"] impl crate::Resettable for SF3_IF_IO_DLY_1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf3_if_io_dly_2.rs b/src/sf_ctrl/sf3_if_io_dly_2.rs index 6b83c51..9eb10b1 100644 --- a/src/sf_ctrl/sf3_if_io_dly_2.rs +++ b/src/sf_ctrl/sf3_if_io_dly_2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,123 +28,65 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `sf3_io_1_do_dly_sel` reader - "] -pub struct SF3_IO_1_DO_DLY_SEL_R(crate::FieldReader); -impl SF3_IO_1_DO_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF3_IO_1_DO_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF3_IO_1_DO_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf3_io_1_do_dly_sel` writer - "] -pub struct SF3_IO_1_DO_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF3_IO_1_DO_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 16)) | ((value as u32 & 0x03) << 16); - self.w - } -} -#[doc = "Field `sf3_io_1_di_dly_sel` reader - "] -pub struct SF3_IO_1_DI_DLY_SEL_R(crate::FieldReader); -impl SF3_IO_1_DI_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF3_IO_1_DI_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF3_IO_1_DI_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf3_io_1_di_dly_sel` writer - "] -pub struct SF3_IO_1_DI_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF3_IO_1_DI_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} #[doc = "Field `sf3_io_1_oe_dly_sel` reader - "] -pub struct SF3_IO_1_OE_DLY_SEL_R(crate::FieldReader); -impl SF3_IO_1_OE_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF3_IO_1_OE_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF3_IO_1_OE_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF3_IO_1_OE_DLY_SEL_R = crate::FieldReader; #[doc = "Field `sf3_io_1_oe_dly_sel` writer - "] -pub struct SF3_IO_1_OE_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF3_IO_1_OE_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w - } -} +pub type SF3_IO_1_OE_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF3_IF_IO_DLY_2_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf3_io_1_di_dly_sel` reader - "] +pub type SF3_IO_1_DI_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `sf3_io_1_di_dly_sel` writer - "] +pub type SF3_IO_1_DI_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF3_IF_IO_DLY_2_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf3_io_1_do_dly_sel` reader - "] +pub type SF3_IO_1_DO_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `sf3_io_1_do_dly_sel` writer - "] +pub type SF3_IO_1_DO_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF3_IF_IO_DLY_2_SPEC, u8, u8, 2, O>; impl R { - #[doc = "Bits 16:17"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn sf3_io_1_do_dly_sel(&self) -> SF3_IO_1_DO_DLY_SEL_R { - SF3_IO_1_DO_DLY_SEL_R::new(((self.bits >> 16) & 0x03) as u8) + pub fn sf3_io_1_oe_dly_sel(&self) -> SF3_IO_1_OE_DLY_SEL_R { + SF3_IO_1_OE_DLY_SEL_R::new((self.bits & 3) as u8) } #[doc = "Bits 8:9"] #[inline(always)] pub fn sf3_io_1_di_dly_sel(&self) -> SF3_IO_1_DI_DLY_SEL_R { - SF3_IO_1_DI_DLY_SEL_R::new(((self.bits >> 8) & 0x03) as u8) + SF3_IO_1_DI_DLY_SEL_R::new(((self.bits >> 8) & 3) as u8) } - #[doc = "Bits 0:1"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn sf3_io_1_oe_dly_sel(&self) -> SF3_IO_1_OE_DLY_SEL_R { - SF3_IO_1_OE_DLY_SEL_R::new((self.bits & 0x03) as u8) + pub fn sf3_io_1_do_dly_sel(&self) -> SF3_IO_1_DO_DLY_SEL_R { + SF3_IO_1_DO_DLY_SEL_R::new(((self.bits >> 16) & 3) as u8) } } impl W { - #[doc = "Bits 16:17"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn sf3_io_1_do_dly_sel(&mut self) -> SF3_IO_1_DO_DLY_SEL_W { - SF3_IO_1_DO_DLY_SEL_W { w: self } + #[must_use] + pub fn sf3_io_1_oe_dly_sel(&mut self) -> SF3_IO_1_OE_DLY_SEL_W<0> { + SF3_IO_1_OE_DLY_SEL_W::new(self) } #[doc = "Bits 8:9"] #[inline(always)] - pub fn sf3_io_1_di_dly_sel(&mut self) -> SF3_IO_1_DI_DLY_SEL_W { - SF3_IO_1_DI_DLY_SEL_W { w: self } + #[must_use] + pub fn sf3_io_1_di_dly_sel(&mut self) -> SF3_IO_1_DI_DLY_SEL_W<8> { + SF3_IO_1_DI_DLY_SEL_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn sf3_io_1_oe_dly_sel(&mut self) -> SF3_IO_1_OE_DLY_SEL_W { - SF3_IO_1_OE_DLY_SEL_W { w: self } + #[must_use] + pub fn sf3_io_1_do_dly_sel(&mut self) -> SF3_IO_1_DO_DLY_SEL_W<16> { + SF3_IO_1_DO_DLY_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -161,11 +104,10 @@ impl crate::Readable for SF3_IF_IO_DLY_2_SPEC { #[doc = "`write(|w| ..)` method takes [sf3_if_io_dly_2::W](W) writer structure"] impl crate::Writable for SF3_IF_IO_DLY_2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf3_if_io_dly_2 to value 0"] impl crate::Resettable for SF3_IF_IO_DLY_2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf3_if_io_dly_3.rs b/src/sf_ctrl/sf3_if_io_dly_3.rs index 62a2a4c..3b4b71e 100644 --- a/src/sf_ctrl/sf3_if_io_dly_3.rs +++ b/src/sf_ctrl/sf3_if_io_dly_3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,123 +28,65 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `sf3_io_2_do_dly_sel` reader - "] -pub struct SF3_IO_2_DO_DLY_SEL_R(crate::FieldReader); -impl SF3_IO_2_DO_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF3_IO_2_DO_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF3_IO_2_DO_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf3_io_2_do_dly_sel` writer - "] -pub struct SF3_IO_2_DO_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF3_IO_2_DO_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 16)) | ((value as u32 & 0x03) << 16); - self.w - } -} -#[doc = "Field `sf3_io_2_di_dly_sel` reader - "] -pub struct SF3_IO_2_DI_DLY_SEL_R(crate::FieldReader); -impl SF3_IO_2_DI_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF3_IO_2_DI_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF3_IO_2_DI_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf3_io_2_di_dly_sel` writer - "] -pub struct SF3_IO_2_DI_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF3_IO_2_DI_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} #[doc = "Field `sf3_io_2_oe_dly_sel` reader - "] -pub struct SF3_IO_2_OE_DLY_SEL_R(crate::FieldReader); -impl SF3_IO_2_OE_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF3_IO_2_OE_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF3_IO_2_OE_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF3_IO_2_OE_DLY_SEL_R = crate::FieldReader; #[doc = "Field `sf3_io_2_oe_dly_sel` writer - "] -pub struct SF3_IO_2_OE_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF3_IO_2_OE_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w - } -} +pub type SF3_IO_2_OE_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF3_IF_IO_DLY_3_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf3_io_2_di_dly_sel` reader - "] +pub type SF3_IO_2_DI_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `sf3_io_2_di_dly_sel` writer - "] +pub type SF3_IO_2_DI_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF3_IF_IO_DLY_3_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf3_io_2_do_dly_sel` reader - "] +pub type SF3_IO_2_DO_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `sf3_io_2_do_dly_sel` writer - "] +pub type SF3_IO_2_DO_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF3_IF_IO_DLY_3_SPEC, u8, u8, 2, O>; impl R { - #[doc = "Bits 16:17"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn sf3_io_2_do_dly_sel(&self) -> SF3_IO_2_DO_DLY_SEL_R { - SF3_IO_2_DO_DLY_SEL_R::new(((self.bits >> 16) & 0x03) as u8) + pub fn sf3_io_2_oe_dly_sel(&self) -> SF3_IO_2_OE_DLY_SEL_R { + SF3_IO_2_OE_DLY_SEL_R::new((self.bits & 3) as u8) } #[doc = "Bits 8:9"] #[inline(always)] pub fn sf3_io_2_di_dly_sel(&self) -> SF3_IO_2_DI_DLY_SEL_R { - SF3_IO_2_DI_DLY_SEL_R::new(((self.bits >> 8) & 0x03) as u8) + SF3_IO_2_DI_DLY_SEL_R::new(((self.bits >> 8) & 3) as u8) } - #[doc = "Bits 0:1"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn sf3_io_2_oe_dly_sel(&self) -> SF3_IO_2_OE_DLY_SEL_R { - SF3_IO_2_OE_DLY_SEL_R::new((self.bits & 0x03) as u8) + pub fn sf3_io_2_do_dly_sel(&self) -> SF3_IO_2_DO_DLY_SEL_R { + SF3_IO_2_DO_DLY_SEL_R::new(((self.bits >> 16) & 3) as u8) } } impl W { - #[doc = "Bits 16:17"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn sf3_io_2_do_dly_sel(&mut self) -> SF3_IO_2_DO_DLY_SEL_W { - SF3_IO_2_DO_DLY_SEL_W { w: self } + #[must_use] + pub fn sf3_io_2_oe_dly_sel(&mut self) -> SF3_IO_2_OE_DLY_SEL_W<0> { + SF3_IO_2_OE_DLY_SEL_W::new(self) } #[doc = "Bits 8:9"] #[inline(always)] - pub fn sf3_io_2_di_dly_sel(&mut self) -> SF3_IO_2_DI_DLY_SEL_W { - SF3_IO_2_DI_DLY_SEL_W { w: self } + #[must_use] + pub fn sf3_io_2_di_dly_sel(&mut self) -> SF3_IO_2_DI_DLY_SEL_W<8> { + SF3_IO_2_DI_DLY_SEL_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn sf3_io_2_oe_dly_sel(&mut self) -> SF3_IO_2_OE_DLY_SEL_W { - SF3_IO_2_OE_DLY_SEL_W { w: self } + #[must_use] + pub fn sf3_io_2_do_dly_sel(&mut self) -> SF3_IO_2_DO_DLY_SEL_W<16> { + SF3_IO_2_DO_DLY_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -161,11 +104,10 @@ impl crate::Readable for SF3_IF_IO_DLY_3_SPEC { #[doc = "`write(|w| ..)` method takes [sf3_if_io_dly_3::W](W) writer structure"] impl crate::Writable for SF3_IF_IO_DLY_3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf3_if_io_dly_3 to value 0"] impl crate::Resettable for SF3_IF_IO_DLY_3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf3_if_io_dly_4.rs b/src/sf_ctrl/sf3_if_io_dly_4.rs index 8a3bf4a..a7523b5 100644 --- a/src/sf_ctrl/sf3_if_io_dly_4.rs +++ b/src/sf_ctrl/sf3_if_io_dly_4.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,123 +28,65 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `sf3_io_3_do_dly_sel` reader - "] -pub struct SF3_IO_3_DO_DLY_SEL_R(crate::FieldReader); -impl SF3_IO_3_DO_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF3_IO_3_DO_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF3_IO_3_DO_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf3_io_3_do_dly_sel` writer - "] -pub struct SF3_IO_3_DO_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF3_IO_3_DO_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 16)) | ((value as u32 & 0x03) << 16); - self.w - } -} -#[doc = "Field `sf3_io_3_di_dly_sel` reader - "] -pub struct SF3_IO_3_DI_DLY_SEL_R(crate::FieldReader); -impl SF3_IO_3_DI_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF3_IO_3_DI_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF3_IO_3_DI_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf3_io_3_di_dly_sel` writer - "] -pub struct SF3_IO_3_DI_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF3_IO_3_DI_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} #[doc = "Field `sf3_io_3_oe_dly_sel` reader - "] -pub struct SF3_IO_3_OE_DLY_SEL_R(crate::FieldReader); -impl SF3_IO_3_OE_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF3_IO_3_OE_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF3_IO_3_OE_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF3_IO_3_OE_DLY_SEL_R = crate::FieldReader; #[doc = "Field `sf3_io_3_oe_dly_sel` writer - "] -pub struct SF3_IO_3_OE_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF3_IO_3_OE_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w - } -} +pub type SF3_IO_3_OE_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF3_IF_IO_DLY_4_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf3_io_3_di_dly_sel` reader - "] +pub type SF3_IO_3_DI_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `sf3_io_3_di_dly_sel` writer - "] +pub type SF3_IO_3_DI_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF3_IF_IO_DLY_4_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf3_io_3_do_dly_sel` reader - "] +pub type SF3_IO_3_DO_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `sf3_io_3_do_dly_sel` writer - "] +pub type SF3_IO_3_DO_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF3_IF_IO_DLY_4_SPEC, u8, u8, 2, O>; impl R { - #[doc = "Bits 16:17"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn sf3_io_3_do_dly_sel(&self) -> SF3_IO_3_DO_DLY_SEL_R { - SF3_IO_3_DO_DLY_SEL_R::new(((self.bits >> 16) & 0x03) as u8) + pub fn sf3_io_3_oe_dly_sel(&self) -> SF3_IO_3_OE_DLY_SEL_R { + SF3_IO_3_OE_DLY_SEL_R::new((self.bits & 3) as u8) } #[doc = "Bits 8:9"] #[inline(always)] pub fn sf3_io_3_di_dly_sel(&self) -> SF3_IO_3_DI_DLY_SEL_R { - SF3_IO_3_DI_DLY_SEL_R::new(((self.bits >> 8) & 0x03) as u8) + SF3_IO_3_DI_DLY_SEL_R::new(((self.bits >> 8) & 3) as u8) } - #[doc = "Bits 0:1"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn sf3_io_3_oe_dly_sel(&self) -> SF3_IO_3_OE_DLY_SEL_R { - SF3_IO_3_OE_DLY_SEL_R::new((self.bits & 0x03) as u8) + pub fn sf3_io_3_do_dly_sel(&self) -> SF3_IO_3_DO_DLY_SEL_R { + SF3_IO_3_DO_DLY_SEL_R::new(((self.bits >> 16) & 3) as u8) } } impl W { - #[doc = "Bits 16:17"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn sf3_io_3_do_dly_sel(&mut self) -> SF3_IO_3_DO_DLY_SEL_W { - SF3_IO_3_DO_DLY_SEL_W { w: self } + #[must_use] + pub fn sf3_io_3_oe_dly_sel(&mut self) -> SF3_IO_3_OE_DLY_SEL_W<0> { + SF3_IO_3_OE_DLY_SEL_W::new(self) } #[doc = "Bits 8:9"] #[inline(always)] - pub fn sf3_io_3_di_dly_sel(&mut self) -> SF3_IO_3_DI_DLY_SEL_W { - SF3_IO_3_DI_DLY_SEL_W { w: self } + #[must_use] + pub fn sf3_io_3_di_dly_sel(&mut self) -> SF3_IO_3_DI_DLY_SEL_W<8> { + SF3_IO_3_DI_DLY_SEL_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn sf3_io_3_oe_dly_sel(&mut self) -> SF3_IO_3_OE_DLY_SEL_W { - SF3_IO_3_OE_DLY_SEL_W { w: self } + #[must_use] + pub fn sf3_io_3_do_dly_sel(&mut self) -> SF3_IO_3_DO_DLY_SEL_W<16> { + SF3_IO_3_DO_DLY_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -161,11 +104,10 @@ impl crate::Readable for SF3_IF_IO_DLY_4_SPEC { #[doc = "`write(|w| ..)` method takes [sf3_if_io_dly_4::W](W) writer structure"] impl crate::Writable for SF3_IF_IO_DLY_4_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf3_if_io_dly_4 to value 0"] impl crate::Resettable for SF3_IF_IO_DLY_4_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes.rs b/src/sf_ctrl/sf_aes.rs index cfc6231..63840f5 100644 --- a/src/sf_ctrl/sf_aes.rs +++ b/src/sf_ctrl/sf_aes.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,181 +28,76 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `sf_aes_status` reader - "] -pub struct SF_AES_STATUS_R(crate::FieldReader); -impl SF_AES_STATUS_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_STATUS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_aes_pref_busy` reader - "] -pub struct SF_AES_PREF_BUSY_R(crate::FieldReader); -impl SF_AES_PREF_BUSY_R { - pub(crate) fn new(bits: bool) -> Self { - SF_AES_PREF_BUSY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_PREF_BUSY_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_aes_pref_trig` reader - "] -pub struct SF_AES_PREF_TRIG_R(crate::FieldReader); -impl SF_AES_PREF_TRIG_R { - pub(crate) fn new(bits: bool) -> Self { - SF_AES_PREF_TRIG_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_PREF_TRIG_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_aes_pref_trig` writer - "] -pub struct SF_AES_PREF_TRIG_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_PREF_TRIG_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `sf_aes_mode` reader - "] -pub struct SF_AES_MODE_R(crate::FieldReader); -impl SF_AES_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - SF_AES_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_aes_mode` writer - "] -pub struct SF_AES_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_MODE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 1)) | ((value as u32 & 0x03) << 1); - self.w - } -} #[doc = "Field `sf_aes_en` reader - "] -pub struct SF_AES_EN_R(crate::FieldReader); -impl SF_AES_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_AES_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_EN_R = crate::BitReader; #[doc = "Field `sf_aes_en` writer - "] -pub struct SF_AES_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type SF_AES_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_AES_SPEC, bool, O>; +#[doc = "Field `sf_aes_mode` reader - "] +pub type SF_AES_MODE_R = crate::FieldReader; +#[doc = "Field `sf_aes_mode` writer - "] +pub type SF_AES_MODE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SF_AES_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf_aes_pref_trig` reader - "] +pub type SF_AES_PREF_TRIG_R = crate::BitReader; +#[doc = "Field `sf_aes_pref_trig` writer - "] +pub type SF_AES_PREF_TRIG_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_AES_SPEC, bool, O>; +#[doc = "Field `sf_aes_pref_busy` reader - "] +pub type SF_AES_PREF_BUSY_R = crate::BitReader; +#[doc = "Field `sf_aes_status` reader - "] +pub type SF_AES_STATUS_R = crate::FieldReader; impl R { - #[doc = "Bits 5:31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn sf_aes_status(&self) -> SF_AES_STATUS_R { - SF_AES_STATUS_R::new(((self.bits >> 5) & 0x07ff_ffff) as u32) + pub fn sf_aes_en(&self) -> SF_AES_EN_R { + SF_AES_EN_R::new((self.bits & 1) != 0) } - #[doc = "Bit 4"] + #[doc = "Bits 1:2"] #[inline(always)] - pub fn sf_aes_pref_busy(&self) -> SF_AES_PREF_BUSY_R { - SF_AES_PREF_BUSY_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn sf_aes_mode(&self) -> SF_AES_MODE_R { + SF_AES_MODE_R::new(((self.bits >> 1) & 3) as u8) } #[doc = "Bit 3"] #[inline(always)] pub fn sf_aes_pref_trig(&self) -> SF_AES_PREF_TRIG_R { - SF_AES_PREF_TRIG_R::new(((self.bits >> 3) & 0x01) != 0) + SF_AES_PREF_TRIG_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bits 1:2"] + #[doc = "Bit 4"] #[inline(always)] - pub fn sf_aes_mode(&self) -> SF_AES_MODE_R { - SF_AES_MODE_R::new(((self.bits >> 1) & 0x03) as u8) + pub fn sf_aes_pref_busy(&self) -> SF_AES_PREF_BUSY_R { + SF_AES_PREF_BUSY_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bits 5:31"] #[inline(always)] - pub fn sf_aes_en(&self) -> SF_AES_EN_R { - SF_AES_EN_R::new((self.bits & 0x01) != 0) + pub fn sf_aes_status(&self) -> SF_AES_STATUS_R { + SF_AES_STATUS_R::new((self.bits >> 5) & 0x07ff_ffff) } } impl W { - #[doc = "Bit 3"] + #[doc = "Bit 0"] #[inline(always)] - pub fn sf_aes_pref_trig(&mut self) -> SF_AES_PREF_TRIG_W { - SF_AES_PREF_TRIG_W { w: self } + #[must_use] + pub fn sf_aes_en(&mut self) -> SF_AES_EN_W<0> { + SF_AES_EN_W::new(self) } #[doc = "Bits 1:2"] #[inline(always)] - pub fn sf_aes_mode(&mut self) -> SF_AES_MODE_W { - SF_AES_MODE_W { w: self } + #[must_use] + pub fn sf_aes_mode(&mut self) -> SF_AES_MODE_W<1> { + SF_AES_MODE_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 3"] #[inline(always)] - pub fn sf_aes_en(&mut self) -> SF_AES_EN_W { - SF_AES_EN_W { w: self } + #[must_use] + pub fn sf_aes_pref_trig(&mut self) -> SF_AES_PREF_TRIG_W<3> { + SF_AES_PREF_TRIG_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -219,11 +115,10 @@ impl crate::Readable for SF_AES_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes::W](W) writer structure"] impl crate::Writable for SF_AES_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes to value 0x40"] impl crate::Resettable for SF_AES_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x40 - } + const RESET_VALUE: Self::Ux = 0x40; } diff --git a/src/sf_ctrl/sf_aes_cfg_r0.rs b/src/sf_ctrl/sf_aes_cfg_r0.rs index 47d8c6b..894fb1f 100644 --- a/src/sf_ctrl/sf_aes_cfg_r0.rs +++ b/src/sf_ctrl/sf_aes_cfg_r0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,225 +28,97 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `sf_aes_region_r0_lock` reader - "] -pub struct SF_AES_REGION_R0_LOCK_R(crate::FieldReader); -impl SF_AES_REGION_R0_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - SF_AES_REGION_R0_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_REGION_R0_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_aes_region_r0_lock` writer - "] -pub struct SF_AES_REGION_R0_LOCK_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_REGION_R0_LOCK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 31)) | ((value as u32 & 0x01) << 31); - self.w - } -} -#[doc = "Field `sf_aes_region_r0_en` reader - "] -pub struct SF_AES_REGION_R0_EN_R(crate::FieldReader); -impl SF_AES_REGION_R0_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_AES_REGION_R0_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_REGION_R0_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_aes_region_r0_en` writer - "] -pub struct SF_AES_REGION_R0_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_REGION_R0_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 30)) | ((value as u32 & 0x01) << 30); - self.w - } -} -#[doc = "Field `sf_aes_region_r0_hw_key_en` reader - "] -pub struct SF_AES_REGION_R0_HW_KEY_EN_R(crate::FieldReader); -impl SF_AES_REGION_R0_HW_KEY_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_AES_REGION_R0_HW_KEY_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_REGION_R0_HW_KEY_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_aes_region_r0_hw_key_en` writer - "] -pub struct SF_AES_REGION_R0_HW_KEY_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_REGION_R0_HW_KEY_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 29)) | ((value as u32 & 0x01) << 29); - self.w - } -} -#[doc = "Field `sf_aes_region_r0_start` reader - "] -pub struct SF_AES_REGION_R0_START_R(crate::FieldReader); -impl SF_AES_REGION_R0_START_R { - pub(crate) fn new(bits: u16) -> Self { - SF_AES_REGION_R0_START_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_REGION_R0_START_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_aes_region_r0_start` writer - "] -pub struct SF_AES_REGION_R0_START_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_REGION_R0_START_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3fff << 14)) | ((value as u32 & 0x3fff) << 14); - self.w - } -} #[doc = "Field `sf_aes_region_r0_end` reader - "] -pub struct SF_AES_REGION_R0_END_R(crate::FieldReader); -impl SF_AES_REGION_R0_END_R { - pub(crate) fn new(bits: u16) -> Self { - SF_AES_REGION_R0_END_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_REGION_R0_END_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_REGION_R0_END_R = crate::FieldReader; #[doc = "Field `sf_aes_region_r0_end` writer - "] -pub struct SF_AES_REGION_R0_END_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_REGION_R0_END_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x3fff) | (value as u32 & 0x3fff); - self.w - } -} +pub type SF_AES_REGION_R0_END_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_CFG_R0_SPEC, u16, u16, 14, O>; +#[doc = "Field `sf_aes_region_r0_start` reader - "] +pub type SF_AES_REGION_R0_START_R = crate::FieldReader; +#[doc = "Field `sf_aes_region_r0_start` writer - "] +pub type SF_AES_REGION_R0_START_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_CFG_R0_SPEC, u16, u16, 14, O>; +#[doc = "Field `sf_aes_region_r0_hw_key_en` reader - "] +pub type SF_AES_REGION_R0_HW_KEY_EN_R = crate::BitReader; +#[doc = "Field `sf_aes_region_r0_hw_key_en` writer - "] +pub type SF_AES_REGION_R0_HW_KEY_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SF_AES_CFG_R0_SPEC, bool, O>; +#[doc = "Field `sf_aes_region_r0_en` reader - "] +pub type SF_AES_REGION_R0_EN_R = crate::BitReader; +#[doc = "Field `sf_aes_region_r0_en` writer - "] +pub type SF_AES_REGION_R0_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SF_AES_CFG_R0_SPEC, bool, O>; +#[doc = "Field `sf_aes_region_r0_lock` reader - "] +pub type SF_AES_REGION_R0_LOCK_R = crate::BitReader; +#[doc = "Field `sf_aes_region_r0_lock` writer - "] +pub type SF_AES_REGION_R0_LOCK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SF_AES_CFG_R0_SPEC, bool, O>; impl R { - #[doc = "Bit 31"] + #[doc = "Bits 0:13"] #[inline(always)] - pub fn sf_aes_region_r0_lock(&self) -> SF_AES_REGION_R0_LOCK_R { - SF_AES_REGION_R0_LOCK_R::new(((self.bits >> 31) & 0x01) != 0) + pub fn sf_aes_region_r0_end(&self) -> SF_AES_REGION_R0_END_R { + SF_AES_REGION_R0_END_R::new((self.bits & 0x3fff) as u16) } - #[doc = "Bit 30"] + #[doc = "Bits 14:27"] #[inline(always)] - pub fn sf_aes_region_r0_en(&self) -> SF_AES_REGION_R0_EN_R { - SF_AES_REGION_R0_EN_R::new(((self.bits >> 30) & 0x01) != 0) + pub fn sf_aes_region_r0_start(&self) -> SF_AES_REGION_R0_START_R { + SF_AES_REGION_R0_START_R::new(((self.bits >> 14) & 0x3fff) as u16) } #[doc = "Bit 29"] #[inline(always)] pub fn sf_aes_region_r0_hw_key_en(&self) -> SF_AES_REGION_R0_HW_KEY_EN_R { - SF_AES_REGION_R0_HW_KEY_EN_R::new(((self.bits >> 29) & 0x01) != 0) + SF_AES_REGION_R0_HW_KEY_EN_R::new(((self.bits >> 29) & 1) != 0) } - #[doc = "Bits 14:27"] + #[doc = "Bit 30"] #[inline(always)] - pub fn sf_aes_region_r0_start(&self) -> SF_AES_REGION_R0_START_R { - SF_AES_REGION_R0_START_R::new(((self.bits >> 14) & 0x3fff) as u16) + pub fn sf_aes_region_r0_en(&self) -> SF_AES_REGION_R0_EN_R { + SF_AES_REGION_R0_EN_R::new(((self.bits >> 30) & 1) != 0) } - #[doc = "Bits 0:13"] + #[doc = "Bit 31"] #[inline(always)] - pub fn sf_aes_region_r0_end(&self) -> SF_AES_REGION_R0_END_R { - SF_AES_REGION_R0_END_R::new((self.bits & 0x3fff) as u16) + pub fn sf_aes_region_r0_lock(&self) -> SF_AES_REGION_R0_LOCK_R { + SF_AES_REGION_R0_LOCK_R::new(((self.bits >> 31) & 1) != 0) } } impl W { - #[doc = "Bit 31"] + #[doc = "Bits 0:13"] #[inline(always)] - pub fn sf_aes_region_r0_lock(&mut self) -> SF_AES_REGION_R0_LOCK_W { - SF_AES_REGION_R0_LOCK_W { w: self } + #[must_use] + pub fn sf_aes_region_r0_end(&mut self) -> SF_AES_REGION_R0_END_W<0> { + SF_AES_REGION_R0_END_W::new(self) } - #[doc = "Bit 30"] + #[doc = "Bits 14:27"] #[inline(always)] - pub fn sf_aes_region_r0_en(&mut self) -> SF_AES_REGION_R0_EN_W { - SF_AES_REGION_R0_EN_W { w: self } + #[must_use] + pub fn sf_aes_region_r0_start(&mut self) -> SF_AES_REGION_R0_START_W<14> { + SF_AES_REGION_R0_START_W::new(self) } #[doc = "Bit 29"] #[inline(always)] - pub fn sf_aes_region_r0_hw_key_en(&mut self) -> SF_AES_REGION_R0_HW_KEY_EN_W { - SF_AES_REGION_R0_HW_KEY_EN_W { w: self } + #[must_use] + pub fn sf_aes_region_r0_hw_key_en(&mut self) -> SF_AES_REGION_R0_HW_KEY_EN_W<29> { + SF_AES_REGION_R0_HW_KEY_EN_W::new(self) } - #[doc = "Bits 14:27"] + #[doc = "Bit 30"] #[inline(always)] - pub fn sf_aes_region_r0_start(&mut self) -> SF_AES_REGION_R0_START_W { - SF_AES_REGION_R0_START_W { w: self } + #[must_use] + pub fn sf_aes_region_r0_en(&mut self) -> SF_AES_REGION_R0_EN_W<30> { + SF_AES_REGION_R0_EN_W::new(self) } - #[doc = "Bits 0:13"] + #[doc = "Bit 31"] #[inline(always)] - pub fn sf_aes_region_r0_end(&mut self) -> SF_AES_REGION_R0_END_W { - SF_AES_REGION_R0_END_W { w: self } + #[must_use] + pub fn sf_aes_region_r0_lock(&mut self) -> SF_AES_REGION_R0_LOCK_W<31> { + SF_AES_REGION_R0_LOCK_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -263,11 +136,10 @@ impl crate::Readable for SF_AES_CFG_R0_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_cfg_r0::W](W) writer structure"] impl crate::Writable for SF_AES_CFG_R0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_cfg_r0 to value 0x3fff"] impl crate::Resettable for SF_AES_CFG_R0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x3fff - } + const RESET_VALUE: Self::Ux = 0x3fff; } diff --git a/src/sf_ctrl/sf_aes_iv_r0_w0.rs b/src/sf_ctrl/sf_aes_iv_r0_w0.rs index 0b6bda5..c2dcc69 100644 --- a/src/sf_ctrl/sf_aes_iv_r0_w0.rs +++ b/src/sf_ctrl/sf_aes_iv_r0_w0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_aes_iv_r0_w0` reader - "] -pub struct SF_AES_IV_R0_W0_R(crate::FieldReader); -impl SF_AES_IV_R0_W0_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_IV_R0_W0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_IV_R0_W0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_IV_R0_W0_R = crate::FieldReader; #[doc = "Field `sf_aes_iv_r0_w0` writer - "] -pub struct SF_AES_IV_R0_W0_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_IV_R0_W0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_AES_IV_R0_W0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_IV_R0_W0_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_aes_iv_r0_w0(&self) -> SF_AES_IV_R0_W0_R { - SF_AES_IV_R0_W0_R::new((self.bits & 0xffff_ffff) as u32) + SF_AES_IV_R0_W0_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_aes_iv_r0_w0(&mut self) -> SF_AES_IV_R0_W0_W { - SF_AES_IV_R0_W0_W { w: self } + #[must_use] + pub fn sf_aes_iv_r0_w0(&mut self) -> SF_AES_IV_R0_W0_W<0> { + SF_AES_IV_R0_W0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_AES_IV_R0_W0_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_iv_r0_w0::W](W) writer structure"] impl crate::Writable for SF_AES_IV_R0_W0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_iv_r0_w0 to value 0"] impl crate::Resettable for SF_AES_IV_R0_W0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes_iv_r0_w1.rs b/src/sf_ctrl/sf_aes_iv_r0_w1.rs index 7ba1041..ed43e11 100644 --- a/src/sf_ctrl/sf_aes_iv_r0_w1.rs +++ b/src/sf_ctrl/sf_aes_iv_r0_w1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_aes_iv_r0_w1` reader - "] -pub struct SF_AES_IV_R0_W1_R(crate::FieldReader); -impl SF_AES_IV_R0_W1_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_IV_R0_W1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_IV_R0_W1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_IV_R0_W1_R = crate::FieldReader; #[doc = "Field `sf_aes_iv_r0_w1` writer - "] -pub struct SF_AES_IV_R0_W1_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_IV_R0_W1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_AES_IV_R0_W1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_IV_R0_W1_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_aes_iv_r0_w1(&self) -> SF_AES_IV_R0_W1_R { - SF_AES_IV_R0_W1_R::new((self.bits & 0xffff_ffff) as u32) + SF_AES_IV_R0_W1_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_aes_iv_r0_w1(&mut self) -> SF_AES_IV_R0_W1_W { - SF_AES_IV_R0_W1_W { w: self } + #[must_use] + pub fn sf_aes_iv_r0_w1(&mut self) -> SF_AES_IV_R0_W1_W<0> { + SF_AES_IV_R0_W1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_AES_IV_R0_W1_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_iv_r0_w1::W](W) writer structure"] impl crate::Writable for SF_AES_IV_R0_W1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_iv_r0_w1 to value 0"] impl crate::Resettable for SF_AES_IV_R0_W1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes_iv_r0_w2.rs b/src/sf_ctrl/sf_aes_iv_r0_w2.rs index 7431b35..3fd6dad 100644 --- a/src/sf_ctrl/sf_aes_iv_r0_w2.rs +++ b/src/sf_ctrl/sf_aes_iv_r0_w2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_aes_iv_r0_w2` reader - "] -pub struct SF_AES_IV_R0_W2_R(crate::FieldReader); -impl SF_AES_IV_R0_W2_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_IV_R0_W2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_IV_R0_W2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_IV_R0_W2_R = crate::FieldReader; #[doc = "Field `sf_aes_iv_r0_w2` writer - "] -pub struct SF_AES_IV_R0_W2_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_IV_R0_W2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_AES_IV_R0_W2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_IV_R0_W2_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_aes_iv_r0_w2(&self) -> SF_AES_IV_R0_W2_R { - SF_AES_IV_R0_W2_R::new((self.bits & 0xffff_ffff) as u32) + SF_AES_IV_R0_W2_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_aes_iv_r0_w2(&mut self) -> SF_AES_IV_R0_W2_W { - SF_AES_IV_R0_W2_W { w: self } + #[must_use] + pub fn sf_aes_iv_r0_w2(&mut self) -> SF_AES_IV_R0_W2_W<0> { + SF_AES_IV_R0_W2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_AES_IV_R0_W2_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_iv_r0_w2::W](W) writer structure"] impl crate::Writable for SF_AES_IV_R0_W2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_iv_r0_w2 to value 0"] impl crate::Resettable for SF_AES_IV_R0_W2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes_iv_r0_w3.rs b/src/sf_ctrl/sf_aes_iv_r0_w3.rs index d0a2dcb..cfdfd8d 100644 --- a/src/sf_ctrl/sf_aes_iv_r0_w3.rs +++ b/src/sf_ctrl/sf_aes_iv_r0_w3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_aes_iv_r0_w3` reader - "] -pub struct SF_AES_IV_R0_W3_R(crate::FieldReader); -impl SF_AES_IV_R0_W3_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_IV_R0_W3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_IV_R0_W3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_IV_R0_W3_R = crate::FieldReader; #[doc = "Field `sf_aes_iv_r0_w3` writer - "] -pub struct SF_AES_IV_R0_W3_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_IV_R0_W3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_AES_IV_R0_W3_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_IV_R0_W3_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_aes_iv_r0_w3(&self) -> SF_AES_IV_R0_W3_R { - SF_AES_IV_R0_W3_R::new((self.bits & 0xffff_ffff) as u32) + SF_AES_IV_R0_W3_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_aes_iv_r0_w3(&mut self) -> SF_AES_IV_R0_W3_W { - SF_AES_IV_R0_W3_W { w: self } + #[must_use] + pub fn sf_aes_iv_r0_w3(&mut self) -> SF_AES_IV_R0_W3_W<0> { + SF_AES_IV_R0_W3_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_AES_IV_R0_W3_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_iv_r0_w3::W](W) writer structure"] impl crate::Writable for SF_AES_IV_R0_W3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_iv_r0_w3 to value 0"] impl crate::Resettable for SF_AES_IV_R0_W3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes_iv_r1_w0.rs b/src/sf_ctrl/sf_aes_iv_r1_w0.rs index 28850d2..e72fa87 100644 --- a/src/sf_ctrl/sf_aes_iv_r1_w0.rs +++ b/src/sf_ctrl/sf_aes_iv_r1_w0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_aes_iv_r1_w0` reader - "] -pub struct SF_AES_IV_R1_W0_R(crate::FieldReader); -impl SF_AES_IV_R1_W0_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_IV_R1_W0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_IV_R1_W0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_IV_R1_W0_R = crate::FieldReader; #[doc = "Field `sf_aes_iv_r1_w0` writer - "] -pub struct SF_AES_IV_R1_W0_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_IV_R1_W0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_AES_IV_R1_W0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_IV_R1_W0_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_aes_iv_r1_w0(&self) -> SF_AES_IV_R1_W0_R { - SF_AES_IV_R1_W0_R::new((self.bits & 0xffff_ffff) as u32) + SF_AES_IV_R1_W0_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_aes_iv_r1_w0(&mut self) -> SF_AES_IV_R1_W0_W { - SF_AES_IV_R1_W0_W { w: self } + #[must_use] + pub fn sf_aes_iv_r1_w0(&mut self) -> SF_AES_IV_R1_W0_W<0> { + SF_AES_IV_R1_W0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_AES_IV_R1_W0_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_iv_r1_w0::W](W) writer structure"] impl crate::Writable for SF_AES_IV_R1_W0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_iv_r1_w0 to value 0"] impl crate::Resettable for SF_AES_IV_R1_W0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes_iv_r1_w1.rs b/src/sf_ctrl/sf_aes_iv_r1_w1.rs index 6dd279c..1320093 100644 --- a/src/sf_ctrl/sf_aes_iv_r1_w1.rs +++ b/src/sf_ctrl/sf_aes_iv_r1_w1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_aes_iv_r1_w1` reader - "] -pub struct SF_AES_IV_R1_W1_R(crate::FieldReader); -impl SF_AES_IV_R1_W1_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_IV_R1_W1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_IV_R1_W1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_IV_R1_W1_R = crate::FieldReader; #[doc = "Field `sf_aes_iv_r1_w1` writer - "] -pub struct SF_AES_IV_R1_W1_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_IV_R1_W1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_AES_IV_R1_W1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_IV_R1_W1_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_aes_iv_r1_w1(&self) -> SF_AES_IV_R1_W1_R { - SF_AES_IV_R1_W1_R::new((self.bits & 0xffff_ffff) as u32) + SF_AES_IV_R1_W1_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_aes_iv_r1_w1(&mut self) -> SF_AES_IV_R1_W1_W { - SF_AES_IV_R1_W1_W { w: self } + #[must_use] + pub fn sf_aes_iv_r1_w1(&mut self) -> SF_AES_IV_R1_W1_W<0> { + SF_AES_IV_R1_W1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_AES_IV_R1_W1_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_iv_r1_w1::W](W) writer structure"] impl crate::Writable for SF_AES_IV_R1_W1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_iv_r1_w1 to value 0"] impl crate::Resettable for SF_AES_IV_R1_W1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes_iv_r1_w2.rs b/src/sf_ctrl/sf_aes_iv_r1_w2.rs index cc21a22..3a73ec0 100644 --- a/src/sf_ctrl/sf_aes_iv_r1_w2.rs +++ b/src/sf_ctrl/sf_aes_iv_r1_w2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_aes_iv_r1_w2` reader - "] -pub struct SF_AES_IV_R1_W2_R(crate::FieldReader); -impl SF_AES_IV_R1_W2_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_IV_R1_W2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_IV_R1_W2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_IV_R1_W2_R = crate::FieldReader; #[doc = "Field `sf_aes_iv_r1_w2` writer - "] -pub struct SF_AES_IV_R1_W2_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_IV_R1_W2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_AES_IV_R1_W2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_IV_R1_W2_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_aes_iv_r1_w2(&self) -> SF_AES_IV_R1_W2_R { - SF_AES_IV_R1_W2_R::new((self.bits & 0xffff_ffff) as u32) + SF_AES_IV_R1_W2_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_aes_iv_r1_w2(&mut self) -> SF_AES_IV_R1_W2_W { - SF_AES_IV_R1_W2_W { w: self } + #[must_use] + pub fn sf_aes_iv_r1_w2(&mut self) -> SF_AES_IV_R1_W2_W<0> { + SF_AES_IV_R1_W2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_AES_IV_R1_W2_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_iv_r1_w2::W](W) writer structure"] impl crate::Writable for SF_AES_IV_R1_W2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_iv_r1_w2 to value 0"] impl crate::Resettable for SF_AES_IV_R1_W2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes_iv_r1_w3.rs b/src/sf_ctrl/sf_aes_iv_r1_w3.rs index 52d27ab..36fb970 100644 --- a/src/sf_ctrl/sf_aes_iv_r1_w3.rs +++ b/src/sf_ctrl/sf_aes_iv_r1_w3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_aes_iv_r1_w3` reader - "] -pub struct SF_AES_IV_R1_W3_R(crate::FieldReader); -impl SF_AES_IV_R1_W3_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_IV_R1_W3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_IV_R1_W3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_IV_R1_W3_R = crate::FieldReader; #[doc = "Field `sf_aes_iv_r1_w3` writer - "] -pub struct SF_AES_IV_R1_W3_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_IV_R1_W3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_AES_IV_R1_W3_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_IV_R1_W3_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_aes_iv_r1_w3(&self) -> SF_AES_IV_R1_W3_R { - SF_AES_IV_R1_W3_R::new((self.bits & 0xffff_ffff) as u32) + SF_AES_IV_R1_W3_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_aes_iv_r1_w3(&mut self) -> SF_AES_IV_R1_W3_W { - SF_AES_IV_R1_W3_W { w: self } + #[must_use] + pub fn sf_aes_iv_r1_w3(&mut self) -> SF_AES_IV_R1_W3_W<0> { + SF_AES_IV_R1_W3_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_AES_IV_R1_W3_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_iv_r1_w3::W](W) writer structure"] impl crate::Writable for SF_AES_IV_R1_W3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_iv_r1_w3 to value 0"] impl crate::Resettable for SF_AES_IV_R1_W3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes_iv_r2_w0.rs b/src/sf_ctrl/sf_aes_iv_r2_w0.rs index 9522634..43e0fdd 100644 --- a/src/sf_ctrl/sf_aes_iv_r2_w0.rs +++ b/src/sf_ctrl/sf_aes_iv_r2_w0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_aes_iv_r2_w0` reader - "] -pub struct SF_AES_IV_R2_W0_R(crate::FieldReader); -impl SF_AES_IV_R2_W0_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_IV_R2_W0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_IV_R2_W0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_IV_R2_W0_R = crate::FieldReader; #[doc = "Field `sf_aes_iv_r2_w0` writer - "] -pub struct SF_AES_IV_R2_W0_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_IV_R2_W0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_AES_IV_R2_W0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_IV_R2_W0_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_aes_iv_r2_w0(&self) -> SF_AES_IV_R2_W0_R { - SF_AES_IV_R2_W0_R::new((self.bits & 0xffff_ffff) as u32) + SF_AES_IV_R2_W0_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_aes_iv_r2_w0(&mut self) -> SF_AES_IV_R2_W0_W { - SF_AES_IV_R2_W0_W { w: self } + #[must_use] + pub fn sf_aes_iv_r2_w0(&mut self) -> SF_AES_IV_R2_W0_W<0> { + SF_AES_IV_R2_W0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_AES_IV_R2_W0_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_iv_r2_w0::W](W) writer structure"] impl crate::Writable for SF_AES_IV_R2_W0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_iv_r2_w0 to value 0"] impl crate::Resettable for SF_AES_IV_R2_W0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes_iv_r2_w1.rs b/src/sf_ctrl/sf_aes_iv_r2_w1.rs index 50d6395..bcff6ad 100644 --- a/src/sf_ctrl/sf_aes_iv_r2_w1.rs +++ b/src/sf_ctrl/sf_aes_iv_r2_w1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_aes_iv_r2_w1` reader - "] -pub struct SF_AES_IV_R2_W1_R(crate::FieldReader); -impl SF_AES_IV_R2_W1_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_IV_R2_W1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_IV_R2_W1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_IV_R2_W1_R = crate::FieldReader; #[doc = "Field `sf_aes_iv_r2_w1` writer - "] -pub struct SF_AES_IV_R2_W1_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_IV_R2_W1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_AES_IV_R2_W1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_IV_R2_W1_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_aes_iv_r2_w1(&self) -> SF_AES_IV_R2_W1_R { - SF_AES_IV_R2_W1_R::new((self.bits & 0xffff_ffff) as u32) + SF_AES_IV_R2_W1_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_aes_iv_r2_w1(&mut self) -> SF_AES_IV_R2_W1_W { - SF_AES_IV_R2_W1_W { w: self } + #[must_use] + pub fn sf_aes_iv_r2_w1(&mut self) -> SF_AES_IV_R2_W1_W<0> { + SF_AES_IV_R2_W1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_AES_IV_R2_W1_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_iv_r2_w1::W](W) writer structure"] impl crate::Writable for SF_AES_IV_R2_W1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_iv_r2_w1 to value 0"] impl crate::Resettable for SF_AES_IV_R2_W1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes_iv_r2_w2.rs b/src/sf_ctrl/sf_aes_iv_r2_w2.rs index dadcde7..3a9e333 100644 --- a/src/sf_ctrl/sf_aes_iv_r2_w2.rs +++ b/src/sf_ctrl/sf_aes_iv_r2_w2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_aes_iv_r2_w2` reader - "] -pub struct SF_AES_IV_R2_W2_R(crate::FieldReader); -impl SF_AES_IV_R2_W2_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_IV_R2_W2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_IV_R2_W2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_IV_R2_W2_R = crate::FieldReader; #[doc = "Field `sf_aes_iv_r2_w2` writer - "] -pub struct SF_AES_IV_R2_W2_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_IV_R2_W2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_AES_IV_R2_W2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_IV_R2_W2_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_aes_iv_r2_w2(&self) -> SF_AES_IV_R2_W2_R { - SF_AES_IV_R2_W2_R::new((self.bits & 0xffff_ffff) as u32) + SF_AES_IV_R2_W2_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_aes_iv_r2_w2(&mut self) -> SF_AES_IV_R2_W2_W { - SF_AES_IV_R2_W2_W { w: self } + #[must_use] + pub fn sf_aes_iv_r2_w2(&mut self) -> SF_AES_IV_R2_W2_W<0> { + SF_AES_IV_R2_W2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_AES_IV_R2_W2_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_iv_r2_w2::W](W) writer structure"] impl crate::Writable for SF_AES_IV_R2_W2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_iv_r2_w2 to value 0"] impl crate::Resettable for SF_AES_IV_R2_W2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes_iv_r2_w3.rs b/src/sf_ctrl/sf_aes_iv_r2_w3.rs index b1bfdaf..bc9ee22 100644 --- a/src/sf_ctrl/sf_aes_iv_r2_w3.rs +++ b/src/sf_ctrl/sf_aes_iv_r2_w3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_aes_iv_r2_w3` reader - "] -pub struct SF_AES_IV_R2_W3_R(crate::FieldReader); -impl SF_AES_IV_R2_W3_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_IV_R2_W3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_IV_R2_W3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_IV_R2_W3_R = crate::FieldReader; #[doc = "Field `sf_aes_iv_r2_w3` writer - "] -pub struct SF_AES_IV_R2_W3_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_IV_R2_W3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_AES_IV_R2_W3_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_IV_R2_W3_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_aes_iv_r2_w3(&self) -> SF_AES_IV_R2_W3_R { - SF_AES_IV_R2_W3_R::new((self.bits & 0xffff_ffff) as u32) + SF_AES_IV_R2_W3_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_aes_iv_r2_w3(&mut self) -> SF_AES_IV_R2_W3_W { - SF_AES_IV_R2_W3_W { w: self } + #[must_use] + pub fn sf_aes_iv_r2_w3(&mut self) -> SF_AES_IV_R2_W3_W<0> { + SF_AES_IV_R2_W3_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_AES_IV_R2_W3_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_iv_r2_w3::W](W) writer structure"] impl crate::Writable for SF_AES_IV_R2_W3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_iv_r2_w3 to value 0"] impl crate::Resettable for SF_AES_IV_R2_W3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes_key_r0_0.rs b/src/sf_ctrl/sf_aes_key_r0_0.rs index d148917..72f8520 100644 --- a/src/sf_ctrl/sf_aes_key_r0_0.rs +++ b/src/sf_ctrl/sf_aes_key_r0_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_aes_key_r0_0` reader - "] -pub struct SF_AES_KEY_R0_0_R(crate::FieldReader); -impl SF_AES_KEY_R0_0_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_KEY_R0_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_KEY_R0_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_KEY_R0_0_R = crate::FieldReader; #[doc = "Field `sf_aes_key_r0_0` writer - "] -pub struct SF_AES_KEY_R0_0_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_KEY_R0_0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_AES_KEY_R0_0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_KEY_R0_0_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_aes_key_r0_0(&self) -> SF_AES_KEY_R0_0_R { - SF_AES_KEY_R0_0_R::new((self.bits & 0xffff_ffff) as u32) + SF_AES_KEY_R0_0_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_aes_key_r0_0(&mut self) -> SF_AES_KEY_R0_0_W { - SF_AES_KEY_R0_0_W { w: self } + #[must_use] + pub fn sf_aes_key_r0_0(&mut self) -> SF_AES_KEY_R0_0_W<0> { + SF_AES_KEY_R0_0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_AES_KEY_R0_0_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_key_r0_0::W](W) writer structure"] impl crate::Writable for SF_AES_KEY_R0_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_key_r0_0 to value 0"] impl crate::Resettable for SF_AES_KEY_R0_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes_key_r0_1.rs b/src/sf_ctrl/sf_aes_key_r0_1.rs index 2fb07b4..5a854bf 100644 --- a/src/sf_ctrl/sf_aes_key_r0_1.rs +++ b/src/sf_ctrl/sf_aes_key_r0_1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_aes_key_r0_1` reader - "] -pub struct SF_AES_KEY_R0_1_R(crate::FieldReader); -impl SF_AES_KEY_R0_1_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_KEY_R0_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_KEY_R0_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_KEY_R0_1_R = crate::FieldReader; #[doc = "Field `sf_aes_key_r0_1` writer - "] -pub struct SF_AES_KEY_R0_1_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_KEY_R0_1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_AES_KEY_R0_1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_KEY_R0_1_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_aes_key_r0_1(&self) -> SF_AES_KEY_R0_1_R { - SF_AES_KEY_R0_1_R::new((self.bits & 0xffff_ffff) as u32) + SF_AES_KEY_R0_1_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_aes_key_r0_1(&mut self) -> SF_AES_KEY_R0_1_W { - SF_AES_KEY_R0_1_W { w: self } + #[must_use] + pub fn sf_aes_key_r0_1(&mut self) -> SF_AES_KEY_R0_1_W<0> { + SF_AES_KEY_R0_1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_AES_KEY_R0_1_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_key_r0_1::W](W) writer structure"] impl crate::Writable for SF_AES_KEY_R0_1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_key_r0_1 to value 0"] impl crate::Resettable for SF_AES_KEY_R0_1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes_key_r0_2.rs b/src/sf_ctrl/sf_aes_key_r0_2.rs index 5fac4be..121e03b 100644 --- a/src/sf_ctrl/sf_aes_key_r0_2.rs +++ b/src/sf_ctrl/sf_aes_key_r0_2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_aes_key_r0_2` reader - "] -pub struct SF_AES_KEY_R0_2_R(crate::FieldReader); -impl SF_AES_KEY_R0_2_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_KEY_R0_2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_KEY_R0_2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_KEY_R0_2_R = crate::FieldReader; #[doc = "Field `sf_aes_key_r0_2` writer - "] -pub struct SF_AES_KEY_R0_2_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_KEY_R0_2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_AES_KEY_R0_2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_KEY_R0_2_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_aes_key_r0_2(&self) -> SF_AES_KEY_R0_2_R { - SF_AES_KEY_R0_2_R::new((self.bits & 0xffff_ffff) as u32) + SF_AES_KEY_R0_2_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_aes_key_r0_2(&mut self) -> SF_AES_KEY_R0_2_W { - SF_AES_KEY_R0_2_W { w: self } + #[must_use] + pub fn sf_aes_key_r0_2(&mut self) -> SF_AES_KEY_R0_2_W<0> { + SF_AES_KEY_R0_2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_AES_KEY_R0_2_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_key_r0_2::W](W) writer structure"] impl crate::Writable for SF_AES_KEY_R0_2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_key_r0_2 to value 0"] impl crate::Resettable for SF_AES_KEY_R0_2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes_key_r0_3.rs b/src/sf_ctrl/sf_aes_key_r0_3.rs index cf9a5ce..5731fe9 100644 --- a/src/sf_ctrl/sf_aes_key_r0_3.rs +++ b/src/sf_ctrl/sf_aes_key_r0_3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_aes_key_r0_3` reader - "] -pub struct SF_AES_KEY_R0_3_R(crate::FieldReader); -impl SF_AES_KEY_R0_3_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_KEY_R0_3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_KEY_R0_3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_KEY_R0_3_R = crate::FieldReader; #[doc = "Field `sf_aes_key_r0_3` writer - "] -pub struct SF_AES_KEY_R0_3_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_KEY_R0_3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_AES_KEY_R0_3_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_KEY_R0_3_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_aes_key_r0_3(&self) -> SF_AES_KEY_R0_3_R { - SF_AES_KEY_R0_3_R::new((self.bits & 0xffff_ffff) as u32) + SF_AES_KEY_R0_3_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_aes_key_r0_3(&mut self) -> SF_AES_KEY_R0_3_W { - SF_AES_KEY_R0_3_W { w: self } + #[must_use] + pub fn sf_aes_key_r0_3(&mut self) -> SF_AES_KEY_R0_3_W<0> { + SF_AES_KEY_R0_3_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_AES_KEY_R0_3_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_key_r0_3::W](W) writer structure"] impl crate::Writable for SF_AES_KEY_R0_3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_key_r0_3 to value 0"] impl crate::Resettable for SF_AES_KEY_R0_3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes_key_r0_4.rs b/src/sf_ctrl/sf_aes_key_r0_4.rs index d29a9d8..929466b 100644 --- a/src/sf_ctrl/sf_aes_key_r0_4.rs +++ b/src/sf_ctrl/sf_aes_key_r0_4.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_aes_key_r0_4` reader - "] -pub struct SF_AES_KEY_R0_4_R(crate::FieldReader); -impl SF_AES_KEY_R0_4_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_KEY_R0_4_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_KEY_R0_4_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_KEY_R0_4_R = crate::FieldReader; #[doc = "Field `sf_aes_key_r0_4` writer - "] -pub struct SF_AES_KEY_R0_4_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_KEY_R0_4_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_AES_KEY_R0_4_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_KEY_R0_4_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_aes_key_r0_4(&self) -> SF_AES_KEY_R0_4_R { - SF_AES_KEY_R0_4_R::new((self.bits & 0xffff_ffff) as u32) + SF_AES_KEY_R0_4_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_aes_key_r0_4(&mut self) -> SF_AES_KEY_R0_4_W { - SF_AES_KEY_R0_4_W { w: self } + #[must_use] + pub fn sf_aes_key_r0_4(&mut self) -> SF_AES_KEY_R0_4_W<0> { + SF_AES_KEY_R0_4_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_AES_KEY_R0_4_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_key_r0_4::W](W) writer structure"] impl crate::Writable for SF_AES_KEY_R0_4_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_key_r0_4 to value 0"] impl crate::Resettable for SF_AES_KEY_R0_4_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes_key_r0_5.rs b/src/sf_ctrl/sf_aes_key_r0_5.rs index de80a3e..3b960ac 100644 --- a/src/sf_ctrl/sf_aes_key_r0_5.rs +++ b/src/sf_ctrl/sf_aes_key_r0_5.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_aes_key_r0_5` reader - "] -pub struct SF_AES_KEY_R0_5_R(crate::FieldReader); -impl SF_AES_KEY_R0_5_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_KEY_R0_5_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_KEY_R0_5_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_KEY_R0_5_R = crate::FieldReader; #[doc = "Field `sf_aes_key_r0_5` writer - "] -pub struct SF_AES_KEY_R0_5_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_KEY_R0_5_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_AES_KEY_R0_5_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_KEY_R0_5_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_aes_key_r0_5(&self) -> SF_AES_KEY_R0_5_R { - SF_AES_KEY_R0_5_R::new((self.bits & 0xffff_ffff) as u32) + SF_AES_KEY_R0_5_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_aes_key_r0_5(&mut self) -> SF_AES_KEY_R0_5_W { - SF_AES_KEY_R0_5_W { w: self } + #[must_use] + pub fn sf_aes_key_r0_5(&mut self) -> SF_AES_KEY_R0_5_W<0> { + SF_AES_KEY_R0_5_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_AES_KEY_R0_5_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_key_r0_5::W](W) writer structure"] impl crate::Writable for SF_AES_KEY_R0_5_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_key_r0_5 to value 0"] impl crate::Resettable for SF_AES_KEY_R0_5_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes_key_r0_6.rs b/src/sf_ctrl/sf_aes_key_r0_6.rs index 3f9f135..6ea49fa 100644 --- a/src/sf_ctrl/sf_aes_key_r0_6.rs +++ b/src/sf_ctrl/sf_aes_key_r0_6.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_aes_key_r0_6` reader - "] -pub struct SF_AES_KEY_R0_6_R(crate::FieldReader); -impl SF_AES_KEY_R0_6_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_KEY_R0_6_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_KEY_R0_6_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_KEY_R0_6_R = crate::FieldReader; #[doc = "Field `sf_aes_key_r0_6` writer - "] -pub struct SF_AES_KEY_R0_6_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_KEY_R0_6_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_AES_KEY_R0_6_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_KEY_R0_6_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_aes_key_r0_6(&self) -> SF_AES_KEY_R0_6_R { - SF_AES_KEY_R0_6_R::new((self.bits & 0xffff_ffff) as u32) + SF_AES_KEY_R0_6_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_aes_key_r0_6(&mut self) -> SF_AES_KEY_R0_6_W { - SF_AES_KEY_R0_6_W { w: self } + #[must_use] + pub fn sf_aes_key_r0_6(&mut self) -> SF_AES_KEY_R0_6_W<0> { + SF_AES_KEY_R0_6_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_AES_KEY_R0_6_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_key_r0_6::W](W) writer structure"] impl crate::Writable for SF_AES_KEY_R0_6_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_key_r0_6 to value 0"] impl crate::Resettable for SF_AES_KEY_R0_6_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes_key_r0_7.rs b/src/sf_ctrl/sf_aes_key_r0_7.rs index f8cf8f0..ccd2dc2 100644 --- a/src/sf_ctrl/sf_aes_key_r0_7.rs +++ b/src/sf_ctrl/sf_aes_key_r0_7.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_aes_key_r0_7` reader - "] -pub struct SF_AES_KEY_R0_7_R(crate::FieldReader); -impl SF_AES_KEY_R0_7_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_KEY_R0_7_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_KEY_R0_7_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_KEY_R0_7_R = crate::FieldReader; #[doc = "Field `sf_aes_key_r0_7` writer - "] -pub struct SF_AES_KEY_R0_7_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_KEY_R0_7_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_AES_KEY_R0_7_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_KEY_R0_7_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_aes_key_r0_7(&self) -> SF_AES_KEY_R0_7_R { - SF_AES_KEY_R0_7_R::new((self.bits & 0xffff_ffff) as u32) + SF_AES_KEY_R0_7_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_aes_key_r0_7(&mut self) -> SF_AES_KEY_R0_7_W { - SF_AES_KEY_R0_7_W { w: self } + #[must_use] + pub fn sf_aes_key_r0_7(&mut self) -> SF_AES_KEY_R0_7_W<0> { + SF_AES_KEY_R0_7_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_AES_KEY_R0_7_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_key_r0_7::W](W) writer structure"] impl crate::Writable for SF_AES_KEY_R0_7_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_key_r0_7 to value 0"] impl crate::Resettable for SF_AES_KEY_R0_7_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes_key_r1_0.rs b/src/sf_ctrl/sf_aes_key_r1_0.rs index 21b3e2a..1da037c 100644 --- a/src/sf_ctrl/sf_aes_key_r1_0.rs +++ b/src/sf_ctrl/sf_aes_key_r1_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_aes_key_r1_0` reader - "] -pub struct SF_AES_KEY_R1_0_R(crate::FieldReader); -impl SF_AES_KEY_R1_0_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_KEY_R1_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_KEY_R1_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_KEY_R1_0_R = crate::FieldReader; #[doc = "Field `sf_aes_key_r1_0` writer - "] -pub struct SF_AES_KEY_R1_0_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_KEY_R1_0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_AES_KEY_R1_0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_KEY_R1_0_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_aes_key_r1_0(&self) -> SF_AES_KEY_R1_0_R { - SF_AES_KEY_R1_0_R::new((self.bits & 0xffff_ffff) as u32) + SF_AES_KEY_R1_0_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_aes_key_r1_0(&mut self) -> SF_AES_KEY_R1_0_W { - SF_AES_KEY_R1_0_W { w: self } + #[must_use] + pub fn sf_aes_key_r1_0(&mut self) -> SF_AES_KEY_R1_0_W<0> { + SF_AES_KEY_R1_0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_AES_KEY_R1_0_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_key_r1_0::W](W) writer structure"] impl crate::Writable for SF_AES_KEY_R1_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_key_r1_0 to value 0"] impl crate::Resettable for SF_AES_KEY_R1_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes_key_r1_1.rs b/src/sf_ctrl/sf_aes_key_r1_1.rs index 20237bf..7650a40 100644 --- a/src/sf_ctrl/sf_aes_key_r1_1.rs +++ b/src/sf_ctrl/sf_aes_key_r1_1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_aes_key_r1_1` reader - "] -pub struct SF_AES_KEY_R1_1_R(crate::FieldReader); -impl SF_AES_KEY_R1_1_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_KEY_R1_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_KEY_R1_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_KEY_R1_1_R = crate::FieldReader; #[doc = "Field `sf_aes_key_r1_1` writer - "] -pub struct SF_AES_KEY_R1_1_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_KEY_R1_1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_AES_KEY_R1_1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_KEY_R1_1_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_aes_key_r1_1(&self) -> SF_AES_KEY_R1_1_R { - SF_AES_KEY_R1_1_R::new((self.bits & 0xffff_ffff) as u32) + SF_AES_KEY_R1_1_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_aes_key_r1_1(&mut self) -> SF_AES_KEY_R1_1_W { - SF_AES_KEY_R1_1_W { w: self } + #[must_use] + pub fn sf_aes_key_r1_1(&mut self) -> SF_AES_KEY_R1_1_W<0> { + SF_AES_KEY_R1_1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_AES_KEY_R1_1_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_key_r1_1::W](W) writer structure"] impl crate::Writable for SF_AES_KEY_R1_1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_key_r1_1 to value 0"] impl crate::Resettable for SF_AES_KEY_R1_1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes_key_r1_2.rs b/src/sf_ctrl/sf_aes_key_r1_2.rs index 6c98118..485723e 100644 --- a/src/sf_ctrl/sf_aes_key_r1_2.rs +++ b/src/sf_ctrl/sf_aes_key_r1_2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_aes_key_r1_2` reader - "] -pub struct SF_AES_KEY_R1_2_R(crate::FieldReader); -impl SF_AES_KEY_R1_2_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_KEY_R1_2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_KEY_R1_2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_KEY_R1_2_R = crate::FieldReader; #[doc = "Field `sf_aes_key_r1_2` writer - "] -pub struct SF_AES_KEY_R1_2_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_KEY_R1_2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_AES_KEY_R1_2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_KEY_R1_2_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_aes_key_r1_2(&self) -> SF_AES_KEY_R1_2_R { - SF_AES_KEY_R1_2_R::new((self.bits & 0xffff_ffff) as u32) + SF_AES_KEY_R1_2_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_aes_key_r1_2(&mut self) -> SF_AES_KEY_R1_2_W { - SF_AES_KEY_R1_2_W { w: self } + #[must_use] + pub fn sf_aes_key_r1_2(&mut self) -> SF_AES_KEY_R1_2_W<0> { + SF_AES_KEY_R1_2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_AES_KEY_R1_2_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_key_r1_2::W](W) writer structure"] impl crate::Writable for SF_AES_KEY_R1_2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_key_r1_2 to value 0"] impl crate::Resettable for SF_AES_KEY_R1_2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes_key_r1_3.rs b/src/sf_ctrl/sf_aes_key_r1_3.rs index 2306d8e..d6712c3 100644 --- a/src/sf_ctrl/sf_aes_key_r1_3.rs +++ b/src/sf_ctrl/sf_aes_key_r1_3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_aes_key_r1_3` reader - "] -pub struct SF_AES_KEY_R1_3_R(crate::FieldReader); -impl SF_AES_KEY_R1_3_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_KEY_R1_3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_KEY_R1_3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_KEY_R1_3_R = crate::FieldReader; #[doc = "Field `sf_aes_key_r1_3` writer - "] -pub struct SF_AES_KEY_R1_3_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_KEY_R1_3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_AES_KEY_R1_3_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_KEY_R1_3_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_aes_key_r1_3(&self) -> SF_AES_KEY_R1_3_R { - SF_AES_KEY_R1_3_R::new((self.bits & 0xffff_ffff) as u32) + SF_AES_KEY_R1_3_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_aes_key_r1_3(&mut self) -> SF_AES_KEY_R1_3_W { - SF_AES_KEY_R1_3_W { w: self } + #[must_use] + pub fn sf_aes_key_r1_3(&mut self) -> SF_AES_KEY_R1_3_W<0> { + SF_AES_KEY_R1_3_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_AES_KEY_R1_3_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_key_r1_3::W](W) writer structure"] impl crate::Writable for SF_AES_KEY_R1_3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_key_r1_3 to value 0"] impl crate::Resettable for SF_AES_KEY_R1_3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes_key_r1_4.rs b/src/sf_ctrl/sf_aes_key_r1_4.rs index affd3b3..dbadfb0 100644 --- a/src/sf_ctrl/sf_aes_key_r1_4.rs +++ b/src/sf_ctrl/sf_aes_key_r1_4.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_aes_key_r1_4` reader - "] -pub struct SF_AES_KEY_R1_4_R(crate::FieldReader); -impl SF_AES_KEY_R1_4_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_KEY_R1_4_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_KEY_R1_4_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_KEY_R1_4_R = crate::FieldReader; #[doc = "Field `sf_aes_key_r1_4` writer - "] -pub struct SF_AES_KEY_R1_4_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_KEY_R1_4_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_AES_KEY_R1_4_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_KEY_R1_4_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_aes_key_r1_4(&self) -> SF_AES_KEY_R1_4_R { - SF_AES_KEY_R1_4_R::new((self.bits & 0xffff_ffff) as u32) + SF_AES_KEY_R1_4_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_aes_key_r1_4(&mut self) -> SF_AES_KEY_R1_4_W { - SF_AES_KEY_R1_4_W { w: self } + #[must_use] + pub fn sf_aes_key_r1_4(&mut self) -> SF_AES_KEY_R1_4_W<0> { + SF_AES_KEY_R1_4_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_AES_KEY_R1_4_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_key_r1_4::W](W) writer structure"] impl crate::Writable for SF_AES_KEY_R1_4_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_key_r1_4 to value 0"] impl crate::Resettable for SF_AES_KEY_R1_4_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes_key_r1_5.rs b/src/sf_ctrl/sf_aes_key_r1_5.rs index 382c926..4037124 100644 --- a/src/sf_ctrl/sf_aes_key_r1_5.rs +++ b/src/sf_ctrl/sf_aes_key_r1_5.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_aes_key_r1_5` reader - "] -pub struct SF_AES_KEY_R1_5_R(crate::FieldReader); -impl SF_AES_KEY_R1_5_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_KEY_R1_5_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_KEY_R1_5_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_KEY_R1_5_R = crate::FieldReader; #[doc = "Field `sf_aes_key_r1_5` writer - "] -pub struct SF_AES_KEY_R1_5_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_KEY_R1_5_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_AES_KEY_R1_5_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_KEY_R1_5_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_aes_key_r1_5(&self) -> SF_AES_KEY_R1_5_R { - SF_AES_KEY_R1_5_R::new((self.bits & 0xffff_ffff) as u32) + SF_AES_KEY_R1_5_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_aes_key_r1_5(&mut self) -> SF_AES_KEY_R1_5_W { - SF_AES_KEY_R1_5_W { w: self } + #[must_use] + pub fn sf_aes_key_r1_5(&mut self) -> SF_AES_KEY_R1_5_W<0> { + SF_AES_KEY_R1_5_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_AES_KEY_R1_5_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_key_r1_5::W](W) writer structure"] impl crate::Writable for SF_AES_KEY_R1_5_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_key_r1_5 to value 0"] impl crate::Resettable for SF_AES_KEY_R1_5_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes_key_r1_6.rs b/src/sf_ctrl/sf_aes_key_r1_6.rs index c6cdae3..9585df6 100644 --- a/src/sf_ctrl/sf_aes_key_r1_6.rs +++ b/src/sf_ctrl/sf_aes_key_r1_6.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_aes_key_r1_6` reader - "] -pub struct SF_AES_KEY_R1_6_R(crate::FieldReader); -impl SF_AES_KEY_R1_6_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_KEY_R1_6_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_KEY_R1_6_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_KEY_R1_6_R = crate::FieldReader; #[doc = "Field `sf_aes_key_r1_6` writer - "] -pub struct SF_AES_KEY_R1_6_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_KEY_R1_6_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_AES_KEY_R1_6_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_KEY_R1_6_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_aes_key_r1_6(&self) -> SF_AES_KEY_R1_6_R { - SF_AES_KEY_R1_6_R::new((self.bits & 0xffff_ffff) as u32) + SF_AES_KEY_R1_6_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_aes_key_r1_6(&mut self) -> SF_AES_KEY_R1_6_W { - SF_AES_KEY_R1_6_W { w: self } + #[must_use] + pub fn sf_aes_key_r1_6(&mut self) -> SF_AES_KEY_R1_6_W<0> { + SF_AES_KEY_R1_6_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_AES_KEY_R1_6_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_key_r1_6::W](W) writer structure"] impl crate::Writable for SF_AES_KEY_R1_6_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_key_r1_6 to value 0"] impl crate::Resettable for SF_AES_KEY_R1_6_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes_key_r1_7.rs b/src/sf_ctrl/sf_aes_key_r1_7.rs index 7b7c52e..60e6e8c 100644 --- a/src/sf_ctrl/sf_aes_key_r1_7.rs +++ b/src/sf_ctrl/sf_aes_key_r1_7.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_aes_key_r1_7` reader - "] -pub struct SF_AES_KEY_R1_7_R(crate::FieldReader); -impl SF_AES_KEY_R1_7_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_KEY_R1_7_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_KEY_R1_7_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_KEY_R1_7_R = crate::FieldReader; #[doc = "Field `sf_aes_key_r1_7` writer - "] -pub struct SF_AES_KEY_R1_7_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_KEY_R1_7_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_AES_KEY_R1_7_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_KEY_R1_7_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_aes_key_r1_7(&self) -> SF_AES_KEY_R1_7_R { - SF_AES_KEY_R1_7_R::new((self.bits & 0xffff_ffff) as u32) + SF_AES_KEY_R1_7_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_aes_key_r1_7(&mut self) -> SF_AES_KEY_R1_7_W { - SF_AES_KEY_R1_7_W { w: self } + #[must_use] + pub fn sf_aes_key_r1_7(&mut self) -> SF_AES_KEY_R1_7_W<0> { + SF_AES_KEY_R1_7_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_AES_KEY_R1_7_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_key_r1_7::W](W) writer structure"] impl crate::Writable for SF_AES_KEY_R1_7_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_key_r1_7 to value 0"] impl crate::Resettable for SF_AES_KEY_R1_7_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes_key_r2_0.rs b/src/sf_ctrl/sf_aes_key_r2_0.rs index 7d0fa5e..87551e8 100644 --- a/src/sf_ctrl/sf_aes_key_r2_0.rs +++ b/src/sf_ctrl/sf_aes_key_r2_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_aes_key_r2_0` reader - "] -pub struct SF_AES_KEY_R2_0_R(crate::FieldReader); -impl SF_AES_KEY_R2_0_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_KEY_R2_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_KEY_R2_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_KEY_R2_0_R = crate::FieldReader; #[doc = "Field `sf_aes_key_r2_0` writer - "] -pub struct SF_AES_KEY_R2_0_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_KEY_R2_0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_AES_KEY_R2_0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_KEY_R2_0_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_aes_key_r2_0(&self) -> SF_AES_KEY_R2_0_R { - SF_AES_KEY_R2_0_R::new((self.bits & 0xffff_ffff) as u32) + SF_AES_KEY_R2_0_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_aes_key_r2_0(&mut self) -> SF_AES_KEY_R2_0_W { - SF_AES_KEY_R2_0_W { w: self } + #[must_use] + pub fn sf_aes_key_r2_0(&mut self) -> SF_AES_KEY_R2_0_W<0> { + SF_AES_KEY_R2_0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_AES_KEY_R2_0_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_key_r2_0::W](W) writer structure"] impl crate::Writable for SF_AES_KEY_R2_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_key_r2_0 to value 0"] impl crate::Resettable for SF_AES_KEY_R2_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes_key_r2_1.rs b/src/sf_ctrl/sf_aes_key_r2_1.rs index 0ef7b21..d586d23 100644 --- a/src/sf_ctrl/sf_aes_key_r2_1.rs +++ b/src/sf_ctrl/sf_aes_key_r2_1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_aes_key_r2_1` reader - "] -pub struct SF_AES_KEY_R2_1_R(crate::FieldReader); -impl SF_AES_KEY_R2_1_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_KEY_R2_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_KEY_R2_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_KEY_R2_1_R = crate::FieldReader; #[doc = "Field `sf_aes_key_r2_1` writer - "] -pub struct SF_AES_KEY_R2_1_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_KEY_R2_1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_AES_KEY_R2_1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_KEY_R2_1_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_aes_key_r2_1(&self) -> SF_AES_KEY_R2_1_R { - SF_AES_KEY_R2_1_R::new((self.bits & 0xffff_ffff) as u32) + SF_AES_KEY_R2_1_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_aes_key_r2_1(&mut self) -> SF_AES_KEY_R2_1_W { - SF_AES_KEY_R2_1_W { w: self } + #[must_use] + pub fn sf_aes_key_r2_1(&mut self) -> SF_AES_KEY_R2_1_W<0> { + SF_AES_KEY_R2_1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_AES_KEY_R2_1_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_key_r2_1::W](W) writer structure"] impl crate::Writable for SF_AES_KEY_R2_1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_key_r2_1 to value 0"] impl crate::Resettable for SF_AES_KEY_R2_1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes_key_r2_2.rs b/src/sf_ctrl/sf_aes_key_r2_2.rs index 5c42e92..43bbb2b 100644 --- a/src/sf_ctrl/sf_aes_key_r2_2.rs +++ b/src/sf_ctrl/sf_aes_key_r2_2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_aes_key_r2_2` reader - "] -pub struct SF_AES_KEY_R2_2_R(crate::FieldReader); -impl SF_AES_KEY_R2_2_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_KEY_R2_2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_KEY_R2_2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_KEY_R2_2_R = crate::FieldReader; #[doc = "Field `sf_aes_key_r2_2` writer - "] -pub struct SF_AES_KEY_R2_2_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_KEY_R2_2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_AES_KEY_R2_2_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_KEY_R2_2_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_aes_key_r2_2(&self) -> SF_AES_KEY_R2_2_R { - SF_AES_KEY_R2_2_R::new((self.bits & 0xffff_ffff) as u32) + SF_AES_KEY_R2_2_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_aes_key_r2_2(&mut self) -> SF_AES_KEY_R2_2_W { - SF_AES_KEY_R2_2_W { w: self } + #[must_use] + pub fn sf_aes_key_r2_2(&mut self) -> SF_AES_KEY_R2_2_W<0> { + SF_AES_KEY_R2_2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_AES_KEY_R2_2_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_key_r2_2::W](W) writer structure"] impl crate::Writable for SF_AES_KEY_R2_2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_key_r2_2 to value 0"] impl crate::Resettable for SF_AES_KEY_R2_2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes_key_r2_3.rs b/src/sf_ctrl/sf_aes_key_r2_3.rs index 9dc08d7..2d25d9d 100644 --- a/src/sf_ctrl/sf_aes_key_r2_3.rs +++ b/src/sf_ctrl/sf_aes_key_r2_3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_aes_key_r2_3` reader - "] -pub struct SF_AES_KEY_R2_3_R(crate::FieldReader); -impl SF_AES_KEY_R2_3_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_KEY_R2_3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_KEY_R2_3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_KEY_R2_3_R = crate::FieldReader; #[doc = "Field `sf_aes_key_r2_3` writer - "] -pub struct SF_AES_KEY_R2_3_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_KEY_R2_3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_AES_KEY_R2_3_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_KEY_R2_3_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_aes_key_r2_3(&self) -> SF_AES_KEY_R2_3_R { - SF_AES_KEY_R2_3_R::new((self.bits & 0xffff_ffff) as u32) + SF_AES_KEY_R2_3_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_aes_key_r2_3(&mut self) -> SF_AES_KEY_R2_3_W { - SF_AES_KEY_R2_3_W { w: self } + #[must_use] + pub fn sf_aes_key_r2_3(&mut self) -> SF_AES_KEY_R2_3_W<0> { + SF_AES_KEY_R2_3_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_AES_KEY_R2_3_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_key_r2_3::W](W) writer structure"] impl crate::Writable for SF_AES_KEY_R2_3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_key_r2_3 to value 0"] impl crate::Resettable for SF_AES_KEY_R2_3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes_key_r2_4.rs b/src/sf_ctrl/sf_aes_key_r2_4.rs index 3c86915..4d198a2 100644 --- a/src/sf_ctrl/sf_aes_key_r2_4.rs +++ b/src/sf_ctrl/sf_aes_key_r2_4.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_aes_key_r2_4` reader - "] -pub struct SF_AES_KEY_R2_4_R(crate::FieldReader); -impl SF_AES_KEY_R2_4_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_KEY_R2_4_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_KEY_R2_4_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_KEY_R2_4_R = crate::FieldReader; #[doc = "Field `sf_aes_key_r2_4` writer - "] -pub struct SF_AES_KEY_R2_4_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_KEY_R2_4_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_AES_KEY_R2_4_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_KEY_R2_4_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_aes_key_r2_4(&self) -> SF_AES_KEY_R2_4_R { - SF_AES_KEY_R2_4_R::new((self.bits & 0xffff_ffff) as u32) + SF_AES_KEY_R2_4_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_aes_key_r2_4(&mut self) -> SF_AES_KEY_R2_4_W { - SF_AES_KEY_R2_4_W { w: self } + #[must_use] + pub fn sf_aes_key_r2_4(&mut self) -> SF_AES_KEY_R2_4_W<0> { + SF_AES_KEY_R2_4_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_AES_KEY_R2_4_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_key_r2_4::W](W) writer structure"] impl crate::Writable for SF_AES_KEY_R2_4_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_key_r2_4 to value 0"] impl crate::Resettable for SF_AES_KEY_R2_4_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes_key_r2_5.rs b/src/sf_ctrl/sf_aes_key_r2_5.rs index d9a35f0..c0c6883 100644 --- a/src/sf_ctrl/sf_aes_key_r2_5.rs +++ b/src/sf_ctrl/sf_aes_key_r2_5.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_aes_key_r2_5` reader - "] -pub struct SF_AES_KEY_R2_5_R(crate::FieldReader); -impl SF_AES_KEY_R2_5_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_KEY_R2_5_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_KEY_R2_5_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_KEY_R2_5_R = crate::FieldReader; #[doc = "Field `sf_aes_key_r2_5` writer - "] -pub struct SF_AES_KEY_R2_5_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_KEY_R2_5_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_AES_KEY_R2_5_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_KEY_R2_5_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_aes_key_r2_5(&self) -> SF_AES_KEY_R2_5_R { - SF_AES_KEY_R2_5_R::new((self.bits & 0xffff_ffff) as u32) + SF_AES_KEY_R2_5_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_aes_key_r2_5(&mut self) -> SF_AES_KEY_R2_5_W { - SF_AES_KEY_R2_5_W { w: self } + #[must_use] + pub fn sf_aes_key_r2_5(&mut self) -> SF_AES_KEY_R2_5_W<0> { + SF_AES_KEY_R2_5_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_AES_KEY_R2_5_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_key_r2_5::W](W) writer structure"] impl crate::Writable for SF_AES_KEY_R2_5_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_key_r2_5 to value 0"] impl crate::Resettable for SF_AES_KEY_R2_5_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes_key_r2_6.rs b/src/sf_ctrl/sf_aes_key_r2_6.rs index 92262c4..4b62dab 100644 --- a/src/sf_ctrl/sf_aes_key_r2_6.rs +++ b/src/sf_ctrl/sf_aes_key_r2_6.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_aes_key_r2_6` reader - "] -pub struct SF_AES_KEY_R2_6_R(crate::FieldReader); -impl SF_AES_KEY_R2_6_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_KEY_R2_6_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_KEY_R2_6_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_KEY_R2_6_R = crate::FieldReader; #[doc = "Field `sf_aes_key_r2_6` writer - "] -pub struct SF_AES_KEY_R2_6_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_KEY_R2_6_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_AES_KEY_R2_6_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_KEY_R2_6_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_aes_key_r2_6(&self) -> SF_AES_KEY_R2_6_R { - SF_AES_KEY_R2_6_R::new((self.bits & 0xffff_ffff) as u32) + SF_AES_KEY_R2_6_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_aes_key_r2_6(&mut self) -> SF_AES_KEY_R2_6_W { - SF_AES_KEY_R2_6_W { w: self } + #[must_use] + pub fn sf_aes_key_r2_6(&mut self) -> SF_AES_KEY_R2_6_W<0> { + SF_AES_KEY_R2_6_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_AES_KEY_R2_6_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_key_r2_6::W](W) writer structure"] impl crate::Writable for SF_AES_KEY_R2_6_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_key_r2_6 to value 0"] impl crate::Resettable for SF_AES_KEY_R2_6_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes_key_r2_7.rs b/src/sf_ctrl/sf_aes_key_r2_7.rs index 9706207..0b93b71 100644 --- a/src/sf_ctrl/sf_aes_key_r2_7.rs +++ b/src/sf_ctrl/sf_aes_key_r2_7.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_aes_key_r2_7` reader - "] -pub struct SF_AES_KEY_R2_7_R(crate::FieldReader); -impl SF_AES_KEY_R2_7_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AES_KEY_R2_7_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_KEY_R2_7_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_KEY_R2_7_R = crate::FieldReader; #[doc = "Field `sf_aes_key_r2_7` writer - "] -pub struct SF_AES_KEY_R2_7_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_KEY_R2_7_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_AES_KEY_R2_7_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_KEY_R2_7_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_aes_key_r2_7(&self) -> SF_AES_KEY_R2_7_R { - SF_AES_KEY_R2_7_R::new((self.bits & 0xffff_ffff) as u32) + SF_AES_KEY_R2_7_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_aes_key_r2_7(&mut self) -> SF_AES_KEY_R2_7_W { - SF_AES_KEY_R2_7_W { w: self } + #[must_use] + pub fn sf_aes_key_r2_7(&mut self) -> SF_AES_KEY_R2_7_W<0> { + SF_AES_KEY_R2_7_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_AES_KEY_R2_7_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_key_r2_7::W](W) writer structure"] impl crate::Writable for SF_AES_KEY_R2_7_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_key_r2_7 to value 0"] impl crate::Resettable for SF_AES_KEY_R2_7_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_aes_r1.rs b/src/sf_ctrl/sf_aes_r1.rs index c47ec3e..fe21ce5 100644 --- a/src/sf_ctrl/sf_aes_r1.rs +++ b/src/sf_ctrl/sf_aes_r1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,225 +28,95 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `sf_aes_r1_lock` reader - "] -pub struct SF_AES_R1_LOCK_R(crate::FieldReader); -impl SF_AES_R1_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - SF_AES_R1_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_R1_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_aes_r1_lock` writer - "] -pub struct SF_AES_R1_LOCK_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_R1_LOCK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 31)) | ((value as u32 & 0x01) << 31); - self.w - } -} -#[doc = "Field `sf_aes_r1_en` reader - "] -pub struct SF_AES_R1_EN_R(crate::FieldReader); -impl SF_AES_R1_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_AES_R1_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_R1_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_aes_r1_en` writer - "] -pub struct SF_AES_R1_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_R1_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 30)) | ((value as u32 & 0x01) << 30); - self.w - } -} -#[doc = "Field `sf_aes_r1_hw_key_en` reader - "] -pub struct SF_AES_R1_HW_KEY_EN_R(crate::FieldReader); -impl SF_AES_R1_HW_KEY_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_AES_R1_HW_KEY_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_R1_HW_KEY_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_aes_r1_hw_key_en` writer - "] -pub struct SF_AES_R1_HW_KEY_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_R1_HW_KEY_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 29)) | ((value as u32 & 0x01) << 29); - self.w - } -} -#[doc = "Field `sf_aes_r1_start` reader - "] -pub struct SF_AES_R1_START_R(crate::FieldReader); -impl SF_AES_R1_START_R { - pub(crate) fn new(bits: u16) -> Self { - SF_AES_R1_START_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_R1_START_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_aes_r1_start` writer - "] -pub struct SF_AES_R1_START_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_R1_START_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3fff << 14)) | ((value as u32 & 0x3fff) << 14); - self.w - } -} #[doc = "Field `sf_aes_r1_end` reader - "] -pub struct SF_AES_R1_END_R(crate::FieldReader); -impl SF_AES_R1_END_R { - pub(crate) fn new(bits: u16) -> Self { - SF_AES_R1_END_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_R1_END_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_R1_END_R = crate::FieldReader; #[doc = "Field `sf_aes_r1_end` writer - "] -pub struct SF_AES_R1_END_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_R1_END_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x3fff) | (value as u32 & 0x3fff); - self.w - } -} +pub type SF_AES_R1_END_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_R1_SPEC, u16, u16, 14, O>; +#[doc = "Field `sf_aes_r1_start` reader - "] +pub type SF_AES_R1_START_R = crate::FieldReader; +#[doc = "Field `sf_aes_r1_start` writer - "] +pub type SF_AES_R1_START_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_R1_SPEC, u16, u16, 14, O>; +#[doc = "Field `sf_aes_r1_hw_key_en` reader - "] +pub type SF_AES_R1_HW_KEY_EN_R = crate::BitReader; +#[doc = "Field `sf_aes_r1_hw_key_en` writer - "] +pub type SF_AES_R1_HW_KEY_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SF_AES_R1_SPEC, bool, O>; +#[doc = "Field `sf_aes_r1_en` reader - "] +pub type SF_AES_R1_EN_R = crate::BitReader; +#[doc = "Field `sf_aes_r1_en` writer - "] +pub type SF_AES_R1_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_AES_R1_SPEC, bool, O>; +#[doc = "Field `sf_aes_r1_lock` reader - "] +pub type SF_AES_R1_LOCK_R = crate::BitReader; +#[doc = "Field `sf_aes_r1_lock` writer - "] +pub type SF_AES_R1_LOCK_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_AES_R1_SPEC, bool, O>; impl R { - #[doc = "Bit 31"] + #[doc = "Bits 0:13"] #[inline(always)] - pub fn sf_aes_r1_lock(&self) -> SF_AES_R1_LOCK_R { - SF_AES_R1_LOCK_R::new(((self.bits >> 31) & 0x01) != 0) + pub fn sf_aes_r1_end(&self) -> SF_AES_R1_END_R { + SF_AES_R1_END_R::new((self.bits & 0x3fff) as u16) } - #[doc = "Bit 30"] + #[doc = "Bits 14:27"] #[inline(always)] - pub fn sf_aes_r1_en(&self) -> SF_AES_R1_EN_R { - SF_AES_R1_EN_R::new(((self.bits >> 30) & 0x01) != 0) + pub fn sf_aes_r1_start(&self) -> SF_AES_R1_START_R { + SF_AES_R1_START_R::new(((self.bits >> 14) & 0x3fff) as u16) } #[doc = "Bit 29"] #[inline(always)] pub fn sf_aes_r1_hw_key_en(&self) -> SF_AES_R1_HW_KEY_EN_R { - SF_AES_R1_HW_KEY_EN_R::new(((self.bits >> 29) & 0x01) != 0) + SF_AES_R1_HW_KEY_EN_R::new(((self.bits >> 29) & 1) != 0) } - #[doc = "Bits 14:27"] + #[doc = "Bit 30"] #[inline(always)] - pub fn sf_aes_r1_start(&self) -> SF_AES_R1_START_R { - SF_AES_R1_START_R::new(((self.bits >> 14) & 0x3fff) as u16) + pub fn sf_aes_r1_en(&self) -> SF_AES_R1_EN_R { + SF_AES_R1_EN_R::new(((self.bits >> 30) & 1) != 0) } - #[doc = "Bits 0:13"] + #[doc = "Bit 31"] #[inline(always)] - pub fn sf_aes_r1_end(&self) -> SF_AES_R1_END_R { - SF_AES_R1_END_R::new((self.bits & 0x3fff) as u16) + pub fn sf_aes_r1_lock(&self) -> SF_AES_R1_LOCK_R { + SF_AES_R1_LOCK_R::new(((self.bits >> 31) & 1) != 0) } } impl W { - #[doc = "Bit 31"] + #[doc = "Bits 0:13"] #[inline(always)] - pub fn sf_aes_r1_lock(&mut self) -> SF_AES_R1_LOCK_W { - SF_AES_R1_LOCK_W { w: self } + #[must_use] + pub fn sf_aes_r1_end(&mut self) -> SF_AES_R1_END_W<0> { + SF_AES_R1_END_W::new(self) } - #[doc = "Bit 30"] + #[doc = "Bits 14:27"] #[inline(always)] - pub fn sf_aes_r1_en(&mut self) -> SF_AES_R1_EN_W { - SF_AES_R1_EN_W { w: self } + #[must_use] + pub fn sf_aes_r1_start(&mut self) -> SF_AES_R1_START_W<14> { + SF_AES_R1_START_W::new(self) } #[doc = "Bit 29"] #[inline(always)] - pub fn sf_aes_r1_hw_key_en(&mut self) -> SF_AES_R1_HW_KEY_EN_W { - SF_AES_R1_HW_KEY_EN_W { w: self } + #[must_use] + pub fn sf_aes_r1_hw_key_en(&mut self) -> SF_AES_R1_HW_KEY_EN_W<29> { + SF_AES_R1_HW_KEY_EN_W::new(self) } - #[doc = "Bits 14:27"] + #[doc = "Bit 30"] #[inline(always)] - pub fn sf_aes_r1_start(&mut self) -> SF_AES_R1_START_W { - SF_AES_R1_START_W { w: self } + #[must_use] + pub fn sf_aes_r1_en(&mut self) -> SF_AES_R1_EN_W<30> { + SF_AES_R1_EN_W::new(self) } - #[doc = "Bits 0:13"] + #[doc = "Bit 31"] #[inline(always)] - pub fn sf_aes_r1_end(&mut self) -> SF_AES_R1_END_W { - SF_AES_R1_END_W { w: self } + #[must_use] + pub fn sf_aes_r1_lock(&mut self) -> SF_AES_R1_LOCK_W<31> { + SF_AES_R1_LOCK_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -263,11 +134,10 @@ impl crate::Readable for SF_AES_R1_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_r1::W](W) writer structure"] impl crate::Writable for SF_AES_R1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_r1 to value 0x3fff"] impl crate::Resettable for SF_AES_R1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x3fff - } + const RESET_VALUE: Self::Ux = 0x3fff; } diff --git a/src/sf_ctrl/sf_aes_r2.rs b/src/sf_ctrl/sf_aes_r2.rs index 0e0f757..cf6ec8f 100644 --- a/src/sf_ctrl/sf_aes_r2.rs +++ b/src/sf_ctrl/sf_aes_r2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,225 +28,95 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `sf_aes_r2_lock` reader - "] -pub struct SF_AES_R2_LOCK_R(crate::FieldReader); -impl SF_AES_R2_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - SF_AES_R2_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_R2_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_aes_r2_lock` writer - "] -pub struct SF_AES_R2_LOCK_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_R2_LOCK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 31)) | ((value as u32 & 0x01) << 31); - self.w - } -} -#[doc = "Field `sf_aes_r2_en` reader - "] -pub struct SF_AES_R2_EN_R(crate::FieldReader); -impl SF_AES_R2_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_AES_R2_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_R2_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_aes_r2_en` writer - "] -pub struct SF_AES_R2_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_R2_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 30)) | ((value as u32 & 0x01) << 30); - self.w - } -} -#[doc = "Field `sf_aes_r2_hw_key_en` reader - "] -pub struct SF_AES_R2_HW_KEY_EN_R(crate::FieldReader); -impl SF_AES_R2_HW_KEY_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_AES_R2_HW_KEY_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_R2_HW_KEY_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_aes_r2_hw_key_en` writer - "] -pub struct SF_AES_R2_HW_KEY_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_R2_HW_KEY_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 29)) | ((value as u32 & 0x01) << 29); - self.w - } -} -#[doc = "Field `sf_aes_r2_start` reader - "] -pub struct SF_AES_R2_START_R(crate::FieldReader); -impl SF_AES_R2_START_R { - pub(crate) fn new(bits: u16) -> Self { - SF_AES_R2_START_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_R2_START_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_aes_r2_start` writer - "] -pub struct SF_AES_R2_START_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_R2_START_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x3fff << 14)) | ((value as u32 & 0x3fff) << 14); - self.w - } -} #[doc = "Field `sf_aes_r2_end` reader - "] -pub struct SF_AES_R2_END_R(crate::FieldReader); -impl SF_AES_R2_END_R { - pub(crate) fn new(bits: u16) -> Self { - SF_AES_R2_END_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_R2_END_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AES_R2_END_R = crate::FieldReader; #[doc = "Field `sf_aes_r2_end` writer - "] -pub struct SF_AES_R2_END_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_R2_END_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x3fff) | (value as u32 & 0x3fff); - self.w - } -} +pub type SF_AES_R2_END_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_R2_SPEC, u16, u16, 14, O>; +#[doc = "Field `sf_aes_r2_start` reader - "] +pub type SF_AES_R2_START_R = crate::FieldReader; +#[doc = "Field `sf_aes_r2_start` writer - "] +pub type SF_AES_R2_START_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_AES_R2_SPEC, u16, u16, 14, O>; +#[doc = "Field `sf_aes_r2_hw_key_en` reader - "] +pub type SF_AES_R2_HW_KEY_EN_R = crate::BitReader; +#[doc = "Field `sf_aes_r2_hw_key_en` writer - "] +pub type SF_AES_R2_HW_KEY_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SF_AES_R2_SPEC, bool, O>; +#[doc = "Field `sf_aes_r2_en` reader - "] +pub type SF_AES_R2_EN_R = crate::BitReader; +#[doc = "Field `sf_aes_r2_en` writer - "] +pub type SF_AES_R2_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_AES_R2_SPEC, bool, O>; +#[doc = "Field `sf_aes_r2_lock` reader - "] +pub type SF_AES_R2_LOCK_R = crate::BitReader; +#[doc = "Field `sf_aes_r2_lock` writer - "] +pub type SF_AES_R2_LOCK_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_AES_R2_SPEC, bool, O>; impl R { - #[doc = "Bit 31"] + #[doc = "Bits 0:13"] #[inline(always)] - pub fn sf_aes_r2_lock(&self) -> SF_AES_R2_LOCK_R { - SF_AES_R2_LOCK_R::new(((self.bits >> 31) & 0x01) != 0) + pub fn sf_aes_r2_end(&self) -> SF_AES_R2_END_R { + SF_AES_R2_END_R::new((self.bits & 0x3fff) as u16) } - #[doc = "Bit 30"] + #[doc = "Bits 14:27"] #[inline(always)] - pub fn sf_aes_r2_en(&self) -> SF_AES_R2_EN_R { - SF_AES_R2_EN_R::new(((self.bits >> 30) & 0x01) != 0) + pub fn sf_aes_r2_start(&self) -> SF_AES_R2_START_R { + SF_AES_R2_START_R::new(((self.bits >> 14) & 0x3fff) as u16) } #[doc = "Bit 29"] #[inline(always)] pub fn sf_aes_r2_hw_key_en(&self) -> SF_AES_R2_HW_KEY_EN_R { - SF_AES_R2_HW_KEY_EN_R::new(((self.bits >> 29) & 0x01) != 0) + SF_AES_R2_HW_KEY_EN_R::new(((self.bits >> 29) & 1) != 0) } - #[doc = "Bits 14:27"] + #[doc = "Bit 30"] #[inline(always)] - pub fn sf_aes_r2_start(&self) -> SF_AES_R2_START_R { - SF_AES_R2_START_R::new(((self.bits >> 14) & 0x3fff) as u16) + pub fn sf_aes_r2_en(&self) -> SF_AES_R2_EN_R { + SF_AES_R2_EN_R::new(((self.bits >> 30) & 1) != 0) } - #[doc = "Bits 0:13"] + #[doc = "Bit 31"] #[inline(always)] - pub fn sf_aes_r2_end(&self) -> SF_AES_R2_END_R { - SF_AES_R2_END_R::new((self.bits & 0x3fff) as u16) + pub fn sf_aes_r2_lock(&self) -> SF_AES_R2_LOCK_R { + SF_AES_R2_LOCK_R::new(((self.bits >> 31) & 1) != 0) } } impl W { - #[doc = "Bit 31"] + #[doc = "Bits 0:13"] #[inline(always)] - pub fn sf_aes_r2_lock(&mut self) -> SF_AES_R2_LOCK_W { - SF_AES_R2_LOCK_W { w: self } + #[must_use] + pub fn sf_aes_r2_end(&mut self) -> SF_AES_R2_END_W<0> { + SF_AES_R2_END_W::new(self) } - #[doc = "Bit 30"] + #[doc = "Bits 14:27"] #[inline(always)] - pub fn sf_aes_r2_en(&mut self) -> SF_AES_R2_EN_W { - SF_AES_R2_EN_W { w: self } + #[must_use] + pub fn sf_aes_r2_start(&mut self) -> SF_AES_R2_START_W<14> { + SF_AES_R2_START_W::new(self) } #[doc = "Bit 29"] #[inline(always)] - pub fn sf_aes_r2_hw_key_en(&mut self) -> SF_AES_R2_HW_KEY_EN_W { - SF_AES_R2_HW_KEY_EN_W { w: self } + #[must_use] + pub fn sf_aes_r2_hw_key_en(&mut self) -> SF_AES_R2_HW_KEY_EN_W<29> { + SF_AES_R2_HW_KEY_EN_W::new(self) } - #[doc = "Bits 14:27"] + #[doc = "Bit 30"] #[inline(always)] - pub fn sf_aes_r2_start(&mut self) -> SF_AES_R2_START_W { - SF_AES_R2_START_W { w: self } + #[must_use] + pub fn sf_aes_r2_en(&mut self) -> SF_AES_R2_EN_W<30> { + SF_AES_R2_EN_W::new(self) } - #[doc = "Bits 0:13"] + #[doc = "Bit 31"] #[inline(always)] - pub fn sf_aes_r2_end(&mut self) -> SF_AES_R2_END_W { - SF_AES_R2_END_W { w: self } + #[must_use] + pub fn sf_aes_r2_lock(&mut self) -> SF_AES_R2_LOCK_W<31> { + SF_AES_R2_LOCK_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -263,11 +134,10 @@ impl crate::Readable for SF_AES_R2_SPEC { #[doc = "`write(|w| ..)` method takes [sf_aes_r2::W](W) writer structure"] impl crate::Writable for SF_AES_R2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_aes_r2 to value 0x3fff"] impl crate::Resettable for SF_AES_R2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x3fff - } + const RESET_VALUE: Self::Ux = 0x3fff; } diff --git a/src/sf_ctrl/sf_ahb2sif_status.rs b/src/sf_ctrl/sf_ahb2sif_status.rs index 07f1f77..5dd0eb6 100644 --- a/src/sf_ctrl/sf_ahb2sif_status.rs +++ b/src/sf_ctrl/sf_ahb2sif_status.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `sf_ahb2sif_status` reader - "] -pub struct SF_AHB2SIF_STATUS_R(crate::FieldReader); -impl SF_AHB2SIF_STATUS_R { - pub(crate) fn new(bits: u32) -> Self { - SF_AHB2SIF_STATUS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AHB2SIF_STATUS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_AHB2SIF_STATUS_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_ahb2sif_status(&self) -> SF_AHB2SIF_STATUS_R { - SF_AHB2SIF_STATUS_R::new((self.bits & 0xffff_ffff) as u32) + SF_AHB2SIF_STATUS_R::new(self.bits) } } #[doc = "sf_ahb2sif_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 [sf_ahb2sif_status](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SF_AHB2SIF_STATUS_SPEC { } #[doc = "`reset()` method sets sf_ahb2sif_status to value 0x1000_0003"] impl crate::Resettable for SF_AHB2SIF_STATUS_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x1000_0003 - } + const RESET_VALUE: Self::Ux = 0x1000_0003; } diff --git a/src/sf_ctrl/sf_ctrl_0.rs b/src/sf_ctrl/sf_ctrl_0.rs index af948d2..8a08581 100644 --- a/src/sf_ctrl/sf_ctrl_0.rs +++ b/src/sf_ctrl/sf_ctrl_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,658 +28,237 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `sf_id` reader - "] -pub struct SF_ID_R(crate::FieldReader); -impl SF_ID_R { - pub(crate) fn new(bits: u8) -> Self { - SF_ID_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_ID_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_id` writer - "] -pub struct SF_ID_W<'a> { - w: &'a mut W, -} -impl<'a> SF_ID_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 24)) | ((value as u32 & 0xff) << 24); - self.w - } -} -#[doc = "Field `sf_aes_iv_endian` reader - "] -pub struct SF_AES_IV_ENDIAN_R(crate::FieldReader); -impl SF_AES_IV_ENDIAN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_AES_IV_ENDIAN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_IV_ENDIAN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_aes_iv_endian` writer - "] -pub struct SF_AES_IV_ENDIAN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_IV_ENDIAN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23); - self.w - } -} -#[doc = "Field `sf_aes_key_endian` reader - "] -pub struct SF_AES_KEY_ENDIAN_R(crate::FieldReader); -impl SF_AES_KEY_ENDIAN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_AES_KEY_ENDIAN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_KEY_ENDIAN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_aes_key_endian` writer - "] -pub struct SF_AES_KEY_ENDIAN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_KEY_ENDIAN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 22)) | ((value as u32 & 0x01) << 22); - self.w - } -} -#[doc = "Field `sf_aes_ctr_plus_en` reader - "] -pub struct SF_AES_CTR_PLUS_EN_R(crate::FieldReader); -impl SF_AES_CTR_PLUS_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_AES_CTR_PLUS_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_CTR_PLUS_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_aes_ctr_plus_en` writer - "] -pub struct SF_AES_CTR_PLUS_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_CTR_PLUS_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); - self.w - } -} -#[doc = "Field `sf_aes_dout_endian` reader - "] -pub struct SF_AES_DOUT_ENDIAN_R(crate::FieldReader); -impl SF_AES_DOUT_ENDIAN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_AES_DOUT_ENDIAN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_DOUT_ENDIAN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_aes_dout_endian` writer - "] -pub struct SF_AES_DOUT_ENDIAN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_DOUT_ENDIAN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w - } -} -#[doc = "Field `sf_aes_dly_mode` reader - "] -pub struct SF_AES_DLY_MODE_R(crate::FieldReader); -impl SF_AES_DLY_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - SF_AES_DLY_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AES_DLY_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_aes_dly_mode` writer - "] -pub struct SF_AES_DLY_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AES_DLY_MODE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 19)) | ((value as u32 & 0x01) << 19); - self.w - } -} -#[doc = "Field `sf_if_int_set` reader - "] -pub struct SF_IF_INT_SET_R(crate::FieldReader); -impl SF_IF_INT_SET_R { - pub(crate) fn new(bits: bool) -> Self { - SF_IF_INT_SET_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_INT_SET_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_int_set` writer - "] -pub struct SF_IF_INT_SET_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_INT_SET_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18); - self.w - } -} -#[doc = "Field `sf_if_int_clr` reader - "] -pub struct SF_IF_INT_CLR_R(crate::FieldReader); -impl SF_IF_INT_CLR_R { - pub(crate) fn new(bits: bool) -> Self { - SF_IF_INT_CLR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_INT_CLR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_int_clr` writer - "] -pub struct SF_IF_INT_CLR_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_INT_CLR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w - } -} -#[doc = "Field `sf_if_int` reader - "] -pub struct SF_IF_INT_R(crate::FieldReader); -impl SF_IF_INT_R { - pub(crate) fn new(bits: bool) -> Self { - SF_IF_INT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_INT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_read_dly_en` reader - "] -pub struct SF_IF_READ_DLY_EN_R(crate::FieldReader); -impl SF_IF_READ_DLY_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_IF_READ_DLY_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_READ_DLY_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_read_dly_en` writer - "] -pub struct SF_IF_READ_DLY_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_READ_DLY_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w - } -} -#[doc = "Field `sf_if_read_dly_n` reader - "] -pub struct SF_IF_READ_DLY_N_R(crate::FieldReader); -impl SF_IF_READ_DLY_N_R { - pub(crate) fn new(bits: u8) -> Self { - SF_IF_READ_DLY_N_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_READ_DLY_N_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_read_dly_n` writer - "] -pub struct SF_IF_READ_DLY_N_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_READ_DLY_N_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 8)) | ((value as u32 & 0x07) << 8); - self.w - } -} -#[doc = "Field `sf_clk_sahb_sram_sel` reader - "] -pub struct SF_CLK_SAHB_SRAM_SEL_R(crate::FieldReader); -impl SF_CLK_SAHB_SRAM_SEL_R { - pub(crate) fn new(bits: bool) -> Self { - SF_CLK_SAHB_SRAM_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_CLK_SAHB_SRAM_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_clk_sahb_sram_sel` writer - "] -pub struct SF_CLK_SAHB_SRAM_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF_CLK_SAHB_SRAM_SEL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w - } -} -#[doc = "Field `sf_clk_out_inv_sel` reader - "] -pub struct SF_CLK_OUT_INV_SEL_R(crate::FieldReader); -impl SF_CLK_OUT_INV_SEL_R { - pub(crate) fn new(bits: bool) -> Self { - SF_CLK_OUT_INV_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_CLK_OUT_INV_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_clk_out_inv_sel` writer - "] -pub struct SF_CLK_OUT_INV_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF_CLK_OUT_INV_SEL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} -#[doc = "Field `sf_clk_out_gate_en` reader - "] -pub struct SF_CLK_OUT_GATE_EN_R(crate::FieldReader); -impl SF_CLK_OUT_GATE_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_CLK_OUT_GATE_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_CLK_OUT_GATE_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_clk_out_gate_en` writer - "] -pub struct SF_CLK_OUT_GATE_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_CLK_OUT_GATE_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} #[doc = "Field `sf_clk_sf_rx_inv_sel` reader - "] -pub struct SF_CLK_SF_RX_INV_SEL_R(crate::FieldReader); -impl SF_CLK_SF_RX_INV_SEL_R { - pub(crate) fn new(bits: bool) -> Self { - SF_CLK_SF_RX_INV_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_CLK_SF_RX_INV_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_CLK_SF_RX_INV_SEL_R = crate::BitReader; #[doc = "Field `sf_clk_sf_rx_inv_sel` writer - "] -pub struct SF_CLK_SF_RX_INV_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF_CLK_SF_RX_INV_SEL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} +pub type SF_CLK_SF_RX_INV_SEL_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SF_CTRL_0_SPEC, bool, O>; +#[doc = "Field `sf_clk_out_gate_en` reader - "] +pub type SF_CLK_OUT_GATE_EN_R = crate::BitReader; +#[doc = "Field `sf_clk_out_gate_en` writer - "] +pub type SF_CLK_OUT_GATE_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_0_SPEC, bool, O>; +#[doc = "Field `sf_clk_out_inv_sel` reader - "] +pub type SF_CLK_OUT_INV_SEL_R = crate::BitReader; +#[doc = "Field `sf_clk_out_inv_sel` writer - "] +pub type SF_CLK_OUT_INV_SEL_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_0_SPEC, bool, O>; +#[doc = "Field `sf_clk_sahb_sram_sel` reader - "] +pub type SF_CLK_SAHB_SRAM_SEL_R = crate::BitReader; +#[doc = "Field `sf_clk_sahb_sram_sel` writer - "] +pub type SF_CLK_SAHB_SRAM_SEL_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SF_CTRL_0_SPEC, bool, O>; +#[doc = "Field `sf_if_read_dly_n` reader - "] +pub type SF_IF_READ_DLY_N_R = crate::FieldReader; +#[doc = "Field `sf_if_read_dly_n` writer - "] +pub type SF_IF_READ_DLY_N_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_CTRL_0_SPEC, u8, u8, 3, O>; +#[doc = "Field `sf_if_read_dly_en` reader - "] +pub type SF_IF_READ_DLY_EN_R = crate::BitReader; +#[doc = "Field `sf_if_read_dly_en` writer - "] +pub type SF_IF_READ_DLY_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_0_SPEC, bool, O>; +#[doc = "Field `sf_if_int` reader - "] +pub type SF_IF_INT_R = crate::BitReader; +#[doc = "Field `sf_if_int_clr` reader - "] +pub type SF_IF_INT_CLR_R = crate::BitReader; +#[doc = "Field `sf_if_int_clr` writer - "] +pub type SF_IF_INT_CLR_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_0_SPEC, bool, O>; +#[doc = "Field `sf_if_int_set` reader - "] +pub type SF_IF_INT_SET_R = crate::BitReader; +#[doc = "Field `sf_if_int_set` writer - "] +pub type SF_IF_INT_SET_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_0_SPEC, bool, O>; +#[doc = "Field `sf_aes_dly_mode` reader - "] +pub type SF_AES_DLY_MODE_R = crate::BitReader; +#[doc = "Field `sf_aes_dly_mode` writer - "] +pub type SF_AES_DLY_MODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_0_SPEC, bool, O>; +#[doc = "Field `sf_aes_dout_endian` reader - "] +pub type SF_AES_DOUT_ENDIAN_R = crate::BitReader; +#[doc = "Field `sf_aes_dout_endian` writer - "] +pub type SF_AES_DOUT_ENDIAN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_0_SPEC, bool, O>; +#[doc = "Field `sf_aes_ctr_plus_en` reader - "] +pub type SF_AES_CTR_PLUS_EN_R = crate::BitReader; +#[doc = "Field `sf_aes_ctr_plus_en` writer - "] +pub type SF_AES_CTR_PLUS_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_0_SPEC, bool, O>; +#[doc = "Field `sf_aes_key_endian` reader - "] +pub type SF_AES_KEY_ENDIAN_R = crate::BitReader; +#[doc = "Field `sf_aes_key_endian` writer - "] +pub type SF_AES_KEY_ENDIAN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_0_SPEC, bool, O>; +#[doc = "Field `sf_aes_iv_endian` reader - "] +pub type SF_AES_IV_ENDIAN_R = crate::BitReader; +#[doc = "Field `sf_aes_iv_endian` writer - "] +pub type SF_AES_IV_ENDIAN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_0_SPEC, bool, O>; +#[doc = "Field `sf_id` reader - "] +pub type SF_ID_R = crate::FieldReader; +#[doc = "Field `sf_id` writer - "] +pub type SF_ID_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SF_CTRL_0_SPEC, u8, u8, 8, O>; impl R { - #[doc = "Bits 24:31"] + #[doc = "Bit 2"] #[inline(always)] - pub fn sf_id(&self) -> SF_ID_R { - SF_ID_R::new(((self.bits >> 24) & 0xff) as u8) + pub fn sf_clk_sf_rx_inv_sel(&self) -> SF_CLK_SF_RX_INV_SEL_R { + SF_CLK_SF_RX_INV_SEL_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 23"] + #[doc = "Bit 3"] #[inline(always)] - pub fn sf_aes_iv_endian(&self) -> SF_AES_IV_ENDIAN_R { - SF_AES_IV_ENDIAN_R::new(((self.bits >> 23) & 0x01) != 0) + pub fn sf_clk_out_gate_en(&self) -> SF_CLK_OUT_GATE_EN_R { + SF_CLK_OUT_GATE_EN_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bit 22"] + #[doc = "Bit 4"] #[inline(always)] - pub fn sf_aes_key_endian(&self) -> SF_AES_KEY_ENDIAN_R { - SF_AES_KEY_ENDIAN_R::new(((self.bits >> 22) & 0x01) != 0) + pub fn sf_clk_out_inv_sel(&self) -> SF_CLK_OUT_INV_SEL_R { + SF_CLK_OUT_INV_SEL_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 21"] + #[doc = "Bit 5"] #[inline(always)] - pub fn sf_aes_ctr_plus_en(&self) -> SF_AES_CTR_PLUS_EN_R { - SF_AES_CTR_PLUS_EN_R::new(((self.bits >> 21) & 0x01) != 0) + pub fn sf_clk_sahb_sram_sel(&self) -> SF_CLK_SAHB_SRAM_SEL_R { + SF_CLK_SAHB_SRAM_SEL_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 20"] + #[doc = "Bits 8:10"] #[inline(always)] - pub fn sf_aes_dout_endian(&self) -> SF_AES_DOUT_ENDIAN_R { - SF_AES_DOUT_ENDIAN_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn sf_if_read_dly_n(&self) -> SF_IF_READ_DLY_N_R { + SF_IF_READ_DLY_N_R::new(((self.bits >> 8) & 7) as u8) } - #[doc = "Bit 19"] + #[doc = "Bit 11"] #[inline(always)] - pub fn sf_aes_dly_mode(&self) -> SF_AES_DLY_MODE_R { - SF_AES_DLY_MODE_R::new(((self.bits >> 19) & 0x01) != 0) + pub fn sf_if_read_dly_en(&self) -> SF_IF_READ_DLY_EN_R { + SF_IF_READ_DLY_EN_R::new(((self.bits >> 11) & 1) != 0) } - #[doc = "Bit 18"] + #[doc = "Bit 16"] #[inline(always)] - pub fn sf_if_int_set(&self) -> SF_IF_INT_SET_R { - SF_IF_INT_SET_R::new(((self.bits >> 18) & 0x01) != 0) + pub fn sf_if_int(&self) -> SF_IF_INT_R { + SF_IF_INT_R::new(((self.bits >> 16) & 1) != 0) } #[doc = "Bit 17"] #[inline(always)] pub fn sf_if_int_clr(&self) -> SF_IF_INT_CLR_R { - SF_IF_INT_CLR_R::new(((self.bits >> 17) & 0x01) != 0) + SF_IF_INT_CLR_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bit 16"] + #[doc = "Bit 18"] #[inline(always)] - pub fn sf_if_int(&self) -> SF_IF_INT_R { - SF_IF_INT_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn sf_if_int_set(&self) -> SF_IF_INT_SET_R { + SF_IF_INT_SET_R::new(((self.bits >> 18) & 1) != 0) } - #[doc = "Bit 11"] + #[doc = "Bit 19"] #[inline(always)] - pub fn sf_if_read_dly_en(&self) -> SF_IF_READ_DLY_EN_R { - SF_IF_READ_DLY_EN_R::new(((self.bits >> 11) & 0x01) != 0) + pub fn sf_aes_dly_mode(&self) -> SF_AES_DLY_MODE_R { + SF_AES_DLY_MODE_R::new(((self.bits >> 19) & 1) != 0) } - #[doc = "Bits 8:10"] + #[doc = "Bit 20"] #[inline(always)] - pub fn sf_if_read_dly_n(&self) -> SF_IF_READ_DLY_N_R { - SF_IF_READ_DLY_N_R::new(((self.bits >> 8) & 0x07) as u8) + pub fn sf_aes_dout_endian(&self) -> SF_AES_DOUT_ENDIAN_R { + SF_AES_DOUT_ENDIAN_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bit 5"] + #[doc = "Bit 21"] #[inline(always)] - pub fn sf_clk_sahb_sram_sel(&self) -> SF_CLK_SAHB_SRAM_SEL_R { - SF_CLK_SAHB_SRAM_SEL_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn sf_aes_ctr_plus_en(&self) -> SF_AES_CTR_PLUS_EN_R { + SF_AES_CTR_PLUS_EN_R::new(((self.bits >> 21) & 1) != 0) } - #[doc = "Bit 4"] + #[doc = "Bit 22"] #[inline(always)] - pub fn sf_clk_out_inv_sel(&self) -> SF_CLK_OUT_INV_SEL_R { - SF_CLK_OUT_INV_SEL_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn sf_aes_key_endian(&self) -> SF_AES_KEY_ENDIAN_R { + SF_AES_KEY_ENDIAN_R::new(((self.bits >> 22) & 1) != 0) } - #[doc = "Bit 3"] + #[doc = "Bit 23"] #[inline(always)] - pub fn sf_clk_out_gate_en(&self) -> SF_CLK_OUT_GATE_EN_R { - SF_CLK_OUT_GATE_EN_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn sf_aes_iv_endian(&self) -> SF_AES_IV_ENDIAN_R { + SF_AES_IV_ENDIAN_R::new(((self.bits >> 23) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn sf_clk_sf_rx_inv_sel(&self) -> SF_CLK_SF_RX_INV_SEL_R { - SF_CLK_SF_RX_INV_SEL_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn sf_id(&self) -> SF_ID_R { + SF_ID_R::new(((self.bits >> 24) & 0xff) as u8) } } impl W { - #[doc = "Bits 24:31"] + #[doc = "Bit 2"] #[inline(always)] - pub fn sf_id(&mut self) -> SF_ID_W { - SF_ID_W { w: self } + #[must_use] + pub fn sf_clk_sf_rx_inv_sel(&mut self) -> SF_CLK_SF_RX_INV_SEL_W<2> { + SF_CLK_SF_RX_INV_SEL_W::new(self) } - #[doc = "Bit 23"] + #[doc = "Bit 3"] #[inline(always)] - pub fn sf_aes_iv_endian(&mut self) -> SF_AES_IV_ENDIAN_W { - SF_AES_IV_ENDIAN_W { w: self } + #[must_use] + pub fn sf_clk_out_gate_en(&mut self) -> SF_CLK_OUT_GATE_EN_W<3> { + SF_CLK_OUT_GATE_EN_W::new(self) } - #[doc = "Bit 22"] + #[doc = "Bit 4"] #[inline(always)] - pub fn sf_aes_key_endian(&mut self) -> SF_AES_KEY_ENDIAN_W { - SF_AES_KEY_ENDIAN_W { w: self } + #[must_use] + pub fn sf_clk_out_inv_sel(&mut self) -> SF_CLK_OUT_INV_SEL_W<4> { + SF_CLK_OUT_INV_SEL_W::new(self) } - #[doc = "Bit 21"] + #[doc = "Bit 5"] #[inline(always)] - pub fn sf_aes_ctr_plus_en(&mut self) -> SF_AES_CTR_PLUS_EN_W { - SF_AES_CTR_PLUS_EN_W { w: self } + #[must_use] + pub fn sf_clk_sahb_sram_sel(&mut self) -> SF_CLK_SAHB_SRAM_SEL_W<5> { + SF_CLK_SAHB_SRAM_SEL_W::new(self) } - #[doc = "Bit 20"] + #[doc = "Bits 8:10"] #[inline(always)] - pub fn sf_aes_dout_endian(&mut self) -> SF_AES_DOUT_ENDIAN_W { - SF_AES_DOUT_ENDIAN_W { w: self } + #[must_use] + pub fn sf_if_read_dly_n(&mut self) -> SF_IF_READ_DLY_N_W<8> { + SF_IF_READ_DLY_N_W::new(self) } - #[doc = "Bit 19"] + #[doc = "Bit 11"] #[inline(always)] - pub fn sf_aes_dly_mode(&mut self) -> SF_AES_DLY_MODE_W { - SF_AES_DLY_MODE_W { w: self } + #[must_use] + pub fn sf_if_read_dly_en(&mut self) -> SF_IF_READ_DLY_EN_W<11> { + SF_IF_READ_DLY_EN_W::new(self) } - #[doc = "Bit 18"] + #[doc = "Bit 17"] #[inline(always)] - pub fn sf_if_int_set(&mut self) -> SF_IF_INT_SET_W { - SF_IF_INT_SET_W { w: self } + #[must_use] + pub fn sf_if_int_clr(&mut self) -> SF_IF_INT_CLR_W<17> { + SF_IF_INT_CLR_W::new(self) } - #[doc = "Bit 17"] + #[doc = "Bit 18"] #[inline(always)] - pub fn sf_if_int_clr(&mut self) -> SF_IF_INT_CLR_W { - SF_IF_INT_CLR_W { w: self } + #[must_use] + pub fn sf_if_int_set(&mut self) -> SF_IF_INT_SET_W<18> { + SF_IF_INT_SET_W::new(self) } - #[doc = "Bit 11"] + #[doc = "Bit 19"] #[inline(always)] - pub fn sf_if_read_dly_en(&mut self) -> SF_IF_READ_DLY_EN_W { - SF_IF_READ_DLY_EN_W { w: self } + #[must_use] + pub fn sf_aes_dly_mode(&mut self) -> SF_AES_DLY_MODE_W<19> { + SF_AES_DLY_MODE_W::new(self) } - #[doc = "Bits 8:10"] + #[doc = "Bit 20"] #[inline(always)] - pub fn sf_if_read_dly_n(&mut self) -> SF_IF_READ_DLY_N_W { - SF_IF_READ_DLY_N_W { w: self } + #[must_use] + pub fn sf_aes_dout_endian(&mut self) -> SF_AES_DOUT_ENDIAN_W<20> { + SF_AES_DOUT_ENDIAN_W::new(self) } - #[doc = "Bit 5"] + #[doc = "Bit 21"] #[inline(always)] - pub fn sf_clk_sahb_sram_sel(&mut self) -> SF_CLK_SAHB_SRAM_SEL_W { - SF_CLK_SAHB_SRAM_SEL_W { w: self } + #[must_use] + pub fn sf_aes_ctr_plus_en(&mut self) -> SF_AES_CTR_PLUS_EN_W<21> { + SF_AES_CTR_PLUS_EN_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 22"] #[inline(always)] - pub fn sf_clk_out_inv_sel(&mut self) -> SF_CLK_OUT_INV_SEL_W { - SF_CLK_OUT_INV_SEL_W { w: self } + #[must_use] + pub fn sf_aes_key_endian(&mut self) -> SF_AES_KEY_ENDIAN_W<22> { + SF_AES_KEY_ENDIAN_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bit 23"] #[inline(always)] - pub fn sf_clk_out_gate_en(&mut self) -> SF_CLK_OUT_GATE_EN_W { - SF_CLK_OUT_GATE_EN_W { w: self } + #[must_use] + pub fn sf_aes_iv_endian(&mut self) -> SF_AES_IV_ENDIAN_W<23> { + SF_AES_IV_ENDIAN_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn sf_clk_sf_rx_inv_sel(&mut self) -> SF_CLK_SF_RX_INV_SEL_W { - SF_CLK_SF_RX_INV_SEL_W { w: self } + #[must_use] + pub fn sf_id(&mut self) -> SF_ID_W<24> { + SF_ID_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -696,11 +276,10 @@ impl crate::Readable for SF_CTRL_0_SPEC { #[doc = "`write(|w| ..)` method takes [sf_ctrl_0::W](W) writer structure"] impl crate::Writable for SF_CTRL_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_ctrl_0 to value 0x1ad2_001c"] impl crate::Resettable for SF_CTRL_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x1ad2_001c - } + const RESET_VALUE: Self::Ux = 0x1ad2_001c; } diff --git a/src/sf_ctrl/sf_ctrl_1.rs b/src/sf_ctrl/sf_ctrl_1.rs index a3d8d81..1a11d05 100644 --- a/src/sf_ctrl/sf_ctrl_1.rs +++ b/src/sf_ctrl/sf_ctrl_1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,575 +28,214 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `sf_ahb2sram_en` reader - "] -pub struct SF_AHB2SRAM_EN_R(crate::FieldReader); -impl SF_AHB2SRAM_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_AHB2SRAM_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AHB2SRAM_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_ahb2sram_en` writer - "] -pub struct SF_AHB2SRAM_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AHB2SRAM_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 31)) | ((value as u32 & 0x01) << 31); - self.w - } -} -#[doc = "Field `sf_ahb2sif_en` reader - "] -pub struct SF_AHB2SIF_EN_R(crate::FieldReader); -impl SF_AHB2SIF_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_AHB2SIF_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AHB2SIF_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_ahb2sif_en` writer - "] -pub struct SF_AHB2SIF_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AHB2SIF_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 30)) | ((value as u32 & 0x01) << 30); - self.w - } -} -#[doc = "Field `sf_if_en` reader - "] -pub struct SF_IF_EN_R(crate::FieldReader); -impl SF_IF_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_IF_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_en` writer - "] -pub struct SF_IF_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 29)) | ((value as u32 & 0x01) << 29); - self.w - } -} -#[doc = "Field `sf_if_fn_sel` reader - "] -pub struct SF_IF_FN_SEL_R(crate::FieldReader); -impl SF_IF_FN_SEL_R { - pub(crate) fn new(bits: bool) -> Self { - SF_IF_FN_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_FN_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_fn_sel` writer - "] -pub struct SF_IF_FN_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_FN_SEL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 28)) | ((value as u32 & 0x01) << 28); - self.w - } -} -#[doc = "Field `sf_ahb2sif_stop` reader - "] -pub struct SF_AHB2SIF_STOP_R(crate::FieldReader); -impl SF_AHB2SIF_STOP_R { - pub(crate) fn new(bits: bool) -> Self { - SF_AHB2SIF_STOP_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AHB2SIF_STOP_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_ahb2sif_stop` writer - "] -pub struct SF_AHB2SIF_STOP_W<'a> { - w: &'a mut W, -} -impl<'a> SF_AHB2SIF_STOP_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 27)) | ((value as u32 & 0x01) << 27); - self.w - } -} -#[doc = "Field `sf_ahb2sif_stopped` reader - "] -pub struct SF_AHB2SIF_STOPPED_R(crate::FieldReader); -impl SF_AHB2SIF_STOPPED_R { - pub(crate) fn new(bits: bool) -> Self { - SF_AHB2SIF_STOPPED_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_AHB2SIF_STOPPED_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_reg_wp` reader - "] -pub struct SF_IF_REG_WP_R(crate::FieldReader); -impl SF_IF_REG_WP_R { - pub(crate) fn new(bits: bool) -> Self { - SF_IF_REG_WP_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_REG_WP_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_reg_wp` writer - "] -pub struct SF_IF_REG_WP_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_REG_WP_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 25)) | ((value as u32 & 0x01) << 25); - self.w - } -} -#[doc = "Field `sf_if_reg_hold` reader - "] -pub struct SF_IF_REG_HOLD_R(crate::FieldReader); -impl SF_IF_REG_HOLD_R { - pub(crate) fn new(bits: bool) -> Self { - SF_IF_REG_HOLD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_REG_HOLD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_reg_hold` writer - "] -pub struct SF_IF_REG_HOLD_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_REG_HOLD_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24); - self.w - } -} -#[doc = "Field `sf_if_0_ack_lat` reader - "] -pub struct SF_IF_0_ACK_LAT_R(crate::FieldReader); -impl SF_IF_0_ACK_LAT_R { - pub(crate) fn new(bits: u8) -> Self { - SF_IF_0_ACK_LAT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_0_ACK_LAT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_0_ack_lat` writer - "] -pub struct SF_IF_0_ACK_LAT_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_0_ACK_LAT_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 20)) | ((value as u32 & 0x07) << 20); - self.w - } -} -#[doc = "Field `sf_if_sr_int_set` reader - "] -pub struct SF_IF_SR_INT_SET_R(crate::FieldReader); -impl SF_IF_SR_INT_SET_R { - pub(crate) fn new(bits: bool) -> Self { - SF_IF_SR_INT_SET_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_SR_INT_SET_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_sr_int_set` writer - "] -pub struct SF_IF_SR_INT_SET_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_SR_INT_SET_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18); - self.w - } -} -#[doc = "Field `sf_if_sr_int_en` reader - "] -pub struct SF_IF_SR_INT_EN_R(crate::FieldReader); -impl SF_IF_SR_INT_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_IF_SR_INT_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_SR_INT_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_sr_int_en` writer - "] -pub struct SF_IF_SR_INT_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_SR_INT_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w - } -} -#[doc = "Field `sf_if_sr_int` reader - "] -pub struct SF_IF_SR_INT_R(crate::FieldReader); -impl SF_IF_SR_INT_R { - pub(crate) fn new(bits: bool) -> Self { - SF_IF_SR_INT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_SR_INT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_sr_pat` reader - "] -pub struct SF_IF_SR_PAT_R(crate::FieldReader); -impl SF_IF_SR_PAT_R { - pub(crate) fn new(bits: u8) -> Self { - SF_IF_SR_PAT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_SR_PAT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_sr_pat` writer - "] -pub struct SF_IF_SR_PAT_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_SR_PAT_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8); - self.w - } -} #[doc = "Field `sf_if_sr_pat_mask` reader - "] -pub struct SF_IF_SR_PAT_MASK_R(crate::FieldReader); -impl SF_IF_SR_PAT_MASK_R { - pub(crate) fn new(bits: u8) -> Self { - SF_IF_SR_PAT_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_SR_PAT_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_IF_SR_PAT_MASK_R = crate::FieldReader; #[doc = "Field `sf_if_sr_pat_mask` writer - "] -pub struct SF_IF_SR_PAT_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_SR_PAT_MASK_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type SF_IF_SR_PAT_MASK_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_CTRL_1_SPEC, u8, u8, 8, O>; +#[doc = "Field `sf_if_sr_pat` reader - "] +pub type SF_IF_SR_PAT_R = crate::FieldReader; +#[doc = "Field `sf_if_sr_pat` writer - "] +pub type SF_IF_SR_PAT_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_CTRL_1_SPEC, u8, u8, 8, O>; +#[doc = "Field `sf_if_sr_int` reader - "] +pub type SF_IF_SR_INT_R = crate::BitReader; +#[doc = "Field `sf_if_sr_int_en` reader - "] +pub type SF_IF_SR_INT_EN_R = crate::BitReader; +#[doc = "Field `sf_if_sr_int_en` writer - "] +pub type SF_IF_SR_INT_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_1_SPEC, bool, O>; +#[doc = "Field `sf_if_sr_int_set` reader - "] +pub type SF_IF_SR_INT_SET_R = crate::BitReader; +#[doc = "Field `sf_if_sr_int_set` writer - "] +pub type SF_IF_SR_INT_SET_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_1_SPEC, bool, O>; +#[doc = "Field `sf_if_0_ack_lat` reader - "] +pub type SF_IF_0_ACK_LAT_R = crate::FieldReader; +#[doc = "Field `sf_if_0_ack_lat` writer - "] +pub type SF_IF_0_ACK_LAT_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_CTRL_1_SPEC, u8, u8, 3, O>; +#[doc = "Field `sf_if_reg_hold` reader - "] +pub type SF_IF_REG_HOLD_R = crate::BitReader; +#[doc = "Field `sf_if_reg_hold` writer - "] +pub type SF_IF_REG_HOLD_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_1_SPEC, bool, O>; +#[doc = "Field `sf_if_reg_wp` reader - "] +pub type SF_IF_REG_WP_R = crate::BitReader; +#[doc = "Field `sf_if_reg_wp` writer - "] +pub type SF_IF_REG_WP_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_1_SPEC, bool, O>; +#[doc = "Field `sf_ahb2sif_stopped` reader - "] +pub type SF_AHB2SIF_STOPPED_R = crate::BitReader; +#[doc = "Field `sf_ahb2sif_stop` reader - "] +pub type SF_AHB2SIF_STOP_R = crate::BitReader; +#[doc = "Field `sf_ahb2sif_stop` writer - "] +pub type SF_AHB2SIF_STOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_1_SPEC, bool, O>; +#[doc = "Field `sf_if_fn_sel` reader - "] +pub type SF_IF_FN_SEL_R = crate::BitReader; +#[doc = "Field `sf_if_fn_sel` writer - "] +pub type SF_IF_FN_SEL_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_1_SPEC, bool, O>; +#[doc = "Field `sf_if_en` reader - "] +pub type SF_IF_EN_R = crate::BitReader; +#[doc = "Field `sf_if_en` writer - "] +pub type SF_IF_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_1_SPEC, bool, O>; +#[doc = "Field `sf_ahb2sif_en` reader - "] +pub type SF_AHB2SIF_EN_R = crate::BitReader; +#[doc = "Field `sf_ahb2sif_en` writer - "] +pub type SF_AHB2SIF_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_1_SPEC, bool, O>; +#[doc = "Field `sf_ahb2sram_en` reader - "] +pub type SF_AHB2SRAM_EN_R = crate::BitReader; +#[doc = "Field `sf_ahb2sram_en` writer - "] +pub type SF_AHB2SRAM_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_1_SPEC, bool, O>; +impl R { + #[doc = "Bits 0:7"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff); - self.w + pub fn sf_if_sr_pat_mask(&self) -> SF_IF_SR_PAT_MASK_R { + SF_IF_SR_PAT_MASK_R::new((self.bits & 0xff) as u8) } -} -impl R { - #[doc = "Bit 31"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn sf_ahb2sram_en(&self) -> SF_AHB2SRAM_EN_R { - SF_AHB2SRAM_EN_R::new(((self.bits >> 31) & 0x01) != 0) + pub fn sf_if_sr_pat(&self) -> SF_IF_SR_PAT_R { + SF_IF_SR_PAT_R::new(((self.bits >> 8) & 0xff) as u8) } - #[doc = "Bit 30"] + #[doc = "Bit 16"] #[inline(always)] - pub fn sf_ahb2sif_en(&self) -> SF_AHB2SIF_EN_R { - SF_AHB2SIF_EN_R::new(((self.bits >> 30) & 0x01) != 0) + pub fn sf_if_sr_int(&self) -> SF_IF_SR_INT_R { + SF_IF_SR_INT_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 29"] + #[doc = "Bit 17"] #[inline(always)] - pub fn sf_if_en(&self) -> SF_IF_EN_R { - SF_IF_EN_R::new(((self.bits >> 29) & 0x01) != 0) + pub fn sf_if_sr_int_en(&self) -> SF_IF_SR_INT_EN_R { + SF_IF_SR_INT_EN_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bit 28"] + #[doc = "Bit 18"] #[inline(always)] - pub fn sf_if_fn_sel(&self) -> SF_IF_FN_SEL_R { - SF_IF_FN_SEL_R::new(((self.bits >> 28) & 0x01) != 0) + pub fn sf_if_sr_int_set(&self) -> SF_IF_SR_INT_SET_R { + SF_IF_SR_INT_SET_R::new(((self.bits >> 18) & 1) != 0) } - #[doc = "Bit 27"] + #[doc = "Bits 20:22"] #[inline(always)] - pub fn sf_ahb2sif_stop(&self) -> SF_AHB2SIF_STOP_R { - SF_AHB2SIF_STOP_R::new(((self.bits >> 27) & 0x01) != 0) + pub fn sf_if_0_ack_lat(&self) -> SF_IF_0_ACK_LAT_R { + SF_IF_0_ACK_LAT_R::new(((self.bits >> 20) & 7) as u8) } - #[doc = "Bit 26"] + #[doc = "Bit 24"] #[inline(always)] - pub fn sf_ahb2sif_stopped(&self) -> SF_AHB2SIF_STOPPED_R { - SF_AHB2SIF_STOPPED_R::new(((self.bits >> 26) & 0x01) != 0) + pub fn sf_if_reg_hold(&self) -> SF_IF_REG_HOLD_R { + SF_IF_REG_HOLD_R::new(((self.bits >> 24) & 1) != 0) } #[doc = "Bit 25"] #[inline(always)] pub fn sf_if_reg_wp(&self) -> SF_IF_REG_WP_R { - SF_IF_REG_WP_R::new(((self.bits >> 25) & 0x01) != 0) - } - #[doc = "Bit 24"] - #[inline(always)] - pub fn sf_if_reg_hold(&self) -> SF_IF_REG_HOLD_R { - SF_IF_REG_HOLD_R::new(((self.bits >> 24) & 0x01) != 0) + SF_IF_REG_WP_R::new(((self.bits >> 25) & 1) != 0) } - #[doc = "Bits 20:22"] + #[doc = "Bit 26"] #[inline(always)] - pub fn sf_if_0_ack_lat(&self) -> SF_IF_0_ACK_LAT_R { - SF_IF_0_ACK_LAT_R::new(((self.bits >> 20) & 0x07) as u8) + pub fn sf_ahb2sif_stopped(&self) -> SF_AHB2SIF_STOPPED_R { + SF_AHB2SIF_STOPPED_R::new(((self.bits >> 26) & 1) != 0) } - #[doc = "Bit 18"] + #[doc = "Bit 27"] #[inline(always)] - pub fn sf_if_sr_int_set(&self) -> SF_IF_SR_INT_SET_R { - SF_IF_SR_INT_SET_R::new(((self.bits >> 18) & 0x01) != 0) + pub fn sf_ahb2sif_stop(&self) -> SF_AHB2SIF_STOP_R { + SF_AHB2SIF_STOP_R::new(((self.bits >> 27) & 1) != 0) } - #[doc = "Bit 17"] + #[doc = "Bit 28"] #[inline(always)] - pub fn sf_if_sr_int_en(&self) -> SF_IF_SR_INT_EN_R { - SF_IF_SR_INT_EN_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn sf_if_fn_sel(&self) -> SF_IF_FN_SEL_R { + SF_IF_FN_SEL_R::new(((self.bits >> 28) & 1) != 0) } - #[doc = "Bit 16"] + #[doc = "Bit 29"] #[inline(always)] - pub fn sf_if_sr_int(&self) -> SF_IF_SR_INT_R { - SF_IF_SR_INT_R::new(((self.bits >> 16) & 0x01) != 0) + pub fn sf_if_en(&self) -> SF_IF_EN_R { + SF_IF_EN_R::new(((self.bits >> 29) & 1) != 0) } - #[doc = "Bits 8:15"] + #[doc = "Bit 30"] #[inline(always)] - pub fn sf_if_sr_pat(&self) -> SF_IF_SR_PAT_R { - SF_IF_SR_PAT_R::new(((self.bits >> 8) & 0xff) as u8) + pub fn sf_ahb2sif_en(&self) -> SF_AHB2SIF_EN_R { + SF_AHB2SIF_EN_R::new(((self.bits >> 30) & 1) != 0) } - #[doc = "Bits 0:7"] + #[doc = "Bit 31"] #[inline(always)] - pub fn sf_if_sr_pat_mask(&self) -> SF_IF_SR_PAT_MASK_R { - SF_IF_SR_PAT_MASK_R::new((self.bits & 0xff) as u8) + pub fn sf_ahb2sram_en(&self) -> SF_AHB2SRAM_EN_R { + SF_AHB2SRAM_EN_R::new(((self.bits >> 31) & 1) != 0) } } impl W { - #[doc = "Bit 31"] + #[doc = "Bits 0:7"] #[inline(always)] - pub fn sf_ahb2sram_en(&mut self) -> SF_AHB2SRAM_EN_W { - SF_AHB2SRAM_EN_W { w: self } + #[must_use] + pub fn sf_if_sr_pat_mask(&mut self) -> SF_IF_SR_PAT_MASK_W<0> { + SF_IF_SR_PAT_MASK_W::new(self) } - #[doc = "Bit 30"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn sf_ahb2sif_en(&mut self) -> SF_AHB2SIF_EN_W { - SF_AHB2SIF_EN_W { w: self } + #[must_use] + pub fn sf_if_sr_pat(&mut self) -> SF_IF_SR_PAT_W<8> { + SF_IF_SR_PAT_W::new(self) } - #[doc = "Bit 29"] + #[doc = "Bit 17"] #[inline(always)] - pub fn sf_if_en(&mut self) -> SF_IF_EN_W { - SF_IF_EN_W { w: self } + #[must_use] + pub fn sf_if_sr_int_en(&mut self) -> SF_IF_SR_INT_EN_W<17> { + SF_IF_SR_INT_EN_W::new(self) } - #[doc = "Bit 28"] + #[doc = "Bit 18"] #[inline(always)] - pub fn sf_if_fn_sel(&mut self) -> SF_IF_FN_SEL_W { - SF_IF_FN_SEL_W { w: self } + #[must_use] + pub fn sf_if_sr_int_set(&mut self) -> SF_IF_SR_INT_SET_W<18> { + SF_IF_SR_INT_SET_W::new(self) } - #[doc = "Bit 27"] + #[doc = "Bits 20:22"] #[inline(always)] - pub fn sf_ahb2sif_stop(&mut self) -> SF_AHB2SIF_STOP_W { - SF_AHB2SIF_STOP_W { w: self } + #[must_use] + pub fn sf_if_0_ack_lat(&mut self) -> SF_IF_0_ACK_LAT_W<20> { + SF_IF_0_ACK_LAT_W::new(self) } - #[doc = "Bit 25"] + #[doc = "Bit 24"] #[inline(always)] - pub fn sf_if_reg_wp(&mut self) -> SF_IF_REG_WP_W { - SF_IF_REG_WP_W { w: self } + #[must_use] + pub fn sf_if_reg_hold(&mut self) -> SF_IF_REG_HOLD_W<24> { + SF_IF_REG_HOLD_W::new(self) } - #[doc = "Bit 24"] + #[doc = "Bit 25"] #[inline(always)] - pub fn sf_if_reg_hold(&mut self) -> SF_IF_REG_HOLD_W { - SF_IF_REG_HOLD_W { w: self } + #[must_use] + pub fn sf_if_reg_wp(&mut self) -> SF_IF_REG_WP_W<25> { + SF_IF_REG_WP_W::new(self) } - #[doc = "Bits 20:22"] + #[doc = "Bit 27"] #[inline(always)] - pub fn sf_if_0_ack_lat(&mut self) -> SF_IF_0_ACK_LAT_W { - SF_IF_0_ACK_LAT_W { w: self } + #[must_use] + pub fn sf_ahb2sif_stop(&mut self) -> SF_AHB2SIF_STOP_W<27> { + SF_AHB2SIF_STOP_W::new(self) } - #[doc = "Bit 18"] + #[doc = "Bit 28"] #[inline(always)] - pub fn sf_if_sr_int_set(&mut self) -> SF_IF_SR_INT_SET_W { - SF_IF_SR_INT_SET_W { w: self } + #[must_use] + pub fn sf_if_fn_sel(&mut self) -> SF_IF_FN_SEL_W<28> { + SF_IF_FN_SEL_W::new(self) } - #[doc = "Bit 17"] + #[doc = "Bit 29"] #[inline(always)] - pub fn sf_if_sr_int_en(&mut self) -> SF_IF_SR_INT_EN_W { - SF_IF_SR_INT_EN_W { w: self } + #[must_use] + pub fn sf_if_en(&mut self) -> SF_IF_EN_W<29> { + SF_IF_EN_W::new(self) } - #[doc = "Bits 8:15"] + #[doc = "Bit 30"] #[inline(always)] - pub fn sf_if_sr_pat(&mut self) -> SF_IF_SR_PAT_W { - SF_IF_SR_PAT_W { w: self } + #[must_use] + pub fn sf_ahb2sif_en(&mut self) -> SF_AHB2SIF_EN_W<30> { + SF_AHB2SIF_EN_W::new(self) } - #[doc = "Bits 0:7"] + #[doc = "Bit 31"] #[inline(always)] - pub fn sf_if_sr_pat_mask(&mut self) -> SF_IF_SR_PAT_MASK_W { - SF_IF_SR_PAT_MASK_W { w: self } + #[must_use] + pub fn sf_ahb2sram_en(&mut self) -> SF_AHB2SRAM_EN_W<31> { + SF_AHB2SRAM_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -613,11 +253,10 @@ impl crate::Readable for SF_CTRL_1_SPEC { #[doc = "`write(|w| ..)` method takes [sf_ctrl_1::W](W) writer structure"] impl crate::Writable for SF_CTRL_1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_ctrl_1 to value 0xf360_0000"] impl crate::Resettable for SF_CTRL_1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xf360_0000 - } + const RESET_VALUE: Self::Ux = 0xf360_0000; } diff --git a/src/sf_ctrl/sf_ctrl_2.rs b/src/sf_ctrl/sf_ctrl_2.rs index c71e905..f1f36f3 100644 --- a/src/sf_ctrl/sf_ctrl_2.rs +++ b/src/sf_ctrl/sf_ctrl_2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,189 +28,78 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `sf_if_dqs_en` reader - "] -pub struct SF_IF_DQS_EN_R(crate::FieldReader); -impl SF_IF_DQS_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_IF_DQS_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_DQS_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_dqs_en` writer - "] -pub struct SF_IF_DQS_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_DQS_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w - } -} -#[doc = "Field `sf_if_dtr_en` reader - "] -pub struct SF_IF_DTR_EN_R(crate::FieldReader); -impl SF_IF_DTR_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_IF_DTR_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_DTR_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_dtr_en` writer - "] -pub struct SF_IF_DTR_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_DTR_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} -#[doc = "Field `sf_if_pad_sel_lock` reader - "] -pub struct SF_IF_PAD_SEL_LOCK_R(crate::FieldReader); -impl SF_IF_PAD_SEL_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - SF_IF_PAD_SEL_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_PAD_SEL_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_pad_sel_lock` writer - "] -pub struct SF_IF_PAD_SEL_LOCK_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_PAD_SEL_LOCK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} #[doc = "Field `sf_if_pad_sel` reader - "] -pub struct SF_IF_PAD_SEL_R(crate::FieldReader); -impl SF_IF_PAD_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF_IF_PAD_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_PAD_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_IF_PAD_SEL_R = crate::FieldReader; #[doc = "Field `sf_if_pad_sel` writer - "] -pub struct SF_IF_PAD_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_PAD_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type SF_IF_PAD_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_CTRL_2_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf_if_pad_sel_lock` reader - "] +pub type SF_IF_PAD_SEL_LOCK_R = crate::BitReader; +#[doc = "Field `sf_if_pad_sel_lock` writer - "] +pub type SF_IF_PAD_SEL_LOCK_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_2_SPEC, bool, O>; +#[doc = "Field `sf_if_dtr_en` reader - "] +pub type SF_IF_DTR_EN_R = crate::BitReader; +#[doc = "Field `sf_if_dtr_en` writer - "] +pub type SF_IF_DTR_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_2_SPEC, bool, O>; +#[doc = "Field `sf_if_dqs_en` reader - "] +pub type SF_IF_DQS_EN_R = crate::BitReader; +#[doc = "Field `sf_if_dqs_en` writer - "] +pub type SF_IF_DQS_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_2_SPEC, bool, O>; +impl R { + #[doc = "Bits 0:1"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w + pub fn sf_if_pad_sel(&self) -> SF_IF_PAD_SEL_R { + SF_IF_PAD_SEL_R::new((self.bits & 3) as u8) } -} -impl R { - #[doc = "Bit 5"] + #[doc = "Bit 3"] #[inline(always)] - pub fn sf_if_dqs_en(&self) -> SF_IF_DQS_EN_R { - SF_IF_DQS_EN_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn sf_if_pad_sel_lock(&self) -> SF_IF_PAD_SEL_LOCK_R { + SF_IF_PAD_SEL_LOCK_R::new(((self.bits >> 3) & 1) != 0) } #[doc = "Bit 4"] #[inline(always)] pub fn sf_if_dtr_en(&self) -> SF_IF_DTR_EN_R { - SF_IF_DTR_EN_R::new(((self.bits >> 4) & 0x01) != 0) - } - #[doc = "Bit 3"] - #[inline(always)] - pub fn sf_if_pad_sel_lock(&self) -> SF_IF_PAD_SEL_LOCK_R { - SF_IF_PAD_SEL_LOCK_R::new(((self.bits >> 3) & 0x01) != 0) + SF_IF_DTR_EN_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bits 0:1"] + #[doc = "Bit 5"] #[inline(always)] - pub fn sf_if_pad_sel(&self) -> SF_IF_PAD_SEL_R { - SF_IF_PAD_SEL_R::new((self.bits & 0x03) as u8) + pub fn sf_if_dqs_en(&self) -> SF_IF_DQS_EN_R { + SF_IF_DQS_EN_R::new(((self.bits >> 5) & 1) != 0) } } impl W { - #[doc = "Bit 5"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn sf_if_dqs_en(&mut self) -> SF_IF_DQS_EN_W { - SF_IF_DQS_EN_W { w: self } + #[must_use] + pub fn sf_if_pad_sel(&mut self) -> SF_IF_PAD_SEL_W<0> { + SF_IF_PAD_SEL_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 3"] #[inline(always)] - pub fn sf_if_dtr_en(&mut self) -> SF_IF_DTR_EN_W { - SF_IF_DTR_EN_W { w: self } + #[must_use] + pub fn sf_if_pad_sel_lock(&mut self) -> SF_IF_PAD_SEL_LOCK_W<3> { + SF_IF_PAD_SEL_LOCK_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bit 4"] #[inline(always)] - pub fn sf_if_pad_sel_lock(&mut self) -> SF_IF_PAD_SEL_LOCK_W { - SF_IF_PAD_SEL_LOCK_W { w: self } + #[must_use] + pub fn sf_if_dtr_en(&mut self) -> SF_IF_DTR_EN_W<4> { + SF_IF_DTR_EN_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bit 5"] #[inline(always)] - pub fn sf_if_pad_sel(&mut self) -> SF_IF_PAD_SEL_W { - SF_IF_PAD_SEL_W { w: self } + #[must_use] + pub fn sf_if_dqs_en(&mut self) -> SF_IF_DQS_EN_W<5> { + SF_IF_DQS_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -227,11 +117,10 @@ impl crate::Readable for SF_CTRL_2_SPEC { #[doc = "`write(|w| ..)` method takes [sf_ctrl_2::W](W) writer structure"] impl crate::Writable for SF_CTRL_2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_ctrl_2 to value 0"] impl crate::Resettable for SF_CTRL_2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_ctrl_3.rs b/src/sf_ctrl/sf_ctrl_3.rs index 5f602a8..531b5eb 100644 --- a/src/sf_ctrl/sf_ctrl_3.rs +++ b/src/sf_ctrl/sf_ctrl_3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,307 +28,125 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `sf_if_1_ack_lat` reader - "] -pub struct SF_IF_1_ACK_LAT_R(crate::FieldReader); -impl SF_IF_1_ACK_LAT_R { - pub(crate) fn new(bits: u8) -> Self { - SF_IF_1_ACK_LAT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_1_ACK_LAT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_1_ack_lat` writer - "] -pub struct SF_IF_1_ACK_LAT_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_1_ACK_LAT_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 29)) | ((value as u32 & 0x07) << 29); - self.w - } -} -#[doc = "Field `sf_cmds_wrap_mode` reader - "] -pub struct SF_CMDS_WRAP_MODE_R(crate::FieldReader); -impl SF_CMDS_WRAP_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - SF_CMDS_WRAP_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_CMDS_WRAP_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_cmds_wrap_mode` writer - "] -pub struct SF_CMDS_WRAP_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> SF_CMDS_WRAP_MODE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); - self.w - } -} -#[doc = "Field `sf_cmds_wrap_q_ini` reader - "] -pub struct SF_CMDS_WRAP_Q_INI_R(crate::FieldReader); -impl SF_CMDS_WRAP_Q_INI_R { - pub(crate) fn new(bits: bool) -> Self { - SF_CMDS_WRAP_Q_INI_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_CMDS_WRAP_Q_INI_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_cmds_wrap_q_ini` writer - "] -pub struct SF_CMDS_WRAP_Q_INI_W<'a> { - w: &'a mut W, -} -impl<'a> SF_CMDS_WRAP_Q_INI_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w - } -} -#[doc = "Field `sf_cmds_bt_en` reader - "] -pub struct SF_CMDS_BT_EN_R(crate::FieldReader); -impl SF_CMDS_BT_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_CMDS_BT_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_CMDS_BT_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_cmds_bt_en` writer - "] -pub struct SF_CMDS_BT_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_CMDS_BT_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `sf_cmds_bt_dly` reader - "] -pub struct SF_CMDS_BT_DLY_R(crate::FieldReader); -impl SF_CMDS_BT_DLY_R { - pub(crate) fn new(bits: u8) -> Self { - SF_CMDS_BT_DLY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_CMDS_BT_DLY_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_cmds_bt_dly` writer - "] -pub struct SF_CMDS_BT_DLY_W<'a> { - w: &'a mut W, -} -impl<'a> SF_CMDS_BT_DLY_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 5)) | ((value as u32 & 0x07) << 5); - self.w - } -} -#[doc = "Field `sf_cmds_en` reader - "] -pub struct SF_CMDS_EN_R(crate::FieldReader); -impl SF_CMDS_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_CMDS_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_CMDS_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_cmds_en` writer - "] -pub struct SF_CMDS_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_CMDS_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} #[doc = "Field `sf_cmds_wrap_len` reader - "] -pub struct SF_CMDS_WRAP_LEN_R(crate::FieldReader); -impl SF_CMDS_WRAP_LEN_R { - pub(crate) fn new(bits: u8) -> Self { - SF_CMDS_WRAP_LEN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_CMDS_WRAP_LEN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_CMDS_WRAP_LEN_R = crate::FieldReader; #[doc = "Field `sf_cmds_wrap_len` writer - "] -pub struct SF_CMDS_WRAP_LEN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_CMDS_WRAP_LEN_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x0f) | (value as u32 & 0x0f); - self.w - } -} +pub type SF_CMDS_WRAP_LEN_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_CTRL_3_SPEC, u8, u8, 4, O>; +#[doc = "Field `sf_cmds_en` reader - "] +pub type SF_CMDS_EN_R = crate::BitReader; +#[doc = "Field `sf_cmds_en` writer - "] +pub type SF_CMDS_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_3_SPEC, bool, O>; +#[doc = "Field `sf_cmds_bt_dly` reader - "] +pub type SF_CMDS_BT_DLY_R = crate::FieldReader; +#[doc = "Field `sf_cmds_bt_dly` writer - "] +pub type SF_CMDS_BT_DLY_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_CTRL_3_SPEC, u8, u8, 3, O>; +#[doc = "Field `sf_cmds_bt_en` reader - "] +pub type SF_CMDS_BT_EN_R = crate::BitReader; +#[doc = "Field `sf_cmds_bt_en` writer - "] +pub type SF_CMDS_BT_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_3_SPEC, bool, O>; +#[doc = "Field `sf_cmds_wrap_q_ini` reader - "] +pub type SF_CMDS_WRAP_Q_INI_R = crate::BitReader; +#[doc = "Field `sf_cmds_wrap_q_ini` writer - "] +pub type SF_CMDS_WRAP_Q_INI_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_3_SPEC, bool, O>; +#[doc = "Field `sf_cmds_wrap_mode` reader - "] +pub type SF_CMDS_WRAP_MODE_R = crate::BitReader; +#[doc = "Field `sf_cmds_wrap_mode` writer - "] +pub type SF_CMDS_WRAP_MODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_CTRL_3_SPEC, bool, O>; +#[doc = "Field `sf_if_1_ack_lat` reader - "] +pub type SF_IF_1_ACK_LAT_R = crate::FieldReader; +#[doc = "Field `sf_if_1_ack_lat` writer - "] +pub type SF_IF_1_ACK_LAT_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_CTRL_3_SPEC, u8, u8, 3, O>; impl R { - #[doc = "Bits 29:31"] + #[doc = "Bits 0:3"] #[inline(always)] - pub fn sf_if_1_ack_lat(&self) -> SF_IF_1_ACK_LAT_R { - SF_IF_1_ACK_LAT_R::new(((self.bits >> 29) & 0x07) as u8) + pub fn sf_cmds_wrap_len(&self) -> SF_CMDS_WRAP_LEN_R { + SF_CMDS_WRAP_LEN_R::new((self.bits & 0x0f) as u8) } - #[doc = "Bit 10"] + #[doc = "Bit 4"] #[inline(always)] - pub fn sf_cmds_wrap_mode(&self) -> SF_CMDS_WRAP_MODE_R { - SF_CMDS_WRAP_MODE_R::new(((self.bits >> 10) & 0x01) != 0) + pub fn sf_cmds_en(&self) -> SF_CMDS_EN_R { + SF_CMDS_EN_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 9"] + #[doc = "Bits 5:7"] #[inline(always)] - pub fn sf_cmds_wrap_q_ini(&self) -> SF_CMDS_WRAP_Q_INI_R { - SF_CMDS_WRAP_Q_INI_R::new(((self.bits >> 9) & 0x01) != 0) + pub fn sf_cmds_bt_dly(&self) -> SF_CMDS_BT_DLY_R { + SF_CMDS_BT_DLY_R::new(((self.bits >> 5) & 7) as u8) } #[doc = "Bit 8"] #[inline(always)] pub fn sf_cmds_bt_en(&self) -> SF_CMDS_BT_EN_R { - SF_CMDS_BT_EN_R::new(((self.bits >> 8) & 0x01) != 0) + SF_CMDS_BT_EN_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bits 5:7"] + #[doc = "Bit 9"] #[inline(always)] - pub fn sf_cmds_bt_dly(&self) -> SF_CMDS_BT_DLY_R { - SF_CMDS_BT_DLY_R::new(((self.bits >> 5) & 0x07) as u8) + pub fn sf_cmds_wrap_q_ini(&self) -> SF_CMDS_WRAP_Q_INI_R { + SF_CMDS_WRAP_Q_INI_R::new(((self.bits >> 9) & 1) != 0) } - #[doc = "Bit 4"] + #[doc = "Bit 10"] #[inline(always)] - pub fn sf_cmds_en(&self) -> SF_CMDS_EN_R { - SF_CMDS_EN_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn sf_cmds_wrap_mode(&self) -> SF_CMDS_WRAP_MODE_R { + SF_CMDS_WRAP_MODE_R::new(((self.bits >> 10) & 1) != 0) } - #[doc = "Bits 0:3"] + #[doc = "Bits 29:31"] #[inline(always)] - pub fn sf_cmds_wrap_len(&self) -> SF_CMDS_WRAP_LEN_R { - SF_CMDS_WRAP_LEN_R::new((self.bits & 0x0f) as u8) + pub fn sf_if_1_ack_lat(&self) -> SF_IF_1_ACK_LAT_R { + SF_IF_1_ACK_LAT_R::new(((self.bits >> 29) & 7) as u8) } } impl W { - #[doc = "Bits 29:31"] + #[doc = "Bits 0:3"] #[inline(always)] - pub fn sf_if_1_ack_lat(&mut self) -> SF_IF_1_ACK_LAT_W { - SF_IF_1_ACK_LAT_W { w: self } + #[must_use] + pub fn sf_cmds_wrap_len(&mut self) -> SF_CMDS_WRAP_LEN_W<0> { + SF_CMDS_WRAP_LEN_W::new(self) } - #[doc = "Bit 10"] + #[doc = "Bit 4"] #[inline(always)] - pub fn sf_cmds_wrap_mode(&mut self) -> SF_CMDS_WRAP_MODE_W { - SF_CMDS_WRAP_MODE_W { w: self } + #[must_use] + pub fn sf_cmds_en(&mut self) -> SF_CMDS_EN_W<4> { + SF_CMDS_EN_W::new(self) } - #[doc = "Bit 9"] + #[doc = "Bits 5:7"] #[inline(always)] - pub fn sf_cmds_wrap_q_ini(&mut self) -> SF_CMDS_WRAP_Q_INI_W { - SF_CMDS_WRAP_Q_INI_W { w: self } + #[must_use] + pub fn sf_cmds_bt_dly(&mut self) -> SF_CMDS_BT_DLY_W<5> { + SF_CMDS_BT_DLY_W::new(self) } #[doc = "Bit 8"] #[inline(always)] - pub fn sf_cmds_bt_en(&mut self) -> SF_CMDS_BT_EN_W { - SF_CMDS_BT_EN_W { w: self } + #[must_use] + pub fn sf_cmds_bt_en(&mut self) -> SF_CMDS_BT_EN_W<8> { + SF_CMDS_BT_EN_W::new(self) } - #[doc = "Bits 5:7"] + #[doc = "Bit 9"] #[inline(always)] - pub fn sf_cmds_bt_dly(&mut self) -> SF_CMDS_BT_DLY_W { - SF_CMDS_BT_DLY_W { w: self } + #[must_use] + pub fn sf_cmds_wrap_q_ini(&mut self) -> SF_CMDS_WRAP_Q_INI_W<9> { + SF_CMDS_WRAP_Q_INI_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 10"] #[inline(always)] - pub fn sf_cmds_en(&mut self) -> SF_CMDS_EN_W { - SF_CMDS_EN_W { w: self } + #[must_use] + pub fn sf_cmds_wrap_mode(&mut self) -> SF_CMDS_WRAP_MODE_W<10> { + SF_CMDS_WRAP_MODE_W::new(self) } - #[doc = "Bits 0:3"] + #[doc = "Bits 29:31"] #[inline(always)] - pub fn sf_cmds_wrap_len(&mut self) -> SF_CMDS_WRAP_LEN_W { - SF_CMDS_WRAP_LEN_W { w: self } + #[must_use] + pub fn sf_if_1_ack_lat(&mut self) -> SF_IF_1_ACK_LAT_W<29> { + SF_IF_1_ACK_LAT_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -345,11 +164,10 @@ impl crate::Readable for SF_CTRL_3_SPEC { #[doc = "`write(|w| ..)` method takes [sf_ctrl_3::W](W) writer structure"] impl crate::Writable for SF_CTRL_3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_ctrl_3 to value 0x2000_0046"] impl crate::Resettable for SF_CTRL_3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x2000_0046 - } + const RESET_VALUE: Self::Ux = 0x2000_0046; } diff --git a/src/sf_ctrl/sf_ctrl_prot_en.rs b/src/sf_ctrl/sf_ctrl_prot_en.rs index cd66d3f..cbc295a 100644 --- a/src/sf_ctrl/sf_ctrl_prot_en.rs +++ b/src/sf_ctrl/sf_ctrl_prot_en.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,153 +28,65 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `sf_ctrl_id1_en` reader - "] -pub struct SF_CTRL_ID1_EN_R(crate::FieldReader); -impl SF_CTRL_ID1_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_CTRL_ID1_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_CTRL_ID1_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_ctrl_id1_en` writer - "] -pub struct SF_CTRL_ID1_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_CTRL_ID1_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `sf_ctrl_id0_en` reader - "] -pub struct SF_CTRL_ID0_EN_R(crate::FieldReader); -impl SF_CTRL_ID0_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_CTRL_ID0_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_CTRL_ID0_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_ctrl_id0_en` writer - "] -pub struct SF_CTRL_ID0_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_CTRL_ID0_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `sf_ctrl_prot_en` reader - "] -pub struct SF_CTRL_PROT_EN_R(crate::FieldReader); -impl SF_CTRL_PROT_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_CTRL_PROT_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_CTRL_PROT_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_CTRL_PROT_EN_R = crate::BitReader; #[doc = "Field `sf_ctrl_prot_en` writer - "] -pub struct SF_CTRL_PROT_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_CTRL_PROT_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type SF_CTRL_PROT_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SF_CTRL_PROT_EN_SPEC, bool, O>; +#[doc = "Field `sf_ctrl_id0_en` reader - "] +pub type SF_CTRL_ID0_EN_R = crate::BitReader; +#[doc = "Field `sf_ctrl_id0_en` writer - "] +pub type SF_CTRL_ID0_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SF_CTRL_PROT_EN_SPEC, bool, O>; +#[doc = "Field `sf_ctrl_id1_en` reader - "] +pub type SF_CTRL_ID1_EN_R = crate::BitReader; +#[doc = "Field `sf_ctrl_id1_en` writer - "] +pub type SF_CTRL_ID1_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SF_CTRL_PROT_EN_SPEC, bool, O>; impl R { - #[doc = "Bit 2"] + #[doc = "Bit 0"] #[inline(always)] - pub fn sf_ctrl_id1_en(&self) -> SF_CTRL_ID1_EN_R { - SF_CTRL_ID1_EN_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn sf_ctrl_prot_en(&self) -> SF_CTRL_PROT_EN_R { + SF_CTRL_PROT_EN_R::new((self.bits & 1) != 0) } #[doc = "Bit 1"] #[inline(always)] pub fn sf_ctrl_id0_en(&self) -> SF_CTRL_ID0_EN_R { - SF_CTRL_ID0_EN_R::new(((self.bits >> 1) & 0x01) != 0) + SF_CTRL_ID0_EN_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 2"] #[inline(always)] - pub fn sf_ctrl_prot_en(&self) -> SF_CTRL_PROT_EN_R { - SF_CTRL_PROT_EN_R::new((self.bits & 0x01) != 0) + pub fn sf_ctrl_id1_en(&self) -> SF_CTRL_ID1_EN_R { + SF_CTRL_ID1_EN_R::new(((self.bits >> 2) & 1) != 0) } } impl W { - #[doc = "Bit 2"] + #[doc = "Bit 0"] #[inline(always)] - pub fn sf_ctrl_id1_en(&mut self) -> SF_CTRL_ID1_EN_W { - SF_CTRL_ID1_EN_W { w: self } + #[must_use] + pub fn sf_ctrl_prot_en(&mut self) -> SF_CTRL_PROT_EN_W<0> { + SF_CTRL_PROT_EN_W::new(self) } #[doc = "Bit 1"] #[inline(always)] - pub fn sf_ctrl_id0_en(&mut self) -> SF_CTRL_ID0_EN_W { - SF_CTRL_ID0_EN_W { w: self } + #[must_use] + pub fn sf_ctrl_id0_en(&mut self) -> SF_CTRL_ID0_EN_W<1> { + SF_CTRL_ID0_EN_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 2"] #[inline(always)] - pub fn sf_ctrl_prot_en(&mut self) -> SF_CTRL_PROT_EN_W { - SF_CTRL_PROT_EN_W { w: self } + #[must_use] + pub fn sf_ctrl_id1_en(&mut self) -> SF_CTRL_ID1_EN_W<2> { + SF_CTRL_ID1_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -191,11 +104,10 @@ impl crate::Readable for SF_CTRL_PROT_EN_SPEC { #[doc = "`write(|w| ..)` method takes [sf_ctrl_prot_en::W](W) writer structure"] impl crate::Writable for SF_CTRL_PROT_EN_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_ctrl_prot_en to value 0x07"] impl crate::Resettable for SF_CTRL_PROT_EN_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x07 - } + const RESET_VALUE: Self::Ux = 0x07; } diff --git a/src/sf_ctrl/sf_ctrl_prot_en_rd.rs b/src/sf_ctrl/sf_ctrl_prot_en_rd.rs index 14b05ee..8133f2c 100644 --- a/src/sf_ctrl/sf_ctrl_prot_en_rd.rs +++ b/src/sf_ctrl/sf_ctrl_prot_en_rd.rs @@ -7,106 +7,47 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `sf_dbg_dis` reader - "] -pub struct SF_DBG_DIS_R(crate::FieldReader); -impl SF_DBG_DIS_R { - pub(crate) fn new(bits: bool) -> Self { - SF_DBG_DIS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_DBG_DIS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_0_trig_wr_lock` reader - "] -pub struct SF_IF_0_TRIG_WR_LOCK_R(crate::FieldReader); -impl SF_IF_0_TRIG_WR_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - SF_IF_0_TRIG_WR_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_0_TRIG_WR_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_ctrl_id1_en_rd` reader - "] -pub struct SF_CTRL_ID1_EN_RD_R(crate::FieldReader); -impl SF_CTRL_ID1_EN_RD_R { - pub(crate) fn new(bits: bool) -> Self { - SF_CTRL_ID1_EN_RD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_CTRL_ID1_EN_RD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_ctrl_id0_en_rd` reader - "] -pub struct SF_CTRL_ID0_EN_RD_R(crate::FieldReader); -impl SF_CTRL_ID0_EN_RD_R { - pub(crate) fn new(bits: bool) -> Self { - SF_CTRL_ID0_EN_RD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_CTRL_ID0_EN_RD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} #[doc = "Field `sf_ctrl_prot_en_rd` reader - "] -pub struct SF_CTRL_PROT_EN_RD_R(crate::FieldReader); -impl SF_CTRL_PROT_EN_RD_R { - pub(crate) fn new(bits: bool) -> Self { - SF_CTRL_PROT_EN_RD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_CTRL_PROT_EN_RD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_CTRL_PROT_EN_RD_R = crate::BitReader; +#[doc = "Field `sf_ctrl_id0_en_rd` reader - "] +pub type SF_CTRL_ID0_EN_RD_R = crate::BitReader; +#[doc = "Field `sf_ctrl_id1_en_rd` reader - "] +pub type SF_CTRL_ID1_EN_RD_R = crate::BitReader; +#[doc = "Field `sf_if_0_trig_wr_lock` reader - "] +pub type SF_IF_0_TRIG_WR_LOCK_R = crate::BitReader; +#[doc = "Field `sf_dbg_dis` reader - "] +pub type SF_DBG_DIS_R = crate::BitReader; impl R { - #[doc = "Bit 31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn sf_dbg_dis(&self) -> SF_DBG_DIS_R { - SF_DBG_DIS_R::new(((self.bits >> 31) & 0x01) != 0) + pub fn sf_ctrl_prot_en_rd(&self) -> SF_CTRL_PROT_EN_RD_R { + SF_CTRL_PROT_EN_RD_R::new((self.bits & 1) != 0) } - #[doc = "Bit 30"] + #[doc = "Bit 1"] #[inline(always)] - pub fn sf_if_0_trig_wr_lock(&self) -> SF_IF_0_TRIG_WR_LOCK_R { - SF_IF_0_TRIG_WR_LOCK_R::new(((self.bits >> 30) & 0x01) != 0) + pub fn sf_ctrl_id0_en_rd(&self) -> SF_CTRL_ID0_EN_RD_R { + SF_CTRL_ID0_EN_RD_R::new(((self.bits >> 1) & 1) != 0) } #[doc = "Bit 2"] #[inline(always)] pub fn sf_ctrl_id1_en_rd(&self) -> SF_CTRL_ID1_EN_RD_R { - SF_CTRL_ID1_EN_RD_R::new(((self.bits >> 2) & 0x01) != 0) + SF_CTRL_ID1_EN_RD_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 30"] #[inline(always)] - pub fn sf_ctrl_id0_en_rd(&self) -> SF_CTRL_ID0_EN_RD_R { - SF_CTRL_ID0_EN_RD_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn sf_if_0_trig_wr_lock(&self) -> SF_IF_0_TRIG_WR_LOCK_R { + SF_IF_0_TRIG_WR_LOCK_R::new(((self.bits >> 30) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 31"] #[inline(always)] - pub fn sf_ctrl_prot_en_rd(&self) -> SF_CTRL_PROT_EN_RD_R { - SF_CTRL_PROT_EN_RD_R::new((self.bits & 0x01) != 0) + pub fn sf_dbg_dis(&self) -> SF_DBG_DIS_R { + SF_DBG_DIS_R::new(((self.bits >> 31) & 1) != 0) } } #[doc = "sf_ctrl_prot_en_rd.\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 [sf_ctrl_prot_en_rd](index.html) module"] @@ -120,8 +61,5 @@ impl crate::Readable for SF_CTRL_PROT_EN_RD_SPEC { } #[doc = "`reset()` method sets sf_ctrl_prot_en_rd to value 0x07"] impl crate::Resettable for SF_CTRL_PROT_EN_RD_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x07 - } + const RESET_VALUE: Self::Ux = 0x07; } diff --git a/src/sf_ctrl/sf_id0_offset.rs b/src/sf_ctrl/sf_id0_offset.rs index 5881fb2..f0844f4 100644 --- a/src/sf_ctrl/sf_id0_offset.rs +++ b/src/sf_ctrl/sf_id0_offset.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_id0_offset` reader - "] -pub struct SF_ID0_OFFSET_R(crate::FieldReader); -impl SF_ID0_OFFSET_R { - pub(crate) fn new(bits: u32) -> Self { - SF_ID0_OFFSET_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_ID0_OFFSET_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_ID0_OFFSET_R = crate::FieldReader; #[doc = "Field `sf_id0_offset` writer - "] -pub struct SF_ID0_OFFSET_W<'a> { - w: &'a mut W, -} -impl<'a> SF_ID0_OFFSET_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0x00ff_ffff) | (value as u32 & 0x00ff_ffff); - self.w - } -} +pub type SF_ID0_OFFSET_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_ID0_OFFSET_SPEC, u32, u32, 24, O>; impl R { #[doc = "Bits 0:23"] #[inline(always)] pub fn sf_id0_offset(&self) -> SF_ID0_OFFSET_R { - SF_ID0_OFFSET_R::new((self.bits & 0x00ff_ffff) as u32) + SF_ID0_OFFSET_R::new(self.bits & 0x00ff_ffff) } } impl W { #[doc = "Bits 0:23"] #[inline(always)] - pub fn sf_id0_offset(&mut self) -> SF_ID0_OFFSET_W { - SF_ID0_OFFSET_W { w: self } + #[must_use] + pub fn sf_id0_offset(&mut self) -> SF_ID0_OFFSET_W<0> { + SF_ID0_OFFSET_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_ID0_OFFSET_SPEC { #[doc = "`write(|w| ..)` method takes [sf_id0_offset::W](W) writer structure"] impl crate::Writable for SF_ID0_OFFSET_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_id0_offset to value 0"] impl crate::Resettable for SF_ID0_OFFSET_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_id1_offset.rs b/src/sf_ctrl/sf_id1_offset.rs index 783094b..430fc7b 100644 --- a/src/sf_ctrl/sf_id1_offset.rs +++ b/src/sf_ctrl/sf_id1_offset.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_id1_offset` reader - "] -pub struct SF_ID1_OFFSET_R(crate::FieldReader); -impl SF_ID1_OFFSET_R { - pub(crate) fn new(bits: u32) -> Self { - SF_ID1_OFFSET_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_ID1_OFFSET_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_ID1_OFFSET_R = crate::FieldReader; #[doc = "Field `sf_id1_offset` writer - "] -pub struct SF_ID1_OFFSET_W<'a> { - w: &'a mut W, -} -impl<'a> SF_ID1_OFFSET_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0x00ff_ffff) | (value as u32 & 0x00ff_ffff); - self.w - } -} +pub type SF_ID1_OFFSET_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_ID1_OFFSET_SPEC, u32, u32, 24, O>; impl R { #[doc = "Bits 0:23"] #[inline(always)] pub fn sf_id1_offset(&self) -> SF_ID1_OFFSET_R { - SF_ID1_OFFSET_R::new((self.bits & 0x00ff_ffff) as u32) + SF_ID1_OFFSET_R::new(self.bits & 0x00ff_ffff) } } impl W { #[doc = "Bits 0:23"] #[inline(always)] - pub fn sf_id1_offset(&mut self) -> SF_ID1_OFFSET_W { - SF_ID1_OFFSET_W { w: self } + #[must_use] + pub fn sf_id1_offset(&mut self) -> SF_ID1_OFFSET_W<0> { + SF_ID1_OFFSET_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_ID1_OFFSET_SPEC { #[doc = "`write(|w| ..)` method takes [sf_id1_offset::W](W) writer structure"] impl crate::Writable for SF_ID1_OFFSET_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_id1_offset to value 0"] impl crate::Resettable for SF_ID1_OFFSET_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_if_iahb_0.rs b/src/sf_ctrl/sf_if_iahb_0.rs index f272e6a..2364468 100644 --- a/src/sf_ctrl/sf_if_iahb_0.rs +++ b/src/sf_ctrl/sf_if_iahb_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,435 +28,172 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `sf_if_1_qpi_mode_en` reader - "] -pub struct SF_IF_1_QPI_MODE_EN_R(crate::FieldReader); -impl SF_IF_1_QPI_MODE_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_IF_1_QPI_MODE_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_1_QPI_MODE_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_1_qpi_mode_en` writer - "] -pub struct SF_IF_1_QPI_MODE_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_1_QPI_MODE_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 31)) | ((value as u32 & 0x01) << 31); - self.w - } -} -#[doc = "Field `sf_if_1_spi_mode` reader - "] -pub struct SF_IF_1_SPI_MODE_R(crate::FieldReader); -impl SF_IF_1_SPI_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - SF_IF_1_SPI_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_1_SPI_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_1_spi_mode` writer - "] -pub struct SF_IF_1_SPI_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_1_SPI_MODE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 28)) | ((value as u32 & 0x07) << 28); - self.w - } -} -#[doc = "Field `sf_if_1_cmd_en` reader - "] -pub struct SF_IF_1_CMD_EN_R(crate::FieldReader); -impl SF_IF_1_CMD_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_IF_1_CMD_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_1_CMD_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_1_cmd_en` writer - "] -pub struct SF_IF_1_CMD_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_1_CMD_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 27)) | ((value as u32 & 0x01) << 27); - self.w - } -} -#[doc = "Field `sf_if_1_adr_en` reader - "] -pub struct SF_IF_1_ADR_EN_R(crate::FieldReader); -impl SF_IF_1_ADR_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_IF_1_ADR_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_1_ADR_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_1_adr_en` writer - "] -pub struct SF_IF_1_ADR_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_1_ADR_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 26)) | ((value as u32 & 0x01) << 26); - self.w - } -} -#[doc = "Field `sf_if_1_dmy_en` reader - "] -pub struct SF_IF_1_DMY_EN_R(crate::FieldReader); -impl SF_IF_1_DMY_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_IF_1_DMY_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_1_DMY_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_1_dmy_en` writer - "] -pub struct SF_IF_1_DMY_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_1_DMY_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 25)) | ((value as u32 & 0x01) << 25); - self.w - } -} -#[doc = "Field `sf_if_1_dat_en` reader - "] -pub struct SF_IF_1_DAT_EN_R(crate::FieldReader); -impl SF_IF_1_DAT_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_IF_1_DAT_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_1_DAT_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_1_dat_en` writer - "] -pub struct SF_IF_1_DAT_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_1_DAT_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24); - self.w - } -} -#[doc = "Field `sf_if_1_dat_rw` reader - "] -pub struct SF_IF_1_DAT_RW_R(crate::FieldReader); -impl SF_IF_1_DAT_RW_R { - pub(crate) fn new(bits: bool) -> Self { - SF_IF_1_DAT_RW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_1_DAT_RW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_1_dat_rw` writer - "] -pub struct SF_IF_1_DAT_RW_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_1_DAT_RW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23); - self.w - } -} -#[doc = "Field `sf_if_1_cmd_byte` reader - "] -pub struct SF_IF_1_CMD_BYTE_R(crate::FieldReader); -impl SF_IF_1_CMD_BYTE_R { - pub(crate) fn new(bits: u8) -> Self { - SF_IF_1_CMD_BYTE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_1_CMD_BYTE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_1_cmd_byte` writer - "] -pub struct SF_IF_1_CMD_BYTE_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_1_CMD_BYTE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 20)) | ((value as u32 & 0x07) << 20); - self.w - } -} -#[doc = "Field `sf_if_1_adr_byte` reader - "] -pub struct SF_IF_1_ADR_BYTE_R(crate::FieldReader); -impl SF_IF_1_ADR_BYTE_R { - pub(crate) fn new(bits: u8) -> Self { - SF_IF_1_ADR_BYTE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_1_ADR_BYTE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_1_adr_byte` writer - "] -pub struct SF_IF_1_ADR_BYTE_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_1_ADR_BYTE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 17)) | ((value as u32 & 0x07) << 17); - self.w - } -} #[doc = "Field `sf_if_1_dmy_byte` reader - "] -pub struct SF_IF_1_DMY_BYTE_R(crate::FieldReader); -impl SF_IF_1_DMY_BYTE_R { - pub(crate) fn new(bits: u8) -> Self { - SF_IF_1_DMY_BYTE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_1_DMY_BYTE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_IF_1_DMY_BYTE_R = crate::FieldReader; #[doc = "Field `sf_if_1_dmy_byte` writer - "] -pub struct SF_IF_1_DMY_BYTE_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_1_DMY_BYTE_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type SF_IF_1_DMY_BYTE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_IAHB_0_SPEC, u8, u8, 5, O>; +#[doc = "Field `sf_if_1_adr_byte` reader - "] +pub type SF_IF_1_ADR_BYTE_R = crate::FieldReader; +#[doc = "Field `sf_if_1_adr_byte` writer - "] +pub type SF_IF_1_ADR_BYTE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_IAHB_0_SPEC, u8, u8, 3, O>; +#[doc = "Field `sf_if_1_cmd_byte` reader - "] +pub type SF_IF_1_CMD_BYTE_R = crate::FieldReader; +#[doc = "Field `sf_if_1_cmd_byte` writer - "] +pub type SF_IF_1_CMD_BYTE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_IAHB_0_SPEC, u8, u8, 3, O>; +#[doc = "Field `sf_if_1_dat_rw` reader - "] +pub type SF_IF_1_DAT_RW_R = crate::BitReader; +#[doc = "Field `sf_if_1_dat_rw` writer - "] +pub type SF_IF_1_DAT_RW_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_IF_IAHB_0_SPEC, bool, O>; +#[doc = "Field `sf_if_1_dat_en` reader - "] +pub type SF_IF_1_DAT_EN_R = crate::BitReader; +#[doc = "Field `sf_if_1_dat_en` writer - "] +pub type SF_IF_1_DAT_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_IF_IAHB_0_SPEC, bool, O>; +#[doc = "Field `sf_if_1_dmy_en` reader - "] +pub type SF_IF_1_DMY_EN_R = crate::BitReader; +#[doc = "Field `sf_if_1_dmy_en` writer - "] +pub type SF_IF_1_DMY_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_IF_IAHB_0_SPEC, bool, O>; +#[doc = "Field `sf_if_1_adr_en` reader - "] +pub type SF_IF_1_ADR_EN_R = crate::BitReader; +#[doc = "Field `sf_if_1_adr_en` writer - "] +pub type SF_IF_1_ADR_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_IF_IAHB_0_SPEC, bool, O>; +#[doc = "Field `sf_if_1_cmd_en` reader - "] +pub type SF_IF_1_CMD_EN_R = crate::BitReader; +#[doc = "Field `sf_if_1_cmd_en` writer - "] +pub type SF_IF_1_CMD_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_IF_IAHB_0_SPEC, bool, O>; +#[doc = "Field `sf_if_1_spi_mode` reader - "] +pub type SF_IF_1_SPI_MODE_R = crate::FieldReader; +#[doc = "Field `sf_if_1_spi_mode` writer - "] +pub type SF_IF_1_SPI_MODE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_IAHB_0_SPEC, u8, u8, 3, O>; +#[doc = "Field `sf_if_1_qpi_mode_en` reader - "] +pub type SF_IF_1_QPI_MODE_EN_R = crate::BitReader; +#[doc = "Field `sf_if_1_qpi_mode_en` writer - "] +pub type SF_IF_1_QPI_MODE_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SF_IF_IAHB_0_SPEC, bool, O>; +impl R { + #[doc = "Bits 12:16"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 12)) | ((value as u32 & 0x1f) << 12); - self.w + pub fn sf_if_1_dmy_byte(&self) -> SF_IF_1_DMY_BYTE_R { + SF_IF_1_DMY_BYTE_R::new(((self.bits >> 12) & 0x1f) as u8) } -} -impl R { - #[doc = "Bit 31"] + #[doc = "Bits 17:19"] #[inline(always)] - pub fn sf_if_1_qpi_mode_en(&self) -> SF_IF_1_QPI_MODE_EN_R { - SF_IF_1_QPI_MODE_EN_R::new(((self.bits >> 31) & 0x01) != 0) + pub fn sf_if_1_adr_byte(&self) -> SF_IF_1_ADR_BYTE_R { + SF_IF_1_ADR_BYTE_R::new(((self.bits >> 17) & 7) as u8) } - #[doc = "Bits 28:30"] + #[doc = "Bits 20:22"] #[inline(always)] - pub fn sf_if_1_spi_mode(&self) -> SF_IF_1_SPI_MODE_R { - SF_IF_1_SPI_MODE_R::new(((self.bits >> 28) & 0x07) as u8) + pub fn sf_if_1_cmd_byte(&self) -> SF_IF_1_CMD_BYTE_R { + SF_IF_1_CMD_BYTE_R::new(((self.bits >> 20) & 7) as u8) } - #[doc = "Bit 27"] + #[doc = "Bit 23"] #[inline(always)] - pub fn sf_if_1_cmd_en(&self) -> SF_IF_1_CMD_EN_R { - SF_IF_1_CMD_EN_R::new(((self.bits >> 27) & 0x01) != 0) + pub fn sf_if_1_dat_rw(&self) -> SF_IF_1_DAT_RW_R { + SF_IF_1_DAT_RW_R::new(((self.bits >> 23) & 1) != 0) } - #[doc = "Bit 26"] + #[doc = "Bit 24"] #[inline(always)] - pub fn sf_if_1_adr_en(&self) -> SF_IF_1_ADR_EN_R { - SF_IF_1_ADR_EN_R::new(((self.bits >> 26) & 0x01) != 0) + pub fn sf_if_1_dat_en(&self) -> SF_IF_1_DAT_EN_R { + SF_IF_1_DAT_EN_R::new(((self.bits >> 24) & 1) != 0) } #[doc = "Bit 25"] #[inline(always)] pub fn sf_if_1_dmy_en(&self) -> SF_IF_1_DMY_EN_R { - SF_IF_1_DMY_EN_R::new(((self.bits >> 25) & 0x01) != 0) + SF_IF_1_DMY_EN_R::new(((self.bits >> 25) & 1) != 0) } - #[doc = "Bit 24"] - #[inline(always)] - pub fn sf_if_1_dat_en(&self) -> SF_IF_1_DAT_EN_R { - SF_IF_1_DAT_EN_R::new(((self.bits >> 24) & 0x01) != 0) - } - #[doc = "Bit 23"] + #[doc = "Bit 26"] #[inline(always)] - pub fn sf_if_1_dat_rw(&self) -> SF_IF_1_DAT_RW_R { - SF_IF_1_DAT_RW_R::new(((self.bits >> 23) & 0x01) != 0) + pub fn sf_if_1_adr_en(&self) -> SF_IF_1_ADR_EN_R { + SF_IF_1_ADR_EN_R::new(((self.bits >> 26) & 1) != 0) } - #[doc = "Bits 20:22"] + #[doc = "Bit 27"] #[inline(always)] - pub fn sf_if_1_cmd_byte(&self) -> SF_IF_1_CMD_BYTE_R { - SF_IF_1_CMD_BYTE_R::new(((self.bits >> 20) & 0x07) as u8) + pub fn sf_if_1_cmd_en(&self) -> SF_IF_1_CMD_EN_R { + SF_IF_1_CMD_EN_R::new(((self.bits >> 27) & 1) != 0) } - #[doc = "Bits 17:19"] + #[doc = "Bits 28:30"] #[inline(always)] - pub fn sf_if_1_adr_byte(&self) -> SF_IF_1_ADR_BYTE_R { - SF_IF_1_ADR_BYTE_R::new(((self.bits >> 17) & 0x07) as u8) + pub fn sf_if_1_spi_mode(&self) -> SF_IF_1_SPI_MODE_R { + SF_IF_1_SPI_MODE_R::new(((self.bits >> 28) & 7) as u8) } - #[doc = "Bits 12:16"] + #[doc = "Bit 31"] #[inline(always)] - pub fn sf_if_1_dmy_byte(&self) -> SF_IF_1_DMY_BYTE_R { - SF_IF_1_DMY_BYTE_R::new(((self.bits >> 12) & 0x1f) as u8) + pub fn sf_if_1_qpi_mode_en(&self) -> SF_IF_1_QPI_MODE_EN_R { + SF_IF_1_QPI_MODE_EN_R::new(((self.bits >> 31) & 1) != 0) } } impl W { - #[doc = "Bit 31"] + #[doc = "Bits 12:16"] #[inline(always)] - pub fn sf_if_1_qpi_mode_en(&mut self) -> SF_IF_1_QPI_MODE_EN_W { - SF_IF_1_QPI_MODE_EN_W { w: self } + #[must_use] + pub fn sf_if_1_dmy_byte(&mut self) -> SF_IF_1_DMY_BYTE_W<12> { + SF_IF_1_DMY_BYTE_W::new(self) } - #[doc = "Bits 28:30"] + #[doc = "Bits 17:19"] #[inline(always)] - pub fn sf_if_1_spi_mode(&mut self) -> SF_IF_1_SPI_MODE_W { - SF_IF_1_SPI_MODE_W { w: self } + #[must_use] + pub fn sf_if_1_adr_byte(&mut self) -> SF_IF_1_ADR_BYTE_W<17> { + SF_IF_1_ADR_BYTE_W::new(self) } - #[doc = "Bit 27"] + #[doc = "Bits 20:22"] #[inline(always)] - pub fn sf_if_1_cmd_en(&mut self) -> SF_IF_1_CMD_EN_W { - SF_IF_1_CMD_EN_W { w: self } + #[must_use] + pub fn sf_if_1_cmd_byte(&mut self) -> SF_IF_1_CMD_BYTE_W<20> { + SF_IF_1_CMD_BYTE_W::new(self) } - #[doc = "Bit 26"] + #[doc = "Bit 23"] #[inline(always)] - pub fn sf_if_1_adr_en(&mut self) -> SF_IF_1_ADR_EN_W { - SF_IF_1_ADR_EN_W { w: self } + #[must_use] + pub fn sf_if_1_dat_rw(&mut self) -> SF_IF_1_DAT_RW_W<23> { + SF_IF_1_DAT_RW_W::new(self) } - #[doc = "Bit 25"] + #[doc = "Bit 24"] #[inline(always)] - pub fn sf_if_1_dmy_en(&mut self) -> SF_IF_1_DMY_EN_W { - SF_IF_1_DMY_EN_W { w: self } + #[must_use] + pub fn sf_if_1_dat_en(&mut self) -> SF_IF_1_DAT_EN_W<24> { + SF_IF_1_DAT_EN_W::new(self) } - #[doc = "Bit 24"] + #[doc = "Bit 25"] #[inline(always)] - pub fn sf_if_1_dat_en(&mut self) -> SF_IF_1_DAT_EN_W { - SF_IF_1_DAT_EN_W { w: self } + #[must_use] + pub fn sf_if_1_dmy_en(&mut self) -> SF_IF_1_DMY_EN_W<25> { + SF_IF_1_DMY_EN_W::new(self) } - #[doc = "Bit 23"] + #[doc = "Bit 26"] #[inline(always)] - pub fn sf_if_1_dat_rw(&mut self) -> SF_IF_1_DAT_RW_W { - SF_IF_1_DAT_RW_W { w: self } + #[must_use] + pub fn sf_if_1_adr_en(&mut self) -> SF_IF_1_ADR_EN_W<26> { + SF_IF_1_ADR_EN_W::new(self) } - #[doc = "Bits 20:22"] + #[doc = "Bit 27"] #[inline(always)] - pub fn sf_if_1_cmd_byte(&mut self) -> SF_IF_1_CMD_BYTE_W { - SF_IF_1_CMD_BYTE_W { w: self } + #[must_use] + pub fn sf_if_1_cmd_en(&mut self) -> SF_IF_1_CMD_EN_W<27> { + SF_IF_1_CMD_EN_W::new(self) } - #[doc = "Bits 17:19"] + #[doc = "Bits 28:30"] #[inline(always)] - pub fn sf_if_1_adr_byte(&mut self) -> SF_IF_1_ADR_BYTE_W { - SF_IF_1_ADR_BYTE_W { w: self } + #[must_use] + pub fn sf_if_1_spi_mode(&mut self) -> SF_IF_1_SPI_MODE_W<28> { + SF_IF_1_SPI_MODE_W::new(self) } - #[doc = "Bits 12:16"] + #[doc = "Bit 31"] #[inline(always)] - pub fn sf_if_1_dmy_byte(&mut self) -> SF_IF_1_DMY_BYTE_W { - SF_IF_1_DMY_BYTE_W { w: self } + #[must_use] + pub fn sf_if_1_qpi_mode_en(&mut self) -> SF_IF_1_QPI_MODE_EN_W<31> { + SF_IF_1_QPI_MODE_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -473,11 +211,10 @@ impl crate::Readable for SF_IF_IAHB_0_SPEC { #[doc = "`write(|w| ..)` method takes [sf_if_iahb_0::W](W) writer structure"] impl crate::Writable for SF_IF_IAHB_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_if_iahb_0 to value 0x0d04_0000"] impl crate::Resettable for SF_IF_IAHB_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0d04_0000 - } + const RESET_VALUE: Self::Ux = 0x0d04_0000; } diff --git a/src/sf_ctrl/sf_if_iahb_1.rs b/src/sf_ctrl/sf_if_iahb_1.rs index 0791cf6..9714f52 100644 --- a/src/sf_ctrl/sf_if_iahb_1.rs +++ b/src/sf_ctrl/sf_if_iahb_1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_if_1_cmd_buf_0` reader - "] -pub struct SF_IF_1_CMD_BUF_0_R(crate::FieldReader); -impl SF_IF_1_CMD_BUF_0_R { - pub(crate) fn new(bits: u32) -> Self { - SF_IF_1_CMD_BUF_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_1_CMD_BUF_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_IF_1_CMD_BUF_0_R = crate::FieldReader; #[doc = "Field `sf_if_1_cmd_buf_0` writer - "] -pub struct SF_IF_1_CMD_BUF_0_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_1_CMD_BUF_0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_IF_1_CMD_BUF_0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_IAHB_1_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_if_1_cmd_buf_0(&self) -> SF_IF_1_CMD_BUF_0_R { - SF_IF_1_CMD_BUF_0_R::new((self.bits & 0xffff_ffff) as u32) + SF_IF_1_CMD_BUF_0_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_if_1_cmd_buf_0(&mut self) -> SF_IF_1_CMD_BUF_0_W { - SF_IF_1_CMD_BUF_0_W { w: self } + #[must_use] + pub fn sf_if_1_cmd_buf_0(&mut self) -> SF_IF_1_CMD_BUF_0_W<0> { + SF_IF_1_CMD_BUF_0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_IF_IAHB_1_SPEC { #[doc = "`write(|w| ..)` method takes [sf_if_iahb_1::W](W) writer structure"] impl crate::Writable for SF_IF_IAHB_1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_if_iahb_1 to value 0x0300_0000"] impl crate::Resettable for SF_IF_IAHB_1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0300_0000 - } + const RESET_VALUE: Self::Ux = 0x0300_0000; } diff --git a/src/sf_ctrl/sf_if_iahb_2.rs b/src/sf_ctrl/sf_if_iahb_2.rs index 14a982a..0229f1e 100644 --- a/src/sf_ctrl/sf_if_iahb_2.rs +++ b/src/sf_ctrl/sf_if_iahb_2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_if_1_cmd_buf_1` reader - "] -pub struct SF_IF_1_CMD_BUF_1_R(crate::FieldReader); -impl SF_IF_1_CMD_BUF_1_R { - pub(crate) fn new(bits: u32) -> Self { - SF_IF_1_CMD_BUF_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_1_CMD_BUF_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_IF_1_CMD_BUF_1_R = crate::FieldReader; #[doc = "Field `sf_if_1_cmd_buf_1` writer - "] -pub struct SF_IF_1_CMD_BUF_1_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_1_CMD_BUF_1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_IF_1_CMD_BUF_1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_IAHB_2_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_if_1_cmd_buf_1(&self) -> SF_IF_1_CMD_BUF_1_R { - SF_IF_1_CMD_BUF_1_R::new((self.bits & 0xffff_ffff) as u32) + SF_IF_1_CMD_BUF_1_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_if_1_cmd_buf_1(&mut self) -> SF_IF_1_CMD_BUF_1_W { - SF_IF_1_CMD_BUF_1_W { w: self } + #[must_use] + pub fn sf_if_1_cmd_buf_1(&mut self) -> SF_IF_1_CMD_BUF_1_W<0> { + SF_IF_1_CMD_BUF_1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_IF_IAHB_2_SPEC { #[doc = "`write(|w| ..)` method takes [sf_if_iahb_2::W](W) writer structure"] impl crate::Writable for SF_IF_IAHB_2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_if_iahb_2 to value 0"] impl crate::Resettable for SF_IF_IAHB_2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_if_iahb_3.rs b/src/sf_ctrl/sf_if_iahb_3.rs index 112f016..4071d17 100644 --- a/src/sf_ctrl/sf_if_iahb_3.rs +++ b/src/sf_ctrl/sf_if_iahb_3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,435 +28,172 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `sf_if_2_qpi_mode_en` reader - "] -pub struct SF_IF_2_QPI_MODE_EN_R(crate::FieldReader); -impl SF_IF_2_QPI_MODE_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_IF_2_QPI_MODE_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_2_QPI_MODE_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_2_qpi_mode_en` writer - "] -pub struct SF_IF_2_QPI_MODE_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_2_QPI_MODE_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 31)) | ((value as u32 & 0x01) << 31); - self.w - } -} -#[doc = "Field `sf_if_2_spi_mode` reader - "] -pub struct SF_IF_2_SPI_MODE_R(crate::FieldReader); -impl SF_IF_2_SPI_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - SF_IF_2_SPI_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_2_SPI_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_2_spi_mode` writer - "] -pub struct SF_IF_2_SPI_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_2_SPI_MODE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 28)) | ((value as u32 & 0x07) << 28); - self.w - } -} -#[doc = "Field `sf_if_2_cmd_en` reader - "] -pub struct SF_IF_2_CMD_EN_R(crate::FieldReader); -impl SF_IF_2_CMD_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_IF_2_CMD_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_2_CMD_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_2_cmd_en` writer - "] -pub struct SF_IF_2_CMD_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_2_CMD_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 27)) | ((value as u32 & 0x01) << 27); - self.w - } -} -#[doc = "Field `sf_if_2_adr_en` reader - "] -pub struct SF_IF_2_ADR_EN_R(crate::FieldReader); -impl SF_IF_2_ADR_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_IF_2_ADR_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_2_ADR_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_2_adr_en` writer - "] -pub struct SF_IF_2_ADR_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_2_ADR_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 26)) | ((value as u32 & 0x01) << 26); - self.w - } -} -#[doc = "Field `sf_if_2_dmy_en` reader - "] -pub struct SF_IF_2_DMY_EN_R(crate::FieldReader); -impl SF_IF_2_DMY_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_IF_2_DMY_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_2_DMY_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_2_dmy_en` writer - "] -pub struct SF_IF_2_DMY_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_2_DMY_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 25)) | ((value as u32 & 0x01) << 25); - self.w - } -} -#[doc = "Field `sf_if_2_dat_en` reader - "] -pub struct SF_IF_2_DAT_EN_R(crate::FieldReader); -impl SF_IF_2_DAT_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_IF_2_DAT_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_2_DAT_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_2_dat_en` writer - "] -pub struct SF_IF_2_DAT_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_2_DAT_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24); - self.w - } -} -#[doc = "Field `sf_if_2_dat_rw` reader - "] -pub struct SF_IF_2_DAT_RW_R(crate::FieldReader); -impl SF_IF_2_DAT_RW_R { - pub(crate) fn new(bits: bool) -> Self { - SF_IF_2_DAT_RW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_2_DAT_RW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_2_dat_rw` writer - "] -pub struct SF_IF_2_DAT_RW_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_2_DAT_RW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23); - self.w - } -} -#[doc = "Field `sf_if_2_cmd_byte` reader - "] -pub struct SF_IF_2_CMD_BYTE_R(crate::FieldReader); -impl SF_IF_2_CMD_BYTE_R { - pub(crate) fn new(bits: u8) -> Self { - SF_IF_2_CMD_BYTE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_2_CMD_BYTE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_2_cmd_byte` writer - "] -pub struct SF_IF_2_CMD_BYTE_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_2_CMD_BYTE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 20)) | ((value as u32 & 0x07) << 20); - self.w - } -} -#[doc = "Field `sf_if_2_adr_byte` reader - "] -pub struct SF_IF_2_ADR_BYTE_R(crate::FieldReader); -impl SF_IF_2_ADR_BYTE_R { - pub(crate) fn new(bits: u8) -> Self { - SF_IF_2_ADR_BYTE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_2_ADR_BYTE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_2_adr_byte` writer - "] -pub struct SF_IF_2_ADR_BYTE_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_2_ADR_BYTE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 17)) | ((value as u32 & 0x07) << 17); - self.w - } -} #[doc = "Field `sf_if_2_dmy_byte` reader - "] -pub struct SF_IF_2_DMY_BYTE_R(crate::FieldReader); -impl SF_IF_2_DMY_BYTE_R { - pub(crate) fn new(bits: u8) -> Self { - SF_IF_2_DMY_BYTE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_2_DMY_BYTE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_IF_2_DMY_BYTE_R = crate::FieldReader; #[doc = "Field `sf_if_2_dmy_byte` writer - "] -pub struct SF_IF_2_DMY_BYTE_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_2_DMY_BYTE_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type SF_IF_2_DMY_BYTE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_IAHB_3_SPEC, u8, u8, 5, O>; +#[doc = "Field `sf_if_2_adr_byte` reader - "] +pub type SF_IF_2_ADR_BYTE_R = crate::FieldReader; +#[doc = "Field `sf_if_2_adr_byte` writer - "] +pub type SF_IF_2_ADR_BYTE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_IAHB_3_SPEC, u8, u8, 3, O>; +#[doc = "Field `sf_if_2_cmd_byte` reader - "] +pub type SF_IF_2_CMD_BYTE_R = crate::FieldReader; +#[doc = "Field `sf_if_2_cmd_byte` writer - "] +pub type SF_IF_2_CMD_BYTE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_IAHB_3_SPEC, u8, u8, 3, O>; +#[doc = "Field `sf_if_2_dat_rw` reader - "] +pub type SF_IF_2_DAT_RW_R = crate::BitReader; +#[doc = "Field `sf_if_2_dat_rw` writer - "] +pub type SF_IF_2_DAT_RW_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_IF_IAHB_3_SPEC, bool, O>; +#[doc = "Field `sf_if_2_dat_en` reader - "] +pub type SF_IF_2_DAT_EN_R = crate::BitReader; +#[doc = "Field `sf_if_2_dat_en` writer - "] +pub type SF_IF_2_DAT_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_IF_IAHB_3_SPEC, bool, O>; +#[doc = "Field `sf_if_2_dmy_en` reader - "] +pub type SF_IF_2_DMY_EN_R = crate::BitReader; +#[doc = "Field `sf_if_2_dmy_en` writer - "] +pub type SF_IF_2_DMY_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_IF_IAHB_3_SPEC, bool, O>; +#[doc = "Field `sf_if_2_adr_en` reader - "] +pub type SF_IF_2_ADR_EN_R = crate::BitReader; +#[doc = "Field `sf_if_2_adr_en` writer - "] +pub type SF_IF_2_ADR_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_IF_IAHB_3_SPEC, bool, O>; +#[doc = "Field `sf_if_2_cmd_en` reader - "] +pub type SF_IF_2_CMD_EN_R = crate::BitReader; +#[doc = "Field `sf_if_2_cmd_en` writer - "] +pub type SF_IF_2_CMD_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_IF_IAHB_3_SPEC, bool, O>; +#[doc = "Field `sf_if_2_spi_mode` reader - "] +pub type SF_IF_2_SPI_MODE_R = crate::FieldReader; +#[doc = "Field `sf_if_2_spi_mode` writer - "] +pub type SF_IF_2_SPI_MODE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_IAHB_3_SPEC, u8, u8, 3, O>; +#[doc = "Field `sf_if_2_qpi_mode_en` reader - "] +pub type SF_IF_2_QPI_MODE_EN_R = crate::BitReader; +#[doc = "Field `sf_if_2_qpi_mode_en` writer - "] +pub type SF_IF_2_QPI_MODE_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SF_IF_IAHB_3_SPEC, bool, O>; +impl R { + #[doc = "Bits 12:16"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 12)) | ((value as u32 & 0x1f) << 12); - self.w + pub fn sf_if_2_dmy_byte(&self) -> SF_IF_2_DMY_BYTE_R { + SF_IF_2_DMY_BYTE_R::new(((self.bits >> 12) & 0x1f) as u8) } -} -impl R { - #[doc = "Bit 31"] + #[doc = "Bits 17:19"] #[inline(always)] - pub fn sf_if_2_qpi_mode_en(&self) -> SF_IF_2_QPI_MODE_EN_R { - SF_IF_2_QPI_MODE_EN_R::new(((self.bits >> 31) & 0x01) != 0) + pub fn sf_if_2_adr_byte(&self) -> SF_IF_2_ADR_BYTE_R { + SF_IF_2_ADR_BYTE_R::new(((self.bits >> 17) & 7) as u8) } - #[doc = "Bits 28:30"] + #[doc = "Bits 20:22"] #[inline(always)] - pub fn sf_if_2_spi_mode(&self) -> SF_IF_2_SPI_MODE_R { - SF_IF_2_SPI_MODE_R::new(((self.bits >> 28) & 0x07) as u8) + pub fn sf_if_2_cmd_byte(&self) -> SF_IF_2_CMD_BYTE_R { + SF_IF_2_CMD_BYTE_R::new(((self.bits >> 20) & 7) as u8) } - #[doc = "Bit 27"] + #[doc = "Bit 23"] #[inline(always)] - pub fn sf_if_2_cmd_en(&self) -> SF_IF_2_CMD_EN_R { - SF_IF_2_CMD_EN_R::new(((self.bits >> 27) & 0x01) != 0) + pub fn sf_if_2_dat_rw(&self) -> SF_IF_2_DAT_RW_R { + SF_IF_2_DAT_RW_R::new(((self.bits >> 23) & 1) != 0) } - #[doc = "Bit 26"] + #[doc = "Bit 24"] #[inline(always)] - pub fn sf_if_2_adr_en(&self) -> SF_IF_2_ADR_EN_R { - SF_IF_2_ADR_EN_R::new(((self.bits >> 26) & 0x01) != 0) + pub fn sf_if_2_dat_en(&self) -> SF_IF_2_DAT_EN_R { + SF_IF_2_DAT_EN_R::new(((self.bits >> 24) & 1) != 0) } #[doc = "Bit 25"] #[inline(always)] pub fn sf_if_2_dmy_en(&self) -> SF_IF_2_DMY_EN_R { - SF_IF_2_DMY_EN_R::new(((self.bits >> 25) & 0x01) != 0) + SF_IF_2_DMY_EN_R::new(((self.bits >> 25) & 1) != 0) } - #[doc = "Bit 24"] - #[inline(always)] - pub fn sf_if_2_dat_en(&self) -> SF_IF_2_DAT_EN_R { - SF_IF_2_DAT_EN_R::new(((self.bits >> 24) & 0x01) != 0) - } - #[doc = "Bit 23"] + #[doc = "Bit 26"] #[inline(always)] - pub fn sf_if_2_dat_rw(&self) -> SF_IF_2_DAT_RW_R { - SF_IF_2_DAT_RW_R::new(((self.bits >> 23) & 0x01) != 0) + pub fn sf_if_2_adr_en(&self) -> SF_IF_2_ADR_EN_R { + SF_IF_2_ADR_EN_R::new(((self.bits >> 26) & 1) != 0) } - #[doc = "Bits 20:22"] + #[doc = "Bit 27"] #[inline(always)] - pub fn sf_if_2_cmd_byte(&self) -> SF_IF_2_CMD_BYTE_R { - SF_IF_2_CMD_BYTE_R::new(((self.bits >> 20) & 0x07) as u8) + pub fn sf_if_2_cmd_en(&self) -> SF_IF_2_CMD_EN_R { + SF_IF_2_CMD_EN_R::new(((self.bits >> 27) & 1) != 0) } - #[doc = "Bits 17:19"] + #[doc = "Bits 28:30"] #[inline(always)] - pub fn sf_if_2_adr_byte(&self) -> SF_IF_2_ADR_BYTE_R { - SF_IF_2_ADR_BYTE_R::new(((self.bits >> 17) & 0x07) as u8) + pub fn sf_if_2_spi_mode(&self) -> SF_IF_2_SPI_MODE_R { + SF_IF_2_SPI_MODE_R::new(((self.bits >> 28) & 7) as u8) } - #[doc = "Bits 12:16"] + #[doc = "Bit 31"] #[inline(always)] - pub fn sf_if_2_dmy_byte(&self) -> SF_IF_2_DMY_BYTE_R { - SF_IF_2_DMY_BYTE_R::new(((self.bits >> 12) & 0x1f) as u8) + pub fn sf_if_2_qpi_mode_en(&self) -> SF_IF_2_QPI_MODE_EN_R { + SF_IF_2_QPI_MODE_EN_R::new(((self.bits >> 31) & 1) != 0) } } impl W { - #[doc = "Bit 31"] + #[doc = "Bits 12:16"] #[inline(always)] - pub fn sf_if_2_qpi_mode_en(&mut self) -> SF_IF_2_QPI_MODE_EN_W { - SF_IF_2_QPI_MODE_EN_W { w: self } + #[must_use] + pub fn sf_if_2_dmy_byte(&mut self) -> SF_IF_2_DMY_BYTE_W<12> { + SF_IF_2_DMY_BYTE_W::new(self) } - #[doc = "Bits 28:30"] + #[doc = "Bits 17:19"] #[inline(always)] - pub fn sf_if_2_spi_mode(&mut self) -> SF_IF_2_SPI_MODE_W { - SF_IF_2_SPI_MODE_W { w: self } + #[must_use] + pub fn sf_if_2_adr_byte(&mut self) -> SF_IF_2_ADR_BYTE_W<17> { + SF_IF_2_ADR_BYTE_W::new(self) } - #[doc = "Bit 27"] + #[doc = "Bits 20:22"] #[inline(always)] - pub fn sf_if_2_cmd_en(&mut self) -> SF_IF_2_CMD_EN_W { - SF_IF_2_CMD_EN_W { w: self } + #[must_use] + pub fn sf_if_2_cmd_byte(&mut self) -> SF_IF_2_CMD_BYTE_W<20> { + SF_IF_2_CMD_BYTE_W::new(self) } - #[doc = "Bit 26"] + #[doc = "Bit 23"] #[inline(always)] - pub fn sf_if_2_adr_en(&mut self) -> SF_IF_2_ADR_EN_W { - SF_IF_2_ADR_EN_W { w: self } + #[must_use] + pub fn sf_if_2_dat_rw(&mut self) -> SF_IF_2_DAT_RW_W<23> { + SF_IF_2_DAT_RW_W::new(self) } - #[doc = "Bit 25"] + #[doc = "Bit 24"] #[inline(always)] - pub fn sf_if_2_dmy_en(&mut self) -> SF_IF_2_DMY_EN_W { - SF_IF_2_DMY_EN_W { w: self } + #[must_use] + pub fn sf_if_2_dat_en(&mut self) -> SF_IF_2_DAT_EN_W<24> { + SF_IF_2_DAT_EN_W::new(self) } - #[doc = "Bit 24"] + #[doc = "Bit 25"] #[inline(always)] - pub fn sf_if_2_dat_en(&mut self) -> SF_IF_2_DAT_EN_W { - SF_IF_2_DAT_EN_W { w: self } + #[must_use] + pub fn sf_if_2_dmy_en(&mut self) -> SF_IF_2_DMY_EN_W<25> { + SF_IF_2_DMY_EN_W::new(self) } - #[doc = "Bit 23"] + #[doc = "Bit 26"] #[inline(always)] - pub fn sf_if_2_dat_rw(&mut self) -> SF_IF_2_DAT_RW_W { - SF_IF_2_DAT_RW_W { w: self } + #[must_use] + pub fn sf_if_2_adr_en(&mut self) -> SF_IF_2_ADR_EN_W<26> { + SF_IF_2_ADR_EN_W::new(self) } - #[doc = "Bits 20:22"] + #[doc = "Bit 27"] #[inline(always)] - pub fn sf_if_2_cmd_byte(&mut self) -> SF_IF_2_CMD_BYTE_W { - SF_IF_2_CMD_BYTE_W { w: self } + #[must_use] + pub fn sf_if_2_cmd_en(&mut self) -> SF_IF_2_CMD_EN_W<27> { + SF_IF_2_CMD_EN_W::new(self) } - #[doc = "Bits 17:19"] + #[doc = "Bits 28:30"] #[inline(always)] - pub fn sf_if_2_adr_byte(&mut self) -> SF_IF_2_ADR_BYTE_W { - SF_IF_2_ADR_BYTE_W { w: self } + #[must_use] + pub fn sf_if_2_spi_mode(&mut self) -> SF_IF_2_SPI_MODE_W<28> { + SF_IF_2_SPI_MODE_W::new(self) } - #[doc = "Bits 12:16"] + #[doc = "Bit 31"] #[inline(always)] - pub fn sf_if_2_dmy_byte(&mut self) -> SF_IF_2_DMY_BYTE_W { - SF_IF_2_DMY_BYTE_W { w: self } + #[must_use] + pub fn sf_if_2_qpi_mode_en(&mut self) -> SF_IF_2_QPI_MODE_EN_W<31> { + SF_IF_2_QPI_MODE_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -473,11 +211,10 @@ impl crate::Readable for SF_IF_IAHB_3_SPEC { #[doc = "`write(|w| ..)` method takes [sf_if_iahb_3::W](W) writer structure"] impl crate::Writable for SF_IF_IAHB_3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_if_iahb_3 to value 0x8d84_0000"] impl crate::Resettable for SF_IF_IAHB_3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x8d84_0000 - } + const RESET_VALUE: Self::Ux = 0x8d84_0000; } diff --git a/src/sf_ctrl/sf_if_iahb_4.rs b/src/sf_ctrl/sf_if_iahb_4.rs index 030726a..1e126f2 100644 --- a/src/sf_ctrl/sf_if_iahb_4.rs +++ b/src/sf_ctrl/sf_if_iahb_4.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_if_2_cmd_buf_0` reader - "] -pub struct SF_IF_2_CMD_BUF_0_R(crate::FieldReader); -impl SF_IF_2_CMD_BUF_0_R { - pub(crate) fn new(bits: u32) -> Self { - SF_IF_2_CMD_BUF_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_2_CMD_BUF_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_IF_2_CMD_BUF_0_R = crate::FieldReader; #[doc = "Field `sf_if_2_cmd_buf_0` writer - "] -pub struct SF_IF_2_CMD_BUF_0_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_2_CMD_BUF_0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_IF_2_CMD_BUF_0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_IAHB_4_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_if_2_cmd_buf_0(&self) -> SF_IF_2_CMD_BUF_0_R { - SF_IF_2_CMD_BUF_0_R::new((self.bits & 0xffff_ffff) as u32) + SF_IF_2_CMD_BUF_0_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_if_2_cmd_buf_0(&mut self) -> SF_IF_2_CMD_BUF_0_W { - SF_IF_2_CMD_BUF_0_W { w: self } + #[must_use] + pub fn sf_if_2_cmd_buf_0(&mut self) -> SF_IF_2_CMD_BUF_0_W<0> { + SF_IF_2_CMD_BUF_0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_IF_IAHB_4_SPEC { #[doc = "`write(|w| ..)` method takes [sf_if_iahb_4::W](W) writer structure"] impl crate::Writable for SF_IF_IAHB_4_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_if_iahb_4 to value 0x3800_0000"] impl crate::Resettable for SF_IF_IAHB_4_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x3800_0000 - } + const RESET_VALUE: Self::Ux = 0x3800_0000; } diff --git a/src/sf_ctrl/sf_if_iahb_5.rs b/src/sf_ctrl/sf_if_iahb_5.rs index 2c248f8..c0d2d35 100644 --- a/src/sf_ctrl/sf_if_iahb_5.rs +++ b/src/sf_ctrl/sf_if_iahb_5.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_if_2_cmd_buf_1` reader - "] -pub struct SF_IF_2_CMD_BUF_1_R(crate::FieldReader); -impl SF_IF_2_CMD_BUF_1_R { - pub(crate) fn new(bits: u32) -> Self { - SF_IF_2_CMD_BUF_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_2_CMD_BUF_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_IF_2_CMD_BUF_1_R = crate::FieldReader; #[doc = "Field `sf_if_2_cmd_buf_1` writer - "] -pub struct SF_IF_2_CMD_BUF_1_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_2_CMD_BUF_1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_IF_2_CMD_BUF_1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_IAHB_5_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_if_2_cmd_buf_1(&self) -> SF_IF_2_CMD_BUF_1_R { - SF_IF_2_CMD_BUF_1_R::new((self.bits & 0xffff_ffff) as u32) + SF_IF_2_CMD_BUF_1_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_if_2_cmd_buf_1(&mut self) -> SF_IF_2_CMD_BUF_1_W { - SF_IF_2_CMD_BUF_1_W { w: self } + #[must_use] + pub fn sf_if_2_cmd_buf_1(&mut self) -> SF_IF_2_CMD_BUF_1_W<0> { + SF_IF_2_CMD_BUF_1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_IF_IAHB_5_SPEC { #[doc = "`write(|w| ..)` method takes [sf_if_iahb_5::W](W) writer structure"] impl crate::Writable for SF_IF_IAHB_5_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_if_iahb_5 to value 0"] impl crate::Resettable for SF_IF_IAHB_5_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_if_iahb_6.rs b/src/sf_ctrl/sf_if_iahb_6.rs index e91fd2f..c09cd10 100644 --- a/src/sf_ctrl/sf_if_iahb_6.rs +++ b/src/sf_ctrl/sf_if_iahb_6.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,133 +28,65 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `sf_if_3_qpi_mode_en` reader - "] -pub struct SF_IF_3_QPI_MODE_EN_R(crate::FieldReader); -impl SF_IF_3_QPI_MODE_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_IF_3_QPI_MODE_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_3_QPI_MODE_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_3_qpi_mode_en` writer - "] -pub struct SF_IF_3_QPI_MODE_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_3_QPI_MODE_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 31)) | ((value as u32 & 0x01) << 31); - self.w - } -} -#[doc = "Field `sf_if_3_spi_mode` reader - "] -pub struct SF_IF_3_SPI_MODE_R(crate::FieldReader); -impl SF_IF_3_SPI_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - SF_IF_3_SPI_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_3_SPI_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_3_spi_mode` writer - "] -pub struct SF_IF_3_SPI_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_3_SPI_MODE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 28)) | ((value as u32 & 0x07) << 28); - self.w - } -} #[doc = "Field `sf_if_3_cmd_byte` reader - "] -pub struct SF_IF_3_CMD_BYTE_R(crate::FieldReader); -impl SF_IF_3_CMD_BYTE_R { - pub(crate) fn new(bits: u8) -> Self { - SF_IF_3_CMD_BYTE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_3_CMD_BYTE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_IF_3_CMD_BYTE_R = crate::FieldReader; #[doc = "Field `sf_if_3_cmd_byte` writer - "] -pub struct SF_IF_3_CMD_BYTE_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_3_CMD_BYTE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 20)) | ((value as u32 & 0x07) << 20); - self.w - } -} +pub type SF_IF_3_CMD_BYTE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_IAHB_6_SPEC, u8, u8, 3, O>; +#[doc = "Field `sf_if_3_spi_mode` reader - "] +pub type SF_IF_3_SPI_MODE_R = crate::FieldReader; +#[doc = "Field `sf_if_3_spi_mode` writer - "] +pub type SF_IF_3_SPI_MODE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_IAHB_6_SPEC, u8, u8, 3, O>; +#[doc = "Field `sf_if_3_qpi_mode_en` reader - "] +pub type SF_IF_3_QPI_MODE_EN_R = crate::BitReader; +#[doc = "Field `sf_if_3_qpi_mode_en` writer - "] +pub type SF_IF_3_QPI_MODE_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SF_IF_IAHB_6_SPEC, bool, O>; impl R { - #[doc = "Bit 31"] + #[doc = "Bits 20:22"] #[inline(always)] - pub fn sf_if_3_qpi_mode_en(&self) -> SF_IF_3_QPI_MODE_EN_R { - SF_IF_3_QPI_MODE_EN_R::new(((self.bits >> 31) & 0x01) != 0) + pub fn sf_if_3_cmd_byte(&self) -> SF_IF_3_CMD_BYTE_R { + SF_IF_3_CMD_BYTE_R::new(((self.bits >> 20) & 7) as u8) } #[doc = "Bits 28:30"] #[inline(always)] pub fn sf_if_3_spi_mode(&self) -> SF_IF_3_SPI_MODE_R { - SF_IF_3_SPI_MODE_R::new(((self.bits >> 28) & 0x07) as u8) + SF_IF_3_SPI_MODE_R::new(((self.bits >> 28) & 7) as u8) } - #[doc = "Bits 20:22"] + #[doc = "Bit 31"] #[inline(always)] - pub fn sf_if_3_cmd_byte(&self) -> SF_IF_3_CMD_BYTE_R { - SF_IF_3_CMD_BYTE_R::new(((self.bits >> 20) & 0x07) as u8) + pub fn sf_if_3_qpi_mode_en(&self) -> SF_IF_3_QPI_MODE_EN_R { + SF_IF_3_QPI_MODE_EN_R::new(((self.bits >> 31) & 1) != 0) } } impl W { - #[doc = "Bit 31"] + #[doc = "Bits 20:22"] #[inline(always)] - pub fn sf_if_3_qpi_mode_en(&mut self) -> SF_IF_3_QPI_MODE_EN_W { - SF_IF_3_QPI_MODE_EN_W { w: self } + #[must_use] + pub fn sf_if_3_cmd_byte(&mut self) -> SF_IF_3_CMD_BYTE_W<20> { + SF_IF_3_CMD_BYTE_W::new(self) } #[doc = "Bits 28:30"] #[inline(always)] - pub fn sf_if_3_spi_mode(&mut self) -> SF_IF_3_SPI_MODE_W { - SF_IF_3_SPI_MODE_W { w: self } + #[must_use] + pub fn sf_if_3_spi_mode(&mut self) -> SF_IF_3_SPI_MODE_W<28> { + SF_IF_3_SPI_MODE_W::new(self) } - #[doc = "Bits 20:22"] + #[doc = "Bit 31"] #[inline(always)] - pub fn sf_if_3_cmd_byte(&mut self) -> SF_IF_3_CMD_BYTE_W { - SF_IF_3_CMD_BYTE_W { w: self } + #[must_use] + pub fn sf_if_3_qpi_mode_en(&mut self) -> SF_IF_3_QPI_MODE_EN_W<31> { + SF_IF_3_QPI_MODE_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -171,11 +104,10 @@ impl crate::Readable for SF_IF_IAHB_6_SPEC { #[doc = "`write(|w| ..)` method takes [sf_if_iahb_6::W](W) writer structure"] impl crate::Writable for SF_IF_IAHB_6_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_if_iahb_6 to value 0x8000_0000"] impl crate::Resettable for SF_IF_IAHB_6_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x8000_0000 - } + const RESET_VALUE: Self::Ux = 0x8000_0000; } diff --git a/src/sf_ctrl/sf_if_iahb_7.rs b/src/sf_ctrl/sf_if_iahb_7.rs index 72b1013..561defd 100644 --- a/src/sf_ctrl/sf_if_iahb_7.rs +++ b/src/sf_ctrl/sf_if_iahb_7.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_if_3_cmd_buf_0` reader - "] -pub struct SF_IF_3_CMD_BUF_0_R(crate::FieldReader); -impl SF_IF_3_CMD_BUF_0_R { - pub(crate) fn new(bits: u32) -> Self { - SF_IF_3_CMD_BUF_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_3_CMD_BUF_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_IF_3_CMD_BUF_0_R = crate::FieldReader; #[doc = "Field `sf_if_3_cmd_buf_0` writer - "] -pub struct SF_IF_3_CMD_BUF_0_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_3_CMD_BUF_0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_IF_3_CMD_BUF_0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_IAHB_7_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_if_3_cmd_buf_0(&self) -> SF_IF_3_CMD_BUF_0_R { - SF_IF_3_CMD_BUF_0_R::new((self.bits & 0xffff_ffff) as u32) + SF_IF_3_CMD_BUF_0_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_if_3_cmd_buf_0(&mut self) -> SF_IF_3_CMD_BUF_0_W { - SF_IF_3_CMD_BUF_0_W { w: self } + #[must_use] + pub fn sf_if_3_cmd_buf_0(&mut self) -> SF_IF_3_CMD_BUF_0_W<0> { + SF_IF_3_CMD_BUF_0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_IF_IAHB_7_SPEC { #[doc = "`write(|w| ..)` method takes [sf_if_iahb_7::W](W) writer structure"] impl crate::Writable for SF_IF_IAHB_7_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_if_iahb_7 to value 0xc000_0000"] impl crate::Resettable for SF_IF_IAHB_7_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xc000_0000 - } + const RESET_VALUE: Self::Ux = 0xc000_0000; } diff --git a/src/sf_ctrl/sf_if_io_dly_0.rs b/src/sf_ctrl/sf_if_io_dly_0.rs index e12df73..ce86528 100644 --- a/src/sf_ctrl/sf_if_io_dly_0.rs +++ b/src/sf_ctrl/sf_if_io_dly_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,195 +28,97 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `sf_dqs_do_dly_sel` reader - "] -pub struct SF_DQS_DO_DLY_SEL_R(crate::FieldReader); -impl SF_DQS_DO_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF_DQS_DO_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_DQS_DO_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_dqs_do_dly_sel` writer - "] -pub struct SF_DQS_DO_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF_DQS_DO_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 30)) | ((value as u32 & 0x03) << 30); - self.w - } -} -#[doc = "Field `sf_dqs_di_dly_sel` reader - "] -pub struct SF_DQS_DI_DLY_SEL_R(crate::FieldReader); -impl SF_DQS_DI_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF_DQS_DI_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_DQS_DI_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_dqs_di_dly_sel` writer - "] -pub struct SF_DQS_DI_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF_DQS_DI_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 28)) | ((value as u32 & 0x03) << 28); - self.w - } -} -#[doc = "Field `sf_dqs_oe_dly_sel` reader - "] -pub struct SF_DQS_OE_DLY_SEL_R(crate::FieldReader); -impl SF_DQS_OE_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF_DQS_OE_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_DQS_OE_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_dqs_oe_dly_sel` writer - "] -pub struct SF_DQS_OE_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF_DQS_OE_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 26)) | ((value as u32 & 0x03) << 26); - self.w - } -} -#[doc = "Field `sf_clk_out_dly_sel` reader - "] -pub struct SF_CLK_OUT_DLY_SEL_R(crate::FieldReader); -impl SF_CLK_OUT_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF_CLK_OUT_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_CLK_OUT_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_clk_out_dly_sel` writer - "] -pub struct SF_CLK_OUT_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF_CLK_OUT_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} #[doc = "Field `sf_cs_dly_sel` reader - "] -pub struct SF_CS_DLY_SEL_R(crate::FieldReader); -impl SF_CS_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF_CS_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_CS_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_CS_DLY_SEL_R = crate::FieldReader; #[doc = "Field `sf_cs_dly_sel` writer - "] -pub struct SF_CS_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF_CS_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w - } -} +pub type SF_CS_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_IO_DLY_0_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf_clk_out_dly_sel` reader - "] +pub type SF_CLK_OUT_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `sf_clk_out_dly_sel` writer - "] +pub type SF_CLK_OUT_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_IO_DLY_0_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf_dqs_oe_dly_sel` reader - "] +pub type SF_DQS_OE_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `sf_dqs_oe_dly_sel` writer - "] +pub type SF_DQS_OE_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_IO_DLY_0_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf_dqs_di_dly_sel` reader - "] +pub type SF_DQS_DI_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `sf_dqs_di_dly_sel` writer - "] +pub type SF_DQS_DI_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_IO_DLY_0_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf_dqs_do_dly_sel` reader - "] +pub type SF_DQS_DO_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `sf_dqs_do_dly_sel` writer - "] +pub type SF_DQS_DO_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_IO_DLY_0_SPEC, u8, u8, 2, O>; impl R { - #[doc = "Bits 30:31"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn sf_dqs_do_dly_sel(&self) -> SF_DQS_DO_DLY_SEL_R { - SF_DQS_DO_DLY_SEL_R::new(((self.bits >> 30) & 0x03) as u8) + pub fn sf_cs_dly_sel(&self) -> SF_CS_DLY_SEL_R { + SF_CS_DLY_SEL_R::new((self.bits & 3) as u8) } - #[doc = "Bits 28:29"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn sf_dqs_di_dly_sel(&self) -> SF_DQS_DI_DLY_SEL_R { - SF_DQS_DI_DLY_SEL_R::new(((self.bits >> 28) & 0x03) as u8) + pub fn sf_clk_out_dly_sel(&self) -> SF_CLK_OUT_DLY_SEL_R { + SF_CLK_OUT_DLY_SEL_R::new(((self.bits >> 8) & 3) as u8) } #[doc = "Bits 26:27"] #[inline(always)] pub fn sf_dqs_oe_dly_sel(&self) -> SF_DQS_OE_DLY_SEL_R { - SF_DQS_OE_DLY_SEL_R::new(((self.bits >> 26) & 0x03) as u8) + SF_DQS_OE_DLY_SEL_R::new(((self.bits >> 26) & 3) as u8) } - #[doc = "Bits 8:9"] + #[doc = "Bits 28:29"] #[inline(always)] - pub fn sf_clk_out_dly_sel(&self) -> SF_CLK_OUT_DLY_SEL_R { - SF_CLK_OUT_DLY_SEL_R::new(((self.bits >> 8) & 0x03) as u8) + pub fn sf_dqs_di_dly_sel(&self) -> SF_DQS_DI_DLY_SEL_R { + SF_DQS_DI_DLY_SEL_R::new(((self.bits >> 28) & 3) as u8) } - #[doc = "Bits 0:1"] + #[doc = "Bits 30:31"] #[inline(always)] - pub fn sf_cs_dly_sel(&self) -> SF_CS_DLY_SEL_R { - SF_CS_DLY_SEL_R::new((self.bits & 0x03) as u8) + pub fn sf_dqs_do_dly_sel(&self) -> SF_DQS_DO_DLY_SEL_R { + SF_DQS_DO_DLY_SEL_R::new(((self.bits >> 30) & 3) as u8) } } impl W { - #[doc = "Bits 30:31"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn sf_dqs_do_dly_sel(&mut self) -> SF_DQS_DO_DLY_SEL_W { - SF_DQS_DO_DLY_SEL_W { w: self } + #[must_use] + pub fn sf_cs_dly_sel(&mut self) -> SF_CS_DLY_SEL_W<0> { + SF_CS_DLY_SEL_W::new(self) } - #[doc = "Bits 28:29"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn sf_dqs_di_dly_sel(&mut self) -> SF_DQS_DI_DLY_SEL_W { - SF_DQS_DI_DLY_SEL_W { w: self } + #[must_use] + pub fn sf_clk_out_dly_sel(&mut self) -> SF_CLK_OUT_DLY_SEL_W<8> { + SF_CLK_OUT_DLY_SEL_W::new(self) } #[doc = "Bits 26:27"] #[inline(always)] - pub fn sf_dqs_oe_dly_sel(&mut self) -> SF_DQS_OE_DLY_SEL_W { - SF_DQS_OE_DLY_SEL_W { w: self } + #[must_use] + pub fn sf_dqs_oe_dly_sel(&mut self) -> SF_DQS_OE_DLY_SEL_W<26> { + SF_DQS_OE_DLY_SEL_W::new(self) } - #[doc = "Bits 8:9"] + #[doc = "Bits 28:29"] #[inline(always)] - pub fn sf_clk_out_dly_sel(&mut self) -> SF_CLK_OUT_DLY_SEL_W { - SF_CLK_OUT_DLY_SEL_W { w: self } + #[must_use] + pub fn sf_dqs_di_dly_sel(&mut self) -> SF_DQS_DI_DLY_SEL_W<28> { + SF_DQS_DI_DLY_SEL_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bits 30:31"] #[inline(always)] - pub fn sf_cs_dly_sel(&mut self) -> SF_CS_DLY_SEL_W { - SF_CS_DLY_SEL_W { w: self } + #[must_use] + pub fn sf_dqs_do_dly_sel(&mut self) -> SF_DQS_DO_DLY_SEL_W<30> { + SF_DQS_DO_DLY_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -233,11 +136,10 @@ impl crate::Readable for SF_IF_IO_DLY_0_SPEC { #[doc = "`write(|w| ..)` method takes [sf_if_io_dly_0::W](W) writer structure"] impl crate::Writable for SF_IF_IO_DLY_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_if_io_dly_0 to value 0"] impl crate::Resettable for SF_IF_IO_DLY_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_if_io_dly_1.rs b/src/sf_ctrl/sf_if_io_dly_1.rs index 418dede..ce3f317 100644 --- a/src/sf_ctrl/sf_if_io_dly_1.rs +++ b/src/sf_ctrl/sf_if_io_dly_1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,123 +28,65 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `sf_io_0_do_dly_sel` reader - "] -pub struct SF_IO_0_DO_DLY_SEL_R(crate::FieldReader); -impl SF_IO_0_DO_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF_IO_0_DO_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IO_0_DO_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_io_0_do_dly_sel` writer - "] -pub struct SF_IO_0_DO_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IO_0_DO_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 16)) | ((value as u32 & 0x03) << 16); - self.w - } -} -#[doc = "Field `sf_io_0_di_dly_sel` reader - "] -pub struct SF_IO_0_DI_DLY_SEL_R(crate::FieldReader); -impl SF_IO_0_DI_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF_IO_0_DI_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IO_0_DI_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_io_0_di_dly_sel` writer - "] -pub struct SF_IO_0_DI_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IO_0_DI_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} #[doc = "Field `sf_io_0_oe_dly_sel` reader - "] -pub struct SF_IO_0_OE_DLY_SEL_R(crate::FieldReader); -impl SF_IO_0_OE_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF_IO_0_OE_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IO_0_OE_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_IO_0_OE_DLY_SEL_R = crate::FieldReader; #[doc = "Field `sf_io_0_oe_dly_sel` writer - "] -pub struct SF_IO_0_OE_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IO_0_OE_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w - } -} +pub type SF_IO_0_OE_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_IO_DLY_1_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf_io_0_di_dly_sel` reader - "] +pub type SF_IO_0_DI_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `sf_io_0_di_dly_sel` writer - "] +pub type SF_IO_0_DI_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_IO_DLY_1_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf_io_0_do_dly_sel` reader - "] +pub type SF_IO_0_DO_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `sf_io_0_do_dly_sel` writer - "] +pub type SF_IO_0_DO_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_IO_DLY_1_SPEC, u8, u8, 2, O>; impl R { - #[doc = "Bits 16:17"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn sf_io_0_do_dly_sel(&self) -> SF_IO_0_DO_DLY_SEL_R { - SF_IO_0_DO_DLY_SEL_R::new(((self.bits >> 16) & 0x03) as u8) + pub fn sf_io_0_oe_dly_sel(&self) -> SF_IO_0_OE_DLY_SEL_R { + SF_IO_0_OE_DLY_SEL_R::new((self.bits & 3) as u8) } #[doc = "Bits 8:9"] #[inline(always)] pub fn sf_io_0_di_dly_sel(&self) -> SF_IO_0_DI_DLY_SEL_R { - SF_IO_0_DI_DLY_SEL_R::new(((self.bits >> 8) & 0x03) as u8) + SF_IO_0_DI_DLY_SEL_R::new(((self.bits >> 8) & 3) as u8) } - #[doc = "Bits 0:1"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn sf_io_0_oe_dly_sel(&self) -> SF_IO_0_OE_DLY_SEL_R { - SF_IO_0_OE_DLY_SEL_R::new((self.bits & 0x03) as u8) + pub fn sf_io_0_do_dly_sel(&self) -> SF_IO_0_DO_DLY_SEL_R { + SF_IO_0_DO_DLY_SEL_R::new(((self.bits >> 16) & 3) as u8) } } impl W { - #[doc = "Bits 16:17"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn sf_io_0_do_dly_sel(&mut self) -> SF_IO_0_DO_DLY_SEL_W { - SF_IO_0_DO_DLY_SEL_W { w: self } + #[must_use] + pub fn sf_io_0_oe_dly_sel(&mut self) -> SF_IO_0_OE_DLY_SEL_W<0> { + SF_IO_0_OE_DLY_SEL_W::new(self) } #[doc = "Bits 8:9"] #[inline(always)] - pub fn sf_io_0_di_dly_sel(&mut self) -> SF_IO_0_DI_DLY_SEL_W { - SF_IO_0_DI_DLY_SEL_W { w: self } + #[must_use] + pub fn sf_io_0_di_dly_sel(&mut self) -> SF_IO_0_DI_DLY_SEL_W<8> { + SF_IO_0_DI_DLY_SEL_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn sf_io_0_oe_dly_sel(&mut self) -> SF_IO_0_OE_DLY_SEL_W { - SF_IO_0_OE_DLY_SEL_W { w: self } + #[must_use] + pub fn sf_io_0_do_dly_sel(&mut self) -> SF_IO_0_DO_DLY_SEL_W<16> { + SF_IO_0_DO_DLY_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -161,11 +104,10 @@ impl crate::Readable for SF_IF_IO_DLY_1_SPEC { #[doc = "`write(|w| ..)` method takes [sf_if_io_dly_1::W](W) writer structure"] impl crate::Writable for SF_IF_IO_DLY_1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_if_io_dly_1 to value 0"] impl crate::Resettable for SF_IF_IO_DLY_1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_if_io_dly_2.rs b/src/sf_ctrl/sf_if_io_dly_2.rs index 7a27b6c..7d3bc79 100644 --- a/src/sf_ctrl/sf_if_io_dly_2.rs +++ b/src/sf_ctrl/sf_if_io_dly_2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,123 +28,65 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `sf_io_1_do_dly_sel` reader - "] -pub struct SF_IO_1_DO_DLY_SEL_R(crate::FieldReader); -impl SF_IO_1_DO_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF_IO_1_DO_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IO_1_DO_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_io_1_do_dly_sel` writer - "] -pub struct SF_IO_1_DO_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IO_1_DO_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 16)) | ((value as u32 & 0x03) << 16); - self.w - } -} -#[doc = "Field `sf_io_1_di_dly_sel` reader - "] -pub struct SF_IO_1_DI_DLY_SEL_R(crate::FieldReader); -impl SF_IO_1_DI_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF_IO_1_DI_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IO_1_DI_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_io_1_di_dly_sel` writer - "] -pub struct SF_IO_1_DI_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IO_1_DI_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} #[doc = "Field `sf_io_1_oe_dly_sel` reader - "] -pub struct SF_IO_1_OE_DLY_SEL_R(crate::FieldReader); -impl SF_IO_1_OE_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF_IO_1_OE_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IO_1_OE_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_IO_1_OE_DLY_SEL_R = crate::FieldReader; #[doc = "Field `sf_io_1_oe_dly_sel` writer - "] -pub struct SF_IO_1_OE_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IO_1_OE_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w - } -} +pub type SF_IO_1_OE_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_IO_DLY_2_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf_io_1_di_dly_sel` reader - "] +pub type SF_IO_1_DI_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `sf_io_1_di_dly_sel` writer - "] +pub type SF_IO_1_DI_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_IO_DLY_2_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf_io_1_do_dly_sel` reader - "] +pub type SF_IO_1_DO_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `sf_io_1_do_dly_sel` writer - "] +pub type SF_IO_1_DO_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_IO_DLY_2_SPEC, u8, u8, 2, O>; impl R { - #[doc = "Bits 16:17"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn sf_io_1_do_dly_sel(&self) -> SF_IO_1_DO_DLY_SEL_R { - SF_IO_1_DO_DLY_SEL_R::new(((self.bits >> 16) & 0x03) as u8) + pub fn sf_io_1_oe_dly_sel(&self) -> SF_IO_1_OE_DLY_SEL_R { + SF_IO_1_OE_DLY_SEL_R::new((self.bits & 3) as u8) } #[doc = "Bits 8:9"] #[inline(always)] pub fn sf_io_1_di_dly_sel(&self) -> SF_IO_1_DI_DLY_SEL_R { - SF_IO_1_DI_DLY_SEL_R::new(((self.bits >> 8) & 0x03) as u8) + SF_IO_1_DI_DLY_SEL_R::new(((self.bits >> 8) & 3) as u8) } - #[doc = "Bits 0:1"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn sf_io_1_oe_dly_sel(&self) -> SF_IO_1_OE_DLY_SEL_R { - SF_IO_1_OE_DLY_SEL_R::new((self.bits & 0x03) as u8) + pub fn sf_io_1_do_dly_sel(&self) -> SF_IO_1_DO_DLY_SEL_R { + SF_IO_1_DO_DLY_SEL_R::new(((self.bits >> 16) & 3) as u8) } } impl W { - #[doc = "Bits 16:17"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn sf_io_1_do_dly_sel(&mut self) -> SF_IO_1_DO_DLY_SEL_W { - SF_IO_1_DO_DLY_SEL_W { w: self } + #[must_use] + pub fn sf_io_1_oe_dly_sel(&mut self) -> SF_IO_1_OE_DLY_SEL_W<0> { + SF_IO_1_OE_DLY_SEL_W::new(self) } #[doc = "Bits 8:9"] #[inline(always)] - pub fn sf_io_1_di_dly_sel(&mut self) -> SF_IO_1_DI_DLY_SEL_W { - SF_IO_1_DI_DLY_SEL_W { w: self } + #[must_use] + pub fn sf_io_1_di_dly_sel(&mut self) -> SF_IO_1_DI_DLY_SEL_W<8> { + SF_IO_1_DI_DLY_SEL_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn sf_io_1_oe_dly_sel(&mut self) -> SF_IO_1_OE_DLY_SEL_W { - SF_IO_1_OE_DLY_SEL_W { w: self } + #[must_use] + pub fn sf_io_1_do_dly_sel(&mut self) -> SF_IO_1_DO_DLY_SEL_W<16> { + SF_IO_1_DO_DLY_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -161,11 +104,10 @@ impl crate::Readable for SF_IF_IO_DLY_2_SPEC { #[doc = "`write(|w| ..)` method takes [sf_if_io_dly_2::W](W) writer structure"] impl crate::Writable for SF_IF_IO_DLY_2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_if_io_dly_2 to value 0"] impl crate::Resettable for SF_IF_IO_DLY_2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_if_io_dly_3.rs b/src/sf_ctrl/sf_if_io_dly_3.rs index d4f2832..a91e4e8 100644 --- a/src/sf_ctrl/sf_if_io_dly_3.rs +++ b/src/sf_ctrl/sf_if_io_dly_3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,123 +28,65 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `sf_io_2_do_dly_sel` reader - "] -pub struct SF_IO_2_DO_DLY_SEL_R(crate::FieldReader); -impl SF_IO_2_DO_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF_IO_2_DO_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IO_2_DO_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_io_2_do_dly_sel` writer - "] -pub struct SF_IO_2_DO_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IO_2_DO_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 16)) | ((value as u32 & 0x03) << 16); - self.w - } -} -#[doc = "Field `sf_io_2_di_dly_sel` reader - "] -pub struct SF_IO_2_DI_DLY_SEL_R(crate::FieldReader); -impl SF_IO_2_DI_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF_IO_2_DI_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IO_2_DI_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_io_2_di_dly_sel` writer - "] -pub struct SF_IO_2_DI_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IO_2_DI_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} #[doc = "Field `sf_io_2_oe_dly_sel` reader - "] -pub struct SF_IO_2_OE_DLY_SEL_R(crate::FieldReader); -impl SF_IO_2_OE_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF_IO_2_OE_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IO_2_OE_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_IO_2_OE_DLY_SEL_R = crate::FieldReader; #[doc = "Field `sf_io_2_oe_dly_sel` writer - "] -pub struct SF_IO_2_OE_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IO_2_OE_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w - } -} +pub type SF_IO_2_OE_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_IO_DLY_3_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf_io_2_di_dly_sel` reader - "] +pub type SF_IO_2_DI_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `sf_io_2_di_dly_sel` writer - "] +pub type SF_IO_2_DI_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_IO_DLY_3_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf_io_2_do_dly_sel` reader - "] +pub type SF_IO_2_DO_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `sf_io_2_do_dly_sel` writer - "] +pub type SF_IO_2_DO_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_IO_DLY_3_SPEC, u8, u8, 2, O>; impl R { - #[doc = "Bits 16:17"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn sf_io_2_do_dly_sel(&self) -> SF_IO_2_DO_DLY_SEL_R { - SF_IO_2_DO_DLY_SEL_R::new(((self.bits >> 16) & 0x03) as u8) + pub fn sf_io_2_oe_dly_sel(&self) -> SF_IO_2_OE_DLY_SEL_R { + SF_IO_2_OE_DLY_SEL_R::new((self.bits & 3) as u8) } #[doc = "Bits 8:9"] #[inline(always)] pub fn sf_io_2_di_dly_sel(&self) -> SF_IO_2_DI_DLY_SEL_R { - SF_IO_2_DI_DLY_SEL_R::new(((self.bits >> 8) & 0x03) as u8) + SF_IO_2_DI_DLY_SEL_R::new(((self.bits >> 8) & 3) as u8) } - #[doc = "Bits 0:1"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn sf_io_2_oe_dly_sel(&self) -> SF_IO_2_OE_DLY_SEL_R { - SF_IO_2_OE_DLY_SEL_R::new((self.bits & 0x03) as u8) + pub fn sf_io_2_do_dly_sel(&self) -> SF_IO_2_DO_DLY_SEL_R { + SF_IO_2_DO_DLY_SEL_R::new(((self.bits >> 16) & 3) as u8) } } impl W { - #[doc = "Bits 16:17"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn sf_io_2_do_dly_sel(&mut self) -> SF_IO_2_DO_DLY_SEL_W { - SF_IO_2_DO_DLY_SEL_W { w: self } + #[must_use] + pub fn sf_io_2_oe_dly_sel(&mut self) -> SF_IO_2_OE_DLY_SEL_W<0> { + SF_IO_2_OE_DLY_SEL_W::new(self) } #[doc = "Bits 8:9"] #[inline(always)] - pub fn sf_io_2_di_dly_sel(&mut self) -> SF_IO_2_DI_DLY_SEL_W { - SF_IO_2_DI_DLY_SEL_W { w: self } + #[must_use] + pub fn sf_io_2_di_dly_sel(&mut self) -> SF_IO_2_DI_DLY_SEL_W<8> { + SF_IO_2_DI_DLY_SEL_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn sf_io_2_oe_dly_sel(&mut self) -> SF_IO_2_OE_DLY_SEL_W { - SF_IO_2_OE_DLY_SEL_W { w: self } + #[must_use] + pub fn sf_io_2_do_dly_sel(&mut self) -> SF_IO_2_DO_DLY_SEL_W<16> { + SF_IO_2_DO_DLY_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -161,11 +104,10 @@ impl crate::Readable for SF_IF_IO_DLY_3_SPEC { #[doc = "`write(|w| ..)` method takes [sf_if_io_dly_3::W](W) writer structure"] impl crate::Writable for SF_IF_IO_DLY_3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_if_io_dly_3 to value 0"] impl crate::Resettable for SF_IF_IO_DLY_3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_if_io_dly_4.rs b/src/sf_ctrl/sf_if_io_dly_4.rs index fc5f32d..3eac700 100644 --- a/src/sf_ctrl/sf_if_io_dly_4.rs +++ b/src/sf_ctrl/sf_if_io_dly_4.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,123 +28,65 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `sf_io_3_do_dly_sel` reader - "] -pub struct SF_IO_3_DO_DLY_SEL_R(crate::FieldReader); -impl SF_IO_3_DO_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF_IO_3_DO_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IO_3_DO_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_io_3_do_dly_sel` writer - "] -pub struct SF_IO_3_DO_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IO_3_DO_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 16)) | ((value as u32 & 0x03) << 16); - self.w - } -} -#[doc = "Field `sf_io_3_di_dly_sel` reader - "] -pub struct SF_IO_3_DI_DLY_SEL_R(crate::FieldReader); -impl SF_IO_3_DI_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF_IO_3_DI_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IO_3_DI_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_io_3_di_dly_sel` writer - "] -pub struct SF_IO_3_DI_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IO_3_DI_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} #[doc = "Field `sf_io_3_oe_dly_sel` reader - "] -pub struct SF_IO_3_OE_DLY_SEL_R(crate::FieldReader); -impl SF_IO_3_OE_DLY_SEL_R { - pub(crate) fn new(bits: u8) -> Self { - SF_IO_3_OE_DLY_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IO_3_OE_DLY_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_IO_3_OE_DLY_SEL_R = crate::FieldReader; #[doc = "Field `sf_io_3_oe_dly_sel` writer - "] -pub struct SF_IO_3_OE_DLY_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IO_3_OE_DLY_SEL_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w - } -} +pub type SF_IO_3_OE_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_IO_DLY_4_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf_io_3_di_dly_sel` reader - "] +pub type SF_IO_3_DI_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `sf_io_3_di_dly_sel` writer - "] +pub type SF_IO_3_DI_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_IO_DLY_4_SPEC, u8, u8, 2, O>; +#[doc = "Field `sf_io_3_do_dly_sel` reader - "] +pub type SF_IO_3_DO_DLY_SEL_R = crate::FieldReader; +#[doc = "Field `sf_io_3_do_dly_sel` writer - "] +pub type SF_IO_3_DO_DLY_SEL_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_IO_DLY_4_SPEC, u8, u8, 2, O>; impl R { - #[doc = "Bits 16:17"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn sf_io_3_do_dly_sel(&self) -> SF_IO_3_DO_DLY_SEL_R { - SF_IO_3_DO_DLY_SEL_R::new(((self.bits >> 16) & 0x03) as u8) + pub fn sf_io_3_oe_dly_sel(&self) -> SF_IO_3_OE_DLY_SEL_R { + SF_IO_3_OE_DLY_SEL_R::new((self.bits & 3) as u8) } #[doc = "Bits 8:9"] #[inline(always)] pub fn sf_io_3_di_dly_sel(&self) -> SF_IO_3_DI_DLY_SEL_R { - SF_IO_3_DI_DLY_SEL_R::new(((self.bits >> 8) & 0x03) as u8) + SF_IO_3_DI_DLY_SEL_R::new(((self.bits >> 8) & 3) as u8) } - #[doc = "Bits 0:1"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn sf_io_3_oe_dly_sel(&self) -> SF_IO_3_OE_DLY_SEL_R { - SF_IO_3_OE_DLY_SEL_R::new((self.bits & 0x03) as u8) + pub fn sf_io_3_do_dly_sel(&self) -> SF_IO_3_DO_DLY_SEL_R { + SF_IO_3_DO_DLY_SEL_R::new(((self.bits >> 16) & 3) as u8) } } impl W { - #[doc = "Bits 16:17"] + #[doc = "Bits 0:1"] #[inline(always)] - pub fn sf_io_3_do_dly_sel(&mut self) -> SF_IO_3_DO_DLY_SEL_W { - SF_IO_3_DO_DLY_SEL_W { w: self } + #[must_use] + pub fn sf_io_3_oe_dly_sel(&mut self) -> SF_IO_3_OE_DLY_SEL_W<0> { + SF_IO_3_OE_DLY_SEL_W::new(self) } #[doc = "Bits 8:9"] #[inline(always)] - pub fn sf_io_3_di_dly_sel(&mut self) -> SF_IO_3_DI_DLY_SEL_W { - SF_IO_3_DI_DLY_SEL_W { w: self } + #[must_use] + pub fn sf_io_3_di_dly_sel(&mut self) -> SF_IO_3_DI_DLY_SEL_W<8> { + SF_IO_3_DI_DLY_SEL_W::new(self) } - #[doc = "Bits 0:1"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn sf_io_3_oe_dly_sel(&mut self) -> SF_IO_3_OE_DLY_SEL_W { - SF_IO_3_OE_DLY_SEL_W { w: self } + #[must_use] + pub fn sf_io_3_do_dly_sel(&mut self) -> SF_IO_3_DO_DLY_SEL_W<16> { + SF_IO_3_DO_DLY_SEL_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -161,11 +104,10 @@ impl crate::Readable for SF_IF_IO_DLY_4_SPEC { #[doc = "`write(|w| ..)` method takes [sf_if_io_dly_4::W](W) writer structure"] impl crate::Writable for SF_IF_IO_DLY_4_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_if_io_dly_4 to value 0"] impl crate::Resettable for SF_IF_IO_DLY_4_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_if_sahb_0.rs b/src/sf_ctrl/sf_if_sahb_0.rs index c04b79d..a9ca54b 100644 --- a/src/sf_ctrl/sf_if_sahb_0.rs +++ b/src/sf_ctrl/sf_if_sahb_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,536 +28,210 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `sf_if_0_qpi_mode_en` reader - "] -pub struct SF_IF_0_QPI_MODE_EN_R(crate::FieldReader); -impl SF_IF_0_QPI_MODE_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_IF_0_QPI_MODE_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_0_QPI_MODE_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_0_qpi_mode_en` writer - "] -pub struct SF_IF_0_QPI_MODE_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_0_QPI_MODE_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 31)) | ((value as u32 & 0x01) << 31); - self.w - } -} -#[doc = "Field `sf_if_0_spi_mode` reader - "] -pub struct SF_IF_0_SPI_MODE_R(crate::FieldReader); -impl SF_IF_0_SPI_MODE_R { - pub(crate) fn new(bits: u8) -> Self { - SF_IF_0_SPI_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_0_SPI_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_0_spi_mode` writer - "] -pub struct SF_IF_0_SPI_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_0_SPI_MODE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 28)) | ((value as u32 & 0x07) << 28); - self.w - } -} -#[doc = "Field `sf_if_0_cmd_en` reader - "] -pub struct SF_IF_0_CMD_EN_R(crate::FieldReader); -impl SF_IF_0_CMD_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_IF_0_CMD_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_0_CMD_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_0_cmd_en` writer - "] -pub struct SF_IF_0_CMD_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_0_CMD_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 27)) | ((value as u32 & 0x01) << 27); - self.w - } -} -#[doc = "Field `sf_if_0_adr_en` reader - "] -pub struct SF_IF_0_ADR_EN_R(crate::FieldReader); -impl SF_IF_0_ADR_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_IF_0_ADR_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_0_ADR_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_0_adr_en` writer - "] -pub struct SF_IF_0_ADR_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_0_ADR_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 26)) | ((value as u32 & 0x01) << 26); - self.w - } -} -#[doc = "Field `sf_if_0_dmy_en` reader - "] -pub struct SF_IF_0_DMY_EN_R(crate::FieldReader); -impl SF_IF_0_DMY_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_IF_0_DMY_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_0_DMY_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_0_dmy_en` writer - "] -pub struct SF_IF_0_DMY_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_0_DMY_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 25)) | ((value as u32 & 0x01) << 25); - self.w - } -} -#[doc = "Field `sf_if_0_dat_en` reader - "] -pub struct SF_IF_0_DAT_EN_R(crate::FieldReader); -impl SF_IF_0_DAT_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SF_IF_0_DAT_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_0_DAT_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_0_dat_en` writer - "] -pub struct SF_IF_0_DAT_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_0_DAT_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24); - self.w - } -} -#[doc = "Field `sf_if_0_dat_rw` reader - "] -pub struct SF_IF_0_DAT_RW_R(crate::FieldReader); -impl SF_IF_0_DAT_RW_R { - pub(crate) fn new(bits: bool) -> Self { - SF_IF_0_DAT_RW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_0_DAT_RW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_0_dat_rw` writer - "] -pub struct SF_IF_0_DAT_RW_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_0_DAT_RW_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23); - self.w - } -} -#[doc = "Field `sf_if_0_cmd_byte` reader - "] -pub struct SF_IF_0_CMD_BYTE_R(crate::FieldReader); -impl SF_IF_0_CMD_BYTE_R { - pub(crate) fn new(bits: u8) -> Self { - SF_IF_0_CMD_BYTE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_0_CMD_BYTE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_0_cmd_byte` writer - "] -pub struct SF_IF_0_CMD_BYTE_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_0_CMD_BYTE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 20)) | ((value as u32 & 0x07) << 20); - self.w - } -} -#[doc = "Field `sf_if_0_adr_byte` reader - "] -pub struct SF_IF_0_ADR_BYTE_R(crate::FieldReader); -impl SF_IF_0_ADR_BYTE_R { - pub(crate) fn new(bits: u8) -> Self { - SF_IF_0_ADR_BYTE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_0_ADR_BYTE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_0_adr_byte` writer - "] -pub struct SF_IF_0_ADR_BYTE_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_0_ADR_BYTE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 17)) | ((value as u32 & 0x07) << 17); - self.w - } -} -#[doc = "Field `sf_if_0_dmy_byte` reader - "] -pub struct SF_IF_0_DMY_BYTE_R(crate::FieldReader); -impl SF_IF_0_DMY_BYTE_R { - pub(crate) fn new(bits: u8) -> Self { - SF_IF_0_DMY_BYTE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_0_DMY_BYTE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_0_dmy_byte` writer - "] -pub struct SF_IF_0_DMY_BYTE_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_0_DMY_BYTE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 12)) | ((value as u32 & 0x1f) << 12); - self.w - } -} -#[doc = "Field `sf_if_0_dat_byte` reader - "] -pub struct SF_IF_0_DAT_BYTE_R(crate::FieldReader); -impl SF_IF_0_DAT_BYTE_R { - pub(crate) fn new(bits: u16) -> Self { - SF_IF_0_DAT_BYTE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_0_DAT_BYTE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `sf_if_0_dat_byte` writer - "] -pub struct SF_IF_0_DAT_BYTE_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_0_DAT_BYTE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03ff << 2)) | ((value as u32 & 0x03ff) << 2); - self.w - } -} +#[doc = "Field `sf_if_busy` reader - "] +pub type SF_IF_BUSY_R = crate::BitReader; #[doc = "Field `sf_if_0_trig` reader - "] -pub struct SF_IF_0_TRIG_R(crate::FieldReader); -impl SF_IF_0_TRIG_R { - pub(crate) fn new(bits: bool) -> Self { - SF_IF_0_TRIG_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_0_TRIG_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_IF_0_TRIG_R = crate::BitReader; #[doc = "Field `sf_if_0_trig` writer - "] -pub struct SF_IF_0_TRIG_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_0_TRIG_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} -#[doc = "Field `sf_if_busy` reader - "] -pub struct SF_IF_BUSY_R(crate::FieldReader); -impl SF_IF_BUSY_R { - pub(crate) fn new(bits: bool) -> Self { - SF_IF_BUSY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_BUSY_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_IF_0_TRIG_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_IF_SAHB_0_SPEC, bool, O>; +#[doc = "Field `sf_if_0_dat_byte` reader - "] +pub type SF_IF_0_DAT_BYTE_R = crate::FieldReader; +#[doc = "Field `sf_if_0_dat_byte` writer - "] +pub type SF_IF_0_DAT_BYTE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_SAHB_0_SPEC, u16, u16, 10, O>; +#[doc = "Field `sf_if_0_dmy_byte` reader - "] +pub type SF_IF_0_DMY_BYTE_R = crate::FieldReader; +#[doc = "Field `sf_if_0_dmy_byte` writer - "] +pub type SF_IF_0_DMY_BYTE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_SAHB_0_SPEC, u8, u8, 5, O>; +#[doc = "Field `sf_if_0_adr_byte` reader - "] +pub type SF_IF_0_ADR_BYTE_R = crate::FieldReader; +#[doc = "Field `sf_if_0_adr_byte` writer - "] +pub type SF_IF_0_ADR_BYTE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_SAHB_0_SPEC, u8, u8, 3, O>; +#[doc = "Field `sf_if_0_cmd_byte` reader - "] +pub type SF_IF_0_CMD_BYTE_R = crate::FieldReader; +#[doc = "Field `sf_if_0_cmd_byte` writer - "] +pub type SF_IF_0_CMD_BYTE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_SAHB_0_SPEC, u8, u8, 3, O>; +#[doc = "Field `sf_if_0_dat_rw` reader - "] +pub type SF_IF_0_DAT_RW_R = crate::BitReader; +#[doc = "Field `sf_if_0_dat_rw` writer - "] +pub type SF_IF_0_DAT_RW_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_IF_SAHB_0_SPEC, bool, O>; +#[doc = "Field `sf_if_0_dat_en` reader - "] +pub type SF_IF_0_DAT_EN_R = crate::BitReader; +#[doc = "Field `sf_if_0_dat_en` writer - "] +pub type SF_IF_0_DAT_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_IF_SAHB_0_SPEC, bool, O>; +#[doc = "Field `sf_if_0_dmy_en` reader - "] +pub type SF_IF_0_DMY_EN_R = crate::BitReader; +#[doc = "Field `sf_if_0_dmy_en` writer - "] +pub type SF_IF_0_DMY_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_IF_SAHB_0_SPEC, bool, O>; +#[doc = "Field `sf_if_0_adr_en` reader - "] +pub type SF_IF_0_ADR_EN_R = crate::BitReader; +#[doc = "Field `sf_if_0_adr_en` writer - "] +pub type SF_IF_0_ADR_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_IF_SAHB_0_SPEC, bool, O>; +#[doc = "Field `sf_if_0_cmd_en` reader - "] +pub type SF_IF_0_CMD_EN_R = crate::BitReader; +#[doc = "Field `sf_if_0_cmd_en` writer - "] +pub type SF_IF_0_CMD_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SF_IF_SAHB_0_SPEC, bool, O>; +#[doc = "Field `sf_if_0_spi_mode` reader - "] +pub type SF_IF_0_SPI_MODE_R = crate::FieldReader; +#[doc = "Field `sf_if_0_spi_mode` writer - "] +pub type SF_IF_0_SPI_MODE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_SAHB_0_SPEC, u8, u8, 3, O>; +#[doc = "Field `sf_if_0_qpi_mode_en` reader - "] +pub type SF_IF_0_QPI_MODE_EN_R = crate::BitReader; +#[doc = "Field `sf_if_0_qpi_mode_en` writer - "] +pub type SF_IF_0_QPI_MODE_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SF_IF_SAHB_0_SPEC, bool, O>; impl R { - #[doc = "Bit 31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn sf_if_0_qpi_mode_en(&self) -> SF_IF_0_QPI_MODE_EN_R { - SF_IF_0_QPI_MODE_EN_R::new(((self.bits >> 31) & 0x01) != 0) + pub fn sf_if_busy(&self) -> SF_IF_BUSY_R { + SF_IF_BUSY_R::new((self.bits & 1) != 0) } - #[doc = "Bits 28:30"] + #[doc = "Bit 1"] #[inline(always)] - pub fn sf_if_0_spi_mode(&self) -> SF_IF_0_SPI_MODE_R { - SF_IF_0_SPI_MODE_R::new(((self.bits >> 28) & 0x07) as u8) + pub fn sf_if_0_trig(&self) -> SF_IF_0_TRIG_R { + SF_IF_0_TRIG_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 27"] + #[doc = "Bits 2:11"] #[inline(always)] - pub fn sf_if_0_cmd_en(&self) -> SF_IF_0_CMD_EN_R { - SF_IF_0_CMD_EN_R::new(((self.bits >> 27) & 0x01) != 0) + pub fn sf_if_0_dat_byte(&self) -> SF_IF_0_DAT_BYTE_R { + SF_IF_0_DAT_BYTE_R::new(((self.bits >> 2) & 0x03ff) as u16) } - #[doc = "Bit 26"] + #[doc = "Bits 12:16"] #[inline(always)] - pub fn sf_if_0_adr_en(&self) -> SF_IF_0_ADR_EN_R { - SF_IF_0_ADR_EN_R::new(((self.bits >> 26) & 0x01) != 0) + pub fn sf_if_0_dmy_byte(&self) -> SF_IF_0_DMY_BYTE_R { + SF_IF_0_DMY_BYTE_R::new(((self.bits >> 12) & 0x1f) as u8) } - #[doc = "Bit 25"] + #[doc = "Bits 17:19"] #[inline(always)] - pub fn sf_if_0_dmy_en(&self) -> SF_IF_0_DMY_EN_R { - SF_IF_0_DMY_EN_R::new(((self.bits >> 25) & 0x01) != 0) + pub fn sf_if_0_adr_byte(&self) -> SF_IF_0_ADR_BYTE_R { + SF_IF_0_ADR_BYTE_R::new(((self.bits >> 17) & 7) as u8) } - #[doc = "Bit 24"] + #[doc = "Bits 20:22"] #[inline(always)] - pub fn sf_if_0_dat_en(&self) -> SF_IF_0_DAT_EN_R { - SF_IF_0_DAT_EN_R::new(((self.bits >> 24) & 0x01) != 0) + pub fn sf_if_0_cmd_byte(&self) -> SF_IF_0_CMD_BYTE_R { + SF_IF_0_CMD_BYTE_R::new(((self.bits >> 20) & 7) as u8) } #[doc = "Bit 23"] #[inline(always)] pub fn sf_if_0_dat_rw(&self) -> SF_IF_0_DAT_RW_R { - SF_IF_0_DAT_RW_R::new(((self.bits >> 23) & 0x01) != 0) + SF_IF_0_DAT_RW_R::new(((self.bits >> 23) & 1) != 0) } - #[doc = "Bits 20:22"] + #[doc = "Bit 24"] #[inline(always)] - pub fn sf_if_0_cmd_byte(&self) -> SF_IF_0_CMD_BYTE_R { - SF_IF_0_CMD_BYTE_R::new(((self.bits >> 20) & 0x07) as u8) + pub fn sf_if_0_dat_en(&self) -> SF_IF_0_DAT_EN_R { + SF_IF_0_DAT_EN_R::new(((self.bits >> 24) & 1) != 0) } - #[doc = "Bits 17:19"] + #[doc = "Bit 25"] #[inline(always)] - pub fn sf_if_0_adr_byte(&self) -> SF_IF_0_ADR_BYTE_R { - SF_IF_0_ADR_BYTE_R::new(((self.bits >> 17) & 0x07) as u8) + pub fn sf_if_0_dmy_en(&self) -> SF_IF_0_DMY_EN_R { + SF_IF_0_DMY_EN_R::new(((self.bits >> 25) & 1) != 0) } - #[doc = "Bits 12:16"] + #[doc = "Bit 26"] #[inline(always)] - pub fn sf_if_0_dmy_byte(&self) -> SF_IF_0_DMY_BYTE_R { - SF_IF_0_DMY_BYTE_R::new(((self.bits >> 12) & 0x1f) as u8) + pub fn sf_if_0_adr_en(&self) -> SF_IF_0_ADR_EN_R { + SF_IF_0_ADR_EN_R::new(((self.bits >> 26) & 1) != 0) } - #[doc = "Bits 2:11"] + #[doc = "Bit 27"] #[inline(always)] - pub fn sf_if_0_dat_byte(&self) -> SF_IF_0_DAT_BYTE_R { - SF_IF_0_DAT_BYTE_R::new(((self.bits >> 2) & 0x03ff) as u16) + pub fn sf_if_0_cmd_en(&self) -> SF_IF_0_CMD_EN_R { + SF_IF_0_CMD_EN_R::new(((self.bits >> 27) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bits 28:30"] #[inline(always)] - pub fn sf_if_0_trig(&self) -> SF_IF_0_TRIG_R { - SF_IF_0_TRIG_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn sf_if_0_spi_mode(&self) -> SF_IF_0_SPI_MODE_R { + SF_IF_0_SPI_MODE_R::new(((self.bits >> 28) & 7) as u8) } - #[doc = "Bit 0"] + #[doc = "Bit 31"] #[inline(always)] - pub fn sf_if_busy(&self) -> SF_IF_BUSY_R { - SF_IF_BUSY_R::new((self.bits & 0x01) != 0) + pub fn sf_if_0_qpi_mode_en(&self) -> SF_IF_0_QPI_MODE_EN_R { + SF_IF_0_QPI_MODE_EN_R::new(((self.bits >> 31) & 1) != 0) } } impl W { - #[doc = "Bit 31"] + #[doc = "Bit 1"] #[inline(always)] - pub fn sf_if_0_qpi_mode_en(&mut self) -> SF_IF_0_QPI_MODE_EN_W { - SF_IF_0_QPI_MODE_EN_W { w: self } + #[must_use] + pub fn sf_if_0_trig(&mut self) -> SF_IF_0_TRIG_W<1> { + SF_IF_0_TRIG_W::new(self) } - #[doc = "Bits 28:30"] + #[doc = "Bits 2:11"] #[inline(always)] - pub fn sf_if_0_spi_mode(&mut self) -> SF_IF_0_SPI_MODE_W { - SF_IF_0_SPI_MODE_W { w: self } + #[must_use] + pub fn sf_if_0_dat_byte(&mut self) -> SF_IF_0_DAT_BYTE_W<2> { + SF_IF_0_DAT_BYTE_W::new(self) } - #[doc = "Bit 27"] + #[doc = "Bits 12:16"] #[inline(always)] - pub fn sf_if_0_cmd_en(&mut self) -> SF_IF_0_CMD_EN_W { - SF_IF_0_CMD_EN_W { w: self } + #[must_use] + pub fn sf_if_0_dmy_byte(&mut self) -> SF_IF_0_DMY_BYTE_W<12> { + SF_IF_0_DMY_BYTE_W::new(self) } - #[doc = "Bit 26"] + #[doc = "Bits 17:19"] #[inline(always)] - pub fn sf_if_0_adr_en(&mut self) -> SF_IF_0_ADR_EN_W { - SF_IF_0_ADR_EN_W { w: self } + #[must_use] + pub fn sf_if_0_adr_byte(&mut self) -> SF_IF_0_ADR_BYTE_W<17> { + SF_IF_0_ADR_BYTE_W::new(self) } - #[doc = "Bit 25"] + #[doc = "Bits 20:22"] #[inline(always)] - pub fn sf_if_0_dmy_en(&mut self) -> SF_IF_0_DMY_EN_W { - SF_IF_0_DMY_EN_W { w: self } + #[must_use] + pub fn sf_if_0_cmd_byte(&mut self) -> SF_IF_0_CMD_BYTE_W<20> { + SF_IF_0_CMD_BYTE_W::new(self) } - #[doc = "Bit 24"] + #[doc = "Bit 23"] #[inline(always)] - pub fn sf_if_0_dat_en(&mut self) -> SF_IF_0_DAT_EN_W { - SF_IF_0_DAT_EN_W { w: self } + #[must_use] + pub fn sf_if_0_dat_rw(&mut self) -> SF_IF_0_DAT_RW_W<23> { + SF_IF_0_DAT_RW_W::new(self) } - #[doc = "Bit 23"] + #[doc = "Bit 24"] #[inline(always)] - pub fn sf_if_0_dat_rw(&mut self) -> SF_IF_0_DAT_RW_W { - SF_IF_0_DAT_RW_W { w: self } + #[must_use] + pub fn sf_if_0_dat_en(&mut self) -> SF_IF_0_DAT_EN_W<24> { + SF_IF_0_DAT_EN_W::new(self) } - #[doc = "Bits 20:22"] + #[doc = "Bit 25"] #[inline(always)] - pub fn sf_if_0_cmd_byte(&mut self) -> SF_IF_0_CMD_BYTE_W { - SF_IF_0_CMD_BYTE_W { w: self } + #[must_use] + pub fn sf_if_0_dmy_en(&mut self) -> SF_IF_0_DMY_EN_W<25> { + SF_IF_0_DMY_EN_W::new(self) } - #[doc = "Bits 17:19"] + #[doc = "Bit 26"] #[inline(always)] - pub fn sf_if_0_adr_byte(&mut self) -> SF_IF_0_ADR_BYTE_W { - SF_IF_0_ADR_BYTE_W { w: self } + #[must_use] + pub fn sf_if_0_adr_en(&mut self) -> SF_IF_0_ADR_EN_W<26> { + SF_IF_0_ADR_EN_W::new(self) } - #[doc = "Bits 12:16"] + #[doc = "Bit 27"] #[inline(always)] - pub fn sf_if_0_dmy_byte(&mut self) -> SF_IF_0_DMY_BYTE_W { - SF_IF_0_DMY_BYTE_W { w: self } + #[must_use] + pub fn sf_if_0_cmd_en(&mut self) -> SF_IF_0_CMD_EN_W<27> { + SF_IF_0_CMD_EN_W::new(self) } - #[doc = "Bits 2:11"] + #[doc = "Bits 28:30"] #[inline(always)] - pub fn sf_if_0_dat_byte(&mut self) -> SF_IF_0_DAT_BYTE_W { - SF_IF_0_DAT_BYTE_W { w: self } + #[must_use] + pub fn sf_if_0_spi_mode(&mut self) -> SF_IF_0_SPI_MODE_W<28> { + SF_IF_0_SPI_MODE_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 31"] #[inline(always)] - pub fn sf_if_0_trig(&mut self) -> SF_IF_0_TRIG_W { - SF_IF_0_TRIG_W { w: self } + #[must_use] + pub fn sf_if_0_qpi_mode_en(&mut self) -> SF_IF_0_QPI_MODE_EN_W<31> { + SF_IF_0_QPI_MODE_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -574,11 +249,10 @@ impl crate::Readable for SF_IF_SAHB_0_SPEC { #[doc = "`write(|w| ..)` method takes [sf_if_sahb_0::W](W) writer structure"] impl crate::Writable for SF_IF_SAHB_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_if_sahb_0 to value 0"] impl crate::Resettable for SF_IF_SAHB_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_if_sahb_1.rs b/src/sf_ctrl/sf_if_sahb_1.rs index ad62144..0927d24 100644 --- a/src/sf_ctrl/sf_if_sahb_1.rs +++ b/src/sf_ctrl/sf_if_sahb_1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_if_0_cmd_buf_0` reader - "] -pub struct SF_IF_0_CMD_BUF_0_R(crate::FieldReader); -impl SF_IF_0_CMD_BUF_0_R { - pub(crate) fn new(bits: u32) -> Self { - SF_IF_0_CMD_BUF_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_0_CMD_BUF_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_IF_0_CMD_BUF_0_R = crate::FieldReader; #[doc = "Field `sf_if_0_cmd_buf_0` writer - "] -pub struct SF_IF_0_CMD_BUF_0_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_0_CMD_BUF_0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_IF_0_CMD_BUF_0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_SAHB_1_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_if_0_cmd_buf_0(&self) -> SF_IF_0_CMD_BUF_0_R { - SF_IF_0_CMD_BUF_0_R::new((self.bits & 0xffff_ffff) as u32) + SF_IF_0_CMD_BUF_0_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_if_0_cmd_buf_0(&mut self) -> SF_IF_0_CMD_BUF_0_W { - SF_IF_0_CMD_BUF_0_W { w: self } + #[must_use] + pub fn sf_if_0_cmd_buf_0(&mut self) -> SF_IF_0_CMD_BUF_0_W<0> { + SF_IF_0_CMD_BUF_0_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_IF_SAHB_1_SPEC { #[doc = "`write(|w| ..)` method takes [sf_if_sahb_1::W](W) writer structure"] impl crate::Writable for SF_IF_SAHB_1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_if_sahb_1 to value 0"] impl crate::Resettable for SF_IF_SAHB_1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_if_sahb_2.rs b/src/sf_ctrl/sf_if_sahb_2.rs index 10d5c71..c39f270 100644 --- a/src/sf_ctrl/sf_if_sahb_2.rs +++ b/src/sf_ctrl/sf_if_sahb_2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_if_0_cmd_buf_1` reader - "] -pub struct SF_IF_0_CMD_BUF_1_R(crate::FieldReader); -impl SF_IF_0_CMD_BUF_1_R { - pub(crate) fn new(bits: u32) -> Self { - SF_IF_0_CMD_BUF_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_0_CMD_BUF_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_IF_0_CMD_BUF_1_R = crate::FieldReader; #[doc = "Field `sf_if_0_cmd_buf_1` writer - "] -pub struct SF_IF_0_CMD_BUF_1_W<'a> { - w: &'a mut W, -} -impl<'a> SF_IF_0_CMD_BUF_1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_IF_0_CMD_BUF_1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_IF_SAHB_2_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_if_0_cmd_buf_1(&self) -> SF_IF_0_CMD_BUF_1_R { - SF_IF_0_CMD_BUF_1_R::new((self.bits & 0xffff_ffff) as u32) + SF_IF_0_CMD_BUF_1_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_if_0_cmd_buf_1(&mut self) -> SF_IF_0_CMD_BUF_1_W { - SF_IF_0_CMD_BUF_1_W { w: self } + #[must_use] + pub fn sf_if_0_cmd_buf_1(&mut self) -> SF_IF_0_CMD_BUF_1_W<0> { + SF_IF_0_CMD_BUF_1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_IF_SAHB_2_SPEC { #[doc = "`write(|w| ..)` method takes [sf_if_sahb_2::W](W) writer structure"] impl crate::Writable for SF_IF_SAHB_2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_if_sahb_2 to value 0"] impl crate::Resettable for SF_IF_SAHB_2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_if_status_0.rs b/src/sf_ctrl/sf_if_status_0.rs index dc011dd..1a22727 100644 --- a/src/sf_ctrl/sf_if_status_0.rs +++ b/src/sf_ctrl/sf_if_status_0.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `sf_if_status_0` reader - "] -pub struct SF_IF_STATUS_0_R(crate::FieldReader); -impl SF_IF_STATUS_0_R { - pub(crate) fn new(bits: u32) -> Self { - SF_IF_STATUS_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_STATUS_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_IF_STATUS_0_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_if_status_0(&self) -> SF_IF_STATUS_0_R { - SF_IF_STATUS_0_R::new((self.bits & 0xffff_ffff) as u32) + SF_IF_STATUS_0_R::new(self.bits) } } #[doc = "sf_if_status_0.\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 [sf_if_status_0](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SF_IF_STATUS_0_SPEC { } #[doc = "`reset()` method sets sf_if_status_0 to value 0"] impl crate::Resettable for SF_IF_STATUS_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/sf_ctrl/sf_if_status_1.rs b/src/sf_ctrl/sf_if_status_1.rs index 724dde9..597d5b8 100644 --- a/src/sf_ctrl/sf_if_status_1.rs +++ b/src/sf_ctrl/sf_if_status_1.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `sf_if_status_1` reader - "] -pub struct SF_IF_STATUS_1_R(crate::FieldReader); -impl SF_IF_STATUS_1_R { - pub(crate) fn new(bits: u32) -> Self { - SF_IF_STATUS_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_IF_STATUS_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_IF_STATUS_1_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_if_status_1(&self) -> SF_IF_STATUS_1_R { - SF_IF_STATUS_1_R::new((self.bits & 0xffff_ffff) as u32) + SF_IF_STATUS_1_R::new(self.bits) } } #[doc = "sf_if_status_1.\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 [sf_if_status_1](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SF_IF_STATUS_1_SPEC { } #[doc = "`reset()` method sets sf_if_status_1 to value 0x2000_0000"] impl crate::Resettable for SF_IF_STATUS_1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x2000_0000 - } + const RESET_VALUE: Self::Ux = 0x2000_0000; } diff --git a/src/sf_ctrl/sf_reserved.rs b/src/sf_ctrl/sf_reserved.rs index ad127a3..be2b46a 100644 --- a/src/sf_ctrl/sf_reserved.rs +++ b/src/sf_ctrl/sf_reserved.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,33 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `sf_reserved` reader - "] -pub struct SF_RESERVED_R(crate::FieldReader); -impl SF_RESERVED_R { - pub(crate) fn new(bits: u32) -> Self { - SF_RESERVED_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SF_RESERVED_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SF_RESERVED_R = crate::FieldReader; #[doc = "Field `sf_reserved` writer - "] -pub struct SF_RESERVED_W<'a> { - w: &'a mut W, -} -impl<'a> SF_RESERVED_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SF_RESERVED_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SF_RESERVED_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn sf_reserved(&self) -> SF_RESERVED_R { - SF_RESERVED_R::new((self.bits & 0xffff_ffff) as u32) + SF_RESERVED_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn sf_reserved(&mut self) -> SF_RESERVED_W { - SF_RESERVED_W { w: self } + #[must_use] + pub fn sf_reserved(&mut self) -> SF_RESERVED_W<0> { + SF_RESERVED_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SF_RESERVED_SPEC { #[doc = "`write(|w| ..)` method takes [sf_reserved::W](W) writer structure"] impl crate::Writable for SF_RESERVED_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets sf_reserved to value 0"] impl crate::Resettable for SF_RESERVED_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/spi.rs b/src/spi.rs index 71ecb74..467be06 100644 --- a/src/spi.rs +++ b/src/spi.rs @@ -2,71 +2,71 @@ #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - spi_config."] - pub spi_config: crate::Reg, + pub spi_config: SPI_CONFIG, #[doc = "0x04 - spi_int_sts."] - pub spi_int_sts: crate::Reg, + pub spi_int_sts: SPI_INT_STS, #[doc = "0x08 - spi_bus_busy."] - pub spi_bus_busy: crate::Reg, - _reserved3: [u8; 4usize], + pub spi_bus_busy: SPI_BUS_BUSY, + _reserved3: [u8; 0x04], #[doc = "0x10 - spi_prd_0."] - pub spi_prd_0: crate::Reg, + pub spi_prd_0: SPI_PRD_0, #[doc = "0x14 - spi_prd_1."] - pub spi_prd_1: crate::Reg, + pub spi_prd_1: SPI_PRD_1, #[doc = "0x18 - spi_rxd_ignr."] - pub spi_rxd_ignr: crate::Reg, + pub spi_rxd_ignr: SPI_RXD_IGNR, #[doc = "0x1c - spi_sto_value."] - pub spi_sto_value: crate::Reg, - _reserved7: [u8; 96usize], + pub spi_sto_value: SPI_STO_VALUE, + _reserved7: [u8; 0x60], #[doc = "0x80 - spi_fifo_config_0."] - pub spi_fifo_config_0: crate::Reg, + pub spi_fifo_config_0: SPI_FIFO_CONFIG_0, #[doc = "0x84 - spi_fifo_config_1."] - pub spi_fifo_config_1: crate::Reg, + pub spi_fifo_config_1: SPI_FIFO_CONFIG_1, #[doc = "0x88 - spi_fifo_wdata."] - pub spi_fifo_wdata: crate::Reg, + pub spi_fifo_wdata: SPI_FIFO_WDATA, #[doc = "0x8c - spi_fifo_rdata."] - pub spi_fifo_rdata: crate::Reg, + pub spi_fifo_rdata: SPI_FIFO_RDATA, } -#[doc = "spi_config register accessor: an alias for `Reg`"] +#[doc = "spi_config (rw) register accessor: an alias for `Reg`"] pub type SPI_CONFIG = crate::Reg; #[doc = "spi_config."] pub mod spi_config; -#[doc = "spi_int_sts register accessor: an alias for `Reg`"] +#[doc = "spi_int_sts (rw) register accessor: an alias for `Reg`"] pub type SPI_INT_STS = crate::Reg; #[doc = "spi_int_sts."] pub mod spi_int_sts; -#[doc = "spi_bus_busy register accessor: an alias for `Reg`"] +#[doc = "spi_bus_busy (r) register accessor: an alias for `Reg`"] pub type SPI_BUS_BUSY = crate::Reg; #[doc = "spi_bus_busy."] pub mod spi_bus_busy; -#[doc = "spi_prd_0 register accessor: an alias for `Reg`"] +#[doc = "spi_prd_0 (rw) register accessor: an alias for `Reg`"] pub type SPI_PRD_0 = crate::Reg; #[doc = "spi_prd_0."] pub mod spi_prd_0; -#[doc = "spi_prd_1 register accessor: an alias for `Reg`"] +#[doc = "spi_prd_1 (rw) register accessor: an alias for `Reg`"] pub type SPI_PRD_1 = crate::Reg; #[doc = "spi_prd_1."] pub mod spi_prd_1; -#[doc = "spi_rxd_ignr register accessor: an alias for `Reg`"] +#[doc = "spi_rxd_ignr (rw) register accessor: an alias for `Reg`"] pub type SPI_RXD_IGNR = crate::Reg; #[doc = "spi_rxd_ignr."] pub mod spi_rxd_ignr; -#[doc = "spi_sto_value register accessor: an alias for `Reg`"] +#[doc = "spi_sto_value (rw) register accessor: an alias for `Reg`"] pub type SPI_STO_VALUE = crate::Reg; #[doc = "spi_sto_value."] pub mod spi_sto_value; -#[doc = "spi_fifo_config_0 register accessor: an alias for `Reg`"] +#[doc = "spi_fifo_config_0 (rw) register accessor: an alias for `Reg`"] pub type SPI_FIFO_CONFIG_0 = crate::Reg; #[doc = "spi_fifo_config_0."] pub mod spi_fifo_config_0; -#[doc = "spi_fifo_config_1 register accessor: an alias for `Reg`"] +#[doc = "spi_fifo_config_1 (rw) register accessor: an alias for `Reg`"] pub type SPI_FIFO_CONFIG_1 = crate::Reg; #[doc = "spi_fifo_config_1."] pub mod spi_fifo_config_1; -#[doc = "spi_fifo_wdata register accessor: an alias for `Reg`"] +#[doc = "spi_fifo_wdata (w) register accessor: an alias for `Reg`"] pub type SPI_FIFO_WDATA = crate::Reg; #[doc = "spi_fifo_wdata."] pub mod spi_fifo_wdata; -#[doc = "spi_fifo_rdata register accessor: an alias for `Reg`"] +#[doc = "spi_fifo_rdata (r) register accessor: an alias for `Reg`"] pub type SPI_FIFO_RDATA = crate::Reg; #[doc = "spi_fifo_rdata."] pub mod spi_fifo_rdata; diff --git a/src/spi/spi_bus_busy.rs b/src/spi/spi_bus_busy.rs index 84821df..d457f5c 100644 --- a/src/spi/spi_bus_busy.rs +++ b/src/spi/spi_bus_busy.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `sts_spi_bus_busy` reader - "] -pub struct STS_SPI_BUS_BUSY_R(crate::FieldReader); -impl STS_SPI_BUS_BUSY_R { - pub(crate) fn new(bits: bool) -> Self { - STS_SPI_BUS_BUSY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for STS_SPI_BUS_BUSY_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type STS_SPI_BUS_BUSY_R = crate::BitReader; impl R { #[doc = "Bit 0"] #[inline(always)] pub fn sts_spi_bus_busy(&self) -> STS_SPI_BUS_BUSY_R { - STS_SPI_BUS_BUSY_R::new((self.bits & 0x01) != 0) + STS_SPI_BUS_BUSY_R::new((self.bits & 1) != 0) } } #[doc = "spi_bus_busy.\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 [spi_bus_busy](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SPI_BUS_BUSY_SPEC { } #[doc = "`reset()` method sets spi_bus_busy to value 0"] impl crate::Resettable for SPI_BUS_BUSY_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/spi/spi_config.rs b/src/spi/spi_config.rs index 8010d30..6488e65 100644 --- a/src/spi/spi_config.rs +++ b/src/spi/spi_config.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,501 +28,185 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `cr_spi_deg_cnt` reader - "] -pub struct CR_SPI_DEG_CNT_R(crate::FieldReader); -impl CR_SPI_DEG_CNT_R { - pub(crate) fn new(bits: u8) -> Self { - CR_SPI_DEG_CNT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_SPI_DEG_CNT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_spi_deg_cnt` writer - "] -pub struct CR_SPI_DEG_CNT_W<'a> { - w: &'a mut W, -} -impl<'a> CR_SPI_DEG_CNT_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 12)) | ((value as u32 & 0x0f) << 12); - self.w - } -} -#[doc = "Field `cr_spi_deg_en` reader - "] -pub struct CR_SPI_DEG_EN_R(crate::FieldReader); -impl CR_SPI_DEG_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_SPI_DEG_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_SPI_DEG_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_spi_deg_en` writer - "] -pub struct CR_SPI_DEG_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_SPI_DEG_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w - } -} -#[doc = "Field `cr_spi_m_cont_en` reader - "] -pub struct CR_SPI_M_CONT_EN_R(crate::FieldReader); -impl CR_SPI_M_CONT_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_SPI_M_CONT_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_SPI_M_CONT_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_spi_m_cont_en` writer - "] -pub struct CR_SPI_M_CONT_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_SPI_M_CONT_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w - } -} -#[doc = "Field `cr_spi_rxd_ignr_en` reader - "] -pub struct CR_SPI_RXD_IGNR_EN_R(crate::FieldReader); -impl CR_SPI_RXD_IGNR_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_SPI_RXD_IGNR_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_SPI_RXD_IGNR_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_spi_rxd_ignr_en` writer - "] -pub struct CR_SPI_RXD_IGNR_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_SPI_RXD_IGNR_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `cr_spi_byte_inv` reader - "] -pub struct CR_SPI_BYTE_INV_R(crate::FieldReader); -impl CR_SPI_BYTE_INV_R { - pub(crate) fn new(bits: bool) -> Self { - CR_SPI_BYTE_INV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_SPI_BYTE_INV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_spi_byte_inv` writer - "] -pub struct CR_SPI_BYTE_INV_W<'a> { - w: &'a mut W, -} -impl<'a> CR_SPI_BYTE_INV_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7); - self.w - } -} -#[doc = "Field `cr_spi_bit_inv` reader - "] -pub struct CR_SPI_BIT_INV_R(crate::FieldReader); -impl CR_SPI_BIT_INV_R { - pub(crate) fn new(bits: bool) -> Self { - CR_SPI_BIT_INV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_SPI_BIT_INV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_spi_bit_inv` writer - "] -pub struct CR_SPI_BIT_INV_W<'a> { - w: &'a mut W, -} -impl<'a> CR_SPI_BIT_INV_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w - } -} -#[doc = "Field `cr_spi_sclk_ph` reader - "] -pub struct CR_SPI_SCLK_PH_R(crate::FieldReader); -impl CR_SPI_SCLK_PH_R { - pub(crate) fn new(bits: bool) -> Self { - CR_SPI_SCLK_PH_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_SPI_SCLK_PH_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_spi_sclk_ph` writer - "] -pub struct CR_SPI_SCLK_PH_W<'a> { - w: &'a mut W, -} -impl<'a> CR_SPI_SCLK_PH_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w - } -} -#[doc = "Field `cr_spi_sclk_pol` reader - "] -pub struct CR_SPI_SCLK_POL_R(crate::FieldReader); -impl CR_SPI_SCLK_POL_R { - pub(crate) fn new(bits: bool) -> Self { - CR_SPI_SCLK_POL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_SPI_SCLK_POL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_spi_sclk_pol` writer - "] -pub struct CR_SPI_SCLK_POL_W<'a> { - w: &'a mut W, -} -impl<'a> CR_SPI_SCLK_POL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} -#[doc = "Field `cr_spi_frame_size` reader - "] -pub struct CR_SPI_FRAME_SIZE_R(crate::FieldReader); -impl CR_SPI_FRAME_SIZE_R { - pub(crate) fn new(bits: u8) -> Self { - CR_SPI_FRAME_SIZE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_SPI_FRAME_SIZE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_spi_frame_size` writer - "] -pub struct CR_SPI_FRAME_SIZE_W<'a> { - w: &'a mut W, -} -impl<'a> CR_SPI_FRAME_SIZE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 2)) | ((value as u32 & 0x03) << 2); - self.w - } -} -#[doc = "Field `cr_spi_s_en` reader - "] -pub struct CR_SPI_S_EN_R(crate::FieldReader); -impl CR_SPI_S_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_SPI_S_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_SPI_S_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_spi_s_en` writer - "] -pub struct CR_SPI_S_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_SPI_S_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `cr_spi_m_en` reader - "] -pub struct CR_SPI_M_EN_R(crate::FieldReader); -impl CR_SPI_M_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_SPI_M_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_SPI_M_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_SPI_M_EN_R = crate::BitReader; #[doc = "Field `cr_spi_m_en` writer - "] -pub struct CR_SPI_M_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_SPI_M_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type CR_SPI_M_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SPI_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_spi_s_en` reader - "] +pub type CR_SPI_S_EN_R = crate::BitReader; +#[doc = "Field `cr_spi_s_en` writer - "] +pub type CR_SPI_S_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SPI_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_spi_frame_size` reader - "] +pub type CR_SPI_FRAME_SIZE_R = crate::FieldReader; +#[doc = "Field `cr_spi_frame_size` writer - "] +pub type CR_SPI_FRAME_SIZE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SPI_CONFIG_SPEC, u8, u8, 2, O>; +#[doc = "Field `cr_spi_sclk_pol` reader - "] +pub type CR_SPI_SCLK_POL_R = crate::BitReader; +#[doc = "Field `cr_spi_sclk_pol` writer - "] +pub type CR_SPI_SCLK_POL_W<'a, const O: u8> = crate::BitWriter<'a, u32, SPI_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_spi_sclk_ph` reader - "] +pub type CR_SPI_SCLK_PH_R = crate::BitReader; +#[doc = "Field `cr_spi_sclk_ph` writer - "] +pub type CR_SPI_SCLK_PH_W<'a, const O: u8> = crate::BitWriter<'a, u32, SPI_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_spi_bit_inv` reader - "] +pub type CR_SPI_BIT_INV_R = crate::BitReader; +#[doc = "Field `cr_spi_bit_inv` writer - "] +pub type CR_SPI_BIT_INV_W<'a, const O: u8> = crate::BitWriter<'a, u32, SPI_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_spi_byte_inv` reader - "] +pub type CR_SPI_BYTE_INV_R = crate::BitReader; +#[doc = "Field `cr_spi_byte_inv` writer - "] +pub type CR_SPI_BYTE_INV_W<'a, const O: u8> = crate::BitWriter<'a, u32, SPI_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_spi_rxd_ignr_en` reader - "] +pub type CR_SPI_RXD_IGNR_EN_R = crate::BitReader; +#[doc = "Field `cr_spi_rxd_ignr_en` writer - "] +pub type CR_SPI_RXD_IGNR_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SPI_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_spi_m_cont_en` reader - "] +pub type CR_SPI_M_CONT_EN_R = crate::BitReader; +#[doc = "Field `cr_spi_m_cont_en` writer - "] +pub type CR_SPI_M_CONT_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SPI_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_spi_deg_en` reader - "] +pub type CR_SPI_DEG_EN_R = crate::BitReader; +#[doc = "Field `cr_spi_deg_en` writer - "] +pub type CR_SPI_DEG_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SPI_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_spi_deg_cnt` reader - "] +pub type CR_SPI_DEG_CNT_R = crate::FieldReader; +#[doc = "Field `cr_spi_deg_cnt` writer - "] +pub type CR_SPI_DEG_CNT_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SPI_CONFIG_SPEC, u8, u8, 4, O>; impl R { - #[doc = "Bits 12:15"] + #[doc = "Bit 0"] #[inline(always)] - pub fn cr_spi_deg_cnt(&self) -> CR_SPI_DEG_CNT_R { - CR_SPI_DEG_CNT_R::new(((self.bits >> 12) & 0x0f) as u8) + pub fn cr_spi_m_en(&self) -> CR_SPI_M_EN_R { + CR_SPI_M_EN_R::new((self.bits & 1) != 0) } - #[doc = "Bit 11"] + #[doc = "Bit 1"] #[inline(always)] - pub fn cr_spi_deg_en(&self) -> CR_SPI_DEG_EN_R { - CR_SPI_DEG_EN_R::new(((self.bits >> 11) & 0x01) != 0) + pub fn cr_spi_s_en(&self) -> CR_SPI_S_EN_R { + CR_SPI_S_EN_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 9"] + #[doc = "Bits 2:3"] #[inline(always)] - pub fn cr_spi_m_cont_en(&self) -> CR_SPI_M_CONT_EN_R { - CR_SPI_M_CONT_EN_R::new(((self.bits >> 9) & 0x01) != 0) + pub fn cr_spi_frame_size(&self) -> CR_SPI_FRAME_SIZE_R { + CR_SPI_FRAME_SIZE_R::new(((self.bits >> 2) & 3) as u8) } - #[doc = "Bit 8"] + #[doc = "Bit 4"] #[inline(always)] - pub fn cr_spi_rxd_ignr_en(&self) -> CR_SPI_RXD_IGNR_EN_R { - CR_SPI_RXD_IGNR_EN_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn cr_spi_sclk_pol(&self) -> CR_SPI_SCLK_POL_R { + CR_SPI_SCLK_POL_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 7"] + #[doc = "Bit 5"] #[inline(always)] - pub fn cr_spi_byte_inv(&self) -> CR_SPI_BYTE_INV_R { - CR_SPI_BYTE_INV_R::new(((self.bits >> 7) & 0x01) != 0) + pub fn cr_spi_sclk_ph(&self) -> CR_SPI_SCLK_PH_R { + CR_SPI_SCLK_PH_R::new(((self.bits >> 5) & 1) != 0) } #[doc = "Bit 6"] #[inline(always)] pub fn cr_spi_bit_inv(&self) -> CR_SPI_BIT_INV_R { - CR_SPI_BIT_INV_R::new(((self.bits >> 6) & 0x01) != 0) + CR_SPI_BIT_INV_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = "Bit 5"] + #[doc = "Bit 7"] #[inline(always)] - pub fn cr_spi_sclk_ph(&self) -> CR_SPI_SCLK_PH_R { - CR_SPI_SCLK_PH_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn cr_spi_byte_inv(&self) -> CR_SPI_BYTE_INV_R { + CR_SPI_BYTE_INV_R::new(((self.bits >> 7) & 1) != 0) } - #[doc = "Bit 4"] + #[doc = "Bit 8"] #[inline(always)] - pub fn cr_spi_sclk_pol(&self) -> CR_SPI_SCLK_POL_R { - CR_SPI_SCLK_POL_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn cr_spi_rxd_ignr_en(&self) -> CR_SPI_RXD_IGNR_EN_R { + CR_SPI_RXD_IGNR_EN_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bits 2:3"] + #[doc = "Bit 9"] #[inline(always)] - pub fn cr_spi_frame_size(&self) -> CR_SPI_FRAME_SIZE_R { - CR_SPI_FRAME_SIZE_R::new(((self.bits >> 2) & 0x03) as u8) + pub fn cr_spi_m_cont_en(&self) -> CR_SPI_M_CONT_EN_R { + CR_SPI_M_CONT_EN_R::new(((self.bits >> 9) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 11"] #[inline(always)] - pub fn cr_spi_s_en(&self) -> CR_SPI_S_EN_R { - CR_SPI_S_EN_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn cr_spi_deg_en(&self) -> CR_SPI_DEG_EN_R { + CR_SPI_DEG_EN_R::new(((self.bits >> 11) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bits 12:15"] #[inline(always)] - pub fn cr_spi_m_en(&self) -> CR_SPI_M_EN_R { - CR_SPI_M_EN_R::new((self.bits & 0x01) != 0) + pub fn cr_spi_deg_cnt(&self) -> CR_SPI_DEG_CNT_R { + CR_SPI_DEG_CNT_R::new(((self.bits >> 12) & 0x0f) as u8) } } impl W { - #[doc = "Bits 12:15"] + #[doc = "Bit 0"] #[inline(always)] - pub fn cr_spi_deg_cnt(&mut self) -> CR_SPI_DEG_CNT_W { - CR_SPI_DEG_CNT_W { w: self } + #[must_use] + pub fn cr_spi_m_en(&mut self) -> CR_SPI_M_EN_W<0> { + CR_SPI_M_EN_W::new(self) } - #[doc = "Bit 11"] + #[doc = "Bit 1"] #[inline(always)] - pub fn cr_spi_deg_en(&mut self) -> CR_SPI_DEG_EN_W { - CR_SPI_DEG_EN_W { w: self } + #[must_use] + pub fn cr_spi_s_en(&mut self) -> CR_SPI_S_EN_W<1> { + CR_SPI_S_EN_W::new(self) } - #[doc = "Bit 9"] + #[doc = "Bits 2:3"] #[inline(always)] - pub fn cr_spi_m_cont_en(&mut self) -> CR_SPI_M_CONT_EN_W { - CR_SPI_M_CONT_EN_W { w: self } + #[must_use] + pub fn cr_spi_frame_size(&mut self) -> CR_SPI_FRAME_SIZE_W<2> { + CR_SPI_FRAME_SIZE_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bit 4"] #[inline(always)] - pub fn cr_spi_rxd_ignr_en(&mut self) -> CR_SPI_RXD_IGNR_EN_W { - CR_SPI_RXD_IGNR_EN_W { w: self } + #[must_use] + pub fn cr_spi_sclk_pol(&mut self) -> CR_SPI_SCLK_POL_W<4> { + CR_SPI_SCLK_POL_W::new(self) } - #[doc = "Bit 7"] + #[doc = "Bit 5"] #[inline(always)] - pub fn cr_spi_byte_inv(&mut self) -> CR_SPI_BYTE_INV_W { - CR_SPI_BYTE_INV_W { w: self } + #[must_use] + pub fn cr_spi_sclk_ph(&mut self) -> CR_SPI_SCLK_PH_W<5> { + CR_SPI_SCLK_PH_W::new(self) } #[doc = "Bit 6"] #[inline(always)] - pub fn cr_spi_bit_inv(&mut self) -> CR_SPI_BIT_INV_W { - CR_SPI_BIT_INV_W { w: self } + #[must_use] + pub fn cr_spi_bit_inv(&mut self) -> CR_SPI_BIT_INV_W<6> { + CR_SPI_BIT_INV_W::new(self) } - #[doc = "Bit 5"] + #[doc = "Bit 7"] #[inline(always)] - pub fn cr_spi_sclk_ph(&mut self) -> CR_SPI_SCLK_PH_W { - CR_SPI_SCLK_PH_W { w: self } + #[must_use] + pub fn cr_spi_byte_inv(&mut self) -> CR_SPI_BYTE_INV_W<7> { + CR_SPI_BYTE_INV_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 8"] #[inline(always)] - pub fn cr_spi_sclk_pol(&mut self) -> CR_SPI_SCLK_POL_W { - CR_SPI_SCLK_POL_W { w: self } + #[must_use] + pub fn cr_spi_rxd_ignr_en(&mut self) -> CR_SPI_RXD_IGNR_EN_W<8> { + CR_SPI_RXD_IGNR_EN_W::new(self) } - #[doc = "Bits 2:3"] + #[doc = "Bit 9"] #[inline(always)] - pub fn cr_spi_frame_size(&mut self) -> CR_SPI_FRAME_SIZE_W { - CR_SPI_FRAME_SIZE_W { w: self } + #[must_use] + pub fn cr_spi_m_cont_en(&mut self) -> CR_SPI_M_CONT_EN_W<9> { + CR_SPI_M_CONT_EN_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 11"] #[inline(always)] - pub fn cr_spi_s_en(&mut self) -> CR_SPI_S_EN_W { - CR_SPI_S_EN_W { w: self } + #[must_use] + pub fn cr_spi_deg_en(&mut self) -> CR_SPI_DEG_EN_W<11> { + CR_SPI_DEG_EN_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bits 12:15"] #[inline(always)] - pub fn cr_spi_m_en(&mut self) -> CR_SPI_M_EN_W { - CR_SPI_M_EN_W { w: self } + #[must_use] + pub fn cr_spi_deg_cnt(&mut self) -> CR_SPI_DEG_CNT_W<12> { + CR_SPI_DEG_CNT_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -539,11 +224,10 @@ impl crate::Readable for SPI_CONFIG_SPEC { #[doc = "`write(|w| ..)` method takes [spi_config::W](W) writer structure"] impl crate::Writable for SPI_CONFIG_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets spi_config to value 0"] impl crate::Resettable for SPI_CONFIG_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/spi/spi_fifo_config_0.rs b/src/spi/spi_fifo_config_0.rs index 809f8df..3f09d27 100644 --- a/src/spi/spi_fifo_config_0.rs +++ b/src/spi/spi_fifo_config_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,275 +28,109 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rx_fifo_underflow` reader - "] -pub struct RX_FIFO_UNDERFLOW_R(crate::FieldReader); -impl RX_FIFO_UNDERFLOW_R { - pub(crate) fn new(bits: bool) -> Self { - RX_FIFO_UNDERFLOW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_FIFO_UNDERFLOW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_fifo_overflow` reader - "] -pub struct RX_FIFO_OVERFLOW_R(crate::FieldReader); -impl RX_FIFO_OVERFLOW_R { - pub(crate) fn new(bits: bool) -> Self { - RX_FIFO_OVERFLOW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_FIFO_OVERFLOW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_fifo_underflow` reader - "] -pub struct TX_FIFO_UNDERFLOW_R(crate::FieldReader); -impl TX_FIFO_UNDERFLOW_R { - pub(crate) fn new(bits: bool) -> Self { - TX_FIFO_UNDERFLOW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_FIFO_UNDERFLOW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_fifo_overflow` reader - "] -pub struct TX_FIFO_OVERFLOW_R(crate::FieldReader); -impl TX_FIFO_OVERFLOW_R { - pub(crate) fn new(bits: bool) -> Self { - TX_FIFO_OVERFLOW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_FIFO_OVERFLOW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_fifo_clr` reader - "] -pub struct RX_FIFO_CLR_R(crate::FieldReader); -impl RX_FIFO_CLR_R { - pub(crate) fn new(bits: bool) -> Self { - RX_FIFO_CLR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_FIFO_CLR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_fifo_clr` writer - "] -pub struct RX_FIFO_CLR_W<'a> { - w: &'a mut W, -} -impl<'a> RX_FIFO_CLR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `tx_fifo_clr` reader - "] -pub struct TX_FIFO_CLR_R(crate::FieldReader); -impl TX_FIFO_CLR_R { - pub(crate) fn new(bits: bool) -> Self { - TX_FIFO_CLR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_FIFO_CLR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_fifo_clr` writer - "] -pub struct TX_FIFO_CLR_W<'a> { - w: &'a mut W, -} -impl<'a> TX_FIFO_CLR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `spi_dma_rx_en` reader - "] -pub struct SPI_DMA_RX_EN_R(crate::FieldReader); -impl SPI_DMA_RX_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SPI_DMA_RX_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SPI_DMA_RX_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `spi_dma_rx_en` writer - "] -pub struct SPI_DMA_RX_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SPI_DMA_RX_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `spi_dma_tx_en` reader - "] -pub struct SPI_DMA_TX_EN_R(crate::FieldReader); -impl SPI_DMA_TX_EN_R { - pub(crate) fn new(bits: bool) -> Self { - SPI_DMA_TX_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SPI_DMA_TX_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SPI_DMA_TX_EN_R = crate::BitReader; #[doc = "Field `spi_dma_tx_en` writer - "] -pub struct SPI_DMA_TX_EN_W<'a> { - w: &'a mut W, -} -impl<'a> SPI_DMA_TX_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type SPI_DMA_TX_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SPI_FIFO_CONFIG_0_SPEC, bool, O>; +#[doc = "Field `spi_dma_rx_en` reader - "] +pub type SPI_DMA_RX_EN_R = crate::BitReader; +#[doc = "Field `spi_dma_rx_en` writer - "] +pub type SPI_DMA_RX_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SPI_FIFO_CONFIG_0_SPEC, bool, O>; +#[doc = "Field `tx_fifo_clr` reader - "] +pub type TX_FIFO_CLR_R = crate::BitReader; +#[doc = "Field `tx_fifo_clr` writer - "] +pub type TX_FIFO_CLR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SPI_FIFO_CONFIG_0_SPEC, bool, O>; +#[doc = "Field `rx_fifo_clr` reader - "] +pub type RX_FIFO_CLR_R = crate::BitReader; +#[doc = "Field `rx_fifo_clr` writer - "] +pub type RX_FIFO_CLR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, SPI_FIFO_CONFIG_0_SPEC, bool, O>; +#[doc = "Field `tx_fifo_overflow` reader - "] +pub type TX_FIFO_OVERFLOW_R = crate::BitReader; +#[doc = "Field `tx_fifo_underflow` reader - "] +pub type TX_FIFO_UNDERFLOW_R = crate::BitReader; +#[doc = "Field `rx_fifo_overflow` reader - "] +pub type RX_FIFO_OVERFLOW_R = crate::BitReader; +#[doc = "Field `rx_fifo_underflow` reader - "] +pub type RX_FIFO_UNDERFLOW_R = crate::BitReader; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn spi_dma_tx_en(&self) -> SPI_DMA_TX_EN_R { + SPI_DMA_TX_EN_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bit 7"] + #[doc = "Bit 1"] #[inline(always)] - pub fn rx_fifo_underflow(&self) -> RX_FIFO_UNDERFLOW_R { - RX_FIFO_UNDERFLOW_R::new(((self.bits >> 7) & 0x01) != 0) + pub fn spi_dma_rx_en(&self) -> SPI_DMA_RX_EN_R { + SPI_DMA_RX_EN_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 6"] + #[doc = "Bit 2"] #[inline(always)] - pub fn rx_fifo_overflow(&self) -> RX_FIFO_OVERFLOW_R { - RX_FIFO_OVERFLOW_R::new(((self.bits >> 6) & 0x01) != 0) + pub fn tx_fifo_clr(&self) -> TX_FIFO_CLR_R { + TX_FIFO_CLR_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 5"] + #[doc = "Bit 3"] #[inline(always)] - pub fn tx_fifo_underflow(&self) -> TX_FIFO_UNDERFLOW_R { - TX_FIFO_UNDERFLOW_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn rx_fifo_clr(&self) -> RX_FIFO_CLR_R { + RX_FIFO_CLR_R::new(((self.bits >> 3) & 1) != 0) } #[doc = "Bit 4"] #[inline(always)] pub fn tx_fifo_overflow(&self) -> TX_FIFO_OVERFLOW_R { - TX_FIFO_OVERFLOW_R::new(((self.bits >> 4) & 0x01) != 0) + TX_FIFO_OVERFLOW_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 3"] - #[inline(always)] - pub fn rx_fifo_clr(&self) -> RX_FIFO_CLR_R { - RX_FIFO_CLR_R::new(((self.bits >> 3) & 0x01) != 0) - } - #[doc = "Bit 2"] + #[doc = "Bit 5"] #[inline(always)] - pub fn tx_fifo_clr(&self) -> TX_FIFO_CLR_R { - TX_FIFO_CLR_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn tx_fifo_underflow(&self) -> TX_FIFO_UNDERFLOW_R { + TX_FIFO_UNDERFLOW_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 6"] #[inline(always)] - pub fn spi_dma_rx_en(&self) -> SPI_DMA_RX_EN_R { - SPI_DMA_RX_EN_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn rx_fifo_overflow(&self) -> RX_FIFO_OVERFLOW_R { + RX_FIFO_OVERFLOW_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 7"] #[inline(always)] - pub fn spi_dma_tx_en(&self) -> SPI_DMA_TX_EN_R { - SPI_DMA_TX_EN_R::new((self.bits & 0x01) != 0) + pub fn rx_fifo_underflow(&self) -> RX_FIFO_UNDERFLOW_R { + RX_FIFO_UNDERFLOW_R::new(((self.bits >> 7) & 1) != 0) } } impl W { - #[doc = "Bit 3"] + #[doc = "Bit 0"] #[inline(always)] - pub fn rx_fifo_clr(&mut self) -> RX_FIFO_CLR_W { - RX_FIFO_CLR_W { w: self } + #[must_use] + pub fn spi_dma_tx_en(&mut self) -> SPI_DMA_TX_EN_W<0> { + SPI_DMA_TX_EN_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bit 1"] #[inline(always)] - pub fn tx_fifo_clr(&mut self) -> TX_FIFO_CLR_W { - TX_FIFO_CLR_W { w: self } + #[must_use] + pub fn spi_dma_rx_en(&mut self) -> SPI_DMA_RX_EN_W<1> { + SPI_DMA_RX_EN_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 2"] #[inline(always)] - pub fn spi_dma_rx_en(&mut self) -> SPI_DMA_RX_EN_W { - SPI_DMA_RX_EN_W { w: self } + #[must_use] + pub fn tx_fifo_clr(&mut self) -> TX_FIFO_CLR_W<2> { + TX_FIFO_CLR_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 3"] #[inline(always)] - pub fn spi_dma_tx_en(&mut self) -> SPI_DMA_TX_EN_W { - SPI_DMA_TX_EN_W { w: self } + #[must_use] + pub fn rx_fifo_clr(&mut self) -> RX_FIFO_CLR_W<3> { + RX_FIFO_CLR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -313,11 +148,10 @@ impl crate::Readable for SPI_FIFO_CONFIG_0_SPEC { #[doc = "`write(|w| ..)` method takes [spi_fifo_config_0::W](W) writer structure"] impl crate::Writable for SPI_FIFO_CONFIG_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets spi_fifo_config_0 to value 0"] impl crate::Resettable for SPI_FIFO_CONFIG_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/spi/spi_fifo_config_1.rs b/src/spi/spi_fifo_config_1.rs index 23ad495..7860703 100644 --- a/src/spi/spi_fifo_config_1.rs +++ b/src/spi/spi_fifo_config_1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,125 +28,63 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rx_fifo_th` reader - "] -pub struct RX_FIFO_TH_R(crate::FieldReader); -impl RX_FIFO_TH_R { - pub(crate) fn new(bits: u8) -> Self { - RX_FIFO_TH_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_FIFO_TH_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_fifo_th` writer - "] -pub struct RX_FIFO_TH_W<'a> { - w: &'a mut W, -} -impl<'a> RX_FIFO_TH_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 24)) | ((value as u32 & 0x03) << 24); - self.w - } -} +#[doc = "Field `tx_fifo_cnt` reader - "] +pub type TX_FIFO_CNT_R = crate::FieldReader; +#[doc = "Field `rx_fifo_cnt` reader - "] +pub type RX_FIFO_CNT_R = crate::FieldReader; #[doc = "Field `tx_fifo_th` reader - "] -pub struct TX_FIFO_TH_R(crate::FieldReader); -impl TX_FIFO_TH_R { - pub(crate) fn new(bits: u8) -> Self { - TX_FIFO_TH_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_FIFO_TH_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TX_FIFO_TH_R = crate::FieldReader; #[doc = "Field `tx_fifo_th` writer - "] -pub struct TX_FIFO_TH_W<'a> { - w: &'a mut W, -} -impl<'a> TX_FIFO_TH_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 16)) | ((value as u32 & 0x03) << 16); - self.w - } -} -#[doc = "Field `rx_fifo_cnt` reader - "] -pub struct RX_FIFO_CNT_R(crate::FieldReader); -impl RX_FIFO_CNT_R { - pub(crate) fn new(bits: u8) -> Self { - RX_FIFO_CNT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_FIFO_CNT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_fifo_cnt` reader - "] -pub struct TX_FIFO_CNT_R(crate::FieldReader); -impl TX_FIFO_CNT_R { - pub(crate) fn new(bits: u8) -> Self { - TX_FIFO_CNT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_FIFO_CNT_R { - type Target = crate::FieldReader; +pub type TX_FIFO_TH_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SPI_FIFO_CONFIG_1_SPEC, u8, u8, 2, O>; +#[doc = "Field `rx_fifo_th` reader - "] +pub type RX_FIFO_TH_R = crate::FieldReader; +#[doc = "Field `rx_fifo_th` writer - "] +pub type RX_FIFO_TH_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SPI_FIFO_CONFIG_1_SPEC, u8, u8, 2, O>; +impl R { + #[doc = "Bits 0:2"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn tx_fifo_cnt(&self) -> TX_FIFO_CNT_R { + TX_FIFO_CNT_R::new((self.bits & 7) as u8) } -} -impl R { - #[doc = "Bits 24:25"] + #[doc = "Bits 8:10"] #[inline(always)] - pub fn rx_fifo_th(&self) -> RX_FIFO_TH_R { - RX_FIFO_TH_R::new(((self.bits >> 24) & 0x03) as u8) + pub fn rx_fifo_cnt(&self) -> RX_FIFO_CNT_R { + RX_FIFO_CNT_R::new(((self.bits >> 8) & 7) as u8) } #[doc = "Bits 16:17"] #[inline(always)] pub fn tx_fifo_th(&self) -> TX_FIFO_TH_R { - TX_FIFO_TH_R::new(((self.bits >> 16) & 0x03) as u8) - } - #[doc = "Bits 8:10"] - #[inline(always)] - pub fn rx_fifo_cnt(&self) -> RX_FIFO_CNT_R { - RX_FIFO_CNT_R::new(((self.bits >> 8) & 0x07) as u8) + TX_FIFO_TH_R::new(((self.bits >> 16) & 3) as u8) } - #[doc = "Bits 0:2"] + #[doc = "Bits 24:25"] #[inline(always)] - pub fn tx_fifo_cnt(&self) -> TX_FIFO_CNT_R { - TX_FIFO_CNT_R::new((self.bits & 0x07) as u8) + pub fn rx_fifo_th(&self) -> RX_FIFO_TH_R { + RX_FIFO_TH_R::new(((self.bits >> 24) & 3) as u8) } } impl W { - #[doc = "Bits 24:25"] + #[doc = "Bits 16:17"] #[inline(always)] - pub fn rx_fifo_th(&mut self) -> RX_FIFO_TH_W { - RX_FIFO_TH_W { w: self } + #[must_use] + pub fn tx_fifo_th(&mut self) -> TX_FIFO_TH_W<16> { + TX_FIFO_TH_W::new(self) } - #[doc = "Bits 16:17"] + #[doc = "Bits 24:25"] #[inline(always)] - pub fn tx_fifo_th(&mut self) -> TX_FIFO_TH_W { - TX_FIFO_TH_W { w: self } + #[must_use] + pub fn rx_fifo_th(&mut self) -> RX_FIFO_TH_W<24> { + RX_FIFO_TH_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -163,11 +102,10 @@ impl crate::Readable for SPI_FIFO_CONFIG_1_SPEC { #[doc = "`write(|w| ..)` method takes [spi_fifo_config_1::W](W) writer structure"] impl crate::Writable for SPI_FIFO_CONFIG_1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets spi_fifo_config_1 to value 0x04"] impl crate::Resettable for SPI_FIFO_CONFIG_1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x04 - } + const RESET_VALUE: Self::Ux = 0x04; } diff --git a/src/spi/spi_fifo_rdata.rs b/src/spi/spi_fifo_rdata.rs index d06e380..ca2c48c 100644 --- a/src/spi/spi_fifo_rdata.rs +++ b/src/spi/spi_fifo_rdata.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `spi_fifo_rdata` reader - "] -pub struct SPI_FIFO_RDATA_R(crate::FieldReader); -impl SPI_FIFO_RDATA_R { - pub(crate) fn new(bits: u32) -> Self { - SPI_FIFO_RDATA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SPI_FIFO_RDATA_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type SPI_FIFO_RDATA_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn spi_fifo_rdata(&self) -> SPI_FIFO_RDATA_R { - SPI_FIFO_RDATA_R::new((self.bits & 0xffff_ffff) as u32) + SPI_FIFO_RDATA_R::new(self.bits) } } #[doc = "spi_fifo_rdata.\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 [spi_fifo_rdata](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for SPI_FIFO_RDATA_SPEC { } #[doc = "`reset()` method sets spi_fifo_rdata to value 0"] impl crate::Resettable for SPI_FIFO_RDATA_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/spi/spi_fifo_wdata.rs b/src/spi/spi_fifo_wdata.rs index 0c86754..a440dff 100644 --- a/src/spi/spi_fifo_wdata.rs +++ b/src/spi/spi_fifo_wdata.rs @@ -13,30 +13,24 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `spi_fifo_wdata` writer - "] -pub struct SPI_FIFO_WDATA_W<'a> { - w: &'a mut W, -} -impl<'a> SPI_FIFO_WDATA_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type SPI_FIFO_WDATA_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SPI_FIFO_WDATA_SPEC, u32, u32, 32, O>; impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn spi_fifo_wdata(&mut self) -> SPI_FIFO_WDATA_W { - SPI_FIFO_WDATA_W { w: self } + #[must_use] + pub fn spi_fifo_wdata(&mut self) -> SPI_FIFO_WDATA_W<0> { + SPI_FIFO_WDATA_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -50,11 +44,10 @@ impl crate::RegisterSpec for SPI_FIFO_WDATA_SPEC { #[doc = "`write(|w| ..)` method takes [spi_fifo_wdata::W](W) writer structure"] impl crate::Writable for SPI_FIFO_WDATA_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets spi_fifo_wdata to value 0"] impl crate::Resettable for SPI_FIFO_WDATA_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/spi/spi_int_sts.rs b/src/spi/spi_int_sts.rs index 79411e4..120769c 100644 --- a/src/spi/spi_int_sts.rs +++ b/src/spi/spi_int_sts.rs @@ -7,977 +7,350 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { - fn from(reader: crate::R) -> Self { - R(reader) - } -} -#[doc = "Register `spi_int_sts` writer"] -pub struct W(crate::W); -impl core::ops::Deref for W { - type Target = crate::W; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -impl core::ops::DerefMut for W { - #[inline(always)] - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } -} -impl core::convert::From> for W { - fn from(writer: crate::W) -> Self { - W(writer) - } -} -#[doc = "Field `cr_spi_fer_en` reader - "] -pub struct CR_SPI_FER_EN_R(crate::FieldReader); -impl CR_SPI_FER_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_SPI_FER_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_SPI_FER_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_spi_fer_en` writer - "] -pub struct CR_SPI_FER_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_SPI_FER_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 29)) | ((value as u32 & 0x01) << 29); - self.w - } -} -#[doc = "Field `cr_spi_txu_en` reader - "] -pub struct CR_SPI_TXU_EN_R(crate::FieldReader); -impl CR_SPI_TXU_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_SPI_TXU_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_SPI_TXU_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_spi_txu_en` writer - "] -pub struct CR_SPI_TXU_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_SPI_TXU_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 28)) | ((value as u32 & 0x01) << 28); - self.w - } -} -#[doc = "Field `cr_spi_sto_en` reader - "] -pub struct CR_SPI_STO_EN_R(crate::FieldReader); -impl CR_SPI_STO_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_SPI_STO_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_SPI_STO_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_spi_sto_en` writer - "] -pub struct CR_SPI_STO_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_SPI_STO_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 27)) | ((value as u32 & 0x01) << 27); - self.w - } -} -#[doc = "Field `cr_spi_rxf_en` reader - "] -pub struct CR_SPI_RXF_EN_R(crate::FieldReader); -impl CR_SPI_RXF_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_SPI_RXF_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_SPI_RXF_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_spi_rxf_en` writer - "] -pub struct CR_SPI_RXF_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_SPI_RXF_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 26)) | ((value as u32 & 0x01) << 26); - self.w - } -} -#[doc = "Field `cr_spi_txf_en` reader - "] -pub struct CR_SPI_TXF_EN_R(crate::FieldReader); -impl CR_SPI_TXF_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_SPI_TXF_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_SPI_TXF_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_spi_txf_en` writer - "] -pub struct CR_SPI_TXF_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_SPI_TXF_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 25)) | ((value as u32 & 0x01) << 25); - self.w - } -} -#[doc = "Field `cr_spi_end_en` reader - "] -pub struct CR_SPI_END_EN_R(crate::FieldReader); -impl CR_SPI_END_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_SPI_END_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_SPI_END_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_spi_end_en` writer - "] -pub struct CR_SPI_END_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_SPI_END_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24); - self.w - } -} -#[doc = "Field `rsvd_21` reader - "] -pub struct RSVD_21_R(crate::FieldReader); -impl RSVD_21_R { - pub(crate) fn new(bits: bool) -> Self { - RSVD_21_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RSVD_21_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rsvd_21` writer - "] -pub struct RSVD_21_W<'a> { - w: &'a mut W, -} -impl<'a> RSVD_21_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21); - self.w - } -} -#[doc = "Field `cr_spi_txu_clr` reader - "] -pub struct CR_SPI_TXU_CLR_R(crate::FieldReader); -impl CR_SPI_TXU_CLR_R { - pub(crate) fn new(bits: bool) -> Self { - CR_SPI_TXU_CLR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_SPI_TXU_CLR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_spi_txu_clr` writer - "] -pub struct CR_SPI_TXU_CLR_W<'a> { - w: &'a mut W, -} -impl<'a> CR_SPI_TXU_CLR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20); - self.w - } -} -#[doc = "Field `cr_spi_sto_clr` reader - "] -pub struct CR_SPI_STO_CLR_R(crate::FieldReader); -impl CR_SPI_STO_CLR_R { - pub(crate) fn new(bits: bool) -> Self { - CR_SPI_STO_CLR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_SPI_STO_CLR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_spi_sto_clr` writer - "] -pub struct CR_SPI_STO_CLR_W<'a> { - w: &'a mut W, -} -impl<'a> CR_SPI_STO_CLR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 19)) | ((value as u32 & 0x01) << 19); - self.w - } -} -#[doc = "Field `rsvd_18` reader - "] -pub struct RSVD_18_R(crate::FieldReader); -impl RSVD_18_R { - pub(crate) fn new(bits: bool) -> Self { - RSVD_18_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RSVD_18_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rsvd_18` writer - "] -pub struct RSVD_18_W<'a> { - w: &'a mut W, -} -impl<'a> RSVD_18_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18); - self.w - } -} -#[doc = "Field `rsvd_17` reader - "] -pub struct RSVD_17_R(crate::FieldReader); -impl RSVD_17_R { - pub(crate) fn new(bits: bool) -> Self { - RSVD_17_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RSVD_17_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rsvd_17` writer - "] -pub struct RSVD_17_W<'a> { - w: &'a mut W, -} -impl<'a> RSVD_17_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w - } -} -#[doc = "Field `cr_spi_end_clr` reader - "] -pub struct CR_SPI_END_CLR_R(crate::FieldReader); -impl CR_SPI_END_CLR_R { - pub(crate) fn new(bits: bool) -> Self { - CR_SPI_END_CLR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_SPI_END_CLR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_spi_end_clr` writer - "] -pub struct CR_SPI_END_CLR_W<'a> { - w: &'a mut W, -} -impl<'a> CR_SPI_END_CLR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `cr_spi_fer_mask` reader - "] -pub struct CR_SPI_FER_MASK_R(crate::FieldReader); -impl CR_SPI_FER_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - CR_SPI_FER_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_SPI_FER_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_spi_fer_mask` writer - "] -pub struct CR_SPI_FER_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> CR_SPI_FER_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13); - self.w - } -} -#[doc = "Field `cr_spi_txu_mask` reader - "] -pub struct CR_SPI_TXU_MASK_R(crate::FieldReader); -impl CR_SPI_TXU_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - CR_SPI_TXU_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_SPI_TXU_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_spi_txu_mask` writer - "] -pub struct CR_SPI_TXU_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> CR_SPI_TXU_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); - self.w - } -} -#[doc = "Field `cr_spi_sto_mask` reader - "] -pub struct CR_SPI_STO_MASK_R(crate::FieldReader); -impl CR_SPI_STO_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - CR_SPI_STO_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_SPI_STO_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_spi_sto_mask` writer - "] -pub struct CR_SPI_STO_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> CR_SPI_STO_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w - } -} -#[doc = "Field `cr_spi_rxf_mask` reader - "] -pub struct CR_SPI_RXF_MASK_R(crate::FieldReader); -impl CR_SPI_RXF_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - CR_SPI_RXF_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_SPI_RXF_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_spi_rxf_mask` writer - "] -pub struct CR_SPI_RXF_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> CR_SPI_RXF_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); - self.w - } -} -#[doc = "Field `cr_spi_txf_mask` reader - "] -pub struct CR_SPI_TXF_MASK_R(crate::FieldReader); -impl CR_SPI_TXF_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - CR_SPI_TXF_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_SPI_TXF_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_spi_txf_mask` writer - "] -pub struct CR_SPI_TXF_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> CR_SPI_TXF_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w - } -} -#[doc = "Field `cr_spi_end_mask` reader - "] -pub struct CR_SPI_END_MASK_R(crate::FieldReader); -impl CR_SPI_END_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - CR_SPI_END_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_SPI_END_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_spi_end_mask` writer - "] -pub struct CR_SPI_END_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> CR_SPI_END_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `spi_fer_int` reader - "] -pub struct SPI_FER_INT_R(crate::FieldReader); -impl SPI_FER_INT_R { - pub(crate) fn new(bits: bool) -> Self { - SPI_FER_INT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SPI_FER_INT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `spi_txu_int` reader - "] -pub struct SPI_TXU_INT_R(crate::FieldReader); -impl SPI_TXU_INT_R { - pub(crate) fn new(bits: bool) -> Self { - SPI_TXU_INT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SPI_TXU_INT_R { - type Target = crate::FieldReader; +impl From> for R { #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `spi_sto_int` reader - "] -pub struct SPI_STO_INT_R(crate::FieldReader); -impl SPI_STO_INT_R { - pub(crate) fn new(bits: bool) -> Self { - SPI_STO_INT_R(crate::FieldReader::new(bits)) + fn from(reader: crate::R) -> Self { + R(reader) } } -impl core::ops::Deref for SPI_STO_INT_R { - type Target = crate::FieldReader; +#[doc = "Register `spi_int_sts` writer"] +pub struct W(crate::W); +impl core::ops::Deref for W { + type Target = crate::W; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } -#[doc = "Field `spi_rxf_int` reader - "] -pub struct SPI_RXF_INT_R(crate::FieldReader); -impl SPI_RXF_INT_R { - pub(crate) fn new(bits: bool) -> Self { - SPI_RXF_INT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SPI_RXF_INT_R { - type Target = crate::FieldReader; +impl core::ops::DerefMut for W { #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `spi_txf_int` reader - "] -pub struct SPI_TXF_INT_R(crate::FieldReader); -impl SPI_TXF_INT_R { - pub(crate) fn new(bits: bool) -> Self { - SPI_TXF_INT_R(crate::FieldReader::new(bits)) + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 } } -impl core::ops::Deref for SPI_TXF_INT_R { - type Target = crate::FieldReader; +impl From> for W { #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + fn from(writer: crate::W) -> Self { + W(writer) } } #[doc = "Field `spi_end_int` reader - "] -pub struct SPI_END_INT_R(crate::FieldReader); -impl SPI_END_INT_R { - pub(crate) fn new(bits: bool) -> Self { - SPI_END_INT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for SPI_END_INT_R { - type Target = crate::FieldReader; +pub type SPI_END_INT_R = crate::BitReader; +#[doc = "Field `spi_txf_int` reader - "] +pub type SPI_TXF_INT_R = crate::BitReader; +#[doc = "Field `spi_rxf_int` reader - "] +pub type SPI_RXF_INT_R = crate::BitReader; +#[doc = "Field `spi_sto_int` reader - "] +pub type SPI_STO_INT_R = crate::BitReader; +#[doc = "Field `spi_txu_int` reader - "] +pub type SPI_TXU_INT_R = crate::BitReader; +#[doc = "Field `spi_fer_int` reader - "] +pub type SPI_FER_INT_R = crate::BitReader; +#[doc = "Field `cr_spi_end_mask` reader - "] +pub type CR_SPI_END_MASK_R = crate::BitReader; +#[doc = "Field `cr_spi_end_mask` writer - "] +pub type CR_SPI_END_MASK_W<'a, const O: u8> = crate::BitWriter<'a, u32, SPI_INT_STS_SPEC, bool, O>; +#[doc = "Field `cr_spi_txf_mask` reader - "] +pub type CR_SPI_TXF_MASK_R = crate::BitReader; +#[doc = "Field `cr_spi_txf_mask` writer - "] +pub type CR_SPI_TXF_MASK_W<'a, const O: u8> = crate::BitWriter<'a, u32, SPI_INT_STS_SPEC, bool, O>; +#[doc = "Field `cr_spi_rxf_mask` reader - "] +pub type CR_SPI_RXF_MASK_R = crate::BitReader; +#[doc = "Field `cr_spi_rxf_mask` writer - "] +pub type CR_SPI_RXF_MASK_W<'a, const O: u8> = crate::BitWriter<'a, u32, SPI_INT_STS_SPEC, bool, O>; +#[doc = "Field `cr_spi_sto_mask` reader - "] +pub type CR_SPI_STO_MASK_R = crate::BitReader; +#[doc = "Field `cr_spi_sto_mask` writer - "] +pub type CR_SPI_STO_MASK_W<'a, const O: u8> = crate::BitWriter<'a, u32, SPI_INT_STS_SPEC, bool, O>; +#[doc = "Field `cr_spi_txu_mask` reader - "] +pub type CR_SPI_TXU_MASK_R = crate::BitReader; +#[doc = "Field `cr_spi_txu_mask` writer - "] +pub type CR_SPI_TXU_MASK_W<'a, const O: u8> = crate::BitWriter<'a, u32, SPI_INT_STS_SPEC, bool, O>; +#[doc = "Field `cr_spi_fer_mask` reader - "] +pub type CR_SPI_FER_MASK_R = crate::BitReader; +#[doc = "Field `cr_spi_fer_mask` writer - "] +pub type CR_SPI_FER_MASK_W<'a, const O: u8> = crate::BitWriter<'a, u32, SPI_INT_STS_SPEC, bool, O>; +#[doc = "Field `cr_spi_end_clr` reader - "] +pub type CR_SPI_END_CLR_R = crate::BitReader; +#[doc = "Field `cr_spi_end_clr` writer - "] +pub type CR_SPI_END_CLR_W<'a, const O: u8> = crate::BitWriter<'a, u32, SPI_INT_STS_SPEC, bool, O>; +#[doc = "Field `rsvd_17` reader - "] +pub type RSVD_17_R = crate::BitReader; +#[doc = "Field `rsvd_17` writer - "] +pub type RSVD_17_W<'a, const O: u8> = crate::BitWriter<'a, u32, SPI_INT_STS_SPEC, bool, O>; +#[doc = "Field `rsvd_18` reader - "] +pub type RSVD_18_R = crate::BitReader; +#[doc = "Field `rsvd_18` writer - "] +pub type RSVD_18_W<'a, const O: u8> = crate::BitWriter<'a, u32, SPI_INT_STS_SPEC, bool, O>; +#[doc = "Field `cr_spi_sto_clr` reader - "] +pub type CR_SPI_STO_CLR_R = crate::BitReader; +#[doc = "Field `cr_spi_sto_clr` writer - "] +pub type CR_SPI_STO_CLR_W<'a, const O: u8> = crate::BitWriter<'a, u32, SPI_INT_STS_SPEC, bool, O>; +#[doc = "Field `cr_spi_txu_clr` reader - "] +pub type CR_SPI_TXU_CLR_R = crate::BitReader; +#[doc = "Field `cr_spi_txu_clr` writer - "] +pub type CR_SPI_TXU_CLR_W<'a, const O: u8> = crate::BitWriter<'a, u32, SPI_INT_STS_SPEC, bool, O>; +#[doc = "Field `rsvd_21` reader - "] +pub type RSVD_21_R = crate::BitReader; +#[doc = "Field `rsvd_21` writer - "] +pub type RSVD_21_W<'a, const O: u8> = crate::BitWriter<'a, u32, SPI_INT_STS_SPEC, bool, O>; +#[doc = "Field `cr_spi_end_en` reader - "] +pub type CR_SPI_END_EN_R = crate::BitReader; +#[doc = "Field `cr_spi_end_en` writer - "] +pub type CR_SPI_END_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SPI_INT_STS_SPEC, bool, O>; +#[doc = "Field `cr_spi_txf_en` reader - "] +pub type CR_SPI_TXF_EN_R = crate::BitReader; +#[doc = "Field `cr_spi_txf_en` writer - "] +pub type CR_SPI_TXF_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SPI_INT_STS_SPEC, bool, O>; +#[doc = "Field `cr_spi_rxf_en` reader - "] +pub type CR_SPI_RXF_EN_R = crate::BitReader; +#[doc = "Field `cr_spi_rxf_en` writer - "] +pub type CR_SPI_RXF_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SPI_INT_STS_SPEC, bool, O>; +#[doc = "Field `cr_spi_sto_en` reader - "] +pub type CR_SPI_STO_EN_R = crate::BitReader; +#[doc = "Field `cr_spi_sto_en` writer - "] +pub type CR_SPI_STO_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SPI_INT_STS_SPEC, bool, O>; +#[doc = "Field `cr_spi_txu_en` reader - "] +pub type CR_SPI_TXU_EN_R = crate::BitReader; +#[doc = "Field `cr_spi_txu_en` writer - "] +pub type CR_SPI_TXU_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SPI_INT_STS_SPEC, bool, O>; +#[doc = "Field `cr_spi_fer_en` reader - "] +pub type CR_SPI_FER_EN_R = crate::BitReader; +#[doc = "Field `cr_spi_fer_en` writer - "] +pub type CR_SPI_FER_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SPI_INT_STS_SPEC, bool, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn spi_end_int(&self) -> SPI_END_INT_R { + SPI_END_INT_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bit 29"] + #[doc = "Bit 1"] #[inline(always)] - pub fn cr_spi_fer_en(&self) -> CR_SPI_FER_EN_R { - CR_SPI_FER_EN_R::new(((self.bits >> 29) & 0x01) != 0) + pub fn spi_txf_int(&self) -> SPI_TXF_INT_R { + SPI_TXF_INT_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 28"] + #[doc = "Bit 2"] #[inline(always)] - pub fn cr_spi_txu_en(&self) -> CR_SPI_TXU_EN_R { - CR_SPI_TXU_EN_R::new(((self.bits >> 28) & 0x01) != 0) + pub fn spi_rxf_int(&self) -> SPI_RXF_INT_R { + SPI_RXF_INT_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 27"] + #[doc = "Bit 3"] #[inline(always)] - pub fn cr_spi_sto_en(&self) -> CR_SPI_STO_EN_R { - CR_SPI_STO_EN_R::new(((self.bits >> 27) & 0x01) != 0) + pub fn spi_sto_int(&self) -> SPI_STO_INT_R { + SPI_STO_INT_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bit 26"] + #[doc = "Bit 4"] #[inline(always)] - pub fn cr_spi_rxf_en(&self) -> CR_SPI_RXF_EN_R { - CR_SPI_RXF_EN_R::new(((self.bits >> 26) & 0x01) != 0) + pub fn spi_txu_int(&self) -> SPI_TXU_INT_R { + SPI_TXU_INT_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 25"] + #[doc = "Bit 5"] #[inline(always)] - pub fn cr_spi_txf_en(&self) -> CR_SPI_TXF_EN_R { - CR_SPI_TXF_EN_R::new(((self.bits >> 25) & 0x01) != 0) + pub fn spi_fer_int(&self) -> SPI_FER_INT_R { + SPI_FER_INT_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 24"] + #[doc = "Bit 8"] #[inline(always)] - pub fn cr_spi_end_en(&self) -> CR_SPI_END_EN_R { - CR_SPI_END_EN_R::new(((self.bits >> 24) & 0x01) != 0) + pub fn cr_spi_end_mask(&self) -> CR_SPI_END_MASK_R { + CR_SPI_END_MASK_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bit 21"] + #[doc = "Bit 9"] #[inline(always)] - pub fn rsvd_21(&self) -> RSVD_21_R { - RSVD_21_R::new(((self.bits >> 21) & 0x01) != 0) + pub fn cr_spi_txf_mask(&self) -> CR_SPI_TXF_MASK_R { + CR_SPI_TXF_MASK_R::new(((self.bits >> 9) & 1) != 0) } - #[doc = "Bit 20"] + #[doc = "Bit 10"] #[inline(always)] - pub fn cr_spi_txu_clr(&self) -> CR_SPI_TXU_CLR_R { - CR_SPI_TXU_CLR_R::new(((self.bits >> 20) & 0x01) != 0) + pub fn cr_spi_rxf_mask(&self) -> CR_SPI_RXF_MASK_R { + CR_SPI_RXF_MASK_R::new(((self.bits >> 10) & 1) != 0) } - #[doc = "Bit 19"] + #[doc = "Bit 11"] #[inline(always)] - pub fn cr_spi_sto_clr(&self) -> CR_SPI_STO_CLR_R { - CR_SPI_STO_CLR_R::new(((self.bits >> 19) & 0x01) != 0) + pub fn cr_spi_sto_mask(&self) -> CR_SPI_STO_MASK_R { + CR_SPI_STO_MASK_R::new(((self.bits >> 11) & 1) != 0) } - #[doc = "Bit 18"] + #[doc = "Bit 12"] #[inline(always)] - pub fn rsvd_18(&self) -> RSVD_18_R { - RSVD_18_R::new(((self.bits >> 18) & 0x01) != 0) + pub fn cr_spi_txu_mask(&self) -> CR_SPI_TXU_MASK_R { + CR_SPI_TXU_MASK_R::new(((self.bits >> 12) & 1) != 0) } - #[doc = "Bit 17"] + #[doc = "Bit 13"] #[inline(always)] - pub fn rsvd_17(&self) -> RSVD_17_R { - RSVD_17_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn cr_spi_fer_mask(&self) -> CR_SPI_FER_MASK_R { + CR_SPI_FER_MASK_R::new(((self.bits >> 13) & 1) != 0) } #[doc = "Bit 16"] #[inline(always)] pub fn cr_spi_end_clr(&self) -> CR_SPI_END_CLR_R { - CR_SPI_END_CLR_R::new(((self.bits >> 16) & 0x01) != 0) - } - #[doc = "Bit 13"] - #[inline(always)] - pub fn cr_spi_fer_mask(&self) -> CR_SPI_FER_MASK_R { - CR_SPI_FER_MASK_R::new(((self.bits >> 13) & 0x01) != 0) + CR_SPI_END_CLR_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 12"] + #[doc = "Bit 17"] #[inline(always)] - pub fn cr_spi_txu_mask(&self) -> CR_SPI_TXU_MASK_R { - CR_SPI_TXU_MASK_R::new(((self.bits >> 12) & 0x01) != 0) + pub fn rsvd_17(&self) -> RSVD_17_R { + RSVD_17_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bit 11"] + #[doc = "Bit 18"] #[inline(always)] - pub fn cr_spi_sto_mask(&self) -> CR_SPI_STO_MASK_R { - CR_SPI_STO_MASK_R::new(((self.bits >> 11) & 0x01) != 0) + pub fn rsvd_18(&self) -> RSVD_18_R { + RSVD_18_R::new(((self.bits >> 18) & 1) != 0) } - #[doc = "Bit 10"] + #[doc = "Bit 19"] #[inline(always)] - pub fn cr_spi_rxf_mask(&self) -> CR_SPI_RXF_MASK_R { - CR_SPI_RXF_MASK_R::new(((self.bits >> 10) & 0x01) != 0) + pub fn cr_spi_sto_clr(&self) -> CR_SPI_STO_CLR_R { + CR_SPI_STO_CLR_R::new(((self.bits >> 19) & 1) != 0) } - #[doc = "Bit 9"] + #[doc = "Bit 20"] #[inline(always)] - pub fn cr_spi_txf_mask(&self) -> CR_SPI_TXF_MASK_R { - CR_SPI_TXF_MASK_R::new(((self.bits >> 9) & 0x01) != 0) + pub fn cr_spi_txu_clr(&self) -> CR_SPI_TXU_CLR_R { + CR_SPI_TXU_CLR_R::new(((self.bits >> 20) & 1) != 0) } - #[doc = "Bit 8"] + #[doc = "Bit 21"] #[inline(always)] - pub fn cr_spi_end_mask(&self) -> CR_SPI_END_MASK_R { - CR_SPI_END_MASK_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn rsvd_21(&self) -> RSVD_21_R { + RSVD_21_R::new(((self.bits >> 21) & 1) != 0) } - #[doc = "Bit 5"] + #[doc = "Bit 24"] #[inline(always)] - pub fn spi_fer_int(&self) -> SPI_FER_INT_R { - SPI_FER_INT_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn cr_spi_end_en(&self) -> CR_SPI_END_EN_R { + CR_SPI_END_EN_R::new(((self.bits >> 24) & 1) != 0) } - #[doc = "Bit 4"] + #[doc = "Bit 25"] #[inline(always)] - pub fn spi_txu_int(&self) -> SPI_TXU_INT_R { - SPI_TXU_INT_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn cr_spi_txf_en(&self) -> CR_SPI_TXF_EN_R { + CR_SPI_TXF_EN_R::new(((self.bits >> 25) & 1) != 0) } - #[doc = "Bit 3"] + #[doc = "Bit 26"] #[inline(always)] - pub fn spi_sto_int(&self) -> SPI_STO_INT_R { - SPI_STO_INT_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn cr_spi_rxf_en(&self) -> CR_SPI_RXF_EN_R { + CR_SPI_RXF_EN_R::new(((self.bits >> 26) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bit 27"] #[inline(always)] - pub fn spi_rxf_int(&self) -> SPI_RXF_INT_R { - SPI_RXF_INT_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn cr_spi_sto_en(&self) -> CR_SPI_STO_EN_R { + CR_SPI_STO_EN_R::new(((self.bits >> 27) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 28"] #[inline(always)] - pub fn spi_txf_int(&self) -> SPI_TXF_INT_R { - SPI_TXF_INT_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn cr_spi_txu_en(&self) -> CR_SPI_TXU_EN_R { + CR_SPI_TXU_EN_R::new(((self.bits >> 28) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 29"] #[inline(always)] - pub fn spi_end_int(&self) -> SPI_END_INT_R { - SPI_END_INT_R::new((self.bits & 0x01) != 0) + pub fn cr_spi_fer_en(&self) -> CR_SPI_FER_EN_R { + CR_SPI_FER_EN_R::new(((self.bits >> 29) & 1) != 0) } } impl W { - #[doc = "Bit 29"] + #[doc = "Bit 8"] #[inline(always)] - pub fn cr_spi_fer_en(&mut self) -> CR_SPI_FER_EN_W { - CR_SPI_FER_EN_W { w: self } + #[must_use] + pub fn cr_spi_end_mask(&mut self) -> CR_SPI_END_MASK_W<8> { + CR_SPI_END_MASK_W::new(self) } - #[doc = "Bit 28"] + #[doc = "Bit 9"] #[inline(always)] - pub fn cr_spi_txu_en(&mut self) -> CR_SPI_TXU_EN_W { - CR_SPI_TXU_EN_W { w: self } + #[must_use] + pub fn cr_spi_txf_mask(&mut self) -> CR_SPI_TXF_MASK_W<9> { + CR_SPI_TXF_MASK_W::new(self) } - #[doc = "Bit 27"] + #[doc = "Bit 10"] #[inline(always)] - pub fn cr_spi_sto_en(&mut self) -> CR_SPI_STO_EN_W { - CR_SPI_STO_EN_W { w: self } + #[must_use] + pub fn cr_spi_rxf_mask(&mut self) -> CR_SPI_RXF_MASK_W<10> { + CR_SPI_RXF_MASK_W::new(self) } - #[doc = "Bit 26"] + #[doc = "Bit 11"] #[inline(always)] - pub fn cr_spi_rxf_en(&mut self) -> CR_SPI_RXF_EN_W { - CR_SPI_RXF_EN_W { w: self } + #[must_use] + pub fn cr_spi_sto_mask(&mut self) -> CR_SPI_STO_MASK_W<11> { + CR_SPI_STO_MASK_W::new(self) } - #[doc = "Bit 25"] + #[doc = "Bit 12"] #[inline(always)] - pub fn cr_spi_txf_en(&mut self) -> CR_SPI_TXF_EN_W { - CR_SPI_TXF_EN_W { w: self } + #[must_use] + pub fn cr_spi_txu_mask(&mut self) -> CR_SPI_TXU_MASK_W<12> { + CR_SPI_TXU_MASK_W::new(self) } - #[doc = "Bit 24"] + #[doc = "Bit 13"] #[inline(always)] - pub fn cr_spi_end_en(&mut self) -> CR_SPI_END_EN_W { - CR_SPI_END_EN_W { w: self } + #[must_use] + pub fn cr_spi_fer_mask(&mut self) -> CR_SPI_FER_MASK_W<13> { + CR_SPI_FER_MASK_W::new(self) } - #[doc = "Bit 21"] + #[doc = "Bit 16"] #[inline(always)] - pub fn rsvd_21(&mut self) -> RSVD_21_W { - RSVD_21_W { w: self } + #[must_use] + pub fn cr_spi_end_clr(&mut self) -> CR_SPI_END_CLR_W<16> { + CR_SPI_END_CLR_W::new(self) } - #[doc = "Bit 20"] + #[doc = "Bit 17"] #[inline(always)] - pub fn cr_spi_txu_clr(&mut self) -> CR_SPI_TXU_CLR_W { - CR_SPI_TXU_CLR_W { w: self } + #[must_use] + pub fn rsvd_17(&mut self) -> RSVD_17_W<17> { + RSVD_17_W::new(self) } - #[doc = "Bit 19"] + #[doc = "Bit 18"] #[inline(always)] - pub fn cr_spi_sto_clr(&mut self) -> CR_SPI_STO_CLR_W { - CR_SPI_STO_CLR_W { w: self } + #[must_use] + pub fn rsvd_18(&mut self) -> RSVD_18_W<18> { + RSVD_18_W::new(self) } - #[doc = "Bit 18"] + #[doc = "Bit 19"] #[inline(always)] - pub fn rsvd_18(&mut self) -> RSVD_18_W { - RSVD_18_W { w: self } + #[must_use] + pub fn cr_spi_sto_clr(&mut self) -> CR_SPI_STO_CLR_W<19> { + CR_SPI_STO_CLR_W::new(self) } - #[doc = "Bit 17"] + #[doc = "Bit 20"] #[inline(always)] - pub fn rsvd_17(&mut self) -> RSVD_17_W { - RSVD_17_W { w: self } + #[must_use] + pub fn cr_spi_txu_clr(&mut self) -> CR_SPI_TXU_CLR_W<20> { + CR_SPI_TXU_CLR_W::new(self) } - #[doc = "Bit 16"] + #[doc = "Bit 21"] #[inline(always)] - pub fn cr_spi_end_clr(&mut self) -> CR_SPI_END_CLR_W { - CR_SPI_END_CLR_W { w: self } + #[must_use] + pub fn rsvd_21(&mut self) -> RSVD_21_W<21> { + RSVD_21_W::new(self) } - #[doc = "Bit 13"] + #[doc = "Bit 24"] #[inline(always)] - pub fn cr_spi_fer_mask(&mut self) -> CR_SPI_FER_MASK_W { - CR_SPI_FER_MASK_W { w: self } + #[must_use] + pub fn cr_spi_end_en(&mut self) -> CR_SPI_END_EN_W<24> { + CR_SPI_END_EN_W::new(self) } - #[doc = "Bit 12"] + #[doc = "Bit 25"] #[inline(always)] - pub fn cr_spi_txu_mask(&mut self) -> CR_SPI_TXU_MASK_W { - CR_SPI_TXU_MASK_W { w: self } + #[must_use] + pub fn cr_spi_txf_en(&mut self) -> CR_SPI_TXF_EN_W<25> { + CR_SPI_TXF_EN_W::new(self) } - #[doc = "Bit 11"] + #[doc = "Bit 26"] #[inline(always)] - pub fn cr_spi_sto_mask(&mut self) -> CR_SPI_STO_MASK_W { - CR_SPI_STO_MASK_W { w: self } + #[must_use] + pub fn cr_spi_rxf_en(&mut self) -> CR_SPI_RXF_EN_W<26> { + CR_SPI_RXF_EN_W::new(self) } - #[doc = "Bit 10"] + #[doc = "Bit 27"] #[inline(always)] - pub fn cr_spi_rxf_mask(&mut self) -> CR_SPI_RXF_MASK_W { - CR_SPI_RXF_MASK_W { w: self } + #[must_use] + pub fn cr_spi_sto_en(&mut self) -> CR_SPI_STO_EN_W<27> { + CR_SPI_STO_EN_W::new(self) } - #[doc = "Bit 9"] + #[doc = "Bit 28"] #[inline(always)] - pub fn cr_spi_txf_mask(&mut self) -> CR_SPI_TXF_MASK_W { - CR_SPI_TXF_MASK_W { w: self } + #[must_use] + pub fn cr_spi_txu_en(&mut self) -> CR_SPI_TXU_EN_W<28> { + CR_SPI_TXU_EN_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bit 29"] #[inline(always)] - pub fn cr_spi_end_mask(&mut self) -> CR_SPI_END_MASK_W { - CR_SPI_END_MASK_W { w: self } + #[must_use] + pub fn cr_spi_fer_en(&mut self) -> CR_SPI_FER_EN_W<29> { + CR_SPI_FER_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -995,11 +368,10 @@ impl crate::Readable for SPI_INT_STS_SPEC { #[doc = "`write(|w| ..)` method takes [spi_int_sts::W](W) writer structure"] impl crate::Writable for SPI_INT_STS_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets spi_int_sts to value 0x3f00_3f00"] impl crate::Resettable for SPI_INT_STS_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x3f00_3f00 - } + const RESET_VALUE: Self::Ux = 0x3f00_3f00; } diff --git a/src/spi/spi_prd_0.rs b/src/spi/spi_prd_0.rs index b4d4ad4..9297bf5 100644 --- a/src/spi/spi_prd_0.rs +++ b/src/spi/spi_prd_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,159 +28,81 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `cr_spi_prd_d_ph_1` reader - "] -pub struct CR_SPI_PRD_D_PH_1_R(crate::FieldReader); -impl CR_SPI_PRD_D_PH_1_R { - pub(crate) fn new(bits: u8) -> Self { - CR_SPI_PRD_D_PH_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_SPI_PRD_D_PH_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_spi_prd_d_ph_1` writer - "] -pub struct CR_SPI_PRD_D_PH_1_W<'a> { - w: &'a mut W, -} -impl<'a> CR_SPI_PRD_D_PH_1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 24)) | ((value as u32 & 0xff) << 24); - self.w - } -} -#[doc = "Field `cr_spi_prd_d_ph_0` reader - "] -pub struct CR_SPI_PRD_D_PH_0_R(crate::FieldReader); -impl CR_SPI_PRD_D_PH_0_R { - pub(crate) fn new(bits: u8) -> Self { - CR_SPI_PRD_D_PH_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_SPI_PRD_D_PH_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_spi_prd_d_ph_0` writer - "] -pub struct CR_SPI_PRD_D_PH_0_W<'a> { - w: &'a mut W, -} -impl<'a> CR_SPI_PRD_D_PH_0_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 16)) | ((value as u32 & 0xff) << 16); - self.w - } -} -#[doc = "Field `cr_spi_prd_p` reader - "] -pub struct CR_SPI_PRD_P_R(crate::FieldReader); -impl CR_SPI_PRD_P_R { - pub(crate) fn new(bits: u8) -> Self { - CR_SPI_PRD_P_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_SPI_PRD_P_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_spi_prd_p` writer - "] -pub struct CR_SPI_PRD_P_W<'a> { - w: &'a mut W, -} -impl<'a> CR_SPI_PRD_P_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8); - self.w - } -} #[doc = "Field `cr_spi_prd_s` reader - "] -pub struct CR_SPI_PRD_S_R(crate::FieldReader); -impl CR_SPI_PRD_S_R { - pub(crate) fn new(bits: u8) -> Self { - CR_SPI_PRD_S_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_SPI_PRD_S_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_SPI_PRD_S_R = crate::FieldReader; #[doc = "Field `cr_spi_prd_s` writer - "] -pub struct CR_SPI_PRD_S_W<'a> { - w: &'a mut W, -} -impl<'a> CR_SPI_PRD_S_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type CR_SPI_PRD_S_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SPI_PRD_0_SPEC, u8, u8, 8, O>; +#[doc = "Field `cr_spi_prd_p` reader - "] +pub type CR_SPI_PRD_P_R = crate::FieldReader; +#[doc = "Field `cr_spi_prd_p` writer - "] +pub type CR_SPI_PRD_P_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SPI_PRD_0_SPEC, u8, u8, 8, O>; +#[doc = "Field `cr_spi_prd_d_ph_0` reader - "] +pub type CR_SPI_PRD_D_PH_0_R = crate::FieldReader; +#[doc = "Field `cr_spi_prd_d_ph_0` writer - "] +pub type CR_SPI_PRD_D_PH_0_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SPI_PRD_0_SPEC, u8, u8, 8, O>; +#[doc = "Field `cr_spi_prd_d_ph_1` reader - "] +pub type CR_SPI_PRD_D_PH_1_R = crate::FieldReader; +#[doc = "Field `cr_spi_prd_d_ph_1` writer - "] +pub type CR_SPI_PRD_D_PH_1_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SPI_PRD_0_SPEC, u8, u8, 8, O>; +impl R { + #[doc = "Bits 0:7"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff); - self.w + pub fn cr_spi_prd_s(&self) -> CR_SPI_PRD_S_R { + CR_SPI_PRD_S_R::new((self.bits & 0xff) as u8) } -} -impl R { - #[doc = "Bits 24:31"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn cr_spi_prd_d_ph_1(&self) -> CR_SPI_PRD_D_PH_1_R { - CR_SPI_PRD_D_PH_1_R::new(((self.bits >> 24) & 0xff) as u8) + pub fn cr_spi_prd_p(&self) -> CR_SPI_PRD_P_R { + CR_SPI_PRD_P_R::new(((self.bits >> 8) & 0xff) as u8) } #[doc = "Bits 16:23"] #[inline(always)] pub fn cr_spi_prd_d_ph_0(&self) -> CR_SPI_PRD_D_PH_0_R { CR_SPI_PRD_D_PH_0_R::new(((self.bits >> 16) & 0xff) as u8) } - #[doc = "Bits 8:15"] - #[inline(always)] - pub fn cr_spi_prd_p(&self) -> CR_SPI_PRD_P_R { - CR_SPI_PRD_P_R::new(((self.bits >> 8) & 0xff) as u8) - } - #[doc = "Bits 0:7"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn cr_spi_prd_s(&self) -> CR_SPI_PRD_S_R { - CR_SPI_PRD_S_R::new((self.bits & 0xff) as u8) + pub fn cr_spi_prd_d_ph_1(&self) -> CR_SPI_PRD_D_PH_1_R { + CR_SPI_PRD_D_PH_1_R::new(((self.bits >> 24) & 0xff) as u8) } } impl W { - #[doc = "Bits 24:31"] + #[doc = "Bits 0:7"] #[inline(always)] - pub fn cr_spi_prd_d_ph_1(&mut self) -> CR_SPI_PRD_D_PH_1_W { - CR_SPI_PRD_D_PH_1_W { w: self } + #[must_use] + pub fn cr_spi_prd_s(&mut self) -> CR_SPI_PRD_S_W<0> { + CR_SPI_PRD_S_W::new(self) } - #[doc = "Bits 16:23"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn cr_spi_prd_d_ph_0(&mut self) -> CR_SPI_PRD_D_PH_0_W { - CR_SPI_PRD_D_PH_0_W { w: self } + #[must_use] + pub fn cr_spi_prd_p(&mut self) -> CR_SPI_PRD_P_W<8> { + CR_SPI_PRD_P_W::new(self) } - #[doc = "Bits 8:15"] + #[doc = "Bits 16:23"] #[inline(always)] - pub fn cr_spi_prd_p(&mut self) -> CR_SPI_PRD_P_W { - CR_SPI_PRD_P_W { w: self } + #[must_use] + pub fn cr_spi_prd_d_ph_0(&mut self) -> CR_SPI_PRD_D_PH_0_W<16> { + CR_SPI_PRD_D_PH_0_W::new(self) } - #[doc = "Bits 0:7"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn cr_spi_prd_s(&mut self) -> CR_SPI_PRD_S_W { - CR_SPI_PRD_S_W { w: self } + #[must_use] + pub fn cr_spi_prd_d_ph_1(&mut self) -> CR_SPI_PRD_D_PH_1_W<24> { + CR_SPI_PRD_D_PH_1_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -197,11 +120,10 @@ impl crate::Readable for SPI_PRD_0_SPEC { #[doc = "`write(|w| ..)` method takes [spi_prd_0::W](W) writer structure"] impl crate::Writable for SPI_PRD_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets spi_prd_0 to value 0x0f0f_0f0f"] impl crate::Resettable for SPI_PRD_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0f0f_0f0f - } + const RESET_VALUE: Self::Ux = 0x0f0f_0f0f; } diff --git a/src/spi/spi_prd_1.rs b/src/spi/spi_prd_1.rs index 8655010..fd4950a 100644 --- a/src/spi/spi_prd_1.rs +++ b/src/spi/spi_prd_1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,37 +28,17 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `cr_spi_prd_i` reader - "] -pub struct CR_SPI_PRD_I_R(crate::FieldReader); -impl CR_SPI_PRD_I_R { - pub(crate) fn new(bits: u8) -> Self { - CR_SPI_PRD_I_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_SPI_PRD_I_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_SPI_PRD_I_R = crate::FieldReader; #[doc = "Field `cr_spi_prd_i` writer - "] -pub struct CR_SPI_PRD_I_W<'a> { - w: &'a mut W, -} -impl<'a> CR_SPI_PRD_I_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff); - self.w - } -} +pub type CR_SPI_PRD_I_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SPI_PRD_1_SPEC, u8, u8, 8, O>; impl R { #[doc = "Bits 0:7"] #[inline(always)] @@ -68,10 +49,12 @@ impl R { impl W { #[doc = "Bits 0:7"] #[inline(always)] - pub fn cr_spi_prd_i(&mut self) -> CR_SPI_PRD_I_W { - CR_SPI_PRD_I_W { w: self } + #[must_use] + pub fn cr_spi_prd_i(&mut self) -> CR_SPI_PRD_I_W<0> { + CR_SPI_PRD_I_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SPI_PRD_1_SPEC { #[doc = "`write(|w| ..)` method takes [spi_prd_1::W](W) writer structure"] impl crate::Writable for SPI_PRD_1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets spi_prd_1 to value 0x0f"] impl crate::Resettable for SPI_PRD_1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0f - } + const RESET_VALUE: Self::Ux = 0x0f; } diff --git a/src/spi/spi_rxd_ignr.rs b/src/spi/spi_rxd_ignr.rs index 999c585..7173f53 100644 --- a/src/spi/spi_rxd_ignr.rs +++ b/src/spi/spi_rxd_ignr.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,87 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `cr_spi_rxd_ignr_s` reader - "] -pub struct CR_SPI_RXD_IGNR_S_R(crate::FieldReader); -impl CR_SPI_RXD_IGNR_S_R { - pub(crate) fn new(bits: u8) -> Self { - CR_SPI_RXD_IGNR_S_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_SPI_RXD_IGNR_S_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_spi_rxd_ignr_s` writer - "] -pub struct CR_SPI_RXD_IGNR_S_W<'a> { - w: &'a mut W, -} -impl<'a> CR_SPI_RXD_IGNR_S_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 16)) | ((value as u32 & 0x1f) << 16); - self.w - } -} #[doc = "Field `cr_spi_rxd_ignr_p` reader - "] -pub struct CR_SPI_RXD_IGNR_P_R(crate::FieldReader); -impl CR_SPI_RXD_IGNR_P_R { - pub(crate) fn new(bits: u8) -> Self { - CR_SPI_RXD_IGNR_P_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_SPI_RXD_IGNR_P_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_SPI_RXD_IGNR_P_R = crate::FieldReader; #[doc = "Field `cr_spi_rxd_ignr_p` writer - "] -pub struct CR_SPI_RXD_IGNR_P_W<'a> { - w: &'a mut W, -} -impl<'a> CR_SPI_RXD_IGNR_P_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type CR_SPI_RXD_IGNR_P_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SPI_RXD_IGNR_SPEC, u8, u8, 5, O>; +#[doc = "Field `cr_spi_rxd_ignr_s` reader - "] +pub type CR_SPI_RXD_IGNR_S_R = crate::FieldReader; +#[doc = "Field `cr_spi_rxd_ignr_s` writer - "] +pub type CR_SPI_RXD_IGNR_S_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SPI_RXD_IGNR_SPEC, u8, u8, 5, O>; +impl R { + #[doc = "Bits 0:4"] #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x1f) | (value as u32 & 0x1f); - self.w + pub fn cr_spi_rxd_ignr_p(&self) -> CR_SPI_RXD_IGNR_P_R { + CR_SPI_RXD_IGNR_P_R::new((self.bits & 0x1f) as u8) } -} -impl R { #[doc = "Bits 16:20"] #[inline(always)] pub fn cr_spi_rxd_ignr_s(&self) -> CR_SPI_RXD_IGNR_S_R { CR_SPI_RXD_IGNR_S_R::new(((self.bits >> 16) & 0x1f) as u8) } - #[doc = "Bits 0:4"] - #[inline(always)] - pub fn cr_spi_rxd_ignr_p(&self) -> CR_SPI_RXD_IGNR_P_R { - CR_SPI_RXD_IGNR_P_R::new((self.bits & 0x1f) as u8) - } } impl W { - #[doc = "Bits 16:20"] + #[doc = "Bits 0:4"] #[inline(always)] - pub fn cr_spi_rxd_ignr_s(&mut self) -> CR_SPI_RXD_IGNR_S_W { - CR_SPI_RXD_IGNR_S_W { w: self } + #[must_use] + pub fn cr_spi_rxd_ignr_p(&mut self) -> CR_SPI_RXD_IGNR_P_W<0> { + CR_SPI_RXD_IGNR_P_W::new(self) } - #[doc = "Bits 0:4"] + #[doc = "Bits 16:20"] #[inline(always)] - pub fn cr_spi_rxd_ignr_p(&mut self) -> CR_SPI_RXD_IGNR_P_W { - CR_SPI_RXD_IGNR_P_W { w: self } + #[must_use] + pub fn cr_spi_rxd_ignr_s(&mut self) -> CR_SPI_RXD_IGNR_S_W<16> { + CR_SPI_RXD_IGNR_S_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -125,11 +88,10 @@ impl crate::Readable for SPI_RXD_IGNR_SPEC { #[doc = "`write(|w| ..)` method takes [spi_rxd_ignr::W](W) writer structure"] impl crate::Writable for SPI_RXD_IGNR_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets spi_rxd_ignr to value 0"] impl crate::Resettable for SPI_RXD_IGNR_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/spi/spi_sto_value.rs b/src/spi/spi_sto_value.rs index 524b6a7..e4c4174 100644 --- a/src/spi/spi_sto_value.rs +++ b/src/spi/spi_sto_value.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,37 +28,17 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `cr_spi_sto_value` reader - "] -pub struct CR_SPI_STO_VALUE_R(crate::FieldReader); -impl CR_SPI_STO_VALUE_R { - pub(crate) fn new(bits: u16) -> Self { - CR_SPI_STO_VALUE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_SPI_STO_VALUE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_SPI_STO_VALUE_R = crate::FieldReader; #[doc = "Field `cr_spi_sto_value` writer - "] -pub struct CR_SPI_STO_VALUE_W<'a> { - w: &'a mut W, -} -impl<'a> CR_SPI_STO_VALUE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0x0fff) | (value as u32 & 0x0fff); - self.w - } -} +pub type CR_SPI_STO_VALUE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, SPI_STO_VALUE_SPEC, u16, u16, 12, O>; impl R { #[doc = "Bits 0:11"] #[inline(always)] @@ -68,10 +49,12 @@ impl R { impl W { #[doc = "Bits 0:11"] #[inline(always)] - pub fn cr_spi_sto_value(&mut self) -> CR_SPI_STO_VALUE_W { - CR_SPI_STO_VALUE_W { w: self } + #[must_use] + pub fn cr_spi_sto_value(&mut self) -> CR_SPI_STO_VALUE_W<0> { + CR_SPI_STO_VALUE_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for SPI_STO_VALUE_SPEC { #[doc = "`write(|w| ..)` method takes [spi_sto_value::W](W) writer structure"] impl crate::Writable for SPI_STO_VALUE_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets spi_sto_value to value 0x0fff"] impl crate::Resettable for SPI_STO_VALUE_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0fff - } + const RESET_VALUE: Self::Ux = 0x0fff; } diff --git a/src/timer.rs b/src/timer.rs index e09141d..226f9aa 100644 --- a/src/timer.rs +++ b/src/timer.rs @@ -2,229 +2,229 @@ #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - TCCR."] - pub tccr: crate::Reg, - _reserved1: [u8; 12usize], + pub tccr: TCCR, + _reserved1: [u8; 0x0c], #[doc = "0x10 - TMR2_0."] - pub tmr2_0: crate::Reg, + pub tmr2_0: TMR2_0, #[doc = "0x14 - TMR2_1."] - pub tmr2_1: crate::Reg, + pub tmr2_1: TMR2_1, #[doc = "0x18 - TMR2_2."] - pub tmr2_2: crate::Reg, + pub tmr2_2: TMR2_2, #[doc = "0x1c - TMR3_0."] - pub tmr3_0: crate::Reg, + pub tmr3_0: TMR3_0, #[doc = "0x20 - TMR3_1."] - pub tmr3_1: crate::Reg, + pub tmr3_1: TMR3_1, #[doc = "0x24 - TMR3_2."] - pub tmr3_2: crate::Reg, - _reserved7: [u8; 4usize], + pub tmr3_2: TMR3_2, + _reserved7: [u8; 0x04], #[doc = "0x2c - TCR2."] - pub tcr2: crate::Reg, + pub tcr2: TCR2, #[doc = "0x30 - TCR3."] - pub tcr3: crate::Reg, - _reserved9: [u8; 4usize], + pub tcr3: TCR3, + _reserved9: [u8; 0x04], #[doc = "0x38 - TMSR2."] - pub tmsr2: crate::Reg, + pub tmsr2: TMSR2, #[doc = "0x3c - TMSR3."] - pub tmsr3: crate::Reg, - _reserved11: [u8; 4usize], + pub tmsr3: TMSR3, + _reserved11: [u8; 0x04], #[doc = "0x44 - TIER2."] - pub tier2: crate::Reg, + pub tier2: TIER2, #[doc = "0x48 - TIER3."] - pub tier3: crate::Reg, - _reserved13: [u8; 4usize], + pub tier3: TIER3, + _reserved13: [u8; 0x04], #[doc = "0x50 - TPLVR2."] - pub tplvr2: crate::Reg, + pub tplvr2: TPLVR2, #[doc = "0x54 - TPLVR3."] - pub tplvr3: crate::Reg, - _reserved15: [u8; 4usize], + pub tplvr3: TPLVR3, + _reserved15: [u8; 0x04], #[doc = "0x5c - TPLCR2."] - pub tplcr2: crate::Reg, + pub tplcr2: TPLCR2, #[doc = "0x60 - TPLCR3."] - pub tplcr3: crate::Reg, + pub tplcr3: TPLCR3, #[doc = "0x64 - WMER."] - pub wmer: crate::Reg, + pub wmer: WMER, #[doc = "0x68 - WMR."] - pub wmr: crate::Reg, + pub wmr: WMR, #[doc = "0x6c - WVR."] - pub wvr: crate::Reg, + pub wvr: WVR, #[doc = "0x70 - WSR."] - pub wsr: crate::Reg, - _reserved21: [u8; 4usize], + pub wsr: WSR, + _reserved21: [u8; 0x04], #[doc = "0x78 - TICR2."] - pub ticr2: crate::Reg, + pub ticr2: TICR2, #[doc = "0x7c - TICR3."] - pub ticr3: crate::Reg, + pub ticr3: TICR3, #[doc = "0x80 - WICR."] - pub wicr: crate::Reg, + pub wicr: WICR, #[doc = "0x84 - TCER."] - pub tcer: crate::Reg, + pub tcer: TCER, #[doc = "0x88 - TCMR."] - pub tcmr: crate::Reg, - _reserved26: [u8; 4usize], + pub tcmr: TCMR, + _reserved26: [u8; 0x04], #[doc = "0x90 - TILR2."] - pub tilr2: crate::Reg, + pub tilr2: TILR2, #[doc = "0x94 - TILR3."] - pub tilr3: crate::Reg, + pub tilr3: TILR3, #[doc = "0x98 - WCR."] - pub wcr: crate::Reg, + pub wcr: WCR, #[doc = "0x9c - WFAR."] - pub wfar: crate::Reg, + pub wfar: WFAR, #[doc = "0xa0 - WSAR."] - pub wsar: crate::Reg, - _reserved31: [u8; 4usize], + pub wsar: WSAR, + _reserved31: [u8; 0x04], #[doc = "0xa8 - TCVWR2."] - pub tcvwr2: crate::Reg, + pub tcvwr2: TCVWR2, #[doc = "0xac - TCVWR3."] - pub tcvwr3: crate::Reg, - _reserved33: [u8; 4usize], + pub tcvwr3: TCVWR3, + _reserved33: [u8; 0x04], #[doc = "0xb4 - TCVSYN2."] - pub tcvsyn2: crate::Reg, + pub tcvsyn2: TCVSYN2, #[doc = "0xb8 - TCVSYN3."] - pub tcvsyn3: crate::Reg, + pub tcvsyn3: TCVSYN3, #[doc = "0xbc - TCDR."] - pub tcdr: crate::Reg, + pub tcdr: TCDR, } -#[doc = "TCCR register accessor: an alias for `Reg`"] +#[doc = "TCCR (rw) register accessor: an alias for `Reg`"] pub type TCCR = crate::Reg; #[doc = "TCCR."] pub mod tccr; -#[doc = "TMR2_0 register accessor: an alias for `Reg`"] +#[doc = "TMR2_0 (rw) register accessor: an alias for `Reg`"] pub type TMR2_0 = crate::Reg; #[doc = "TMR2_0."] pub mod tmr2_0; -#[doc = "TMR2_1 register accessor: an alias for `Reg`"] +#[doc = "TMR2_1 (rw) register accessor: an alias for `Reg`"] pub type TMR2_1 = crate::Reg; #[doc = "TMR2_1."] pub mod tmr2_1; -#[doc = "TMR2_2 register accessor: an alias for `Reg`"] +#[doc = "TMR2_2 (rw) register accessor: an alias for `Reg`"] pub type TMR2_2 = crate::Reg; #[doc = "TMR2_2."] pub mod tmr2_2; -#[doc = "TMR3_0 register accessor: an alias for `Reg`"] +#[doc = "TMR3_0 (rw) register accessor: an alias for `Reg`"] pub type TMR3_0 = crate::Reg; #[doc = "TMR3_0."] pub mod tmr3_0; -#[doc = "TMR3_1 register accessor: an alias for `Reg`"] +#[doc = "TMR3_1 (rw) register accessor: an alias for `Reg`"] pub type TMR3_1 = crate::Reg; #[doc = "TMR3_1."] pub mod tmr3_1; -#[doc = "TMR3_2 register accessor: an alias for `Reg`"] +#[doc = "TMR3_2 (rw) register accessor: an alias for `Reg`"] pub type TMR3_2 = crate::Reg; #[doc = "TMR3_2."] pub mod tmr3_2; -#[doc = "TCR2 register accessor: an alias for `Reg`"] +#[doc = "TCR2 (r) register accessor: an alias for `Reg`"] pub type TCR2 = crate::Reg; #[doc = "TCR2."] pub mod tcr2; -#[doc = "TCR3 register accessor: an alias for `Reg`"] +#[doc = "TCR3 (r) register accessor: an alias for `Reg`"] pub type TCR3 = crate::Reg; #[doc = "TCR3."] pub mod tcr3; -#[doc = "TMSR2 register accessor: an alias for `Reg`"] +#[doc = "TMSR2 (r) register accessor: an alias for `Reg`"] pub type TMSR2 = crate::Reg; #[doc = "TMSR2."] pub mod tmsr2; -#[doc = "TMSR3 register accessor: an alias for `Reg`"] +#[doc = "TMSR3 (r) register accessor: an alias for `Reg`"] pub type TMSR3 = crate::Reg; #[doc = "TMSR3."] pub mod tmsr3; -#[doc = "TIER2 register accessor: an alias for `Reg`"] +#[doc = "TIER2 (rw) register accessor: an alias for `Reg`"] pub type TIER2 = crate::Reg; #[doc = "TIER2."] pub mod tier2; -#[doc = "TIER3 register accessor: an alias for `Reg`"] +#[doc = "TIER3 (rw) register accessor: an alias for `Reg`"] pub type TIER3 = crate::Reg; #[doc = "TIER3."] pub mod tier3; -#[doc = "TPLVR2 register accessor: an alias for `Reg`"] +#[doc = "TPLVR2 (rw) register accessor: an alias for `Reg`"] pub type TPLVR2 = crate::Reg; #[doc = "TPLVR2."] pub mod tplvr2; -#[doc = "TPLVR3 register accessor: an alias for `Reg`"] +#[doc = "TPLVR3 (rw) register accessor: an alias for `Reg`"] pub type TPLVR3 = crate::Reg; #[doc = "TPLVR3."] pub mod tplvr3; -#[doc = "TPLCR2 register accessor: an alias for `Reg`"] +#[doc = "TPLCR2 (rw) register accessor: an alias for `Reg`"] pub type TPLCR2 = crate::Reg; #[doc = "TPLCR2."] pub mod tplcr2; -#[doc = "TPLCR3 register accessor: an alias for `Reg`"] +#[doc = "TPLCR3 (rw) register accessor: an alias for `Reg`"] pub type TPLCR3 = crate::Reg; #[doc = "TPLCR3."] pub mod tplcr3; -#[doc = "WMER register accessor: an alias for `Reg`"] +#[doc = "WMER (rw) register accessor: an alias for `Reg`"] pub type WMER = crate::Reg; #[doc = "WMER."] pub mod wmer; -#[doc = "WMR register accessor: an alias for `Reg`"] +#[doc = "WMR (rw) register accessor: an alias for `Reg`"] pub type WMR = crate::Reg; #[doc = "WMR."] pub mod wmr; -#[doc = "WVR register accessor: an alias for `Reg`"] +#[doc = "WVR (r) register accessor: an alias for `Reg`"] pub type WVR = crate::Reg; #[doc = "WVR."] pub mod wvr; -#[doc = "WSR register accessor: an alias for `Reg`"] +#[doc = "WSR (rw) register accessor: an alias for `Reg`"] pub type WSR = crate::Reg; #[doc = "WSR."] pub mod wsr; -#[doc = "TICR2 register accessor: an alias for `Reg`"] +#[doc = "TICR2 (w) register accessor: an alias for `Reg`"] pub type TICR2 = crate::Reg; #[doc = "TICR2."] pub mod ticr2; -#[doc = "TICR3 register accessor: an alias for `Reg`"] +#[doc = "TICR3 (w) register accessor: an alias for `Reg`"] pub type TICR3 = crate::Reg; #[doc = "TICR3."] pub mod ticr3; -#[doc = "WICR register accessor: an alias for `Reg`"] +#[doc = "WICR (w) register accessor: an alias for `Reg`"] pub type WICR = crate::Reg; #[doc = "WICR."] pub mod wicr; -#[doc = "TCER register accessor: an alias for `Reg`"] +#[doc = "TCER (rw) register accessor: an alias for `Reg`"] pub type TCER = crate::Reg; #[doc = "TCER."] pub mod tcer; -#[doc = "TCMR register accessor: an alias for `Reg`"] +#[doc = "TCMR (rw) register accessor: an alias for `Reg`"] pub type TCMR = crate::Reg; #[doc = "TCMR."] pub mod tcmr; -#[doc = "TILR2 register accessor: an alias for `Reg`"] +#[doc = "TILR2 (rw) register accessor: an alias for `Reg`"] pub type TILR2 = crate::Reg; #[doc = "TILR2."] pub mod tilr2; -#[doc = "TILR3 register accessor: an alias for `Reg`"] +#[doc = "TILR3 (rw) register accessor: an alias for `Reg`"] pub type TILR3 = crate::Reg; #[doc = "TILR3."] pub mod tilr3; -#[doc = "WCR register accessor: an alias for `Reg`"] +#[doc = "WCR (w) register accessor: an alias for `Reg`"] pub type WCR = crate::Reg; #[doc = "WCR."] pub mod wcr; -#[doc = "WFAR register accessor: an alias for `Reg`"] +#[doc = "WFAR (w) register accessor: an alias for `Reg`"] pub type WFAR = crate::Reg; #[doc = "WFAR."] pub mod wfar; -#[doc = "WSAR register accessor: an alias for `Reg`"] +#[doc = "WSAR (w) register accessor: an alias for `Reg`"] pub type WSAR = crate::Reg; #[doc = "WSAR."] pub mod wsar; -#[doc = "TCVWR2 register accessor: an alias for `Reg`"] +#[doc = "TCVWR2 (r) register accessor: an alias for `Reg`"] pub type TCVWR2 = crate::Reg; #[doc = "TCVWR2."] pub mod tcvwr2; -#[doc = "TCVWR3 register accessor: an alias for `Reg`"] +#[doc = "TCVWR3 (r) register accessor: an alias for `Reg`"] pub type TCVWR3 = crate::Reg; #[doc = "TCVWR3."] pub mod tcvwr3; -#[doc = "TCVSYN2 register accessor: an alias for `Reg`"] +#[doc = "TCVSYN2 (r) register accessor: an alias for `Reg`"] pub type TCVSYN2 = crate::Reg; #[doc = "TCVSYN2."] pub mod tcvsyn2; -#[doc = "TCVSYN3 register accessor: an alias for `Reg`"] +#[doc = "TCVSYN3 (r) register accessor: an alias for `Reg`"] pub type TCVSYN3 = crate::Reg; #[doc = "TCVSYN3."] pub mod tcvsyn3; -#[doc = "TCDR register accessor: an alias for `Reg`"] +#[doc = "TCDR (rw) register accessor: an alias for `Reg`"] pub type TCDR = crate::Reg; #[doc = "TCDR."] pub mod tcdr; diff --git a/src/timer/tccr.rs b/src/timer/tccr.rs index 2d09f1b..e8eafb7 100644 --- a/src/timer/tccr.rs +++ b/src/timer/tccr.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,215 +28,92 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `cs_wdt` reader - "] -pub struct CS_WDT_R(crate::FieldReader); -impl CS_WDT_R { - pub(crate) fn new(bits: u8) -> Self { - CS_WDT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CS_WDT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cs_wdt` writer - "] -pub struct CS_WDT_W<'a> { - w: &'a mut W, -} -impl<'a> CS_WDT_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 8)) | ((value as u32 & 0x03) << 8); - self.w - } -} -#[doc = "Field `RESERVED_7` reader - "] -pub struct RESERVED_7_R(crate::FieldReader); -impl RESERVED_7_R { - pub(crate) fn new(bits: bool) -> Self { - RESERVED_7_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RESERVED_7_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `RESERVED_7` writer - "] -pub struct RESERVED_7_W<'a> { - w: &'a mut W, -} -impl<'a> RESERVED_7_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7); - self.w - } -} -#[doc = "Field `cs_2` reader - "] -pub struct CS_2_R(crate::FieldReader); -impl CS_2_R { - pub(crate) fn new(bits: u8) -> Self { - CS_2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CS_2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cs_2` writer - "] -pub struct CS_2_W<'a> { - w: &'a mut W, -} -impl<'a> CS_2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 5)) | ((value as u32 & 0x03) << 5); - self.w - } -} -#[doc = "Field `RESERVED_4` reader - "] -pub struct RESERVED_4_R(crate::FieldReader); -impl RESERVED_4_R { - pub(crate) fn new(bits: bool) -> Self { - RESERVED_4_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RESERVED_4_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `RESERVED_4` writer - "] -pub struct RESERVED_4_W<'a> { - w: &'a mut W, -} -impl<'a> RESERVED_4_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} #[doc = "Field `cs_1` reader - "] -pub struct CS_1_R(crate::FieldReader); -impl CS_1_R { - pub(crate) fn new(bits: u8) -> Self { - CS_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CS_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CS_1_R = crate::FieldReader; #[doc = "Field `cs_1` writer - "] -pub struct CS_1_W<'a> { - w: &'a mut W, -} -impl<'a> CS_1_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 2)) | ((value as u32 & 0x03) << 2); - self.w - } -} +pub type CS_1_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TCCR_SPEC, u8, u8, 2, O>; +#[doc = "Field `RESERVED_4` reader - "] +pub type RESERVED_4_R = crate::BitReader; +#[doc = "Field `RESERVED_4` writer - "] +pub type RESERVED_4_W<'a, const O: u8> = crate::BitWriter<'a, u32, TCCR_SPEC, bool, O>; +#[doc = "Field `cs_2` reader - "] +pub type CS_2_R = crate::FieldReader; +#[doc = "Field `cs_2` writer - "] +pub type CS_2_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TCCR_SPEC, u8, u8, 2, O>; +#[doc = "Field `RESERVED_7` reader - "] +pub type RESERVED_7_R = crate::BitReader; +#[doc = "Field `RESERVED_7` writer - "] +pub type RESERVED_7_W<'a, const O: u8> = crate::BitWriter<'a, u32, TCCR_SPEC, bool, O>; +#[doc = "Field `cs_wdt` reader - "] +pub type CS_WDT_R = crate::FieldReader; +#[doc = "Field `cs_wdt` writer - "] +pub type CS_WDT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TCCR_SPEC, u8, u8, 2, O>; impl R { - #[doc = "Bits 8:9"] + #[doc = "Bits 2:3"] #[inline(always)] - pub fn cs_wdt(&self) -> CS_WDT_R { - CS_WDT_R::new(((self.bits >> 8) & 0x03) as u8) + pub fn cs_1(&self) -> CS_1_R { + CS_1_R::new(((self.bits >> 2) & 3) as u8) } - #[doc = "Bit 7"] + #[doc = "Bit 4"] #[inline(always)] - pub fn reserved_7(&self) -> RESERVED_7_R { - RESERVED_7_R::new(((self.bits >> 7) & 0x01) != 0) + pub fn reserved_4(&self) -> RESERVED_4_R { + RESERVED_4_R::new(((self.bits >> 4) & 1) != 0) } #[doc = "Bits 5:6"] #[inline(always)] pub fn cs_2(&self) -> CS_2_R { - CS_2_R::new(((self.bits >> 5) & 0x03) as u8) + CS_2_R::new(((self.bits >> 5) & 3) as u8) } - #[doc = "Bit 4"] + #[doc = "Bit 7"] #[inline(always)] - pub fn reserved_4(&self) -> RESERVED_4_R { - RESERVED_4_R::new(((self.bits >> 4) & 0x01) != 0) + pub fn reserved_7(&self) -> RESERVED_7_R { + RESERVED_7_R::new(((self.bits >> 7) & 1) != 0) } - #[doc = "Bits 2:3"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn cs_1(&self) -> CS_1_R { - CS_1_R::new(((self.bits >> 2) & 0x03) as u8) + pub fn cs_wdt(&self) -> CS_WDT_R { + CS_WDT_R::new(((self.bits >> 8) & 3) as u8) } } impl W { - #[doc = "Bits 8:9"] + #[doc = "Bits 2:3"] #[inline(always)] - pub fn cs_wdt(&mut self) -> CS_WDT_W { - CS_WDT_W { w: self } + #[must_use] + pub fn cs_1(&mut self) -> CS_1_W<2> { + CS_1_W::new(self) } - #[doc = "Bit 7"] + #[doc = "Bit 4"] #[inline(always)] - pub fn reserved_7(&mut self) -> RESERVED_7_W { - RESERVED_7_W { w: self } + #[must_use] + pub fn reserved_4(&mut self) -> RESERVED_4_W<4> { + RESERVED_4_W::new(self) } #[doc = "Bits 5:6"] #[inline(always)] - pub fn cs_2(&mut self) -> CS_2_W { - CS_2_W { w: self } + #[must_use] + pub fn cs_2(&mut self) -> CS_2_W<5> { + CS_2_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 7"] #[inline(always)] - pub fn reserved_4(&mut self) -> RESERVED_4_W { - RESERVED_4_W { w: self } + #[must_use] + pub fn reserved_7(&mut self) -> RESERVED_7_W<7> { + RESERVED_7_W::new(self) } - #[doc = "Bits 2:3"] + #[doc = "Bits 8:9"] #[inline(always)] - pub fn cs_1(&mut self) -> CS_1_W { - CS_1_W { w: self } + #[must_use] + pub fn cs_wdt(&mut self) -> CS_WDT_W<8> { + CS_WDT_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -253,11 +131,10 @@ impl crate::Readable for TCCR_SPEC { #[doc = "`write(|w| ..)` method takes [tccr::W](W) writer structure"] impl crate::Writable for TCCR_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets TCCR to value 0"] impl crate::Resettable for TCCR_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/timer/tcdr.rs b/src/timer/tcdr.rs index eda42c5..6abd4f2 100644 --- a/src/timer/tcdr.rs +++ b/src/timer/tcdr.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,123 +28,62 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `wcdr` reader - "] -pub struct WCDR_R(crate::FieldReader); -impl WCDR_R { - pub(crate) fn new(bits: u8) -> Self { - WCDR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for WCDR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `wcdr` writer - "] -pub struct WCDR_W<'a> { - w: &'a mut W, -} -impl<'a> WCDR_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 24)) | ((value as u32 & 0xff) << 24); - self.w - } -} -#[doc = "Field `tcdr3` reader - "] -pub struct TCDR3_R(crate::FieldReader); -impl TCDR3_R { - pub(crate) fn new(bits: u8) -> Self { - TCDR3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TCDR3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tcdr3` writer - "] -pub struct TCDR3_W<'a> { - w: &'a mut W, -} -impl<'a> TCDR3_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 16)) | ((value as u32 & 0xff) << 16); - self.w - } -} #[doc = "Field `tcdr2` reader - "] -pub struct TCDR2_R(crate::FieldReader); -impl TCDR2_R { - pub(crate) fn new(bits: u8) -> Self { - TCDR2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TCDR2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TCDR2_R = crate::FieldReader; #[doc = "Field `tcdr2` writer - "] -pub struct TCDR2_W<'a> { - w: &'a mut W, -} -impl<'a> TCDR2_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xff << 8)) | ((value as u32 & 0xff) << 8); - self.w - } -} +pub type TCDR2_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TCDR_SPEC, u8, u8, 8, O>; +#[doc = "Field `tcdr3` reader - "] +pub type TCDR3_R = crate::FieldReader; +#[doc = "Field `tcdr3` writer - "] +pub type TCDR3_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TCDR_SPEC, u8, u8, 8, O>; +#[doc = "Field `wcdr` reader - "] +pub type WCDR_R = crate::FieldReader; +#[doc = "Field `wcdr` writer - "] +pub type WCDR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TCDR_SPEC, u8, u8, 8, O>; impl R { - #[doc = "Bits 24:31"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn wcdr(&self) -> WCDR_R { - WCDR_R::new(((self.bits >> 24) & 0xff) as u8) + pub fn tcdr2(&self) -> TCDR2_R { + TCDR2_R::new(((self.bits >> 8) & 0xff) as u8) } #[doc = "Bits 16:23"] #[inline(always)] pub fn tcdr3(&self) -> TCDR3_R { TCDR3_R::new(((self.bits >> 16) & 0xff) as u8) } - #[doc = "Bits 8:15"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn tcdr2(&self) -> TCDR2_R { - TCDR2_R::new(((self.bits >> 8) & 0xff) as u8) + pub fn wcdr(&self) -> WCDR_R { + WCDR_R::new(((self.bits >> 24) & 0xff) as u8) } } impl W { - #[doc = "Bits 24:31"] + #[doc = "Bits 8:15"] #[inline(always)] - pub fn wcdr(&mut self) -> WCDR_W { - WCDR_W { w: self } + #[must_use] + pub fn tcdr2(&mut self) -> TCDR2_W<8> { + TCDR2_W::new(self) } #[doc = "Bits 16:23"] #[inline(always)] - pub fn tcdr3(&mut self) -> TCDR3_W { - TCDR3_W { w: self } + #[must_use] + pub fn tcdr3(&mut self) -> TCDR3_W<16> { + TCDR3_W::new(self) } - #[doc = "Bits 8:15"] + #[doc = "Bits 24:31"] #[inline(always)] - pub fn tcdr2(&mut self) -> TCDR2_W { - TCDR2_W { w: self } + #[must_use] + pub fn wcdr(&mut self) -> WCDR_W<24> { + WCDR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -161,11 +101,10 @@ impl crate::Readable for TCDR_SPEC { #[doc = "`write(|w| ..)` method takes [tcdr::W](W) writer structure"] impl crate::Writable for TCDR_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets TCDR to value 0"] impl crate::Resettable for TCDR_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/timer/tcer.rs b/src/timer/tcer.rs index 6e06ffc..a087367 100644 --- a/src/timer/tcer.rs +++ b/src/timer/tcer.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,107 +28,47 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `timer3_en` reader - "] -pub struct TIMER3_EN_R(crate::FieldReader); -impl TIMER3_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TIMER3_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TIMER3_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `timer3_en` writer - "] -pub struct TIMER3_EN_W<'a> { - w: &'a mut W, -} -impl<'a> TIMER3_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} #[doc = "Field `timer2_en` reader - "] -pub struct TIMER2_EN_R(crate::FieldReader); -impl TIMER2_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TIMER2_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TIMER2_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TIMER2_EN_R = crate::BitReader; #[doc = "Field `timer2_en` writer - "] -pub struct TIMER2_EN_W<'a> { - w: &'a mut W, -} -impl<'a> TIMER2_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type TIMER2_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, TCER_SPEC, bool, O>; +#[doc = "Field `timer3_en` reader - "] +pub type TIMER3_EN_R = crate::BitReader; +#[doc = "Field `timer3_en` writer - "] +pub type TIMER3_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, TCER_SPEC, bool, O>; +impl R { + #[doc = "Bit 1"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w + pub fn timer2_en(&self) -> TIMER2_EN_R { + TIMER2_EN_R::new(((self.bits >> 1) & 1) != 0) } -} -impl R { #[doc = "Bit 2"] #[inline(always)] pub fn timer3_en(&self) -> TIMER3_EN_R { - TIMER3_EN_R::new(((self.bits >> 2) & 0x01) != 0) - } - #[doc = "Bit 1"] - #[inline(always)] - pub fn timer2_en(&self) -> TIMER2_EN_R { - TIMER2_EN_R::new(((self.bits >> 1) & 0x01) != 0) + TIMER3_EN_R::new(((self.bits >> 2) & 1) != 0) } } impl W { - #[doc = "Bit 2"] + #[doc = "Bit 1"] #[inline(always)] - pub fn timer3_en(&mut self) -> TIMER3_EN_W { - TIMER3_EN_W { w: self } + #[must_use] + pub fn timer2_en(&mut self) -> TIMER2_EN_W<1> { + TIMER2_EN_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 2"] #[inline(always)] - pub fn timer2_en(&mut self) -> TIMER2_EN_W { - TIMER2_EN_W { w: self } + #[must_use] + pub fn timer3_en(&mut self) -> TIMER3_EN_W<2> { + TIMER3_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -145,11 +86,10 @@ impl crate::Readable for TCER_SPEC { #[doc = "`write(|w| ..)` method takes [tcer::W](W) writer structure"] impl crate::Writable for TCER_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets TCER to value 0"] impl crate::Resettable for TCER_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/timer/tcmr.rs b/src/timer/tcmr.rs index 80e0776..65e7057 100644 --- a/src/timer/tcmr.rs +++ b/src/timer/tcmr.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,107 +28,47 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `timer3_mode` reader - "] -pub struct TIMER3_MODE_R(crate::FieldReader); -impl TIMER3_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - TIMER3_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TIMER3_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `timer3_mode` writer - "] -pub struct TIMER3_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> TIMER3_MODE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} #[doc = "Field `timer2_mode` reader - "] -pub struct TIMER2_MODE_R(crate::FieldReader); -impl TIMER2_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - TIMER2_MODE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TIMER2_MODE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TIMER2_MODE_R = crate::BitReader; #[doc = "Field `timer2_mode` writer - "] -pub struct TIMER2_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> TIMER2_MODE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type TIMER2_MODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, TCMR_SPEC, bool, O>; +#[doc = "Field `timer3_mode` reader - "] +pub type TIMER3_MODE_R = crate::BitReader; +#[doc = "Field `timer3_mode` writer - "] +pub type TIMER3_MODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, TCMR_SPEC, bool, O>; +impl R { + #[doc = "Bit 1"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w + pub fn timer2_mode(&self) -> TIMER2_MODE_R { + TIMER2_MODE_R::new(((self.bits >> 1) & 1) != 0) } -} -impl R { #[doc = "Bit 2"] #[inline(always)] pub fn timer3_mode(&self) -> TIMER3_MODE_R { - TIMER3_MODE_R::new(((self.bits >> 2) & 0x01) != 0) - } - #[doc = "Bit 1"] - #[inline(always)] - pub fn timer2_mode(&self) -> TIMER2_MODE_R { - TIMER2_MODE_R::new(((self.bits >> 1) & 0x01) != 0) + TIMER3_MODE_R::new(((self.bits >> 2) & 1) != 0) } } impl W { - #[doc = "Bit 2"] + #[doc = "Bit 1"] #[inline(always)] - pub fn timer3_mode(&mut self) -> TIMER3_MODE_W { - TIMER3_MODE_W { w: self } + #[must_use] + pub fn timer2_mode(&mut self) -> TIMER2_MODE_W<1> { + TIMER2_MODE_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 2"] #[inline(always)] - pub fn timer2_mode(&mut self) -> TIMER2_MODE_W { - TIMER2_MODE_W { w: self } + #[must_use] + pub fn timer3_mode(&mut self) -> TIMER3_MODE_W<2> { + TIMER3_MODE_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -145,11 +86,10 @@ impl crate::Readable for TCMR_SPEC { #[doc = "`write(|w| ..)` method takes [tcmr::W](W) writer structure"] impl crate::Writable for TCMR_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets TCMR to value 0"] impl crate::Resettable for TCMR_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/timer/tcr2.rs b/src/timer/tcr2.rs index fce0c86..78637e5 100644 --- a/src/timer/tcr2.rs +++ b/src/timer/tcr2.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `tcr` reader - "] -pub struct TCR_R(crate::FieldReader); -impl TCR_R { - pub(crate) fn new(bits: u32) -> Self { - TCR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TCR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TCR_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn tcr(&self) -> TCR_R { - TCR_R::new((self.bits & 0xffff_ffff) as u32) + TCR_R::new(self.bits) } } #[doc = "TCR2.\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 [tcr2](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for TCR2_SPEC { } #[doc = "`reset()` method sets TCR2 to value 0"] impl crate::Resettable for TCR2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/timer/tcr3.rs b/src/timer/tcr3.rs index fe30c4a..fda5ea1 100644 --- a/src/timer/tcr3.rs +++ b/src/timer/tcr3.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `tcr3_counter` reader - "] -pub struct TCR3_COUNTER_R(crate::FieldReader); -impl TCR3_COUNTER_R { - pub(crate) fn new(bits: u32) -> Self { - TCR3_COUNTER_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TCR3_COUNTER_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TCR3_COUNTER_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn tcr3_counter(&self) -> TCR3_COUNTER_R { - TCR3_COUNTER_R::new((self.bits & 0xffff_ffff) as u32) + TCR3_COUNTER_R::new(self.bits) } } #[doc = "TCR3.\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 [tcr3](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for TCR3_SPEC { } #[doc = "`reset()` method sets TCR3 to value 0"] impl crate::Resettable for TCR3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/timer/tcvsyn2.rs b/src/timer/tcvsyn2.rs index 16e7b96..663ee7c 100644 --- a/src/timer/tcvsyn2.rs +++ b/src/timer/tcvsyn2.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `tcvsyn2` reader - "] -pub struct TCVSYN2_R(crate::FieldReader); -impl TCVSYN2_R { - pub(crate) fn new(bits: u32) -> Self { - TCVSYN2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TCVSYN2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TCVSYN2_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn tcvsyn2(&self) -> TCVSYN2_R { - TCVSYN2_R::new((self.bits & 0xffff_ffff) as u32) + TCVSYN2_R::new(self.bits) } } #[doc = "TCVSYN2.\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 [tcvsyn2](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for TCVSYN2_SPEC { } #[doc = "`reset()` method sets TCVSYN2 to value 0"] impl crate::Resettable for TCVSYN2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/timer/tcvsyn3.rs b/src/timer/tcvsyn3.rs index 2375cf4..3135c78 100644 --- a/src/timer/tcvsyn3.rs +++ b/src/timer/tcvsyn3.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `tcvsyn3` reader - "] -pub struct TCVSYN3_R(crate::FieldReader); -impl TCVSYN3_R { - pub(crate) fn new(bits: u32) -> Self { - TCVSYN3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TCVSYN3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TCVSYN3_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn tcvsyn3(&self) -> TCVSYN3_R { - TCVSYN3_R::new((self.bits & 0xffff_ffff) as u32) + TCVSYN3_R::new(self.bits) } } #[doc = "TCVSYN3.\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 [tcvsyn3](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for TCVSYN3_SPEC { } #[doc = "`reset()` method sets TCVSYN3 to value 0"] impl crate::Resettable for TCVSYN3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/timer/tcvwr2.rs b/src/timer/tcvwr2.rs index c949534..0987843 100644 --- a/src/timer/tcvwr2.rs +++ b/src/timer/tcvwr2.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `tcvwr` reader - "] -pub struct TCVWR_R(crate::FieldReader); -impl TCVWR_R { - pub(crate) fn new(bits: u32) -> Self { - TCVWR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TCVWR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TCVWR_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn tcvwr(&self) -> TCVWR_R { - TCVWR_R::new((self.bits & 0xffff_ffff) as u32) + TCVWR_R::new(self.bits) } } #[doc = "TCVWR2.\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 [tcvwr2](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for TCVWR2_SPEC { } #[doc = "`reset()` method sets TCVWR2 to value 0"] impl crate::Resettable for TCVWR2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/timer/tcvwr3.rs b/src/timer/tcvwr3.rs index 65f10e6..1f68fae 100644 --- a/src/timer/tcvwr3.rs +++ b/src/timer/tcvwr3.rs @@ -7,30 +7,19 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `tcvwr` reader - "] -pub struct TCVWR_R(crate::FieldReader); -impl TCVWR_R { - pub(crate) fn new(bits: u32) -> Self { - TCVWR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TCVWR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TCVWR_R = crate::FieldReader; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn tcvwr(&self) -> TCVWR_R { - TCVWR_R::new((self.bits & 0xffff_ffff) as u32) + TCVWR_R::new(self.bits) } } #[doc = "TCVWR3.\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 [tcvwr3](index.html) module"] @@ -44,8 +33,5 @@ impl crate::Readable for TCVWR3_SPEC { } #[doc = "`reset()` method sets TCVWR3 to value 0"] impl crate::Resettable for TCVWR3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/timer/ticr2.rs b/src/timer/ticr2.rs index 139bca3..8bb83f5 100644 --- a/src/timer/ticr2.rs +++ b/src/timer/ticr2.rs @@ -13,94 +13,39 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `tclr_2` writer - "] -pub struct TCLR_2_W<'a> { - w: &'a mut W, -} -impl<'a> TCLR_2_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `tclr_1` writer - "] -pub struct TCLR_1_W<'a> { - w: &'a mut W, -} -impl<'a> TCLR_1_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `tclr_0` writer - "] -pub struct TCLR_0_W<'a> { - w: &'a mut W, -} -impl<'a> TCLR_0_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type TCLR_0_W<'a, const O: u8> = crate::BitWriter<'a, u32, TICR2_SPEC, bool, O>; +#[doc = "Field `tclr_1` writer - "] +pub type TCLR_1_W<'a, const O: u8> = crate::BitWriter<'a, u32, TICR2_SPEC, bool, O>; +#[doc = "Field `tclr_2` writer - "] +pub type TCLR_2_W<'a, const O: u8> = crate::BitWriter<'a, u32, TICR2_SPEC, bool, O>; impl W { - #[doc = "Bit 2"] + #[doc = "Bit 0"] #[inline(always)] - pub fn tclr_2(&mut self) -> TCLR_2_W { - TCLR_2_W { w: self } + #[must_use] + pub fn tclr_0(&mut self) -> TCLR_0_W<0> { + TCLR_0_W::new(self) } #[doc = "Bit 1"] #[inline(always)] - pub fn tclr_1(&mut self) -> TCLR_1_W { - TCLR_1_W { w: self } + #[must_use] + pub fn tclr_1(&mut self) -> TCLR_1_W<1> { + TCLR_1_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 2"] #[inline(always)] - pub fn tclr_0(&mut self) -> TCLR_0_W { - TCLR_0_W { w: self } + #[must_use] + pub fn tclr_2(&mut self) -> TCLR_2_W<2> { + TCLR_2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -114,11 +59,10 @@ impl crate::RegisterSpec for TICR2_SPEC { #[doc = "`write(|w| ..)` method takes [ticr2::W](W) writer structure"] impl crate::Writable for TICR2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets TICR2 to value 0"] impl crate::Resettable for TICR2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/timer/ticr3.rs b/src/timer/ticr3.rs index 946be70..7c376f5 100644 --- a/src/timer/ticr3.rs +++ b/src/timer/ticr3.rs @@ -13,94 +13,39 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `tclr_2` writer - "] -pub struct TCLR_2_W<'a> { - w: &'a mut W, -} -impl<'a> TCLR_2_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `tclr_1` writer - "] -pub struct TCLR_1_W<'a> { - w: &'a mut W, -} -impl<'a> TCLR_1_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `tclr_0` writer - "] -pub struct TCLR_0_W<'a> { - w: &'a mut W, -} -impl<'a> TCLR_0_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type TCLR_0_W<'a, const O: u8> = crate::BitWriter<'a, u32, TICR3_SPEC, bool, O>; +#[doc = "Field `tclr_1` writer - "] +pub type TCLR_1_W<'a, const O: u8> = crate::BitWriter<'a, u32, TICR3_SPEC, bool, O>; +#[doc = "Field `tclr_2` writer - "] +pub type TCLR_2_W<'a, const O: u8> = crate::BitWriter<'a, u32, TICR3_SPEC, bool, O>; impl W { - #[doc = "Bit 2"] + #[doc = "Bit 0"] #[inline(always)] - pub fn tclr_2(&mut self) -> TCLR_2_W { - TCLR_2_W { w: self } + #[must_use] + pub fn tclr_0(&mut self) -> TCLR_0_W<0> { + TCLR_0_W::new(self) } #[doc = "Bit 1"] #[inline(always)] - pub fn tclr_1(&mut self) -> TCLR_1_W { - TCLR_1_W { w: self } + #[must_use] + pub fn tclr_1(&mut self) -> TCLR_1_W<1> { + TCLR_1_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 2"] #[inline(always)] - pub fn tclr_0(&mut self) -> TCLR_0_W { - TCLR_0_W { w: self } + #[must_use] + pub fn tclr_2(&mut self) -> TCLR_2_W<2> { + TCLR_2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -114,11 +59,10 @@ impl crate::RegisterSpec for TICR3_SPEC { #[doc = "`write(|w| ..)` method takes [ticr3::W](W) writer structure"] impl crate::Writable for TICR3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets TICR3 to value 0"] impl crate::Resettable for TICR3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/timer/tier2.rs b/src/timer/tier2.rs index f47f8b1..73f0d53 100644 --- a/src/timer/tier2.rs +++ b/src/timer/tier2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,153 +28,62 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `tier_2` reader - "] -pub struct TIER_2_R(crate::FieldReader); -impl TIER_2_R { - pub(crate) fn new(bits: bool) -> Self { - TIER_2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TIER_2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tier_2` writer - "] -pub struct TIER_2_W<'a> { - w: &'a mut W, -} -impl<'a> TIER_2_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `tier_1` reader - "] -pub struct TIER_1_R(crate::FieldReader); -impl TIER_1_R { - pub(crate) fn new(bits: bool) -> Self { - TIER_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TIER_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tier_1` writer - "] -pub struct TIER_1_W<'a> { - w: &'a mut W, -} -impl<'a> TIER_1_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `tier_0` reader - "] -pub struct TIER_0_R(crate::FieldReader); -impl TIER_0_R { - pub(crate) fn new(bits: bool) -> Self { - TIER_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TIER_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TIER_0_R = crate::BitReader; #[doc = "Field `tier_0` writer - "] -pub struct TIER_0_W<'a> { - w: &'a mut W, -} -impl<'a> TIER_0_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type TIER_0_W<'a, const O: u8> = crate::BitWriter<'a, u32, TIER2_SPEC, bool, O>; +#[doc = "Field `tier_1` reader - "] +pub type TIER_1_R = crate::BitReader; +#[doc = "Field `tier_1` writer - "] +pub type TIER_1_W<'a, const O: u8> = crate::BitWriter<'a, u32, TIER2_SPEC, bool, O>; +#[doc = "Field `tier_2` reader - "] +pub type TIER_2_R = crate::BitReader; +#[doc = "Field `tier_2` writer - "] +pub type TIER_2_W<'a, const O: u8> = crate::BitWriter<'a, u32, TIER2_SPEC, bool, O>; impl R { - #[doc = "Bit 2"] + #[doc = "Bit 0"] #[inline(always)] - pub fn tier_2(&self) -> TIER_2_R { - TIER_2_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn tier_0(&self) -> TIER_0_R { + TIER_0_R::new((self.bits & 1) != 0) } #[doc = "Bit 1"] #[inline(always)] pub fn tier_1(&self) -> TIER_1_R { - TIER_1_R::new(((self.bits >> 1) & 0x01) != 0) + TIER_1_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 2"] #[inline(always)] - pub fn tier_0(&self) -> TIER_0_R { - TIER_0_R::new((self.bits & 0x01) != 0) + pub fn tier_2(&self) -> TIER_2_R { + TIER_2_R::new(((self.bits >> 2) & 1) != 0) } } impl W { - #[doc = "Bit 2"] + #[doc = "Bit 0"] #[inline(always)] - pub fn tier_2(&mut self) -> TIER_2_W { - TIER_2_W { w: self } + #[must_use] + pub fn tier_0(&mut self) -> TIER_0_W<0> { + TIER_0_W::new(self) } #[doc = "Bit 1"] #[inline(always)] - pub fn tier_1(&mut self) -> TIER_1_W { - TIER_1_W { w: self } + #[must_use] + pub fn tier_1(&mut self) -> TIER_1_W<1> { + TIER_1_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 2"] #[inline(always)] - pub fn tier_0(&mut self) -> TIER_0_W { - TIER_0_W { w: self } + #[must_use] + pub fn tier_2(&mut self) -> TIER_2_W<2> { + TIER_2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -191,11 +101,10 @@ impl crate::Readable for TIER2_SPEC { #[doc = "`write(|w| ..)` method takes [tier2::W](W) writer structure"] impl crate::Writable for TIER2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets TIER2 to value 0"] impl crate::Resettable for TIER2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/timer/tier3.rs b/src/timer/tier3.rs index 8e3250c..8db224d 100644 --- a/src/timer/tier3.rs +++ b/src/timer/tier3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,153 +28,62 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `tier_2` reader - "] -pub struct TIER_2_R(crate::FieldReader); -impl TIER_2_R { - pub(crate) fn new(bits: bool) -> Self { - TIER_2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TIER_2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tier_2` writer - "] -pub struct TIER_2_W<'a> { - w: &'a mut W, -} -impl<'a> TIER_2_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `tier_1` reader - "] -pub struct TIER_1_R(crate::FieldReader); -impl TIER_1_R { - pub(crate) fn new(bits: bool) -> Self { - TIER_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TIER_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tier_1` writer - "] -pub struct TIER_1_W<'a> { - w: &'a mut W, -} -impl<'a> TIER_1_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `tier_0` reader - "] -pub struct TIER_0_R(crate::FieldReader); -impl TIER_0_R { - pub(crate) fn new(bits: bool) -> Self { - TIER_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TIER_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TIER_0_R = crate::BitReader; #[doc = "Field `tier_0` writer - "] -pub struct TIER_0_W<'a> { - w: &'a mut W, -} -impl<'a> TIER_0_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type TIER_0_W<'a, const O: u8> = crate::BitWriter<'a, u32, TIER3_SPEC, bool, O>; +#[doc = "Field `tier_1` reader - "] +pub type TIER_1_R = crate::BitReader; +#[doc = "Field `tier_1` writer - "] +pub type TIER_1_W<'a, const O: u8> = crate::BitWriter<'a, u32, TIER3_SPEC, bool, O>; +#[doc = "Field `tier_2` reader - "] +pub type TIER_2_R = crate::BitReader; +#[doc = "Field `tier_2` writer - "] +pub type TIER_2_W<'a, const O: u8> = crate::BitWriter<'a, u32, TIER3_SPEC, bool, O>; impl R { - #[doc = "Bit 2"] + #[doc = "Bit 0"] #[inline(always)] - pub fn tier_2(&self) -> TIER_2_R { - TIER_2_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn tier_0(&self) -> TIER_0_R { + TIER_0_R::new((self.bits & 1) != 0) } #[doc = "Bit 1"] #[inline(always)] pub fn tier_1(&self) -> TIER_1_R { - TIER_1_R::new(((self.bits >> 1) & 0x01) != 0) + TIER_1_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 2"] #[inline(always)] - pub fn tier_0(&self) -> TIER_0_R { - TIER_0_R::new((self.bits & 0x01) != 0) + pub fn tier_2(&self) -> TIER_2_R { + TIER_2_R::new(((self.bits >> 2) & 1) != 0) } } impl W { - #[doc = "Bit 2"] + #[doc = "Bit 0"] #[inline(always)] - pub fn tier_2(&mut self) -> TIER_2_W { - TIER_2_W { w: self } + #[must_use] + pub fn tier_0(&mut self) -> TIER_0_W<0> { + TIER_0_W::new(self) } #[doc = "Bit 1"] #[inline(always)] - pub fn tier_1(&mut self) -> TIER_1_W { - TIER_1_W { w: self } + #[must_use] + pub fn tier_1(&mut self) -> TIER_1_W<1> { + TIER_1_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 2"] #[inline(always)] - pub fn tier_0(&mut self) -> TIER_0_W { - TIER_0_W { w: self } + #[must_use] + pub fn tier_2(&mut self) -> TIER_2_W<2> { + TIER_2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -191,11 +101,10 @@ impl crate::Readable for TIER3_SPEC { #[doc = "`write(|w| ..)` method takes [tier3::W](W) writer structure"] impl crate::Writable for TIER3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets TIER3 to value 0"] impl crate::Resettable for TIER3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/timer/tilr2.rs b/src/timer/tilr2.rs index 2e0461a..17cbb20 100644 --- a/src/timer/tilr2.rs +++ b/src/timer/tilr2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,153 +28,62 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `tilr_2` reader - "] -pub struct TILR_2_R(crate::FieldReader); -impl TILR_2_R { - pub(crate) fn new(bits: bool) -> Self { - TILR_2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TILR_2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tilr_2` writer - "] -pub struct TILR_2_W<'a> { - w: &'a mut W, -} -impl<'a> TILR_2_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `tilr_1` reader - "] -pub struct TILR_1_R(crate::FieldReader); -impl TILR_1_R { - pub(crate) fn new(bits: bool) -> Self { - TILR_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TILR_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tilr_1` writer - "] -pub struct TILR_1_W<'a> { - w: &'a mut W, -} -impl<'a> TILR_1_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `tilr_0` reader - "] -pub struct TILR_0_R(crate::FieldReader); -impl TILR_0_R { - pub(crate) fn new(bits: bool) -> Self { - TILR_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TILR_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TILR_0_R = crate::BitReader; #[doc = "Field `tilr_0` writer - "] -pub struct TILR_0_W<'a> { - w: &'a mut W, -} -impl<'a> TILR_0_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type TILR_0_W<'a, const O: u8> = crate::BitWriter<'a, u32, TILR2_SPEC, bool, O>; +#[doc = "Field `tilr_1` reader - "] +pub type TILR_1_R = crate::BitReader; +#[doc = "Field `tilr_1` writer - "] +pub type TILR_1_W<'a, const O: u8> = crate::BitWriter<'a, u32, TILR2_SPEC, bool, O>; +#[doc = "Field `tilr_2` reader - "] +pub type TILR_2_R = crate::BitReader; +#[doc = "Field `tilr_2` writer - "] +pub type TILR_2_W<'a, const O: u8> = crate::BitWriter<'a, u32, TILR2_SPEC, bool, O>; impl R { - #[doc = "Bit 2"] + #[doc = "Bit 0"] #[inline(always)] - pub fn tilr_2(&self) -> TILR_2_R { - TILR_2_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn tilr_0(&self) -> TILR_0_R { + TILR_0_R::new((self.bits & 1) != 0) } #[doc = "Bit 1"] #[inline(always)] pub fn tilr_1(&self) -> TILR_1_R { - TILR_1_R::new(((self.bits >> 1) & 0x01) != 0) + TILR_1_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 2"] #[inline(always)] - pub fn tilr_0(&self) -> TILR_0_R { - TILR_0_R::new((self.bits & 0x01) != 0) + pub fn tilr_2(&self) -> TILR_2_R { + TILR_2_R::new(((self.bits >> 2) & 1) != 0) } } impl W { - #[doc = "Bit 2"] + #[doc = "Bit 0"] #[inline(always)] - pub fn tilr_2(&mut self) -> TILR_2_W { - TILR_2_W { w: self } + #[must_use] + pub fn tilr_0(&mut self) -> TILR_0_W<0> { + TILR_0_W::new(self) } #[doc = "Bit 1"] #[inline(always)] - pub fn tilr_1(&mut self) -> TILR_1_W { - TILR_1_W { w: self } + #[must_use] + pub fn tilr_1(&mut self) -> TILR_1_W<1> { + TILR_1_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 2"] #[inline(always)] - pub fn tilr_0(&mut self) -> TILR_0_W { - TILR_0_W { w: self } + #[must_use] + pub fn tilr_2(&mut self) -> TILR_2_W<2> { + TILR_2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -191,11 +101,10 @@ impl crate::Readable for TILR2_SPEC { #[doc = "`write(|w| ..)` method takes [tilr2::W](W) writer structure"] impl crate::Writable for TILR2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets TILR2 to value 0"] impl crate::Resettable for TILR2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/timer/tilr3.rs b/src/timer/tilr3.rs index 4e29f88..131a287 100644 --- a/src/timer/tilr3.rs +++ b/src/timer/tilr3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,153 +28,62 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `tilr_2` reader - "] -pub struct TILR_2_R(crate::FieldReader); -impl TILR_2_R { - pub(crate) fn new(bits: bool) -> Self { - TILR_2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TILR_2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tilr_2` writer - "] -pub struct TILR_2_W<'a> { - w: &'a mut W, -} -impl<'a> TILR_2_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `tilr_1` reader - "] -pub struct TILR_1_R(crate::FieldReader); -impl TILR_1_R { - pub(crate) fn new(bits: bool) -> Self { - TILR_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TILR_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tilr_1` writer - "] -pub struct TILR_1_W<'a> { - w: &'a mut W, -} -impl<'a> TILR_1_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `tilr_0` reader - "] -pub struct TILR_0_R(crate::FieldReader); -impl TILR_0_R { - pub(crate) fn new(bits: bool) -> Self { - TILR_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TILR_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TILR_0_R = crate::BitReader; #[doc = "Field `tilr_0` writer - "] -pub struct TILR_0_W<'a> { - w: &'a mut W, -} -impl<'a> TILR_0_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type TILR_0_W<'a, const O: u8> = crate::BitWriter<'a, u32, TILR3_SPEC, bool, O>; +#[doc = "Field `tilr_1` reader - "] +pub type TILR_1_R = crate::BitReader; +#[doc = "Field `tilr_1` writer - "] +pub type TILR_1_W<'a, const O: u8> = crate::BitWriter<'a, u32, TILR3_SPEC, bool, O>; +#[doc = "Field `tilr_2` reader - "] +pub type TILR_2_R = crate::BitReader; +#[doc = "Field `tilr_2` writer - "] +pub type TILR_2_W<'a, const O: u8> = crate::BitWriter<'a, u32, TILR3_SPEC, bool, O>; impl R { - #[doc = "Bit 2"] + #[doc = "Bit 0"] #[inline(always)] - pub fn tilr_2(&self) -> TILR_2_R { - TILR_2_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn tilr_0(&self) -> TILR_0_R { + TILR_0_R::new((self.bits & 1) != 0) } #[doc = "Bit 1"] #[inline(always)] pub fn tilr_1(&self) -> TILR_1_R { - TILR_1_R::new(((self.bits >> 1) & 0x01) != 0) + TILR_1_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 2"] #[inline(always)] - pub fn tilr_0(&self) -> TILR_0_R { - TILR_0_R::new((self.bits & 0x01) != 0) + pub fn tilr_2(&self) -> TILR_2_R { + TILR_2_R::new(((self.bits >> 2) & 1) != 0) } } impl W { - #[doc = "Bit 2"] + #[doc = "Bit 0"] #[inline(always)] - pub fn tilr_2(&mut self) -> TILR_2_W { - TILR_2_W { w: self } + #[must_use] + pub fn tilr_0(&mut self) -> TILR_0_W<0> { + TILR_0_W::new(self) } #[doc = "Bit 1"] #[inline(always)] - pub fn tilr_1(&mut self) -> TILR_1_W { - TILR_1_W { w: self } + #[must_use] + pub fn tilr_1(&mut self) -> TILR_1_W<1> { + TILR_1_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 2"] #[inline(always)] - pub fn tilr_0(&mut self) -> TILR_0_W { - TILR_0_W { w: self } + #[must_use] + pub fn tilr_2(&mut self) -> TILR_2_W<2> { + TILR_2_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -191,11 +101,10 @@ impl crate::Readable for TILR3_SPEC { #[doc = "`write(|w| ..)` method takes [tilr3::W](W) writer structure"] impl crate::Writable for TILR3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets TILR3 to value 0"] impl crate::Resettable for TILR3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/timer/tmr2_0.rs b/src/timer/tmr2_0.rs index 5baf6fc..35d3633 100644 --- a/src/timer/tmr2_0.rs +++ b/src/timer/tmr2_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,32 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `tmr` reader - "] -pub struct TMR_R(crate::FieldReader); -impl TMR_R { - pub(crate) fn new(bits: u32) -> Self { - TMR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TMR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TMR_R = crate::FieldReader; #[doc = "Field `tmr` writer - "] -pub struct TMR_W<'a> { - w: &'a mut W, -} -impl<'a> TMR_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type TMR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TMR2_0_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn tmr(&self) -> TMR_R { - TMR_R::new((self.bits & 0xffff_ffff) as u32) + TMR_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn tmr(&mut self) -> TMR_W { - TMR_W { w: self } + #[must_use] + pub fn tmr(&mut self) -> TMR_W<0> { + TMR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +71,10 @@ impl crate::Readable for TMR2_0_SPEC { #[doc = "`write(|w| ..)` method takes [tmr2_0::W](W) writer structure"] impl crate::Writable for TMR2_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets TMR2_0 to value 0xffff_ffff"] impl crate::Resettable for TMR2_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xffff_ffff - } + const RESET_VALUE: Self::Ux = 0xffff_ffff; } diff --git a/src/timer/tmr2_1.rs b/src/timer/tmr2_1.rs index fb66ab1..8ad00ea 100644 --- a/src/timer/tmr2_1.rs +++ b/src/timer/tmr2_1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,32 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `tmr` reader - "] -pub struct TMR_R(crate::FieldReader); -impl TMR_R { - pub(crate) fn new(bits: u32) -> Self { - TMR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TMR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TMR_R = crate::FieldReader; #[doc = "Field `tmr` writer - "] -pub struct TMR_W<'a> { - w: &'a mut W, -} -impl<'a> TMR_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type TMR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TMR2_1_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn tmr(&self) -> TMR_R { - TMR_R::new((self.bits & 0xffff_ffff) as u32) + TMR_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn tmr(&mut self) -> TMR_W { - TMR_W { w: self } + #[must_use] + pub fn tmr(&mut self) -> TMR_W<0> { + TMR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +71,10 @@ impl crate::Readable for TMR2_1_SPEC { #[doc = "`write(|w| ..)` method takes [tmr2_1::W](W) writer structure"] impl crate::Writable for TMR2_1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets TMR2_1 to value 0xffff_ffff"] impl crate::Resettable for TMR2_1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xffff_ffff - } + const RESET_VALUE: Self::Ux = 0xffff_ffff; } diff --git a/src/timer/tmr2_2.rs b/src/timer/tmr2_2.rs index 7cc42d5..1584a61 100644 --- a/src/timer/tmr2_2.rs +++ b/src/timer/tmr2_2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,32 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `tmr` reader - "] -pub struct TMR_R(crate::FieldReader); -impl TMR_R { - pub(crate) fn new(bits: u32) -> Self { - TMR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TMR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TMR_R = crate::FieldReader; #[doc = "Field `tmr` writer - "] -pub struct TMR_W<'a> { - w: &'a mut W, -} -impl<'a> TMR_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type TMR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TMR2_2_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn tmr(&self) -> TMR_R { - TMR_R::new((self.bits & 0xffff_ffff) as u32) + TMR_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn tmr(&mut self) -> TMR_W { - TMR_W { w: self } + #[must_use] + pub fn tmr(&mut self) -> TMR_W<0> { + TMR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +71,10 @@ impl crate::Readable for TMR2_2_SPEC { #[doc = "`write(|w| ..)` method takes [tmr2_2::W](W) writer structure"] impl crate::Writable for TMR2_2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets TMR2_2 to value 0xffff_ffff"] impl crate::Resettable for TMR2_2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xffff_ffff - } + const RESET_VALUE: Self::Ux = 0xffff_ffff; } diff --git a/src/timer/tmr3_0.rs b/src/timer/tmr3_0.rs index 71a892a..7eb7418 100644 --- a/src/timer/tmr3_0.rs +++ b/src/timer/tmr3_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,32 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `tmr` reader - "] -pub struct TMR_R(crate::FieldReader); -impl TMR_R { - pub(crate) fn new(bits: u32) -> Self { - TMR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TMR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TMR_R = crate::FieldReader; #[doc = "Field `tmr` writer - "] -pub struct TMR_W<'a> { - w: &'a mut W, -} -impl<'a> TMR_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type TMR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TMR3_0_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn tmr(&self) -> TMR_R { - TMR_R::new((self.bits & 0xffff_ffff) as u32) + TMR_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn tmr(&mut self) -> TMR_W { - TMR_W { w: self } + #[must_use] + pub fn tmr(&mut self) -> TMR_W<0> { + TMR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +71,10 @@ impl crate::Readable for TMR3_0_SPEC { #[doc = "`write(|w| ..)` method takes [tmr3_0::W](W) writer structure"] impl crate::Writable for TMR3_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets TMR3_0 to value 0xffff_ffff"] impl crate::Resettable for TMR3_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xffff_ffff - } + const RESET_VALUE: Self::Ux = 0xffff_ffff; } diff --git a/src/timer/tmr3_1.rs b/src/timer/tmr3_1.rs index 2a9c414..aad02f6 100644 --- a/src/timer/tmr3_1.rs +++ b/src/timer/tmr3_1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,32 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `tmr` reader - "] -pub struct TMR_R(crate::FieldReader); -impl TMR_R { - pub(crate) fn new(bits: u32) -> Self { - TMR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TMR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TMR_R = crate::FieldReader; #[doc = "Field `tmr` writer - "] -pub struct TMR_W<'a> { - w: &'a mut W, -} -impl<'a> TMR_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type TMR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TMR3_1_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn tmr(&self) -> TMR_R { - TMR_R::new((self.bits & 0xffff_ffff) as u32) + TMR_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn tmr(&mut self) -> TMR_W { - TMR_W { w: self } + #[must_use] + pub fn tmr(&mut self) -> TMR_W<0> { + TMR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +71,10 @@ impl crate::Readable for TMR3_1_SPEC { #[doc = "`write(|w| ..)` method takes [tmr3_1::W](W) writer structure"] impl crate::Writable for TMR3_1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets TMR3_1 to value 0xffff_ffff"] impl crate::Resettable for TMR3_1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xffff_ffff - } + const RESET_VALUE: Self::Ux = 0xffff_ffff; } diff --git a/src/timer/tmr3_2.rs b/src/timer/tmr3_2.rs index 7d541a9..b71dbda 100644 --- a/src/timer/tmr3_2.rs +++ b/src/timer/tmr3_2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,32 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `tmr` reader - "] -pub struct TMR_R(crate::FieldReader); -impl TMR_R { - pub(crate) fn new(bits: u32) -> Self { - TMR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TMR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TMR_R = crate::FieldReader; #[doc = "Field `tmr` writer - "] -pub struct TMR_W<'a> { - w: &'a mut W, -} -impl<'a> TMR_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type TMR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TMR3_2_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn tmr(&self) -> TMR_R { - TMR_R::new((self.bits & 0xffff_ffff) as u32) + TMR_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn tmr(&mut self) -> TMR_W { - TMR_W { w: self } + #[must_use] + pub fn tmr(&mut self) -> TMR_W<0> { + TMR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +71,10 @@ impl crate::Readable for TMR3_2_SPEC { #[doc = "`write(|w| ..)` method takes [tmr3_2::W](W) writer structure"] impl crate::Writable for TMR3_2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets TMR3_2 to value 0xffff_ffff"] impl crate::Resettable for TMR3_2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xffff_ffff - } + const RESET_VALUE: Self::Ux = 0xffff_ffff; } diff --git a/src/timer/tmsr2.rs b/src/timer/tmsr2.rs index 2518341..bf6e609 100644 --- a/src/timer/tmsr2.rs +++ b/src/timer/tmsr2.rs @@ -7,68 +7,33 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `tmsr_2` reader - "] -pub struct TMSR_2_R(crate::FieldReader); -impl TMSR_2_R { - pub(crate) fn new(bits: bool) -> Self { - TMSR_2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TMSR_2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tmsr_1` reader - "] -pub struct TMSR_1_R(crate::FieldReader); -impl TMSR_1_R { - pub(crate) fn new(bits: bool) -> Self { - TMSR_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TMSR_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} #[doc = "Field `tmsr_0` reader - "] -pub struct TMSR_0_R(crate::FieldReader); -impl TMSR_0_R { - pub(crate) fn new(bits: bool) -> Self { - TMSR_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TMSR_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TMSR_0_R = crate::BitReader; +#[doc = "Field `tmsr_1` reader - "] +pub type TMSR_1_R = crate::BitReader; +#[doc = "Field `tmsr_2` reader - "] +pub type TMSR_2_R = crate::BitReader; impl R { - #[doc = "Bit 2"] + #[doc = "Bit 0"] #[inline(always)] - pub fn tmsr_2(&self) -> TMSR_2_R { - TMSR_2_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn tmsr_0(&self) -> TMSR_0_R { + TMSR_0_R::new((self.bits & 1) != 0) } #[doc = "Bit 1"] #[inline(always)] pub fn tmsr_1(&self) -> TMSR_1_R { - TMSR_1_R::new(((self.bits >> 1) & 0x01) != 0) + TMSR_1_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 2"] #[inline(always)] - pub fn tmsr_0(&self) -> TMSR_0_R { - TMSR_0_R::new((self.bits & 0x01) != 0) + pub fn tmsr_2(&self) -> TMSR_2_R { + TMSR_2_R::new(((self.bits >> 2) & 1) != 0) } } #[doc = "TMSR2.\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 [tmsr2](index.html) module"] @@ -82,8 +47,5 @@ impl crate::Readable for TMSR2_SPEC { } #[doc = "`reset()` method sets TMSR2 to value 0"] impl crate::Resettable for TMSR2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/timer/tmsr3.rs b/src/timer/tmsr3.rs index ed25309..a5e6f0e 100644 --- a/src/timer/tmsr3.rs +++ b/src/timer/tmsr3.rs @@ -7,68 +7,33 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `tmsr_2` reader - "] -pub struct TMSR_2_R(crate::FieldReader); -impl TMSR_2_R { - pub(crate) fn new(bits: bool) -> Self { - TMSR_2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TMSR_2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tmsr_1` reader - "] -pub struct TMSR_1_R(crate::FieldReader); -impl TMSR_1_R { - pub(crate) fn new(bits: bool) -> Self { - TMSR_1_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TMSR_1_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} #[doc = "Field `tmsr_0` reader - "] -pub struct TMSR_0_R(crate::FieldReader); -impl TMSR_0_R { - pub(crate) fn new(bits: bool) -> Self { - TMSR_0_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TMSR_0_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TMSR_0_R = crate::BitReader; +#[doc = "Field `tmsr_1` reader - "] +pub type TMSR_1_R = crate::BitReader; +#[doc = "Field `tmsr_2` reader - "] +pub type TMSR_2_R = crate::BitReader; impl R { - #[doc = "Bit 2"] + #[doc = "Bit 0"] #[inline(always)] - pub fn tmsr_2(&self) -> TMSR_2_R { - TMSR_2_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn tmsr_0(&self) -> TMSR_0_R { + TMSR_0_R::new((self.bits & 1) != 0) } #[doc = "Bit 1"] #[inline(always)] pub fn tmsr_1(&self) -> TMSR_1_R { - TMSR_1_R::new(((self.bits >> 1) & 0x01) != 0) + TMSR_1_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 2"] #[inline(always)] - pub fn tmsr_0(&self) -> TMSR_0_R { - TMSR_0_R::new((self.bits & 0x01) != 0) + pub fn tmsr_2(&self) -> TMSR_2_R { + TMSR_2_R::new(((self.bits >> 2) & 1) != 0) } } #[doc = "TMSR3.\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 [tmsr3](index.html) module"] @@ -82,8 +47,5 @@ impl crate::Readable for TMSR3_SPEC { } #[doc = "`reset()` method sets TMSR3 to value 0"] impl crate::Resettable for TMSR3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/timer/tplcr2.rs b/src/timer/tplcr2.rs index ea5760d..f094e58 100644 --- a/src/timer/tplcr2.rs +++ b/src/timer/tplcr2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,32 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `tplcr` reader - "] -pub struct TPLCR_R(crate::FieldReader); -impl TPLCR_R { - pub(crate) fn new(bits: u8) -> Self { - TPLCR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TPLCR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TPLCR_R = crate::FieldReader; #[doc = "Field `tplcr` writer - "] -pub struct TPLCR_W<'a> { - w: &'a mut W, -} -impl<'a> TPLCR_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w - } -} +pub type TPLCR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TPLCR2_SPEC, u8, u8, 2, O>; impl R { #[doc = "Bits 0:1"] #[inline(always)] pub fn tplcr(&self) -> TPLCR_R { - TPLCR_R::new((self.bits & 0x03) as u8) + TPLCR_R::new((self.bits & 3) as u8) } } impl W { #[doc = "Bits 0:1"] #[inline(always)] - pub fn tplcr(&mut self) -> TPLCR_W { - TPLCR_W { w: self } + #[must_use] + pub fn tplcr(&mut self) -> TPLCR_W<0> { + TPLCR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +71,10 @@ impl crate::Readable for TPLCR2_SPEC { #[doc = "`write(|w| ..)` method takes [tplcr2::W](W) writer structure"] impl crate::Writable for TPLCR2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets TPLCR2 to value 0"] impl crate::Resettable for TPLCR2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/timer/tplcr3.rs b/src/timer/tplcr3.rs index 4a6cd62..e132496 100644 --- a/src/timer/tplcr3.rs +++ b/src/timer/tplcr3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,32 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `tplcr` reader - "] -pub struct TPLCR_R(crate::FieldReader); -impl TPLCR_R { - pub(crate) fn new(bits: u8) -> Self { - TPLCR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TPLCR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TPLCR_R = crate::FieldReader; #[doc = "Field `tplcr` writer - "] -pub struct TPLCR_W<'a> { - w: &'a mut W, -} -impl<'a> TPLCR_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0x03) | (value as u32 & 0x03); - self.w - } -} +pub type TPLCR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TPLCR3_SPEC, u8, u8, 2, O>; impl R { #[doc = "Bits 0:1"] #[inline(always)] pub fn tplcr(&self) -> TPLCR_R { - TPLCR_R::new((self.bits & 0x03) as u8) + TPLCR_R::new((self.bits & 3) as u8) } } impl W { #[doc = "Bits 0:1"] #[inline(always)] - pub fn tplcr(&mut self) -> TPLCR_W { - TPLCR_W { w: self } + #[must_use] + pub fn tplcr(&mut self) -> TPLCR_W<0> { + TPLCR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +71,10 @@ impl crate::Readable for TPLCR3_SPEC { #[doc = "`write(|w| ..)` method takes [tplcr3::W](W) writer structure"] impl crate::Writable for TPLCR3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets TPLCR3 to value 0"] impl crate::Resettable for TPLCR3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/timer/tplvr2.rs b/src/timer/tplvr2.rs index 9130e8c..46e40d5 100644 --- a/src/timer/tplvr2.rs +++ b/src/timer/tplvr2.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,32 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `tplvr` reader - "] -pub struct TPLVR_R(crate::FieldReader); -impl TPLVR_R { - pub(crate) fn new(bits: u32) -> Self { - TPLVR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TPLVR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TPLVR_R = crate::FieldReader; #[doc = "Field `tplvr` writer - "] -pub struct TPLVR_W<'a> { - w: &'a mut W, -} -impl<'a> TPLVR_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type TPLVR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TPLVR2_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn tplvr(&self) -> TPLVR_R { - TPLVR_R::new((self.bits & 0xffff_ffff) as u32) + TPLVR_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn tplvr(&mut self) -> TPLVR_W { - TPLVR_W { w: self } + #[must_use] + pub fn tplvr(&mut self) -> TPLVR_W<0> { + TPLVR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +71,10 @@ impl crate::Readable for TPLVR2_SPEC { #[doc = "`write(|w| ..)` method takes [tplvr2::W](W) writer structure"] impl crate::Writable for TPLVR2_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets TPLVR2 to value 0"] impl crate::Resettable for TPLVR2_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/timer/tplvr3.rs b/src/timer/tplvr3.rs index fb5e78b..67d431c 100644 --- a/src/timer/tplvr3.rs +++ b/src/timer/tplvr3.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,51 +28,32 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `tplvr` reader - "] -pub struct TPLVR_R(crate::FieldReader); -impl TPLVR_R { - pub(crate) fn new(bits: u32) -> Self { - TPLVR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TPLVR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TPLVR_R = crate::FieldReader; #[doc = "Field `tplvr` writer - "] -pub struct TPLVR_W<'a> { - w: &'a mut W, -} -impl<'a> TPLVR_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u32) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); - self.w - } -} +pub type TPLVR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TPLVR3_SPEC, u32, u32, 32, O>; impl R { #[doc = "Bits 0:31"] #[inline(always)] pub fn tplvr(&self) -> TPLVR_R { - TPLVR_R::new((self.bits & 0xffff_ffff) as u32) + TPLVR_R::new(self.bits) } } impl W { #[doc = "Bits 0:31"] #[inline(always)] - pub fn tplvr(&mut self) -> TPLVR_W { - TPLVR_W { w: self } + #[must_use] + pub fn tplvr(&mut self) -> TPLVR_W<0> { + TPLVR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +71,10 @@ impl crate::Readable for TPLVR3_SPEC { #[doc = "`write(|w| ..)` method takes [tplvr3::W](W) writer structure"] impl crate::Writable for TPLVR3_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets TPLVR3 to value 0"] impl crate::Resettable for TPLVR3_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/timer/wcr.rs b/src/timer/wcr.rs index 51060da..c31d6d5 100644 --- a/src/timer/wcr.rs +++ b/src/timer/wcr.rs @@ -13,40 +13,23 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `wcr` writer - "] -pub struct WCR_W<'a> { - w: &'a mut W, -} -impl<'a> WCR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type WCR_W<'a, const O: u8> = crate::BitWriter<'a, u32, WCR_SPEC, bool, O>; impl W { #[doc = "Bit 0"] #[inline(always)] - pub fn wcr(&mut self) -> WCR_W { - WCR_W { w: self } + #[must_use] + pub fn wcr(&mut self) -> WCR_W<0> { + WCR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -60,11 +43,10 @@ impl crate::RegisterSpec for WCR_SPEC { #[doc = "`write(|w| ..)` method takes [wcr::W](W) writer structure"] impl crate::Writable for WCR_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets WCR to value 0"] impl crate::Resettable for WCR_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/timer/wfar.rs b/src/timer/wfar.rs index e99b6b1..846dd0f 100644 --- a/src/timer/wfar.rs +++ b/src/timer/wfar.rs @@ -13,30 +13,23 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `wfar` writer - "] -pub struct WFAR_W<'a> { - w: &'a mut W, -} -impl<'a> WFAR_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w - } -} +pub type WFAR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, WFAR_SPEC, u16, u16, 16, O>; impl W { #[doc = "Bits 0:15"] #[inline(always)] - pub fn wfar(&mut self) -> WFAR_W { - WFAR_W { w: self } + #[must_use] + pub fn wfar(&mut self) -> WFAR_W<0> { + WFAR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -50,11 +43,10 @@ impl crate::RegisterSpec for WFAR_SPEC { #[doc = "`write(|w| ..)` method takes [wfar::W](W) writer structure"] impl crate::Writable for WFAR_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets WFAR to value 0"] impl crate::Resettable for WFAR_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/timer/wicr.rs b/src/timer/wicr.rs index 1350e86..d4da5f5 100644 --- a/src/timer/wicr.rs +++ b/src/timer/wicr.rs @@ -13,40 +13,23 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `wiclr` writer - "] -pub struct WICLR_W<'a> { - w: &'a mut W, -} -impl<'a> WICLR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type WICLR_W<'a, const O: u8> = crate::BitWriter<'a, u32, WICR_SPEC, bool, O>; impl W { #[doc = "Bit 0"] #[inline(always)] - pub fn wiclr(&mut self) -> WICLR_W { - WICLR_W { w: self } + #[must_use] + pub fn wiclr(&mut self) -> WICLR_W<0> { + WICLR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -60,11 +43,10 @@ impl crate::RegisterSpec for WICR_SPEC { #[doc = "`write(|w| ..)` method takes [wicr::W](W) writer structure"] impl crate::Writable for WICR_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets WICR to value 0"] impl crate::Resettable for WICR_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/timer/wmer.rs b/src/timer/wmer.rs index c472aa2..908b40f 100644 --- a/src/timer/wmer.rs +++ b/src/timer/wmer.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,107 +28,47 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `wrie` reader - "] -pub struct WRIE_R(crate::FieldReader); -impl WRIE_R { - pub(crate) fn new(bits: bool) -> Self { - WRIE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for WRIE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `wrie` writer - "] -pub struct WRIE_W<'a> { - w: &'a mut W, -} -impl<'a> WRIE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `we` reader - "] -pub struct WE_R(crate::FieldReader); -impl WE_R { - pub(crate) fn new(bits: bool) -> Self { - WE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for WE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type WE_R = crate::BitReader; #[doc = "Field `we` writer - "] -pub struct WE_W<'a> { - w: &'a mut W, -} -impl<'a> WE_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type WE_W<'a, const O: u8> = crate::BitWriter<'a, u32, WMER_SPEC, bool, O>; +#[doc = "Field `wrie` reader - "] +pub type WRIE_R = crate::BitReader; +#[doc = "Field `wrie` writer - "] +pub type WRIE_W<'a, const O: u8> = crate::BitWriter<'a, u32, WMER_SPEC, bool, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn we(&self) -> WE_R { + WE_R::new((self.bits & 1) != 0) } -} -impl R { #[doc = "Bit 1"] #[inline(always)] pub fn wrie(&self) -> WRIE_R { - WRIE_R::new(((self.bits >> 1) & 0x01) != 0) - } - #[doc = "Bit 0"] - #[inline(always)] - pub fn we(&self) -> WE_R { - WE_R::new((self.bits & 0x01) != 0) + WRIE_R::new(((self.bits >> 1) & 1) != 0) } } impl W { - #[doc = "Bit 1"] + #[doc = "Bit 0"] #[inline(always)] - pub fn wrie(&mut self) -> WRIE_W { - WRIE_W { w: self } + #[must_use] + pub fn we(&mut self) -> WE_W<0> { + WE_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 1"] #[inline(always)] - pub fn we(&mut self) -> WE_W { - WE_W { w: self } + #[must_use] + pub fn wrie(&mut self) -> WRIE_W<1> { + WRIE_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -145,11 +86,10 @@ impl crate::Readable for WMER_SPEC { #[doc = "`write(|w| ..)` method takes [wmer::W](W) writer structure"] impl crate::Writable for WMER_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets WMER to value 0"] impl crate::Resettable for WMER_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/timer/wmr.rs b/src/timer/wmr.rs index 6b50c7d..2776c09 100644 --- a/src/timer/wmr.rs +++ b/src/timer/wmr.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,37 +28,16 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `wmr` reader - "] -pub struct WMR_R(crate::FieldReader); -impl WMR_R { - pub(crate) fn new(bits: u16) -> Self { - WMR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for WMR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type WMR_R = crate::FieldReader; #[doc = "Field `wmr` writer - "] -pub struct WMR_W<'a> { - w: &'a mut W, -} -impl<'a> WMR_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w - } -} +pub type WMR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, WMR_SPEC, u16, u16, 16, O>; impl R { #[doc = "Bits 0:15"] #[inline(always)] @@ -68,10 +48,12 @@ impl R { impl W { #[doc = "Bits 0:15"] #[inline(always)] - pub fn wmr(&mut self) -> WMR_W { - WMR_W { w: self } + #[must_use] + pub fn wmr(&mut self) -> WMR_W<0> { + WMR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +71,10 @@ impl crate::Readable for WMR_SPEC { #[doc = "`write(|w| ..)` method takes [wmr::W](W) writer structure"] impl crate::Writable for WMR_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets WMR to value 0xffff"] impl crate::Resettable for WMR_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xffff - } + const RESET_VALUE: Self::Ux = 0xffff; } diff --git a/src/timer/wsar.rs b/src/timer/wsar.rs index ae9c6df..9f47d7f 100644 --- a/src/timer/wsar.rs +++ b/src/timer/wsar.rs @@ -13,30 +13,23 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `wsar` writer - "] -pub struct WSAR_W<'a> { - w: &'a mut W, -} -impl<'a> WSAR_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w - } -} +pub type WSAR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, WSAR_SPEC, u16, u16, 16, O>; impl W { #[doc = "Bits 0:15"] #[inline(always)] - pub fn wsar(&mut self) -> WSAR_W { - WSAR_W { w: self } + #[must_use] + pub fn wsar(&mut self) -> WSAR_W<0> { + WSAR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -50,11 +43,10 @@ impl crate::RegisterSpec for WSAR_SPEC { #[doc = "`write(|w| ..)` method takes [wsar::W](W) writer structure"] impl crate::Writable for WSAR_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets WSAR to value 0"] impl crate::Resettable for WSAR_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/timer/wsr.rs b/src/timer/wsr.rs index cc6d800..5ab4e7a 100644 --- a/src/timer/wsr.rs +++ b/src/timer/wsr.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,61 +28,32 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `wts` reader - "] -pub struct WTS_R(crate::FieldReader); -impl WTS_R { - pub(crate) fn new(bits: bool) -> Self { - WTS_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for WTS_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type WTS_R = crate::BitReader; #[doc = "Field `wts` writer - "] -pub struct WTS_W<'a> { - w: &'a mut W, -} -impl<'a> WTS_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type WTS_W<'a, const O: u8> = crate::BitWriter<'a, u32, WSR_SPEC, bool, O>; impl R { #[doc = "Bit 0"] #[inline(always)] pub fn wts(&self) -> WTS_R { - WTS_R::new((self.bits & 0x01) != 0) + WTS_R::new((self.bits & 1) != 0) } } impl W { #[doc = "Bit 0"] #[inline(always)] - pub fn wts(&mut self) -> WTS_W { - WTS_W { w: self } + #[must_use] + pub fn wts(&mut self) -> WTS_W<0> { + WTS_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -99,11 +71,10 @@ impl crate::Readable for WSR_SPEC { #[doc = "`write(|w| ..)` method takes [wsr::W](W) writer structure"] impl crate::Writable for WSR_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets WSR to value 0"] impl crate::Resettable for WSR_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/timer/wvr.rs b/src/timer/wvr.rs index 395f493..8e14a1f 100644 --- a/src/timer/wvr.rs +++ b/src/timer/wvr.rs @@ -7,25 +7,14 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `wvr` reader - "] -pub struct WVR_R(crate::FieldReader); -impl WVR_R { - pub(crate) fn new(bits: u16) -> Self { - WVR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for WVR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type WVR_R = crate::FieldReader; impl R { #[doc = "Bits 0:15"] #[inline(always)] @@ -44,8 +33,5 @@ impl crate::Readable for WVR_SPEC { } #[doc = "`reset()` method sets WVR to value 0"] impl crate::Resettable for WVR_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/tzc_nsec.rs b/src/tzc_nsec.rs index 2781967..cfdf0c7 100644 --- a/src/tzc_nsec.rs +++ b/src/tzc_nsec.rs @@ -1,35 +1,35 @@ #[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { - _reserved0: [u8; 64usize], + _reserved0: [u8; 0x40], #[doc = "0x40 - tzc_rom_ctrl."] - pub tzc_rom_ctrl: crate::Reg, + pub tzc_rom_ctrl: TZC_ROM_CTRL, #[doc = "0x44 - tzc_rom0_r0."] - pub tzc_rom0_r0: crate::Reg, + pub tzc_rom0_r0: TZC_ROM0_R0, #[doc = "0x48 - tzc_rom0_r1."] - pub tzc_rom0_r1: crate::Reg, + pub tzc_rom0_r1: TZC_ROM0_R1, #[doc = "0x4c - tzc_rom1_r0."] - pub tzc_rom1_r0: crate::Reg, + pub tzc_rom1_r0: TZC_ROM1_R0, #[doc = "0x50 - tzc_rom1_r1."] - pub tzc_rom1_r1: crate::Reg, + pub tzc_rom1_r1: TZC_ROM1_R1, } -#[doc = "tzc_rom_ctrl register accessor: an alias for `Reg`"] +#[doc = "tzc_rom_ctrl (r) register accessor: an alias for `Reg`"] pub type TZC_ROM_CTRL = crate::Reg; #[doc = "tzc_rom_ctrl."] pub mod tzc_rom_ctrl; -#[doc = "tzc_rom0_r0 register accessor: an alias for `Reg`"] +#[doc = "tzc_rom0_r0 (r) register accessor: an alias for `Reg`"] pub type TZC_ROM0_R0 = crate::Reg; #[doc = "tzc_rom0_r0."] pub mod tzc_rom0_r0; -#[doc = "tzc_rom0_r1 register accessor: an alias for `Reg`"] +#[doc = "tzc_rom0_r1 (r) register accessor: an alias for `Reg`"] pub type TZC_ROM0_R1 = crate::Reg; #[doc = "tzc_rom0_r1."] pub mod tzc_rom0_r1; -#[doc = "tzc_rom1_r0 register accessor: an alias for `Reg`"] +#[doc = "tzc_rom1_r0 (r) register accessor: an alias for `Reg`"] pub type TZC_ROM1_R0 = crate::Reg; #[doc = "tzc_rom1_r0."] pub mod tzc_rom1_r0; -#[doc = "tzc_rom1_r1 register accessor: an alias for `Reg`"] +#[doc = "tzc_rom1_r1 (r) register accessor: an alias for `Reg`"] pub type TZC_ROM1_R1 = crate::Reg; #[doc = "tzc_rom1_r1."] pub mod tzc_rom1_r1; diff --git a/src/tzc_nsec/tzc_rom0_r0.rs b/src/tzc_nsec/tzc_rom0_r0.rs index e1cfb05..053cafd 100644 --- a/src/tzc_nsec/tzc_rom0_r0.rs +++ b/src/tzc_nsec/tzc_rom0_r0.rs @@ -7,50 +7,27 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `tzc_rom0_r0_start` reader - "] -pub struct TZC_ROM0_R0_START_R(crate::FieldReader); -impl TZC_ROM0_R0_START_R { - pub(crate) fn new(bits: u16) -> Self { - TZC_ROM0_R0_START_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM0_R0_START_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} #[doc = "Field `tzc_rom0_r0_end` reader - "] -pub struct TZC_ROM0_R0_END_R(crate::FieldReader); -impl TZC_ROM0_R0_END_R { - pub(crate) fn new(bits: u16) -> Self { - TZC_ROM0_R0_END_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM0_R0_END_R { - type Target = crate::FieldReader; +pub type TZC_ROM0_R0_END_R = crate::FieldReader; +#[doc = "Field `tzc_rom0_r0_start` reader - "] +pub type TZC_ROM0_R0_START_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:15"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn tzc_rom0_r0_end(&self) -> TZC_ROM0_R0_END_R { + TZC_ROM0_R0_END_R::new((self.bits & 0xffff) as u16) } -} -impl R { #[doc = "Bits 16:31"] #[inline(always)] pub fn tzc_rom0_r0_start(&self) -> TZC_ROM0_R0_START_R { TZC_ROM0_R0_START_R::new(((self.bits >> 16) & 0xffff) as u16) } - #[doc = "Bits 0:15"] - #[inline(always)] - pub fn tzc_rom0_r0_end(&self) -> TZC_ROM0_R0_END_R { - TZC_ROM0_R0_END_R::new((self.bits & 0xffff) as u16) - } } #[doc = "tzc_rom0_r0.\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 [tzc_rom0_r0](index.html) module"] pub struct TZC_ROM0_R0_SPEC; @@ -63,8 +40,5 @@ impl crate::Readable for TZC_ROM0_R0_SPEC { } #[doc = "`reset()` method sets tzc_rom0_r0 to value 0xffff"] impl crate::Resettable for TZC_ROM0_R0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xffff - } + const RESET_VALUE: Self::Ux = 0xffff; } diff --git a/src/tzc_nsec/tzc_rom0_r1.rs b/src/tzc_nsec/tzc_rom0_r1.rs index a09f826..20f59a9 100644 --- a/src/tzc_nsec/tzc_rom0_r1.rs +++ b/src/tzc_nsec/tzc_rom0_r1.rs @@ -7,50 +7,27 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `tzc_rom0_r1_start` reader - "] -pub struct TZC_ROM0_R1_START_R(crate::FieldReader); -impl TZC_ROM0_R1_START_R { - pub(crate) fn new(bits: u16) -> Self { - TZC_ROM0_R1_START_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM0_R1_START_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} #[doc = "Field `tzc_rom0_r1_end` reader - "] -pub struct TZC_ROM0_R1_END_R(crate::FieldReader); -impl TZC_ROM0_R1_END_R { - pub(crate) fn new(bits: u16) -> Self { - TZC_ROM0_R1_END_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM0_R1_END_R { - type Target = crate::FieldReader; +pub type TZC_ROM0_R1_END_R = crate::FieldReader; +#[doc = "Field `tzc_rom0_r1_start` reader - "] +pub type TZC_ROM0_R1_START_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:15"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn tzc_rom0_r1_end(&self) -> TZC_ROM0_R1_END_R { + TZC_ROM0_R1_END_R::new((self.bits & 0xffff) as u16) } -} -impl R { #[doc = "Bits 16:31"] #[inline(always)] pub fn tzc_rom0_r1_start(&self) -> TZC_ROM0_R1_START_R { TZC_ROM0_R1_START_R::new(((self.bits >> 16) & 0xffff) as u16) } - #[doc = "Bits 0:15"] - #[inline(always)] - pub fn tzc_rom0_r1_end(&self) -> TZC_ROM0_R1_END_R { - TZC_ROM0_R1_END_R::new((self.bits & 0xffff) as u16) - } } #[doc = "tzc_rom0_r1.\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 [tzc_rom0_r1](index.html) module"] pub struct TZC_ROM0_R1_SPEC; @@ -63,8 +40,5 @@ impl crate::Readable for TZC_ROM0_R1_SPEC { } #[doc = "`reset()` method sets tzc_rom0_r1 to value 0xffff"] impl crate::Resettable for TZC_ROM0_R1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xffff - } + const RESET_VALUE: Self::Ux = 0xffff; } diff --git a/src/tzc_nsec/tzc_rom1_r0.rs b/src/tzc_nsec/tzc_rom1_r0.rs index db8d11c..d00589f 100644 --- a/src/tzc_nsec/tzc_rom1_r0.rs +++ b/src/tzc_nsec/tzc_rom1_r0.rs @@ -7,50 +7,27 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `tzc_rom1_r0_start` reader - "] -pub struct TZC_ROM1_R0_START_R(crate::FieldReader); -impl TZC_ROM1_R0_START_R { - pub(crate) fn new(bits: u16) -> Self { - TZC_ROM1_R0_START_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM1_R0_START_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} #[doc = "Field `tzc_rom1_r0_end` reader - "] -pub struct TZC_ROM1_R0_END_R(crate::FieldReader); -impl TZC_ROM1_R0_END_R { - pub(crate) fn new(bits: u16) -> Self { - TZC_ROM1_R0_END_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM1_R0_END_R { - type Target = crate::FieldReader; +pub type TZC_ROM1_R0_END_R = crate::FieldReader; +#[doc = "Field `tzc_rom1_r0_start` reader - "] +pub type TZC_ROM1_R0_START_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:15"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn tzc_rom1_r0_end(&self) -> TZC_ROM1_R0_END_R { + TZC_ROM1_R0_END_R::new((self.bits & 0xffff) as u16) } -} -impl R { #[doc = "Bits 16:31"] #[inline(always)] pub fn tzc_rom1_r0_start(&self) -> TZC_ROM1_R0_START_R { TZC_ROM1_R0_START_R::new(((self.bits >> 16) & 0xffff) as u16) } - #[doc = "Bits 0:15"] - #[inline(always)] - pub fn tzc_rom1_r0_end(&self) -> TZC_ROM1_R0_END_R { - TZC_ROM1_R0_END_R::new((self.bits & 0xffff) as u16) - } } #[doc = "tzc_rom1_r0.\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 [tzc_rom1_r0](index.html) module"] pub struct TZC_ROM1_R0_SPEC; @@ -63,8 +40,5 @@ impl crate::Readable for TZC_ROM1_R0_SPEC { } #[doc = "`reset()` method sets tzc_rom1_r0 to value 0xffff"] impl crate::Resettable for TZC_ROM1_R0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xffff - } + const RESET_VALUE: Self::Ux = 0xffff; } diff --git a/src/tzc_nsec/tzc_rom1_r1.rs b/src/tzc_nsec/tzc_rom1_r1.rs index 463c060..ecd6abc 100644 --- a/src/tzc_nsec/tzc_rom1_r1.rs +++ b/src/tzc_nsec/tzc_rom1_r1.rs @@ -7,50 +7,27 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `tzc_rom1_r1_start` reader - "] -pub struct TZC_ROM1_R1_START_R(crate::FieldReader); -impl TZC_ROM1_R1_START_R { - pub(crate) fn new(bits: u16) -> Self { - TZC_ROM1_R1_START_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM1_R1_START_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} #[doc = "Field `tzc_rom1_r1_end` reader - "] -pub struct TZC_ROM1_R1_END_R(crate::FieldReader); -impl TZC_ROM1_R1_END_R { - pub(crate) fn new(bits: u16) -> Self { - TZC_ROM1_R1_END_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM1_R1_END_R { - type Target = crate::FieldReader; +pub type TZC_ROM1_R1_END_R = crate::FieldReader; +#[doc = "Field `tzc_rom1_r1_start` reader - "] +pub type TZC_ROM1_R1_START_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:15"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn tzc_rom1_r1_end(&self) -> TZC_ROM1_R1_END_R { + TZC_ROM1_R1_END_R::new((self.bits & 0xffff) as u16) } -} -impl R { #[doc = "Bits 16:31"] #[inline(always)] pub fn tzc_rom1_r1_start(&self) -> TZC_ROM1_R1_START_R { TZC_ROM1_R1_START_R::new(((self.bits >> 16) & 0xffff) as u16) } - #[doc = "Bits 0:15"] - #[inline(always)] - pub fn tzc_rom1_r1_end(&self) -> TZC_ROM1_R1_END_R { - TZC_ROM1_R1_END_R::new((self.bits & 0xffff) as u16) - } } #[doc = "tzc_rom1_r1.\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 [tzc_rom1_r1](index.html) module"] pub struct TZC_ROM1_R1_SPEC; @@ -63,8 +40,5 @@ impl crate::Readable for TZC_ROM1_R1_SPEC { } #[doc = "`reset()` method sets tzc_rom1_r1 to value 0xffff"] impl crate::Resettable for TZC_ROM1_R1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xffff - } + const RESET_VALUE: Self::Ux = 0xffff; } diff --git a/src/tzc_nsec/tzc_rom_ctrl.rs b/src/tzc_nsec/tzc_rom_ctrl.rs index d93319f..961eaef 100644 --- a/src/tzc_nsec/tzc_rom_ctrl.rs +++ b/src/tzc_nsec/tzc_rom_ctrl.rs @@ -7,334 +7,131 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `tzc_sboot_done` reader - "] -pub struct TZC_SBOOT_DONE_R(crate::FieldReader); -impl TZC_SBOOT_DONE_R { - pub(crate) fn new(bits: u8) -> Self { - TZC_SBOOT_DONE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_SBOOT_DONE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_rom1_r1_lock` reader - "] -pub struct TZC_ROM1_R1_LOCK_R(crate::FieldReader); -impl TZC_ROM1_R1_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_ROM1_R1_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM1_R1_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_rom1_r0_lock` reader - "] -pub struct TZC_ROM1_R0_LOCK_R(crate::FieldReader); -impl TZC_ROM1_R0_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_ROM1_R0_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM1_R0_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_rom0_r1_lock` reader - "] -pub struct TZC_ROM0_R1_LOCK_R(crate::FieldReader); -impl TZC_ROM0_R1_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_ROM0_R1_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM0_R1_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_rom0_r0_lock` reader - "] -pub struct TZC_ROM0_R0_LOCK_R(crate::FieldReader); -impl TZC_ROM0_R0_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_ROM0_R0_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM0_R0_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_rom1_r1_en` reader - "] -pub struct TZC_ROM1_R1_EN_R(crate::FieldReader); -impl TZC_ROM1_R1_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_ROM1_R1_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM1_R1_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_rom1_r0_en` reader - "] -pub struct TZC_ROM1_R0_EN_R(crate::FieldReader); -impl TZC_ROM1_R0_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_ROM1_R0_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM1_R0_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_rom0_r1_en` reader - "] -pub struct TZC_ROM0_R1_EN_R(crate::FieldReader); -impl TZC_ROM0_R1_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_ROM0_R1_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM0_R1_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_rom0_r0_en` reader - "] -pub struct TZC_ROM0_R0_EN_R(crate::FieldReader); -impl TZC_ROM0_R0_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_ROM0_R0_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM0_R0_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_rom1_r1_id1_en` reader - "] -pub struct TZC_ROM1_R1_ID1_EN_R(crate::FieldReader); -impl TZC_ROM1_R1_ID1_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_ROM1_R1_ID1_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM1_R1_ID1_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_rom1_r0_id1_en` reader - "] -pub struct TZC_ROM1_R0_ID1_EN_R(crate::FieldReader); -impl TZC_ROM1_R0_ID1_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_ROM1_R0_ID1_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM1_R0_ID1_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_rom0_r1_id1_en` reader - "] -pub struct TZC_ROM0_R1_ID1_EN_R(crate::FieldReader); -impl TZC_ROM0_R1_ID1_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_ROM0_R1_ID1_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM0_R1_ID1_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_rom0_r0_id1_en` reader - "] -pub struct TZC_ROM0_R0_ID1_EN_R(crate::FieldReader); -impl TZC_ROM0_R0_ID1_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_ROM0_R0_ID1_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM0_R0_ID1_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_rom1_r1_id0_en` reader - "] -pub struct TZC_ROM1_R1_ID0_EN_R(crate::FieldReader); -impl TZC_ROM1_R1_ID0_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_ROM1_R1_ID0_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM1_R1_ID0_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_rom1_r0_id0_en` reader - "] -pub struct TZC_ROM1_R0_ID0_EN_R(crate::FieldReader); -impl TZC_ROM1_R0_ID0_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_ROM1_R0_ID0_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM1_R0_ID0_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_rom0_r1_id0_en` reader - "] -pub struct TZC_ROM0_R1_ID0_EN_R(crate::FieldReader); -impl TZC_ROM0_R1_ID0_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_ROM0_R1_ID0_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM0_R1_ID0_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} #[doc = "Field `tzc_rom0_r0_id0_en` reader - "] -pub struct TZC_ROM0_R0_ID0_EN_R(crate::FieldReader); -impl TZC_ROM0_R0_ID0_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_ROM0_R0_ID0_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM0_R0_ID0_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TZC_ROM0_R0_ID0_EN_R = crate::BitReader; +#[doc = "Field `tzc_rom0_r1_id0_en` reader - "] +pub type TZC_ROM0_R1_ID0_EN_R = crate::BitReader; +#[doc = "Field `tzc_rom1_r0_id0_en` reader - "] +pub type TZC_ROM1_R0_ID0_EN_R = crate::BitReader; +#[doc = "Field `tzc_rom1_r1_id0_en` reader - "] +pub type TZC_ROM1_R1_ID0_EN_R = crate::BitReader; +#[doc = "Field `tzc_rom0_r0_id1_en` reader - "] +pub type TZC_ROM0_R0_ID1_EN_R = crate::BitReader; +#[doc = "Field `tzc_rom0_r1_id1_en` reader - "] +pub type TZC_ROM0_R1_ID1_EN_R = crate::BitReader; +#[doc = "Field `tzc_rom1_r0_id1_en` reader - "] +pub type TZC_ROM1_R0_ID1_EN_R = crate::BitReader; +#[doc = "Field `tzc_rom1_r1_id1_en` reader - "] +pub type TZC_ROM1_R1_ID1_EN_R = crate::BitReader; +#[doc = "Field `tzc_rom0_r0_en` reader - "] +pub type TZC_ROM0_R0_EN_R = crate::BitReader; +#[doc = "Field `tzc_rom0_r1_en` reader - "] +pub type TZC_ROM0_R1_EN_R = crate::BitReader; +#[doc = "Field `tzc_rom1_r0_en` reader - "] +pub type TZC_ROM1_R0_EN_R = crate::BitReader; +#[doc = "Field `tzc_rom1_r1_en` reader - "] +pub type TZC_ROM1_R1_EN_R = crate::BitReader; +#[doc = "Field `tzc_rom0_r0_lock` reader - "] +pub type TZC_ROM0_R0_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_rom0_r1_lock` reader - "] +pub type TZC_ROM0_R1_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_rom1_r0_lock` reader - "] +pub type TZC_ROM1_R0_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_rom1_r1_lock` reader - "] +pub type TZC_ROM1_R1_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_sboot_done` reader - "] +pub type TZC_SBOOT_DONE_R = crate::FieldReader; impl R { - #[doc = "Bits 28:31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn tzc_sboot_done(&self) -> TZC_SBOOT_DONE_R { - TZC_SBOOT_DONE_R::new(((self.bits >> 28) & 0x0f) as u8) + pub fn tzc_rom0_r0_id0_en(&self) -> TZC_ROM0_R0_ID0_EN_R { + TZC_ROM0_R0_ID0_EN_R::new((self.bits & 1) != 0) } - #[doc = "Bit 27"] + #[doc = "Bit 1"] #[inline(always)] - pub fn tzc_rom1_r1_lock(&self) -> TZC_ROM1_R1_LOCK_R { - TZC_ROM1_R1_LOCK_R::new(((self.bits >> 27) & 0x01) != 0) + pub fn tzc_rom0_r1_id0_en(&self) -> TZC_ROM0_R1_ID0_EN_R { + TZC_ROM0_R1_ID0_EN_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 26"] + #[doc = "Bit 2"] #[inline(always)] - pub fn tzc_rom1_r0_lock(&self) -> TZC_ROM1_R0_LOCK_R { - TZC_ROM1_R0_LOCK_R::new(((self.bits >> 26) & 0x01) != 0) + pub fn tzc_rom1_r0_id0_en(&self) -> TZC_ROM1_R0_ID0_EN_R { + TZC_ROM1_R0_ID0_EN_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 25"] + #[doc = "Bit 3"] #[inline(always)] - pub fn tzc_rom0_r1_lock(&self) -> TZC_ROM0_R1_LOCK_R { - TZC_ROM0_R1_LOCK_R::new(((self.bits >> 25) & 0x01) != 0) + pub fn tzc_rom1_r1_id0_en(&self) -> TZC_ROM1_R1_ID0_EN_R { + TZC_ROM1_R1_ID0_EN_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bit 24"] + #[doc = "Bit 8"] #[inline(always)] - pub fn tzc_rom0_r0_lock(&self) -> TZC_ROM0_R0_LOCK_R { - TZC_ROM0_R0_LOCK_R::new(((self.bits >> 24) & 0x01) != 0) + pub fn tzc_rom0_r0_id1_en(&self) -> TZC_ROM0_R0_ID1_EN_R { + TZC_ROM0_R0_ID1_EN_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bit 19"] + #[doc = "Bit 9"] #[inline(always)] - pub fn tzc_rom1_r1_en(&self) -> TZC_ROM1_R1_EN_R { - TZC_ROM1_R1_EN_R::new(((self.bits >> 19) & 0x01) != 0) + pub fn tzc_rom0_r1_id1_en(&self) -> TZC_ROM0_R1_ID1_EN_R { + TZC_ROM0_R1_ID1_EN_R::new(((self.bits >> 9) & 1) != 0) } - #[doc = "Bit 18"] + #[doc = "Bit 10"] #[inline(always)] - pub fn tzc_rom1_r0_en(&self) -> TZC_ROM1_R0_EN_R { - TZC_ROM1_R0_EN_R::new(((self.bits >> 18) & 0x01) != 0) + pub fn tzc_rom1_r0_id1_en(&self) -> TZC_ROM1_R0_ID1_EN_R { + TZC_ROM1_R0_ID1_EN_R::new(((self.bits >> 10) & 1) != 0) } - #[doc = "Bit 17"] + #[doc = "Bit 11"] #[inline(always)] - pub fn tzc_rom0_r1_en(&self) -> TZC_ROM0_R1_EN_R { - TZC_ROM0_R1_EN_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn tzc_rom1_r1_id1_en(&self) -> TZC_ROM1_R1_ID1_EN_R { + TZC_ROM1_R1_ID1_EN_R::new(((self.bits >> 11) & 1) != 0) } #[doc = "Bit 16"] #[inline(always)] pub fn tzc_rom0_r0_en(&self) -> TZC_ROM0_R0_EN_R { - TZC_ROM0_R0_EN_R::new(((self.bits >> 16) & 0x01) != 0) + TZC_ROM0_R0_EN_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 11"] + #[doc = "Bit 17"] #[inline(always)] - pub fn tzc_rom1_r1_id1_en(&self) -> TZC_ROM1_R1_ID1_EN_R { - TZC_ROM1_R1_ID1_EN_R::new(((self.bits >> 11) & 0x01) != 0) + pub fn tzc_rom0_r1_en(&self) -> TZC_ROM0_R1_EN_R { + TZC_ROM0_R1_EN_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bit 10"] + #[doc = "Bit 18"] #[inline(always)] - pub fn tzc_rom1_r0_id1_en(&self) -> TZC_ROM1_R0_ID1_EN_R { - TZC_ROM1_R0_ID1_EN_R::new(((self.bits >> 10) & 0x01) != 0) + pub fn tzc_rom1_r0_en(&self) -> TZC_ROM1_R0_EN_R { + TZC_ROM1_R0_EN_R::new(((self.bits >> 18) & 1) != 0) } - #[doc = "Bit 9"] + #[doc = "Bit 19"] #[inline(always)] - pub fn tzc_rom0_r1_id1_en(&self) -> TZC_ROM0_R1_ID1_EN_R { - TZC_ROM0_R1_ID1_EN_R::new(((self.bits >> 9) & 0x01) != 0) + pub fn tzc_rom1_r1_en(&self) -> TZC_ROM1_R1_EN_R { + TZC_ROM1_R1_EN_R::new(((self.bits >> 19) & 1) != 0) } - #[doc = "Bit 8"] + #[doc = "Bit 24"] #[inline(always)] - pub fn tzc_rom0_r0_id1_en(&self) -> TZC_ROM0_R0_ID1_EN_R { - TZC_ROM0_R0_ID1_EN_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn tzc_rom0_r0_lock(&self) -> TZC_ROM0_R0_LOCK_R { + TZC_ROM0_R0_LOCK_R::new(((self.bits >> 24) & 1) != 0) } - #[doc = "Bit 3"] + #[doc = "Bit 25"] #[inline(always)] - pub fn tzc_rom1_r1_id0_en(&self) -> TZC_ROM1_R1_ID0_EN_R { - TZC_ROM1_R1_ID0_EN_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn tzc_rom0_r1_lock(&self) -> TZC_ROM0_R1_LOCK_R { + TZC_ROM0_R1_LOCK_R::new(((self.bits >> 25) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bit 26"] #[inline(always)] - pub fn tzc_rom1_r0_id0_en(&self) -> TZC_ROM1_R0_ID0_EN_R { - TZC_ROM1_R0_ID0_EN_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn tzc_rom1_r0_lock(&self) -> TZC_ROM1_R0_LOCK_R { + TZC_ROM1_R0_LOCK_R::new(((self.bits >> 26) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 27"] #[inline(always)] - pub fn tzc_rom0_r1_id0_en(&self) -> TZC_ROM0_R1_ID0_EN_R { - TZC_ROM0_R1_ID0_EN_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn tzc_rom1_r1_lock(&self) -> TZC_ROM1_R1_LOCK_R { + TZC_ROM1_R1_LOCK_R::new(((self.bits >> 27) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bits 28:31"] #[inline(always)] - pub fn tzc_rom0_r0_id0_en(&self) -> TZC_ROM0_R0_ID0_EN_R { - TZC_ROM0_R0_ID0_EN_R::new((self.bits & 0x01) != 0) + pub fn tzc_sboot_done(&self) -> TZC_SBOOT_DONE_R { + TZC_SBOOT_DONE_R::new(((self.bits >> 28) & 0x0f) as u8) } } #[doc = "tzc_rom_ctrl.\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 [tzc_rom_ctrl](index.html) module"] @@ -348,8 +145,5 @@ impl crate::Readable for TZC_ROM_CTRL_SPEC { } #[doc = "`reset()` method sets tzc_rom_ctrl to value 0x0f0f"] impl crate::Resettable for TZC_ROM_CTRL_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0f0f - } + const RESET_VALUE: Self::Ux = 0x0f0f; } diff --git a/src/tzc_sec.rs b/src/tzc_sec.rs index 2781967..c746c07 100644 --- a/src/tzc_sec.rs +++ b/src/tzc_sec.rs @@ -1,35 +1,35 @@ #[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { - _reserved0: [u8; 64usize], + _reserved0: [u8; 0x40], #[doc = "0x40 - tzc_rom_ctrl."] - pub tzc_rom_ctrl: crate::Reg, + pub tzc_rom_ctrl: TZC_ROM_CTRL, #[doc = "0x44 - tzc_rom0_r0."] - pub tzc_rom0_r0: crate::Reg, + pub tzc_rom0_r0: TZC_ROM0_R0, #[doc = "0x48 - tzc_rom0_r1."] - pub tzc_rom0_r1: crate::Reg, + pub tzc_rom0_r1: TZC_ROM0_R1, #[doc = "0x4c - tzc_rom1_r0."] - pub tzc_rom1_r0: crate::Reg, + pub tzc_rom1_r0: TZC_ROM1_R0, #[doc = "0x50 - tzc_rom1_r1."] - pub tzc_rom1_r1: crate::Reg, + pub tzc_rom1_r1: TZC_ROM1_R1, } -#[doc = "tzc_rom_ctrl register accessor: an alias for `Reg`"] +#[doc = "tzc_rom_ctrl (rw) register accessor: an alias for `Reg`"] pub type TZC_ROM_CTRL = crate::Reg; #[doc = "tzc_rom_ctrl."] pub mod tzc_rom_ctrl; -#[doc = "tzc_rom0_r0 register accessor: an alias for `Reg`"] +#[doc = "tzc_rom0_r0 (rw) register accessor: an alias for `Reg`"] pub type TZC_ROM0_R0 = crate::Reg; #[doc = "tzc_rom0_r0."] pub mod tzc_rom0_r0; -#[doc = "tzc_rom0_r1 register accessor: an alias for `Reg`"] +#[doc = "tzc_rom0_r1 (rw) register accessor: an alias for `Reg`"] pub type TZC_ROM0_R1 = crate::Reg; #[doc = "tzc_rom0_r1."] pub mod tzc_rom0_r1; -#[doc = "tzc_rom1_r0 register accessor: an alias for `Reg`"] +#[doc = "tzc_rom1_r0 (rw) register accessor: an alias for `Reg`"] pub type TZC_ROM1_R0 = crate::Reg; #[doc = "tzc_rom1_r0."] pub mod tzc_rom1_r0; -#[doc = "tzc_rom1_r1 register accessor: an alias for `Reg`"] +#[doc = "tzc_rom1_r1 (rw) register accessor: an alias for `Reg`"] pub type TZC_ROM1_R1 = crate::Reg; #[doc = "tzc_rom1_r1."] pub mod tzc_rom1_r1; diff --git a/src/tzc_sec/tzc_rom0_r0.rs b/src/tzc_sec/tzc_rom0_r0.rs index 5b24675..e76ecaa 100644 --- a/src/tzc_sec/tzc_rom0_r0.rs +++ b/src/tzc_sec/tzc_rom0_r0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,87 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `tzc_rom0_r0_start` reader - "] -pub struct TZC_ROM0_R0_START_R(crate::FieldReader); -impl TZC_ROM0_R0_START_R { - pub(crate) fn new(bits: u16) -> Self { - TZC_ROM0_R0_START_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM0_R0_START_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_rom0_r0_start` writer - "] -pub struct TZC_ROM0_R0_START_W<'a> { - w: &'a mut W, -} -impl<'a> TZC_ROM0_R0_START_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xffff << 16)) | ((value as u32 & 0xffff) << 16); - self.w - } -} #[doc = "Field `tzc_rom0_r0_end` reader - "] -pub struct TZC_ROM0_R0_END_R(crate::FieldReader); -impl TZC_ROM0_R0_END_R { - pub(crate) fn new(bits: u16) -> Self { - TZC_ROM0_R0_END_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM0_R0_END_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TZC_ROM0_R0_END_R = crate::FieldReader; #[doc = "Field `tzc_rom0_r0_end` writer - "] -pub struct TZC_ROM0_R0_END_W<'a> { - w: &'a mut W, -} -impl<'a> TZC_ROM0_R0_END_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type TZC_ROM0_R0_END_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TZC_ROM0_R0_SPEC, u16, u16, 16, O>; +#[doc = "Field `tzc_rom0_r0_start` reader - "] +pub type TZC_ROM0_R0_START_R = crate::FieldReader; +#[doc = "Field `tzc_rom0_r0_start` writer - "] +pub type TZC_ROM0_R0_START_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TZC_ROM0_R0_SPEC, u16, u16, 16, O>; +impl R { + #[doc = "Bits 0:15"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w + pub fn tzc_rom0_r0_end(&self) -> TZC_ROM0_R0_END_R { + TZC_ROM0_R0_END_R::new((self.bits & 0xffff) as u16) } -} -impl R { #[doc = "Bits 16:31"] #[inline(always)] pub fn tzc_rom0_r0_start(&self) -> TZC_ROM0_R0_START_R { TZC_ROM0_R0_START_R::new(((self.bits >> 16) & 0xffff) as u16) } - #[doc = "Bits 0:15"] - #[inline(always)] - pub fn tzc_rom0_r0_end(&self) -> TZC_ROM0_R0_END_R { - TZC_ROM0_R0_END_R::new((self.bits & 0xffff) as u16) - } } impl W { - #[doc = "Bits 16:31"] + #[doc = "Bits 0:15"] #[inline(always)] - pub fn tzc_rom0_r0_start(&mut self) -> TZC_ROM0_R0_START_W { - TZC_ROM0_R0_START_W { w: self } + #[must_use] + pub fn tzc_rom0_r0_end(&mut self) -> TZC_ROM0_R0_END_W<0> { + TZC_ROM0_R0_END_W::new(self) } - #[doc = "Bits 0:15"] + #[doc = "Bits 16:31"] #[inline(always)] - pub fn tzc_rom0_r0_end(&mut self) -> TZC_ROM0_R0_END_W { - TZC_ROM0_R0_END_W { w: self } + #[must_use] + pub fn tzc_rom0_r0_start(&mut self) -> TZC_ROM0_R0_START_W<16> { + TZC_ROM0_R0_START_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -125,11 +88,10 @@ impl crate::Readable for TZC_ROM0_R0_SPEC { #[doc = "`write(|w| ..)` method takes [tzc_rom0_r0::W](W) writer structure"] impl crate::Writable for TZC_ROM0_R0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets tzc_rom0_r0 to value 0xffff"] impl crate::Resettable for TZC_ROM0_R0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xffff - } + const RESET_VALUE: Self::Ux = 0xffff; } diff --git a/src/tzc_sec/tzc_rom0_r1.rs b/src/tzc_sec/tzc_rom0_r1.rs index 84c419d..3cc70f1 100644 --- a/src/tzc_sec/tzc_rom0_r1.rs +++ b/src/tzc_sec/tzc_rom0_r1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,87 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `tzc_rom0_r1_start` reader - "] -pub struct TZC_ROM0_R1_START_R(crate::FieldReader); -impl TZC_ROM0_R1_START_R { - pub(crate) fn new(bits: u16) -> Self { - TZC_ROM0_R1_START_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM0_R1_START_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_rom0_r1_start` writer - "] -pub struct TZC_ROM0_R1_START_W<'a> { - w: &'a mut W, -} -impl<'a> TZC_ROM0_R1_START_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xffff << 16)) | ((value as u32 & 0xffff) << 16); - self.w - } -} #[doc = "Field `tzc_rom0_r1_end` reader - "] -pub struct TZC_ROM0_R1_END_R(crate::FieldReader); -impl TZC_ROM0_R1_END_R { - pub(crate) fn new(bits: u16) -> Self { - TZC_ROM0_R1_END_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM0_R1_END_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TZC_ROM0_R1_END_R = crate::FieldReader; #[doc = "Field `tzc_rom0_r1_end` writer - "] -pub struct TZC_ROM0_R1_END_W<'a> { - w: &'a mut W, -} -impl<'a> TZC_ROM0_R1_END_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type TZC_ROM0_R1_END_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TZC_ROM0_R1_SPEC, u16, u16, 16, O>; +#[doc = "Field `tzc_rom0_r1_start` reader - "] +pub type TZC_ROM0_R1_START_R = crate::FieldReader; +#[doc = "Field `tzc_rom0_r1_start` writer - "] +pub type TZC_ROM0_R1_START_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TZC_ROM0_R1_SPEC, u16, u16, 16, O>; +impl R { + #[doc = "Bits 0:15"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w + pub fn tzc_rom0_r1_end(&self) -> TZC_ROM0_R1_END_R { + TZC_ROM0_R1_END_R::new((self.bits & 0xffff) as u16) } -} -impl R { #[doc = "Bits 16:31"] #[inline(always)] pub fn tzc_rom0_r1_start(&self) -> TZC_ROM0_R1_START_R { TZC_ROM0_R1_START_R::new(((self.bits >> 16) & 0xffff) as u16) } - #[doc = "Bits 0:15"] - #[inline(always)] - pub fn tzc_rom0_r1_end(&self) -> TZC_ROM0_R1_END_R { - TZC_ROM0_R1_END_R::new((self.bits & 0xffff) as u16) - } } impl W { - #[doc = "Bits 16:31"] + #[doc = "Bits 0:15"] #[inline(always)] - pub fn tzc_rom0_r1_start(&mut self) -> TZC_ROM0_R1_START_W { - TZC_ROM0_R1_START_W { w: self } + #[must_use] + pub fn tzc_rom0_r1_end(&mut self) -> TZC_ROM0_R1_END_W<0> { + TZC_ROM0_R1_END_W::new(self) } - #[doc = "Bits 0:15"] + #[doc = "Bits 16:31"] #[inline(always)] - pub fn tzc_rom0_r1_end(&mut self) -> TZC_ROM0_R1_END_W { - TZC_ROM0_R1_END_W { w: self } + #[must_use] + pub fn tzc_rom0_r1_start(&mut self) -> TZC_ROM0_R1_START_W<16> { + TZC_ROM0_R1_START_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -125,11 +88,10 @@ impl crate::Readable for TZC_ROM0_R1_SPEC { #[doc = "`write(|w| ..)` method takes [tzc_rom0_r1::W](W) writer structure"] impl crate::Writable for TZC_ROM0_R1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets tzc_rom0_r1 to value 0xffff"] impl crate::Resettable for TZC_ROM0_R1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xffff - } + const RESET_VALUE: Self::Ux = 0xffff; } diff --git a/src/tzc_sec/tzc_rom1_r0.rs b/src/tzc_sec/tzc_rom1_r0.rs index a6c4d18..44aed55 100644 --- a/src/tzc_sec/tzc_rom1_r0.rs +++ b/src/tzc_sec/tzc_rom1_r0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,87 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `tzc_rom1_r0_start` reader - "] -pub struct TZC_ROM1_R0_START_R(crate::FieldReader); -impl TZC_ROM1_R0_START_R { - pub(crate) fn new(bits: u16) -> Self { - TZC_ROM1_R0_START_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM1_R0_START_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_rom1_r0_start` writer - "] -pub struct TZC_ROM1_R0_START_W<'a> { - w: &'a mut W, -} -impl<'a> TZC_ROM1_R0_START_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xffff << 16)) | ((value as u32 & 0xffff) << 16); - self.w - } -} #[doc = "Field `tzc_rom1_r0_end` reader - "] -pub struct TZC_ROM1_R0_END_R(crate::FieldReader); -impl TZC_ROM1_R0_END_R { - pub(crate) fn new(bits: u16) -> Self { - TZC_ROM1_R0_END_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM1_R0_END_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TZC_ROM1_R0_END_R = crate::FieldReader; #[doc = "Field `tzc_rom1_r0_end` writer - "] -pub struct TZC_ROM1_R0_END_W<'a> { - w: &'a mut W, -} -impl<'a> TZC_ROM1_R0_END_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type TZC_ROM1_R0_END_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TZC_ROM1_R0_SPEC, u16, u16, 16, O>; +#[doc = "Field `tzc_rom1_r0_start` reader - "] +pub type TZC_ROM1_R0_START_R = crate::FieldReader; +#[doc = "Field `tzc_rom1_r0_start` writer - "] +pub type TZC_ROM1_R0_START_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TZC_ROM1_R0_SPEC, u16, u16, 16, O>; +impl R { + #[doc = "Bits 0:15"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w + pub fn tzc_rom1_r0_end(&self) -> TZC_ROM1_R0_END_R { + TZC_ROM1_R0_END_R::new((self.bits & 0xffff) as u16) } -} -impl R { #[doc = "Bits 16:31"] #[inline(always)] pub fn tzc_rom1_r0_start(&self) -> TZC_ROM1_R0_START_R { TZC_ROM1_R0_START_R::new(((self.bits >> 16) & 0xffff) as u16) } - #[doc = "Bits 0:15"] - #[inline(always)] - pub fn tzc_rom1_r0_end(&self) -> TZC_ROM1_R0_END_R { - TZC_ROM1_R0_END_R::new((self.bits & 0xffff) as u16) - } } impl W { - #[doc = "Bits 16:31"] + #[doc = "Bits 0:15"] #[inline(always)] - pub fn tzc_rom1_r0_start(&mut self) -> TZC_ROM1_R0_START_W { - TZC_ROM1_R0_START_W { w: self } + #[must_use] + pub fn tzc_rom1_r0_end(&mut self) -> TZC_ROM1_R0_END_W<0> { + TZC_ROM1_R0_END_W::new(self) } - #[doc = "Bits 0:15"] + #[doc = "Bits 16:31"] #[inline(always)] - pub fn tzc_rom1_r0_end(&mut self) -> TZC_ROM1_R0_END_W { - TZC_ROM1_R0_END_W { w: self } + #[must_use] + pub fn tzc_rom1_r0_start(&mut self) -> TZC_ROM1_R0_START_W<16> { + TZC_ROM1_R0_START_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -125,11 +88,10 @@ impl crate::Readable for TZC_ROM1_R0_SPEC { #[doc = "`write(|w| ..)` method takes [tzc_rom1_r0::W](W) writer structure"] impl crate::Writable for TZC_ROM1_R0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets tzc_rom1_r0 to value 0xffff"] impl crate::Resettable for TZC_ROM1_R0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xffff - } + const RESET_VALUE: Self::Ux = 0xffff; } diff --git a/src/tzc_sec/tzc_rom1_r1.rs b/src/tzc_sec/tzc_rom1_r1.rs index 98078b2..9a52e5c 100644 --- a/src/tzc_sec/tzc_rom1_r1.rs +++ b/src/tzc_sec/tzc_rom1_r1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,87 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `tzc_rom1_r1_start` reader - "] -pub struct TZC_ROM1_R1_START_R(crate::FieldReader); -impl TZC_ROM1_R1_START_R { - pub(crate) fn new(bits: u16) -> Self { - TZC_ROM1_R1_START_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM1_R1_START_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_rom1_r1_start` writer - "] -pub struct TZC_ROM1_R1_START_W<'a> { - w: &'a mut W, -} -impl<'a> TZC_ROM1_R1_START_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xffff << 16)) | ((value as u32 & 0xffff) << 16); - self.w - } -} #[doc = "Field `tzc_rom1_r1_end` reader - "] -pub struct TZC_ROM1_R1_END_R(crate::FieldReader); -impl TZC_ROM1_R1_END_R { - pub(crate) fn new(bits: u16) -> Self { - TZC_ROM1_R1_END_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM1_R1_END_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TZC_ROM1_R1_END_R = crate::FieldReader; #[doc = "Field `tzc_rom1_r1_end` writer - "] -pub struct TZC_ROM1_R1_END_W<'a> { - w: &'a mut W, -} -impl<'a> TZC_ROM1_R1_END_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type TZC_ROM1_R1_END_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TZC_ROM1_R1_SPEC, u16, u16, 16, O>; +#[doc = "Field `tzc_rom1_r1_start` reader - "] +pub type TZC_ROM1_R1_START_R = crate::FieldReader; +#[doc = "Field `tzc_rom1_r1_start` writer - "] +pub type TZC_ROM1_R1_START_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TZC_ROM1_R1_SPEC, u16, u16, 16, O>; +impl R { + #[doc = "Bits 0:15"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w + pub fn tzc_rom1_r1_end(&self) -> TZC_ROM1_R1_END_R { + TZC_ROM1_R1_END_R::new((self.bits & 0xffff) as u16) } -} -impl R { #[doc = "Bits 16:31"] #[inline(always)] pub fn tzc_rom1_r1_start(&self) -> TZC_ROM1_R1_START_R { TZC_ROM1_R1_START_R::new(((self.bits >> 16) & 0xffff) as u16) } - #[doc = "Bits 0:15"] - #[inline(always)] - pub fn tzc_rom1_r1_end(&self) -> TZC_ROM1_R1_END_R { - TZC_ROM1_R1_END_R::new((self.bits & 0xffff) as u16) - } } impl W { - #[doc = "Bits 16:31"] + #[doc = "Bits 0:15"] #[inline(always)] - pub fn tzc_rom1_r1_start(&mut self) -> TZC_ROM1_R1_START_W { - TZC_ROM1_R1_START_W { w: self } + #[must_use] + pub fn tzc_rom1_r1_end(&mut self) -> TZC_ROM1_R1_END_W<0> { + TZC_ROM1_R1_END_W::new(self) } - #[doc = "Bits 0:15"] + #[doc = "Bits 16:31"] #[inline(always)] - pub fn tzc_rom1_r1_end(&mut self) -> TZC_ROM1_R1_END_W { - TZC_ROM1_R1_END_W { w: self } + #[must_use] + pub fn tzc_rom1_r1_start(&mut self) -> TZC_ROM1_R1_START_W<16> { + TZC_ROM1_R1_START_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -125,11 +88,10 @@ impl crate::Readable for TZC_ROM1_R1_SPEC { #[doc = "`write(|w| ..)` method takes [tzc_rom1_r1::W](W) writer structure"] impl crate::Writable for TZC_ROM1_R1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets tzc_rom1_r1 to value 0xffff"] impl crate::Resettable for TZC_ROM1_R1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xffff - } + const RESET_VALUE: Self::Ux = 0xffff; } diff --git a/src/tzc_sec/tzc_rom_ctrl.rs b/src/tzc_sec/tzc_rom_ctrl.rs index 5772b70..eb548ca 100644 --- a/src/tzc_sec/tzc_rom_ctrl.rs +++ b/src/tzc_sec/tzc_rom_ctrl.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,787 +28,285 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `tzc_sboot_done` reader - "] -pub struct TZC_SBOOT_DONE_R(crate::FieldReader); -impl TZC_SBOOT_DONE_R { - pub(crate) fn new(bits: u8) -> Self { - TZC_SBOOT_DONE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_SBOOT_DONE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_sboot_done` writer - "] -pub struct TZC_SBOOT_DONE_W<'a> { - w: &'a mut W, -} -impl<'a> TZC_SBOOT_DONE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 28)) | ((value as u32 & 0x0f) << 28); - self.w - } -} -#[doc = "Field `tzc_rom1_r1_lock` reader - "] -pub struct TZC_ROM1_R1_LOCK_R(crate::FieldReader); -impl TZC_ROM1_R1_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_ROM1_R1_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM1_R1_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_rom1_r1_lock` writer - "] -pub struct TZC_ROM1_R1_LOCK_W<'a> { - w: &'a mut W, -} -impl<'a> TZC_ROM1_R1_LOCK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 27)) | ((value as u32 & 0x01) << 27); - self.w - } -} -#[doc = "Field `tzc_rom1_r0_lock` reader - "] -pub struct TZC_ROM1_R0_LOCK_R(crate::FieldReader); -impl TZC_ROM1_R0_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_ROM1_R0_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM1_R0_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_rom1_r0_lock` writer - "] -pub struct TZC_ROM1_R0_LOCK_W<'a> { - w: &'a mut W, -} -impl<'a> TZC_ROM1_R0_LOCK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 26)) | ((value as u32 & 0x01) << 26); - self.w - } -} -#[doc = "Field `tzc_rom0_r1_lock` reader - "] -pub struct TZC_ROM0_R1_LOCK_R(crate::FieldReader); -impl TZC_ROM0_R1_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_ROM0_R1_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM0_R1_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_rom0_r1_lock` writer - "] -pub struct TZC_ROM0_R1_LOCK_W<'a> { - w: &'a mut W, -} -impl<'a> TZC_ROM0_R1_LOCK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 25)) | ((value as u32 & 0x01) << 25); - self.w - } -} -#[doc = "Field `tzc_rom0_r0_lock` reader - "] -pub struct TZC_ROM0_R0_LOCK_R(crate::FieldReader); -impl TZC_ROM0_R0_LOCK_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_ROM0_R0_LOCK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM0_R0_LOCK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_rom0_r0_lock` writer - "] -pub struct TZC_ROM0_R0_LOCK_W<'a> { - w: &'a mut W, -} -impl<'a> TZC_ROM0_R0_LOCK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24); - self.w - } -} -#[doc = "Field `tzc_rom1_r1_en` reader - "] -pub struct TZC_ROM1_R1_EN_R(crate::FieldReader); -impl TZC_ROM1_R1_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_ROM1_R1_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM1_R1_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_rom1_r1_en` writer - "] -pub struct TZC_ROM1_R1_EN_W<'a> { - w: &'a mut W, -} -impl<'a> TZC_ROM1_R1_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 19)) | ((value as u32 & 0x01) << 19); - self.w - } -} -#[doc = "Field `tzc_rom1_r0_en` reader - "] -pub struct TZC_ROM1_R0_EN_R(crate::FieldReader); -impl TZC_ROM1_R0_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_ROM1_R0_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM1_R0_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_rom1_r0_en` writer - "] -pub struct TZC_ROM1_R0_EN_W<'a> { - w: &'a mut W, -} -impl<'a> TZC_ROM1_R0_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18); - self.w - } -} -#[doc = "Field `tzc_rom0_r1_en` reader - "] -pub struct TZC_ROM0_R1_EN_R(crate::FieldReader); -impl TZC_ROM0_R1_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_ROM0_R1_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM0_R1_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_rom0_r1_en` writer - "] -pub struct TZC_ROM0_R1_EN_W<'a> { - w: &'a mut W, -} -impl<'a> TZC_ROM0_R1_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17); - self.w - } -} -#[doc = "Field `tzc_rom0_r0_en` reader - "] -pub struct TZC_ROM0_R0_EN_R(crate::FieldReader); -impl TZC_ROM0_R0_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_ROM0_R0_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM0_R0_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_rom0_r0_en` writer - "] -pub struct TZC_ROM0_R0_EN_W<'a> { - w: &'a mut W, -} -impl<'a> TZC_ROM0_R0_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16); - self.w - } -} -#[doc = "Field `tzc_rom1_r1_id1_en` reader - "] -pub struct TZC_ROM1_R1_ID1_EN_R(crate::FieldReader); -impl TZC_ROM1_R1_ID1_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_ROM1_R1_ID1_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM1_R1_ID1_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_rom1_r1_id1_en` writer - "] -pub struct TZC_ROM1_R1_ID1_EN_W<'a> { - w: &'a mut W, -} -impl<'a> TZC_ROM1_R1_ID1_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w - } -} -#[doc = "Field `tzc_rom1_r0_id1_en` reader - "] -pub struct TZC_ROM1_R0_ID1_EN_R(crate::FieldReader); -impl TZC_ROM1_R0_ID1_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_ROM1_R0_ID1_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM1_R0_ID1_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_rom1_r0_id1_en` writer - "] -pub struct TZC_ROM1_R0_ID1_EN_W<'a> { - w: &'a mut W, -} -impl<'a> TZC_ROM1_R0_ID1_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); - self.w - } -} -#[doc = "Field `tzc_rom0_r1_id1_en` reader - "] -pub struct TZC_ROM0_R1_ID1_EN_R(crate::FieldReader); -impl TZC_ROM0_R1_ID1_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_ROM0_R1_ID1_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM0_R1_ID1_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_rom0_r1_id1_en` writer - "] -pub struct TZC_ROM0_R1_ID1_EN_W<'a> { - w: &'a mut W, -} -impl<'a> TZC_ROM0_R1_ID1_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); - self.w - } -} -#[doc = "Field `tzc_rom0_r0_id1_en` reader - "] -pub struct TZC_ROM0_R0_ID1_EN_R(crate::FieldReader); -impl TZC_ROM0_R0_ID1_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_ROM0_R0_ID1_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM0_R0_ID1_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_rom0_r0_id1_en` writer - "] -pub struct TZC_ROM0_R0_ID1_EN_W<'a> { - w: &'a mut W, -} -impl<'a> TZC_ROM0_R0_ID1_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); - self.w - } -} -#[doc = "Field `tzc_rom1_r1_id0_en` reader - "] -pub struct TZC_ROM1_R1_ID0_EN_R(crate::FieldReader); -impl TZC_ROM1_R1_ID0_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_ROM1_R1_ID0_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM1_R1_ID0_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_rom1_r1_id0_en` writer - "] -pub struct TZC_ROM1_R1_ID0_EN_W<'a> { - w: &'a mut W, -} -impl<'a> TZC_ROM1_R1_ID0_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `tzc_rom1_r0_id0_en` reader - "] -pub struct TZC_ROM1_R0_ID0_EN_R(crate::FieldReader); -impl TZC_ROM1_R0_ID0_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_ROM1_R0_ID0_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM1_R0_ID0_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_rom1_r0_id0_en` writer - "] -pub struct TZC_ROM1_R0_ID0_EN_W<'a> { - w: &'a mut W, -} -impl<'a> TZC_ROM1_R0_ID0_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `tzc_rom0_r1_id0_en` reader - "] -pub struct TZC_ROM0_R1_ID0_EN_R(crate::FieldReader); -impl TZC_ROM0_R1_ID0_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_ROM0_R1_ID0_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM0_R1_ID0_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tzc_rom0_r1_id0_en` writer - "] -pub struct TZC_ROM0_R1_ID0_EN_W<'a> { - w: &'a mut W, -} -impl<'a> TZC_ROM0_R1_ID0_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `tzc_rom0_r0_id0_en` reader - "] -pub struct TZC_ROM0_R0_ID0_EN_R(crate::FieldReader); -impl TZC_ROM0_R0_ID0_EN_R { - pub(crate) fn new(bits: bool) -> Self { - TZC_ROM0_R0_ID0_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TZC_ROM0_R0_ID0_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TZC_ROM0_R0_ID0_EN_R = crate::BitReader; #[doc = "Field `tzc_rom0_r0_id0_en` writer - "] -pub struct TZC_ROM0_R0_ID0_EN_W<'a> { - w: &'a mut W, -} -impl<'a> TZC_ROM0_R0_ID0_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type TZC_ROM0_R0_ID0_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TZC_ROM_CTRL_SPEC, bool, O>; +#[doc = "Field `tzc_rom0_r1_id0_en` reader - "] +pub type TZC_ROM0_R1_ID0_EN_R = crate::BitReader; +#[doc = "Field `tzc_rom0_r1_id0_en` writer - "] +pub type TZC_ROM0_R1_ID0_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TZC_ROM_CTRL_SPEC, bool, O>; +#[doc = "Field `tzc_rom1_r0_id0_en` reader - "] +pub type TZC_ROM1_R0_ID0_EN_R = crate::BitReader; +#[doc = "Field `tzc_rom1_r0_id0_en` writer - "] +pub type TZC_ROM1_R0_ID0_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TZC_ROM_CTRL_SPEC, bool, O>; +#[doc = "Field `tzc_rom1_r1_id0_en` reader - "] +pub type TZC_ROM1_R1_ID0_EN_R = crate::BitReader; +#[doc = "Field `tzc_rom1_r1_id0_en` writer - "] +pub type TZC_ROM1_R1_ID0_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TZC_ROM_CTRL_SPEC, bool, O>; +#[doc = "Field `tzc_rom0_r0_id1_en` reader - "] +pub type TZC_ROM0_R0_ID1_EN_R = crate::BitReader; +#[doc = "Field `tzc_rom0_r0_id1_en` writer - "] +pub type TZC_ROM0_R0_ID1_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TZC_ROM_CTRL_SPEC, bool, O>; +#[doc = "Field `tzc_rom0_r1_id1_en` reader - "] +pub type TZC_ROM0_R1_ID1_EN_R = crate::BitReader; +#[doc = "Field `tzc_rom0_r1_id1_en` writer - "] +pub type TZC_ROM0_R1_ID1_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TZC_ROM_CTRL_SPEC, bool, O>; +#[doc = "Field `tzc_rom1_r0_id1_en` reader - "] +pub type TZC_ROM1_R0_ID1_EN_R = crate::BitReader; +#[doc = "Field `tzc_rom1_r0_id1_en` writer - "] +pub type TZC_ROM1_R0_ID1_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TZC_ROM_CTRL_SPEC, bool, O>; +#[doc = "Field `tzc_rom1_r1_id1_en` reader - "] +pub type TZC_ROM1_R1_ID1_EN_R = crate::BitReader; +#[doc = "Field `tzc_rom1_r1_id1_en` writer - "] +pub type TZC_ROM1_R1_ID1_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TZC_ROM_CTRL_SPEC, bool, O>; +#[doc = "Field `tzc_rom0_r0_en` reader - "] +pub type TZC_ROM0_R0_EN_R = crate::BitReader; +#[doc = "Field `tzc_rom0_r0_en` writer - "] +pub type TZC_ROM0_R0_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, TZC_ROM_CTRL_SPEC, bool, O>; +#[doc = "Field `tzc_rom0_r1_en` reader - "] +pub type TZC_ROM0_R1_EN_R = crate::BitReader; +#[doc = "Field `tzc_rom0_r1_en` writer - "] +pub type TZC_ROM0_R1_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, TZC_ROM_CTRL_SPEC, bool, O>; +#[doc = "Field `tzc_rom1_r0_en` reader - "] +pub type TZC_ROM1_R0_EN_R = crate::BitReader; +#[doc = "Field `tzc_rom1_r0_en` writer - "] +pub type TZC_ROM1_R0_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, TZC_ROM_CTRL_SPEC, bool, O>; +#[doc = "Field `tzc_rom1_r1_en` reader - "] +pub type TZC_ROM1_R1_EN_R = crate::BitReader; +#[doc = "Field `tzc_rom1_r1_en` writer - "] +pub type TZC_ROM1_R1_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, TZC_ROM_CTRL_SPEC, bool, O>; +#[doc = "Field `tzc_rom0_r0_lock` reader - "] +pub type TZC_ROM0_R0_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_rom0_r0_lock` writer - "] +pub type TZC_ROM0_R0_LOCK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TZC_ROM_CTRL_SPEC, bool, O>; +#[doc = "Field `tzc_rom0_r1_lock` reader - "] +pub type TZC_ROM0_R1_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_rom0_r1_lock` writer - "] +pub type TZC_ROM0_R1_LOCK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TZC_ROM_CTRL_SPEC, bool, O>; +#[doc = "Field `tzc_rom1_r0_lock` reader - "] +pub type TZC_ROM1_R0_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_rom1_r0_lock` writer - "] +pub type TZC_ROM1_R0_LOCK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TZC_ROM_CTRL_SPEC, bool, O>; +#[doc = "Field `tzc_rom1_r1_lock` reader - "] +pub type TZC_ROM1_R1_LOCK_R = crate::BitReader; +#[doc = "Field `tzc_rom1_r1_lock` writer - "] +pub type TZC_ROM1_R1_LOCK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, TZC_ROM_CTRL_SPEC, bool, O>; +#[doc = "Field `tzc_sboot_done` reader - "] +pub type TZC_SBOOT_DONE_R = crate::FieldReader; +#[doc = "Field `tzc_sboot_done` writer - "] +pub type TZC_SBOOT_DONE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, TZC_ROM_CTRL_SPEC, u8, u8, 4, O>; impl R { - #[doc = "Bits 28:31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn tzc_sboot_done(&self) -> TZC_SBOOT_DONE_R { - TZC_SBOOT_DONE_R::new(((self.bits >> 28) & 0x0f) as u8) + pub fn tzc_rom0_r0_id0_en(&self) -> TZC_ROM0_R0_ID0_EN_R { + TZC_ROM0_R0_ID0_EN_R::new((self.bits & 1) != 0) } - #[doc = "Bit 27"] + #[doc = "Bit 1"] #[inline(always)] - pub fn tzc_rom1_r1_lock(&self) -> TZC_ROM1_R1_LOCK_R { - TZC_ROM1_R1_LOCK_R::new(((self.bits >> 27) & 0x01) != 0) + pub fn tzc_rom0_r1_id0_en(&self) -> TZC_ROM0_R1_ID0_EN_R { + TZC_ROM0_R1_ID0_EN_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 26"] + #[doc = "Bit 2"] #[inline(always)] - pub fn tzc_rom1_r0_lock(&self) -> TZC_ROM1_R0_LOCK_R { - TZC_ROM1_R0_LOCK_R::new(((self.bits >> 26) & 0x01) != 0) + pub fn tzc_rom1_r0_id0_en(&self) -> TZC_ROM1_R0_ID0_EN_R { + TZC_ROM1_R0_ID0_EN_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 25"] + #[doc = "Bit 3"] #[inline(always)] - pub fn tzc_rom0_r1_lock(&self) -> TZC_ROM0_R1_LOCK_R { - TZC_ROM0_R1_LOCK_R::new(((self.bits >> 25) & 0x01) != 0) + pub fn tzc_rom1_r1_id0_en(&self) -> TZC_ROM1_R1_ID0_EN_R { + TZC_ROM1_R1_ID0_EN_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = "Bit 24"] + #[doc = "Bit 8"] #[inline(always)] - pub fn tzc_rom0_r0_lock(&self) -> TZC_ROM0_R0_LOCK_R { - TZC_ROM0_R0_LOCK_R::new(((self.bits >> 24) & 0x01) != 0) + pub fn tzc_rom0_r0_id1_en(&self) -> TZC_ROM0_R0_ID1_EN_R { + TZC_ROM0_R0_ID1_EN_R::new(((self.bits >> 8) & 1) != 0) } - #[doc = "Bit 19"] + #[doc = "Bit 9"] #[inline(always)] - pub fn tzc_rom1_r1_en(&self) -> TZC_ROM1_R1_EN_R { - TZC_ROM1_R1_EN_R::new(((self.bits >> 19) & 0x01) != 0) + pub fn tzc_rom0_r1_id1_en(&self) -> TZC_ROM0_R1_ID1_EN_R { + TZC_ROM0_R1_ID1_EN_R::new(((self.bits >> 9) & 1) != 0) } - #[doc = "Bit 18"] + #[doc = "Bit 10"] #[inline(always)] - pub fn tzc_rom1_r0_en(&self) -> TZC_ROM1_R0_EN_R { - TZC_ROM1_R0_EN_R::new(((self.bits >> 18) & 0x01) != 0) + pub fn tzc_rom1_r0_id1_en(&self) -> TZC_ROM1_R0_ID1_EN_R { + TZC_ROM1_R0_ID1_EN_R::new(((self.bits >> 10) & 1) != 0) } - #[doc = "Bit 17"] + #[doc = "Bit 11"] #[inline(always)] - pub fn tzc_rom0_r1_en(&self) -> TZC_ROM0_R1_EN_R { - TZC_ROM0_R1_EN_R::new(((self.bits >> 17) & 0x01) != 0) + pub fn tzc_rom1_r1_id1_en(&self) -> TZC_ROM1_R1_ID1_EN_R { + TZC_ROM1_R1_ID1_EN_R::new(((self.bits >> 11) & 1) != 0) } #[doc = "Bit 16"] #[inline(always)] pub fn tzc_rom0_r0_en(&self) -> TZC_ROM0_R0_EN_R { - TZC_ROM0_R0_EN_R::new(((self.bits >> 16) & 0x01) != 0) + TZC_ROM0_R0_EN_R::new(((self.bits >> 16) & 1) != 0) } - #[doc = "Bit 11"] + #[doc = "Bit 17"] #[inline(always)] - pub fn tzc_rom1_r1_id1_en(&self) -> TZC_ROM1_R1_ID1_EN_R { - TZC_ROM1_R1_ID1_EN_R::new(((self.bits >> 11) & 0x01) != 0) + pub fn tzc_rom0_r1_en(&self) -> TZC_ROM0_R1_EN_R { + TZC_ROM0_R1_EN_R::new(((self.bits >> 17) & 1) != 0) } - #[doc = "Bit 10"] + #[doc = "Bit 18"] #[inline(always)] - pub fn tzc_rom1_r0_id1_en(&self) -> TZC_ROM1_R0_ID1_EN_R { - TZC_ROM1_R0_ID1_EN_R::new(((self.bits >> 10) & 0x01) != 0) + pub fn tzc_rom1_r0_en(&self) -> TZC_ROM1_R0_EN_R { + TZC_ROM1_R0_EN_R::new(((self.bits >> 18) & 1) != 0) } - #[doc = "Bit 9"] + #[doc = "Bit 19"] #[inline(always)] - pub fn tzc_rom0_r1_id1_en(&self) -> TZC_ROM0_R1_ID1_EN_R { - TZC_ROM0_R1_ID1_EN_R::new(((self.bits >> 9) & 0x01) != 0) + pub fn tzc_rom1_r1_en(&self) -> TZC_ROM1_R1_EN_R { + TZC_ROM1_R1_EN_R::new(((self.bits >> 19) & 1) != 0) } - #[doc = "Bit 8"] + #[doc = "Bit 24"] #[inline(always)] - pub fn tzc_rom0_r0_id1_en(&self) -> TZC_ROM0_R0_ID1_EN_R { - TZC_ROM0_R0_ID1_EN_R::new(((self.bits >> 8) & 0x01) != 0) + pub fn tzc_rom0_r0_lock(&self) -> TZC_ROM0_R0_LOCK_R { + TZC_ROM0_R0_LOCK_R::new(((self.bits >> 24) & 1) != 0) } - #[doc = "Bit 3"] + #[doc = "Bit 25"] #[inline(always)] - pub fn tzc_rom1_r1_id0_en(&self) -> TZC_ROM1_R1_ID0_EN_R { - TZC_ROM1_R1_ID0_EN_R::new(((self.bits >> 3) & 0x01) != 0) + pub fn tzc_rom0_r1_lock(&self) -> TZC_ROM0_R1_LOCK_R { + TZC_ROM0_R1_LOCK_R::new(((self.bits >> 25) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bit 26"] #[inline(always)] - pub fn tzc_rom1_r0_id0_en(&self) -> TZC_ROM1_R0_ID0_EN_R { - TZC_ROM1_R0_ID0_EN_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn tzc_rom1_r0_lock(&self) -> TZC_ROM1_R0_LOCK_R { + TZC_ROM1_R0_LOCK_R::new(((self.bits >> 26) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 27"] #[inline(always)] - pub fn tzc_rom0_r1_id0_en(&self) -> TZC_ROM0_R1_ID0_EN_R { - TZC_ROM0_R1_ID0_EN_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn tzc_rom1_r1_lock(&self) -> TZC_ROM1_R1_LOCK_R { + TZC_ROM1_R1_LOCK_R::new(((self.bits >> 27) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bits 28:31"] #[inline(always)] - pub fn tzc_rom0_r0_id0_en(&self) -> TZC_ROM0_R0_ID0_EN_R { - TZC_ROM0_R0_ID0_EN_R::new((self.bits & 0x01) != 0) + pub fn tzc_sboot_done(&self) -> TZC_SBOOT_DONE_R { + TZC_SBOOT_DONE_R::new(((self.bits >> 28) & 0x0f) as u8) } } impl W { - #[doc = "Bits 28:31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn tzc_sboot_done(&mut self) -> TZC_SBOOT_DONE_W { - TZC_SBOOT_DONE_W { w: self } + #[must_use] + pub fn tzc_rom0_r0_id0_en(&mut self) -> TZC_ROM0_R0_ID0_EN_W<0> { + TZC_ROM0_R0_ID0_EN_W::new(self) } - #[doc = "Bit 27"] + #[doc = "Bit 1"] #[inline(always)] - pub fn tzc_rom1_r1_lock(&mut self) -> TZC_ROM1_R1_LOCK_W { - TZC_ROM1_R1_LOCK_W { w: self } + #[must_use] + pub fn tzc_rom0_r1_id0_en(&mut self) -> TZC_ROM0_R1_ID0_EN_W<1> { + TZC_ROM0_R1_ID0_EN_W::new(self) } - #[doc = "Bit 26"] + #[doc = "Bit 2"] #[inline(always)] - pub fn tzc_rom1_r0_lock(&mut self) -> TZC_ROM1_R0_LOCK_W { - TZC_ROM1_R0_LOCK_W { w: self } + #[must_use] + pub fn tzc_rom1_r0_id0_en(&mut self) -> TZC_ROM1_R0_ID0_EN_W<2> { + TZC_ROM1_R0_ID0_EN_W::new(self) } - #[doc = "Bit 25"] + #[doc = "Bit 3"] #[inline(always)] - pub fn tzc_rom0_r1_lock(&mut self) -> TZC_ROM0_R1_LOCK_W { - TZC_ROM0_R1_LOCK_W { w: self } + #[must_use] + pub fn tzc_rom1_r1_id0_en(&mut self) -> TZC_ROM1_R1_ID0_EN_W<3> { + TZC_ROM1_R1_ID0_EN_W::new(self) } - #[doc = "Bit 24"] + #[doc = "Bit 8"] #[inline(always)] - pub fn tzc_rom0_r0_lock(&mut self) -> TZC_ROM0_R0_LOCK_W { - TZC_ROM0_R0_LOCK_W { w: self } + #[must_use] + pub fn tzc_rom0_r0_id1_en(&mut self) -> TZC_ROM0_R0_ID1_EN_W<8> { + TZC_ROM0_R0_ID1_EN_W::new(self) } - #[doc = "Bit 19"] + #[doc = "Bit 9"] #[inline(always)] - pub fn tzc_rom1_r1_en(&mut self) -> TZC_ROM1_R1_EN_W { - TZC_ROM1_R1_EN_W { w: self } + #[must_use] + pub fn tzc_rom0_r1_id1_en(&mut self) -> TZC_ROM0_R1_ID1_EN_W<9> { + TZC_ROM0_R1_ID1_EN_W::new(self) } - #[doc = "Bit 18"] + #[doc = "Bit 10"] #[inline(always)] - pub fn tzc_rom1_r0_en(&mut self) -> TZC_ROM1_R0_EN_W { - TZC_ROM1_R0_EN_W { w: self } + #[must_use] + pub fn tzc_rom1_r0_id1_en(&mut self) -> TZC_ROM1_R0_ID1_EN_W<10> { + TZC_ROM1_R0_ID1_EN_W::new(self) } - #[doc = "Bit 17"] + #[doc = "Bit 11"] #[inline(always)] - pub fn tzc_rom0_r1_en(&mut self) -> TZC_ROM0_R1_EN_W { - TZC_ROM0_R1_EN_W { w: self } + #[must_use] + pub fn tzc_rom1_r1_id1_en(&mut self) -> TZC_ROM1_R1_ID1_EN_W<11> { + TZC_ROM1_R1_ID1_EN_W::new(self) } #[doc = "Bit 16"] #[inline(always)] - pub fn tzc_rom0_r0_en(&mut self) -> TZC_ROM0_R0_EN_W { - TZC_ROM0_R0_EN_W { w: self } + #[must_use] + pub fn tzc_rom0_r0_en(&mut self) -> TZC_ROM0_R0_EN_W<16> { + TZC_ROM0_R0_EN_W::new(self) } - #[doc = "Bit 11"] + #[doc = "Bit 17"] #[inline(always)] - pub fn tzc_rom1_r1_id1_en(&mut self) -> TZC_ROM1_R1_ID1_EN_W { - TZC_ROM1_R1_ID1_EN_W { w: self } + #[must_use] + pub fn tzc_rom0_r1_en(&mut self) -> TZC_ROM0_R1_EN_W<17> { + TZC_ROM0_R1_EN_W::new(self) } - #[doc = "Bit 10"] + #[doc = "Bit 18"] #[inline(always)] - pub fn tzc_rom1_r0_id1_en(&mut self) -> TZC_ROM1_R0_ID1_EN_W { - TZC_ROM1_R0_ID1_EN_W { w: self } + #[must_use] + pub fn tzc_rom1_r0_en(&mut self) -> TZC_ROM1_R0_EN_W<18> { + TZC_ROM1_R0_EN_W::new(self) } - #[doc = "Bit 9"] + #[doc = "Bit 19"] #[inline(always)] - pub fn tzc_rom0_r1_id1_en(&mut self) -> TZC_ROM0_R1_ID1_EN_W { - TZC_ROM0_R1_ID1_EN_W { w: self } + #[must_use] + pub fn tzc_rom1_r1_en(&mut self) -> TZC_ROM1_R1_EN_W<19> { + TZC_ROM1_R1_EN_W::new(self) } - #[doc = "Bit 8"] + #[doc = "Bit 24"] #[inline(always)] - pub fn tzc_rom0_r0_id1_en(&mut self) -> TZC_ROM0_R0_ID1_EN_W { - TZC_ROM0_R0_ID1_EN_W { w: self } + #[must_use] + pub fn tzc_rom0_r0_lock(&mut self) -> TZC_ROM0_R0_LOCK_W<24> { + TZC_ROM0_R0_LOCK_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bit 25"] #[inline(always)] - pub fn tzc_rom1_r1_id0_en(&mut self) -> TZC_ROM1_R1_ID0_EN_W { - TZC_ROM1_R1_ID0_EN_W { w: self } + #[must_use] + pub fn tzc_rom0_r1_lock(&mut self) -> TZC_ROM0_R1_LOCK_W<25> { + TZC_ROM0_R1_LOCK_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bit 26"] #[inline(always)] - pub fn tzc_rom1_r0_id0_en(&mut self) -> TZC_ROM1_R0_ID0_EN_W { - TZC_ROM1_R0_ID0_EN_W { w: self } + #[must_use] + pub fn tzc_rom1_r0_lock(&mut self) -> TZC_ROM1_R0_LOCK_W<26> { + TZC_ROM1_R0_LOCK_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 27"] #[inline(always)] - pub fn tzc_rom0_r1_id0_en(&mut self) -> TZC_ROM0_R1_ID0_EN_W { - TZC_ROM0_R1_ID0_EN_W { w: self } + #[must_use] + pub fn tzc_rom1_r1_lock(&mut self) -> TZC_ROM1_R1_LOCK_W<27> { + TZC_ROM1_R1_LOCK_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bits 28:31"] #[inline(always)] - pub fn tzc_rom0_r0_id0_en(&mut self) -> TZC_ROM0_R0_ID0_EN_W { - TZC_ROM0_R0_ID0_EN_W { w: self } + #[must_use] + pub fn tzc_sboot_done(&mut self) -> TZC_SBOOT_DONE_W<28> { + TZC_SBOOT_DONE_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -825,11 +324,10 @@ impl crate::Readable for TZC_ROM_CTRL_SPEC { #[doc = "`write(|w| ..)` method takes [tzc_rom_ctrl::W](W) writer structure"] impl crate::Writable for TZC_ROM_CTRL_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets tzc_rom_ctrl to value 0x0f0f"] impl crate::Resettable for TZC_ROM_CTRL_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0f0f - } + const RESET_VALUE: Self::Ux = 0x0f0f; } diff --git a/src/uart.rs b/src/uart.rs index 9a01ef6..e2cb72c 100644 --- a/src/uart.rs +++ b/src/uart.rs @@ -2,107 +2,107 @@ #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - utx_config."] - pub utx_config: crate::Reg, + pub utx_config: UTX_CONFIG, #[doc = "0x04 - urx_config."] - pub urx_config: crate::Reg, + pub urx_config: URX_CONFIG, #[doc = "0x08 - uart_bit_prd."] - pub uart_bit_prd: crate::Reg, + pub uart_bit_prd: UART_BIT_PRD, #[doc = "0x0c - data_config."] - pub data_config: crate::Reg, + pub data_config: DATA_CONFIG, #[doc = "0x10 - utx_ir_position."] - pub utx_ir_position: crate::Reg, + pub utx_ir_position: UTX_IR_POSITION, #[doc = "0x14 - urx_ir_position."] - pub urx_ir_position: crate::Reg, + pub urx_ir_position: URX_IR_POSITION, #[doc = "0x18 - urx_rto_timer."] - pub urx_rto_timer: crate::Reg, - _reserved7: [u8; 4usize], + pub urx_rto_timer: URX_RTO_TIMER, + _reserved7: [u8; 0x04], #[doc = "0x20 - UART interrupt status"] - pub uart_int_sts: crate::Reg, + pub uart_int_sts: UART_INT_STS, #[doc = "0x24 - UART interrupt mask"] - pub uart_int_mask: crate::Reg, + pub uart_int_mask: UART_INT_MASK, #[doc = "0x28 - UART interrupt clear"] - pub uart_int_clear: crate::Reg, + pub uart_int_clear: UART_INT_CLEAR, #[doc = "0x2c - UART interrupt enable"] - pub uart_int_en: crate::Reg, + pub uart_int_en: UART_INT_EN, #[doc = "0x30 - uart_status."] - pub uart_status: crate::Reg, + pub uart_status: UART_STATUS, #[doc = "0x34 - sts_urx_abr_prd."] - pub sts_urx_abr_prd: crate::Reg, - _reserved13: [u8; 72usize], + pub sts_urx_abr_prd: STS_URX_ABR_PRD, + _reserved13: [u8; 0x48], #[doc = "0x80 - uart_fifo_config_0."] - pub uart_fifo_config_0: crate::Reg, + pub uart_fifo_config_0: UART_FIFO_CONFIG_0, #[doc = "0x84 - uart_fifo_config_1."] - pub uart_fifo_config_1: crate::Reg, + pub uart_fifo_config_1: UART_FIFO_CONFIG_1, #[doc = "0x88 - uart_fifo_wdata."] - pub uart_fifo_wdata: crate::Reg, + pub uart_fifo_wdata: UART_FIFO_WDATA, #[doc = "0x8c - uart_fifo_rdata."] - pub uart_fifo_rdata: crate::Reg, + pub uart_fifo_rdata: UART_FIFO_RDATA, } -#[doc = "utx_config register accessor: an alias for `Reg`"] +#[doc = "utx_config (rw) register accessor: an alias for `Reg`"] pub type UTX_CONFIG = crate::Reg; #[doc = "utx_config."] pub mod utx_config; -#[doc = "urx_config register accessor: an alias for `Reg`"] +#[doc = "urx_config (rw) register accessor: an alias for `Reg`"] pub type URX_CONFIG = crate::Reg; #[doc = "urx_config."] pub mod urx_config; -#[doc = "uart_bit_prd register accessor: an alias for `Reg`"] +#[doc = "uart_bit_prd (rw) register accessor: an alias for `Reg`"] pub type UART_BIT_PRD = crate::Reg; #[doc = "uart_bit_prd."] pub mod uart_bit_prd; -#[doc = "data_config register accessor: an alias for `Reg`"] +#[doc = "data_config (rw) register accessor: an alias for `Reg`"] pub type DATA_CONFIG = crate::Reg; #[doc = "data_config."] pub mod data_config; -#[doc = "utx_ir_position register accessor: an alias for `Reg`"] +#[doc = "utx_ir_position (rw) register accessor: an alias for `Reg`"] pub type UTX_IR_POSITION = crate::Reg; #[doc = "utx_ir_position."] pub mod utx_ir_position; -#[doc = "urx_ir_position register accessor: an alias for `Reg`"] +#[doc = "urx_ir_position (rw) register accessor: an alias for `Reg`"] pub type URX_IR_POSITION = crate::Reg; #[doc = "urx_ir_position."] pub mod urx_ir_position; -#[doc = "urx_rto_timer register accessor: an alias for `Reg`"] +#[doc = "urx_rto_timer (rw) register accessor: an alias for `Reg`"] pub type URX_RTO_TIMER = crate::Reg; #[doc = "urx_rto_timer."] pub mod urx_rto_timer; -#[doc = "uart_int_sts register accessor: an alias for `Reg`"] +#[doc = "uart_int_sts (r) register accessor: an alias for `Reg`"] pub type UART_INT_STS = crate::Reg; #[doc = "UART interrupt status"] pub mod uart_int_sts; -#[doc = "uart_int_mask register accessor: an alias for `Reg`"] +#[doc = "uart_int_mask (rw) register accessor: an alias for `Reg`"] pub type UART_INT_MASK = crate::Reg; #[doc = "UART interrupt mask"] pub mod uart_int_mask; -#[doc = "uart_int_clear register accessor: an alias for `Reg`"] +#[doc = "uart_int_clear (rw) register accessor: an alias for `Reg`"] pub type UART_INT_CLEAR = crate::Reg; #[doc = "UART interrupt clear"] pub mod uart_int_clear; -#[doc = "uart_int_en register accessor: an alias for `Reg`"] +#[doc = "uart_int_en (rw) register accessor: an alias for `Reg`"] pub type UART_INT_EN = crate::Reg; #[doc = "UART interrupt enable"] pub mod uart_int_en; -#[doc = "uart_status register accessor: an alias for `Reg`"] +#[doc = "uart_status (r) register accessor: an alias for `Reg`"] pub type UART_STATUS = crate::Reg; #[doc = "uart_status."] pub mod uart_status; -#[doc = "sts_urx_abr_prd register accessor: an alias for `Reg`"] +#[doc = "sts_urx_abr_prd (r) register accessor: an alias for `Reg`"] pub type STS_URX_ABR_PRD = crate::Reg; #[doc = "sts_urx_abr_prd."] pub mod sts_urx_abr_prd; -#[doc = "uart_fifo_config_0 register accessor: an alias for `Reg`"] +#[doc = "uart_fifo_config_0 (rw) register accessor: an alias for `Reg`"] pub type UART_FIFO_CONFIG_0 = crate::Reg; #[doc = "uart_fifo_config_0."] pub mod uart_fifo_config_0; -#[doc = "uart_fifo_config_1 register accessor: an alias for `Reg`"] +#[doc = "uart_fifo_config_1 (rw) register accessor: an alias for `Reg`"] pub type UART_FIFO_CONFIG_1 = crate::Reg; #[doc = "uart_fifo_config_1."] pub mod uart_fifo_config_1; -#[doc = "uart_fifo_wdata register accessor: an alias for `Reg`"] +#[doc = "uart_fifo_wdata (w) register accessor: an alias for `Reg`"] pub type UART_FIFO_WDATA = crate::Reg; #[doc = "uart_fifo_wdata."] pub mod uart_fifo_wdata; -#[doc = "uart_fifo_rdata register accessor: an alias for `Reg`"] +#[doc = "uart_fifo_rdata (r) register accessor: an alias for `Reg`"] pub type UART_FIFO_RDATA = crate::Reg; #[doc = "uart_fifo_rdata."] pub mod uart_fifo_rdata; diff --git a/src/uart/data_config.rs b/src/uart/data_config.rs index 1845279..67ae273 100644 --- a/src/uart/data_config.rs +++ b/src/uart/data_config.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,61 +28,32 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `cr_uart_bit_inv` reader - "] -pub struct CR_UART_BIT_INV_R(crate::FieldReader); -impl CR_UART_BIT_INV_R { - pub(crate) fn new(bits: bool) -> Self { - CR_UART_BIT_INV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_UART_BIT_INV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_UART_BIT_INV_R = crate::BitReader; #[doc = "Field `cr_uart_bit_inv` writer - "] -pub struct CR_UART_BIT_INV_W<'a> { - w: &'a mut W, -} -impl<'a> CR_UART_BIT_INV_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w - } -} +pub type CR_UART_BIT_INV_W<'a, const O: u8> = crate::BitWriter<'a, u32, DATA_CONFIG_SPEC, bool, O>; impl R { #[doc = "Bit 0"] #[inline(always)] pub fn cr_uart_bit_inv(&self) -> CR_UART_BIT_INV_R { - CR_UART_BIT_INV_R::new((self.bits & 0x01) != 0) + CR_UART_BIT_INV_R::new((self.bits & 1) != 0) } } impl W { #[doc = "Bit 0"] #[inline(always)] - pub fn cr_uart_bit_inv(&mut self) -> CR_UART_BIT_INV_W { - CR_UART_BIT_INV_W { w: self } + #[must_use] + pub fn cr_uart_bit_inv(&mut self) -> CR_UART_BIT_INV_W<0> { + CR_UART_BIT_INV_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -99,11 +71,10 @@ impl crate::Readable for DATA_CONFIG_SPEC { #[doc = "`write(|w| ..)` method takes [data_config::W](W) writer structure"] impl crate::Writable for DATA_CONFIG_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets data_config to value 0"] impl crate::Resettable for DATA_CONFIG_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/uart/sts_urx_abr_prd.rs b/src/uart/sts_urx_abr_prd.rs index ff5b65a..7961c32 100644 --- a/src/uart/sts_urx_abr_prd.rs +++ b/src/uart/sts_urx_abr_prd.rs @@ -7,50 +7,27 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `sts_urx_abr_prd_0x55` reader - "] -pub struct STS_URX_ABR_PRD_0X55_R(crate::FieldReader); -impl STS_URX_ABR_PRD_0X55_R { - pub(crate) fn new(bits: u16) -> Self { - STS_URX_ABR_PRD_0X55_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for STS_URX_ABR_PRD_0X55_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} #[doc = "Field `sts_urx_abr_prd_start` reader - "] -pub struct STS_URX_ABR_PRD_START_R(crate::FieldReader); -impl STS_URX_ABR_PRD_START_R { - pub(crate) fn new(bits: u16) -> Self { - STS_URX_ABR_PRD_START_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for STS_URX_ABR_PRD_START_R { - type Target = crate::FieldReader; +pub type STS_URX_ABR_PRD_START_R = crate::FieldReader; +#[doc = "Field `sts_urx_abr_prd_0x55` reader - "] +pub type STS_URX_ABR_PRD_0X55_R = crate::FieldReader; +impl R { + #[doc = "Bits 0:15"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn sts_urx_abr_prd_start(&self) -> STS_URX_ABR_PRD_START_R { + STS_URX_ABR_PRD_START_R::new((self.bits & 0xffff) as u16) } -} -impl R { #[doc = "Bits 16:31"] #[inline(always)] pub fn sts_urx_abr_prd_0x55(&self) -> STS_URX_ABR_PRD_0X55_R { STS_URX_ABR_PRD_0X55_R::new(((self.bits >> 16) & 0xffff) as u16) } - #[doc = "Bits 0:15"] - #[inline(always)] - pub fn sts_urx_abr_prd_start(&self) -> STS_URX_ABR_PRD_START_R { - STS_URX_ABR_PRD_START_R::new((self.bits & 0xffff) as u16) - } } #[doc = "sts_urx_abr_prd.\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 [sts_urx_abr_prd](index.html) module"] pub struct STS_URX_ABR_PRD_SPEC; @@ -63,8 +40,5 @@ impl crate::Readable for STS_URX_ABR_PRD_SPEC { } #[doc = "`reset()` method sets sts_urx_abr_prd to value 0"] impl crate::Resettable for STS_URX_ABR_PRD_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/uart/uart_bit_prd.rs b/src/uart/uart_bit_prd.rs index 1a58e8e..1e5e0dd 100644 --- a/src/uart/uart_bit_prd.rs +++ b/src/uart/uart_bit_prd.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,87 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `cr_urx_bit_prd` reader - "] -pub struct CR_URX_BIT_PRD_R(crate::FieldReader); -impl CR_URX_BIT_PRD_R { - pub(crate) fn new(bits: u16) -> Self { - CR_URX_BIT_PRD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_URX_BIT_PRD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_urx_bit_prd` writer - "] -pub struct CR_URX_BIT_PRD_W<'a> { - w: &'a mut W, -} -impl<'a> CR_URX_BIT_PRD_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xffff << 16)) | ((value as u32 & 0xffff) << 16); - self.w - } -} #[doc = "Field `cr_utx_bit_prd` reader - "] -pub struct CR_UTX_BIT_PRD_R(crate::FieldReader); -impl CR_UTX_BIT_PRD_R { - pub(crate) fn new(bits: u16) -> Self { - CR_UTX_BIT_PRD_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_UTX_BIT_PRD_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_UTX_BIT_PRD_R = crate::FieldReader; #[doc = "Field `cr_utx_bit_prd` writer - "] -pub struct CR_UTX_BIT_PRD_W<'a> { - w: &'a mut W, -} -impl<'a> CR_UTX_BIT_PRD_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type CR_UTX_BIT_PRD_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, UART_BIT_PRD_SPEC, u16, u16, 16, O>; +#[doc = "Field `cr_urx_bit_prd` reader - "] +pub type CR_URX_BIT_PRD_R = crate::FieldReader; +#[doc = "Field `cr_urx_bit_prd` writer - "] +pub type CR_URX_BIT_PRD_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, UART_BIT_PRD_SPEC, u16, u16, 16, O>; +impl R { + #[doc = "Bits 0:15"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w + pub fn cr_utx_bit_prd(&self) -> CR_UTX_BIT_PRD_R { + CR_UTX_BIT_PRD_R::new((self.bits & 0xffff) as u16) } -} -impl R { #[doc = "Bits 16:31"] #[inline(always)] pub fn cr_urx_bit_prd(&self) -> CR_URX_BIT_PRD_R { CR_URX_BIT_PRD_R::new(((self.bits >> 16) & 0xffff) as u16) } - #[doc = "Bits 0:15"] - #[inline(always)] - pub fn cr_utx_bit_prd(&self) -> CR_UTX_BIT_PRD_R { - CR_UTX_BIT_PRD_R::new((self.bits & 0xffff) as u16) - } } impl W { - #[doc = "Bits 16:31"] + #[doc = "Bits 0:15"] #[inline(always)] - pub fn cr_urx_bit_prd(&mut self) -> CR_URX_BIT_PRD_W { - CR_URX_BIT_PRD_W { w: self } + #[must_use] + pub fn cr_utx_bit_prd(&mut self) -> CR_UTX_BIT_PRD_W<0> { + CR_UTX_BIT_PRD_W::new(self) } - #[doc = "Bits 0:15"] + #[doc = "Bits 16:31"] #[inline(always)] - pub fn cr_utx_bit_prd(&mut self) -> CR_UTX_BIT_PRD_W { - CR_UTX_BIT_PRD_W { w: self } + #[must_use] + pub fn cr_urx_bit_prd(&mut self) -> CR_URX_BIT_PRD_W<16> { + CR_URX_BIT_PRD_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -125,11 +88,10 @@ impl crate::Readable for UART_BIT_PRD_SPEC { #[doc = "`write(|w| ..)` method takes [uart_bit_prd::W](W) writer structure"] impl crate::Writable for UART_BIT_PRD_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets uart_bit_prd to value 0x00ff_00ff"] impl crate::Resettable for UART_BIT_PRD_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x00ff_00ff - } + const RESET_VALUE: Self::Ux = 0x00ff_00ff; } diff --git a/src/uart/uart_fifo_config_0.rs b/src/uart/uart_fifo_config_0.rs index 1833767..c5b2358 100644 --- a/src/uart/uart_fifo_config_0.rs +++ b/src/uart/uart_fifo_config_0.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,275 +28,109 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rx_fifo_underflow` reader - "] -pub struct RX_FIFO_UNDERFLOW_R(crate::FieldReader); -impl RX_FIFO_UNDERFLOW_R { - pub(crate) fn new(bits: bool) -> Self { - RX_FIFO_UNDERFLOW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_FIFO_UNDERFLOW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_fifo_overflow` reader - "] -pub struct RX_FIFO_OVERFLOW_R(crate::FieldReader); -impl RX_FIFO_OVERFLOW_R { - pub(crate) fn new(bits: bool) -> Self { - RX_FIFO_OVERFLOW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_FIFO_OVERFLOW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_fifo_underflow` reader - "] -pub struct TX_FIFO_UNDERFLOW_R(crate::FieldReader); -impl TX_FIFO_UNDERFLOW_R { - pub(crate) fn new(bits: bool) -> Self { - TX_FIFO_UNDERFLOW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_FIFO_UNDERFLOW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_fifo_overflow` reader - "] -pub struct TX_FIFO_OVERFLOW_R(crate::FieldReader); -impl TX_FIFO_OVERFLOW_R { - pub(crate) fn new(bits: bool) -> Self { - TX_FIFO_OVERFLOW_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_FIFO_OVERFLOW_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_fifo_clr` reader - "] -pub struct RX_FIFO_CLR_R(crate::FieldReader); -impl RX_FIFO_CLR_R { - pub(crate) fn new(bits: bool) -> Self { - RX_FIFO_CLR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_FIFO_CLR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_fifo_clr` writer - "] -pub struct RX_FIFO_CLR_W<'a> { - w: &'a mut W, -} -impl<'a> RX_FIFO_CLR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `tx_fifo_clr` reader - "] -pub struct TX_FIFO_CLR_R(crate::FieldReader); -impl TX_FIFO_CLR_R { - pub(crate) fn new(bits: bool) -> Self { - TX_FIFO_CLR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_FIFO_CLR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_fifo_clr` writer - "] -pub struct TX_FIFO_CLR_W<'a> { - w: &'a mut W, -} -impl<'a> TX_FIFO_CLR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `uart_dma_rx_en` reader - "] -pub struct UART_DMA_RX_EN_R(crate::FieldReader); -impl UART_DMA_RX_EN_R { - pub(crate) fn new(bits: bool) -> Self { - UART_DMA_RX_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for UART_DMA_RX_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `uart_dma_rx_en` writer - "] -pub struct UART_DMA_RX_EN_W<'a> { - w: &'a mut W, -} -impl<'a> UART_DMA_RX_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `uart_dma_tx_en` reader - "] -pub struct UART_DMA_TX_EN_R(crate::FieldReader); -impl UART_DMA_TX_EN_R { - pub(crate) fn new(bits: bool) -> Self { - UART_DMA_TX_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for UART_DMA_TX_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type UART_DMA_TX_EN_R = crate::BitReader; #[doc = "Field `uart_dma_tx_en` writer - "] -pub struct UART_DMA_TX_EN_W<'a> { - w: &'a mut W, -} -impl<'a> UART_DMA_TX_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type UART_DMA_TX_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, UART_FIFO_CONFIG_0_SPEC, bool, O>; +#[doc = "Field `uart_dma_rx_en` reader - "] +pub type UART_DMA_RX_EN_R = crate::BitReader; +#[doc = "Field `uart_dma_rx_en` writer - "] +pub type UART_DMA_RX_EN_W<'a, const O: u8> = + crate::BitWriter<'a, u32, UART_FIFO_CONFIG_0_SPEC, bool, O>; +#[doc = "Field `tx_fifo_clr` reader - "] +pub type TX_FIFO_CLR_R = crate::BitReader; +#[doc = "Field `tx_fifo_clr` writer - "] +pub type TX_FIFO_CLR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, UART_FIFO_CONFIG_0_SPEC, bool, O>; +#[doc = "Field `rx_fifo_clr` reader - "] +pub type RX_FIFO_CLR_R = crate::BitReader; +#[doc = "Field `rx_fifo_clr` writer - "] +pub type RX_FIFO_CLR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, UART_FIFO_CONFIG_0_SPEC, bool, O>; +#[doc = "Field `tx_fifo_overflow` reader - "] +pub type TX_FIFO_OVERFLOW_R = crate::BitReader; +#[doc = "Field `tx_fifo_underflow` reader - "] +pub type TX_FIFO_UNDERFLOW_R = crate::BitReader; +#[doc = "Field `rx_fifo_overflow` reader - "] +pub type RX_FIFO_OVERFLOW_R = crate::BitReader; +#[doc = "Field `rx_fifo_underflow` reader - "] +pub type RX_FIFO_UNDERFLOW_R = crate::BitReader; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn uart_dma_tx_en(&self) -> UART_DMA_TX_EN_R { + UART_DMA_TX_EN_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bit 7"] + #[doc = "Bit 1"] #[inline(always)] - pub fn rx_fifo_underflow(&self) -> RX_FIFO_UNDERFLOW_R { - RX_FIFO_UNDERFLOW_R::new(((self.bits >> 7) & 0x01) != 0) + pub fn uart_dma_rx_en(&self) -> UART_DMA_RX_EN_R { + UART_DMA_RX_EN_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 6"] + #[doc = "Bit 2"] #[inline(always)] - pub fn rx_fifo_overflow(&self) -> RX_FIFO_OVERFLOW_R { - RX_FIFO_OVERFLOW_R::new(((self.bits >> 6) & 0x01) != 0) + pub fn tx_fifo_clr(&self) -> TX_FIFO_CLR_R { + TX_FIFO_CLR_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 5"] + #[doc = "Bit 3"] #[inline(always)] - pub fn tx_fifo_underflow(&self) -> TX_FIFO_UNDERFLOW_R { - TX_FIFO_UNDERFLOW_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn rx_fifo_clr(&self) -> RX_FIFO_CLR_R { + RX_FIFO_CLR_R::new(((self.bits >> 3) & 1) != 0) } #[doc = "Bit 4"] #[inline(always)] pub fn tx_fifo_overflow(&self) -> TX_FIFO_OVERFLOW_R { - TX_FIFO_OVERFLOW_R::new(((self.bits >> 4) & 0x01) != 0) + TX_FIFO_OVERFLOW_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 3"] - #[inline(always)] - pub fn rx_fifo_clr(&self) -> RX_FIFO_CLR_R { - RX_FIFO_CLR_R::new(((self.bits >> 3) & 0x01) != 0) - } - #[doc = "Bit 2"] + #[doc = "Bit 5"] #[inline(always)] - pub fn tx_fifo_clr(&self) -> TX_FIFO_CLR_R { - TX_FIFO_CLR_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn tx_fifo_underflow(&self) -> TX_FIFO_UNDERFLOW_R { + TX_FIFO_UNDERFLOW_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 6"] #[inline(always)] - pub fn uart_dma_rx_en(&self) -> UART_DMA_RX_EN_R { - UART_DMA_RX_EN_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn rx_fifo_overflow(&self) -> RX_FIFO_OVERFLOW_R { + RX_FIFO_OVERFLOW_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 7"] #[inline(always)] - pub fn uart_dma_tx_en(&self) -> UART_DMA_TX_EN_R { - UART_DMA_TX_EN_R::new((self.bits & 0x01) != 0) + pub fn rx_fifo_underflow(&self) -> RX_FIFO_UNDERFLOW_R { + RX_FIFO_UNDERFLOW_R::new(((self.bits >> 7) & 1) != 0) } } impl W { - #[doc = "Bit 3"] + #[doc = "Bit 0"] #[inline(always)] - pub fn rx_fifo_clr(&mut self) -> RX_FIFO_CLR_W { - RX_FIFO_CLR_W { w: self } + #[must_use] + pub fn uart_dma_tx_en(&mut self) -> UART_DMA_TX_EN_W<0> { + UART_DMA_TX_EN_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bit 1"] #[inline(always)] - pub fn tx_fifo_clr(&mut self) -> TX_FIFO_CLR_W { - TX_FIFO_CLR_W { w: self } + #[must_use] + pub fn uart_dma_rx_en(&mut self) -> UART_DMA_RX_EN_W<1> { + UART_DMA_RX_EN_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 2"] #[inline(always)] - pub fn uart_dma_rx_en(&mut self) -> UART_DMA_RX_EN_W { - UART_DMA_RX_EN_W { w: self } + #[must_use] + pub fn tx_fifo_clr(&mut self) -> TX_FIFO_CLR_W<2> { + TX_FIFO_CLR_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 3"] #[inline(always)] - pub fn uart_dma_tx_en(&mut self) -> UART_DMA_TX_EN_W { - UART_DMA_TX_EN_W { w: self } + #[must_use] + pub fn rx_fifo_clr(&mut self) -> RX_FIFO_CLR_W<3> { + RX_FIFO_CLR_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -313,11 +148,10 @@ impl crate::Readable for UART_FIFO_CONFIG_0_SPEC { #[doc = "`write(|w| ..)` method takes [uart_fifo_config_0::W](W) writer structure"] impl crate::Writable for UART_FIFO_CONFIG_0_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets uart_fifo_config_0 to value 0"] impl crate::Resettable for UART_FIFO_CONFIG_0_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/uart/uart_fifo_config_1.rs b/src/uart/uart_fifo_config_1.rs index 9339e38..267c341 100644 --- a/src/uart/uart_fifo_config_1.rs +++ b/src/uart/uart_fifo_config_1.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,125 +28,63 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rx_fifo_th` reader - "] -pub struct RX_FIFO_TH_R(crate::FieldReader); -impl RX_FIFO_TH_R { - pub(crate) fn new(bits: u8) -> Self { - RX_FIFO_TH_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_FIFO_TH_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rx_fifo_th` writer - "] -pub struct RX_FIFO_TH_W<'a> { - w: &'a mut W, -} -impl<'a> RX_FIFO_TH_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 24)) | ((value as u32 & 0x1f) << 24); - self.w - } -} +#[doc = "Field `tx_fifo_cnt` reader - "] +pub type TX_FIFO_CNT_R = crate::FieldReader; +#[doc = "Field `rx_fifo_cnt` reader - "] +pub type RX_FIFO_CNT_R = crate::FieldReader; #[doc = "Field `tx_fifo_th` reader - "] -pub struct TX_FIFO_TH_R(crate::FieldReader); -impl TX_FIFO_TH_R { - pub(crate) fn new(bits: u8) -> Self { - TX_FIFO_TH_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_FIFO_TH_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type TX_FIFO_TH_R = crate::FieldReader; #[doc = "Field `tx_fifo_th` writer - "] -pub struct TX_FIFO_TH_W<'a> { - w: &'a mut W, -} -impl<'a> TX_FIFO_TH_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x1f << 16)) | ((value as u32 & 0x1f) << 16); - self.w - } -} -#[doc = "Field `rx_fifo_cnt` reader - "] -pub struct RX_FIFO_CNT_R(crate::FieldReader); -impl RX_FIFO_CNT_R { - pub(crate) fn new(bits: u8) -> Self { - RX_FIFO_CNT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RX_FIFO_CNT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `tx_fifo_cnt` reader - "] -pub struct TX_FIFO_CNT_R(crate::FieldReader); -impl TX_FIFO_CNT_R { - pub(crate) fn new(bits: u8) -> Self { - TX_FIFO_CNT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for TX_FIFO_CNT_R { - type Target = crate::FieldReader; +pub type TX_FIFO_TH_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, UART_FIFO_CONFIG_1_SPEC, u8, u8, 5, O>; +#[doc = "Field `rx_fifo_th` reader - "] +pub type RX_FIFO_TH_R = crate::FieldReader; +#[doc = "Field `rx_fifo_th` writer - "] +pub type RX_FIFO_TH_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, UART_FIFO_CONFIG_1_SPEC, u8, u8, 5, O>; +impl R { + #[doc = "Bits 0:5"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn tx_fifo_cnt(&self) -> TX_FIFO_CNT_R { + TX_FIFO_CNT_R::new((self.bits & 0x3f) as u8) } -} -impl R { - #[doc = "Bits 24:28"] + #[doc = "Bits 8:13"] #[inline(always)] - pub fn rx_fifo_th(&self) -> RX_FIFO_TH_R { - RX_FIFO_TH_R::new(((self.bits >> 24) & 0x1f) as u8) + pub fn rx_fifo_cnt(&self) -> RX_FIFO_CNT_R { + RX_FIFO_CNT_R::new(((self.bits >> 8) & 0x3f) as u8) } #[doc = "Bits 16:20"] #[inline(always)] pub fn tx_fifo_th(&self) -> TX_FIFO_TH_R { TX_FIFO_TH_R::new(((self.bits >> 16) & 0x1f) as u8) } - #[doc = "Bits 8:13"] - #[inline(always)] - pub fn rx_fifo_cnt(&self) -> RX_FIFO_CNT_R { - RX_FIFO_CNT_R::new(((self.bits >> 8) & 0x3f) as u8) - } - #[doc = "Bits 0:5"] + #[doc = "Bits 24:28"] #[inline(always)] - pub fn tx_fifo_cnt(&self) -> TX_FIFO_CNT_R { - TX_FIFO_CNT_R::new((self.bits & 0x3f) as u8) + pub fn rx_fifo_th(&self) -> RX_FIFO_TH_R { + RX_FIFO_TH_R::new(((self.bits >> 24) & 0x1f) as u8) } } impl W { - #[doc = "Bits 24:28"] + #[doc = "Bits 16:20"] #[inline(always)] - pub fn rx_fifo_th(&mut self) -> RX_FIFO_TH_W { - RX_FIFO_TH_W { w: self } + #[must_use] + pub fn tx_fifo_th(&mut self) -> TX_FIFO_TH_W<16> { + TX_FIFO_TH_W::new(self) } - #[doc = "Bits 16:20"] + #[doc = "Bits 24:28"] #[inline(always)] - pub fn tx_fifo_th(&mut self) -> TX_FIFO_TH_W { - TX_FIFO_TH_W { w: self } + #[must_use] + pub fn rx_fifo_th(&mut self) -> RX_FIFO_TH_W<24> { + RX_FIFO_TH_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -163,11 +102,10 @@ impl crate::Readable for UART_FIFO_CONFIG_1_SPEC { #[doc = "`write(|w| ..)` method takes [uart_fifo_config_1::W](W) writer structure"] impl crate::Writable for UART_FIFO_CONFIG_1_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets uart_fifo_config_1 to value 0x20"] impl crate::Resettable for UART_FIFO_CONFIG_1_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x20 - } + const RESET_VALUE: Self::Ux = 0x20; } diff --git a/src/uart/uart_fifo_rdata.rs b/src/uart/uart_fifo_rdata.rs index 2c6f9c4..23368dd 100644 --- a/src/uart/uart_fifo_rdata.rs +++ b/src/uart/uart_fifo_rdata.rs @@ -7,25 +7,14 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } #[doc = "Field `uart_fifo_rdata` reader - "] -pub struct UART_FIFO_RDATA_R(crate::FieldReader); -impl UART_FIFO_RDATA_R { - pub(crate) fn new(bits: u8) -> Self { - UART_FIFO_RDATA_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for UART_FIFO_RDATA_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type UART_FIFO_RDATA_R = crate::FieldReader; impl R { #[doc = "Bits 0:7"] #[inline(always)] @@ -44,8 +33,5 @@ impl crate::Readable for UART_FIFO_RDATA_SPEC { } #[doc = "`reset()` method sets uart_fifo_rdata to value 0"] impl crate::Resettable for UART_FIFO_RDATA_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/uart/uart_fifo_wdata.rs b/src/uart/uart_fifo_wdata.rs index 79965ec..3b28baf 100644 --- a/src/uart/uart_fifo_wdata.rs +++ b/src/uart/uart_fifo_wdata.rs @@ -13,30 +13,24 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `uart_fifo_wdata` writer - "] -pub struct UART_FIFO_WDATA_W<'a> { - w: &'a mut W, -} -impl<'a> UART_FIFO_WDATA_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff); - self.w - } -} +pub type UART_FIFO_WDATA_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, UART_FIFO_WDATA_SPEC, u8, u8, 8, O>; impl W { #[doc = "Bits 0:7"] #[inline(always)] - pub fn uart_fifo_wdata(&mut self) -> UART_FIFO_WDATA_W { - UART_FIFO_WDATA_W { w: self } + #[must_use] + pub fn uart_fifo_wdata(&mut self) -> UART_FIFO_WDATA_W<0> { + UART_FIFO_WDATA_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -50,11 +44,10 @@ impl crate::RegisterSpec for UART_FIFO_WDATA_SPEC { #[doc = "`write(|w| ..)` method takes [uart_fifo_wdata::W](W) writer structure"] impl crate::Writable for UART_FIFO_WDATA_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets uart_fifo_wdata to value 0"] impl crate::Resettable for UART_FIFO_WDATA_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/uart/uart_int_clear.rs b/src/uart/uart_int_clear.rs index abde35e..7c5aea2 100644 --- a/src/uart/uart_int_clear.rs +++ b/src/uart/uart_int_clear.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,383 +28,141 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `rsvd_7` reader - "] -pub struct RSVD_7_R(crate::FieldReader); -impl RSVD_7_R { - pub(crate) fn new(bits: bool) -> Self { - RSVD_7_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RSVD_7_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rsvd_7` writer - "] -pub struct RSVD_7_W<'a> { - w: &'a mut W, -} -impl<'a> RSVD_7_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7); - self.w - } -} -#[doc = "Field `rsvd_6` reader - "] -pub struct RSVD_6_R(crate::FieldReader); -impl RSVD_6_R { - pub(crate) fn new(bits: bool) -> Self { - RSVD_6_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RSVD_6_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rsvd_6` writer - "] -pub struct RSVD_6_W<'a> { - w: &'a mut W, -} -impl<'a> RSVD_6_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w - } -} -#[doc = "Field `cr_urx_pce_clr` reader - "] -pub struct CR_URX_PCE_CLR_R(crate::FieldReader); -impl CR_URX_PCE_CLR_R { - pub(crate) fn new(bits: bool) -> Self { - CR_URX_PCE_CLR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_URX_PCE_CLR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_urx_pce_clr` writer - "] -pub struct CR_URX_PCE_CLR_W<'a> { - w: &'a mut W, -} -impl<'a> CR_URX_PCE_CLR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w - } -} -#[doc = "Field `cr_urx_rto_clr` reader - "] -pub struct CR_URX_RTO_CLR_R(crate::FieldReader); -impl CR_URX_RTO_CLR_R { - pub(crate) fn new(bits: bool) -> Self { - CR_URX_RTO_CLR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_URX_RTO_CLR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_urx_rto_clr` writer - "] -pub struct CR_URX_RTO_CLR_W<'a> { - w: &'a mut W, -} -impl<'a> CR_URX_RTO_CLR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} -#[doc = "Field `rsvd_3` reader - "] -pub struct RSVD_3_R(crate::FieldReader); -impl RSVD_3_R { - pub(crate) fn new(bits: bool) -> Self { - RSVD_3_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RSVD_3_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rsvd_3` writer - "] -pub struct RSVD_3_W<'a> { - w: &'a mut W, -} -impl<'a> RSVD_3_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `rsvd_2` reader - "] -pub struct RSVD_2_R(crate::FieldReader); -impl RSVD_2_R { - pub(crate) fn new(bits: bool) -> Self { - RSVD_2_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for RSVD_2_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `rsvd_2` writer - "] -pub struct RSVD_2_W<'a> { - w: &'a mut W, -} -impl<'a> RSVD_2_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `cr_urx_end_clr` reader - "] -pub struct CR_URX_END_CLR_R(crate::FieldReader); -impl CR_URX_END_CLR_R { - pub(crate) fn new(bits: bool) -> Self { - CR_URX_END_CLR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_URX_END_CLR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_urx_end_clr` writer - "] -pub struct CR_URX_END_CLR_W<'a> { - w: &'a mut W, -} -impl<'a> CR_URX_END_CLR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `cr_utx_end_clr` reader - "] -pub struct CR_UTX_END_CLR_R(crate::FieldReader); -impl CR_UTX_END_CLR_R { - pub(crate) fn new(bits: bool) -> Self { - CR_UTX_END_CLR_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_UTX_END_CLR_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_UTX_END_CLR_R = crate::BitReader; #[doc = "Field `cr_utx_end_clr` writer - "] -pub struct CR_UTX_END_CLR_W<'a> { - w: &'a mut W, -} -impl<'a> CR_UTX_END_CLR_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type CR_UTX_END_CLR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, UART_INT_CLEAR_SPEC, bool, O>; +#[doc = "Field `cr_urx_end_clr` reader - "] +pub type CR_URX_END_CLR_R = crate::BitReader; +#[doc = "Field `cr_urx_end_clr` writer - "] +pub type CR_URX_END_CLR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, UART_INT_CLEAR_SPEC, bool, O>; +#[doc = "Field `rsvd_2` reader - "] +pub type RSVD_2_R = crate::BitReader; +#[doc = "Field `rsvd_2` writer - "] +pub type RSVD_2_W<'a, const O: u8> = crate::BitWriter<'a, u32, UART_INT_CLEAR_SPEC, bool, O>; +#[doc = "Field `rsvd_3` reader - "] +pub type RSVD_3_R = crate::BitReader; +#[doc = "Field `rsvd_3` writer - "] +pub type RSVD_3_W<'a, const O: u8> = crate::BitWriter<'a, u32, UART_INT_CLEAR_SPEC, bool, O>; +#[doc = "Field `cr_urx_rto_clr` reader - "] +pub type CR_URX_RTO_CLR_R = crate::BitReader; +#[doc = "Field `cr_urx_rto_clr` writer - "] +pub type CR_URX_RTO_CLR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, UART_INT_CLEAR_SPEC, bool, O>; +#[doc = "Field `cr_urx_pce_clr` reader - "] +pub type CR_URX_PCE_CLR_R = crate::BitReader; +#[doc = "Field `cr_urx_pce_clr` writer - "] +pub type CR_URX_PCE_CLR_W<'a, const O: u8> = + crate::BitWriter<'a, u32, UART_INT_CLEAR_SPEC, bool, O>; +#[doc = "Field `rsvd_6` reader - "] +pub type RSVD_6_R = crate::BitReader; +#[doc = "Field `rsvd_6` writer - "] +pub type RSVD_6_W<'a, const O: u8> = crate::BitWriter<'a, u32, UART_INT_CLEAR_SPEC, bool, O>; +#[doc = "Field `rsvd_7` reader - "] +pub type RSVD_7_R = crate::BitReader; +#[doc = "Field `rsvd_7` writer - "] +pub type RSVD_7_W<'a, const O: u8> = crate::BitWriter<'a, u32, UART_INT_CLEAR_SPEC, bool, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn cr_utx_end_clr(&self) -> CR_UTX_END_CLR_R { + CR_UTX_END_CLR_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bit 7"] + #[doc = "Bit 1"] #[inline(always)] - pub fn rsvd_7(&self) -> RSVD_7_R { - RSVD_7_R::new(((self.bits >> 7) & 0x01) != 0) + pub fn cr_urx_end_clr(&self) -> CR_URX_END_CLR_R { + CR_URX_END_CLR_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 6"] + #[doc = "Bit 2"] #[inline(always)] - pub fn rsvd_6(&self) -> RSVD_6_R { - RSVD_6_R::new(((self.bits >> 6) & 0x01) != 0) + pub fn rsvd_2(&self) -> RSVD_2_R { + RSVD_2_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 5"] + #[doc = "Bit 3"] #[inline(always)] - pub fn cr_urx_pce_clr(&self) -> CR_URX_PCE_CLR_R { - CR_URX_PCE_CLR_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn rsvd_3(&self) -> RSVD_3_R { + RSVD_3_R::new(((self.bits >> 3) & 1) != 0) } #[doc = "Bit 4"] #[inline(always)] pub fn cr_urx_rto_clr(&self) -> CR_URX_RTO_CLR_R { - CR_URX_RTO_CLR_R::new(((self.bits >> 4) & 0x01) != 0) - } - #[doc = "Bit 3"] - #[inline(always)] - pub fn rsvd_3(&self) -> RSVD_3_R { - RSVD_3_R::new(((self.bits >> 3) & 0x01) != 0) + CR_URX_RTO_CLR_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bit 5"] #[inline(always)] - pub fn rsvd_2(&self) -> RSVD_2_R { - RSVD_2_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn cr_urx_pce_clr(&self) -> CR_URX_PCE_CLR_R { + CR_URX_PCE_CLR_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 6"] #[inline(always)] - pub fn cr_urx_end_clr(&self) -> CR_URX_END_CLR_R { - CR_URX_END_CLR_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn rsvd_6(&self) -> RSVD_6_R { + RSVD_6_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 7"] #[inline(always)] - pub fn cr_utx_end_clr(&self) -> CR_UTX_END_CLR_R { - CR_UTX_END_CLR_R::new((self.bits & 0x01) != 0) + pub fn rsvd_7(&self) -> RSVD_7_R { + RSVD_7_R::new(((self.bits >> 7) & 1) != 0) } } impl W { - #[doc = "Bit 7"] + #[doc = "Bit 0"] #[inline(always)] - pub fn rsvd_7(&mut self) -> RSVD_7_W { - RSVD_7_W { w: self } + #[must_use] + pub fn cr_utx_end_clr(&mut self) -> CR_UTX_END_CLR_W<0> { + CR_UTX_END_CLR_W::new(self) } - #[doc = "Bit 6"] + #[doc = "Bit 1"] #[inline(always)] - pub fn rsvd_6(&mut self) -> RSVD_6_W { - RSVD_6_W { w: self } + #[must_use] + pub fn cr_urx_end_clr(&mut self) -> CR_URX_END_CLR_W<1> { + CR_URX_END_CLR_W::new(self) } - #[doc = "Bit 5"] + #[doc = "Bit 2"] #[inline(always)] - pub fn cr_urx_pce_clr(&mut self) -> CR_URX_PCE_CLR_W { - CR_URX_PCE_CLR_W { w: self } + #[must_use] + pub fn rsvd_2(&mut self) -> RSVD_2_W<2> { + RSVD_2_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 3"] #[inline(always)] - pub fn cr_urx_rto_clr(&mut self) -> CR_URX_RTO_CLR_W { - CR_URX_RTO_CLR_W { w: self } + #[must_use] + pub fn rsvd_3(&mut self) -> RSVD_3_W<3> { + RSVD_3_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bit 4"] #[inline(always)] - pub fn rsvd_3(&mut self) -> RSVD_3_W { - RSVD_3_W { w: self } + #[must_use] + pub fn cr_urx_rto_clr(&mut self) -> CR_URX_RTO_CLR_W<4> { + CR_URX_RTO_CLR_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bit 5"] #[inline(always)] - pub fn rsvd_2(&mut self) -> RSVD_2_W { - RSVD_2_W { w: self } + #[must_use] + pub fn cr_urx_pce_clr(&mut self) -> CR_URX_PCE_CLR_W<5> { + CR_URX_PCE_CLR_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 6"] #[inline(always)] - pub fn cr_urx_end_clr(&mut self) -> CR_URX_END_CLR_W { - CR_URX_END_CLR_W { w: self } + #[must_use] + pub fn rsvd_6(&mut self) -> RSVD_6_W<6> { + RSVD_6_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 7"] #[inline(always)] - pub fn cr_utx_end_clr(&mut self) -> CR_UTX_END_CLR_W { - CR_UTX_END_CLR_W { w: self } + #[must_use] + pub fn rsvd_7(&mut self) -> RSVD_7_W<7> { + RSVD_7_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -421,11 +180,10 @@ impl crate::Readable for UART_INT_CLEAR_SPEC { #[doc = "`write(|w| ..)` method takes [uart_int_clear::W](W) writer structure"] impl crate::Writable for UART_INT_CLEAR_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets uart_int_clear to value 0"] impl crate::Resettable for UART_INT_CLEAR_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/uart/uart_int_en.rs b/src/uart/uart_int_en.rs index 4782c10..857a4ce 100644 --- a/src/uart/uart_int_en.rs +++ b/src/uart/uart_int_en.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,383 +28,137 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `cr_urx_fer_en` reader - "] -pub struct CR_URX_FER_EN_R(crate::FieldReader); -impl CR_URX_FER_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_URX_FER_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_URX_FER_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_urx_fer_en` writer - "] -pub struct CR_URX_FER_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_URX_FER_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7); - self.w - } -} -#[doc = "Field `cr_utx_fer_en` reader - "] -pub struct CR_UTX_FER_EN_R(crate::FieldReader); -impl CR_UTX_FER_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_UTX_FER_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_UTX_FER_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_utx_fer_en` writer - "] -pub struct CR_UTX_FER_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_UTX_FER_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w - } -} -#[doc = "Field `cr_urx_pce_en` reader - "] -pub struct CR_URX_PCE_EN_R(crate::FieldReader); -impl CR_URX_PCE_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_URX_PCE_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_URX_PCE_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_urx_pce_en` writer - "] -pub struct CR_URX_PCE_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_URX_PCE_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w - } -} -#[doc = "Field `cr_urx_rto_en` reader - "] -pub struct CR_URX_RTO_EN_R(crate::FieldReader); -impl CR_URX_RTO_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_URX_RTO_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_URX_RTO_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_urx_rto_en` writer - "] -pub struct CR_URX_RTO_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_URX_RTO_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} -#[doc = "Field `cr_urx_fifo_en` reader - "] -pub struct CR_URX_FIFO_EN_R(crate::FieldReader); -impl CR_URX_FIFO_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_URX_FIFO_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_URX_FIFO_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_urx_fifo_en` writer - "] -pub struct CR_URX_FIFO_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_URX_FIFO_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `cr_utx_fifo_en` reader - "] -pub struct CR_UTX_FIFO_EN_R(crate::FieldReader); -impl CR_UTX_FIFO_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_UTX_FIFO_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_UTX_FIFO_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_utx_fifo_en` writer - "] -pub struct CR_UTX_FIFO_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_UTX_FIFO_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `cr_urx_end_en` reader - "] -pub struct CR_URX_END_EN_R(crate::FieldReader); -impl CR_URX_END_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_URX_END_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_URX_END_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_urx_end_en` writer - "] -pub struct CR_URX_END_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_URX_END_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `cr_utx_end_en` reader - "] -pub struct CR_UTX_END_EN_R(crate::FieldReader); -impl CR_UTX_END_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_UTX_END_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_UTX_END_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_UTX_END_EN_R = crate::BitReader; #[doc = "Field `cr_utx_end_en` writer - "] -pub struct CR_UTX_END_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_UTX_END_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type CR_UTX_END_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, UART_INT_EN_SPEC, bool, O>; +#[doc = "Field `cr_urx_end_en` reader - "] +pub type CR_URX_END_EN_R = crate::BitReader; +#[doc = "Field `cr_urx_end_en` writer - "] +pub type CR_URX_END_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, UART_INT_EN_SPEC, bool, O>; +#[doc = "Field `cr_utx_fifo_en` reader - "] +pub type CR_UTX_FIFO_EN_R = crate::BitReader; +#[doc = "Field `cr_utx_fifo_en` writer - "] +pub type CR_UTX_FIFO_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, UART_INT_EN_SPEC, bool, O>; +#[doc = "Field `cr_urx_fifo_en` reader - "] +pub type CR_URX_FIFO_EN_R = crate::BitReader; +#[doc = "Field `cr_urx_fifo_en` writer - "] +pub type CR_URX_FIFO_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, UART_INT_EN_SPEC, bool, O>; +#[doc = "Field `cr_urx_rto_en` reader - "] +pub type CR_URX_RTO_EN_R = crate::BitReader; +#[doc = "Field `cr_urx_rto_en` writer - "] +pub type CR_URX_RTO_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, UART_INT_EN_SPEC, bool, O>; +#[doc = "Field `cr_urx_pce_en` reader - "] +pub type CR_URX_PCE_EN_R = crate::BitReader; +#[doc = "Field `cr_urx_pce_en` writer - "] +pub type CR_URX_PCE_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, UART_INT_EN_SPEC, bool, O>; +#[doc = "Field `cr_utx_fer_en` reader - "] +pub type CR_UTX_FER_EN_R = crate::BitReader; +#[doc = "Field `cr_utx_fer_en` writer - "] +pub type CR_UTX_FER_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, UART_INT_EN_SPEC, bool, O>; +#[doc = "Field `cr_urx_fer_en` reader - "] +pub type CR_URX_FER_EN_R = crate::BitReader; +#[doc = "Field `cr_urx_fer_en` writer - "] +pub type CR_URX_FER_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, UART_INT_EN_SPEC, bool, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn cr_utx_end_en(&self) -> CR_UTX_END_EN_R { + CR_UTX_END_EN_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bit 7"] + #[doc = "Bit 1"] #[inline(always)] - pub fn cr_urx_fer_en(&self) -> CR_URX_FER_EN_R { - CR_URX_FER_EN_R::new(((self.bits >> 7) & 0x01) != 0) + pub fn cr_urx_end_en(&self) -> CR_URX_END_EN_R { + CR_URX_END_EN_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 6"] + #[doc = "Bit 2"] #[inline(always)] - pub fn cr_utx_fer_en(&self) -> CR_UTX_FER_EN_R { - CR_UTX_FER_EN_R::new(((self.bits >> 6) & 0x01) != 0) + pub fn cr_utx_fifo_en(&self) -> CR_UTX_FIFO_EN_R { + CR_UTX_FIFO_EN_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 5"] + #[doc = "Bit 3"] #[inline(always)] - pub fn cr_urx_pce_en(&self) -> CR_URX_PCE_EN_R { - CR_URX_PCE_EN_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn cr_urx_fifo_en(&self) -> CR_URX_FIFO_EN_R { + CR_URX_FIFO_EN_R::new(((self.bits >> 3) & 1) != 0) } #[doc = "Bit 4"] #[inline(always)] pub fn cr_urx_rto_en(&self) -> CR_URX_RTO_EN_R { - CR_URX_RTO_EN_R::new(((self.bits >> 4) & 0x01) != 0) - } - #[doc = "Bit 3"] - #[inline(always)] - pub fn cr_urx_fifo_en(&self) -> CR_URX_FIFO_EN_R { - CR_URX_FIFO_EN_R::new(((self.bits >> 3) & 0x01) != 0) + CR_URX_RTO_EN_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bit 5"] #[inline(always)] - pub fn cr_utx_fifo_en(&self) -> CR_UTX_FIFO_EN_R { - CR_UTX_FIFO_EN_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn cr_urx_pce_en(&self) -> CR_URX_PCE_EN_R { + CR_URX_PCE_EN_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 6"] #[inline(always)] - pub fn cr_urx_end_en(&self) -> CR_URX_END_EN_R { - CR_URX_END_EN_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn cr_utx_fer_en(&self) -> CR_UTX_FER_EN_R { + CR_UTX_FER_EN_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 7"] #[inline(always)] - pub fn cr_utx_end_en(&self) -> CR_UTX_END_EN_R { - CR_UTX_END_EN_R::new((self.bits & 0x01) != 0) + pub fn cr_urx_fer_en(&self) -> CR_URX_FER_EN_R { + CR_URX_FER_EN_R::new(((self.bits >> 7) & 1) != 0) } } impl W { - #[doc = "Bit 7"] + #[doc = "Bit 0"] #[inline(always)] - pub fn cr_urx_fer_en(&mut self) -> CR_URX_FER_EN_W { - CR_URX_FER_EN_W { w: self } + #[must_use] + pub fn cr_utx_end_en(&mut self) -> CR_UTX_END_EN_W<0> { + CR_UTX_END_EN_W::new(self) } - #[doc = "Bit 6"] + #[doc = "Bit 1"] #[inline(always)] - pub fn cr_utx_fer_en(&mut self) -> CR_UTX_FER_EN_W { - CR_UTX_FER_EN_W { w: self } + #[must_use] + pub fn cr_urx_end_en(&mut self) -> CR_URX_END_EN_W<1> { + CR_URX_END_EN_W::new(self) } - #[doc = "Bit 5"] + #[doc = "Bit 2"] #[inline(always)] - pub fn cr_urx_pce_en(&mut self) -> CR_URX_PCE_EN_W { - CR_URX_PCE_EN_W { w: self } + #[must_use] + pub fn cr_utx_fifo_en(&mut self) -> CR_UTX_FIFO_EN_W<2> { + CR_UTX_FIFO_EN_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 3"] #[inline(always)] - pub fn cr_urx_rto_en(&mut self) -> CR_URX_RTO_EN_W { - CR_URX_RTO_EN_W { w: self } + #[must_use] + pub fn cr_urx_fifo_en(&mut self) -> CR_URX_FIFO_EN_W<3> { + CR_URX_FIFO_EN_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bit 4"] #[inline(always)] - pub fn cr_urx_fifo_en(&mut self) -> CR_URX_FIFO_EN_W { - CR_URX_FIFO_EN_W { w: self } + #[must_use] + pub fn cr_urx_rto_en(&mut self) -> CR_URX_RTO_EN_W<4> { + CR_URX_RTO_EN_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bit 5"] #[inline(always)] - pub fn cr_utx_fifo_en(&mut self) -> CR_UTX_FIFO_EN_W { - CR_UTX_FIFO_EN_W { w: self } + #[must_use] + pub fn cr_urx_pce_en(&mut self) -> CR_URX_PCE_EN_W<5> { + CR_URX_PCE_EN_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 6"] #[inline(always)] - pub fn cr_urx_end_en(&mut self) -> CR_URX_END_EN_W { - CR_URX_END_EN_W { w: self } + #[must_use] + pub fn cr_utx_fer_en(&mut self) -> CR_UTX_FER_EN_W<6> { + CR_UTX_FER_EN_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 7"] #[inline(always)] - pub fn cr_utx_end_en(&mut self) -> CR_UTX_END_EN_W { - CR_UTX_END_EN_W { w: self } + #[must_use] + pub fn cr_urx_fer_en(&mut self) -> CR_URX_FER_EN_W<7> { + CR_URX_FER_EN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -421,11 +176,10 @@ impl crate::Readable for UART_INT_EN_SPEC { #[doc = "`write(|w| ..)` method takes [uart_int_en::W](W) writer structure"] impl crate::Writable for UART_INT_EN_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets uart_int_en to value 0xff"] impl crate::Resettable for UART_INT_EN_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xff - } + const RESET_VALUE: Self::Ux = 0xff; } diff --git a/src/uart/uart_int_mask.rs b/src/uart/uart_int_mask.rs index 6c20d2d..9329606 100644 --- a/src/uart/uart_int_mask.rs +++ b/src/uart/uart_int_mask.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,383 +28,145 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `cr_urx_fer_mask` reader - "] -pub struct CR_URX_FER_MASK_R(crate::FieldReader); -impl CR_URX_FER_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - CR_URX_FER_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_URX_FER_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_urx_fer_mask` writer - "] -pub struct CR_URX_FER_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> CR_URX_FER_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7); - self.w - } -} -#[doc = "Field `cr_utx_fer_mask` reader - "] -pub struct CR_UTX_FER_MASK_R(crate::FieldReader); -impl CR_UTX_FER_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - CR_UTX_FER_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_UTX_FER_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_utx_fer_mask` writer - "] -pub struct CR_UTX_FER_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> CR_UTX_FER_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w - } -} -#[doc = "Field `cr_urx_pce_mask` reader - "] -pub struct CR_URX_PCE_MASK_R(crate::FieldReader); -impl CR_URX_PCE_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - CR_URX_PCE_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_URX_PCE_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_urx_pce_mask` writer - "] -pub struct CR_URX_PCE_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> CR_URX_PCE_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w - } -} -#[doc = "Field `cr_urx_rto_mask` reader - "] -pub struct CR_URX_RTO_MASK_R(crate::FieldReader); -impl CR_URX_RTO_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - CR_URX_RTO_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_URX_RTO_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_urx_rto_mask` writer - "] -pub struct CR_URX_RTO_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> CR_URX_RTO_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} -#[doc = "Field `cr_urx_fifo_mask` reader - "] -pub struct CR_URX_FIFO_MASK_R(crate::FieldReader); -impl CR_URX_FIFO_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - CR_URX_FIFO_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_URX_FIFO_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_urx_fifo_mask` writer - "] -pub struct CR_URX_FIFO_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> CR_URX_FIFO_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} -#[doc = "Field `cr_utx_fifo_mask` reader - "] -pub struct CR_UTX_FIFO_MASK_R(crate::FieldReader); -impl CR_UTX_FIFO_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - CR_UTX_FIFO_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_UTX_FIFO_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_utx_fifo_mask` writer - "] -pub struct CR_UTX_FIFO_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> CR_UTX_FIFO_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `cr_urx_end_mask` reader - "] -pub struct CR_URX_END_MASK_R(crate::FieldReader); -impl CR_URX_END_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - CR_URX_END_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_URX_END_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_urx_end_mask` writer - "] -pub struct CR_URX_END_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> CR_URX_END_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} #[doc = "Field `cr_utx_end_mask` reader - "] -pub struct CR_UTX_END_MASK_R(crate::FieldReader); -impl CR_UTX_END_MASK_R { - pub(crate) fn new(bits: bool) -> Self { - CR_UTX_END_MASK_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_UTX_END_MASK_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_UTX_END_MASK_R = crate::BitReader; #[doc = "Field `cr_utx_end_mask` writer - "] -pub struct CR_UTX_END_MASK_W<'a> { - w: &'a mut W, -} -impl<'a> CR_UTX_END_MASK_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type CR_UTX_END_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, UART_INT_MASK_SPEC, bool, O>; +#[doc = "Field `cr_urx_end_mask` reader - "] +pub type CR_URX_END_MASK_R = crate::BitReader; +#[doc = "Field `cr_urx_end_mask` writer - "] +pub type CR_URX_END_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, UART_INT_MASK_SPEC, bool, O>; +#[doc = "Field `cr_utx_fifo_mask` reader - "] +pub type CR_UTX_FIFO_MASK_R = crate::BitReader; +#[doc = "Field `cr_utx_fifo_mask` writer - "] +pub type CR_UTX_FIFO_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, UART_INT_MASK_SPEC, bool, O>; +#[doc = "Field `cr_urx_fifo_mask` reader - "] +pub type CR_URX_FIFO_MASK_R = crate::BitReader; +#[doc = "Field `cr_urx_fifo_mask` writer - "] +pub type CR_URX_FIFO_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, UART_INT_MASK_SPEC, bool, O>; +#[doc = "Field `cr_urx_rto_mask` reader - "] +pub type CR_URX_RTO_MASK_R = crate::BitReader; +#[doc = "Field `cr_urx_rto_mask` writer - "] +pub type CR_URX_RTO_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, UART_INT_MASK_SPEC, bool, O>; +#[doc = "Field `cr_urx_pce_mask` reader - "] +pub type CR_URX_PCE_MASK_R = crate::BitReader; +#[doc = "Field `cr_urx_pce_mask` writer - "] +pub type CR_URX_PCE_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, UART_INT_MASK_SPEC, bool, O>; +#[doc = "Field `cr_utx_fer_mask` reader - "] +pub type CR_UTX_FER_MASK_R = crate::BitReader; +#[doc = "Field `cr_utx_fer_mask` writer - "] +pub type CR_UTX_FER_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, UART_INT_MASK_SPEC, bool, O>; +#[doc = "Field `cr_urx_fer_mask` reader - "] +pub type CR_URX_FER_MASK_R = crate::BitReader; +#[doc = "Field `cr_urx_fer_mask` writer - "] +pub type CR_URX_FER_MASK_W<'a, const O: u8> = + crate::BitWriter<'a, u32, UART_INT_MASK_SPEC, bool, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn cr_utx_end_mask(&self) -> CR_UTX_END_MASK_R { + CR_UTX_END_MASK_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bit 7"] + #[doc = "Bit 1"] #[inline(always)] - pub fn cr_urx_fer_mask(&self) -> CR_URX_FER_MASK_R { - CR_URX_FER_MASK_R::new(((self.bits >> 7) & 0x01) != 0) + pub fn cr_urx_end_mask(&self) -> CR_URX_END_MASK_R { + CR_URX_END_MASK_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 6"] + #[doc = "Bit 2"] #[inline(always)] - pub fn cr_utx_fer_mask(&self) -> CR_UTX_FER_MASK_R { - CR_UTX_FER_MASK_R::new(((self.bits >> 6) & 0x01) != 0) + pub fn cr_utx_fifo_mask(&self) -> CR_UTX_FIFO_MASK_R { + CR_UTX_FIFO_MASK_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 5"] + #[doc = "Bit 3"] #[inline(always)] - pub fn cr_urx_pce_mask(&self) -> CR_URX_PCE_MASK_R { - CR_URX_PCE_MASK_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn cr_urx_fifo_mask(&self) -> CR_URX_FIFO_MASK_R { + CR_URX_FIFO_MASK_R::new(((self.bits >> 3) & 1) != 0) } #[doc = "Bit 4"] #[inline(always)] pub fn cr_urx_rto_mask(&self) -> CR_URX_RTO_MASK_R { - CR_URX_RTO_MASK_R::new(((self.bits >> 4) & 0x01) != 0) - } - #[doc = "Bit 3"] - #[inline(always)] - pub fn cr_urx_fifo_mask(&self) -> CR_URX_FIFO_MASK_R { - CR_URX_FIFO_MASK_R::new(((self.bits >> 3) & 0x01) != 0) + CR_URX_RTO_MASK_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 2"] + #[doc = "Bit 5"] #[inline(always)] - pub fn cr_utx_fifo_mask(&self) -> CR_UTX_FIFO_MASK_R { - CR_UTX_FIFO_MASK_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn cr_urx_pce_mask(&self) -> CR_URX_PCE_MASK_R { + CR_URX_PCE_MASK_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 6"] #[inline(always)] - pub fn cr_urx_end_mask(&self) -> CR_URX_END_MASK_R { - CR_URX_END_MASK_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn cr_utx_fer_mask(&self) -> CR_UTX_FER_MASK_R { + CR_UTX_FER_MASK_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 7"] #[inline(always)] - pub fn cr_utx_end_mask(&self) -> CR_UTX_END_MASK_R { - CR_UTX_END_MASK_R::new((self.bits & 0x01) != 0) + pub fn cr_urx_fer_mask(&self) -> CR_URX_FER_MASK_R { + CR_URX_FER_MASK_R::new(((self.bits >> 7) & 1) != 0) } } impl W { - #[doc = "Bit 7"] + #[doc = "Bit 0"] #[inline(always)] - pub fn cr_urx_fer_mask(&mut self) -> CR_URX_FER_MASK_W { - CR_URX_FER_MASK_W { w: self } + #[must_use] + pub fn cr_utx_end_mask(&mut self) -> CR_UTX_END_MASK_W<0> { + CR_UTX_END_MASK_W::new(self) } - #[doc = "Bit 6"] + #[doc = "Bit 1"] #[inline(always)] - pub fn cr_utx_fer_mask(&mut self) -> CR_UTX_FER_MASK_W { - CR_UTX_FER_MASK_W { w: self } + #[must_use] + pub fn cr_urx_end_mask(&mut self) -> CR_URX_END_MASK_W<1> { + CR_URX_END_MASK_W::new(self) } - #[doc = "Bit 5"] + #[doc = "Bit 2"] #[inline(always)] - pub fn cr_urx_pce_mask(&mut self) -> CR_URX_PCE_MASK_W { - CR_URX_PCE_MASK_W { w: self } + #[must_use] + pub fn cr_utx_fifo_mask(&mut self) -> CR_UTX_FIFO_MASK_W<2> { + CR_UTX_FIFO_MASK_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 3"] #[inline(always)] - pub fn cr_urx_rto_mask(&mut self) -> CR_URX_RTO_MASK_W { - CR_URX_RTO_MASK_W { w: self } + #[must_use] + pub fn cr_urx_fifo_mask(&mut self) -> CR_URX_FIFO_MASK_W<3> { + CR_URX_FIFO_MASK_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bit 4"] #[inline(always)] - pub fn cr_urx_fifo_mask(&mut self) -> CR_URX_FIFO_MASK_W { - CR_URX_FIFO_MASK_W { w: self } + #[must_use] + pub fn cr_urx_rto_mask(&mut self) -> CR_URX_RTO_MASK_W<4> { + CR_URX_RTO_MASK_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bit 5"] #[inline(always)] - pub fn cr_utx_fifo_mask(&mut self) -> CR_UTX_FIFO_MASK_W { - CR_UTX_FIFO_MASK_W { w: self } + #[must_use] + pub fn cr_urx_pce_mask(&mut self) -> CR_URX_PCE_MASK_W<5> { + CR_URX_PCE_MASK_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bit 6"] #[inline(always)] - pub fn cr_urx_end_mask(&mut self) -> CR_URX_END_MASK_W { - CR_URX_END_MASK_W { w: self } + #[must_use] + pub fn cr_utx_fer_mask(&mut self) -> CR_UTX_FER_MASK_W<6> { + CR_UTX_FER_MASK_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bit 7"] #[inline(always)] - pub fn cr_utx_end_mask(&mut self) -> CR_UTX_END_MASK_W { - CR_UTX_END_MASK_W { w: self } + #[must_use] + pub fn cr_urx_fer_mask(&mut self) -> CR_URX_FER_MASK_W<7> { + CR_URX_FER_MASK_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -421,11 +184,10 @@ impl crate::Readable for UART_INT_MASK_SPEC { #[doc = "`write(|w| ..)` method takes [uart_int_mask::W](W) writer structure"] impl crate::Writable for UART_INT_MASK_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets uart_int_mask to value 0xff"] impl crate::Resettable for UART_INT_MASK_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0xff - } + const RESET_VALUE: Self::Ux = 0xff; } diff --git a/src/uart/uart_int_sts.rs b/src/uart/uart_int_sts.rs index 5c06957..1ab12a5 100644 --- a/src/uart/uart_int_sts.rs +++ b/src/uart/uart_int_sts.rs @@ -7,163 +7,68 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `urx_fer_int` reader - "] -pub struct URX_FER_INT_R(crate::FieldReader); -impl URX_FER_INT_R { - pub(crate) fn new(bits: bool) -> Self { - URX_FER_INT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for URX_FER_INT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `utx_fer_int` reader - "] -pub struct UTX_FER_INT_R(crate::FieldReader); -impl UTX_FER_INT_R { - pub(crate) fn new(bits: bool) -> Self { - UTX_FER_INT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for UTX_FER_INT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `urx_pce_int` reader - "] -pub struct URX_PCE_INT_R(crate::FieldReader); -impl URX_PCE_INT_R { - pub(crate) fn new(bits: bool) -> Self { - URX_PCE_INT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for URX_PCE_INT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `urx_rto_int` reader - "] -pub struct URX_RTO_INT_R(crate::FieldReader); -impl URX_RTO_INT_R { - pub(crate) fn new(bits: bool) -> Self { - URX_RTO_INT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for URX_RTO_INT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `urx_fifo_int` reader - "] -pub struct URX_FIFO_INT_R(crate::FieldReader); -impl URX_FIFO_INT_R { - pub(crate) fn new(bits: bool) -> Self { - URX_FIFO_INT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for URX_FIFO_INT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `utx_fifo_int` reader - "] -pub struct UTX_FIFO_INT_R(crate::FieldReader); -impl UTX_FIFO_INT_R { - pub(crate) fn new(bits: bool) -> Self { - UTX_FIFO_INT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for UTX_FIFO_INT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `urx_end_int` reader - "] -pub struct URX_END_INT_R(crate::FieldReader); -impl URX_END_INT_R { - pub(crate) fn new(bits: bool) -> Self { - URX_END_INT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for URX_END_INT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} #[doc = "Field `utx_end_int` reader - "] -pub struct UTX_END_INT_R(crate::FieldReader); -impl UTX_END_INT_R { - pub(crate) fn new(bits: bool) -> Self { - UTX_END_INT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for UTX_END_INT_R { - type Target = crate::FieldReader; +pub type UTX_END_INT_R = crate::BitReader; +#[doc = "Field `urx_end_int` reader - "] +pub type URX_END_INT_R = crate::BitReader; +#[doc = "Field `utx_fifo_int` reader - "] +pub type UTX_FIFO_INT_R = crate::BitReader; +#[doc = "Field `urx_fifo_int` reader - "] +pub type URX_FIFO_INT_R = crate::BitReader; +#[doc = "Field `urx_rto_int` reader - "] +pub type URX_RTO_INT_R = crate::BitReader; +#[doc = "Field `urx_pce_int` reader - "] +pub type URX_PCE_INT_R = crate::BitReader; +#[doc = "Field `utx_fer_int` reader - "] +pub type UTX_FER_INT_R = crate::BitReader; +#[doc = "Field `urx_fer_int` reader - "] +pub type URX_FER_INT_R = crate::BitReader; +impl R { + #[doc = "Bit 0"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn utx_end_int(&self) -> UTX_END_INT_R { + UTX_END_INT_R::new((self.bits & 1) != 0) } -} -impl R { - #[doc = "Bit 7"] + #[doc = "Bit 1"] #[inline(always)] - pub fn urx_fer_int(&self) -> URX_FER_INT_R { - URX_FER_INT_R::new(((self.bits >> 7) & 0x01) != 0) + pub fn urx_end_int(&self) -> URX_END_INT_R { + URX_END_INT_R::new(((self.bits >> 1) & 1) != 0) } - #[doc = "Bit 6"] + #[doc = "Bit 2"] #[inline(always)] - pub fn utx_fer_int(&self) -> UTX_FER_INT_R { - UTX_FER_INT_R::new(((self.bits >> 6) & 0x01) != 0) + pub fn utx_fifo_int(&self) -> UTX_FIFO_INT_R { + UTX_FIFO_INT_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = "Bit 5"] + #[doc = "Bit 3"] #[inline(always)] - pub fn urx_pce_int(&self) -> URX_PCE_INT_R { - URX_PCE_INT_R::new(((self.bits >> 5) & 0x01) != 0) + pub fn urx_fifo_int(&self) -> URX_FIFO_INT_R { + URX_FIFO_INT_R::new(((self.bits >> 3) & 1) != 0) } #[doc = "Bit 4"] #[inline(always)] pub fn urx_rto_int(&self) -> URX_RTO_INT_R { - URX_RTO_INT_R::new(((self.bits >> 4) & 0x01) != 0) + URX_RTO_INT_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = "Bit 3"] - #[inline(always)] - pub fn urx_fifo_int(&self) -> URX_FIFO_INT_R { - URX_FIFO_INT_R::new(((self.bits >> 3) & 0x01) != 0) - } - #[doc = "Bit 2"] + #[doc = "Bit 5"] #[inline(always)] - pub fn utx_fifo_int(&self) -> UTX_FIFO_INT_R { - UTX_FIFO_INT_R::new(((self.bits >> 2) & 0x01) != 0) + pub fn urx_pce_int(&self) -> URX_PCE_INT_R { + URX_PCE_INT_R::new(((self.bits >> 5) & 1) != 0) } - #[doc = "Bit 1"] + #[doc = "Bit 6"] #[inline(always)] - pub fn urx_end_int(&self) -> URX_END_INT_R { - URX_END_INT_R::new(((self.bits >> 1) & 0x01) != 0) + pub fn utx_fer_int(&self) -> UTX_FER_INT_R { + UTX_FER_INT_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = "Bit 0"] + #[doc = "Bit 7"] #[inline(always)] - pub fn utx_end_int(&self) -> UTX_END_INT_R { - UTX_END_INT_R::new((self.bits & 0x01) != 0) + pub fn urx_fer_int(&self) -> URX_FER_INT_R { + URX_FER_INT_R::new(((self.bits >> 7) & 1) != 0) } } #[doc = "UART interrupt 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 [uart_int_sts](index.html) module"] @@ -177,8 +82,5 @@ impl crate::Readable for UART_INT_STS_SPEC { } #[doc = "`reset()` method sets uart_int_sts to value 0"] impl crate::Resettable for UART_INT_STS_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/uart/uart_status.rs b/src/uart/uart_status.rs index 5fdbb04..984c033 100644 --- a/src/uart/uart_status.rs +++ b/src/uart/uart_status.rs @@ -7,49 +7,26 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } } -#[doc = "Field `sts_urx_bus_busy` reader - "] -pub struct STS_URX_BUS_BUSY_R(crate::FieldReader); -impl STS_URX_BUS_BUSY_R { - pub(crate) fn new(bits: bool) -> Self { - STS_URX_BUS_BUSY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for STS_URX_BUS_BUSY_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} #[doc = "Field `sts_utx_bus_busy` reader - "] -pub struct STS_UTX_BUS_BUSY_R(crate::FieldReader); -impl STS_UTX_BUS_BUSY_R { - pub(crate) fn new(bits: bool) -> Self { - STS_UTX_BUS_BUSY_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for STS_UTX_BUS_BUSY_R { - type Target = crate::FieldReader; +pub type STS_UTX_BUS_BUSY_R = crate::BitReader; +#[doc = "Field `sts_urx_bus_busy` reader - "] +pub type STS_URX_BUS_BUSY_R = crate::BitReader; +impl R { + #[doc = "Bit 0"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn sts_utx_bus_busy(&self) -> STS_UTX_BUS_BUSY_R { + STS_UTX_BUS_BUSY_R::new((self.bits & 1) != 0) } -} -impl R { #[doc = "Bit 1"] #[inline(always)] pub fn sts_urx_bus_busy(&self) -> STS_URX_BUS_BUSY_R { - STS_URX_BUS_BUSY_R::new(((self.bits >> 1) & 0x01) != 0) - } - #[doc = "Bit 0"] - #[inline(always)] - pub fn sts_utx_bus_busy(&self) -> STS_UTX_BUS_BUSY_R { - STS_UTX_BUS_BUSY_R::new((self.bits & 0x01) != 0) + STS_URX_BUS_BUSY_R::new(((self.bits >> 1) & 1) != 0) } } #[doc = "uart_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 [uart_status](index.html) module"] @@ -63,8 +40,5 @@ impl crate::Readable for UART_STATUS_SPEC { } #[doc = "`reset()` method sets uart_status to value 0"] impl crate::Resettable for UART_STATUS_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0 - } + const RESET_VALUE: Self::Ux = 0; } diff --git a/src/uart/urx_config.rs b/src/uart/urx_config.rs index ea25ca6..3070d7c 100644 --- a/src/uart/urx_config.rs +++ b/src/uart/urx_config.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,537 +28,201 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `cr_urx_len` reader - "] -pub struct CR_URX_LEN_R(crate::FieldReader); -impl CR_URX_LEN_R { - pub(crate) fn new(bits: u16) -> Self { - CR_URX_LEN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_URX_LEN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_urx_len` writer - "] -pub struct CR_URX_LEN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_URX_LEN_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xffff << 16)) | ((value as u32 & 0xffff) << 16); - self.w - } -} -#[doc = "Field `cr_urx_deg_cnt` reader - "] -pub struct CR_URX_DEG_CNT_R(crate::FieldReader); -impl CR_URX_DEG_CNT_R { - pub(crate) fn new(bits: u8) -> Self { - CR_URX_DEG_CNT_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_URX_DEG_CNT_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_urx_deg_cnt` writer - "] -pub struct CR_URX_DEG_CNT_W<'a> { - w: &'a mut W, -} -impl<'a> CR_URX_DEG_CNT_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x0f << 12)) | ((value as u32 & 0x0f) << 12); - self.w - } -} -#[doc = "Field `cr_urx_deg_en` reader - "] -pub struct CR_URX_DEG_EN_R(crate::FieldReader); -impl CR_URX_DEG_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_URX_DEG_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_URX_DEG_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_urx_deg_en` writer - "] -pub struct CR_URX_DEG_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_URX_DEG_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); - self.w - } -} -#[doc = "Field `cr_urx_bit_cnt_d` reader - "] -pub struct CR_URX_BIT_CNT_D_R(crate::FieldReader); -impl CR_URX_BIT_CNT_D_R { - pub(crate) fn new(bits: u8) -> Self { - CR_URX_BIT_CNT_D_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_URX_BIT_CNT_D_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_urx_bit_cnt_d` writer - "] -pub struct CR_URX_BIT_CNT_D_W<'a> { - w: &'a mut W, -} -impl<'a> CR_URX_BIT_CNT_D_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 8)) | ((value as u32 & 0x07) << 8); - self.w - } -} -#[doc = "Field `cr_urx_ir_inv` reader - "] -pub struct CR_URX_IR_INV_R(crate::FieldReader); -impl CR_URX_IR_INV_R { - pub(crate) fn new(bits: bool) -> Self { - CR_URX_IR_INV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_URX_IR_INV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_urx_ir_inv` writer - "] -pub struct CR_URX_IR_INV_W<'a> { - w: &'a mut W, -} -impl<'a> CR_URX_IR_INV_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7); - self.w - } -} -#[doc = "Field `cr_urx_ir_en` reader - "] -pub struct CR_URX_IR_EN_R(crate::FieldReader); -impl CR_URX_IR_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_URX_IR_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_URX_IR_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_urx_ir_en` writer - "] -pub struct CR_URX_IR_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_URX_IR_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w - } -} -#[doc = "Field `cr_urx_prt_sel` reader - "] -pub struct CR_URX_PRT_SEL_R(crate::FieldReader); -impl CR_URX_PRT_SEL_R { - pub(crate) fn new(bits: bool) -> Self { - CR_URX_PRT_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_URX_PRT_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_urx_prt_sel` writer - "] -pub struct CR_URX_PRT_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> CR_URX_PRT_SEL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w - } -} -#[doc = "Field `cr_urx_prt_en` reader - "] -pub struct CR_URX_PRT_EN_R(crate::FieldReader); -impl CR_URX_PRT_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_URX_PRT_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_URX_PRT_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_urx_prt_en` writer - "] -pub struct CR_URX_PRT_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_URX_PRT_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} -#[doc = "Field `cr_urx_abr_en` reader - "] -pub struct CR_URX_ABR_EN_R(crate::FieldReader); -impl CR_URX_ABR_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_URX_ABR_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_URX_ABR_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_urx_abr_en` writer - "] -pub struct CR_URX_ABR_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_URX_ABR_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); - self.w - } -} +#[doc = "Field `cr_urx_en` reader - "] +pub type CR_URX_EN_R = crate::BitReader; +#[doc = "Field `cr_urx_en` writer - "] +pub type CR_URX_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, URX_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_urx_rts_sw_mode` reader - "] +pub type CR_URX_RTS_SW_MODE_R = crate::BitReader; +#[doc = "Field `cr_urx_rts_sw_mode` writer - "] +pub type CR_URX_RTS_SW_MODE_W<'a, const O: u8> = + crate::BitWriter<'a, u32, URX_CONFIG_SPEC, bool, O>; #[doc = "Field `cr_urx_rts_sw_val` reader - "] -pub struct CR_URX_RTS_SW_VAL_R(crate::FieldReader); -impl CR_URX_RTS_SW_VAL_R { - pub(crate) fn new(bits: bool) -> Self { - CR_URX_RTS_SW_VAL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_URX_RTS_SW_VAL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_URX_RTS_SW_VAL_R = crate::BitReader; #[doc = "Field `cr_urx_rts_sw_val` writer - "] -pub struct CR_URX_RTS_SW_VAL_W<'a> { - w: &'a mut W, -} -impl<'a> CR_URX_RTS_SW_VAL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type CR_URX_RTS_SW_VAL_W<'a, const O: u8> = crate::BitWriter<'a, u32, URX_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_urx_abr_en` reader - "] +pub type CR_URX_ABR_EN_R = crate::BitReader; +#[doc = "Field `cr_urx_abr_en` writer - "] +pub type CR_URX_ABR_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, URX_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_urx_prt_en` reader - "] +pub type CR_URX_PRT_EN_R = crate::BitReader; +#[doc = "Field `cr_urx_prt_en` writer - "] +pub type CR_URX_PRT_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, URX_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_urx_prt_sel` reader - "] +pub type CR_URX_PRT_SEL_R = crate::BitReader; +#[doc = "Field `cr_urx_prt_sel` writer - "] +pub type CR_URX_PRT_SEL_W<'a, const O: u8> = crate::BitWriter<'a, u32, URX_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_urx_ir_en` reader - "] +pub type CR_URX_IR_EN_R = crate::BitReader; +#[doc = "Field `cr_urx_ir_en` writer - "] +pub type CR_URX_IR_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, URX_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_urx_ir_inv` reader - "] +pub type CR_URX_IR_INV_R = crate::BitReader; +#[doc = "Field `cr_urx_ir_inv` writer - "] +pub type CR_URX_IR_INV_W<'a, const O: u8> = crate::BitWriter<'a, u32, URX_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_urx_bit_cnt_d` reader - "] +pub type CR_URX_BIT_CNT_D_R = crate::FieldReader; +#[doc = "Field `cr_urx_bit_cnt_d` writer - "] +pub type CR_URX_BIT_CNT_D_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, URX_CONFIG_SPEC, u8, u8, 3, O>; +#[doc = "Field `cr_urx_deg_en` reader - "] +pub type CR_URX_DEG_EN_R = crate::BitReader; +#[doc = "Field `cr_urx_deg_en` writer - "] +pub type CR_URX_DEG_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, URX_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_urx_deg_cnt` reader - "] +pub type CR_URX_DEG_CNT_R = crate::FieldReader; +#[doc = "Field `cr_urx_deg_cnt` writer - "] +pub type CR_URX_DEG_CNT_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, URX_CONFIG_SPEC, u8, u8, 4, O>; +#[doc = "Field `cr_urx_len` reader - "] +pub type CR_URX_LEN_R = crate::FieldReader; +#[doc = "Field `cr_urx_len` writer - "] +pub type CR_URX_LEN_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, URX_CONFIG_SPEC, u16, u16, 16, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `cr_urx_rts_sw_mode` reader - "] -pub struct CR_URX_RTS_SW_MODE_R(crate::FieldReader); -impl CR_URX_RTS_SW_MODE_R { - pub(crate) fn new(bits: bool) -> Self { - CR_URX_RTS_SW_MODE_R(crate::FieldReader::new(bits)) + pub fn cr_urx_en(&self) -> CR_URX_EN_R { + CR_URX_EN_R::new((self.bits & 1) != 0) } -} -impl core::ops::Deref for CR_URX_RTS_SW_MODE_R { - type Target = crate::FieldReader; + #[doc = "Bit 1"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn cr_urx_rts_sw_mode(&self) -> CR_URX_RTS_SW_MODE_R { + CR_URX_RTS_SW_MODE_R::new(((self.bits >> 1) & 1) != 0) } -} -#[doc = "Field `cr_urx_rts_sw_mode` writer - "] -pub struct CR_URX_RTS_SW_MODE_W<'a> { - w: &'a mut W, -} -impl<'a> CR_URX_RTS_SW_MODE_W<'a> { - #[doc = r"Sets the field bit"] + #[doc = "Bit 2"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn cr_urx_rts_sw_val(&self) -> CR_URX_RTS_SW_VAL_R { + CR_URX_RTS_SW_VAL_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = r"Clears the field bit"] + #[doc = "Bit 3"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn cr_urx_abr_en(&self) -> CR_URX_ABR_EN_R { + CR_URX_ABR_EN_R::new(((self.bits >> 3) & 1) != 0) } - #[doc = r"Writes raw bits to the field"] + #[doc = "Bit 4"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} -#[doc = "Field `cr_urx_en` reader - "] -pub struct CR_URX_EN_R(crate::FieldReader); -impl CR_URX_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_URX_EN_R(crate::FieldReader::new(bits)) + pub fn cr_urx_prt_en(&self) -> CR_URX_PRT_EN_R { + CR_URX_PRT_EN_R::new(((self.bits >> 4) & 1) != 0) } -} -impl core::ops::Deref for CR_URX_EN_R { - type Target = crate::FieldReader; + #[doc = "Bit 5"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn cr_urx_prt_sel(&self) -> CR_URX_PRT_SEL_R { + CR_URX_PRT_SEL_R::new(((self.bits >> 5) & 1) != 0) } -} -#[doc = "Field `cr_urx_en` writer - "] -pub struct CR_URX_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_URX_EN_W<'a> { - #[doc = r"Sets the field bit"] + #[doc = "Bit 6"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn cr_urx_ir_en(&self) -> CR_URX_IR_EN_R { + CR_URX_IR_EN_R::new(((self.bits >> 6) & 1) != 0) } - #[doc = r"Clears the field bit"] + #[doc = "Bit 7"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn cr_urx_ir_inv(&self) -> CR_URX_IR_INV_R { + CR_URX_IR_INV_R::new(((self.bits >> 7) & 1) != 0) } - #[doc = r"Writes raw bits to the field"] + #[doc = "Bits 8:10"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn cr_urx_bit_cnt_d(&self) -> CR_URX_BIT_CNT_D_R { + CR_URX_BIT_CNT_D_R::new(((self.bits >> 8) & 7) as u8) } -} -impl R { - #[doc = "Bits 16:31"] + #[doc = "Bit 11"] #[inline(always)] - pub fn cr_urx_len(&self) -> CR_URX_LEN_R { - CR_URX_LEN_R::new(((self.bits >> 16) & 0xffff) as u16) + pub fn cr_urx_deg_en(&self) -> CR_URX_DEG_EN_R { + CR_URX_DEG_EN_R::new(((self.bits >> 11) & 1) != 0) } #[doc = "Bits 12:15"] #[inline(always)] pub fn cr_urx_deg_cnt(&self) -> CR_URX_DEG_CNT_R { CR_URX_DEG_CNT_R::new(((self.bits >> 12) & 0x0f) as u8) } - #[doc = "Bit 11"] - #[inline(always)] - pub fn cr_urx_deg_en(&self) -> CR_URX_DEG_EN_R { - CR_URX_DEG_EN_R::new(((self.bits >> 11) & 0x01) != 0) - } - #[doc = "Bits 8:10"] - #[inline(always)] - pub fn cr_urx_bit_cnt_d(&self) -> CR_URX_BIT_CNT_D_R { - CR_URX_BIT_CNT_D_R::new(((self.bits >> 8) & 0x07) as u8) - } - #[doc = "Bit 7"] - #[inline(always)] - pub fn cr_urx_ir_inv(&self) -> CR_URX_IR_INV_R { - CR_URX_IR_INV_R::new(((self.bits >> 7) & 0x01) != 0) - } - #[doc = "Bit 6"] - #[inline(always)] - pub fn cr_urx_ir_en(&self) -> CR_URX_IR_EN_R { - CR_URX_IR_EN_R::new(((self.bits >> 6) & 0x01) != 0) - } - #[doc = "Bit 5"] - #[inline(always)] - pub fn cr_urx_prt_sel(&self) -> CR_URX_PRT_SEL_R { - CR_URX_PRT_SEL_R::new(((self.bits >> 5) & 0x01) != 0) - } - #[doc = "Bit 4"] - #[inline(always)] - pub fn cr_urx_prt_en(&self) -> CR_URX_PRT_EN_R { - CR_URX_PRT_EN_R::new(((self.bits >> 4) & 0x01) != 0) - } - #[doc = "Bit 3"] - #[inline(always)] - pub fn cr_urx_abr_en(&self) -> CR_URX_ABR_EN_R { - CR_URX_ABR_EN_R::new(((self.bits >> 3) & 0x01) != 0) - } - #[doc = "Bit 2"] - #[inline(always)] - pub fn cr_urx_rts_sw_val(&self) -> CR_URX_RTS_SW_VAL_R { - CR_URX_RTS_SW_VAL_R::new(((self.bits >> 2) & 0x01) != 0) - } - #[doc = "Bit 1"] - #[inline(always)] - pub fn cr_urx_rts_sw_mode(&self) -> CR_URX_RTS_SW_MODE_R { - CR_URX_RTS_SW_MODE_R::new(((self.bits >> 1) & 0x01) != 0) - } - #[doc = "Bit 0"] + #[doc = "Bits 16:31"] #[inline(always)] - pub fn cr_urx_en(&self) -> CR_URX_EN_R { - CR_URX_EN_R::new((self.bits & 0x01) != 0) + pub fn cr_urx_len(&self) -> CR_URX_LEN_R { + CR_URX_LEN_R::new(((self.bits >> 16) & 0xffff) as u16) } } impl W { - #[doc = "Bits 16:31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn cr_urx_len(&mut self) -> CR_URX_LEN_W { - CR_URX_LEN_W { w: self } + #[must_use] + pub fn cr_urx_en(&mut self) -> CR_URX_EN_W<0> { + CR_URX_EN_W::new(self) } - #[doc = "Bits 12:15"] + #[doc = "Bit 1"] #[inline(always)] - pub fn cr_urx_deg_cnt(&mut self) -> CR_URX_DEG_CNT_W { - CR_URX_DEG_CNT_W { w: self } + #[must_use] + pub fn cr_urx_rts_sw_mode(&mut self) -> CR_URX_RTS_SW_MODE_W<1> { + CR_URX_RTS_SW_MODE_W::new(self) } - #[doc = "Bit 11"] + #[doc = "Bit 2"] #[inline(always)] - pub fn cr_urx_deg_en(&mut self) -> CR_URX_DEG_EN_W { - CR_URX_DEG_EN_W { w: self } + #[must_use] + pub fn cr_urx_rts_sw_val(&mut self) -> CR_URX_RTS_SW_VAL_W<2> { + CR_URX_RTS_SW_VAL_W::new(self) } - #[doc = "Bits 8:10"] + #[doc = "Bit 3"] #[inline(always)] - pub fn cr_urx_bit_cnt_d(&mut self) -> CR_URX_BIT_CNT_D_W { - CR_URX_BIT_CNT_D_W { w: self } + #[must_use] + pub fn cr_urx_abr_en(&mut self) -> CR_URX_ABR_EN_W<3> { + CR_URX_ABR_EN_W::new(self) } - #[doc = "Bit 7"] + #[doc = "Bit 4"] #[inline(always)] - pub fn cr_urx_ir_inv(&mut self) -> CR_URX_IR_INV_W { - CR_URX_IR_INV_W { w: self } + #[must_use] + pub fn cr_urx_prt_en(&mut self) -> CR_URX_PRT_EN_W<4> { + CR_URX_PRT_EN_W::new(self) } - #[doc = "Bit 6"] + #[doc = "Bit 5"] #[inline(always)] - pub fn cr_urx_ir_en(&mut self) -> CR_URX_IR_EN_W { - CR_URX_IR_EN_W { w: self } + #[must_use] + pub fn cr_urx_prt_sel(&mut self) -> CR_URX_PRT_SEL_W<5> { + CR_URX_PRT_SEL_W::new(self) } - #[doc = "Bit 5"] + #[doc = "Bit 6"] #[inline(always)] - pub fn cr_urx_prt_sel(&mut self) -> CR_URX_PRT_SEL_W { - CR_URX_PRT_SEL_W { w: self } + #[must_use] + pub fn cr_urx_ir_en(&mut self) -> CR_URX_IR_EN_W<6> { + CR_URX_IR_EN_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 7"] #[inline(always)] - pub fn cr_urx_prt_en(&mut self) -> CR_URX_PRT_EN_W { - CR_URX_PRT_EN_W { w: self } + #[must_use] + pub fn cr_urx_ir_inv(&mut self) -> CR_URX_IR_INV_W<7> { + CR_URX_IR_INV_W::new(self) } - #[doc = "Bit 3"] + #[doc = "Bits 8:10"] #[inline(always)] - pub fn cr_urx_abr_en(&mut self) -> CR_URX_ABR_EN_W { - CR_URX_ABR_EN_W { w: self } + #[must_use] + pub fn cr_urx_bit_cnt_d(&mut self) -> CR_URX_BIT_CNT_D_W<8> { + CR_URX_BIT_CNT_D_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bit 11"] #[inline(always)] - pub fn cr_urx_rts_sw_val(&mut self) -> CR_URX_RTS_SW_VAL_W { - CR_URX_RTS_SW_VAL_W { w: self } + #[must_use] + pub fn cr_urx_deg_en(&mut self) -> CR_URX_DEG_EN_W<11> { + CR_URX_DEG_EN_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bits 12:15"] #[inline(always)] - pub fn cr_urx_rts_sw_mode(&mut self) -> CR_URX_RTS_SW_MODE_W { - CR_URX_RTS_SW_MODE_W { w: self } + #[must_use] + pub fn cr_urx_deg_cnt(&mut self) -> CR_URX_DEG_CNT_W<12> { + CR_URX_DEG_CNT_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bits 16:31"] #[inline(always)] - pub fn cr_urx_en(&mut self) -> CR_URX_EN_W { - CR_URX_EN_W { w: self } + #[must_use] + pub fn cr_urx_len(&mut self) -> CR_URX_LEN_W<16> { + CR_URX_LEN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -575,11 +240,10 @@ impl crate::Readable for URX_CONFIG_SPEC { #[doc = "`write(|w| ..)` method takes [urx_config::W](W) writer structure"] impl crate::Writable for URX_CONFIG_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets urx_config to value 0x0700"] impl crate::Resettable for URX_CONFIG_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0700 - } + const RESET_VALUE: Self::Ux = 0x0700; } diff --git a/src/uart/urx_ir_position.rs b/src/uart/urx_ir_position.rs index a113c7f..6b7fe0a 100644 --- a/src/uart/urx_ir_position.rs +++ b/src/uart/urx_ir_position.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,37 +28,17 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `cr_urx_ir_pos_s` reader - "] -pub struct CR_URX_IR_POS_S_R(crate::FieldReader); -impl CR_URX_IR_POS_S_R { - pub(crate) fn new(bits: u16) -> Self { - CR_URX_IR_POS_S_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_URX_IR_POS_S_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_URX_IR_POS_S_R = crate::FieldReader; #[doc = "Field `cr_urx_ir_pos_s` writer - "] -pub struct CR_URX_IR_POS_S_W<'a> { - w: &'a mut W, -} -impl<'a> CR_URX_IR_POS_S_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w - } -} +pub type CR_URX_IR_POS_S_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, URX_IR_POSITION_SPEC, u16, u16, 16, O>; impl R { #[doc = "Bits 0:15"] #[inline(always)] @@ -68,10 +49,12 @@ impl R { impl W { #[doc = "Bits 0:15"] #[inline(always)] - pub fn cr_urx_ir_pos_s(&mut self) -> CR_URX_IR_POS_S_W { - CR_URX_IR_POS_S_W { w: self } + #[must_use] + pub fn cr_urx_ir_pos_s(&mut self) -> CR_URX_IR_POS_S_W<0> { + CR_URX_IR_POS_S_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for URX_IR_POSITION_SPEC { #[doc = "`write(|w| ..)` method takes [urx_ir_position::W](W) writer structure"] impl crate::Writable for URX_IR_POSITION_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets urx_ir_position to value 0x6f"] impl crate::Resettable for URX_IR_POSITION_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x6f - } + const RESET_VALUE: Self::Ux = 0x6f; } diff --git a/src/uart/urx_rto_timer.rs b/src/uart/urx_rto_timer.rs index b41dd7d..f280181 100644 --- a/src/uart/urx_rto_timer.rs +++ b/src/uart/urx_rto_timer.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,37 +28,17 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } #[doc = "Field `cr_urx_rto_value` reader - "] -pub struct CR_URX_RTO_VALUE_R(crate::FieldReader); -impl CR_URX_RTO_VALUE_R { - pub(crate) fn new(bits: u8) -> Self { - CR_URX_RTO_VALUE_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_URX_RTO_VALUE_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_URX_RTO_VALUE_R = crate::FieldReader; #[doc = "Field `cr_urx_rto_value` writer - "] -pub struct CR_URX_RTO_VALUE_W<'a> { - w: &'a mut W, -} -impl<'a> CR_URX_RTO_VALUE_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !0xff) | (value as u32 & 0xff); - self.w - } -} +pub type CR_URX_RTO_VALUE_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, URX_RTO_TIMER_SPEC, u8, u8, 8, O>; impl R { #[doc = "Bits 0:7"] #[inline(always)] @@ -68,10 +49,12 @@ impl R { impl W { #[doc = "Bits 0:7"] #[inline(always)] - pub fn cr_urx_rto_value(&mut self) -> CR_URX_RTO_VALUE_W { - CR_URX_RTO_VALUE_W { w: self } + #[must_use] + pub fn cr_urx_rto_value(&mut self) -> CR_URX_RTO_VALUE_W<0> { + CR_URX_RTO_VALUE_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -89,11 +72,10 @@ impl crate::Readable for URX_RTO_TIMER_SPEC { #[doc = "`write(|w| ..)` method takes [urx_rto_timer::W](W) writer structure"] impl crate::Writable for URX_RTO_TIMER_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets urx_rto_timer to value 0x0f"] impl crate::Resettable for URX_RTO_TIMER_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x0f - } + const RESET_VALUE: Self::Ux = 0x0f; } diff --git a/src/uart/utx_config.rs b/src/uart/utx_config.rs index b3bb23f..f16ab91 100644 --- a/src/uart/utx_config.rs +++ b/src/uart/utx_config.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,445 +28,170 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `cr_utx_len` reader - "] -pub struct CR_UTX_LEN_R(crate::FieldReader); -impl CR_UTX_LEN_R { - pub(crate) fn new(bits: u16) -> Self { - CR_UTX_LEN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_UTX_LEN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_utx_len` writer - "] -pub struct CR_UTX_LEN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_UTX_LEN_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xffff << 16)) | ((value as u32 & 0xffff) << 16); - self.w - } -} -#[doc = "Field `cr_utx_bit_cnt_p` reader - "] -pub struct CR_UTX_BIT_CNT_P_R(crate::FieldReader); -impl CR_UTX_BIT_CNT_P_R { - pub(crate) fn new(bits: u8) -> Self { - CR_UTX_BIT_CNT_P_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_UTX_BIT_CNT_P_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_utx_bit_cnt_p` writer - "] -pub struct CR_UTX_BIT_CNT_P_W<'a> { - w: &'a mut W, -} -impl<'a> CR_UTX_BIT_CNT_P_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x03 << 12)) | ((value as u32 & 0x03) << 12); - self.w - } -} -#[doc = "Field `cr_utx_bit_cnt_d` reader - "] -pub struct CR_UTX_BIT_CNT_D_R(crate::FieldReader); -impl CR_UTX_BIT_CNT_D_R { - pub(crate) fn new(bits: u8) -> Self { - CR_UTX_BIT_CNT_D_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_UTX_BIT_CNT_D_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_utx_bit_cnt_d` writer - "] -pub struct CR_UTX_BIT_CNT_D_W<'a> { - w: &'a mut W, -} -impl<'a> CR_UTX_BIT_CNT_D_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u8) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x07 << 8)) | ((value as u32 & 0x07) << 8); - self.w - } -} -#[doc = "Field `cr_utx_ir_inv` reader - "] -pub struct CR_UTX_IR_INV_R(crate::FieldReader); -impl CR_UTX_IR_INV_R { - pub(crate) fn new(bits: bool) -> Self { - CR_UTX_IR_INV_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_UTX_IR_INV_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_utx_ir_inv` writer - "] -pub struct CR_UTX_IR_INV_W<'a> { - w: &'a mut W, -} -impl<'a> CR_UTX_IR_INV_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7); - self.w - } -} -#[doc = "Field `cr_utx_ir_en` reader - "] -pub struct CR_UTX_IR_EN_R(crate::FieldReader); -impl CR_UTX_IR_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_UTX_IR_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_UTX_IR_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_utx_ir_en` writer - "] -pub struct CR_UTX_IR_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_UTX_IR_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); - self.w - } -} -#[doc = "Field `cr_utx_prt_sel` reader - "] -pub struct CR_UTX_PRT_SEL_R(crate::FieldReader); -impl CR_UTX_PRT_SEL_R { - pub(crate) fn new(bits: bool) -> Self { - CR_UTX_PRT_SEL_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_UTX_PRT_SEL_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_utx_prt_sel` writer - "] -pub struct CR_UTX_PRT_SEL_W<'a> { - w: &'a mut W, -} -impl<'a> CR_UTX_PRT_SEL_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); - self.w - } -} -#[doc = "Field `cr_utx_prt_en` reader - "] -pub struct CR_UTX_PRT_EN_R(crate::FieldReader); -impl CR_UTX_PRT_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_UTX_PRT_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_UTX_PRT_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_utx_prt_en` writer - "] -pub struct CR_UTX_PRT_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_UTX_PRT_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); - self.w - } -} +#[doc = "Field `cr_utx_en` reader - "] +pub type CR_UTX_EN_R = crate::BitReader; +#[doc = "Field `cr_utx_en` writer - "] +pub type CR_UTX_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, UTX_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_utx_cts_en` reader - "] +pub type CR_UTX_CTS_EN_R = crate::BitReader; +#[doc = "Field `cr_utx_cts_en` writer - "] +pub type CR_UTX_CTS_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, UTX_CONFIG_SPEC, bool, O>; #[doc = "Field `cr_utx_frm_en` reader - "] -pub struct CR_UTX_FRM_EN_R(crate::FieldReader); -impl CR_UTX_FRM_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_UTX_FRM_EN_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_UTX_FRM_EN_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_UTX_FRM_EN_R = crate::BitReader; #[doc = "Field `cr_utx_frm_en` writer - "] -pub struct CR_UTX_FRM_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_UTX_FRM_EN_W<'a> { - #[doc = r"Sets the field bit"] - #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) - } - #[doc = r"Clears the field bit"] - #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) - } - #[doc = r"Writes raw bits to the field"] +pub type CR_UTX_FRM_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, UTX_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_utx_prt_en` reader - "] +pub type CR_UTX_PRT_EN_R = crate::BitReader; +#[doc = "Field `cr_utx_prt_en` writer - "] +pub type CR_UTX_PRT_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, UTX_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_utx_prt_sel` reader - "] +pub type CR_UTX_PRT_SEL_R = crate::BitReader; +#[doc = "Field `cr_utx_prt_sel` writer - "] +pub type CR_UTX_PRT_SEL_W<'a, const O: u8> = crate::BitWriter<'a, u32, UTX_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_utx_ir_en` reader - "] +pub type CR_UTX_IR_EN_R = crate::BitReader; +#[doc = "Field `cr_utx_ir_en` writer - "] +pub type CR_UTX_IR_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, UTX_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_utx_ir_inv` reader - "] +pub type CR_UTX_IR_INV_R = crate::BitReader; +#[doc = "Field `cr_utx_ir_inv` writer - "] +pub type CR_UTX_IR_INV_W<'a, const O: u8> = crate::BitWriter<'a, u32, UTX_CONFIG_SPEC, bool, O>; +#[doc = "Field `cr_utx_bit_cnt_d` reader - "] +pub type CR_UTX_BIT_CNT_D_R = crate::FieldReader; +#[doc = "Field `cr_utx_bit_cnt_d` writer - "] +pub type CR_UTX_BIT_CNT_D_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, UTX_CONFIG_SPEC, u8, u8, 3, O>; +#[doc = "Field `cr_utx_bit_cnt_p` reader - "] +pub type CR_UTX_BIT_CNT_P_R = crate::FieldReader; +#[doc = "Field `cr_utx_bit_cnt_p` writer - "] +pub type CR_UTX_BIT_CNT_P_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, UTX_CONFIG_SPEC, u8, u8, 2, O>; +#[doc = "Field `cr_utx_len` reader - "] +pub type CR_UTX_LEN_R = crate::FieldReader; +#[doc = "Field `cr_utx_len` writer - "] +pub type CR_UTX_LEN_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, UTX_CONFIG_SPEC, u16, u16, 16, O>; +impl R { + #[doc = "Bit 0"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); - self.w - } -} -#[doc = "Field `cr_utx_cts_en` reader - "] -pub struct CR_UTX_CTS_EN_R(crate::FieldReader); -impl CR_UTX_CTS_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_UTX_CTS_EN_R(crate::FieldReader::new(bits)) + pub fn cr_utx_en(&self) -> CR_UTX_EN_R { + CR_UTX_EN_R::new((self.bits & 1) != 0) } -} -impl core::ops::Deref for CR_UTX_CTS_EN_R { - type Target = crate::FieldReader; + #[doc = "Bit 1"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn cr_utx_cts_en(&self) -> CR_UTX_CTS_EN_R { + CR_UTX_CTS_EN_R::new(((self.bits >> 1) & 1) != 0) } -} -#[doc = "Field `cr_utx_cts_en` writer - "] -pub struct CR_UTX_CTS_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_UTX_CTS_EN_W<'a> { - #[doc = r"Sets the field bit"] + #[doc = "Bit 2"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn cr_utx_frm_en(&self) -> CR_UTX_FRM_EN_R { + CR_UTX_FRM_EN_R::new(((self.bits >> 2) & 1) != 0) } - #[doc = r"Clears the field bit"] + #[doc = "Bit 4"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn cr_utx_prt_en(&self) -> CR_UTX_PRT_EN_R { + CR_UTX_PRT_EN_R::new(((self.bits >> 4) & 1) != 0) } - #[doc = r"Writes raw bits to the field"] + #[doc = "Bit 5"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); - self.w - } -} -#[doc = "Field `cr_utx_en` reader - "] -pub struct CR_UTX_EN_R(crate::FieldReader); -impl CR_UTX_EN_R { - pub(crate) fn new(bits: bool) -> Self { - CR_UTX_EN_R(crate::FieldReader::new(bits)) + pub fn cr_utx_prt_sel(&self) -> CR_UTX_PRT_SEL_R { + CR_UTX_PRT_SEL_R::new(((self.bits >> 5) & 1) != 0) } -} -impl core::ops::Deref for CR_UTX_EN_R { - type Target = crate::FieldReader; + #[doc = "Bit 6"] #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 + pub fn cr_utx_ir_en(&self) -> CR_UTX_IR_EN_R { + CR_UTX_IR_EN_R::new(((self.bits >> 6) & 1) != 0) } -} -#[doc = "Field `cr_utx_en` writer - "] -pub struct CR_UTX_EN_W<'a> { - w: &'a mut W, -} -impl<'a> CR_UTX_EN_W<'a> { - #[doc = r"Sets the field bit"] + #[doc = "Bit 7"] #[inline(always)] - pub fn set_bit(self) -> &'a mut W { - self.bit(true) + pub fn cr_utx_ir_inv(&self) -> CR_UTX_IR_INV_R { + CR_UTX_IR_INV_R::new(((self.bits >> 7) & 1) != 0) } - #[doc = r"Clears the field bit"] + #[doc = "Bits 8:10"] #[inline(always)] - pub fn clear_bit(self) -> &'a mut W { - self.bit(false) + pub fn cr_utx_bit_cnt_d(&self) -> CR_UTX_BIT_CNT_D_R { + CR_UTX_BIT_CNT_D_R::new(((self.bits >> 8) & 7) as u8) } - #[doc = r"Writes raw bits to the field"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn bit(self, value: bool) -> &'a mut W { - self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); - self.w + pub fn cr_utx_bit_cnt_p(&self) -> CR_UTX_BIT_CNT_P_R { + CR_UTX_BIT_CNT_P_R::new(((self.bits >> 12) & 3) as u8) } -} -impl R { #[doc = "Bits 16:31"] #[inline(always)] pub fn cr_utx_len(&self) -> CR_UTX_LEN_R { CR_UTX_LEN_R::new(((self.bits >> 16) & 0xffff) as u16) } - #[doc = "Bits 12:13"] - #[inline(always)] - pub fn cr_utx_bit_cnt_p(&self) -> CR_UTX_BIT_CNT_P_R { - CR_UTX_BIT_CNT_P_R::new(((self.bits >> 12) & 0x03) as u8) - } - #[doc = "Bits 8:10"] - #[inline(always)] - pub fn cr_utx_bit_cnt_d(&self) -> CR_UTX_BIT_CNT_D_R { - CR_UTX_BIT_CNT_D_R::new(((self.bits >> 8) & 0x07) as u8) - } - #[doc = "Bit 7"] - #[inline(always)] - pub fn cr_utx_ir_inv(&self) -> CR_UTX_IR_INV_R { - CR_UTX_IR_INV_R::new(((self.bits >> 7) & 0x01) != 0) - } - #[doc = "Bit 6"] - #[inline(always)] - pub fn cr_utx_ir_en(&self) -> CR_UTX_IR_EN_R { - CR_UTX_IR_EN_R::new(((self.bits >> 6) & 0x01) != 0) - } - #[doc = "Bit 5"] - #[inline(always)] - pub fn cr_utx_prt_sel(&self) -> CR_UTX_PRT_SEL_R { - CR_UTX_PRT_SEL_R::new(((self.bits >> 5) & 0x01) != 0) - } - #[doc = "Bit 4"] - #[inline(always)] - pub fn cr_utx_prt_en(&self) -> CR_UTX_PRT_EN_R { - CR_UTX_PRT_EN_R::new(((self.bits >> 4) & 0x01) != 0) - } - #[doc = "Bit 2"] - #[inline(always)] - pub fn cr_utx_frm_en(&self) -> CR_UTX_FRM_EN_R { - CR_UTX_FRM_EN_R::new(((self.bits >> 2) & 0x01) != 0) - } - #[doc = "Bit 1"] - #[inline(always)] - pub fn cr_utx_cts_en(&self) -> CR_UTX_CTS_EN_R { - CR_UTX_CTS_EN_R::new(((self.bits >> 1) & 0x01) != 0) - } - #[doc = "Bit 0"] - #[inline(always)] - pub fn cr_utx_en(&self) -> CR_UTX_EN_R { - CR_UTX_EN_R::new((self.bits & 0x01) != 0) - } } impl W { - #[doc = "Bits 16:31"] + #[doc = "Bit 0"] #[inline(always)] - pub fn cr_utx_len(&mut self) -> CR_UTX_LEN_W { - CR_UTX_LEN_W { w: self } + #[must_use] + pub fn cr_utx_en(&mut self) -> CR_UTX_EN_W<0> { + CR_UTX_EN_W::new(self) } - #[doc = "Bits 12:13"] + #[doc = "Bit 1"] #[inline(always)] - pub fn cr_utx_bit_cnt_p(&mut self) -> CR_UTX_BIT_CNT_P_W { - CR_UTX_BIT_CNT_P_W { w: self } + #[must_use] + pub fn cr_utx_cts_en(&mut self) -> CR_UTX_CTS_EN_W<1> { + CR_UTX_CTS_EN_W::new(self) } - #[doc = "Bits 8:10"] + #[doc = "Bit 2"] #[inline(always)] - pub fn cr_utx_bit_cnt_d(&mut self) -> CR_UTX_BIT_CNT_D_W { - CR_UTX_BIT_CNT_D_W { w: self } + #[must_use] + pub fn cr_utx_frm_en(&mut self) -> CR_UTX_FRM_EN_W<2> { + CR_UTX_FRM_EN_W::new(self) } - #[doc = "Bit 7"] + #[doc = "Bit 4"] #[inline(always)] - pub fn cr_utx_ir_inv(&mut self) -> CR_UTX_IR_INV_W { - CR_UTX_IR_INV_W { w: self } + #[must_use] + pub fn cr_utx_prt_en(&mut self) -> CR_UTX_PRT_EN_W<4> { + CR_UTX_PRT_EN_W::new(self) } - #[doc = "Bit 6"] + #[doc = "Bit 5"] #[inline(always)] - pub fn cr_utx_ir_en(&mut self) -> CR_UTX_IR_EN_W { - CR_UTX_IR_EN_W { w: self } + #[must_use] + pub fn cr_utx_prt_sel(&mut self) -> CR_UTX_PRT_SEL_W<5> { + CR_UTX_PRT_SEL_W::new(self) } - #[doc = "Bit 5"] + #[doc = "Bit 6"] #[inline(always)] - pub fn cr_utx_prt_sel(&mut self) -> CR_UTX_PRT_SEL_W { - CR_UTX_PRT_SEL_W { w: self } + #[must_use] + pub fn cr_utx_ir_en(&mut self) -> CR_UTX_IR_EN_W<6> { + CR_UTX_IR_EN_W::new(self) } - #[doc = "Bit 4"] + #[doc = "Bit 7"] #[inline(always)] - pub fn cr_utx_prt_en(&mut self) -> CR_UTX_PRT_EN_W { - CR_UTX_PRT_EN_W { w: self } + #[must_use] + pub fn cr_utx_ir_inv(&mut self) -> CR_UTX_IR_INV_W<7> { + CR_UTX_IR_INV_W::new(self) } - #[doc = "Bit 2"] + #[doc = "Bits 8:10"] #[inline(always)] - pub fn cr_utx_frm_en(&mut self) -> CR_UTX_FRM_EN_W { - CR_UTX_FRM_EN_W { w: self } + #[must_use] + pub fn cr_utx_bit_cnt_d(&mut self) -> CR_UTX_BIT_CNT_D_W<8> { + CR_UTX_BIT_CNT_D_W::new(self) } - #[doc = "Bit 1"] + #[doc = "Bits 12:13"] #[inline(always)] - pub fn cr_utx_cts_en(&mut self) -> CR_UTX_CTS_EN_W { - CR_UTX_CTS_EN_W { w: self } + #[must_use] + pub fn cr_utx_bit_cnt_p(&mut self) -> CR_UTX_BIT_CNT_P_W<12> { + CR_UTX_BIT_CNT_P_W::new(self) } - #[doc = "Bit 0"] + #[doc = "Bits 16:31"] #[inline(always)] - pub fn cr_utx_en(&mut self) -> CR_UTX_EN_W { - CR_UTX_EN_W { w: self } + #[must_use] + pub fn cr_utx_len(&mut self) -> CR_UTX_LEN_W<16> { + CR_UTX_LEN_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -483,11 +209,10 @@ impl crate::Readable for UTX_CONFIG_SPEC { #[doc = "`write(|w| ..)` method takes [utx_config::W](W) writer structure"] impl crate::Writable for UTX_CONFIG_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets utx_config to value 0x1700"] impl crate::Resettable for UTX_CONFIG_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x1700 - } + const RESET_VALUE: Self::Ux = 0x1700; } diff --git a/src/uart/utx_ir_position.rs b/src/uart/utx_ir_position.rs index 9e17a7b..7e9b361 100644 --- a/src/uart/utx_ir_position.rs +++ b/src/uart/utx_ir_position.rs @@ -7,7 +7,8 @@ impl core::ops::Deref for R { &self.0 } } -impl core::convert::From> for R { +impl From> for R { + #[inline(always)] fn from(reader: crate::R) -> Self { R(reader) } @@ -27,87 +28,49 @@ impl core::ops::DerefMut for W { &mut self.0 } } -impl core::convert::From> for W { +impl From> for W { + #[inline(always)] fn from(writer: crate::W) -> Self { W(writer) } } -#[doc = "Field `cr_utx_ir_pos_p` reader - "] -pub struct CR_UTX_IR_POS_P_R(crate::FieldReader); -impl CR_UTX_IR_POS_P_R { - pub(crate) fn new(bits: u16) -> Self { - CR_UTX_IR_POS_P_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_UTX_IR_POS_P_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} -#[doc = "Field `cr_utx_ir_pos_p` writer - "] -pub struct CR_UTX_IR_POS_P_W<'a> { - w: &'a mut W, -} -impl<'a> CR_UTX_IR_POS_P_W<'a> { - #[doc = r"Writes raw bits to the field"] - #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !(0xffff << 16)) | ((value as u32 & 0xffff) << 16); - self.w - } -} #[doc = "Field `cr_utx_ir_pos_s` reader - "] -pub struct CR_UTX_IR_POS_S_R(crate::FieldReader); -impl CR_UTX_IR_POS_S_R { - pub(crate) fn new(bits: u16) -> Self { - CR_UTX_IR_POS_S_R(crate::FieldReader::new(bits)) - } -} -impl core::ops::Deref for CR_UTX_IR_POS_S_R { - type Target = crate::FieldReader; - #[inline(always)] - fn deref(&self) -> &Self::Target { - &self.0 - } -} +pub type CR_UTX_IR_POS_S_R = crate::FieldReader; #[doc = "Field `cr_utx_ir_pos_s` writer - "] -pub struct CR_UTX_IR_POS_S_W<'a> { - w: &'a mut W, -} -impl<'a> CR_UTX_IR_POS_S_W<'a> { - #[doc = r"Writes raw bits to the field"] +pub type CR_UTX_IR_POS_S_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, UTX_IR_POSITION_SPEC, u16, u16, 16, O>; +#[doc = "Field `cr_utx_ir_pos_p` reader - "] +pub type CR_UTX_IR_POS_P_R = crate::FieldReader; +#[doc = "Field `cr_utx_ir_pos_p` writer - "] +pub type CR_UTX_IR_POS_P_W<'a, const O: u8> = + crate::FieldWriter<'a, u32, UTX_IR_POSITION_SPEC, u16, u16, 16, O>; +impl R { + #[doc = "Bits 0:15"] #[inline(always)] - pub unsafe fn bits(self, value: u16) -> &'a mut W { - self.w.bits = (self.w.bits & !0xffff) | (value as u32 & 0xffff); - self.w + pub fn cr_utx_ir_pos_s(&self) -> CR_UTX_IR_POS_S_R { + CR_UTX_IR_POS_S_R::new((self.bits & 0xffff) as u16) } -} -impl R { #[doc = "Bits 16:31"] #[inline(always)] pub fn cr_utx_ir_pos_p(&self) -> CR_UTX_IR_POS_P_R { CR_UTX_IR_POS_P_R::new(((self.bits >> 16) & 0xffff) as u16) } - #[doc = "Bits 0:15"] - #[inline(always)] - pub fn cr_utx_ir_pos_s(&self) -> CR_UTX_IR_POS_S_R { - CR_UTX_IR_POS_S_R::new((self.bits & 0xffff) as u16) - } } impl W { - #[doc = "Bits 16:31"] + #[doc = "Bits 0:15"] #[inline(always)] - pub fn cr_utx_ir_pos_p(&mut self) -> CR_UTX_IR_POS_P_W { - CR_UTX_IR_POS_P_W { w: self } + #[must_use] + pub fn cr_utx_ir_pos_s(&mut self) -> CR_UTX_IR_POS_S_W<0> { + CR_UTX_IR_POS_S_W::new(self) } - #[doc = "Bits 0:15"] + #[doc = "Bits 16:31"] #[inline(always)] - pub fn cr_utx_ir_pos_s(&mut self) -> CR_UTX_IR_POS_S_W { - CR_UTX_IR_POS_S_W { w: self } + #[must_use] + pub fn cr_utx_ir_pos_p(&mut self) -> CR_UTX_IR_POS_P_W<16> { + CR_UTX_IR_POS_P_W::new(self) } #[doc = "Writes raw bits to the register."] + #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self @@ -125,11 +88,10 @@ impl crate::Readable for UTX_IR_POSITION_SPEC { #[doc = "`write(|w| ..)` method takes [utx_ir_position::W](W) writer structure"] impl crate::Writable for UTX_IR_POSITION_SPEC { type Writer = W; + const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; + const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0; } #[doc = "`reset()` method sets utx_ir_position to value 0x009f_0070"] impl crate::Resettable for UTX_IR_POSITION_SPEC { - #[inline(always)] - fn reset_value() -> Self::Ux { - 0x009f_0070 - } + const RESET_VALUE: Self::Ux = 0x009f_0070; } From 9a085712ef27fa9f7af3ef572cfcf8d1c40b55a8 Mon Sep 17 00:00:00 2001 From: 9names <60134748+9names@users.noreply.github.com> Date: Sat, 18 Feb 2023 22:53:59 +1100 Subject: [PATCH 4/5] CI: Remove SVDConv, step was broken and it wasn't used anyway --- .github/workflows/ci.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9d59362..281d240 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,12 +74,6 @@ jobs: - name: Put new cargo binary directory into path run: echo "~/cargo-bin" >> $GITHUB_PATH - - name: Install and run SVDConv - run: | - pushd ~/.local/bin - wget https://github.com/ARM-software/CMSIS_5/raw/develop/CMSIS/Utilities/Linux64/SVDConv - chmod 0770 SVDConv - popd - name: Build PAC run: ./scripts/regenerate-rust-code.sh soc602_reg.svd src From e1781141b067d27d0c92c777450aca0284ae8651 Mon Sep 17 00:00:00 2001 From: 9names <60134748+9names@users.noreply.github.com> Date: Sat, 18 Feb 2023 22:56:38 +1100 Subject: [PATCH 5/5] CI: Don't build with MSRV until we can work out why it's broken --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 281d240..4509a46 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,9 +19,9 @@ jobs: # Run checks on stable and nightly Rust rust: [stable, nightly] - include: - # Run check with MSRV as well - - rust: 1.59.0 + # include: + # # Run check with MSRV as well + # - rust: 1.59.0 steps: - uses: actions/checkout@v2